@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
|
@@ -3,9 +3,9 @@ import React from "react";
|
|
|
3
3
|
import { getConfig } from "../config.mjs";
|
|
4
4
|
import { ComponentContext } from "../contexts/ComponentContext.mjs";
|
|
5
5
|
import { GroupContext } from "../contexts/GroupContext.mjs";
|
|
6
|
-
import { useSplitStyles } from "
|
|
6
|
+
import { useSplitStyles } from "./useSplitStyles.mjs";
|
|
7
7
|
import { subscribeToSafeArea } from "../helpers/resolveSafeAreaVariable.mjs";
|
|
8
|
-
import { subscribeToContextGroup } from "../helpers/subscribeToContextGroup.mjs";
|
|
8
|
+
import { subscribeToContextGroup, useGroupSetRevision } from "../helpers/subscribeToContextGroup.mjs";
|
|
9
9
|
import { View } from "../views/View.mjs";
|
|
10
10
|
import { useComponentState } from "./useComponentState.mjs";
|
|
11
11
|
import { mediaState } from "../helpers/mediaState.mjs";
|
|
@@ -37,7 +37,8 @@ function usePropsAndStyle(props, opts) {
|
|
|
37
37
|
});
|
|
38
38
|
const componentContext = React.useContext(ComponentContext);
|
|
39
39
|
const groupContext = React.useContext(GroupContext);
|
|
40
|
-
const
|
|
40
|
+
const componentState = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig());
|
|
41
|
+
const { props: statefulProps, state, disabled, setState, setStateShallow } = componentState;
|
|
41
42
|
const mediaStateNow = opts?.noMedia ? mediaState : useMedia();
|
|
42
43
|
const splitStyles = useSplitStyles(statefulProps, staticConfig, theme, themeState?.name || "", state, {
|
|
43
44
|
isAnimated: false,
|
|
@@ -48,7 +49,9 @@ function usePropsAndStyle(props, opts) {
|
|
|
48
49
|
resolveValues: "auto",
|
|
49
50
|
...opts
|
|
50
51
|
}, null, componentContext, groupContext);
|
|
52
|
+
componentState.finalizeStyleFlags(!!splitStyles?.hasEnterStyle, !!splitStyles?.platformPseudo);
|
|
51
53
|
const { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
54
|
+
const groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);
|
|
52
55
|
useIsomorphicLayoutEffect(() => {
|
|
53
56
|
let disposeSafeArea;
|
|
54
57
|
if (splitStyles?.usesSafeArea) {
|
|
@@ -83,8 +86,7 @@ function usePropsAndStyle(props, opts) {
|
|
|
83
86
|
disabled,
|
|
84
87
|
groupContext,
|
|
85
88
|
splitStyles?.usesSafeArea,
|
|
86
|
-
|
|
87
|
-
mediaGroups ? Object.keys([...mediaGroups]).join("") : 0
|
|
89
|
+
groupSetRevision
|
|
88
90
|
]);
|
|
89
91
|
return [
|
|
90
92
|
splitStyles?.viewProps || {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProps.js","names":[],"sources":["esm/hooks/useProps.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"
|
|
1
|
+
{"version":3,"file":"useProps.js","names":[],"sources":["esm/hooks/useProps.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"./useSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport {\n subscribeToContextGroup,\n useGroupSetRevision\n} from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n const [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n const staticConfig = opts?.forComponent?.staticConfig ?? View.staticConfig;\n const [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n const componentContext = React.useContext(ComponentContext);\n const groupContext = React.useContext(GroupContext);\n const componentState = useComponentState(\n props,\n componentContext.animationDriver,\n staticConfig,\n getConfig()\n );\n const {\n props: statefulProps,\n state,\n disabled,\n setState,\n setStateShallow\n } = componentState;\n const mediaStateNow = opts?.noMedia ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n const splitStyles = useSplitStyles(\n statefulProps,\n staticConfig,\n theme,\n themeState?.name || \"\",\n state,\n {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n },\n null,\n componentContext,\n groupContext\n );\n componentState.finalizeStyleFlags(\n !!splitStyles?.hasEnterStyle,\n !!splitStyles?.platformPseudo\n );\n const { mediaGroups, pseudoGroups } = splitStyles || {};\n const groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);\n useIsomorphicLayoutEffect(() => {\n let disposeSafeArea;\n if (splitStyles?.usesSafeArea) {\n const updateSafeArea = () => {\n setState((previous) => ({ ...previous }));\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({ unmounted: false });\n return disposeSafeArea;\n }\n if (groupContext) {\n const disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return () => {\n disposeSafeArea();\n disposeGroup?.();\n };\n }\n return disposeSafeArea;\n }, [disabled, groupContext, splitStyles?.usesSafeArea, groupSetRevision]);\n return [\n splitStyles?.viewProps || {},\n splitStyles?.style || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAS,SAAS,OAAO,MAAM;CAC7B,MAAM,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACnD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAiB,OAAO,MAAM;CACrC,MAAM,eAAe,MAAM,cAAc,gBAAgB,KAAK;CAC9D,MAAM,CAAC,OAAO,cAAc,kBAAkB;EAC5C,MAAM,WAAW,QAAQ,MAAM,QAAQ,KAAK;EAC5C,cAAc;GACZ,OAAO;EACT;CACF,CAAC;CACD,MAAM,mBAAmB,MAAM,WAAW,gBAAgB;CAC1D,MAAM,eAAe,MAAM,WAAW,YAAY;CAClD,MAAM,iBAAiB,kBACrB,OACA,iBAAiB,iBACjB,cACA,UAAU,CACZ;CACA,MAAM,EACJ,OAAO,eACP,OACA,UACA,UACA,oBACE;CACJ,MAAM,gBAAgB,MAAM,UAE1B,aACE,SAAS;CACb,MAAM,cAAc,eAClB,eACA,cACA,OACA,YAAY,QAAQ,IACpB,OACA;EACE,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,cAAc;EACd,SAAS;EACT,eAAe;EACf,GAAG;CACL,GACA,MACA,kBACA,YACF;CACA,eAAe,mBACb,CAAC,CAAC,aAAa,eACf,CAAC,CAAC,aAAa,cACjB;CACA,MAAM,EAAE,aAAa,iBAAiB,eAAe,CAAC;CACtD,MAAM,mBAAmB,oBAAoB,cAAc,WAAW;CACtE,gCAAgC;EAC9B,IAAI;EACJ,IAAI,aAAa,cAAc;GAC7B,MAAM,uBAAuB;IAC3B,UAAU,cAAc,EAAE,GAAG,SAAS,EAAE;GAC1C;GACA,kBAAkB,oBAAoB,cAAc;GACpD,eAAe;EACjB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,IAAI,MAAM,WAAW;GACnB,gBAAgB,EAAE,WAAW,MAAM,CAAC;GACpC,OAAO;EACT;EACA,IAAI,cAAc;GAChB,MAAM,eAAe,wBAAwB;IAC3C;IACA;IACA;IACA;GACF,CAAC;GACD,IAAI,CAAC,iBAAiB,OAAO;GAC7B,aAAa;IACX,gBAAgB;IAChB,eAAe;GACjB;EACF;EACA,OAAO;CACT,GAAG;EAAC;EAAU;EAAc,aAAa;EAAc;CAAgB,CAAC;CACxE,OAAO;EACL,aAAa,aAAa,CAAC;EAC3B,aAAa,SAAS,CAAC;EACvB;EACA;CACF;AACF"}
|
|
@@ -3,9 +3,9 @@ import React from "react";
|
|
|
3
3
|
import { getConfig } from "../config.native.js";
|
|
4
4
|
import { ComponentContext } from "../contexts/ComponentContext.native.js";
|
|
5
5
|
import { GroupContext } from "../contexts/GroupContext.native.js";
|
|
6
|
-
import { useSplitStyles } from "
|
|
6
|
+
import { useSplitStyles } from "./useSplitStyles.native.js";
|
|
7
7
|
import { subscribeToSafeArea } from "../helpers/resolveSafeAreaVariable.native.js";
|
|
8
|
-
import { subscribeToContextGroup } from "../helpers/subscribeToContextGroup.native.js";
|
|
8
|
+
import { subscribeToContextGroup, useGroupSetRevision } from "../helpers/subscribeToContextGroup.native.js";
|
|
9
9
|
import { View } from "../views/View.native.js";
|
|
10
10
|
import { useComponentState } from "./useComponentState.native.js";
|
|
11
11
|
import { mediaState } from "../helpers/mediaState.native.js";
|
|
@@ -39,7 +39,8 @@ function usePropsAndStyle(props, opts) {
|
|
|
39
39
|
});
|
|
40
40
|
var componentContext = React.useContext(ComponentContext);
|
|
41
41
|
var groupContext = React.useContext(GroupContext);
|
|
42
|
-
var
|
|
42
|
+
var componentState = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig());
|
|
43
|
+
var { props: statefulProps, state, disabled, setState, setStateShallow } = componentState;
|
|
43
44
|
var mediaStateNow = (opts === null || opts === void 0 ? void 0 : opts.noMedia) ? mediaState : useMedia();
|
|
44
45
|
var splitStyles = useSplitStyles(statefulProps, staticConfig, theme, (themeState === null || themeState === void 0 ? void 0 : themeState.name) || "", state, {
|
|
45
46
|
isAnimated: false,
|
|
@@ -50,7 +51,9 @@ function usePropsAndStyle(props, opts) {
|
|
|
50
51
|
resolveValues: "auto",
|
|
51
52
|
...opts
|
|
52
53
|
}, null, componentContext, groupContext);
|
|
54
|
+
componentState.finalizeStyleFlags(!!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasEnterStyle), !!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.platformPseudo));
|
|
53
55
|
var { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
56
|
+
var groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);
|
|
54
57
|
useIsomorphicLayoutEffect(function() {
|
|
55
58
|
var disposeSafeArea;
|
|
56
59
|
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
@@ -87,8 +90,7 @@ function usePropsAndStyle(props, opts) {
|
|
|
87
90
|
disabled,
|
|
88
91
|
groupContext,
|
|
89
92
|
splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea,
|
|
90
|
-
|
|
91
|
-
mediaGroups ? Object.keys([...mediaGroups]).join("") : 0
|
|
93
|
+
groupSetRevision
|
|
92
94
|
]);
|
|
93
95
|
return [
|
|
94
96
|
(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.viewProps) || {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProps.native.js","names":[],"sources":["esm/hooks/useProps.native.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"
|
|
1
|
+
{"version":3,"file":"useProps.native.js","names":[],"sources":["esm/hooks/useProps.native.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"./useSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport { subscribeToContextGroup, useGroupSetRevision } from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n var [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n var _opts_forComponent;\n var _opts_forComponent_staticConfig;\n var staticConfig = (_opts_forComponent_staticConfig = opts === null || opts === void 0 ? void 0 : (_opts_forComponent = opts.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : View.staticConfig;\n var [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n var componentContext = React.useContext(ComponentContext);\n var groupContext = React.useContext(GroupContext);\n var componentState = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig());\n var { props: statefulProps, state, disabled, setState, setStateShallow } = componentState;\n var mediaStateNow = (opts === null || opts === void 0 ? void 0 : opts.noMedia) ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n var splitStyles = useSplitStyles(statefulProps, staticConfig, theme, (themeState === null || themeState === void 0 ? void 0 : themeState.name) || \"\", state, {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n }, null, componentContext, groupContext);\n componentState.finalizeStyleFlags(!!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasEnterStyle), !!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.platformPseudo));\n var { mediaGroups, pseudoGroups } = splitStyles || {};\n var groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);\n useIsomorphicLayoutEffect(function() {\n var disposeSafeArea;\n if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {\n var updateSafeArea = function() {\n setState(function(previous) {\n return {\n ...previous\n };\n });\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({\n unmounted: false\n });\n return disposeSafeArea;\n }\n if (groupContext) {\n var disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return function() {\n disposeSafeArea();\n disposeGroup === null || disposeGroup === void 0 ? void 0 : disposeGroup();\n };\n }\n return disposeSafeArea;\n }, [\n disabled,\n groupContext,\n splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea,\n groupSetRevision\n ]);\n return [\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.viewProps) || {},\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.style) || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO,MAAM;CAC7B,IAAI,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACjD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAiB,OAAO,MAAM;CACrC,IAAI;CACJ,IAAI;CACJ,IAAI,gBAAgB,kCAAkC,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,qBAAqB,KAAK,kBAAkB,QAAQ,uBAAuB,KAAK,IAAI,KAAK,IAAI,mBAAmB,kBAAkB,QAAQ,oCAAoC,KAAK,IAAI,kCAAkC,KAAK;CACjU,IAAI,CAAC,OAAO,cAAc,kBAAkB;EAC1C,MAAM,WAAW,QAAQ,MAAM,QAAQ,KAAK;EAC5C,cAAc;GACZ,OAAO;EACT;CACF,CAAC;CACD,IAAI,mBAAmB,MAAM,WAAW,gBAAgB;CACxD,IAAI,eAAe,MAAM,WAAW,YAAY;CAChD,IAAI,iBAAiB,kBAAkB,OAAO,iBAAiB,iBAAiB,cAAc,UAAU,CAAC;CACzG,IAAI,EAAE,OAAO,eAAe,OAAO,UAAU,UAAU,oBAAoB;CAC3E,IAAI,iBAAiB,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,WAEpE,aACE,SAAS;CACb,IAAI,cAAc,eAAe,eAAe,cAAc,QAAQ,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,SAAS,IAAI,OAAO;EAC3J,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,cAAc;EACd,SAAS;EACT,eAAe;EACf,GAAG;CACL,GAAG,MAAM,kBAAkB,YAAY;CACvC,eAAe,mBAAmB,CAAC,EAAE,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,gBAAgB,CAAC,EAAE,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,eAAe;CACnN,IAAI,EAAE,aAAa,iBAAiB,eAAe,CAAC;CACpD,IAAI,mBAAmB,oBAAoB,cAAc,WAAW;CACpE,0BAA0B,WAAW;EACnC,IAAI;EACJ,IAAI,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,cAAc;GACtF,IAAI,iBAAiB,WAAW;IAC9B,SAAS,SAAS,UAAU;KAC1B,OAAO,EACL,GAAG,SACL;IACF,CAAC;GACH;GACA,kBAAkB,oBAAoB,cAAc;GACpD,eAAe;EACjB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,IAAI,MAAM,WAAW;GACnB,gBAAgB,EACd,WAAW,MACb,CAAC;GACD,OAAO;EACT;EACA,IAAI,cAAc;GAChB,IAAI,eAAe,wBAAwB;IACzC;IACA;IACA;IACA;GACF,CAAC;GACD,IAAI,CAAC,iBAAiB,OAAO;GAC7B,OAAO,WAAW;IAChB,gBAAgB;IAChB,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;GAC3E;EACF;EACA,OAAO;CACT,GAAG;EACD;EACA;EACA,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;EACtE;CACF,CAAC;CACD,OAAO;GACJ,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,cAAc,CAAC;GACrF,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,UAAU,CAAC;EAClF;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { getSplitStyles } from "../helpers/getSplitStyles.mjs";
|
|
4
|
+
import { insertStyleRules } from "../helpers/insertStyleRule.mjs";
|
|
5
|
+
|
|
6
|
+
const useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};
|
|
7
|
+
const useSplitStyles = (a, b, c, d, e, f, g, h, i, j, k, l, m) => {
|
|
8
|
+
"use no memo";
|
|
9
|
+
const res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
|
|
10
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS && true) useInsertEffectCompat(() => {
|
|
11
|
+
if (res) insertStyleRules(res.rulesToInsert);
|
|
12
|
+
}, [res?.rulesToInsert]);
|
|
13
|
+
return res;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { useSplitStyles };
|
|
17
|
+
//# sourceMappingURL=useSplitStyles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSplitStyles.js","names":[],"sources":["esm/hooks/useSplitStyles.js"],"sourcesContent":["import { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getSplitStyles } from \"../helpers/getSplitStyles\";\nimport { insertStyleRules } from \"../helpers/insertStyleRule\";\n\nconst useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};\nconst useSplitStyles = (a, b, c, d, e, f, g, h, i, j, k, l, m) => {\n\t\"use no memo\";\n\tconst res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && true) useInsertEffectCompat(() => {\n\t\tif (res) insertStyleRules(res.rulesToInsert);\n\t}, [res?.rulesToInsert]);\n\treturn res;\n};\n\nexport { useSplitStyles };"],"mappings":";;;;;;AAKA,MAAM,wBAAwB,QAAQ,MAAM,sBAAsB,kCAAkC,CAAC;AACrG,MAAM,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM;CACjE;CACA,MAAM,MAAM,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAChE,IAAI,CAAC,QAAQ,IAAI,0BAA0B,MAAM,4BAA4B;EAC5E,IAAI,KAAK,iBAAiB,IAAI,aAAa;CAC5C,GAAG,CAAC,KAAK,aAAa,CAAC;CACvB,OAAO;AACR"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { getSplitStyles } from "../helpers/getSplitStyles.native.js";
|
|
4
|
+
|
|
5
|
+
isWeb && React.useInsertionEffect;
|
|
6
|
+
var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
|
|
7
|
+
"use no memo";
|
|
8
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
|
|
9
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
|
|
10
|
+
return res;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { useSplitStyles };
|
|
14
|
+
//# sourceMappingURL=useSplitStyles.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSplitStyles.native.js","names":[],"sources":["esm/hooks/useSplitStyles.native.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getSplitStyles } from \"../helpers/getSplitStyles\";\n\nisWeb && React.useInsertionEffect;\nvar useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {\n\t\"use no memo\";\n\tvar res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\treturn res;\n};\n\nexport { useSplitStyles };"],"mappings":";;;;;AAIA,SAAS,MAAM;AACf,IAAI,iBAAiB,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;CACpE;CACA,IAAI,MAAM,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC9D,IAAI,CAAC,QAAQ,IAAI,0BAA0B;CAC3C,OAAO;AACR"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,145 +1,65 @@
|
|
|
1
|
+
import { ComponentContext, useConfiguration } from "./contexts/ComponentContext.mjs";
|
|
2
|
+
import { GroupContext } from "./contexts/GroupContext.mjs";
|
|
3
|
+
import { isEqualShallow, mergeIfNotShallowEqual, useCreateShallowSetState } from "@tamagui/is-equal-shallow";
|
|
4
|
+
import { _withStableStyle } from "./_withStableStyle.mjs";
|
|
5
|
+
import { _withNativeStyle } from "./_withNativeStyle.mjs";
|
|
6
|
+
import { createComponent } from "./createComponent.mjs";
|
|
7
|
+
import { createStyledContext } from "./helpers/createStyledContext.mjs";
|
|
8
|
+
import { getDefaultProps } from "./helpers/getDefaultProps.mjs";
|
|
9
|
+
import { getCSSStylesAtomic } from "./helpers/getCSSStylesAtomic.mjs";
|
|
10
|
+
import { getExpandedShorthand } from "./helpers/getExpandedShorthands.mjs";
|
|
11
|
+
import { formatDiagnostic } from "./helpers/formatDiagnostic.mjs";
|
|
12
|
+
import { getSplitStyles, isValidStyleKey, prepareStyleStaticConfig } from "./helpers/getSplitStyles.mjs";
|
|
1
13
|
import { getNativeStyleEngine, removeNativeStyleScope, setNativeStyleEngine, setNativeStyleEngineFlushListener, updateNativeStyleScope } from "./helpers/nativeStyleEngine.mjs";
|
|
2
14
|
import { autoVariables, getAutoVariableCSS, getMutatedAutoVariableCSS, mutatedAutoVariables } from "./helpers/registerCSSVariable.mjs";
|
|
3
15
|
import { insertStyleRules, setNonce } from "./helpers/insertStyleRule.mjs";
|
|
4
|
-
import {
|
|
16
|
+
import { isTamaguiComponent } from "./helpers/isTamaguiComponent.mjs";
|
|
17
|
+
import { isTamaguiElement } from "./helpers/isTamaguiElement.mjs";
|
|
18
|
+
import { matchMedia, setupMatchMedia } from "./helpers/matchMedia.mjs";
|
|
19
|
+
import { mergeProps } from "./helpers/mergeProps.mjs";
|
|
20
|
+
import { mergeSlotStyleProps } from "./helpers/mergeSlotStyleProps.mjs";
|
|
21
|
+
import { normalizeColor } from "./helpers/normalizeColor.mjs";
|
|
22
|
+
import { normalizeStyle } from "./helpers/normalizeStyle.mjs";
|
|
23
|
+
import { containsThemeRef, themeRefKey } from "./helpers/themeRef.mjs";
|
|
24
|
+
import { themeable } from "./helpers/themeable.mjs";
|
|
25
|
+
import { getStyleTags } from "./helpers/wrapStyleTags.mjs";
|
|
26
|
+
import { createFont } from "./createFont.mjs";
|
|
27
|
+
import { createChangeEventDetails } from "./eventDetails.mjs";
|
|
28
|
+
import { createStyledHOC } from "./createStyledHOC.mjs";
|
|
29
|
+
import { createShorthands } from "./createShorthands.mjs";
|
|
30
|
+
import { createTamagui, installTamaguiConfig } from "./createTamagui.mjs";
|
|
31
|
+
import { createTokens } from "./createTokens.mjs";
|
|
32
|
+
import { createCSSVariable, createVariable, getVariable, getVariableName, getVariableValue, getVariableVariable, isVariable, px, variableToString } from "./createVariable.mjs";
|
|
33
|
+
import { insertFont, updateFont } from "./insertFont.mjs";
|
|
34
|
+
import { styled } from "./styled.mjs";
|
|
35
|
+
import { Tamagui } from "./Tamagui.mjs";
|
|
36
|
+
import { createVariantResolver } from "./types.mjs";
|
|
37
|
+
import { composeRefs, createRefComponent, setRef, useComposedRefs } from "@tamagui/compose-refs";
|
|
5
38
|
import { getConfig, getSetting, getStyleCompat, getThemes, getToken, getTokenValue, getTokens, loadAnimationDriver, setConfig, setupDev, updateConfig } from "./config.mjs";
|
|
39
|
+
import { useIsTouchDevice } from "./hooks/useIsTouchDevice.mjs";
|
|
6
40
|
import { _disableMediaTouch, _mediaListenerStats, configureMedia, mediaKeyMatch, updateMediaListeners, useMedia } from "./hooks/useMedia.mjs";
|
|
7
41
|
import { mediaObjectToString } from "./helpers/mediaObjectToString.mjs";
|
|
8
42
|
import { getMedia, mediaQueryConfig, mediaState, setMediaState } from "./helpers/mediaState.mjs";
|
|
43
|
+
import { useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle, useAnimatedNumbersStyle, useAnimationDriver } from "./hooks/useAnimationDriver.mjs";
|
|
44
|
+
import { useProps, usePropsAndStyle, useStyle } from "./hooks/useProps.mjs";
|
|
45
|
+
import { useTheme } from "./hooks/useTheme.mjs";
|
|
46
|
+
import { usePortalThemeState } from "./hooks/usePortalThemeState.mjs";
|
|
47
|
+
import { useThemeName } from "./hooks/useThemeName.mjs";
|
|
9
48
|
import { forceUpdateThemes, getThemeProviderChainSizes, resolveThemeName } from "./hooks/useThemeState.mjs";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export * from "./helpers/expandStyles.mjs"
|
|
28
|
-
|
|
29
|
-
export * from "./helpers/getCSSStylesAtomic.mjs"
|
|
30
|
-
|
|
31
|
-
export * from "./helpers/getExpandedShorthands.mjs"
|
|
32
|
-
|
|
33
|
-
export * from "./helpers/formatDiagnostic.mjs"
|
|
34
|
-
|
|
35
|
-
export * from "./helpers/getShorthandValue.mjs"
|
|
36
|
-
|
|
37
|
-
export * from "./helpers/getSplitStyles.mjs"
|
|
38
|
-
|
|
39
|
-
export * from "./helpers/getThemeCSSRules.mjs"
|
|
40
|
-
|
|
41
|
-
export * from "./helpers/getVariantExtras.mjs"
|
|
42
|
-
|
|
43
|
-
export * from "./helpers/isTamaguiComponent.mjs"
|
|
44
|
-
|
|
45
|
-
export * from "./helpers/isTamaguiElement.mjs"
|
|
46
|
-
|
|
47
|
-
export * from "./helpers/matchMedia.mjs"
|
|
48
|
-
|
|
49
|
-
export * from "./helpers/mergeProps.mjs"
|
|
50
|
-
|
|
51
|
-
export * from "./helpers/mergeSlotStyleProps.mjs"
|
|
52
|
-
|
|
53
|
-
export * from "./helpers/normalizeColor.mjs"
|
|
54
|
-
|
|
55
|
-
export * from "./helpers/normalizeStyle.mjs"
|
|
56
|
-
|
|
57
|
-
export * from "./helpers/normalizeValueWithProperty.mjs"
|
|
58
|
-
|
|
59
|
-
export * from "./helpers/propMapper.mjs"
|
|
60
|
-
|
|
61
|
-
export * from "./helpers/proxyThemeToParents.mjs"
|
|
62
|
-
|
|
63
|
-
export * from "./helpers/themeRef.mjs"
|
|
64
|
-
|
|
65
|
-
export * from "./helpers/themeable.mjs"
|
|
66
|
-
|
|
67
|
-
export * from "./helpers/themes.mjs"
|
|
68
|
-
|
|
69
|
-
export * from "./helpers/transformsToString.mjs"
|
|
70
|
-
|
|
71
|
-
export * from "./helpers/wrapStyleTags.mjs"
|
|
72
|
-
|
|
73
|
-
export * from "./createFont.mjs"
|
|
74
|
-
|
|
75
|
-
export * from "./eventDetails.mjs"
|
|
76
|
-
|
|
77
|
-
export * from "./createStyledHOC.mjs"
|
|
78
|
-
|
|
79
|
-
export * from "./createShorthands.mjs"
|
|
80
|
-
|
|
81
|
-
export * from "./createTamagui.mjs"
|
|
82
|
-
|
|
83
|
-
export * from "./createTokens.mjs"
|
|
84
|
-
|
|
85
|
-
export * from "./createVariable.mjs"
|
|
86
|
-
|
|
87
|
-
export * from "./createVariables.mjs"
|
|
88
|
-
|
|
89
|
-
export * from "./insertFont.mjs"
|
|
90
|
-
|
|
91
|
-
export * from "./setupReactNative.mjs"
|
|
92
|
-
|
|
93
|
-
export * from "./styled.mjs"
|
|
94
|
-
|
|
95
|
-
export * from "./Tamagui.mjs"
|
|
96
|
-
|
|
97
|
-
export * from "./interfaces/GetRef.mjs"
|
|
98
|
-
|
|
99
|
-
export * from "@tamagui/compose-refs"
|
|
100
|
-
|
|
101
|
-
export * from "./constants/constants.mjs"
|
|
102
|
-
|
|
103
|
-
export * from "./hooks/useIsTouchDevice.mjs"
|
|
104
|
-
|
|
105
|
-
export * from "./hooks/useAnimationDriver.mjs"
|
|
106
|
-
|
|
107
|
-
export * from "./hooks/useProps.mjs"
|
|
108
|
-
|
|
109
|
-
export * from "./hooks/useTheme.mjs"
|
|
110
|
-
|
|
111
|
-
export * from "./hooks/usePortalThemeState.mjs"
|
|
112
|
-
|
|
113
|
-
export * from "./hooks/useThemeName.mjs"
|
|
114
|
-
|
|
115
|
-
export * from "./dom/html.mjs"
|
|
116
|
-
|
|
117
|
-
export * from "./views/Configuration.mjs"
|
|
118
|
-
|
|
119
|
-
export * from "./views/TamaguiRoot.mjs"
|
|
120
|
-
|
|
121
|
-
export * from "./views/FontLanguage.mjs"
|
|
122
|
-
|
|
123
|
-
export * from "./views/Slot.mjs"
|
|
124
|
-
|
|
125
|
-
export * from "./views/TamaguiProvider.mjs"
|
|
126
|
-
|
|
127
|
-
export * from "./views/Text.mjs"
|
|
128
|
-
|
|
129
|
-
export * from "./views/Theme.mjs"
|
|
130
|
-
|
|
131
|
-
export * from "./views/ThemeProvider.mjs"
|
|
132
|
-
|
|
133
|
-
export * from "./views/View.mjs"
|
|
134
|
-
|
|
135
|
-
export * from "@tamagui/constants"
|
|
136
|
-
|
|
137
|
-
export * from "@tamagui/helpers"
|
|
138
|
-
|
|
139
|
-
export * from "@tamagui/use-did-finish-ssr"
|
|
140
|
-
|
|
141
|
-
export * from "@tamagui/use-event"
|
|
142
|
-
|
|
143
|
-
export * from "./setupHooks.mjs"
|
|
144
|
-
|
|
145
|
-
export { _disableMediaTouch, _mediaListenerStats, autoVariables, configureMedia, createRefComponent, forceUpdateThemes, getAutoVariableCSS, getConfig, getMedia, getMutatedAutoVariableCSS, getNativeStyleEngine, getSetting, getStyleCompat, getThemeProviderChainSizes, getThemes, getToken, getTokenValue, getTokens, insertStyleRules, loadAnimationDriver, mediaKeyMatch, mediaObjectToString, mediaQueryConfig, mediaState, mutatedAutoVariables, removeNativeStyleScope, resolveThemeName, setConfig, setMediaState, setNativeStyleEngine, setNativeStyleEngineFlushListener, setNonce, setupDev, updateConfig, updateMediaListeners, updateNativeStyleScope, useMedia };
|
|
49
|
+
import { html } from "./dom/html.mjs";
|
|
50
|
+
import { Configuration } from "./views/Configuration.mjs";
|
|
51
|
+
import { TamaguiRoot } from "./views/TamaguiRoot.mjs";
|
|
52
|
+
import { FontLanguage } from "./views/FontLanguage.mjs";
|
|
53
|
+
import { Slot, Slottable } from "./views/Slot.mjs";
|
|
54
|
+
import { TamaguiProvider } from "./views/TamaguiProvider.mjs";
|
|
55
|
+
import { Text, textStaticConfig } from "./views/Text.mjs";
|
|
56
|
+
import { Theme } from "./views/Theme.mjs";
|
|
57
|
+
import { ThemeProvider } from "./views/ThemeProvider.mjs";
|
|
58
|
+
import { View, viewStaticConfig } from "./views/View.mjs";
|
|
59
|
+
import { currentPlatform, getPlatformDriver, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, setupPlatformDriver, supportsDynamicColorIOS, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
60
|
+
import { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, StyleObjectRules, StyleObjectValue, clamp, composeEventHandlers, cssShorthandLonghands, getThemeClassNames, nonAnimatableStyleProps, nonAnimatableWebTextProps, nonAnimatableWebViewProps, reservedThemeProps, shouldRenderNativePlatform, simpleHash, stylePropsAll, stylePropsText, stylePropsTextOnly, stylePropsTransform, stylePropsUnitless, stylePropsView, tokenCategories, validStyles, webOnlyStylePropsText, webOnlyStylePropsView, withStaticProperties } from "@tamagui/helpers";
|
|
61
|
+
import { ClientOnly, ClientOnlyContext, useClientValue, useDidFinishSSR, useIsClientOnly } from "@tamagui/use-did-finish-ssr";
|
|
62
|
+
import { useEvent, useGet } from "@tamagui/use-event";
|
|
63
|
+
import { hooks, setupHooks } from "./setupHooks.mjs";
|
|
64
|
+
|
|
65
|
+
export { ClientOnly, ClientOnlyContext, ComponentContext, Configuration, FontLanguage, GroupContext, Slot, Slottable, StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, StyleObjectRules, StyleObjectValue, Tamagui, TamaguiProvider, TamaguiRoot, Text, Theme, ThemeProvider, View, _disableMediaTouch, _mediaListenerStats, _withNativeStyle, _withStableStyle, autoVariables, clamp, composeEventHandlers, composeRefs, configureMedia, containsThemeRef, createCSSVariable, createChangeEventDetails, createComponent, createFont, createRefComponent, createShorthands, createStyledContext, createStyledHOC, createTamagui, createTokens, createVariable, createVariantResolver, cssShorthandLonghands, currentPlatform, forceUpdateThemes, formatDiagnostic, getAutoVariableCSS, getCSSStylesAtomic, getConfig, getDefaultProps, getExpandedShorthand, getMedia, getMutatedAutoVariableCSS, getNativeStyleEngine, getPlatformDriver, getSetting, getSplitStyles, getStyleCompat, getStyleTags, getThemeClassNames, getThemeProviderChainSizes, getThemes, getToken, getTokenValue, getTokens, getVariable, getVariableName, getVariableValue, getVariableVariable, hooks, html, insertFont, insertStyleRules, installTamaguiConfig, isAndroid, isBrowser, isChrome, isClient, isEqualShallow, isIos, isNativeDesktop, isServer, isTV, isTamaguiComponent, isTamaguiElement, isTouchable, isValidStyleKey, isVariable, isWeb, isWebTouchable, loadAnimationDriver, matchMedia, mediaKeyMatch, mediaObjectToString, mediaQueryConfig, mediaState, mergeIfNotShallowEqual, mergeProps, mergeSlotStyleProps, mutatedAutoVariables, nonAnimatableStyleProps, nonAnimatableWebTextProps, nonAnimatableWebViewProps, normalizeColor, normalizeStyle, prepareStyleStaticConfig, px, removeNativeStyleScope, reservedThemeProps, resolveThemeName, setConfig, setMediaState, setNativeStyleEngine, setNativeStyleEngineFlushListener, setNonce, setRef, setupDev, setupHooks, setupMatchMedia, setupPlatformDriver, shouldRenderNativePlatform, simpleHash, stylePropsAll, stylePropsText, stylePropsTextOnly, stylePropsTransform, stylePropsUnitless, stylePropsView, styled, supportsDynamicColorIOS, textStaticConfig, themeRefKey, themeable, tokenCategories, updateConfig, updateFont, updateMediaListeners, updateNativeStyleScope, useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle, useAnimatedNumbersStyle, useAnimationDriver, useClientValue, useComposedRefs, useConfiguration, useCreateShallowSetState, useDidFinishSSR, useEvent, useGet, useIsClientOnly, useIsTouchDevice, useIsomorphicLayoutEffect, useMedia, usePortalThemeState, useProps, usePropsAndStyle, useStyle, useTheme, useThemeName, validStyles, variableToString, viewStaticConfig, webOnlyStylePropsText, webOnlyStylePropsView, withStaticProperties };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,145 +1,65 @@
|
|
|
1
|
+
import { ComponentContext, useConfiguration } from "./contexts/ComponentContext.mjs";
|
|
2
|
+
import { GroupContext } from "./contexts/GroupContext.mjs";
|
|
3
|
+
import { isEqualShallow, mergeIfNotShallowEqual, useCreateShallowSetState } from "@tamagui/is-equal-shallow";
|
|
4
|
+
import { _withStableStyle } from "./_withStableStyle.mjs";
|
|
5
|
+
import { _withNativeStyle } from "./_withNativeStyle.mjs";
|
|
6
|
+
import { createComponent } from "./createComponent.mjs";
|
|
7
|
+
import { createStyledContext } from "./helpers/createStyledContext.mjs";
|
|
8
|
+
import { getDefaultProps } from "./helpers/getDefaultProps.mjs";
|
|
9
|
+
import { getCSSStylesAtomic } from "./helpers/getCSSStylesAtomic.mjs";
|
|
10
|
+
import { getExpandedShorthand } from "./helpers/getExpandedShorthands.mjs";
|
|
11
|
+
import { formatDiagnostic } from "./helpers/formatDiagnostic.mjs";
|
|
12
|
+
import { getSplitStyles, isValidStyleKey, prepareStyleStaticConfig } from "./helpers/getSplitStyles.mjs";
|
|
1
13
|
import { getNativeStyleEngine, removeNativeStyleScope, setNativeStyleEngine, setNativeStyleEngineFlushListener, updateNativeStyleScope } from "./helpers/nativeStyleEngine.mjs";
|
|
2
14
|
import { autoVariables, getAutoVariableCSS, getMutatedAutoVariableCSS, mutatedAutoVariables } from "./helpers/registerCSSVariable.mjs";
|
|
3
15
|
import { insertStyleRules, setNonce } from "./helpers/insertStyleRule.mjs";
|
|
4
|
-
import {
|
|
16
|
+
import { isTamaguiComponent } from "./helpers/isTamaguiComponent.mjs";
|
|
17
|
+
import { isTamaguiElement } from "./helpers/isTamaguiElement.mjs";
|
|
18
|
+
import { matchMedia, setupMatchMedia } from "./helpers/matchMedia.mjs";
|
|
19
|
+
import { mergeProps } from "./helpers/mergeProps.mjs";
|
|
20
|
+
import { mergeSlotStyleProps } from "./helpers/mergeSlotStyleProps.mjs";
|
|
21
|
+
import { normalizeColor } from "./helpers/normalizeColor.mjs";
|
|
22
|
+
import { normalizeStyle } from "./helpers/normalizeStyle.mjs";
|
|
23
|
+
import { containsThemeRef, themeRefKey } from "./helpers/themeRef.mjs";
|
|
24
|
+
import { themeable } from "./helpers/themeable.mjs";
|
|
25
|
+
import { getStyleTags } from "./helpers/wrapStyleTags.mjs";
|
|
26
|
+
import { createFont } from "./createFont.mjs";
|
|
27
|
+
import { createChangeEventDetails } from "./eventDetails.mjs";
|
|
28
|
+
import { createStyledHOC } from "./createStyledHOC.mjs";
|
|
29
|
+
import { createShorthands } from "./createShorthands.mjs";
|
|
30
|
+
import { createTamagui, installTamaguiConfig } from "./createTamagui.mjs";
|
|
31
|
+
import { createTokens } from "./createTokens.mjs";
|
|
32
|
+
import { createCSSVariable, createVariable, getVariable, getVariableName, getVariableValue, getVariableVariable, isVariable, px, variableToString } from "./createVariable.mjs";
|
|
33
|
+
import { insertFont, updateFont } from "./insertFont.mjs";
|
|
34
|
+
import { styled } from "./styled.mjs";
|
|
35
|
+
import { Tamagui } from "./Tamagui.mjs";
|
|
36
|
+
import { createVariantResolver } from "./types.mjs";
|
|
37
|
+
import { composeRefs, createRefComponent, setRef, useComposedRefs } from "@tamagui/compose-refs";
|
|
5
38
|
import { getConfig, getSetting, getStyleCompat, getThemes, getToken, getTokenValue, getTokens, loadAnimationDriver, setConfig, setupDev, updateConfig } from "./config.mjs";
|
|
39
|
+
import { useIsTouchDevice } from "./hooks/useIsTouchDevice.mjs";
|
|
6
40
|
import { _disableMediaTouch, _mediaListenerStats, configureMedia, mediaKeyMatch, updateMediaListeners, useMedia } from "./hooks/useMedia.mjs";
|
|
7
41
|
import { mediaObjectToString } from "./helpers/mediaObjectToString.mjs";
|
|
8
42
|
import { getMedia, mediaQueryConfig, mediaState, setMediaState } from "./helpers/mediaState.mjs";
|
|
43
|
+
import { useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle, useAnimatedNumbersStyle, useAnimationDriver } from "./hooks/useAnimationDriver.mjs";
|
|
44
|
+
import { useProps, usePropsAndStyle, useStyle } from "./hooks/useProps.mjs";
|
|
45
|
+
import { useTheme } from "./hooks/useTheme.mjs";
|
|
46
|
+
import { usePortalThemeState } from "./hooks/usePortalThemeState.mjs";
|
|
47
|
+
import { useThemeName } from "./hooks/useThemeName.mjs";
|
|
9
48
|
import { forceUpdateThemes, getThemeProviderChainSizes, resolveThemeName } from "./hooks/useThemeState.mjs";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export * from "./helpers/expandStyles.mjs"
|
|
28
|
-
|
|
29
|
-
export * from "./helpers/getCSSStylesAtomic.mjs"
|
|
30
|
-
|
|
31
|
-
export * from "./helpers/getExpandedShorthands.mjs"
|
|
32
|
-
|
|
33
|
-
export * from "./helpers/formatDiagnostic.mjs"
|
|
34
|
-
|
|
35
|
-
export * from "./helpers/getShorthandValue.mjs"
|
|
36
|
-
|
|
37
|
-
export * from "./helpers/getSplitStyles.mjs"
|
|
38
|
-
|
|
39
|
-
export * from "./helpers/getThemeCSSRules.mjs"
|
|
40
|
-
|
|
41
|
-
export * from "./helpers/getVariantExtras.mjs"
|
|
42
|
-
|
|
43
|
-
export * from "./helpers/isTamaguiComponent.mjs"
|
|
44
|
-
|
|
45
|
-
export * from "./helpers/isTamaguiElement.mjs"
|
|
46
|
-
|
|
47
|
-
export * from "./helpers/matchMedia.mjs"
|
|
48
|
-
|
|
49
|
-
export * from "./helpers/mergeProps.mjs"
|
|
50
|
-
|
|
51
|
-
export * from "./helpers/mergeSlotStyleProps.mjs"
|
|
52
|
-
|
|
53
|
-
export * from "./helpers/normalizeColor.mjs"
|
|
54
|
-
|
|
55
|
-
export * from "./helpers/normalizeStyle.mjs"
|
|
56
|
-
|
|
57
|
-
export * from "./helpers/normalizeValueWithProperty.mjs"
|
|
58
|
-
|
|
59
|
-
export * from "./helpers/propMapper.mjs"
|
|
60
|
-
|
|
61
|
-
export * from "./helpers/proxyThemeToParents.mjs"
|
|
62
|
-
|
|
63
|
-
export * from "./helpers/themeRef.mjs"
|
|
64
|
-
|
|
65
|
-
export * from "./helpers/themeable.mjs"
|
|
66
|
-
|
|
67
|
-
export * from "./helpers/themes.mjs"
|
|
68
|
-
|
|
69
|
-
export * from "./helpers/transformsToString.mjs"
|
|
70
|
-
|
|
71
|
-
export * from "./helpers/wrapStyleTags.mjs"
|
|
72
|
-
|
|
73
|
-
export * from "./createFont.mjs"
|
|
74
|
-
|
|
75
|
-
export * from "./eventDetails.mjs"
|
|
76
|
-
|
|
77
|
-
export * from "./createStyledHOC.mjs"
|
|
78
|
-
|
|
79
|
-
export * from "./createShorthands.mjs"
|
|
80
|
-
|
|
81
|
-
export * from "./createTamagui.mjs"
|
|
82
|
-
|
|
83
|
-
export * from "./createTokens.mjs"
|
|
84
|
-
|
|
85
|
-
export * from "./createVariable.mjs"
|
|
86
|
-
|
|
87
|
-
export * from "./createVariables.mjs"
|
|
88
|
-
|
|
89
|
-
export * from "./insertFont.mjs"
|
|
90
|
-
|
|
91
|
-
export * from "./setupReactNative.mjs"
|
|
92
|
-
|
|
93
|
-
export * from "./styled.mjs"
|
|
94
|
-
|
|
95
|
-
export * from "./Tamagui.mjs"
|
|
96
|
-
|
|
97
|
-
export * from "./interfaces/GetRef.mjs"
|
|
98
|
-
|
|
99
|
-
export * from "@tamagui/compose-refs"
|
|
100
|
-
|
|
101
|
-
export * from "./constants/constants.mjs"
|
|
102
|
-
|
|
103
|
-
export * from "./hooks/useIsTouchDevice.mjs"
|
|
104
|
-
|
|
105
|
-
export * from "./hooks/useAnimationDriver.mjs"
|
|
106
|
-
|
|
107
|
-
export * from "./hooks/useProps.mjs"
|
|
108
|
-
|
|
109
|
-
export * from "./hooks/useTheme.mjs"
|
|
110
|
-
|
|
111
|
-
export * from "./hooks/usePortalThemeState.mjs"
|
|
112
|
-
|
|
113
|
-
export * from "./hooks/useThemeName.mjs"
|
|
114
|
-
|
|
115
|
-
export * from "./dom/html.mjs"
|
|
116
|
-
|
|
117
|
-
export * from "./views/Configuration.mjs"
|
|
118
|
-
|
|
119
|
-
export * from "./views/TamaguiRoot.mjs"
|
|
120
|
-
|
|
121
|
-
export * from "./views/FontLanguage.mjs"
|
|
122
|
-
|
|
123
|
-
export * from "./views/Slot.mjs"
|
|
124
|
-
|
|
125
|
-
export * from "./views/TamaguiProvider.mjs"
|
|
126
|
-
|
|
127
|
-
export * from "./views/Text.mjs"
|
|
128
|
-
|
|
129
|
-
export * from "./views/Theme.mjs"
|
|
130
|
-
|
|
131
|
-
export * from "./views/ThemeProvider.mjs"
|
|
132
|
-
|
|
133
|
-
export * from "./views/View.mjs"
|
|
134
|
-
|
|
135
|
-
export * from "@tamagui/constants"
|
|
136
|
-
|
|
137
|
-
export * from "@tamagui/helpers"
|
|
138
|
-
|
|
139
|
-
export * from "@tamagui/use-did-finish-ssr"
|
|
140
|
-
|
|
141
|
-
export * from "@tamagui/use-event"
|
|
142
|
-
|
|
143
|
-
export * from "./setupHooks.mjs"
|
|
144
|
-
|
|
145
|
-
export { _disableMediaTouch, _mediaListenerStats, autoVariables, configureMedia, createRefComponent, forceUpdateThemes, getAutoVariableCSS, getConfig, getMedia, getMutatedAutoVariableCSS, getNativeStyleEngine, getSetting, getStyleCompat, getThemeProviderChainSizes, getThemes, getToken, getTokenValue, getTokens, insertStyleRules, loadAnimationDriver, mediaKeyMatch, mediaObjectToString, mediaQueryConfig, mediaState, mutatedAutoVariables, removeNativeStyleScope, resolveThemeName, setConfig, setMediaState, setNativeStyleEngine, setNativeStyleEngineFlushListener, setNonce, setupDev, updateConfig, updateMediaListeners, updateNativeStyleScope, useMedia };
|
|
49
|
+
import { html } from "./dom/html.mjs";
|
|
50
|
+
import { Configuration } from "./views/Configuration.mjs";
|
|
51
|
+
import { TamaguiRoot } from "./views/TamaguiRoot.mjs";
|
|
52
|
+
import { FontLanguage } from "./views/FontLanguage.mjs";
|
|
53
|
+
import { Slot, Slottable } from "./views/Slot.mjs";
|
|
54
|
+
import { TamaguiProvider } from "./views/TamaguiProvider.mjs";
|
|
55
|
+
import { Text, textStaticConfig } from "./views/Text.mjs";
|
|
56
|
+
import { Theme } from "./views/Theme.mjs";
|
|
57
|
+
import { ThemeProvider } from "./views/ThemeProvider.mjs";
|
|
58
|
+
import { View, viewStaticConfig } from "./views/View.mjs";
|
|
59
|
+
import { currentPlatform, getPlatformDriver, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, setupPlatformDriver, supportsDynamicColorIOS, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
60
|
+
import { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, StyleObjectRules, StyleObjectValue, clamp, composeEventHandlers, cssShorthandLonghands, getThemeClassNames, nonAnimatableStyleProps, nonAnimatableWebTextProps, nonAnimatableWebViewProps, reservedThemeProps, shouldRenderNativePlatform, simpleHash, stylePropsAll, stylePropsText, stylePropsTextOnly, stylePropsTransform, stylePropsUnitless, stylePropsView, tokenCategories, validStyles, webOnlyStylePropsText, webOnlyStylePropsView, withStaticProperties } from "@tamagui/helpers";
|
|
61
|
+
import { ClientOnly, ClientOnlyContext, useClientValue, useDidFinishSSR, useIsClientOnly } from "@tamagui/use-did-finish-ssr";
|
|
62
|
+
import { useEvent, useGet } from "@tamagui/use-event";
|
|
63
|
+
import { hooks, setupHooks } from "./setupHooks.mjs";
|
|
64
|
+
|
|
65
|
+
export { ClientOnly, ClientOnlyContext, ComponentContext, Configuration, FontLanguage, GroupContext, Slot, Slottable, StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, StyleObjectRules, StyleObjectValue, Tamagui, TamaguiProvider, TamaguiRoot, Text, Theme, ThemeProvider, View, _disableMediaTouch, _mediaListenerStats, _withNativeStyle, _withStableStyle, autoVariables, clamp, composeEventHandlers, composeRefs, configureMedia, containsThemeRef, createCSSVariable, createChangeEventDetails, createComponent, createFont, createRefComponent, createShorthands, createStyledContext, createStyledHOC, createTamagui, createTokens, createVariable, createVariantResolver, cssShorthandLonghands, currentPlatform, forceUpdateThemes, formatDiagnostic, getAutoVariableCSS, getCSSStylesAtomic, getConfig, getDefaultProps, getExpandedShorthand, getMedia, getMutatedAutoVariableCSS, getNativeStyleEngine, getPlatformDriver, getSetting, getSplitStyles, getStyleCompat, getStyleTags, getThemeClassNames, getThemeProviderChainSizes, getThemes, getToken, getTokenValue, getTokens, getVariable, getVariableName, getVariableValue, getVariableVariable, hooks, html, insertFont, insertStyleRules, installTamaguiConfig, isAndroid, isBrowser, isChrome, isClient, isEqualShallow, isIos, isNativeDesktop, isServer, isTV, isTamaguiComponent, isTamaguiElement, isTouchable, isValidStyleKey, isVariable, isWeb, isWebTouchable, loadAnimationDriver, matchMedia, mediaKeyMatch, mediaObjectToString, mediaQueryConfig, mediaState, mergeIfNotShallowEqual, mergeProps, mergeSlotStyleProps, mutatedAutoVariables, nonAnimatableStyleProps, nonAnimatableWebTextProps, nonAnimatableWebViewProps, normalizeColor, normalizeStyle, prepareStyleStaticConfig, px, removeNativeStyleScope, reservedThemeProps, resolveThemeName, setConfig, setMediaState, setNativeStyleEngine, setNativeStyleEngineFlushListener, setNonce, setRef, setupDev, setupHooks, setupMatchMedia, setupPlatformDriver, shouldRenderNativePlatform, simpleHash, stylePropsAll, stylePropsText, stylePropsTextOnly, stylePropsTransform, stylePropsUnitless, stylePropsView, styled, supportsDynamicColorIOS, textStaticConfig, themeRefKey, themeable, tokenCategories, updateConfig, updateFont, updateMediaListeners, updateNativeStyleScope, useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle, useAnimatedNumbersStyle, useAnimationDriver, useClientValue, useComposedRefs, useConfiguration, useCreateShallowSetState, useDidFinishSSR, useEvent, useGet, useIsClientOnly, useIsTouchDevice, useIsomorphicLayoutEffect, useMedia, usePortalThemeState, useProps, usePropsAndStyle, useStyle, useTheme, useThemeName, validStyles, variableToString, viewStaticConfig, webOnlyStylePropsText, webOnlyStylePropsView, withStaticProperties };
|