@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
|
@@ -39,7 +39,6 @@ module.exports = __toCommonJS(useThemeState_exports);
|
|
|
39
39
|
var import_constants = require("@tamagui/constants");
|
|
40
40
|
var import_react = require("react");
|
|
41
41
|
var import_config = require("../config.native.js");
|
|
42
|
-
var import_formatDiagnostic = require("../helpers/formatDiagnostic.native.js");
|
|
43
42
|
var import_constants2 = require("../constants/constants.native.js");
|
|
44
43
|
var ThemeStateContext = (0, import_react.createContext)("");
|
|
45
44
|
var allListeners = /* @__PURE__ */ new Map();
|
|
@@ -97,6 +96,7 @@ var incReducer = function(c) {
|
|
|
97
96
|
var useThemeState = function(props) {
|
|
98
97
|
"use no memo";
|
|
99
98
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
99
|
+
var _ref;
|
|
100
100
|
var { disable } = props;
|
|
101
101
|
var parentId = (0, import_react.useContext)(ThemeStateContext);
|
|
102
102
|
if (!parentId && !isRoot) throw new Error(process.env.NODE_ENV === "development" ? `${import_constants2.MISSING_THEME_MESSAGE}
|
|
@@ -110,8 +110,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
110
110
|
var id = (0, import_react.useId)();
|
|
111
111
|
var propsKey = getPropsKey(props);
|
|
112
112
|
if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
|
|
113
|
-
var
|
|
114
|
-
if (!ref.current) ref.current = {
|
|
113
|
+
var r = (_ref = (0, import_react.useRef)(null)).current || (_ref.current = {
|
|
115
114
|
id,
|
|
116
115
|
parentId,
|
|
117
116
|
props,
|
|
@@ -121,22 +120,18 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
121
120
|
schemeKeys,
|
|
122
121
|
optimizeForFirstRender,
|
|
123
122
|
renderVersion: 0
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
ref.current.renderVersion++;
|
|
134
|
-
if (process.env.NODE_ENV === "development" && globalThis.time) globalThis.time`theme-prep-uses`;
|
|
123
|
+
});
|
|
124
|
+
r.props = props;
|
|
125
|
+
r.propsKey = propsKey;
|
|
126
|
+
r.isRoot = isRoot;
|
|
127
|
+
r.keys = keys;
|
|
128
|
+
r.schemeKeys = schemeKeys;
|
|
129
|
+
r.parentId = parentId;
|
|
130
|
+
r.renderVersion++;
|
|
135
131
|
var [, forceUpdate] = (0, import_react.useReducer)(incReducer, 0);
|
|
136
|
-
var state = getSnapshotImpl(
|
|
137
|
-
|
|
132
|
+
var state = getSnapshotImpl(r);
|
|
133
|
+
r.lastSnap = state;
|
|
138
134
|
(0, import_react.useEffect)(function() {
|
|
139
|
-
var r = ref.current;
|
|
140
135
|
var renderVersion = r.renderVersion;
|
|
141
136
|
if (r.lastSnap && !states.has(r.id)) {
|
|
142
137
|
states.set(r.id, r.lastSnap);
|
|
@@ -146,6 +141,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
146
141
|
if (r.unsubscribe && r.subscribedParentId !== r.parentId) cleanupThemeSubscription(r);
|
|
147
142
|
if (shouldSubscribeToTheme(r, cascadeOnChange)) {
|
|
148
143
|
if (!r.unsubscribe) {
|
|
144
|
+
var _listenersByParent, _pid;
|
|
149
145
|
var pid = r.parentId;
|
|
150
146
|
var sid = r.id;
|
|
151
147
|
var cb = function(forced) {
|
|
@@ -157,8 +153,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
157
153
|
forceUpdate();
|
|
158
154
|
}
|
|
159
155
|
};
|
|
160
|
-
listenersByParent[
|
|
161
|
-
listenersByParent[pid].add(sid);
|
|
156
|
+
((_listenersByParent = listenersByParent)[_pid = pid] || (_listenersByParent[_pid] = /* @__PURE__ */ new Set())).add(sid);
|
|
162
157
|
allListeners.set(sid, function() {
|
|
163
158
|
var forced = shouldForce;
|
|
164
159
|
PendingUpdate.set(sid, forced ? "force" : true);
|
|
@@ -191,10 +186,6 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
191
186
|
HadTheme.set(keys, false);
|
|
192
187
|
return;
|
|
193
188
|
}
|
|
194
|
-
if (process.env.NODE_ENV === "development" && props.debug === "verbose") {
|
|
195
|
-
var _states_get;
|
|
196
|
-
console.warn(` \xB7 useTheme(${id}) scheduleUpdate`, propsKey, (_states_get = states.get(id)) === null || _states_get === void 0 ? void 0 : _states_get.name);
|
|
197
|
-
}
|
|
198
189
|
scheduleUpdate(id);
|
|
199
190
|
HadTheme.set(keys, true);
|
|
200
191
|
}, [keys, propsKey]);
|
|
@@ -202,7 +193,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
202
193
|
};
|
|
203
194
|
var shouldSubscribeToTheme = function(r, cascadeOnChange) {
|
|
204
195
|
var _r_keys_current, _r_props_needsUpdate, _r_props;
|
|
205
|
-
return r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) ||
|
|
196
|
+
return Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || ((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || ((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props)));
|
|
206
197
|
};
|
|
207
198
|
function cleanupThemeSubscription(r) {
|
|
208
199
|
var _r_unsubscribe;
|
|
@@ -219,7 +210,7 @@ function cleanupThemeState(r) {
|
|
|
219
210
|
themeProviderParents.delete(r.id);
|
|
220
211
|
}
|
|
221
212
|
var getSnapshotImpl = function(r) {
|
|
222
|
-
var _keys_current, _props_needsUpdate;
|
|
213
|
+
var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate;
|
|
223
214
|
var { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;
|
|
224
215
|
var local = localStates.get(id);
|
|
225
216
|
var parentState = states.get(parentId);
|
|
@@ -227,16 +218,9 @@ var getSnapshotImpl = function(r) {
|
|
|
227
218
|
if (parentState && local._parentName === parentState.name && local._propsKey === propsKey) return local;
|
|
228
219
|
}
|
|
229
220
|
var isSchemeOnlyChange = !optimizeForFirstRender && import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)("fastSchemeChange") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name);
|
|
230
|
-
var allKeysSchemeOptimized =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var _keys_current_size;
|
|
234
|
-
var keysSize = (_keys_current_size = (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) !== null && _keys_current_size !== void 0 ? _keys_current_size : 0;
|
|
235
|
-
var _schemeKeys_current_size;
|
|
236
|
-
allKeysSchemeOptimized = ((_schemeKeys_current_size = schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) !== null && _schemeKeys_current_size !== void 0 ? _schemeKeys_current_size : 0) === keysSize && keysSize > 0;
|
|
237
|
-
}
|
|
238
|
-
var canSkipForSchemeChange = !!isSchemeOnlyChange && allKeysSchemeOptimized;
|
|
239
|
-
var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
|
|
221
|
+
var allKeysSchemeOptimized = !optimizeForFirstRender && Boolean(((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);
|
|
222
|
+
var canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized);
|
|
223
|
+
var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
|
|
240
224
|
var [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
241
225
|
var next = nextRaw;
|
|
242
226
|
if (props._themeUpdate && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {
|
|
@@ -253,22 +237,6 @@ var getSnapshotImpl = function(r) {
|
|
|
253
237
|
local = { ...next };
|
|
254
238
|
localStates.set(id, local);
|
|
255
239
|
}
|
|
256
|
-
if (process.env.NODE_ENV === "development" && props.debug === "verbose") {
|
|
257
|
-
console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name);
|
|
258
|
-
console.info({
|
|
259
|
-
props,
|
|
260
|
-
propsKey,
|
|
261
|
-
isRoot,
|
|
262
|
-
parentId,
|
|
263
|
-
local,
|
|
264
|
-
next,
|
|
265
|
-
needsUpdate,
|
|
266
|
-
isSchemeOnlyChange,
|
|
267
|
-
allKeysSchemeOptimized,
|
|
268
|
-
canSkipForSchemeChange
|
|
269
|
-
});
|
|
270
|
-
console.groupEnd();
|
|
271
|
-
}
|
|
272
240
|
if (next !== local) {
|
|
273
241
|
Object.assign(local, next);
|
|
274
242
|
local.id = id;
|
|
@@ -280,17 +248,12 @@ var getSnapshotImpl = function(r) {
|
|
|
280
248
|
};
|
|
281
249
|
var getNextState = function(lastState, props, propsKey) {
|
|
282
250
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0;
|
|
283
|
-
var { debug } = props;
|
|
284
251
|
var parentState = states.get(parentId);
|
|
285
252
|
if (props.passThrough) return [false, lastState || parentState || { name: "" }];
|
|
286
|
-
|
|
287
|
-
var name = !propsKey && (!lastState || !
|
|
288
|
-
var isSameAsParent = parentState && (!name || name === parentState.name);
|
|
253
|
+
themes || (themes = (0, import_config.getConfig)().themes);
|
|
254
|
+
var name = !propsKey && (!lastState || !lastState.isNew) ? null : getNewThemeName(parentState === null || parentState === void 0 ? void 0 : parentState.name, props, pendingUpdate === "force" ? true : !!needsUpdate);
|
|
255
|
+
var isSameAsParent = Boolean(parentState && (!name || name === parentState.name));
|
|
289
256
|
var shouldRerender = Boolean(pendingUpdate === "force" || needsUpdate && (pendingUpdate || (lastState === null || lastState === void 0 ? void 0 : lastState.name) !== (parentState === null || parentState === void 0 ? void 0 : parentState.name)));
|
|
290
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
291
|
-
var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
292
|
-
console.info(message);
|
|
293
|
-
}
|
|
294
257
|
if (isSameAsParent) {
|
|
295
258
|
if (!shouldRerender && lastState && lastState.name === parentState.name) return [false, lastState];
|
|
296
259
|
return [shouldRerender, {
|
|
@@ -311,7 +274,7 @@ var getNextState = function(lastState, props, propsKey) {
|
|
|
311
274
|
var scheme = getScheme(name);
|
|
312
275
|
var _parentState_inverses;
|
|
313
276
|
var parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;
|
|
314
|
-
var isInverse = parentState && scheme !== parentState.scheme;
|
|
277
|
+
var isInverse = Boolean(parentState && scheme !== parentState.scheme);
|
|
315
278
|
var inverses = parentInverses + (isInverse ? 1 : 0);
|
|
316
279
|
var nextState = {
|
|
317
280
|
id,
|
|
@@ -326,19 +289,7 @@ var getNextState = function(lastState, props, propsKey) {
|
|
|
326
289
|
};
|
|
327
290
|
if (isRoot) rootThemeState = nextState;
|
|
328
291
|
if (pendingUpdate !== "force" && lastState && lastState.name === name) return [false, nextState];
|
|
329
|
-
|
|
330
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
331
|
-
console.groupCollapsed(` \xB7 useTheme(${id}) \u23ED\uFE0F ${name} shouldAvoidRerender: ${shouldAvoidRerender}`);
|
|
332
|
-
console.info({
|
|
333
|
-
lastState,
|
|
334
|
-
needsUpdate,
|
|
335
|
-
nextState,
|
|
336
|
-
pendingUpdate
|
|
337
|
-
});
|
|
338
|
-
console.groupEnd();
|
|
339
|
-
}
|
|
340
|
-
if (shouldAvoidRerender) return [false, nextState];
|
|
341
|
-
return [true, nextState];
|
|
292
|
+
return [!(pendingUpdate !== "force" && lastState && !needsUpdate && nextState.name === lastState.name), nextState];
|
|
342
293
|
};
|
|
343
294
|
function scheduleUpdate(id) {
|
|
344
295
|
var queue = [id];
|
|
@@ -368,8 +319,8 @@ function scheduleUpdate(id) {
|
|
|
368
319
|
}
|
|
369
320
|
}
|
|
370
321
|
visited.forEach(function(childId2) {
|
|
371
|
-
var
|
|
372
|
-
|
|
322
|
+
var _allListeners_get;
|
|
323
|
+
(_allListeners_get = allListeners.get(childId2)) === null || _allListeners_get === void 0 || _allListeners_get();
|
|
373
324
|
});
|
|
374
325
|
}
|
|
375
326
|
var validSchemes = {
|
|
@@ -381,12 +332,8 @@ function getScheme(name) {
|
|
|
381
332
|
}
|
|
382
333
|
function getNewThemeName() {
|
|
383
334
|
var parentName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", props = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
384
|
-
var { name
|
|
385
|
-
|
|
386
|
-
name,
|
|
387
|
-
reset
|
|
388
|
-
}));
|
|
389
|
-
var cacheKey = `${parentName}|${name || ""}|${reset ? 1 : 0}|${forceUpdate ? 1 : 0}`;
|
|
335
|
+
var { name } = props;
|
|
336
|
+
var cacheKey = `${parentName}|${name || ""}|${forceUpdate ? 1 : 0}`;
|
|
390
337
|
if (themeNameCacheVer !== cacheVersion) {
|
|
391
338
|
themeNameCache.clear();
|
|
392
339
|
themeNameCacheVer = cacheVersion;
|
|
@@ -394,7 +341,7 @@ function getNewThemeName() {
|
|
|
394
341
|
var cached = themeNameCache.get(cacheKey);
|
|
395
342
|
if (cached !== void 0) return cached;
|
|
396
343
|
}
|
|
397
|
-
var result = resolveThemeName(parentName, name !== null && name !== void 0 ? name : void 0,
|
|
344
|
+
var result = resolveThemeName(parentName, name !== null && name !== void 0 ? name : void 0, (0, import_config.getConfig)().themes, forceUpdate);
|
|
398
345
|
if (themeNameCache.size >= 1e4) themeNameCache.clear();
|
|
399
346
|
themeNameCache.set(cacheKey, result);
|
|
400
347
|
return result;
|
|
@@ -402,15 +349,8 @@ function getNewThemeName() {
|
|
|
402
349
|
var getThemeNameCacheSize = function() {
|
|
403
350
|
return themeNameCache.size;
|
|
404
351
|
};
|
|
405
|
-
function resolveThemeName(parentName, name,
|
|
406
|
-
var forceUpdate = arguments.length >
|
|
407
|
-
if (reset) {
|
|
408
|
-
if (parentName === "light" || parentName === "dark") return parentName === "light" ? "dark" : "light";
|
|
409
|
-
var lastPartIndex = parentName.lastIndexOf("_");
|
|
410
|
-
var resetName = lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex);
|
|
411
|
-
var scheme = parentName.slice(0, lastPartIndex);
|
|
412
|
-
return themes2[resetName] ? resetName : scheme;
|
|
413
|
-
}
|
|
352
|
+
function resolveThemeName(parentName, name, themes2) {
|
|
353
|
+
var forceUpdate = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
414
354
|
var parentParts = parentName ? parentName.split("_") : [];
|
|
415
355
|
var found = null;
|
|
416
356
|
if (name) {
|
|
@@ -429,11 +369,11 @@ function resolveThemeName(parentName, name, reset, themes2) {
|
|
|
429
369
|
return found;
|
|
430
370
|
}
|
|
431
371
|
var getPropsKey = function(param) {
|
|
432
|
-
var { name,
|
|
433
|
-
return `${name || ""}${
|
|
372
|
+
var { name, forceClassName, _themeUpdate } = param;
|
|
373
|
+
return `${name || ""}${forceClassName || ""}${(_themeUpdate === null || _themeUpdate === void 0 ? void 0 : _themeUpdate.key) || ""}`;
|
|
434
374
|
};
|
|
435
375
|
var hasThemeUpdatingProps = function(props) {
|
|
436
|
-
return "name" in props || "
|
|
376
|
+
return "name" in props || "forceClassName" in props || "_themeUpdate" in props;
|
|
437
377
|
};
|
|
438
378
|
|
|
439
379
|
//# sourceMappingURL=useThemeState.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeState.native.js","names":[],"sources":["cjs/hooks/useThemeState.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\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useThemeState_exports = {};\n__export(useThemeState_exports, {\n\tThemeStateContext: () => ThemeStateContext,\n\tforceUpdateThemes: () => forceUpdateThemes,\n\tgetNewThemeName: () => getNewThemeName,\n\tgetRootThemeState: () => getRootThemeState,\n\tgetThemeNameCacheSize: () => getThemeNameCacheSize,\n\tgetThemeProviderChainSizes: () => getThemeProviderChainSizes,\n\tgetThemeProviderParent: () => getThemeProviderParent,\n\tgetThemeState: () => getThemeState,\n\tgetThemeUpdateLayer: () => getThemeUpdateLayer,\n\thasThemeUpdatingProps: () => hasThemeUpdatingProps,\n\tresolveThemeName: () => resolveThemeName,\n\tuseThemeState: () => useThemeState\n});\nmodule.exports = __toCommonJS(useThemeState_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = require(\"react\");\nvar import_config = require(\"../config\");\nvar import_formatDiagnostic = require(\"../helpers/formatDiagnostic\");\nvar import_constants2 = require(\"../constants/constants\");\nvar ThemeStateContext = (0, import_react.createContext)(\"\");\nvar allListeners = /* @__PURE__ */ new Map();\nvar listenersByParent = {};\nvar HasRenderedOnce = /* @__PURE__ */ new WeakMap();\nvar HadTheme = /* @__PURE__ */ new WeakMap();\nvar PendingUpdate = /* @__PURE__ */ new Map();\nvar states = /* @__PURE__ */ new Map();\nvar localStates = /* @__PURE__ */ new Map();\nvar shouldForce = false;\nvar forceUpdateThemes = function() {\n\tcacheVersion++;\n\tshouldForce = true;\n\tallListeners.forEach(function(cb) {\n\t\treturn cb();\n\t});\n\tshouldForce = false;\n};\nvar getThemeState = function(id) {\n\treturn states.get(id);\n};\nvar themeUpdateLayers = /* @__PURE__ */ new Map();\nvar themeProviderParents = /* @__PURE__ */ new Map();\nvar getThemeUpdateLayer = function(id) {\n\treturn themeUpdateLayers.get(id);\n};\nvar getThemeProviderParent = function(id) {\n\treturn themeProviderParents.get(id);\n};\nvar getThemeProviderChainSizes = function() {\n\treturn {\n\t\tlayers: themeUpdateLayers.size,\n\t\tparents: themeProviderParents.size\n\t};\n};\nvar registerThemeProviderChain = function(id, parentId, props) {\n\tthemeProviderParents.set(id, parentId);\n\tif (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);\n\telse themeUpdateLayers.delete(id);\n};\nvar cacheVersion = 0;\nvar themeNameCache = /* @__PURE__ */ new Map();\nvar themeNameCacheVer = -1;\nvar themes = null;\nvar rootThemeState = null;\nvar getRootThemeState = function() {\n\treturn rootThemeState;\n};\nvar getThemeBaseName = function(name) {\n\treturn name.replace(/^(light|dark)_/, \"\");\n};\nvar incReducer = function(c) {\n\treturn c + 1;\n};\nvar useThemeState = function(props) {\n\t\"use no memo\";\n\tvar isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar { disable } = props;\n\tvar parentId = (0, import_react.useContext)(ThemeStateContext);\n\tif (!parentId && !isRoot) throw new Error(process.env.NODE_ENV === \"development\" ? `${import_constants2.MISSING_THEME_MESSAGE}\n\nLooked for theme${props.name ? ` \"${props.name}\"` : \"\"}, but no parent theme context was found (parentId: ${parentId}).` : import_constants2.MISSING_THEME_MESSAGE);\n\tif (disable) return states.get(parentId) || {\n\t\tid: \"\",\n\t\tname: \"light\",\n\t\ttheme: (0, import_config.getConfig)().themes.light\n\t};\n\tvar id = (0, import_react.useId)();\n\tvar propsKey = getPropsKey(props);\n\tif (cascadeOnChange) registerThemeProviderChain(id, parentId, props);\n\tvar ref = (0, import_react.useRef)(null);\n\tif (!ref.current) ref.current = {\n\t\tid,\n\t\tparentId,\n\t\tprops,\n\t\tpropsKey,\n\t\tisRoot,\n\t\tkeys,\n\t\tschemeKeys,\n\t\toptimizeForFirstRender,\n\t\trenderVersion: 0\n\t};\n\telse {\n\t\tref.current.props = props;\n\t\tref.current.propsKey = propsKey;\n\t\tref.current.isRoot = isRoot;\n\t\tref.current.keys = keys;\n\t\tref.current.schemeKeys = schemeKeys;\n\t\tref.current.parentId = parentId;\n\t}\n\tref.current.renderVersion++;\n\tif (process.env.NODE_ENV === \"development\" && globalThis.time) globalThis.time`theme-prep-uses`;\n\tvar [, forceUpdate] = (0, import_react.useReducer)(incReducer, 0);\n\tvar state = getSnapshotImpl(ref.current);\n\tref.current.lastSnap = state;\n\t(0, import_react.useEffect)(function() {\n\t\tvar r = ref.current;\n\t\tvar renderVersion = r.renderVersion;\n\t\tif (r.lastSnap && !states.has(r.id)) {\n\t\t\tstates.set(r.id, r.lastSnap);\n\t\t\tlocalStates.set(r.id, r.lastSnap);\n\t\t}\n\t\tif (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);\n\t\tif (r.unsubscribe && r.subscribedParentId !== r.parentId) cleanupThemeSubscription(r);\n\t\tif (shouldSubscribeToTheme(r, cascadeOnChange)) {\n\t\t\tif (!r.unsubscribe) {\n\t\t\t\tvar pid = r.parentId;\n\t\t\t\tvar sid = r.id;\n\t\t\t\tvar cb = function(forced) {\n\t\t\t\t\tvar next = getSnapshotImpl(r);\n\t\t\t\t\tif (next !== r.lastSnap) {\n\t\t\t\t\t\tvar _r_props_nativeUpdate, _r_props;\n\t\t\t\t\t\tr.lastSnap = next;\n\t\t\t\t\t\tif (!forced && ((_r_props_nativeUpdate = (_r_props = r.props).nativeUpdate) === null || _r_props_nativeUpdate === void 0 ? void 0 : _r_props_nativeUpdate.call(_r_props, next))) return;\n\t\t\t\t\t\tforceUpdate();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tlistenersByParent[pid] = listenersByParent[pid] || /* @__PURE__ */ new Set();\n\t\t\t\tlistenersByParent[pid].add(sid);\n\t\t\t\tallListeners.set(sid, function() {\n\t\t\t\t\tvar forced = shouldForce;\n\t\t\t\t\tPendingUpdate.set(sid, forced ? \"force\" : true);\n\t\t\t\t\tcb(forced);\n\t\t\t\t});\n\t\t\t\tr.subscribedParentId = pid;\n\t\t\t\tr.unsubscribe = function() {\n\t\t\t\t\tvar _listenersByParent_pid;\n\t\t\t\t\tallListeners.delete(sid);\n\t\t\t\t\t(_listenersByParent_pid = listenersByParent[pid]) === null || _listenersByParent_pid === void 0 || _listenersByParent_pid.delete(sid);\n\t\t\t\t\tlocalStates.delete(sid);\n\t\t\t\t\tstates.delete(sid);\n\t\t\t\t\tPendingUpdate.delete(sid);\n\t\t\t\t\tr.unsubscribe = void 0;\n\t\t\t\t\tr.subscribedParentId = void 0;\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (r.unsubscribe) cleanupThemeSubscription(r);\n\t\treturn function() {\n\t\t\tif (r.renderVersion === renderVersion) cleanupThemeState(r);\n\t\t};\n\t});\n\tif (cascadeOnChange) (0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tif (!HasRenderedOnce.get(keys)) {\n\t\t\tHasRenderedOnce.set(keys, true);\n\t\t\treturn;\n\t\t}\n\t\tif (!propsKey) {\n\t\t\tif (HadTheme.get(keys)) scheduleUpdate(id);\n\t\t\tHadTheme.set(keys, false);\n\t\t\treturn;\n\t\t}\n\t\tif (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n\t\t\tvar _states_get;\n\t\t\tconsole.warn(` \\xB7 useTheme(${id}) scheduleUpdate`, propsKey, (_states_get = states.get(id)) === null || _states_get === void 0 ? void 0 : _states_get.name);\n\t\t}\n\t\tscheduleUpdate(id);\n\t\tHadTheme.set(keys, true);\n\t}, [keys, propsKey]);\n\treturn state;\n};\nvar shouldSubscribeToTheme = function(r, cascadeOnChange) {\n\tvar _r_keys_current, _r_props_needsUpdate, _r_props;\n\treturn r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || !!((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || !!((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props));\n};\nfunction cleanupThemeSubscription(r) {\n\tvar _r_unsubscribe;\n\t(_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);\n}\nfunction cleanupThemeState(r) {\n\tif (r.unsubscribe) cleanupThemeSubscription(r);\n\telse {\n\t\tlocalStates.delete(r.id);\n\t\tstates.delete(r.id);\n\t\tPendingUpdate.delete(r.id);\n\t}\n\tthemeUpdateLayers.delete(r.id);\n\tthemeProviderParents.delete(r.id);\n}\nvar getSnapshotImpl = function(r) {\n\tvar _keys_current, _props_needsUpdate;\n\tvar { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;\n\tvar local = localStates.get(id);\n\tvar parentState = states.get(parentId);\n\tif (local && !PendingUpdate.has(id)) {\n\t\tif (parentState && local._parentName === parentState.name && local._propsKey === propsKey) return local;\n\t}\n\tvar isSchemeOnlyChange = !optimizeForFirstRender && import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)(\"fastSchemeChange\") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name);\n\tvar allKeysSchemeOptimized = false;\n\tif (!optimizeForFirstRender) {\n\t\tvar _keys_current1, _schemeKeys_current;\n\t\tvar _keys_current_size;\n\t\tvar keysSize = (_keys_current_size = (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) !== null && _keys_current_size !== void 0 ? _keys_current_size : 0;\n\t\tvar _schemeKeys_current_size;\n\t\tallKeysSchemeOptimized = ((_schemeKeys_current_size = schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) !== null && _schemeKeys_current_size !== void 0 ? _schemeKeys_current_size : 0) === keysSize && keysSize > 0;\n\t}\n\tvar canSkipForSchemeChange = !!isSchemeOnlyChange && allKeysSchemeOptimized;\n\tvar needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === \"light\" || props.name === \"dark\" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);\n\tvar [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));\n\tvar next = nextRaw;\n\tif (props._themeUpdate && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {\n\t\tvar _states_get;\n\t\tvar parentTheme = ((_states_get = states.get(parentId)) === null || _states_get === void 0 ? void 0 : _states_get.theme) || nextRaw.theme;\n\t\tvar merged = props._themeUpdate.getTheme(parentTheme, nextRaw.name, (0, import_config.getConfig)());\n\t\tif (merged !== nextRaw.theme) next = {\n\t\t\t...nextRaw,\n\t\t\ttheme: merged\n\t\t};\n\t}\n\tPendingUpdate.delete(id);\n\tif (!local || rerender) {\n\t\tlocal = { ...next };\n\t\tlocalStates.set(id, local);\n\t}\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n\t\tconsole.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, \">\", next.name);\n\t\tconsole.info({\n\t\t\tprops,\n\t\t\tpropsKey,\n\t\t\tisRoot,\n\t\t\tparentId,\n\t\t\tlocal,\n\t\t\tnext,\n\t\t\tneedsUpdate,\n\t\t\tisSchemeOnlyChange,\n\t\t\tallKeysSchemeOptimized,\n\t\t\tcanSkipForSchemeChange\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (next !== local) {\n\t\tObject.assign(local, next);\n\t\tlocal.id = id;\n\t}\n\tlocal._parentName = parentState === null || parentState === void 0 ? void 0 : parentState.name;\n\tlocal._propsKey = propsKey;\n\tstates.set(id, next);\n\treturn local;\n};\nvar getNextState = function(lastState, props, propsKey) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0;\n\tvar { debug } = props;\n\tvar parentState = states.get(parentId);\n\tif (props.passThrough) return [false, lastState || parentState || { name: \"\" }];\n\tif (!themes) themes = (0, import_config.getConfig)().themes;\n\tvar name = !propsKey && (!lastState || !(lastState === null || lastState === void 0 ? void 0 : lastState.isNew)) ? null : getNewThemeName(parentState === null || parentState === void 0 ? void 0 : parentState.name, props, pendingUpdate === \"force\" ? true : !!needsUpdate);\n\tvar isSameAsParent = parentState && (!name || name === parentState.name);\n\tvar shouldRerender = Boolean(pendingUpdate === \"force\" || needsUpdate && (pendingUpdate || (lastState === null || lastState === void 0 ? void 0 : lastState.name) !== (parentState === null || parentState === void 0 ? void 0 : parentState.name)));\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tvar message = ` \\xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;\n\t\tconsole.info(message);\n\t}\n\tif (isSameAsParent) {\n\t\tif (!shouldRerender && lastState && lastState.name === parentState.name) return [false, lastState];\n\t\treturn [shouldRerender, {\n\t\t\t...parentState,\n\t\t\tisNew: false\n\t\t}];\n\t}\n\tif (!name) {\n\t\tvar _ref, _ref1;\n\t\tvar next = (_ref1 = (_ref = lastState !== null && lastState !== void 0 ? lastState : parentState) !== null && _ref !== void 0 ? _ref : rootThemeState) !== null && _ref1 !== void 0 ? _ref1 : {\n\t\t\tid,\n\t\t\tname: \"light\",\n\t\t\ttheme: (0, import_config.getConfig)().themes.light\n\t\t};\n\t\tif (shouldRerender) return [true, { ...parentState || lastState || next }];\n\t\treturn [false, next];\n\t}\n\tvar scheme = getScheme(name);\n\tvar _parentState_inverses;\n\tvar parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;\n\tvar isInverse = parentState && scheme !== parentState.scheme;\n\tvar inverses = parentInverses + (isInverse ? 1 : 0);\n\tvar nextState = {\n\t\tid,\n\t\tname,\n\t\ttheme: themes[name],\n\t\tscheme,\n\t\tparentId,\n\t\tparentName: parentState === null || parentState === void 0 ? void 0 : parentState.name,\n\t\tinverses,\n\t\tisInverse,\n\t\tisNew: true\n\t};\n\tif (isRoot) rootThemeState = nextState;\n\tif (pendingUpdate !== \"force\" && lastState && lastState.name === name) return [false, nextState];\n\tvar shouldAvoidRerender = pendingUpdate !== \"force\" && lastState && !needsUpdate && nextState.name === lastState.name;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(` \\xB7 useTheme(${id}) \\u23ED\\uFE0F ${name} shouldAvoidRerender: ${shouldAvoidRerender}`);\n\t\tconsole.info({\n\t\t\tlastState,\n\t\t\tneedsUpdate,\n\t\t\tnextState,\n\t\t\tpendingUpdate\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (shouldAvoidRerender) return [false, nextState];\n\treturn [true, nextState];\n};\nfunction scheduleUpdate(id) {\n\tvar queue = [id];\n\tvar visited = /* @__PURE__ */ new Set();\n\twhile (queue.length) {\n\t\tvar children = listenersByParent[queue.shift()];\n\t\tif (children) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar childId = _step.value;\n\t\t\t\t\tif (!visited.has(childId)) {\n\t\t\t\t\t\tvisited.add(childId);\n\t\t\t\t\t\tqueue.push(childId);\n\t\t\t\t\t}\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}\n\tvisited.forEach(function(childId2) {\n\t\tvar cb = allListeners.get(childId2);\n\t\tcb === null || cb === void 0 || cb();\n\t});\n}\nvar validSchemes = {\n\tlight: \"light\",\n\tdark: \"dark\"\n};\nfunction getScheme(name) {\n\treturn validSchemes[name.split(\"_\")[0]];\n}\nfunction getNewThemeName() {\n\tvar parentName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"\", props = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tvar { name, reset } = props;\n\tif (name && reset) throw new Error((0, import_formatDiagnostic.formatDiagnostic)(\"❌004\", \"Theme\", \"props name and reset are mutually exclusive\", \"Pass either name or reset, not both\", \"name,reset\", {\n\t\tname,\n\t\treset\n\t}));\n\tvar cacheKey = `${parentName}|${name || \"\"}|${reset ? 1 : 0}|${forceUpdate ? 1 : 0}`;\n\tif (themeNameCacheVer !== cacheVersion) {\n\t\tthemeNameCache.clear();\n\t\tthemeNameCacheVer = cacheVersion;\n\t} else {\n\t\tvar cached = themeNameCache.get(cacheKey);\n\t\tif (cached !== void 0) return cached;\n\t}\n\tvar result = resolveThemeName(parentName, name !== null && name !== void 0 ? name : void 0, reset, (0, import_config.getConfig)().themes, forceUpdate);\n\tif (themeNameCache.size >= 1e4) themeNameCache.clear();\n\tthemeNameCache.set(cacheKey, result);\n\treturn result;\n}\nvar getThemeNameCacheSize = function() {\n\treturn themeNameCache.size;\n};\nfunction resolveThemeName(parentName, name, reset, themes2) {\n\tvar forceUpdate = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;\n\tif (reset) {\n\t\tif (parentName === \"light\" || parentName === \"dark\") return parentName === \"light\" ? \"dark\" : \"light\";\n\t\tvar lastPartIndex = parentName.lastIndexOf(\"_\");\n\t\tvar resetName = lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex);\n\t\tvar scheme = parentName.slice(0, lastPartIndex);\n\t\treturn themes2[resetName] ? resetName : scheme;\n\t}\n\tvar parentParts = parentName ? parentName.split(\"_\") : [];\n\tvar found = null;\n\tif (name) {\n\t\tvar nameHasScheme = getScheme(name);\n\t\tif (nameHasScheme && name in themes2) found = name;\n\t\tif (!found && !nameHasScheme) for (var i = parentParts.length; i >= 0; i--) {\n\t\t\tvar base = parentParts.slice(0, i).join(\"_\");\n\t\t\tvar potential = base ? `${base}_${name}` : name;\n\t\t\tif (potential in themes2) {\n\t\t\t\tfound = potential;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (!forceUpdate && found === parentName && !validSchemes[found]) return null;\n\treturn found;\n}\nvar getPropsKey = function(param) {\n\tvar { name, reset, forceClassName, _themeUpdate } = param;\n\treturn `${name || \"\"}${reset || \"\"}${forceClassName || \"\"}${(_themeUpdate === null || _themeUpdate === void 0 ? void 0 : _themeUpdate.key) || \"\"}`;\n};\nvar hasThemeUpdatingProps = function(props) {\n\treturn \"name\" in props || \"reset\" in props || \"forceClassName\" in props || \"_themeUpdate\" in props;\n};\n//# sourceMappingURL=useThemeState.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;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB;CAC/B,yBAAyB;CACzB,yBAAyB;CACzB,uBAAuB;CACvB,yBAAyB;CACzB,6BAA6B;CAC7B,kCAAkC;CAClC,8BAA8B;CAC9B,qBAAqB;CACrB,2BAA2B;CAC3B,6BAA6B;CAC7B,wBAAwB;CACxB,qBAAq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ourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useThemeState_exports = {};\n__export(useThemeState_exports, {\n\tThemeStateContext: () => ThemeStateContext,\n\tforceUpdateThemes: () => forceUpdateThemes,\n\tgetNewThemeName: () => getNewThemeName,\n\tgetRootThemeState: () => getRootThemeState,\n\tgetThemeNameCacheSize: () => getThemeNameCacheSize,\n\tgetThemeProviderChainSizes: () => getThemeProviderChainSizes,\n\tgetThemeProviderParent: () => getThemeProviderParent,\n\tgetThemeState: () => getThemeState,\n\tgetThemeUpdateLayer: () => getThemeUpdateLayer,\n\thasThemeUpdatingProps: () => hasThemeUpdatingProps,\n\tresolveThemeName: () => resolveThemeName,\n\tuseThemeState: () => useThemeState\n});\nmodule.exports = __toCommonJS(useThemeState_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_react = require(\"react\");\nvar import_config = require(\"../config\");\nvar import_constants2 = require(\"../constants/constants\");\nvar ThemeStateContext = (0, import_react.createContext)(\"\");\nvar allListeners = /* @__PURE__ */ new Map();\nvar listenersByParent = {};\nvar HasRenderedOnce = /* @__PURE__ */ new WeakMap();\nvar HadTheme = /* @__PURE__ */ new WeakMap();\nvar PendingUpdate = /* @__PURE__ */ new Map();\nvar states = /* @__PURE__ */ new Map();\nvar localStates = /* @__PURE__ */ new Map();\nvar shouldForce = false;\nvar forceUpdateThemes = function() {\n\tcacheVersion++;\n\tshouldForce = true;\n\tallListeners.forEach(function(cb) {\n\t\treturn cb();\n\t});\n\tshouldForce = false;\n};\nvar getThemeState = function(id) {\n\treturn states.get(id);\n};\nvar themeUpdateLayers = /* @__PURE__ */ new Map();\nvar themeProviderParents = /* @__PURE__ */ new Map();\nvar getThemeUpdateLayer = function(id) {\n\treturn themeUpdateLayers.get(id);\n};\nvar getThemeProviderParent = function(id) {\n\treturn themeProviderParents.get(id);\n};\nvar getThemeProviderChainSizes = function() {\n\treturn {\n\t\tlayers: themeUpdateLayers.size,\n\t\tparents: themeProviderParents.size\n\t};\n};\nvar registerThemeProviderChain = function(id, parentId, props) {\n\tthemeProviderParents.set(id, parentId);\n\tif (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);\n\telse themeUpdateLayers.delete(id);\n};\nvar cacheVersion = 0;\nvar themeNameCache = /* @__PURE__ */ new Map();\nvar themeNameCacheVer = -1;\nvar themes = null;\nvar rootThemeState = null;\nvar getRootThemeState = function() {\n\treturn rootThemeState;\n};\nvar getThemeBaseName = function(name) {\n\treturn name.replace(/^(light|dark)_/, \"\");\n};\nvar incReducer = function(c) {\n\treturn c + 1;\n};\nvar useThemeState = function(props) {\n\t\"use no memo\";\n\tvar isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar _ref;\n\tvar { disable } = props;\n\tvar parentId = (0, import_react.useContext)(ThemeStateContext);\n\tif (!parentId && !isRoot) throw new Error(process.env.NODE_ENV === \"development\" ? `${import_constants2.MISSING_THEME_MESSAGE}\n\nLooked for theme${props.name ? ` \"${props.name}\"` : \"\"}, but no parent theme context was found (parentId: ${parentId}).` : import_constants2.MISSING_THEME_MESSAGE);\n\tif (disable) return states.get(parentId) || {\n\t\tid: \"\",\n\t\tname: \"light\",\n\t\ttheme: (0, import_config.getConfig)().themes.light\n\t};\n\tvar id = (0, import_react.useId)();\n\tvar propsKey = getPropsKey(props);\n\tif (cascadeOnChange) registerThemeProviderChain(id, parentId, props);\n\tvar r = (_ref = (0, import_react.useRef)(null)).current || (_ref.current = {\n\t\tid,\n\t\tparentId,\n\t\tprops,\n\t\tpropsKey,\n\t\tisRoot,\n\t\tkeys,\n\t\tschemeKeys,\n\t\toptimizeForFirstRender,\n\t\trenderVersion: 0\n\t});\n\tr.props = props;\n\tr.propsKey = propsKey;\n\tr.isRoot = isRoot;\n\tr.keys = keys;\n\tr.schemeKeys = schemeKeys;\n\tr.parentId = parentId;\n\tr.renderVersion++;\n\tvar [, forceUpdate] = (0, import_react.useReducer)(incReducer, 0);\n\tvar state = getSnapshotImpl(r);\n\tr.lastSnap = state;\n\t(0, import_react.useEffect)(function() {\n\t\tvar renderVersion = r.renderVersion;\n\t\tif (r.lastSnap && !states.has(r.id)) {\n\t\t\tstates.set(r.id, r.lastSnap);\n\t\t\tlocalStates.set(r.id, r.lastSnap);\n\t\t}\n\t\tif (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);\n\t\tif (r.unsubscribe && r.subscribedParentId !== r.parentId) cleanupThemeSubscription(r);\n\t\tif (shouldSubscribeToTheme(r, cascadeOnChange)) {\n\t\t\tif (!r.unsubscribe) {\n\t\t\t\tvar _listenersByParent, _pid;\n\t\t\t\tvar pid = r.parentId;\n\t\t\t\tvar sid = r.id;\n\t\t\t\tvar cb = function(forced) {\n\t\t\t\t\tvar next = getSnapshotImpl(r);\n\t\t\t\t\tif (next !== r.lastSnap) {\n\t\t\t\t\t\tvar _r_props_nativeUpdate, _r_props;\n\t\t\t\t\t\tr.lastSnap = next;\n\t\t\t\t\t\tif (!forced && ((_r_props_nativeUpdate = (_r_props = r.props).nativeUpdate) === null || _r_props_nativeUpdate === void 0 ? void 0 : _r_props_nativeUpdate.call(_r_props, next))) return;\n\t\t\t\t\t\tforceUpdate();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t((_listenersByParent = listenersByParent)[_pid = pid] || (_listenersByParent[_pid] = /* @__PURE__ */ new Set())).add(sid);\n\t\t\t\tallListeners.set(sid, function() {\n\t\t\t\t\tvar forced = shouldForce;\n\t\t\t\t\tPendingUpdate.set(sid, forced ? \"force\" : true);\n\t\t\t\t\tcb(forced);\n\t\t\t\t});\n\t\t\t\tr.subscribedParentId = pid;\n\t\t\t\tr.unsubscribe = function() {\n\t\t\t\t\tvar _listenersByParent_pid;\n\t\t\t\t\tallListeners.delete(sid);\n\t\t\t\t\t(_listenersByParent_pid = listenersByParent[pid]) === null || _listenersByParent_pid === void 0 || _listenersByParent_pid.delete(sid);\n\t\t\t\t\tlocalStates.delete(sid);\n\t\t\t\t\tstates.delete(sid);\n\t\t\t\t\tPendingUpdate.delete(sid);\n\t\t\t\t\tr.unsubscribe = void 0;\n\t\t\t\t\tr.subscribedParentId = void 0;\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (r.unsubscribe) cleanupThemeSubscription(r);\n\t\treturn function() {\n\t\t\tif (r.renderVersion === renderVersion) cleanupThemeState(r);\n\t\t};\n\t});\n\tif (cascadeOnChange) (0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tif (!HasRenderedOnce.get(keys)) {\n\t\t\tHasRenderedOnce.set(keys, true);\n\t\t\treturn;\n\t\t}\n\t\tif (!propsKey) {\n\t\t\tif (HadTheme.get(keys)) scheduleUpdate(id);\n\t\t\tHadTheme.set(keys, false);\n\t\t\treturn;\n\t\t}\n\t\tscheduleUpdate(id);\n\t\tHadTheme.set(keys, true);\n\t}, [keys, propsKey]);\n\treturn state;\n};\nvar shouldSubscribeToTheme = function(r, cascadeOnChange) {\n\tvar _r_keys_current, _r_props_needsUpdate, _r_props;\n\treturn Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || ((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || ((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props)));\n};\nfunction cleanupThemeSubscription(r) {\n\tvar _r_unsubscribe;\n\t(_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);\n}\nfunction cleanupThemeState(r) {\n\tif (r.unsubscribe) cleanupThemeSubscription(r);\n\telse {\n\t\tlocalStates.delete(r.id);\n\t\tstates.delete(r.id);\n\t\tPendingUpdate.delete(r.id);\n\t}\n\tthemeUpdateLayers.delete(r.id);\n\tthemeProviderParents.delete(r.id);\n}\nvar getSnapshotImpl = function(r) {\n\tvar _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate;\n\tvar { id, parentId, props, propsKey, isRoot, keys, schemeKeys, optimizeForFirstRender } = r;\n\tvar local = localStates.get(id);\n\tvar parentState = states.get(parentId);\n\tif (local && !PendingUpdate.has(id)) {\n\t\tif (parentState && local._parentName === parentState.name && local._propsKey === propsKey) return local;\n\t}\n\tvar isSchemeOnlyChange = !optimizeForFirstRender && import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)(\"fastSchemeChange\") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name);\n\tvar allKeysSchemeOptimized = !optimizeForFirstRender && Boolean(((_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) && (schemeKeys === null || schemeKeys === void 0 ? void 0 : (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) === keys.current.size);\n\tvar canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized);\n\tvar needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === \"light\" || props.name === \"dark\" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current1 = keys.current) === null || _keys_current1 === void 0 ? void 0 : _keys_current1.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);\n\tvar [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));\n\tvar next = nextRaw;\n\tif (props._themeUpdate && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {\n\t\tvar _states_get;\n\t\tvar parentTheme = ((_states_get = states.get(parentId)) === null || _states_get === void 0 ? void 0 : _states_get.theme) || nextRaw.theme;\n\t\tvar merged = props._themeUpdate.getTheme(parentTheme, nextRaw.name, (0, import_config.getConfig)());\n\t\tif (merged !== nextRaw.theme) next = {\n\t\t\t...nextRaw,\n\t\t\ttheme: merged\n\t\t};\n\t}\n\tPendingUpdate.delete(id);\n\tif (!local || rerender) {\n\t\tlocal = { ...next };\n\t\tlocalStates.set(id, local);\n\t}\n\tif (next !== local) {\n\t\tObject.assign(local, next);\n\t\tlocal.id = id;\n\t}\n\tlocal._parentName = parentState === null || parentState === void 0 ? void 0 : parentState.name;\n\tlocal._propsKey = propsKey;\n\tstates.set(id, next);\n\treturn local;\n};\nvar getNextState = function(lastState, props, propsKey) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0;\n\tvar parentState = states.get(parentId);\n\tif (props.passThrough) return [false, lastState || parentState || { name: \"\" }];\n\tthemes || (themes = (0, import_config.getConfig)().themes);\n\tvar name = !propsKey && (!lastState || !lastState.isNew) ? null : getNewThemeName(parentState === null || parentState === void 0 ? void 0 : parentState.name, props, pendingUpdate === \"force\" ? true : !!needsUpdate);\n\tvar isSameAsParent = Boolean(parentState && (!name || name === parentState.name));\n\tvar shouldRerender = Boolean(pendingUpdate === \"force\" || needsUpdate && (pendingUpdate || (lastState === null || lastState === void 0 ? void 0 : lastState.name) !== (parentState === null || parentState === void 0 ? void 0 : parentState.name)));\n\tif (isSameAsParent) {\n\t\tif (!shouldRerender && lastState && lastState.name === parentState.name) return [false, lastState];\n\t\treturn [shouldRerender, {\n\t\t\t...parentState,\n\t\t\tisNew: false\n\t\t}];\n\t}\n\tif (!name) {\n\t\tvar _ref, _ref1;\n\t\tvar next = (_ref1 = (_ref = lastState !== null && lastState !== void 0 ? lastState : parentState) !== null && _ref !== void 0 ? _ref : rootThemeState) !== null && _ref1 !== void 0 ? _ref1 : {\n\t\t\tid,\n\t\t\tname: \"light\",\n\t\t\ttheme: (0, import_config.getConfig)().themes.light\n\t\t};\n\t\tif (shouldRerender) return [true, { ...parentState || lastState || next }];\n\t\treturn [false, next];\n\t}\n\tvar scheme = getScheme(name);\n\tvar _parentState_inverses;\n\tvar parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;\n\tvar isInverse = Boolean(parentState && scheme !== parentState.scheme);\n\tvar inverses = parentInverses + (isInverse ? 1 : 0);\n\tvar nextState = {\n\t\tid,\n\t\tname,\n\t\ttheme: themes[name],\n\t\tscheme,\n\t\tparentId,\n\t\tparentName: parentState === null || parentState === void 0 ? void 0 : parentState.name,\n\t\tinverses,\n\t\tisInverse,\n\t\tisNew: true\n\t};\n\tif (isRoot) rootThemeState = nextState;\n\tif (pendingUpdate !== \"force\" && lastState && lastState.name === name) return [false, nextState];\n\treturn [!(pendingUpdate !== \"force\" && lastState && !needsUpdate && nextState.name === lastState.name), nextState];\n};\nfunction scheduleUpdate(id) {\n\tvar queue = [id];\n\tvar visited = /* @__PURE__ */ new Set();\n\twhile (queue.length) {\n\t\tvar children = listenersByParent[queue.shift()];\n\t\tif (children) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar childId = _step.value;\n\t\t\t\t\tif (!visited.has(childId)) {\n\t\t\t\t\t\tvisited.add(childId);\n\t\t\t\t\t\tqueue.push(childId);\n\t\t\t\t\t}\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}\n\tvisited.forEach(function(childId2) {\n\t\tvar _allListeners_get;\n\t\t(_allListeners_get = allListeners.get(childId2)) === null || _allListeners_get === void 0 || _allListeners_get();\n\t});\n}\nvar validSchemes = {\n\tlight: \"light\",\n\tdark: \"dark\"\n};\nfunction getScheme(name) {\n\treturn validSchemes[name.split(\"_\")[0]];\n}\nfunction getNewThemeName() {\n\tvar parentName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"\", props = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tvar { name } = props;\n\tvar cacheKey = `${parentName}|${name || \"\"}|${forceUpdate ? 1 : 0}`;\n\tif (themeNameCacheVer !== cacheVersion) {\n\t\tthemeNameCache.clear();\n\t\tthemeNameCacheVer = cacheVersion;\n\t} else {\n\t\tvar cached = themeNameCache.get(cacheKey);\n\t\tif (cached !== void 0) return cached;\n\t}\n\tvar result = resolveThemeName(parentName, name !== null && name !== void 0 ? name : void 0, (0, import_config.getConfig)().themes, forceUpdate);\n\tif (themeNameCache.size >= 1e4) themeNameCache.clear();\n\tthemeNameCache.set(cacheKey, result);\n\treturn result;\n}\nvar getThemeNameCacheSize = function() {\n\treturn themeNameCache.size;\n};\nfunction resolveThemeName(parentName, name, themes2) {\n\tvar forceUpdate = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;\n\tvar parentParts = parentName ? parentName.split(\"_\") : [];\n\tvar found = null;\n\tif (name) {\n\t\tvar nameHasScheme = getScheme(name);\n\t\tif (nameHasScheme && name in themes2) found = name;\n\t\tif (!found && !nameHasScheme) for (var i = parentParts.length; i >= 0; i--) {\n\t\t\tvar base = parentParts.slice(0, i).join(\"_\");\n\t\t\tvar potential = base ? `${base}_${name}` : name;\n\t\t\tif (potential in themes2) {\n\t\t\t\tfound = potential;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (!forceUpdate && found === parentName && !validSchemes[found]) return null;\n\treturn found;\n}\nvar getPropsKey = function(param) {\n\tvar { name, forceClassName, _themeUpdate } = param;\n\treturn `${name || \"\"}${forceClassName || \"\"}${(_themeUpdate === null || _themeUpdate === void 0 ? void 0 : _themeUpdate.key) || \"\"}`;\n};\nvar hasThemeUpdatingProps = function(props) {\n\treturn \"name\" in props || \"forceClassName\" in props || \"_themeUpdate\" in props;\n};\n//# sourceMappingURL=useThemeState.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;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO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AoB,SAAS,kBAAkB;AAC1E"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -61,7 +61,6 @@ __export(index_exports, {
|
|
|
61
61
|
createTamagui: () => import_createTamagui.createTamagui,
|
|
62
62
|
createTokens: () => import_createTokens.createTokens,
|
|
63
63
|
createVariable: () => import_createVariable.createVariable,
|
|
64
|
-
createVariantResolver: () => import_types.createVariantResolver,
|
|
65
64
|
cssShorthandLonghands: () => import_helpers.cssShorthandLonghands,
|
|
66
65
|
currentPlatform: () => import_constants.currentPlatform,
|
|
67
66
|
forceUpdateThemes: () => import_useThemeState.forceUpdateThemes,
|
|
@@ -69,7 +68,6 @@ __export(index_exports, {
|
|
|
69
68
|
getAutoVariableCSS: () => import_registerCSSVariable.getAutoVariableCSS,
|
|
70
69
|
getCSSStylesAtomic: () => import_getCSSStylesAtomic.getCSSStylesAtomic,
|
|
71
70
|
getConfig: () => import_config.getConfig,
|
|
72
|
-
getDefaultProps: () => import_getDefaultProps.getDefaultProps,
|
|
73
71
|
getExpandedShorthand: () => import_getExpandedShorthands.getExpandedShorthand,
|
|
74
72
|
getMedia: () => import_mediaState.getMedia,
|
|
75
73
|
getMutatedAutoVariableCSS: () => import_registerCSSVariable.getMutatedAutoVariableCSS,
|
|
@@ -78,6 +76,7 @@ __export(index_exports, {
|
|
|
78
76
|
getSetting: () => import_config.getSetting,
|
|
79
77
|
getSplitStyles: () => import_getSplitStyles.getSplitStyles,
|
|
80
78
|
getStyleCompat: () => import_config.getStyleCompat,
|
|
79
|
+
getStyleStaticConfig: () => import_getSplitStyles.getStyleStaticConfig,
|
|
81
80
|
getStyleTags: () => import_wrapStyleTags.getStyleTags,
|
|
82
81
|
getThemeClassNames: () => import_helpers.getThemeClassNames,
|
|
83
82
|
getThemeProviderChainSizes: () => import_useThemeState.getThemeProviderChainSizes,
|
|
@@ -86,9 +85,7 @@ __export(index_exports, {
|
|
|
86
85
|
getTokenValue: () => import_config.getTokenValue,
|
|
87
86
|
getTokens: () => import_config.getTokens,
|
|
88
87
|
getVariable: () => import_createVariable.getVariable,
|
|
89
|
-
getVariableName: () => import_createVariable.getVariableName,
|
|
90
88
|
getVariableValue: () => import_createVariable.getVariableValue,
|
|
91
|
-
getVariableVariable: () => import_createVariable.getVariableVariable,
|
|
92
89
|
hooks: () => import_setupHooks.hooks,
|
|
93
90
|
html: () => import_html.html,
|
|
94
91
|
insertFont: () => import_insertFont.insertFont,
|
|
@@ -125,7 +122,6 @@ __export(index_exports, {
|
|
|
125
122
|
nonAnimatableWebViewProps: () => import_helpers.nonAnimatableWebViewProps,
|
|
126
123
|
normalizeColor: () => import_normalizeColor.normalizeColor,
|
|
127
124
|
normalizeStyle: () => import_normalizeStyle.normalizeStyle,
|
|
128
|
-
prepareStyleStaticConfig: () => import_getSplitStyles.prepareStyleStaticConfig,
|
|
129
125
|
px: () => import_createVariable.px,
|
|
130
126
|
removeNativeStyleScope: () => import_nativeStyleEngine.removeNativeStyleScope,
|
|
131
127
|
reservedThemeProps: () => import_helpers.reservedThemeProps,
|
|
@@ -142,7 +138,11 @@ __export(index_exports, {
|
|
|
142
138
|
setupPlatformDriver: () => import_constants.setupPlatformDriver,
|
|
143
139
|
shouldRenderNativePlatform: () => import_helpers.shouldRenderNativePlatform,
|
|
144
140
|
simpleHash: () => import_helpers.simpleHash,
|
|
141
|
+
splitStyleProps: () => import_splitStyleProps.splitStyleProps,
|
|
142
|
+
style: () => import_style.style,
|
|
143
|
+
stylePieceSymbol: () => import_types.stylePieceSymbol,
|
|
145
144
|
stylePropsAll: () => import_helpers.stylePropsAll,
|
|
145
|
+
stylePropsInput: () => import_helpers.stylePropsInput,
|
|
146
146
|
stylePropsText: () => import_helpers.stylePropsText,
|
|
147
147
|
stylePropsTextOnly: () => import_helpers.stylePropsTextOnly,
|
|
148
148
|
stylePropsTransform: () => import_helpers.stylePropsTransform,
|
|
@@ -152,7 +152,6 @@ __export(index_exports, {
|
|
|
152
152
|
supportsDynamicColorIOS: () => import_constants.supportsDynamicColorIOS,
|
|
153
153
|
textStaticConfig: () => import_Text.textStaticConfig,
|
|
154
154
|
themeRefKey: () => import_themeRef.themeRefKey,
|
|
155
|
-
themeable: () => import_themeable.themeable,
|
|
156
155
|
tokenCategories: () => import_helpers.tokenCategories,
|
|
157
156
|
updateConfig: () => import_config.updateConfig,
|
|
158
157
|
updateFont: () => import_insertFont.updateFont,
|
|
@@ -175,9 +174,7 @@ __export(index_exports, {
|
|
|
175
174
|
useIsomorphicLayoutEffect: () => import_constants.useIsomorphicLayoutEffect,
|
|
176
175
|
useMedia: () => import_useMedia.useMedia,
|
|
177
176
|
usePortalThemeState: () => import_usePortalThemeState.usePortalThemeState,
|
|
178
|
-
|
|
179
|
-
usePropsAndStyle: () => import_useProps.usePropsAndStyle,
|
|
180
|
-
useStyle: () => import_useProps.useStyle,
|
|
177
|
+
useStyle: () => import_useStyle.useStyle,
|
|
181
178
|
useTheme: () => import_useTheme.useTheme,
|
|
182
179
|
useThemeName: () => import_useThemeName.useThemeName,
|
|
183
180
|
validStyles: () => import_helpers.validStyles,
|
|
@@ -195,7 +192,6 @@ var import_withStableStyle = require("./_withStableStyle.cjs");
|
|
|
195
192
|
var import_withNativeStyle = require("./_withNativeStyle.cjs");
|
|
196
193
|
var import_createComponent = require("./createComponent.cjs");
|
|
197
194
|
var import_createStyledContext = require("./helpers/createStyledContext.cjs");
|
|
198
|
-
var import_getDefaultProps = require("./helpers/getDefaultProps.cjs");
|
|
199
195
|
var import_getCSSStylesAtomic = require("./helpers/getCSSStylesAtomic.cjs");
|
|
200
196
|
var import_getExpandedShorthands = require("./helpers/getExpandedShorthands.cjs");
|
|
201
197
|
var import_formatDiagnostic = require("./helpers/formatDiagnostic.cjs");
|
|
@@ -208,10 +204,10 @@ var import_isTamaguiElement = require("./helpers/isTamaguiElement.cjs");
|
|
|
208
204
|
var import_matchMedia = require("./helpers/matchMedia.cjs");
|
|
209
205
|
var import_mergeProps = require("./helpers/mergeProps.cjs");
|
|
210
206
|
var import_mergeSlotStyleProps = require("./helpers/mergeSlotStyleProps.cjs");
|
|
207
|
+
var import_splitStyleProps = require("./helpers/splitStyleProps.cjs");
|
|
211
208
|
var import_normalizeColor = require("./helpers/normalizeColor.cjs");
|
|
212
209
|
var import_normalizeStyle = require("./helpers/normalizeStyle.cjs");
|
|
213
210
|
var import_themeRef = require("./helpers/themeRef.cjs");
|
|
214
|
-
var import_themeable = require("./helpers/themeable.cjs");
|
|
215
211
|
var import_wrapStyleTags = require("./helpers/wrapStyleTags.cjs");
|
|
216
212
|
var import_createFont = require("./createFont.cjs");
|
|
217
213
|
var import_eventDetails = require("./eventDetails.cjs");
|
|
@@ -222,6 +218,8 @@ var import_createTokens = require("./createTokens.cjs");
|
|
|
222
218
|
var import_createVariable = require("./createVariable.cjs");
|
|
223
219
|
var import_insertFont = require("./insertFont.cjs");
|
|
224
220
|
var import_styled = require("./styled.cjs");
|
|
221
|
+
var import_style = require("./style.cjs");
|
|
222
|
+
var import_useStyle = require("./hooks/useStyle.cjs");
|
|
225
223
|
var import_Tamagui = require("./Tamagui.cjs");
|
|
226
224
|
var import_types = require("./types.cjs");
|
|
227
225
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
@@ -232,7 +230,6 @@ var import_useMedia = require("./hooks/useMedia.cjs");
|
|
|
232
230
|
var import_mediaObjectToString = require("./helpers/mediaObjectToString.cjs");
|
|
233
231
|
var import_mediaState = require("./helpers/mediaState.cjs");
|
|
234
232
|
var import_useAnimationDriver = require("./hooks/useAnimationDriver.cjs");
|
|
235
|
-
var import_useProps = require("./hooks/useProps.cjs");
|
|
236
233
|
var import_useTheme = require("./hooks/useTheme.cjs");
|
|
237
234
|
var import_usePortalThemeState = require("./hooks/usePortalThemeState.cjs");
|
|
238
235
|
var import_useThemeName = require("./hooks/useThemeName.cjs");
|
|
@@ -63,7 +63,6 @@ __export(index_exports, {
|
|
|
63
63
|
createTamagui: () => import_createTamagui.createTamagui,
|
|
64
64
|
createTokens: () => import_createTokens.createTokens,
|
|
65
65
|
createVariable: () => import_createVariable.createVariable,
|
|
66
|
-
createVariantResolver: () => import_types.createVariantResolver,
|
|
67
66
|
cssShorthandLonghands: () => import_helpers.cssShorthandLonghands,
|
|
68
67
|
currentPlatform: () => import_constants.currentPlatform,
|
|
69
68
|
forceUpdateThemes: () => import_useThemeState.forceUpdateThemes,
|
|
@@ -71,7 +70,6 @@ __export(index_exports, {
|
|
|
71
70
|
getAutoVariableCSS: () => import_registerCSSVariable.getAutoVariableCSS,
|
|
72
71
|
getCSSStylesAtomic: () => import_getCSSStylesAtomic.getCSSStylesAtomic,
|
|
73
72
|
getConfig: () => import_config.getConfig,
|
|
74
|
-
getDefaultProps: () => import_getDefaultProps.getDefaultProps,
|
|
75
73
|
getExpandedShorthand: () => import_getExpandedShorthands.getExpandedShorthand,
|
|
76
74
|
getMedia: () => import_mediaState.getMedia,
|
|
77
75
|
getMutatedAutoVariableCSS: () => import_registerCSSVariable.getMutatedAutoVariableCSS,
|
|
@@ -80,6 +78,7 @@ __export(index_exports, {
|
|
|
80
78
|
getSetting: () => import_config.getSetting,
|
|
81
79
|
getSplitStyles: () => import_getSplitStyles.getSplitStyles,
|
|
82
80
|
getStyleCompat: () => import_config.getStyleCompat,
|
|
81
|
+
getStyleStaticConfig: () => import_getSplitStyles.getStyleStaticConfig,
|
|
83
82
|
getStyleTags: () => import_wrapStyleTags.getStyleTags,
|
|
84
83
|
getThemeClassNames: () => import_helpers.getThemeClassNames,
|
|
85
84
|
getThemeProviderChainSizes: () => import_useThemeState.getThemeProviderChainSizes,
|
|
@@ -88,9 +87,7 @@ __export(index_exports, {
|
|
|
88
87
|
getTokenValue: () => import_config.getTokenValue,
|
|
89
88
|
getTokens: () => import_config.getTokens,
|
|
90
89
|
getVariable: () => import_createVariable.getVariable,
|
|
91
|
-
getVariableName: () => import_createVariable.getVariableName,
|
|
92
90
|
getVariableValue: () => import_createVariable.getVariableValue,
|
|
93
|
-
getVariableVariable: () => import_createVariable.getVariableVariable,
|
|
94
91
|
hooks: () => import_setupHooks.hooks,
|
|
95
92
|
html: () => import_html.html,
|
|
96
93
|
insertFont: () => import_insertFont.insertFont,
|
|
@@ -127,7 +124,6 @@ __export(index_exports, {
|
|
|
127
124
|
nonAnimatableWebViewProps: () => import_helpers.nonAnimatableWebViewProps,
|
|
128
125
|
normalizeColor: () => import_normalizeColor.normalizeColor,
|
|
129
126
|
normalizeStyle: () => import_normalizeStyle.normalizeStyle,
|
|
130
|
-
prepareStyleStaticConfig: () => import_getSplitStyles.prepareStyleStaticConfig,
|
|
131
127
|
px: () => import_createVariable.px,
|
|
132
128
|
removeNativeStyleScope: () => import_nativeStyleEngine.removeNativeStyleScope,
|
|
133
129
|
reservedThemeProps: () => import_helpers.reservedThemeProps,
|
|
@@ -144,7 +140,11 @@ __export(index_exports, {
|
|
|
144
140
|
setupPlatformDriver: () => import_constants.setupPlatformDriver,
|
|
145
141
|
shouldRenderNativePlatform: () => import_helpers.shouldRenderNativePlatform,
|
|
146
142
|
simpleHash: () => import_helpers.simpleHash,
|
|
143
|
+
splitStyleProps: () => import_splitStyleProps.splitStyleProps,
|
|
144
|
+
style: () => import_style.style,
|
|
145
|
+
stylePieceSymbol: () => import_types.stylePieceSymbol,
|
|
147
146
|
stylePropsAll: () => import_helpers.stylePropsAll,
|
|
147
|
+
stylePropsInput: () => import_helpers.stylePropsInput,
|
|
148
148
|
stylePropsText: () => import_helpers.stylePropsText,
|
|
149
149
|
stylePropsTextOnly: () => import_helpers.stylePropsTextOnly,
|
|
150
150
|
stylePropsTransform: () => import_helpers.stylePropsTransform,
|
|
@@ -154,7 +154,6 @@ __export(index_exports, {
|
|
|
154
154
|
supportsDynamicColorIOS: () => import_constants.supportsDynamicColorIOS,
|
|
155
155
|
textStaticConfig: () => import_Text.textStaticConfig,
|
|
156
156
|
themeRefKey: () => import_themeRef.themeRefKey,
|
|
157
|
-
themeable: () => import_themeable.themeable,
|
|
158
157
|
tokenCategories: () => import_helpers.tokenCategories,
|
|
159
158
|
updateConfig: () => import_config.updateConfig,
|
|
160
159
|
updateFont: () => import_insertFont.updateFont,
|
|
@@ -177,9 +176,7 @@ __export(index_exports, {
|
|
|
177
176
|
useIsomorphicLayoutEffect: () => import_constants.useIsomorphicLayoutEffect,
|
|
178
177
|
useMedia: () => import_useMedia.useMedia,
|
|
179
178
|
usePortalThemeState: () => import_usePortalThemeState.usePortalThemeState,
|
|
180
|
-
|
|
181
|
-
usePropsAndStyle: () => import_useProps.usePropsAndStyle,
|
|
182
|
-
useStyle: () => import_useProps.useStyle,
|
|
179
|
+
useStyle: () => import_useStyle.useStyle,
|
|
183
180
|
useTheme: () => import_useTheme.useTheme,
|
|
184
181
|
useThemeName: () => import_useThemeName.useThemeName,
|
|
185
182
|
validStyles: () => import_helpers.validStyles,
|
|
@@ -197,7 +194,6 @@ var import_withStableStyle = require("./_withStableStyle.native.js");
|
|
|
197
194
|
var import_withNativeStyle = require("./_withNativeStyle.native.js");
|
|
198
195
|
var import_createComponent = require("./createComponent.native.js");
|
|
199
196
|
var import_createStyledContext = require("./helpers/createStyledContext.native.js");
|
|
200
|
-
var import_getDefaultProps = require("./helpers/getDefaultProps.native.js");
|
|
201
197
|
var import_getCSSStylesAtomic = require("./helpers/getCSSStylesAtomic.native.js");
|
|
202
198
|
var import_getExpandedShorthands = require("./helpers/getExpandedShorthands.native.js");
|
|
203
199
|
var import_formatDiagnostic = require("./helpers/formatDiagnostic.native.js");
|
|
@@ -210,10 +206,10 @@ var import_isTamaguiElement = require("./helpers/isTamaguiElement.native.js");
|
|
|
210
206
|
var import_matchMedia = require("./helpers/matchMedia.native.js");
|
|
211
207
|
var import_mergeProps = require("./helpers/mergeProps.native.js");
|
|
212
208
|
var import_mergeSlotStyleProps = require("./helpers/mergeSlotStyleProps.native.js");
|
|
209
|
+
var import_splitStyleProps = require("./helpers/splitStyleProps.native.js");
|
|
213
210
|
var import_normalizeColor = require("./helpers/normalizeColor.native.js");
|
|
214
211
|
var import_normalizeStyle = require("./helpers/normalizeStyle.native.js");
|
|
215
212
|
var import_themeRef = require("./helpers/themeRef.native.js");
|
|
216
|
-
var import_themeable = require("./helpers/themeable.native.js");
|
|
217
213
|
var import_wrapStyleTags = require("./helpers/wrapStyleTags.native.js");
|
|
218
214
|
var import_createFont = require("./createFont.native.js");
|
|
219
215
|
var import_eventDetails = require("./eventDetails.native.js");
|
|
@@ -224,6 +220,8 @@ var import_createTokens = require("./createTokens.native.js");
|
|
|
224
220
|
var import_createVariable = require("./createVariable.native.js");
|
|
225
221
|
var import_insertFont = require("./insertFont.native.js");
|
|
226
222
|
var import_styled = require("./styled.native.js");
|
|
223
|
+
var import_style = require("./style.native.js");
|
|
224
|
+
var import_useStyle = require("./hooks/useStyle.native.js");
|
|
227
225
|
var import_Tamagui = require("./Tamagui.native.js");
|
|
228
226
|
var import_types = require("./types.native.js");
|
|
229
227
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
@@ -234,7 +232,6 @@ var import_useMedia = require("./hooks/useMedia.native.js");
|
|
|
234
232
|
var import_mediaObjectToString = require("./helpers/mediaObjectToString.native.js");
|
|
235
233
|
var import_mediaState = require("./helpers/mediaState.native.js");
|
|
236
234
|
var import_useAnimationDriver = require("./hooks/useAnimationDriver.native.js");
|
|
237
|
-
var import_useProps = require("./hooks/useProps.native.js");
|
|
238
235
|
var import_useTheme = require("./hooks/useTheme.native.js");
|
|
239
236
|
var import_usePortalThemeState = require("./hooks/usePortalThemeState.native.js");
|
|
240
237
|
var import_useThemeName = require("./hooks/useThemeName.native.js");
|