@tamagui/web 3.0.0-beta.831.1 → 3.0.0-beta.889.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/createComponent.cjs +12 -1
- package/dist/cjs/createComponent.native.cjs +12 -1
- package/dist/cjs/createComponent.native.js +12 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.js +1 -1
- package/dist/cjs/createStyledHOC.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/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/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 +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +128 -109
- 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 +1042 -1715
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1081 -1887
- package/dist/cjs/helpers/getSplitStyles.native.js +1081 -1887
- 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/styleStaticConfig.cjs +1 -50
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -1
- 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 +15 -38
- package/dist/cjs/helpers/tokenCategories.native.cjs +15 -40
- package/dist/cjs/helpers/tokenCategories.native.js +15 -40
- 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/{helpers/directStyleCSS.native.js → hooks/useStyle.cjs} +16 -8
- package/dist/cjs/{helpers/directStyleCSS.native.cjs → hooks/useStyle.native.cjs} +16 -4
- 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 +6 -3
- package/dist/cjs/index.native.cjs +6 -3
- package/dist/cjs/index.native.js +6 -3
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +2 -2
- package/dist/cjs/static-resolve.native.cjs +2 -2
- package/dist/cjs/static-resolve.native.js +2 -2
- 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 +11 -6
- package/dist/cjs/styled.native.cjs +11 -6
- package/dist/cjs/styled.native.js +11 -6
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +6 -4
- package/dist/cjs/types.native.cjs +6 -4
- package/dist/cjs/types.native.js +6 -4
- 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 +17 -12
- package/dist/cjs/views/Text.native.cjs +1 -0
- package/dist/cjs/views/Text.native.js +1 -0
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +3 -3
- package/dist/cjs/views/Theme.native.cjs +3 -3
- package/dist/cjs/views/Theme.native.js +3 -3
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/esm/createComponent.mjs +12 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +12 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +1 -1
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +1 -1
- package/dist/esm/createStyledHOC.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/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/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 +6 -6
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +6 -6
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +126 -109
- 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 +1034 -1705
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1071 -1871
- 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/styleStaticConfig.mjs +1 -50
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -1
- package/dist/esm/helpers/styleStaticConfig.native.js +1 -51
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -1
- 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 +15 -36
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +15 -38
- 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/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 +6 -4
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.native.js +6 -4
- package/dist/esm/static-resolve.mjs +3 -3
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +3 -3
- 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 +12 -6
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +12 -6
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -4
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -4
- 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 +17 -12
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Theme.mjs +3 -3
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +3 -3
- 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/package.json +15 -15
- package/src/createComponent.tsx +21 -1
- package/src/createStyledHOC.tsx +4 -2
- package/src/createVariable.ts +0 -10
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +9 -9
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +192 -207
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2080 -3270
- 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/styleFrontend.ts +8 -5
- package/src/helpers/styleStaticConfig.ts +5 -72
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +40 -65
- 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/useStyle.ts +10 -0
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +6 -6
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +7 -4
- package/src/style.ts +97 -0
- package/src/styled.tsx +39 -68
- package/src/types.tsx +105 -169
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +20 -14
- package/src/views/Theme.tsx +13 -9
- package/src/views/ThemeDebug.tsx +0 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +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/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +20 -19
- 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 +3 -5
- 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/styleFrontend.d.ts +3 -5
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +4 -9
- package/types/helpers/styleStaticConfig.d.ts.map +1 -1
- 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/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 +6 -4
- package/types/index.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.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +10 -10
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +74 -49
- 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/dist/cjs/helpers/directStyleCSS.cjs +0 -345
- 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/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/variantResolvers.cjs +0 -87
- package/dist/cjs/helpers/variantResolvers.native.cjs +0 -140
- package/dist/cjs/helpers/variantResolvers.native.js +0 -142
- package/dist/cjs/helpers/variantResolvers.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -317
- 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/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/variantResolvers.mjs +0 -65
- package/dist/esm/helpers/variantResolvers.mjs.map +0 -1
- package/dist/esm/helpers/variantResolvers.native.js +0 -116
- package/dist/esm/helpers/variantResolvers.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -513
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/variantResolvers.ts +0 -121
- 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/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/variantResolvers.d.ts +0 -9
- package/types/helpers/variantResolvers.d.ts.map +0 -1
|
@@ -51,7 +51,7 @@ function firstThemeKey(config) {
|
|
|
51
51
|
return _cachedFirstKey;
|
|
52
52
|
}
|
|
53
53
|
function TamaguiProvider(param) {
|
|
54
|
-
var { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp,
|
|
54
|
+
var { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, insets, isSubtreeRoot } = param;
|
|
55
55
|
var defaultTheme = defaultThemeProp || firstThemeKey(config) || "light";
|
|
56
56
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
57
57
|
(0, import_useMedia.updateMediaListeners)();
|
|
@@ -76,7 +76,6 @@ function TamaguiProvider(param) {
|
|
|
76
76
|
insets: memoizedInsets,
|
|
77
77
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
78
78
|
defaultTheme,
|
|
79
|
-
reset,
|
|
80
79
|
className,
|
|
81
80
|
isSubtreeRoot,
|
|
82
81
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TamaguiRoot.TamaguiRoot, {
|
|
@@ -51,7 +51,7 @@ function firstThemeKey(config) {
|
|
|
51
51
|
return _cachedFirstKey;
|
|
52
52
|
}
|
|
53
53
|
function TamaguiProvider(param) {
|
|
54
|
-
var { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp,
|
|
54
|
+
var { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, insets, isSubtreeRoot } = param;
|
|
55
55
|
var defaultTheme = defaultThemeProp || firstThemeKey(config) || "light";
|
|
56
56
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
57
57
|
(0, import_useMedia.updateMediaListeners)();
|
|
@@ -76,7 +76,6 @@ function TamaguiProvider(param) {
|
|
|
76
76
|
insets: memoizedInsets,
|
|
77
77
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
78
78
|
defaultTheme,
|
|
79
|
-
reset,
|
|
80
79
|
className,
|
|
81
80
|
isSubtreeRoot,
|
|
82
81
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TamaguiRoot.TamaguiRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TamaguiProvider.native.js","names":[],"sources":["cjs/views/TamaguiProvider.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TamaguiProvider_exports = {};\n__export(TamaguiProvider_exports, { TamaguiProvider: () => TamaguiProvider });\nmodule.exports = __toCommonJS(TamaguiProvider_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_use_did_finish_ssr = require(\"@tamagui/use-did-finish-ssr\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_config = require(\"../config\");\nvar import_ComponentContext = require(\"../contexts/ComponentContext\");\nvar import_insertStyleRule = require(\"../helpers/insertStyleRule\");\nvar import_useMedia = require(\"../hooks/useMedia\");\nrequire(\"./ConfigRevisionCheck\");\nvar import_SafeAreaTracker = require(\"./SafeAreaTracker\");\nvar import_TamaguiRoot = require(\"./TamaguiRoot\");\nvar import_ThemeProvider = require(\"./ThemeProvider\");\nvar _cachedFirstKey;\nvar _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = (config === null || config === void 0 ? void 0 : config.themes) ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider(param) {\n\tvar { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp,
|
|
1
|
+
{"version":3,"file":"TamaguiProvider.native.js","names":[],"sources":["cjs/views/TamaguiProvider.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TamaguiProvider_exports = {};\n__export(TamaguiProvider_exports, { TamaguiProvider: () => TamaguiProvider });\nmodule.exports = __toCommonJS(TamaguiProvider_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_use_did_finish_ssr = require(\"@tamagui/use-did-finish-ssr\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_config = require(\"../config\");\nvar import_ComponentContext = require(\"../contexts/ComponentContext\");\nvar import_insertStyleRule = require(\"../helpers/insertStyleRule\");\nvar import_useMedia = require(\"../hooks/useMedia\");\nrequire(\"./ConfigRevisionCheck\");\nvar import_SafeAreaTracker = require(\"./SafeAreaTracker\");\nvar import_TamaguiRoot = require(\"./TamaguiRoot\");\nvar import_ThemeProvider = require(\"./ThemeProvider\");\nvar _cachedFirstKey;\nvar _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = (config === null || config === void 0 ? void 0 : config.themes) ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider(param) {\n\tvar { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, insets, isSubtreeRoot } = param;\n\tvar defaultTheme = defaultThemeProp || firstThemeKey(config) || \"light\";\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\t(0, import_useMedia.updateMediaListeners)();\n\t\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) return (0, import_insertStyleRule.stopAccumulatingRules)();\n\t}, []);\n\tvar memoizedInsets = import_react.default.useMemo(function() {\n\t\treturn insets;\n\t}, [\n\t\tinsets === null || insets === void 0 ? void 0 : insets.top,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.right,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.bottom,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.left\n\t]);\n\tvar configuredAnimationDriver = config === null || config === void 0 ? void 0 : config.animations;\n\tvar defaultAnimationDriver = !configuredAnimationDriver || configuredAnimationDriver.isStub ? null : configuredAnimationDriver;\n\t(0, import_react.useEffect)(function() {\n\t\tvar _defaultAnimationDriver_onMount;\n\t\tdefaultAnimationDriver === null || defaultAnimationDriver === void 0 || (_defaultAnimationDriver_onMount = defaultAnimationDriver.onMount) == null || _defaultAnimationDriver_onMount.call(defaultAnimationDriver);\n\t}, []);\n\tvar contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {\n\t\tanimationDriver: defaultAnimationDriver,\n\t\tinsets: memoizedInsets,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {\n\t\t\tdefaultTheme,\n\t\t\tclassName,\n\t\t\tisSubtreeRoot,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TamaguiRoot.TamaguiRoot, {\n\t\t\t\ttheme: defaultTheme,\n\t\t\t\tisRootRoot: true,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tif ((0, import_config.getSetting)(\"disableSSR\")) contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_use_did_finish_ssr.ClientOnly, {\n\t\tenabled: true,\n\t\tchildren: contents\n\t});\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [\n\t\t!process.env.TAMAGUI_DID_OUTPUT_CSS && false,\n\t\tprocess.env.NODE_ENV !== \"production\" && false,\n\t\t(0, import_SafeAreaTracker.hasSafeAreaTracker)() && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SafeAreaTracker.SafeAreaTracker, {}),\n\t\tcontents\n\t] });\n}\n//# sourceMappingURL=TamaguiProvider.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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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,cAAc,WAAU,CAAE,YAAY,GAAG,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,0BAA0B,YAAY;EAC7I,SAAS;EACT,UAAU;CACX,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,KAAI,CAAE,mBAAmB,UAAU,EAAE,UAAU;EAC5F,CAAC,QAAQ,IAAI,0BAA0B;EACvC,QAAQ,IAAI,aAAa,gBAAgB;GACxC,GAAG,uBAAuB,mBAAkB,CAAE,KAAqB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,uBAAuB,iBAAiB,CAAC,CAAC;EAC1I;CACD,EAAE,CAAC;AACJ"}
|
package/dist/cjs/views/Text.cjs
CHANGED
|
@@ -26,29 +26,34 @@ __export(Text_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(Text_exports);
|
|
27
27
|
var import_helpers = require("@tamagui/helpers");
|
|
28
28
|
var import_createComponent = require("../createComponent.cjs");
|
|
29
|
-
|
|
30
|
-
maxWidth: "100%",
|
|
31
|
-
overflow: "hidden",
|
|
32
|
-
textOverflow: "ellipsis",
|
|
33
|
-
whiteSpace: "nowrap"
|
|
34
|
-
};
|
|
29
|
+
var import_styledDynamic = require("../helpers/styledDynamic.cjs");
|
|
35
30
|
const textStaticConfig = {
|
|
36
31
|
acceptsClassName: true,
|
|
37
32
|
isText: true,
|
|
38
33
|
defaultProps: void 0,
|
|
39
34
|
inlineProps: /* @__PURE__ */ new Set(["maxFontSizeMultiplier"]),
|
|
40
35
|
variants: {
|
|
41
|
-
numberOfLines: {
|
|
42
|
-
1
|
|
43
|
-
|
|
36
|
+
numberOfLines: (0, import_styledDynamic.styledDynamic)((numberOfLines) => {
|
|
37
|
+
if (numberOfLines === 1) return {
|
|
38
|
+
maxWidth: "100%",
|
|
39
|
+
overflow: "hidden",
|
|
40
|
+
textOverflow: "ellipsis",
|
|
41
|
+
whiteSpace: "nowrap"
|
|
42
|
+
};
|
|
43
|
+
return numberOfLines >= 1 ? {
|
|
44
44
|
maxWidth: "100%",
|
|
45
45
|
WebkitLineClamp: numberOfLines,
|
|
46
46
|
WebkitBoxOrient: "vertical",
|
|
47
47
|
display: "-webkit-box",
|
|
48
48
|
overflow: "hidden"
|
|
49
|
-
} : null
|
|
50
|
-
},
|
|
51
|
-
ellipsis: { true:
|
|
49
|
+
} : null;
|
|
50
|
+
}),
|
|
51
|
+
ellipsis: { true: {
|
|
52
|
+
maxWidth: "100%",
|
|
53
|
+
overflow: "hidden",
|
|
54
|
+
textOverflow: "ellipsis",
|
|
55
|
+
whiteSpace: "nowrap"
|
|
56
|
+
} }
|
|
52
57
|
},
|
|
53
58
|
validStyles: {
|
|
54
59
|
...import_helpers.validStyles,
|
|
@@ -28,6 +28,7 @@ __export(Text_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(Text_exports);
|
|
29
29
|
var import_helpers = require("@tamagui/helpers");
|
|
30
30
|
var import_createComponent = require("../createComponent.native.js");
|
|
31
|
+
require("../helpers/styledDynamic.native.js");
|
|
31
32
|
var textStaticConfig = {
|
|
32
33
|
acceptsClassName: true,
|
|
33
34
|
isText: true,
|
|
@@ -28,6 +28,7 @@ __export(Text_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(Text_exports);
|
|
29
29
|
var import_helpers = require("@tamagui/helpers");
|
|
30
30
|
var import_createComponent = require("../createComponent.native.js");
|
|
31
|
+
require("../helpers/styledDynamic.native.js");
|
|
31
32
|
var textStaticConfig = {
|
|
32
33
|
acceptsClassName: true,
|
|
33
34
|
isText: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.native.js","names":[],"sources":["cjs/views/Text.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 Text_exports = {};\n__export(Text_exports, {\n\tText: () => Text,\n\ttextStaticConfig: () => textStaticConfig\n});\nmodule.exports = __toCommonJS(Text_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_createComponent = require(\"../createComponent\");\nvar textStaticConfig = {\n\tacceptsClassName: true,\n\tisText: true,\n\tdefaultProps: { suppressHighlighting: true },\n\tinlineProps: /* @__PURE__ */ new Set([\"maxFontSizeMultiplier\"]),\n\tvariants: { ellipsis: { true: {\n\t\tnumberOfLines: 1,\n\t\tlineBreakMode: \"clip\"\n\t} } },\n\tvalidStyles: {\n\t\t...import_helpers.validStyles,\n\t\t...import_helpers.stylePropsTextOnly\n\t}\n};\nvar Text = (0, import_createComponent.createComponent)({\n\t...textStaticConfig,\n\tdisplayName: \"Text\"\n});\n//# sourceMappingURL=Text.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,eAAe,CAAC;AACpB,SAAS,cAAc;CACtB,YAAY;CACZ,wBAAwB;AACzB,CAAC;AACD,OAAO,UAAU,aAAa,YAAY;AAC1C,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,yBAAyB,QAAQ,8BAAoB;AACzD,IAAI,mBAAmB;CACtB,kBAAkB;CAClB,QAAQ;CACR,cAAc,EAAE,sBAAsB,KAAK;CAC3C,6BAA6B,IAAI,IAAI,CAAC,uBAAuB,CAAC;CAC9D,UAAU,EAAE,UAAU,EAAE,MAAM;EAC7B,eAAe;EACf,eAAe;CAChB,EAAE,EAAE;CACJ,aAAa;EACZ,GAAG,eAAe;EAClB,GAAG,eAAe;CACnB;AACD;AACA,IAAI,QAAQ,GAAG,uBAAuB,gBAAe,CAAE;CACtD,GAAG;CACH,aAAa;AACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"Text.native.js","names":[],"sources":["cjs/views/Text.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 Text_exports = {};\n__export(Text_exports, {\n\tText: () => Text,\n\ttextStaticConfig: () => textStaticConfig\n});\nmodule.exports = __toCommonJS(Text_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_createComponent = require(\"../createComponent\");\nrequire(\"../helpers/styledDynamic\");\nvar textStaticConfig = {\n\tacceptsClassName: true,\n\tisText: true,\n\tdefaultProps: { suppressHighlighting: true },\n\tinlineProps: /* @__PURE__ */ new Set([\"maxFontSizeMultiplier\"]),\n\tvariants: { ellipsis: { true: {\n\t\tnumberOfLines: 1,\n\t\tlineBreakMode: \"clip\"\n\t} } },\n\tvalidStyles: {\n\t\t...import_helpers.validStyles,\n\t\t...import_helpers.stylePropsTextOnly\n\t}\n};\nvar Text = (0, import_createComponent.createComponent)({\n\t...textStaticConfig,\n\tdisplayName: \"Text\"\n});\n//# sourceMappingURL=Text.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,eAAe,CAAC;AACpB,SAAS,cAAc;CACtB,YAAY;CACZ,wBAAwB;AACzB,CAAC;AACD,OAAO,UAAU,aAAa,YAAY;AAC1C,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,yBAAyB,QAAQ,8BAAoB;AACzD,QAAQ,oCAA0B;AAClC,IAAI,mBAAmB;CACtB,kBAAkB;CAClB,QAAQ;CACR,cAAc,EAAE,sBAAsB,KAAK;CAC3C,6BAA6B,IAAI,IAAI,CAAC,uBAAuB,CAAC;CAC9D,UAAU,EAAE,UAAU,EAAE,MAAM;EAC7B,eAAe;EACf,eAAe;CAChB,EAAE,EAAE;CACJ,aAAa;EACZ,GAAG,eAAe;EAClB,GAAG,eAAe;CACnB;AACD;AACA,IAAI,QAAQ,GAAG,uBAAuB,gBAAe,CAAE;CACtD,GAAG;CACH,aAAa;AACd,CAAC"}
|
package/dist/cjs/views/Theme.cjs
CHANGED
|
@@ -46,7 +46,7 @@ const Theme = (0, import_compose_refs.createRefComponent)(function Theme2(props,
|
|
|
46
46
|
"use no memo";
|
|
47
47
|
if (props.disable) return props.children;
|
|
48
48
|
if (process.env.NODE_ENV === "development") {
|
|
49
|
-
for (const key in props) if (!import_helpers.reservedThemeProps[key]) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
49
|
+
for (const key in props) if (!import_helpers.reservedThemeProps[key] && key !== "srcloc" && !key.startsWith("data-")) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
50
50
|
}
|
|
51
51
|
const { passThrough } = props;
|
|
52
52
|
const isRoot = !!props["_isRoot"];
|
|
@@ -85,10 +85,10 @@ function getThemedChildren(themeState, children, props, isRoot = false, stateRef
|
|
|
85
85
|
if (requiresExtraWrapper || themeState.name === "dark" || themeState.name === "light") state.hasEverThemed = "wrapped";
|
|
86
86
|
if (shallow) if (!themeState.parentId) {} else {
|
|
87
87
|
const parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
88
|
-
if (!parentState) throw new Error((0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
88
|
+
if (!parentState) throw new Error(process.env.NODE_ENV !== "production" ? (0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
89
89
|
name: themeState.name,
|
|
90
90
|
parentId: themeState.parentId
|
|
91
|
-
}));
|
|
91
|
+
}) : "❌ Error 014");
|
|
92
92
|
children = import_react.Children.toArray(children).map((child) => {
|
|
93
93
|
return (0, import_react.isValidElement)(child) ? passThrough ? child : (0, import_react.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {
|
|
94
94
|
name: parentState.name,
|
|
@@ -48,7 +48,7 @@ var Theme = (0, import_compose_refs.createRefComponent)(function Theme2(props, r
|
|
|
48
48
|
"use no memo";
|
|
49
49
|
if (props.disable) return props.children;
|
|
50
50
|
if (process.env.NODE_ENV === "development") {
|
|
51
|
-
for (var key in props) if (!import_helpers.reservedThemeProps[key]) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
51
|
+
for (var key in props) if (!import_helpers.reservedThemeProps[key] && key !== "srcloc" && !key.startsWith("data-")) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
52
52
|
}
|
|
53
53
|
var { passThrough } = props;
|
|
54
54
|
var isRoot = !!props["_isRoot"];
|
|
@@ -95,10 +95,10 @@ function getThemedChildren(themeState, children, props) {
|
|
|
95
95
|
if (requiresExtraWrapper || themeState.name === "dark" || themeState.name === "light") state.hasEverThemed = "wrapped";
|
|
96
96
|
if (shallow) if (!themeState.parentId) {} else {
|
|
97
97
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
98
|
-
if (!parentState) throw new Error((0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
98
|
+
if (!parentState) throw new Error(process.env.NODE_ENV !== "production" ? (0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
99
99
|
name: themeState.name,
|
|
100
100
|
parentId: themeState.parentId
|
|
101
|
-
}));
|
|
101
|
+
}) : "❌ Error 014");
|
|
102
102
|
children = import_react.Children.toArray(children).map(function(child) {
|
|
103
103
|
return /* @__PURE__ */ (0, import_react.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {
|
|
104
104
|
name: parentState.name,
|
|
@@ -48,7 +48,7 @@ var Theme = (0, import_compose_refs.createRefComponent)(function Theme2(props, r
|
|
|
48
48
|
"use no memo";
|
|
49
49
|
if (props.disable) return props.children;
|
|
50
50
|
if (process.env.NODE_ENV === "development") {
|
|
51
|
-
for (var key in props) if (!import_helpers.reservedThemeProps[key]) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
51
|
+
for (var key in props) if (!import_helpers.reservedThemeProps[key] && key !== "srcloc" && !key.startsWith("data-")) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
|
|
52
52
|
}
|
|
53
53
|
var { passThrough } = props;
|
|
54
54
|
var isRoot = !!props["_isRoot"];
|
|
@@ -95,10 +95,10 @@ function getThemedChildren(themeState, children, props) {
|
|
|
95
95
|
if (requiresExtraWrapper || themeState.name === "dark" || themeState.name === "light") state.hasEverThemed = "wrapped";
|
|
96
96
|
if (shallow) if (!themeState.parentId) {} else {
|
|
97
97
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
98
|
-
if (!parentState) throw new Error((0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
98
|
+
if (!parentState) throw new Error(process.env.NODE_ENV !== "production" ? (0, import_formatDiagnostic.formatDiagnostic)("‼️010", "Theme", "parent theme state is missing for shallow rendering", "Keep <Theme shallow> inside its mounted parent Theme", "name,parentId", {
|
|
99
99
|
name: themeState.name,
|
|
100
100
|
parentId: themeState.parentId
|
|
101
|
-
}));
|
|
101
|
+
}) : "❌ Error 014");
|
|
102
102
|
children = import_react.Children.toArray(children).map(function(child) {
|
|
103
103
|
return /* @__PURE__ */ (0, import_react.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {
|
|
104
104
|
name: parentState.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.native.js","names":[],"sources":["cjs/views/Theme.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Theme_exports = {};\n__export(Theme_exports, {\n\tTheme: () => Theme,\n\tgetThemedChildren: () => getThemedChildren\n});\nmodule.exports = __toCommonJS(Theme_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_createVariable = require(\"../createVariable\");\nvar import_formatDiagnostic = require(\"../helpers/formatDiagnostic\");\nvar import_nativeStyleEngine = require(\"../helpers/nativeStyleEngine\");\nvar import_warnOnce = require(\"../helpers/warnOnce\");\nvar import_useTheme = require(\"../hooks/useTheme\");\nvar import_useThemeState = require(\"../hooks/useThemeState\");\nvar import_ThemeDebug = require(\"./ThemeDebug\");\nvar Theme = (0, import_compose_refs.createRefComponent)(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tfor (var key in props) if (!import_helpers.reservedThemeProps[key]) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);\n\t}\n\tvar { passThrough } = props;\n\tvar isRoot = !!props[\"_isRoot\"];\n\tvar [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot, true);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\t(0, import_nativeStyleEngine.updateNativeStyleScope)(themeState.id, themeState.name, themeState.theme);\n\t\treturn function() {\n\t\t\treturn (0, import_nativeStyleEngine.removeNativeStyleScope)(themeState.id);\n\t\t};\n\t}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tvar finalChildren = props[\"disable-child-theme\"] ? import_react.Children.map(props.children, function(child) {\n\t\treturn passThrough || !/* @__PURE__ */ (0, import_react.isValidElement)(child) ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, { [\"data-disable-theme\"]: true });\n\t}) : props.children;\n\tif (ref) try {\n\t\timport_react.default.Children.only(finalChildren);\n\t\tfinalChildren = /* @__PURE__ */ (0, import_react.cloneElement)(finalChildren, { ref });\n\t} catch (e) {}\n\tvar stateRef = (0, import_react.useRef)({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar { shallow, forceClassName } = props;\n\tvar state = stateRef.current;\n\tvar shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useThemeState.ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tvar { isInverse, name } = themeState;\n\tvar requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tvar parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error((0, import_formatDiagnostic.formatDiagnostic)(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}));\n\t\tchildren = import_react.Children.toArray(children).map(function(child) {\n\t\t\treturn /* @__PURE__ */ (0, import_react.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (import_constants.isWeb) {\n\t\tvar _props__themeUpdate;\n\t\tvar baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tvar { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tvar inlineClassName = passThrough ? void 0 : (_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.className;\n\t\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") {\n\t\t\tvar className1 = requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`;\n\t\t\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"span\", {\n\t\t\t\tclassName: className1,\n\t\t\t\tchildren\n\t\t\t});\n\t\t}\n\t\treturn children;\n\t}\n\treturn children;\n}\nvar inertStyle = { display: \"contents\" };\nvar inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nvar empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props) {\n\tvar isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: (themeState === null || themeState === void 0 ? void 0 : themeState.theme) && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : \"\",\n\t\tclassName: (0, import_helpers.getThemeClassNames)(themeState.name, isRoot)\n\t};\n}\n//# sourceMappingURL=Theme.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,I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WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,QAAQ;IAC9D,WAAW;IACX;GACD,CAAC;EACF;EACA,OAAO;CACR;CACA,OAAO;AACR;AACA,IAAI,aAAa,EAAE,SAAS,WAAW;AACvC,IAAI,sBAAsB;CACzB,SAAS;CACT,SAAS;AACV;AACA,IAAI,QAAQ;CACX,WAAW;CACX,OAAO,KAAK;AACb;AACA,SAAS,0BAA0B,YAAY,OAAO;CACrD,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,QAAQ,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,UAAU,WAAW,SAAS,GAAG,sBAAsB,iBAAgB,CAAE,WAAW,MAAM,KAAK,IAAI;EAC9K,YAAY,GAAG,eAAe,mBAAkB,CAAE,WAAW,MAAM,MAAM;CAC1E;AACD"}
|
|
1
|
+
{"version":3,"file":"Theme.native.js","names":[],"sources":["cjs/views/Theme.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Theme_exports = {};\n__export(Theme_exports, {\n\tTheme: () => Theme,\n\tgetThemedChildren: () => getThemedChildren\n});\nmodule.exports = __toCommonJS(Theme_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_createVariable = require(\"../createVariable\");\nvar import_formatDiagnostic = require(\"../helpers/formatDiagnostic\");\nvar import_nativeStyleEngine = require(\"../helpers/nativeStyleEngine\");\nvar import_warnOnce = require(\"../helpers/warnOnce\");\nvar import_useTheme = require(\"../hooks/useTheme\");\nvar import_useThemeState = require(\"../hooks/useThemeState\");\nvar import_ThemeDebug = require(\"./ThemeDebug\");\nvar Theme = (0, import_compose_refs.createRefComponent)(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tfor (var key in props) if (!import_helpers.reservedThemeProps[key] && key !== \"srcloc\" && !key.startsWith(\"data-\")) (0, import_warnOnce.warnOnce)(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);\n\t}\n\tvar { passThrough } = props;\n\tvar isRoot = !!props[\"_isRoot\"];\n\tvar [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot, true);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\t(0, import_nativeStyleEngine.updateNativeStyleScope)(themeState.id, themeState.name, themeState.theme);\n\t\treturn function() {\n\t\t\treturn (0, import_nativeStyleEngine.removeNativeStyleScope)(themeState.id);\n\t\t};\n\t}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tvar finalChildren = props[\"disable-child-theme\"] ? import_react.Children.map(props.children, function(child) {\n\t\treturn passThrough || !/* @__PURE__ */ (0, import_react.isValidElement)(child) ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, { [\"data-disable-theme\"]: true });\n\t}) : props.children;\n\tif (ref) try {\n\t\timport_react.default.Children.only(finalChildren);\n\t\tfinalChildren = /* @__PURE__ */ (0, import_react.cloneElement)(finalChildren, { ref });\n\t} catch (e) {}\n\tvar stateRef = (0, import_react.useRef)({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar { shallow, forceClassName } = props;\n\tvar state = stateRef.current;\n\tvar shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useThemeState.ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tvar { isInverse, name } = themeState;\n\tvar requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tvar parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error(process.env.NODE_ENV !== \"production\" ? (0, import_formatDiagnostic.formatDiagnostic)(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}) : \"❌ Error 014\");\n\t\tchildren = import_react.Children.toArray(children).map(function(child) {\n\t\t\treturn /* @__PURE__ */ (0, import_react.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (import_constants.isWeb) {\n\t\tvar _props__themeUpdate;\n\t\tvar baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tvar { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tvar inlineClassName = passThrough ? void 0 : (_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.className;\n\t\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") {\n\t\t\tvar className1 = requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`;\n\t\t\tchildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"span\", {\n\t\t\t\tclassName: className1,\n\t\t\t\tchildren\n\t\t\t});\n\t\t}\n\t\treturn children;\n\t}\n\treturn children;\n}\nvar inertStyle = { display: \"contents\" };\nvar inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nvar empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props) {\n\tvar isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: (themeState === null || themeState === void 0 ? void 0 : themeState.theme) && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : \"\",\n\t\tclassName: (0, import_helpers.getThemeClassNames)(themeState.name, isRoot)\n\t};\n}\n//# sourceMappingURL=Theme.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,SA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ACA,SAAS,0BAA0B,YAAY,OAAO;CACrD,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,QAAQ,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,UAAU,WAAW,SAAS,GAAG,sBAAsB,iBAAgB,CAAE,WAAW,MAAM,KAAK,IAAI;EAC9K,YAAY,GAAG,eAAe,mBAAkB,CAAE,WAAW,MAAM,MAAM;CAC1E;AACD"}
|
|
@@ -70,10 +70,7 @@ function ThemeDebug({ themeState, themeProps, children }) {
|
|
|
70
70
|
color1: themeState.theme.color1.val,
|
|
71
71
|
parentId: themeState.parentId,
|
|
72
72
|
isNew: themeState.isNew,
|
|
73
|
-
themeProps: {
|
|
74
|
-
name: themeProps.name,
|
|
75
|
-
reset: themeProps.reset
|
|
76
|
-
},
|
|
73
|
+
themeProps: { name: themeProps.name },
|
|
77
74
|
parentState: {
|
|
78
75
|
name: parentState?.name,
|
|
79
76
|
isNew: parentState?.isNew
|
|
@@ -162,7 +162,7 @@ if (isWeb && typeof document !== "undefined") {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
function createComponent(staticConfig) {
|
|
165
|
-
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(`[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.`);
|
|
165
|
+
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(process.env.NODE_ENV !== "production" ? `[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.` : "❌ Error 010");
|
|
166
166
|
let config = null;
|
|
167
167
|
let resolvedDefaultProps;
|
|
168
168
|
let resolvedStyleRevision = -1;
|
|
@@ -980,6 +980,17 @@ ${banner}
|
|
|
980
980
|
res = component;
|
|
981
981
|
res = React.memo(res);
|
|
982
982
|
res.staticConfig = staticConfig;
|
|
983
|
+
res.resolve = (resolver) => {
|
|
984
|
+
const next = createComponent({
|
|
985
|
+
...staticConfig,
|
|
986
|
+
resolvers: staticConfig.resolvers ? [...staticConfig.resolvers, resolver] : [resolver]
|
|
987
|
+
});
|
|
988
|
+
for (const key in res) {
|
|
989
|
+
if (key === "propTypes" || key in next) continue;
|
|
990
|
+
next[key] = res[key];
|
|
991
|
+
}
|
|
992
|
+
return next;
|
|
993
|
+
};
|
|
983
994
|
if (displayName) {
|
|
984
995
|
res.displayName = displayName;
|
|
985
996
|
res[componentDisplayName] = displayName;
|