@tamagui/web 3.0.0-beta.765.1 → 3.0.0-beta.804.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 +83 -86
- package/dist/cjs/createComponent.native.cjs +96 -103
- package/dist/cjs/createComponent.native.js +96 -103
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +9 -7
- package/dist/cjs/createTamagui.native.cjs +9 -7
- package/dist/cjs/createTamagui.native.js +9 -7
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +0 -1
- package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -1
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -1
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +348 -0
- package/dist/cjs/helpers/directStyleCSS.native.cjs +20 -0
- package/dist/cjs/helpers/directStyleCSS.native.js +22 -0
- package/dist/cjs/helpers/directStyleCSS.native.js.map +1 -0
- package/dist/cjs/helpers/directStyleCSSCompiled.cjs +40 -0
- package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +46 -0
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js +48 -0
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +1 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +92 -74
- package/dist/cjs/helpers/{getFontLanguage.native.cjs → getCSSStylesAtomicCompiled.cjs} +12 -8
- package/dist/cjs/helpers/{getFontLanguage.native.js → getCSSStylesAtomicCompiled.native.cjs} +12 -8
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +36 -0
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
- package/dist/cjs/helpers/getSplitStyles.cjs +2417 -548
- package/dist/cjs/helpers/getSplitStyles.native.cjs +2758 -621
- package/dist/cjs/helpers/getSplitStyles.native.js +2758 -621
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +8 -3
- package/dist/cjs/helpers/getVariantExtras.native.cjs +8 -3
- package/dist/cjs/helpers/getVariantExtras.native.js +8 -3
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +2 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +68 -5
- package/dist/cjs/helpers/insertStyleRule.native.js +68 -5
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/mediaState.cjs +12 -0
- package/dist/cjs/helpers/mediaState.native.cjs +12 -0
- package/dist/cjs/helpers/mediaState.native.js +12 -0
- package/dist/cjs/helpers/mediaState.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +16 -2
- package/dist/cjs/helpers/normalizeStyle.native.cjs +16 -2
- package/dist/cjs/helpers/normalizeStyle.native.js +16 -2
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/resolveRem.cjs +1 -1
- package/dist/cjs/helpers/skipProps.cjs +6 -1
- package/dist/cjs/helpers/skipProps.native.cjs +6 -1
- package/dist/cjs/helpers/skipProps.native.js +6 -1
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/styleFrontend.cjs +2 -8
- package/dist/cjs/helpers/styleFrontend.native.cjs +2 -10
- package/dist/cjs/helpers/styleFrontend.native.js +2 -10
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
- package/dist/cjs/helpers/styleToCSS.cjs +59 -0
- package/dist/cjs/helpers/{normalizeStylePropKeys.cjs → styleToCSS.native.cjs} +6 -4
- package/dist/cjs/helpers/{getFontLanguage.cjs → styleToCSS.native.js} +8 -4
- package/dist/cjs/helpers/styleToCSS.native.js.map +1 -0
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +28 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +45 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +45 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/variables.cjs +3 -2
- package/dist/cjs/helpers/variables.native.cjs +3 -2
- package/dist/cjs/helpers/variables.native.js +3 -2
- package/dist/cjs/helpers/variables.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +5 -3
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +3 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js +3 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +70 -89
- package/dist/cjs/hooks/useComponentState.native.cjs +70 -88
- package/dist/cjs/hooks/useComponentState.native.js +70 -88
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +3 -15
- package/dist/cjs/hooks/useMedia.native.cjs +3 -15
- package/dist/cjs/hooks/useMedia.native.js +3 -15
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useProps.cjs +7 -5
- package/dist/cjs/hooks/useProps.native.cjs +7 -5
- package/dist/cjs/hooks/useProps.native.js +7 -5
- package/dist/cjs/hooks/useProps.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +42 -0
- package/dist/cjs/hooks/useSplitStyles.native.cjs +42 -0
- package/dist/cjs/hooks/useSplitStyles.native.js +44 -0
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -0
- package/dist/cjs/index.cjs +184 -70
- package/dist/cjs/index.native.cjs +184 -70
- package/dist/cjs/index.native.js +184 -70
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/insertFont.cjs +1 -1
- package/dist/cjs/insertFont.native.cjs +1 -0
- package/dist/cjs/insertFont.native.js +1 -0
- package/dist/cjs/insertFont.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +33 -6
- package/dist/cjs/internal-runtime.native.cjs +33 -6
- package/dist/cjs/internal-runtime.native.js +33 -6
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/setupReactNative.cjs +1 -29
- package/dist/cjs/setupReactNative.native.cjs +1 -3
- package/dist/cjs/setupReactNative.native.js +1 -3
- package/dist/cjs/setupReactNative.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +229 -0
- package/dist/cjs/static-resolve.native.cjs +242 -0
- package/dist/cjs/static-resolve.native.js +244 -0
- package/dist/cjs/static-resolve.native.js.map +1 -0
- package/dist/cjs/styled.cjs +23 -37
- package/dist/cjs/styled.native.cjs +22 -37
- package/dist/cjs/styled.native.js +22 -37
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +4 -8
- package/dist/cjs/views/TamaguiProvider.native.cjs +4 -8
- package/dist/cjs/views/TamaguiProvider.native.js +4 -8
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/ThemeUpdate.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +85 -88
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +98 -105
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +9 -7
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +9 -7
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +0 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/directStyleCSS.mjs +320 -0
- package/dist/esm/helpers/directStyleCSS.mjs.map +1 -0
- package/dist/esm/helpers/directStyleCSS.native.js +1 -0
- package/dist/esm/helpers/directStyleCSSCompiled.mjs +11 -0
- package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +1 -0
- package/dist/esm/helpers/directStyleCSSCompiled.native.js +15 -0
- package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +86 -72
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +9 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +9 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
- package/dist/esm/helpers/getSplitStyles.mjs +2406 -545
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +2751 -618
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.mjs +8 -3
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +8 -3
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +2 -1
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +69 -3
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/mediaState.mjs +12 -1
- package/dist/esm/helpers/mediaState.mjs.map +1 -1
- package/dist/esm/helpers/mediaState.native.js +12 -1
- package/dist/esm/helpers/mediaState.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.mjs +16 -2
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +16 -2
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/resolveRem.mjs +1 -1
- package/dist/esm/helpers/resolveRem.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +3 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +3 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styleFrontend.mjs +2 -4
- package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
- package/dist/esm/helpers/styleFrontend.native.js +2 -6
- package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
- package/dist/esm/helpers/styleToCSS.mjs +40 -0
- package/dist/esm/helpers/styleToCSS.mjs.map +1 -0
- package/dist/esm/helpers/styleToCSS.native.js +4 -0
- package/dist/esm/helpers/styleToCSS.native.js.map +1 -0
- package/dist/esm/helpers/subscribeToContextGroup.mjs +25 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +42 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/variables.mjs +2 -1
- package/dist/esm/helpers/variables.mjs.map +1 -1
- package/dist/esm/helpers/variables.native.js +2 -1
- package/dist/esm/helpers/variables.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +5 -3
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +3 -1
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +71 -90
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +71 -89
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +2 -15
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +2 -15
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useProps.mjs +7 -5
- package/dist/esm/hooks/useProps.mjs.map +1 -1
- package/dist/esm/hooks/useProps.native.js +7 -5
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +17 -0
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -0
- package/dist/esm/hooks/useSplitStyles.native.js +14 -0
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -0
- package/dist/esm/index.js +57 -137
- package/dist/esm/index.mjs +57 -137
- package/dist/esm/index.native.js +57 -137
- package/dist/esm/insertFont.mjs +1 -1
- package/dist/esm/insertFont.mjs.map +1 -1
- package/dist/esm/insertFont.native.js +1 -0
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/internal-runtime.mjs +23 -4
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +23 -4
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/setupReactNative.mjs +1 -29
- package/dist/esm/setupReactNative.mjs.map +1 -1
- package/dist/esm/setupReactNative.native.js +1 -3
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +194 -0
- package/dist/esm/static-resolve.mjs.map +1 -0
- package/dist/esm/static-resolve.native.js +205 -0
- package/dist/esm/static-resolve.native.js.map +1 -0
- package/dist/esm/styled.mjs +24 -40
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +23 -40
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +4 -8
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +4 -8
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/ThemeUpdate.mjs +1 -1
- package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
- package/dist/esm/views/ThemeUpdate.native.js +1 -1
- package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
- package/package.json +25 -15
- package/reset.css +3 -3
- package/src/createComponent.tsx +175 -192
- package/src/createTamagui.ts +10 -9
- package/src/helpers/defaultAnimationDriver.tsx +0 -1
- package/src/helpers/directStyleCSS.native.ts +1 -0
- package/src/helpers/directStyleCSS.ts +534 -0
- package/src/helpers/directStyleCSSCompiled.ts +32 -0
- package/src/helpers/getCSSStylesAtomic.ts +168 -88
- package/src/helpers/getCSSStylesAtomicCompiled.ts +9 -0
- package/src/helpers/getSplitStyles.tsx +4653 -1003
- package/src/helpers/getVariantExtras.tsx +15 -3
- package/src/helpers/insertStyleRule.tsx +4 -2
- package/src/helpers/mediaState.ts +15 -0
- package/src/helpers/normalizeStyle.ts +27 -2
- package/src/helpers/resolveRem.ts +1 -1
- package/src/helpers/skipProps.ts +3 -0
- package/src/helpers/styleFrontend.ts +20 -27
- package/src/helpers/styleToCSS.native.ts +1 -0
- package/src/helpers/styleToCSS.ts +43 -0
- package/src/helpers/subscribeToContextGroup.tsx +30 -0
- package/src/helpers/variables.ts +2 -1
- package/src/helpers/warnOnce.ts +3 -4
- package/src/helpers/wrapStyleTags.tsx +1 -1
- package/src/hooks/useComponentState.ts +118 -158
- package/src/hooks/useMedia.tsx +2 -18
- package/src/hooks/useProps.tsx +19 -15
- package/src/hooks/useSplitStyles.tsx +26 -0
- package/src/index.ts +298 -73
- package/src/insertFont.ts +5 -1
- package/src/internal-runtime.ts +49 -24
- package/src/internalRuntimeTypes.ts +2 -7
- package/src/setupReactNative.ts +7 -30
- package/src/static-resolve.ts +396 -0
- package/src/styled.tsx +34 -11
- package/src/types.tsx +40 -30
- package/src/views/TamaguiProvider.tsx +23 -22
- package/src/views/ThemeUpdate.tsx +3 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
- package/types/helpers/directStyleCSS.d.ts +28 -0
- package/types/helpers/directStyleCSS.d.ts.map +1 -0
- package/types/helpers/directStyleCSS.native.d.ts +2 -0
- package/types/helpers/directStyleCSS.native.d.ts.map +1 -0
- package/types/helpers/directStyleCSSCompiled.d.ts +10 -0
- package/types/helpers/directStyleCSSCompiled.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +22 -1
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +4 -0
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +11 -4
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/mediaState.d.ts +4 -0
- package/types/helpers/mediaState.d.ts.map +1 -1
- package/types/helpers/normalizeStyle.d.ts +1 -1
- package/types/helpers/normalizeStyle.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts +2 -0
- package/types/helpers/skipProps.d.ts.map +1 -1
- package/types/helpers/styleFrontend.d.ts +13 -17
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleToCSS.d.ts +2 -0
- package/types/helpers/styleToCSS.d.ts.map +1 -0
- package/types/helpers/styleToCSS.native.d.ts +2 -0
- package/types/helpers/styleToCSS.native.d.ts.map +1 -0
- package/types/helpers/subscribeToContextGroup.d.ts +1 -0
- package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
- package/types/helpers/variables.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +5 -0
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts +3 -2
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +1 -5
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useProps.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts +3 -0
- package/types/hooks/useSplitStyles.d.ts.map +1 -0
- package/types/index.d.ts +58 -72
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts.map +1 -1
- package/types/internal-runtime.d.ts +24 -11
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/internalRuntimeTypes.d.ts +1 -6
- package/types/internalRuntimeTypes.d.ts.map +1 -1
- package/types/setupReactNative.d.ts +2 -3
- package/types/setupReactNative.d.ts.map +1 -1
- package/types/static-resolve.d.ts +79 -0
- package/types/static-resolve.d.ts.map +1 -0
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +29 -22
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/ThemeUpdate.d.ts.map +1 -1
- package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -34
- package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -36
- package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -38
- package/dist/cjs/constants/accessibilityDirectMap.native.js.map +0 -1
- package/dist/cjs/helpers/directStyle.cjs +0 -962
- package/dist/cjs/helpers/directStyle.native.cjs +0 -1165
- package/dist/cjs/helpers/directStyle.native.js +0 -1167
- package/dist/cjs/helpers/directStyle.native.js.map +0 -1
- package/dist/cjs/helpers/frontendProgram.cjs +0 -43
- package/dist/cjs/helpers/frontendProgram.native.cjs +0 -49
- package/dist/cjs/helpers/frontendProgram.native.js +0 -51
- package/dist/cjs/helpers/frontendProgram.native.js.map +0 -1
- package/dist/cjs/helpers/getFontLanguage.native.js.map +0 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -37
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -39
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +0 -1
- package/dist/cjs/helpers/propMapper.cjs +0 -384
- package/dist/cjs/helpers/propMapper.native.cjs +0 -536
- package/dist/cjs/helpers/propMapper.native.js +0 -538
- package/dist/cjs/helpers/propMapper.native.js.map +0 -1
- package/dist/cjs/helpers/useRenderElement.cjs +0 -47
- package/dist/cjs/helpers/useRenderElement.native.cjs +0 -53
- package/dist/cjs/helpers/useRenderElement.native.js +0 -55
- package/dist/cjs/helpers/useRenderElement.native.js.map +0 -1
- package/dist/esm/constants/accessibilityDirectMap.mjs +0 -8
- package/dist/esm/constants/accessibilityDirectMap.mjs.map +0 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +0 -8
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +0 -1
- package/dist/esm/helpers/directStyle.mjs +0 -929
- package/dist/esm/helpers/directStyle.mjs.map +0 -1
- package/dist/esm/helpers/directStyle.native.js +0 -1132
- package/dist/esm/helpers/directStyle.native.js.map +0 -1
- package/dist/esm/helpers/frontendProgram.mjs +0 -20
- package/dist/esm/helpers/frontendProgram.mjs.map +0 -1
- package/dist/esm/helpers/frontendProgram.native.js +0 -24
- package/dist/esm/helpers/frontendProgram.native.js.map +0 -1
- package/dist/esm/helpers/getFontLanguage.mjs +0 -4
- package/dist/esm/helpers/getFontLanguage.mjs.map +0 -1
- package/dist/esm/helpers/getFontLanguage.native.js +0 -6
- package/dist/esm/helpers/getFontLanguage.native.js.map +0 -1
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +0 -4
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +0 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +0 -15
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +0 -1
- package/dist/esm/helpers/propMapper.mjs +0 -360
- package/dist/esm/helpers/propMapper.mjs.map +0 -1
- package/dist/esm/helpers/propMapper.native.js +0 -511
- package/dist/esm/helpers/propMapper.native.js.map +0 -1
- package/dist/esm/helpers/useRenderElement.mjs +0 -26
- package/dist/esm/helpers/useRenderElement.mjs.map +0 -1
- package/dist/esm/helpers/useRenderElement.native.js +0 -31
- package/dist/esm/helpers/useRenderElement.native.js.map +0 -1
- package/src/constants/accessibilityDirectMap.native.tsx +0 -10
- package/src/constants/accessibilityDirectMap.tsx +0 -11
- package/src/helpers/directStyle.ts +0 -2294
- package/src/helpers/frontendProgram.ts +0 -48
- package/src/helpers/getFontLanguage.ts +0 -2
- package/src/helpers/normalizeStylePropKeys.native.ts +0 -12
- package/src/helpers/normalizeStylePropKeys.ts +0 -3
- package/src/helpers/propMapper.ts +0 -721
- package/src/helpers/useRenderElement.tsx +0 -73
- package/types/constants/accessibilityDirectMap.d.ts +0 -6
- package/types/constants/accessibilityDirectMap.d.ts.map +0 -1
- package/types/constants/accessibilityDirectMap.native.d.ts +0 -6
- package/types/constants/accessibilityDirectMap.native.d.ts.map +0 -1
- package/types/helpers/directStyle.d.ts +0 -15
- package/types/helpers/directStyle.d.ts.map +0 -1
- package/types/helpers/frontendProgram.d.ts +0 -10
- package/types/helpers/frontendProgram.d.ts.map +0 -1
- package/types/helpers/getFontLanguage.d.ts +0 -2
- package/types/helpers/getFontLanguage.d.ts.map +0 -1
- package/types/helpers/normalizeStylePropKeys.d.ts +0 -2
- package/types/helpers/normalizeStylePropKeys.d.ts.map +0 -1
- package/types/helpers/normalizeStylePropKeys.native.d.ts +0 -13
- package/types/helpers/normalizeStylePropKeys.native.d.ts.map +0 -1
- package/types/helpers/propMapper.d.ts +0 -6
- package/types/helpers/propMapper.d.ts.map +0 -1
- package/types/helpers/useRenderElement.d.ts +0 -13
- package/types/helpers/useRenderElement.d.ts.map +0 -1
package/src/index.ts
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { ComponentContext, useConfiguration } from './contexts/ComponentContext'
|
|
2
|
+
export { GroupContext } from './contexts/GroupContext'
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
4
|
+
export {
|
|
5
|
+
isEqualShallow,
|
|
6
|
+
mergeIfNotShallowEqual,
|
|
7
|
+
useCreateShallowSetState,
|
|
8
|
+
type CallbackSetState,
|
|
9
|
+
} from '@tamagui/is-equal-shallow'
|
|
10
|
+
export { _withStableStyle } from './_withStableStyle'
|
|
11
|
+
export { _withNativeStyle } from './_withNativeStyle'
|
|
12
|
+
export { createComponent } from './createComponent'
|
|
13
|
+
export { createStyledContext } from './helpers/createStyledContext'
|
|
14
|
+
export { getDefaultProps } from './helpers/getDefaultProps'
|
|
15
|
+
export { getCSSStylesAtomic } from './helpers/getCSSStylesAtomic'
|
|
16
|
+
export { getExpandedShorthand } from './helpers/getExpandedShorthands'
|
|
17
|
+
export { formatDiagnostic } from './helpers/formatDiagnostic'
|
|
18
|
+
export {
|
|
19
|
+
getSplitStyles,
|
|
20
|
+
isValidStyleKey,
|
|
21
|
+
prepareStyleStaticConfig,
|
|
22
|
+
} from './helpers/getSplitStyles'
|
|
16
23
|
export {
|
|
17
24
|
setNativeStyleEngine,
|
|
18
25
|
getNativeStyleEngine,
|
|
@@ -23,8 +30,6 @@ export {
|
|
|
23
30
|
type NativeStyleEngineSlots,
|
|
24
31
|
type NativeViewStateUpdate,
|
|
25
32
|
} from './helpers/nativeStyleEngine'
|
|
26
|
-
export * from './helpers/getThemeCSSRules'
|
|
27
|
-
export * from './helpers/getVariantExtras'
|
|
28
33
|
export {
|
|
29
34
|
autoVariables,
|
|
30
35
|
getAutoVariableCSS,
|
|
@@ -32,43 +37,204 @@ export {
|
|
|
32
37
|
mutatedAutoVariables,
|
|
33
38
|
} from './helpers/registerCSSVariable'
|
|
34
39
|
export { insertStyleRules } from './helpers/insertStyleRule'
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export * from './helpers/themeRef'
|
|
46
|
-
export * from './helpers/themeable'
|
|
47
|
-
export * from './helpers/themes'
|
|
48
|
-
export * from './helpers/transformsToString'
|
|
49
|
-
export * from './helpers/wrapStyleTags'
|
|
40
|
+
export { isTamaguiComponent } from './helpers/isTamaguiComponent'
|
|
41
|
+
export { isTamaguiElement } from './helpers/isTamaguiElement'
|
|
42
|
+
export { matchMedia, setupMatchMedia } from './helpers/matchMedia'
|
|
43
|
+
export { mergeProps } from './helpers/mergeProps'
|
|
44
|
+
export { mergeSlotStyleProps } from './helpers/mergeSlotStyleProps'
|
|
45
|
+
export { normalizeColor } from './helpers/normalizeColor'
|
|
46
|
+
export { normalizeStyle } from './helpers/normalizeStyle'
|
|
47
|
+
export { containsThemeRef, themeRefKey } from './helpers/themeRef'
|
|
48
|
+
export { themeable } from './helpers/themeable'
|
|
49
|
+
export { getStyleTags } from './helpers/wrapStyleTags'
|
|
50
50
|
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
export { createFont } from './createFont'
|
|
52
|
+
export {
|
|
53
|
+
createChangeEventDetails,
|
|
54
|
+
type TamaguiChangeEventDetails,
|
|
55
|
+
type TamaguiEventDetails,
|
|
56
|
+
} from './eventDetails'
|
|
57
|
+
export { createStyledHOC } from './createStyledHOC'
|
|
58
|
+
export { createShorthands } from './createShorthands'
|
|
59
|
+
export { createTamagui, installTamaguiConfig } from './createTamagui'
|
|
60
|
+
export { createTokens } from './createTokens'
|
|
61
|
+
export {
|
|
62
|
+
createVariable,
|
|
63
|
+
createCSSVariable,
|
|
64
|
+
getVariable,
|
|
65
|
+
getVariableName,
|
|
66
|
+
getVariableValue,
|
|
67
|
+
getVariableVariable,
|
|
68
|
+
isVariable,
|
|
69
|
+
px,
|
|
70
|
+
variableToString,
|
|
71
|
+
} from './createVariable'
|
|
72
|
+
export { insertFont, updateFont } from './insertFont'
|
|
73
|
+
export { styled } from './styled'
|
|
74
|
+
export { Tamagui } from './Tamagui'
|
|
64
75
|
|
|
65
76
|
export type { TamaguiBuildOptions } from '@tamagui/types'
|
|
66
|
-
export type
|
|
67
|
-
export type
|
|
68
|
-
|
|
77
|
+
export type { RNTextProps, RNViewProps } from './interfaces/RNExclusiveTypes'
|
|
78
|
+
export type {
|
|
79
|
+
AllPlatforms,
|
|
80
|
+
AnimatedNumberStrategy,
|
|
81
|
+
AnimationDriver,
|
|
82
|
+
AnimationDriverStub,
|
|
83
|
+
AnimationDriverWithAnimatedNumbers,
|
|
84
|
+
AnimationsConfig,
|
|
85
|
+
BorderValue,
|
|
86
|
+
BoxShadowValue,
|
|
87
|
+
Color,
|
|
88
|
+
ColorScheme,
|
|
89
|
+
ColorTokens,
|
|
90
|
+
CreateTamaguiConfig,
|
|
91
|
+
CreateTamaguiProps,
|
|
92
|
+
DebugProp,
|
|
93
|
+
DisposeFn,
|
|
94
|
+
FillInFont,
|
|
95
|
+
FilterValue,
|
|
96
|
+
FlatStyleValue,
|
|
97
|
+
Font,
|
|
98
|
+
FontColorTokens,
|
|
99
|
+
FontFamilyTokens,
|
|
100
|
+
FontLanguages,
|
|
101
|
+
FontLetterSpacingTokens,
|
|
102
|
+
FontLineHeightTokens,
|
|
103
|
+
FontSize,
|
|
104
|
+
FontSizeTokens,
|
|
105
|
+
FontStyleTokens,
|
|
106
|
+
FontTokens,
|
|
107
|
+
FontTransformTokens,
|
|
108
|
+
FontWeightTokens,
|
|
109
|
+
Fonts,
|
|
110
|
+
GenericFont,
|
|
111
|
+
GenericStackVariants,
|
|
112
|
+
GenericTamaguiConfig,
|
|
113
|
+
GenericTextVariants,
|
|
114
|
+
GenericVariables,
|
|
115
|
+
GestureReponderEvent,
|
|
116
|
+
GetAnimationKeys,
|
|
117
|
+
GetBaseStyles,
|
|
118
|
+
GetFinalProps,
|
|
119
|
+
GetProps,
|
|
120
|
+
GetStyleResult,
|
|
121
|
+
GetThemeValueForKey,
|
|
122
|
+
GetVariantProps,
|
|
123
|
+
GroupNames,
|
|
124
|
+
InferTamaguiConfig,
|
|
125
|
+
InferStyleProps,
|
|
126
|
+
Insets,
|
|
127
|
+
LayoutEvent,
|
|
128
|
+
LoadedComponents,
|
|
129
|
+
Longhands,
|
|
130
|
+
MatchMedia,
|
|
131
|
+
Media,
|
|
132
|
+
MediaQueries,
|
|
133
|
+
MediaQueryKey,
|
|
134
|
+
MediaQueryList,
|
|
135
|
+
MediaQueryState,
|
|
136
|
+
MediaStyleObject,
|
|
137
|
+
Narrow,
|
|
138
|
+
OnTransition,
|
|
139
|
+
OutlineValue,
|
|
140
|
+
PresenceContextProps,
|
|
141
|
+
PresenceRegistration,
|
|
142
|
+
PxValue,
|
|
143
|
+
Radius,
|
|
144
|
+
RadiusTokens,
|
|
145
|
+
ReservedThemePropName,
|
|
146
|
+
ResolveVariableAs,
|
|
147
|
+
Role,
|
|
148
|
+
Shorthands,
|
|
149
|
+
Size,
|
|
150
|
+
SizeKeys,
|
|
151
|
+
SizeTokens,
|
|
152
|
+
SizeVariantSpreadFunction,
|
|
153
|
+
Space,
|
|
154
|
+
SpaceTokens,
|
|
155
|
+
SpaceValue,
|
|
156
|
+
SplitStyleProps,
|
|
157
|
+
StackNonStyleProps,
|
|
158
|
+
StackStyleBase,
|
|
159
|
+
StaticConfig,
|
|
160
|
+
StaticComponentObject,
|
|
161
|
+
StaticConfigPublic,
|
|
162
|
+
StyleObject,
|
|
163
|
+
StyleProp,
|
|
164
|
+
StyledContext,
|
|
165
|
+
StyledContextOptions,
|
|
166
|
+
StyledHOCMergedProps,
|
|
167
|
+
TamaDefer,
|
|
168
|
+
TamaguiBaseTheme,
|
|
169
|
+
TamaguiComponent,
|
|
170
|
+
TamaguiComponentPropsBaseBase,
|
|
171
|
+
TamaguiComponentState,
|
|
172
|
+
TamaguiConfig,
|
|
173
|
+
TamaguiCustomConfig,
|
|
174
|
+
TamaguiElement,
|
|
175
|
+
TamaguiElementMethods,
|
|
176
|
+
TamaguiInternalConfig,
|
|
177
|
+
TamaguiProjectInfo,
|
|
178
|
+
TamaguiProviderProps,
|
|
179
|
+
TamaguiSettings,
|
|
180
|
+
TamaguiTextElement,
|
|
181
|
+
TamaguiWebElement,
|
|
182
|
+
TextNonStyleProps,
|
|
183
|
+
TextProps,
|
|
184
|
+
TextStyle,
|
|
185
|
+
TextStylePropsBase,
|
|
186
|
+
ThemeDefinition,
|
|
187
|
+
ThemeKeys,
|
|
188
|
+
ThemeName,
|
|
189
|
+
ThemeParsed,
|
|
190
|
+
ThemeProps,
|
|
191
|
+
ThemeProviderProps,
|
|
192
|
+
ThemeState,
|
|
193
|
+
ThemeTokens,
|
|
194
|
+
ThemeValueFallback,
|
|
195
|
+
Themes,
|
|
196
|
+
Token,
|
|
197
|
+
TokenCategories,
|
|
198
|
+
Tokens,
|
|
199
|
+
TokensParsed,
|
|
200
|
+
TransitionEvent,
|
|
201
|
+
TransitionKeys,
|
|
202
|
+
TransitionProp,
|
|
203
|
+
Try,
|
|
204
|
+
TypeOverride,
|
|
205
|
+
UnionableNumber,
|
|
206
|
+
UnionableString,
|
|
207
|
+
UniversalAnimatedNumber,
|
|
208
|
+
UseAnimatedNumber,
|
|
209
|
+
UseAnimatedNumberReaction,
|
|
210
|
+
UseAnimatedNumberStyle,
|
|
211
|
+
UseAnimatedNumbersStyle,
|
|
212
|
+
UseMediaState,
|
|
213
|
+
UsePresenceResult,
|
|
214
|
+
Variable,
|
|
215
|
+
VariableVal,
|
|
216
|
+
VariableValGeneric,
|
|
217
|
+
VariableValIn,
|
|
218
|
+
VariantSpreadExtras,
|
|
219
|
+
VariantSpreadFunction,
|
|
220
|
+
WidthHeight,
|
|
221
|
+
WithFlatVariantValues,
|
|
222
|
+
WithShorthands,
|
|
223
|
+
WithThemeValues,
|
|
224
|
+
ZIndex,
|
|
225
|
+
ZIndexTokens,
|
|
226
|
+
} from './types'
|
|
227
|
+
export { createVariantResolver } from './types'
|
|
69
228
|
|
|
70
|
-
export
|
|
71
|
-
export {
|
|
229
|
+
export type { GetRef } from './interfaces/GetRef'
|
|
230
|
+
export {
|
|
231
|
+
createRefComponent,
|
|
232
|
+
type RefComponent,
|
|
233
|
+
type RefProp,
|
|
234
|
+
composeRefs,
|
|
235
|
+
setRef,
|
|
236
|
+
useComposedRefs,
|
|
237
|
+
} from '@tamagui/compose-refs'
|
|
72
238
|
|
|
73
239
|
export {
|
|
74
240
|
getConfig,
|
|
@@ -87,9 +253,7 @@ export {
|
|
|
87
253
|
|
|
88
254
|
export { setNonce } from './helpers/insertStyleRule'
|
|
89
255
|
|
|
90
|
-
export
|
|
91
|
-
|
|
92
|
-
export * from './hooks/useIsTouchDevice'
|
|
256
|
+
export { useIsTouchDevice } from './hooks/useIsTouchDevice'
|
|
93
257
|
export {
|
|
94
258
|
_disableMediaTouch,
|
|
95
259
|
_mediaListenerStats,
|
|
@@ -105,32 +269,93 @@ export {
|
|
|
105
269
|
mediaState,
|
|
106
270
|
setMediaState,
|
|
107
271
|
} from './helpers/mediaState'
|
|
108
|
-
export
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
272
|
+
export {
|
|
273
|
+
useAnimatedNumber,
|
|
274
|
+
useAnimatedNumberReaction,
|
|
275
|
+
useAnimatedNumberStyle,
|
|
276
|
+
useAnimatedNumbersStyle,
|
|
277
|
+
useAnimationDriver,
|
|
278
|
+
} from './hooks/useAnimationDriver'
|
|
279
|
+
export { useProps, usePropsAndStyle, useStyle } from './hooks/useProps'
|
|
280
|
+
export { useTheme } from './hooks/useTheme'
|
|
281
|
+
export { usePortalThemeState } from './hooks/usePortalThemeState'
|
|
282
|
+
export { useThemeName } from './hooks/useThemeName'
|
|
113
283
|
export {
|
|
114
284
|
forceUpdateThemes,
|
|
115
285
|
getThemeProviderChainSizes,
|
|
116
286
|
resolveThemeName,
|
|
117
287
|
} from './hooks/useThemeState'
|
|
118
288
|
|
|
119
|
-
export
|
|
120
|
-
export
|
|
121
|
-
export
|
|
122
|
-
export
|
|
123
|
-
export
|
|
124
|
-
export
|
|
125
|
-
export
|
|
126
|
-
export
|
|
127
|
-
export
|
|
128
|
-
export
|
|
289
|
+
export { html } from './dom/html'
|
|
290
|
+
export { Configuration } from './views/Configuration'
|
|
291
|
+
export { TamaguiRoot } from './views/TamaguiRoot'
|
|
292
|
+
export { FontLanguage } from './views/FontLanguage'
|
|
293
|
+
export { Slot, Slottable } from './views/Slot'
|
|
294
|
+
export { TamaguiProvider } from './views/TamaguiProvider'
|
|
295
|
+
export { Text, textStaticConfig } from './views/Text'
|
|
296
|
+
export { Theme } from './views/Theme'
|
|
297
|
+
export { ThemeProvider } from './views/ThemeProvider'
|
|
298
|
+
export { View, viewStaticConfig, type ViewProps, type ViewStyle } from './views/View'
|
|
129
299
|
|
|
130
|
-
export
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
300
|
+
export {
|
|
301
|
+
currentPlatform,
|
|
302
|
+
getPlatformDriver,
|
|
303
|
+
isAndroid,
|
|
304
|
+
isBrowser,
|
|
305
|
+
isChrome,
|
|
306
|
+
isClient,
|
|
307
|
+
isIos,
|
|
308
|
+
isNativeDesktop,
|
|
309
|
+
isServer,
|
|
310
|
+
isTV,
|
|
311
|
+
isTouchable,
|
|
312
|
+
isWeb,
|
|
313
|
+
isWebTouchable,
|
|
314
|
+
setupPlatformDriver,
|
|
315
|
+
supportsDynamicColorIOS,
|
|
316
|
+
useIsomorphicLayoutEffect,
|
|
317
|
+
type PlatformDriver,
|
|
318
|
+
type PlatformDriverPseudoState,
|
|
319
|
+
} from '@tamagui/constants'
|
|
320
|
+
export {
|
|
321
|
+
clamp,
|
|
322
|
+
composeEventHandlers,
|
|
323
|
+
cssShorthandLonghands,
|
|
324
|
+
getThemeClassNames,
|
|
325
|
+
nonAnimatableStyleProps,
|
|
326
|
+
nonAnimatableWebTextProps,
|
|
327
|
+
nonAnimatableWebViewProps,
|
|
328
|
+
reservedThemeProps,
|
|
329
|
+
shouldRenderNativePlatform,
|
|
330
|
+
simpleHash,
|
|
331
|
+
StyleObjectIdentifier,
|
|
332
|
+
StyleObjectProperty,
|
|
333
|
+
StyleObjectPseudo,
|
|
334
|
+
StyleObjectRules,
|
|
335
|
+
StyleObjectValue,
|
|
336
|
+
stylePropsAll,
|
|
337
|
+
stylePropsText,
|
|
338
|
+
stylePropsTextOnly,
|
|
339
|
+
stylePropsTransform,
|
|
340
|
+
stylePropsUnitless,
|
|
341
|
+
stylePropsView,
|
|
342
|
+
tokenCategories,
|
|
343
|
+
validStyles,
|
|
344
|
+
webOnlyStylePropsText,
|
|
345
|
+
webOnlyStylePropsView,
|
|
346
|
+
withStaticProperties,
|
|
347
|
+
type EventHandler,
|
|
348
|
+
type ExplicitNativePlatform,
|
|
349
|
+
type NativePlatform,
|
|
350
|
+
type NativeValue,
|
|
351
|
+
} from '@tamagui/helpers'
|
|
352
|
+
export {
|
|
353
|
+
ClientOnly,
|
|
354
|
+
ClientOnlyContext,
|
|
355
|
+
useClientValue,
|
|
356
|
+
useDidFinishSSR,
|
|
357
|
+
useIsClientOnly,
|
|
358
|
+
} from '@tamagui/use-did-finish-ssr'
|
|
359
|
+
export { useEvent, useGet } from '@tamagui/use-event'
|
|
135
360
|
|
|
136
|
-
export
|
|
361
|
+
export { hooks, setupHooks } from './setupHooks'
|
package/src/insertFont.ts
CHANGED
|
@@ -16,7 +16,11 @@ export function insertFont<A extends GenericFont>(
|
|
|
16
16
|
const font = createFont(fontIn)
|
|
17
17
|
const tokened = createVariables(font, name) as GenericFont
|
|
18
18
|
const parsed = parseFont(tokened) as DeepVariableObject<A>
|
|
19
|
-
if (
|
|
19
|
+
if (
|
|
20
|
+
!process.env.TAMAGUI_DID_OUTPUT_CSS &&
|
|
21
|
+
process.env.TAMAGUI_TARGET === 'web' &&
|
|
22
|
+
typeof document !== 'undefined'
|
|
23
|
+
) {
|
|
20
24
|
const fontVars = registerFontVariables(parsed)
|
|
21
25
|
const styleElement: HTMLStyleElement =
|
|
22
26
|
document.querySelector(`style[${FONT_DATA_ATTRIBUTE_NAME}="${name}"]`) ||
|
package/src/internal-runtime.ts
CHANGED
|
@@ -1,45 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Private implementation boundary
|
|
3
|
-
*
|
|
4
|
-
* `@tamagui/
|
|
5
|
-
* reconnect the frontend graphs the package split exists to keep apart.
|
|
2
|
+
* Private implementation boundary shared by Tamagui workspace packages. Not public
|
|
3
|
+
* API: never reexport it from `@tamagui/web`, `@tamagui/core`, `tamagui`, or
|
|
4
|
+
* `@tamagui/tailwind` roots. Doing so would expose implementation details again.
|
|
6
5
|
*
|
|
7
6
|
* It deliberately exposes purpose-built, explicitly typed wrappers rather than raw
|
|
8
|
-
* module reexports. That keeps the
|
|
9
|
-
*
|
|
10
|
-
* styled, or inline style-prop declarations.
|
|
7
|
+
* module reexports. That keeps the private declaration entry narrow and avoids
|
|
8
|
+
* reconnecting the regular root barrel.
|
|
11
9
|
*/
|
|
12
10
|
import type { FunctionComponent } from 'react'
|
|
13
|
-
import type { ParsedValue } from '@tamagui/style-grammar/runtime'
|
|
14
11
|
import { stylePropsUnitless } from '@tamagui/helpers'
|
|
15
12
|
import { createComponent } from './createComponent'
|
|
13
|
+
import { createVariables as createVariablesImpl } from './createVariables'
|
|
14
|
+
import { fixStyles as fixStylesImpl } from './helpers/expandStyles'
|
|
15
|
+
import { styleToCSS as styleToCSSImpl } from './helpers/styleToCSS'
|
|
16
16
|
import { setComponentDisplayName } from './helpers/componentDisplayName'
|
|
17
|
-
import {
|
|
17
|
+
import { getThemeCSSRules as getThemeCSSRulesImpl } from './helpers/getThemeCSSRules'
|
|
18
|
+
import { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from './helpers/normalizeValueWithProperty'
|
|
19
|
+
import { proxyThemeToParents as proxyThemeToParentsImpl } from './helpers/proxyThemeToParents'
|
|
18
20
|
import type { FrontendComponent, StyleFrontend } from './helpers/styleFrontend'
|
|
19
|
-
import
|
|
21
|
+
import { ensureThemeVariable as ensureThemeVariableImpl } from './helpers/themes'
|
|
22
|
+
import { transformsToString as transformsToStringImpl } from './helpers/transformsToString'
|
|
23
|
+
import {
|
|
24
|
+
parseFont as parseFontImpl,
|
|
25
|
+
registerFontVariables as registerFontVariablesImpl,
|
|
26
|
+
} from './insertFont'
|
|
20
27
|
import { createTamagui as createTamaguiImpl } from './createTamagui'
|
|
21
28
|
import { setupHooks as setupHooksImpl } from './setupHooks'
|
|
22
29
|
import { createFrontendStyled as createFrontendStyledImpl } from './styled'
|
|
30
|
+
import { useThemeWithState as useThemeWithStateImpl } from './hooks/useTheme'
|
|
23
31
|
import { TamaguiProvider as TamaguiProviderImpl } from './views/TamaguiProvider'
|
|
24
32
|
import { textStaticConfig } from './views/Text'
|
|
25
33
|
import { viewStaticConfig } from './views/View'
|
|
26
34
|
|
|
27
|
-
export {
|
|
28
|
-
STYLE_FRONTEND_PASSTHROUGH_PREFIX,
|
|
29
|
-
STYLE_FRONTEND_PREPROCESSED,
|
|
30
|
-
regularStyleFrontend,
|
|
31
|
-
} from './helpers/styleFrontend'
|
|
35
|
+
export { regularStyleFrontend } from './helpers/styleFrontend'
|
|
32
36
|
export type * from './internalRuntimeTypes'
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
) =>
|
|
38
|
+
export const createVariables: (
|
|
39
|
+
tokens: Record<string, any>,
|
|
40
|
+
parentPath?: string,
|
|
41
|
+
isFont?: boolean
|
|
42
|
+
) => any = createVariablesImpl as any
|
|
43
|
+
export const parseFont: (definition: Record<string, any>) => any = parseFontImpl as any
|
|
44
|
+
export const registerFontVariables: (parsedFont: any) => string[] =
|
|
45
|
+
registerFontVariablesImpl
|
|
46
|
+
export const fixStyles: (style: Record<string, any>) => void = fixStylesImpl
|
|
47
|
+
export const getThemeCSSRules: (props: {
|
|
48
|
+
config: any
|
|
49
|
+
themeName: string
|
|
50
|
+
theme: any
|
|
51
|
+
names: string[]
|
|
52
|
+
hasDarkLight?: boolean
|
|
53
|
+
useMutatedVariables?: boolean
|
|
54
|
+
}) => string[] = getThemeCSSRulesImpl
|
|
55
|
+
export const normalizeValueWithProperty: (value: any, property?: string) => any =
|
|
56
|
+
normalizeValueWithPropertyImpl
|
|
57
|
+
export const proxyThemeToParents: (themeName: string, theme: any) => any =
|
|
58
|
+
proxyThemeToParentsImpl
|
|
59
|
+
export const ensureThemeVariable: (theme: any, key: string) => void =
|
|
60
|
+
ensureThemeVariableImpl
|
|
61
|
+
export const transformsToString: (transforms: object[]) => string = transformsToStringImpl
|
|
62
|
+
export const styleToCSS: (style: Record<string, any>) => void = styleToCSSImpl
|
|
63
|
+
export const useThemeWithState: (
|
|
64
|
+
props: any,
|
|
65
|
+
isRoot?: boolean,
|
|
66
|
+
forThemeView?: boolean
|
|
67
|
+
) => [any, any] = useThemeWithStateImpl
|
|
43
68
|
|
|
44
69
|
// the one scalar-to-css boundary used by frontends before they mint a conditional
|
|
45
70
|
// value. strings already carry their authored units; finite numbers use the same
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ParsedValue } from '@tamagui/style-grammar/runtime'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* The narrow type surface another style frontend needs to build components on the
|
|
5
3
|
* shared runtime.
|
|
@@ -11,12 +9,9 @@ import type { ParsedValue } from '@tamagui/style-grammar/runtime'
|
|
|
11
9
|
*/
|
|
12
10
|
export type {
|
|
13
11
|
FrontendComponent,
|
|
12
|
+
FrontendClassPlan,
|
|
13
|
+
FrontendClassPlanEntry,
|
|
14
14
|
FrontendStaticConfig,
|
|
15
15
|
StyleFrontend,
|
|
16
16
|
StyleFrontendConfig,
|
|
17
17
|
} from './helpers/styleFrontend'
|
|
18
|
-
|
|
19
|
-
export interface FrontendProgramValue {
|
|
20
|
-
readonly property: string
|
|
21
|
-
readonly value: ParsedValue
|
|
22
|
-
}
|
package/src/setupReactNative.ts
CHANGED
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
import type { StaticConfig } from './types'
|
|
2
2
|
|
|
3
|
-
const ReactNativeStaticConfigs = new WeakMap<any, Partial<StaticConfig> | null>()
|
|
4
|
-
|
|
5
3
|
export function getReactNativeConfig(Component: any) {
|
|
6
|
-
if (!Component) return
|
|
7
|
-
|
|
8
|
-
if (process.env.TAMAGUI_TARGET === 'native') {
|
|
9
|
-
if (Component.propTypes?.onTextInput || Component.propTypes?.onChangeText) {
|
|
10
|
-
return RNConfigs.TextInput
|
|
11
|
-
}
|
|
12
|
-
if (Component.getSizeWithHeaders) {
|
|
13
|
-
return RNConfigs.Image
|
|
14
|
-
}
|
|
15
|
-
if (Component.propTypes?.textBreakStrategy) {
|
|
16
|
-
return RNConfigs.Text
|
|
17
|
-
}
|
|
4
|
+
if (process.env.TAMAGUI_TARGET !== 'native' || !Component) return
|
|
18
5
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// can assume everything else is react native on native
|
|
22
|
-
return RNConfigs.default
|
|
6
|
+
if (Component.propTypes?.onTextInput || Component.propTypes?.onChangeText) {
|
|
7
|
+
return RNConfigs.TextInput
|
|
23
8
|
}
|
|
24
|
-
if (Component.
|
|
9
|
+
if (Component.getSizeWithHeaders) {
|
|
25
10
|
return RNConfigs.Image
|
|
26
11
|
}
|
|
27
|
-
if (Component.
|
|
12
|
+
if (Component.propTypes?.textBreakStrategy) {
|
|
28
13
|
return RNConfigs.Text
|
|
29
14
|
}
|
|
30
|
-
if (
|
|
31
|
-
Component.render &&
|
|
32
|
-
(Component.displayName === 'ScrollView' || Component.displayName === 'View')
|
|
33
|
-
) {
|
|
34
|
-
return RNConfigs.default
|
|
35
|
-
}
|
|
36
|
-
if (Component.State?.blurTextInput) {
|
|
37
|
-
return RNConfigs.TextInput
|
|
38
|
-
}
|
|
39
15
|
|
|
40
|
-
|
|
16
|
+
// can assume every other non-tamagui component is native on native
|
|
17
|
+
return RNConfigs.default
|
|
41
18
|
}
|
|
42
19
|
|
|
43
20
|
const RNConfigs = {
|