@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/dist/esm/index.native.js
CHANGED
|
@@ -1,145 +1,65 @@
|
|
|
1
|
+
import { ComponentContext, useConfiguration } from "./contexts/ComponentContext.native.js";
|
|
2
|
+
import { GroupContext } from "./contexts/GroupContext.native.js";
|
|
3
|
+
import { isEqualShallow, mergeIfNotShallowEqual, useCreateShallowSetState } from "@tamagui/is-equal-shallow";
|
|
4
|
+
import { _withStableStyle } from "./_withStableStyle.native.js";
|
|
5
|
+
import { _withNativeStyle } from "./_withNativeStyle.native.js";
|
|
6
|
+
import { createComponent } from "./createComponent.native.js";
|
|
7
|
+
import { createStyledContext } from "./helpers/createStyledContext.native.js";
|
|
8
|
+
import { getDefaultProps } from "./helpers/getDefaultProps.native.js";
|
|
9
|
+
import { getCSSStylesAtomic } from "./helpers/getCSSStylesAtomic.native.js";
|
|
10
|
+
import { getExpandedShorthand } from "./helpers/getExpandedShorthands.native.js";
|
|
11
|
+
import { formatDiagnostic } from "./helpers/formatDiagnostic.native.js";
|
|
12
|
+
import { getSplitStyles, isValidStyleKey, prepareStyleStaticConfig } from "./helpers/getSplitStyles.native.js";
|
|
1
13
|
import { getNativeStyleEngine, removeNativeStyleScope, setNativeStyleEngine, setNativeStyleEngineFlushListener, updateNativeStyleScope } from "./helpers/nativeStyleEngine.native.js";
|
|
2
14
|
import { autoVariables, getAutoVariableCSS, getMutatedAutoVariableCSS, mutatedAutoVariables } from "./helpers/registerCSSVariable.native.js";
|
|
3
15
|
import { insertStyleRules, setNonce } from "./helpers/insertStyleRule.native.js";
|
|
4
|
-
import {
|
|
16
|
+
import { isTamaguiComponent } from "./helpers/isTamaguiComponent.native.js";
|
|
17
|
+
import { isTamaguiElement } from "./helpers/isTamaguiElement.native.js";
|
|
18
|
+
import { matchMedia, setupMatchMedia } from "./helpers/matchMedia.native.js";
|
|
19
|
+
import { mergeProps } from "./helpers/mergeProps.native.js";
|
|
20
|
+
import { mergeSlotStyleProps } from "./helpers/mergeSlotStyleProps.native.js";
|
|
21
|
+
import { normalizeColor } from "./helpers/normalizeColor.native.js";
|
|
22
|
+
import { normalizeStyle } from "./helpers/normalizeStyle.native.js";
|
|
23
|
+
import { containsThemeRef, themeRefKey } from "./helpers/themeRef.native.js";
|
|
24
|
+
import { themeable } from "./helpers/themeable.native.js";
|
|
25
|
+
import { getStyleTags } from "./helpers/wrapStyleTags.native.js";
|
|
26
|
+
import { createFont } from "./createFont.native.js";
|
|
27
|
+
import { createChangeEventDetails } from "./eventDetails.native.js";
|
|
28
|
+
import { createStyledHOC } from "./createStyledHOC.native.js";
|
|
29
|
+
import { createShorthands } from "./createShorthands.native.js";
|
|
30
|
+
import { createTamagui, installTamaguiConfig } from "./createTamagui.native.js";
|
|
31
|
+
import { createTokens } from "./createTokens.native.js";
|
|
32
|
+
import { createCSSVariable, createVariable, getVariable, getVariableName, getVariableValue, getVariableVariable, isVariable, px, variableToString } from "./createVariable.native.js";
|
|
33
|
+
import { insertFont, updateFont } from "./insertFont.native.js";
|
|
34
|
+
import { styled } from "./styled.native.js";
|
|
35
|
+
import { Tamagui } from "./Tamagui.native.js";
|
|
36
|
+
import { createVariantResolver } from "./types.native.js";
|
|
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.native.js";
|
|
39
|
+
import { useIsTouchDevice } from "./hooks/useIsTouchDevice.native.js";
|
|
6
40
|
import { _disableMediaTouch, _mediaListenerStats, configureMedia, mediaKeyMatch, updateMediaListeners, useMedia } from "./hooks/useMedia.native.js";
|
|
7
41
|
import { mediaObjectToString } from "./helpers/mediaObjectToString.native.js";
|
|
8
42
|
import { getMedia, mediaQueryConfig, mediaState, setMediaState } from "./helpers/mediaState.native.js";
|
|
43
|
+
import { useAnimatedNumber, useAnimatedNumberReaction, useAnimatedNumberStyle, useAnimatedNumbersStyle, useAnimationDriver } from "./hooks/useAnimationDriver.native.js";
|
|
44
|
+
import { useProps, usePropsAndStyle, useStyle } from "./hooks/useProps.native.js";
|
|
45
|
+
import { useTheme } from "./hooks/useTheme.native.js";
|
|
46
|
+
import { usePortalThemeState } from "./hooks/usePortalThemeState.native.js";
|
|
47
|
+
import { useThemeName } from "./hooks/useThemeName.native.js";
|
|
9
48
|
import { forceUpdateThemes, getThemeProviderChainSizes, resolveThemeName } from "./hooks/useThemeState.native.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export * from "./helpers/expandStyles.native.js"
|
|
28
|
-
|
|
29
|
-
export * from "./helpers/getCSSStylesAtomic.native.js"
|
|
30
|
-
|
|
31
|
-
export * from "./helpers/getExpandedShorthands.native.js"
|
|
32
|
-
|
|
33
|
-
export * from "./helpers/formatDiagnostic.native.js"
|
|
34
|
-
|
|
35
|
-
export * from "./helpers/getShorthandValue.native.js"
|
|
36
|
-
|
|
37
|
-
export * from "./helpers/getSplitStyles.native.js"
|
|
38
|
-
|
|
39
|
-
export * from "./helpers/getThemeCSSRules.native.js"
|
|
40
|
-
|
|
41
|
-
export * from "./helpers/getVariantExtras.native.js"
|
|
42
|
-
|
|
43
|
-
export * from "./helpers/isTamaguiComponent.native.js"
|
|
44
|
-
|
|
45
|
-
export * from "./helpers/isTamaguiElement.native.js"
|
|
46
|
-
|
|
47
|
-
export * from "./helpers/matchMedia.native.js"
|
|
48
|
-
|
|
49
|
-
export * from "./helpers/mergeProps.native.js"
|
|
50
|
-
|
|
51
|
-
export * from "./helpers/mergeSlotStyleProps.native.js"
|
|
52
|
-
|
|
53
|
-
export * from "./helpers/normalizeColor.native.js"
|
|
54
|
-
|
|
55
|
-
export * from "./helpers/normalizeStyle.native.js"
|
|
56
|
-
|
|
57
|
-
export * from "./helpers/normalizeValueWithProperty.native.js"
|
|
58
|
-
|
|
59
|
-
export * from "./helpers/propMapper.native.js"
|
|
60
|
-
|
|
61
|
-
export * from "./helpers/proxyThemeToParents.native.js"
|
|
62
|
-
|
|
63
|
-
export * from "./helpers/themeRef.native.js"
|
|
64
|
-
|
|
65
|
-
export * from "./helpers/themeable.native.js"
|
|
66
|
-
|
|
67
|
-
export * from "./helpers/themes.native.js"
|
|
68
|
-
|
|
69
|
-
export * from "./helpers/transformsToString.native.js"
|
|
70
|
-
|
|
71
|
-
export * from "./helpers/wrapStyleTags.native.js"
|
|
72
|
-
|
|
73
|
-
export * from "./createFont.native.js"
|
|
74
|
-
|
|
75
|
-
export * from "./eventDetails.native.js"
|
|
76
|
-
|
|
77
|
-
export * from "./createStyledHOC.native.js"
|
|
78
|
-
|
|
79
|
-
export * from "./createShorthands.native.js"
|
|
80
|
-
|
|
81
|
-
export * from "./createTamagui.native.js"
|
|
82
|
-
|
|
83
|
-
export * from "./createTokens.native.js"
|
|
84
|
-
|
|
85
|
-
export * from "./createVariable.native.js"
|
|
86
|
-
|
|
87
|
-
export * from "./createVariables.native.js"
|
|
88
|
-
|
|
89
|
-
export * from "./insertFont.native.js"
|
|
90
|
-
|
|
91
|
-
export * from "./setupReactNative.native.js"
|
|
92
|
-
|
|
93
|
-
export * from "./styled.native.js"
|
|
94
|
-
|
|
95
|
-
export * from "./Tamagui.native.js"
|
|
96
|
-
|
|
97
|
-
export * from "./interfaces/GetRef.native.js"
|
|
98
|
-
|
|
99
|
-
export * from "@tamagui/compose-refs"
|
|
100
|
-
|
|
101
|
-
export * from "./constants/constants.native.js"
|
|
102
|
-
|
|
103
|
-
export * from "./hooks/useIsTouchDevice.native.js"
|
|
104
|
-
|
|
105
|
-
export * from "./hooks/useAnimationDriver.native.js"
|
|
106
|
-
|
|
107
|
-
export * from "./hooks/useProps.native.js"
|
|
108
|
-
|
|
109
|
-
export * from "./hooks/useTheme.native.js"
|
|
110
|
-
|
|
111
|
-
export * from "./hooks/usePortalThemeState.native.js"
|
|
112
|
-
|
|
113
|
-
export * from "./hooks/useThemeName.native.js"
|
|
114
|
-
|
|
115
|
-
export * from "./dom/html.native.js"
|
|
116
|
-
|
|
117
|
-
export * from "./views/Configuration.native.js"
|
|
118
|
-
|
|
119
|
-
export * from "./views/TamaguiRoot.native.js"
|
|
120
|
-
|
|
121
|
-
export * from "./views/FontLanguage.native.js"
|
|
122
|
-
|
|
123
|
-
export * from "./views/Slot.native.js"
|
|
124
|
-
|
|
125
|
-
export * from "./views/TamaguiProvider.native.js"
|
|
126
|
-
|
|
127
|
-
export * from "./views/Text.native.js"
|
|
128
|
-
|
|
129
|
-
export * from "./views/Theme.native.js"
|
|
130
|
-
|
|
131
|
-
export * from "./views/ThemeProvider.native.js"
|
|
132
|
-
|
|
133
|
-
export * from "./views/View.native.js"
|
|
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.native.js"
|
|
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.native.js";
|
|
50
|
+
import { Configuration } from "./views/Configuration.native.js";
|
|
51
|
+
import { TamaguiRoot } from "./views/TamaguiRoot.native.js";
|
|
52
|
+
import { FontLanguage } from "./views/FontLanguage.native.js";
|
|
53
|
+
import { Slot, Slottable } from "./views/Slot.native.js";
|
|
54
|
+
import { TamaguiProvider } from "./views/TamaguiProvider.native.js";
|
|
55
|
+
import { Text, textStaticConfig } from "./views/Text.native.js";
|
|
56
|
+
import { Theme } from "./views/Theme.native.js";
|
|
57
|
+
import { ThemeProvider } from "./views/ThemeProvider.native.js";
|
|
58
|
+
import { View, viewStaticConfig } from "./views/View.native.js";
|
|
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.native.js";
|
|
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/insertFont.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariabl
|
|
|
7
7
|
function insertFont(name, fontIn) {
|
|
8
8
|
const tokened = createVariables(createFont(fontIn), name);
|
|
9
9
|
const parsed = parseFont(tokened);
|
|
10
|
-
if (typeof document !== "undefined") {
|
|
10
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS && typeof document !== "undefined") {
|
|
11
11
|
const fontVars = registerFontVariables(parsed);
|
|
12
12
|
const styleElement = document.querySelector(`style[${FONT_DATA_ATTRIBUTE_NAME}="${name}"]`) || document.createElement("style");
|
|
13
13
|
styleElement.innerText = `:root .font_${name} {${fontVars.join(";")}}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertFont.js","names":[],"sources":["esm/insertFont.js"],"sourcesContent":["import { setConfigFont } from \"./config\";\nimport { FONT_DATA_ATTRIBUTE_NAME } from \"./constants/constants\";\nimport { createFont } from \"./createFont\";\nimport { createVariables } from \"./createVariables\";\nimport { registerCSSVariable, variableToCSS } from \"./helpers/registerCSSVariable\";\n\nfunction insertFont(name, fontIn) {\n\tconst tokened = createVariables(createFont(fontIn), name);\n\tconst parsed = parseFont(tokened);\n\tif (typeof document !== \"undefined\") {\n\t\tconst fontVars = registerFontVariables(parsed);\n\t\tconst styleElement = document.querySelector(`style[${FONT_DATA_ATTRIBUTE_NAME}=\"${name}\"]`) || document.createElement(\"style\");\n\t\tstyleElement.innerText = `:root .font_${name} {${fontVars.join(\";\")}}`;\n\t\tstyleElement.setAttribute(FONT_DATA_ATTRIBUTE_NAME, name);\n\t\tdocument.head.appendChild(styleElement);\n\t}\n\tsetConfigFont(name, tokened, parsed);\n\treturn parsed;\n}\nconst updateFont = insertFont;\nfunction parseFont(definition) {\n\tconst parsed = {};\n\tfor (const attrKey in definition) {\n\t\tconst attr = definition[attrKey];\n\t\tif (attrKey === \"family\" || attrKey === \"face\") parsed[attrKey] = attr;\n\t\telse {\n\t\t\tparsed[attrKey] = {};\n\t\t\tfor (const key in attr) {\n\t\t\t\tlet val = attr[key];\n\t\t\t\tif (attrKey === \"color\" && typeof val.val === \"string\") val = val.val;\n\t\t\t\tparsed[attrKey][key] = val;\n\t\t\t}\n\t\t}\n\t}\n\treturn parsed;\n}\nfunction registerFontVariables(parsedFont) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst response = [];\n\t\tfor (const fkey in parsedFont) {\n\t\t\tif (fkey === \"face\") continue;\n\t\t\tif (fkey === \"family\") {\n\t\t\t\tconst val = parsedFont[fkey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t} else for (const fskey in parsedFont[fkey]) if (typeof parsedFont[fkey][fskey] === \"string\") {} else {\n\t\t\t\tconst val = parsedFont[fkey][fskey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\treturn [];\n}\n\nexport { insertFont, parseFont, registerFontVariables, updateFont };"],"mappings":";;;;;;;AAMA,SAAS,WAAW,MAAM,QAAQ;CACjC,MAAM,UAAU,gBAAgB,WAAW,MAAM,GAAG,IAAI;CACxD,MAAM,SAAS,UAAU,OAAO;CAChC,IAAI,OAAO,aAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"insertFont.js","names":[],"sources":["esm/insertFont.js"],"sourcesContent":["import { setConfigFont } from \"./config\";\nimport { FONT_DATA_ATTRIBUTE_NAME } from \"./constants/constants\";\nimport { createFont } from \"./createFont\";\nimport { createVariables } from \"./createVariables\";\nimport { registerCSSVariable, variableToCSS } from \"./helpers/registerCSSVariable\";\n\nfunction insertFont(name, fontIn) {\n\tconst tokened = createVariables(createFont(fontIn), name);\n\tconst parsed = parseFont(tokened);\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && typeof document !== \"undefined\") {\n\t\tconst fontVars = registerFontVariables(parsed);\n\t\tconst styleElement = document.querySelector(`style[${FONT_DATA_ATTRIBUTE_NAME}=\"${name}\"]`) || document.createElement(\"style\");\n\t\tstyleElement.innerText = `:root .font_${name} {${fontVars.join(\";\")}}`;\n\t\tstyleElement.setAttribute(FONT_DATA_ATTRIBUTE_NAME, name);\n\t\tdocument.head.appendChild(styleElement);\n\t}\n\tsetConfigFont(name, tokened, parsed);\n\treturn parsed;\n}\nconst updateFont = insertFont;\nfunction parseFont(definition) {\n\tconst parsed = {};\n\tfor (const attrKey in definition) {\n\t\tconst attr = definition[attrKey];\n\t\tif (attrKey === \"family\" || attrKey === \"face\") parsed[attrKey] = attr;\n\t\telse {\n\t\t\tparsed[attrKey] = {};\n\t\t\tfor (const key in attr) {\n\t\t\t\tlet val = attr[key];\n\t\t\t\tif (attrKey === \"color\" && typeof val.val === \"string\") val = val.val;\n\t\t\t\tparsed[attrKey][key] = val;\n\t\t\t}\n\t\t}\n\t}\n\treturn parsed;\n}\nfunction registerFontVariables(parsedFont) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst response = [];\n\t\tfor (const fkey in parsedFont) {\n\t\t\tif (fkey === \"face\") continue;\n\t\t\tif (fkey === \"family\") {\n\t\t\t\tconst val = parsedFont[fkey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t} else for (const fskey in parsedFont[fkey]) if (typeof parsedFont[fkey][fskey] === \"string\") {} else {\n\t\t\t\tconst val = parsedFont[fkey][fskey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\treturn [];\n}\n\nexport { insertFont, parseFont, registerFontVariables, updateFont };"],"mappings":";;;;;;;AAMA,SAAS,WAAW,MAAM,QAAQ;CACjC,MAAM,UAAU,gBAAgB,WAAW,MAAM,GAAG,IAAI;CACxD,MAAM,SAAS,UAAU,OAAO;CAChC,IAAI,CAAC,QAAQ,IAAI,0BAA0B,OAAO,aAAa,aAAa;EAC3E,MAAM,WAAW,sBAAsB,MAAM;EAC7C,MAAM,eAAe,SAAS,cAAc,SAAS,yBAAyB,IAAI,KAAK,GAAG,KAAK,SAAS,cAAc,OAAO;EAC7H,aAAa,YAAY,eAAe,KAAK,IAAI,SAAS,KAAK,GAAG,EAAE;EACpE,aAAa,aAAa,0BAA0B,IAAI;EACxD,SAAS,KAAK,YAAY,YAAY;CACvC;CACA,cAAc,MAAM,SAAS,MAAM;CACnC,OAAO;AACR;AACA,MAAM,aAAa;AACnB,SAAS,UAAU,YAAY;CAC9B,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,WAAW,YAAY;EACjC,MAAM,OAAO,WAAW;EACxB,IAAI,YAAY,YAAY,YAAY,QAAQ,OAAO,WAAW;OAC7D;GACJ,OAAO,WAAW,CAAC;GACnB,KAAK,MAAM,OAAO,MAAM;IACvB,IAAI,MAAM,KAAK;IACf,IAAI,YAAY,WAAW,OAAO,IAAI,QAAQ,UAAU,MAAM,IAAI;IAClE,OAAO,QAAQ,CAAC,OAAO;GACxB;EACD;CACD;CACA,OAAO;AACR;AACA,SAAS,sBAAsB,YAAY;CAC1C,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,MAAM,WAAW,CAAC;EAClB,KAAK,MAAM,QAAQ,YAAY;GAC9B,IAAI,SAAS,QAAQ;GACrB,IAAI,SAAS,UAAU;IACtB,MAAM,MAAM,WAAW;IACvB,oBAAoB,GAAG;IACvB,SAAS,KAAK,cAAc,GAAG,CAAC;GACjC,OAAO,KAAK,MAAM,SAAS,WAAW,OAAO,IAAI,OAAO,WAAW,KAAK,CAAC,WAAW,UAAU,CAAC,OAAO;IACrG,MAAM,MAAM,WAAW,KAAK,CAAC;IAC7B,oBAAoB,GAAG;IACvB,SAAS,KAAK,cAAc,GAAG,CAAC;GACjC;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT"}
|
|
@@ -6,6 +6,7 @@ import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariabl
|
|
|
6
6
|
function insertFont(name, fontIn) {
|
|
7
7
|
var tokened = createVariables(createFont(fontIn), name);
|
|
8
8
|
var parsed = parseFont(tokened);
|
|
9
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
|
|
9
10
|
setConfigFont(name, tokened, parsed);
|
|
10
11
|
return parsed;
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertFont.native.js","names":[],"sources":["esm/insertFont.native.js"],"sourcesContent":["import { setConfigFont } from \"./config\";\nimport { createFont } from \"./createFont\";\nimport { createVariables } from \"./createVariables\";\nimport { registerCSSVariable, variableToCSS } from \"./helpers/registerCSSVariable\";\n\nfunction insertFont(name, fontIn) {\n\tvar tokened = createVariables(createFont(fontIn), name);\n\tvar parsed = parseFont(tokened);\n\tsetConfigFont(name, tokened, parsed);\n\treturn parsed;\n}\nvar updateFont = insertFont;\nfunction parseFont(definition) {\n\tvar parsed = {};\n\tfor (var attrKey in definition) {\n\t\tvar attr = definition[attrKey];\n\t\tif (attrKey === \"family\" || attrKey === \"face\") parsed[attrKey] = attr;\n\t\telse {\n\t\t\tparsed[attrKey] = {};\n\t\t\tfor (var key in attr) {\n\t\t\t\tvar val = attr[key];\n\t\t\t\tif (attrKey === \"color\" && typeof val.val === \"string\") val = val.val;\n\t\t\t\tparsed[attrKey][key] = val;\n\t\t\t}\n\t\t}\n\t}\n\treturn parsed;\n}\nfunction registerFontVariables(parsedFont) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar response = [];\n\t\tfor (var fkey in parsedFont) {\n\t\t\tif (fkey === \"face\") continue;\n\t\t\tif (fkey === \"family\") {\n\t\t\t\tvar val = parsedFont[fkey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t} else for (var fskey in parsedFont[fkey]) if (typeof parsedFont[fkey][fskey] === \"string\") {} else {\n\t\t\t\tvar val1 = parsedFont[fkey][fskey];\n\t\t\t\tregisterCSSVariable(val1);\n\t\t\t\tresponse.push(variableToCSS(val1));\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\treturn [];\n}\n\nexport { insertFont, parseFont, registerFontVariables, updateFont };"],"mappings":";;;;;;AAKA,SAAS,WAAW,MAAM,QAAQ;CACjC,IAAI,UAAU,gBAAgB,WAAW,MAAM,GAAG,IAAI;CACtD,IAAI,SAAS,UAAU,OAAO;CAC9B,cAAc,MAAM,SAAS,MAAM;CACnC,OAAO;AACR;AACA,IAAI,aAAa;AACjB,SAAS,UAAU,YAAY;CAC9B,IAAI,SAAS,CAAC;CACd,KAAK,IAAI,WAAW,YAAY;EAC/B,IAAI,OAAO,WAAW;EACtB,IAAI,YAAY,YAAY,YAAY,QAAQ,OAAO,WAAW;OAC7D;GACJ,OAAO,WAAW,CAAC;GACnB,KAAK,IAAI,OAAO,MAAM;IACrB,IAAI,MAAM,KAAK;IACf,IAAI,YAAY,WAAW,OAAO,IAAI,QAAQ,UAAU,MAAM,IAAI;IAClE,OAAO,QAAQ,CAAC,OAAO;GACxB;EACD;CACD;CACA,OAAO;AACR;AACA,SAAS,sBAAsB,YAAY;CAC1C,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,IAAI,WAAW,CAAC;EAChB,KAAK,IAAI,QAAQ,YAAY;GAC5B,IAAI,SAAS,QAAQ;GACrB,IAAI,SAAS,UAAU;IACtB,IAAI,MAAM,WAAW;IACrB,oBAAoB,GAAG;IACvB,SAAS,KAAK,cAAc,GAAG,CAAC;GACjC,OAAO,KAAK,IAAI,SAAS,WAAW,OAAO,IAAI,OAAO,WAAW,KAAK,CAAC,WAAW,UAAU,CAAC,OAAO;IACnG,IAAI,OAAO,WAAW,KAAK,CAAC;IAC5B,oBAAoB,IAAI;IACxB,SAAS,KAAK,cAAc,IAAI,CAAC;GAClC;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT"}
|
|
1
|
+
{"version":3,"file":"insertFont.native.js","names":[],"sources":["esm/insertFont.native.js"],"sourcesContent":["import { setConfigFont } from \"./config\";\nimport { createFont } from \"./createFont\";\nimport { createVariables } from \"./createVariables\";\nimport { registerCSSVariable, variableToCSS } from \"./helpers/registerCSSVariable\";\n\nfunction insertFont(name, fontIn) {\n\tvar tokened = createVariables(createFont(fontIn), name);\n\tvar parsed = parseFont(tokened);\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\tsetConfigFont(name, tokened, parsed);\n\treturn parsed;\n}\nvar updateFont = insertFont;\nfunction parseFont(definition) {\n\tvar parsed = {};\n\tfor (var attrKey in definition) {\n\t\tvar attr = definition[attrKey];\n\t\tif (attrKey === \"family\" || attrKey === \"face\") parsed[attrKey] = attr;\n\t\telse {\n\t\t\tparsed[attrKey] = {};\n\t\t\tfor (var key in attr) {\n\t\t\t\tvar val = attr[key];\n\t\t\t\tif (attrKey === \"color\" && typeof val.val === \"string\") val = val.val;\n\t\t\t\tparsed[attrKey][key] = val;\n\t\t\t}\n\t\t}\n\t}\n\treturn parsed;\n}\nfunction registerFontVariables(parsedFont) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar response = [];\n\t\tfor (var fkey in parsedFont) {\n\t\t\tif (fkey === \"face\") continue;\n\t\t\tif (fkey === \"family\") {\n\t\t\t\tvar val = parsedFont[fkey];\n\t\t\t\tregisterCSSVariable(val);\n\t\t\t\tresponse.push(variableToCSS(val));\n\t\t\t} else for (var fskey in parsedFont[fkey]) if (typeof parsedFont[fkey][fskey] === \"string\") {} else {\n\t\t\t\tvar val1 = parsedFont[fkey][fskey];\n\t\t\t\tregisterCSSVariable(val1);\n\t\t\t\tresponse.push(variableToCSS(val1));\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\treturn [];\n}\n\nexport { insertFont, parseFont, registerFontVariables, updateFont };"],"mappings":";;;;;;AAKA,SAAS,WAAW,MAAM,QAAQ;CACjC,IAAI,UAAU,gBAAgB,WAAW,MAAM,GAAG,IAAI;CACtD,IAAI,SAAS,UAAU,OAAO;CAC9B,IAAI,CAAC,QAAQ,IAAI,0BAA0B;CAC3C,cAAc,MAAM,SAAS,MAAM;CACnC,OAAO;AACR;AACA,IAAI,aAAa;AACjB,SAAS,UAAU,YAAY;CAC9B,IAAI,SAAS,CAAC;CACd,KAAK,IAAI,WAAW,YAAY;EAC/B,IAAI,OAAO,WAAW;EACtB,IAAI,YAAY,YAAY,YAAY,QAAQ,OAAO,WAAW;OAC7D;GACJ,OAAO,WAAW,CAAC;GACnB,KAAK,IAAI,OAAO,MAAM;IACrB,IAAI,MAAM,KAAK;IACf,IAAI,YAAY,WAAW,OAAO,IAAI,QAAQ,UAAU,MAAM,IAAI;IAClE,OAAO,QAAQ,CAAC,OAAO;GACxB;EACD;CACD;CACA,OAAO;AACR;AACA,SAAS,sBAAsB,YAAY;CAC1C,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,IAAI,WAAW,CAAC;EAChB,KAAK,IAAI,QAAQ,YAAY;GAC5B,IAAI,SAAS,QAAQ;GACrB,IAAI,SAAS,UAAU;IACtB,IAAI,MAAM,WAAW;IACrB,oBAAoB,GAAG;IACvB,SAAS,KAAK,cAAc,GAAG,CAAC;GACjC,OAAO,KAAK,IAAI,SAAS,WAAW,OAAO,IAAI,OAAO,WAAW,KAAK,CAAC,WAAW,UAAU,CAAC,OAAO;IACnG,IAAI,OAAO,WAAW,KAAK,CAAC;IAC5B,oBAAoB,IAAI;IACxB,SAAS,KAAK,cAAc,IAAI,CAAC;GAClC;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT"}
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
import { stylePropsUnitless } from "@tamagui/helpers";
|
|
2
2
|
import { createComponent } from "./createComponent.mjs";
|
|
3
|
+
import { createVariables as createVariables$1 } from "./createVariables.mjs";
|
|
4
|
+
import { fixStyles as fixStyles$1 } from "./helpers/expandStyles.mjs";
|
|
5
|
+
import { styleToCSS as styleToCSS$1 } from "./helpers/styleToCSS.mjs";
|
|
3
6
|
import { setComponentDisplayName } from "./helpers/componentDisplayName.mjs";
|
|
4
|
-
import {
|
|
7
|
+
import { getThemeCSSRules as getThemeCSSRules$1 } from "./helpers/getThemeCSSRules.mjs";
|
|
8
|
+
import { normalizeValueWithProperty as normalizeValueWithProperty$1 } from "./helpers/normalizeValueWithProperty.mjs";
|
|
9
|
+
import { proxyThemeToParents as proxyThemeToParents$1 } from "./helpers/proxyThemeToParents.mjs";
|
|
10
|
+
import { ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.mjs";
|
|
11
|
+
import { transformsToString as transformsToString$1 } from "./helpers/transformsToString.mjs";
|
|
12
|
+
import { parseFont as parseFont$1, registerFontVariables as registerFontVariables$1 } from "./insertFont.mjs";
|
|
5
13
|
import { createTamagui as createTamagui$1 } from "./createTamagui.mjs";
|
|
6
14
|
import { setupHooks as setupHooks$1 } from "./setupHooks.mjs";
|
|
7
15
|
import { createFrontendStyled as createFrontendStyled$1 } from "./styled.mjs";
|
|
16
|
+
import { useThemeWithState as useThemeWithState$1 } from "./hooks/useTheme.mjs";
|
|
8
17
|
import { TamaguiProvider as TamaguiProvider$1 } from "./views/TamaguiProvider.mjs";
|
|
9
18
|
import { textStaticConfig } from "./views/Text.mjs";
|
|
10
19
|
import { viewStaticConfig } from "./views/View.mjs";
|
|
11
|
-
import {
|
|
20
|
+
import { regularStyleFrontend } from "./helpers/styleFrontend.mjs";
|
|
12
21
|
|
|
13
|
-
const
|
|
22
|
+
const createVariables = createVariables$1;
|
|
23
|
+
const parseFont = parseFont$1;
|
|
24
|
+
const registerFontVariables = registerFontVariables$1;
|
|
25
|
+
const fixStyles = fixStyles$1;
|
|
26
|
+
const getThemeCSSRules = getThemeCSSRules$1;
|
|
27
|
+
const normalizeValueWithProperty = normalizeValueWithProperty$1;
|
|
28
|
+
const proxyThemeToParents = proxyThemeToParents$1;
|
|
29
|
+
const ensureThemeVariable = ensureThemeVariable$1;
|
|
30
|
+
const transformsToString = transformsToString$1;
|
|
31
|
+
const styleToCSS = styleToCSS$1;
|
|
32
|
+
const useThemeWithState = useThemeWithState$1;
|
|
14
33
|
const plainValueToPayload = (value, property) => {
|
|
15
34
|
if (typeof value === "string") return value;
|
|
16
35
|
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
@@ -41,5 +60,5 @@ function createFrontendViews(frontend) {
|
|
|
41
60
|
};
|
|
42
61
|
}
|
|
43
62
|
|
|
44
|
-
export {
|
|
63
|
+
export { TamaguiProvider, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
|
|
45
64
|
//# sourceMappingURL=internal-runtime.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-runtime.js","names":["
|
|
1
|
+
{"version":3,"file":"internal-runtime.js","names":["createVariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { setComponentDisplayName } from \"./helpers/componentDisplayName\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport { ensureThemeVariable as ensureThemeVariableImpl } from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport {\n parseFont as parseFontImpl,\n registerFontVariables as registerFontVariablesImpl\n} from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { regularStyleFrontend } from \"./helpers/styleFrontend\";\nconst createVariables = createVariablesImpl;\nconst parseFont = parseFontImpl;\nconst registerFontVariables = registerFontVariablesImpl;\nconst fixStyles = fixStylesImpl;\nconst getThemeCSSRules = getThemeCSSRulesImpl;\nconst normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nconst proxyThemeToParents = proxyThemeToParentsImpl;\nconst ensureThemeVariable = ensureThemeVariableImpl;\nconst transformsToString = transformsToStringImpl;\nconst styleToCSS = styleToCSSImpl;\nconst useThemeWithState = useThemeWithStateImpl;\nconst plainValueToPayload = (value, property) => {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nconst createTamagui = createTamaguiImpl;\nconst setupHooks = setupHooksImpl;\nconst TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: setComponentDisplayName(\n createComponent({ ...viewStaticConfig, styleFrontend: frontend }),\n \"View\"\n ),\n Text: setComponentDisplayName(\n createComponent({ ...textStaticConfig, styleFrontend: frontend }),\n \"Text\"\n )\n };\n}\nexport {\n TamaguiProvider,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,kBAAkBA;AACxB,MAAM,YAAYC;AAClB,MAAM,wBAAwBC;AAC9B,MAAM,YAAYC;AAClB,MAAM,mBAAmBC;AACzB,MAAM,6BAA6BC;AACnC,MAAM,sBAAsBC;AAC5B,MAAM,sBAAsBC;AAC5B,MAAM,qBAAqBC;AAC3B,MAAM,aAAaC;AACnB,MAAM,oBAAoBC;AAC1B,MAAM,uBAAuB,OAAO,aAAa;CAC/C,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACjE,IAAI,aAAa,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW;EACvG,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,IAAI,aAAa,OAAO,aAAa,OAAO,aAAa,iBAAiB,aAAa,gBAAgB,aAAa,cAAc;EAChI,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,OAAO,mBAAmB,YAAY,OAAO,KAAK,IAAI,GAAG,MAAM;AACjE;AACA,MAAM,gBAAgBC;AACtB,MAAM,aAAaC;AACnB,MAAM,kBAAkBC;AACxB,SAAS,qBAAqB,UAAU;CACtC,OAAOC,uBAAyB,QAAQ;AAC1C;AACA,SAAS,oBAAoB,UAAU;CACrC,OAAO;EACL,MAAM,wBACJ,gBAAgB;GAAE,GAAG;GAAkB,eAAe;EAAS,CAAC,GAChE,MACF;EACA,MAAM,wBACJ,gBAAgB;GAAE,GAAG;GAAkB,eAAe;EAAS,CAAC,GAChE,MACF;CACF;AACF"}
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
import { stylePropsUnitless } from "@tamagui/helpers";
|
|
2
2
|
import { createComponent } from "./createComponent.native.js";
|
|
3
|
+
import { createVariables as createVariables$1 } from "./createVariables.native.js";
|
|
4
|
+
import { fixStyles as fixStyles$1 } from "./helpers/expandStyles.native.js";
|
|
5
|
+
import { styleToCSS as styleToCSS$1 } from "./helpers/styleToCSS.native.js";
|
|
3
6
|
import { setComponentDisplayName } from "./helpers/componentDisplayName.native.js";
|
|
4
|
-
import {
|
|
7
|
+
import { getThemeCSSRules as getThemeCSSRules$1 } from "./helpers/getThemeCSSRules.native.js";
|
|
8
|
+
import { normalizeValueWithProperty as normalizeValueWithProperty$1 } from "./helpers/normalizeValueWithProperty.native.js";
|
|
9
|
+
import { proxyThemeToParents as proxyThemeToParents$1 } from "./helpers/proxyThemeToParents.native.js";
|
|
10
|
+
import { ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.native.js";
|
|
11
|
+
import { transformsToString as transformsToString$1 } from "./helpers/transformsToString.native.js";
|
|
12
|
+
import { parseFont as parseFont$1, registerFontVariables as registerFontVariables$1 } from "./insertFont.native.js";
|
|
5
13
|
import { createTamagui as createTamagui$1 } from "./createTamagui.native.js";
|
|
6
14
|
import { setupHooks as setupHooks$1 } from "./setupHooks.native.js";
|
|
7
15
|
import { createFrontendStyled as createFrontendStyled$1 } from "./styled.native.js";
|
|
16
|
+
import { useThemeWithState as useThemeWithState$1 } from "./hooks/useTheme.native.js";
|
|
8
17
|
import { TamaguiProvider as TamaguiProvider$1 } from "./views/TamaguiProvider.native.js";
|
|
9
18
|
import { textStaticConfig } from "./views/Text.native.js";
|
|
10
19
|
import { viewStaticConfig } from "./views/View.native.js";
|
|
11
|
-
import {
|
|
20
|
+
import { regularStyleFrontend } from "./helpers/styleFrontend.native.js";
|
|
12
21
|
|
|
13
|
-
var
|
|
22
|
+
var createVariables = createVariables$1;
|
|
23
|
+
var parseFont = parseFont$1;
|
|
24
|
+
var registerFontVariables = registerFontVariables$1;
|
|
25
|
+
var fixStyles = fixStyles$1;
|
|
26
|
+
var getThemeCSSRules = getThemeCSSRules$1;
|
|
27
|
+
var normalizeValueWithProperty = normalizeValueWithProperty$1;
|
|
28
|
+
var proxyThemeToParents = proxyThemeToParents$1;
|
|
29
|
+
var ensureThemeVariable = ensureThemeVariable$1;
|
|
30
|
+
var transformsToString = transformsToString$1;
|
|
31
|
+
var styleToCSS = styleToCSS$1;
|
|
32
|
+
var useThemeWithState = useThemeWithState$1;
|
|
14
33
|
var plainValueToPayload = function(value, property) {
|
|
15
34
|
if (typeof value === "string") return value;
|
|
16
35
|
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
@@ -41,5 +60,5 @@ function createFrontendViews(frontend) {
|
|
|
41
60
|
};
|
|
42
61
|
}
|
|
43
62
|
|
|
44
|
-
export {
|
|
63
|
+
export { TamaguiProvider, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
|
|
45
64
|
//# sourceMappingURL=internal-runtime.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-runtime.native.js","names":["
|
|
1
|
+
{"version":3,"file":"internal-runtime.native.js","names":["createVariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.native.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { setComponentDisplayName } from \"./helpers/componentDisplayName\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport { ensureThemeVariable as ensureThemeVariableImpl } from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport { parseFont as parseFontImpl, registerFontVariables as registerFontVariablesImpl } from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { regularStyleFrontend } from \"./helpers/styleFrontend\";\nvar createVariables = createVariablesImpl;\nvar parseFont = parseFontImpl;\nvar registerFontVariables = registerFontVariablesImpl;\nvar fixStyles = fixStylesImpl;\nvar getThemeCSSRules = getThemeCSSRulesImpl;\nvar normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nvar proxyThemeToParents = proxyThemeToParentsImpl;\nvar ensureThemeVariable = ensureThemeVariableImpl;\nvar transformsToString = transformsToStringImpl;\nvar styleToCSS = styleToCSSImpl;\nvar useThemeWithState = useThemeWithStateImpl;\nvar plainValueToPayload = function(value, property) {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nvar createTamagui = createTamaguiImpl;\nvar setupHooks = setupHooksImpl;\nvar TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: setComponentDisplayName(createComponent({\n ...viewStaticConfig,\n styleFrontend: frontend\n }), \"View\"),\n Text: setComponentDisplayName(createComponent({\n ...textStaticConfig,\n styleFrontend: frontend\n }), \"Text\")\n };\n}\nexport {\n TamaguiProvider,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,kBAAkBA;AACtB,IAAI,YAAYC;AAChB,IAAI,wBAAwBC;AAC5B,IAAI,YAAYC;AAChB,IAAI,mBAAmBC;AACvB,IAAI,6BAA6BC;AACjC,IAAI,sBAAsBC;AAC1B,IAAI,sBAAsBC;AAC1B,IAAI,qBAAqBC;AACzB,IAAI,aAAaC;AACjB,IAAI,oBAAoBC;AACxB,IAAI,sBAAsB,SAAS,OAAO,UAAU;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACjE,IAAI,aAAa,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW;EACvG,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,IAAI,aAAa,OAAO,aAAa,OAAO,aAAa,iBAAiB,aAAa,gBAAgB,aAAa,cAAc;EAChI,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,OAAO,mBAAmB,YAAY,OAAO,KAAK,IAAI,GAAG,MAAM;AACjE;AACA,IAAI,gBAAgBC;AACpB,IAAI,aAAaC;AACjB,IAAI,kBAAkBC;AACtB,SAAS,qBAAqB,UAAU;CACtC,OAAOC,uBAAyB,QAAQ;AAC1C;AACA,SAAS,oBAAoB,UAAU;CACrC,OAAO;EACL,MAAM,wBAAwB,gBAAgB;GAC5C,GAAG;GACH,eAAe;EACjB,CAAC,GAAG,MAAM;EACV,MAAM,wBAAwB,gBAAgB;GAC5C,GAAG;GACH,eAAe;EACjB,CAAC,GAAG,MAAM;CACZ;AACF"}
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function getReactNativeConfig(Component) {
|
|
3
|
-
if (!Component) return;
|
|
4
|
-
if (Component.getSize && Component.prefetch) return RNConfigs.Image;
|
|
5
|
-
if (Component.displayName === "Text" && Component.render) return RNConfigs.Text;
|
|
6
|
-
if (Component.render && (Component.displayName === "ScrollView" || Component.displayName === "View")) return RNConfigs.default;
|
|
7
|
-
if (Component.State?.blurTextInput) return RNConfigs.TextInput;
|
|
8
|
-
return ReactNativeStaticConfigs.get(Component);
|
|
9
|
-
}
|
|
10
|
-
const RNConfigs = {
|
|
11
|
-
Image: {
|
|
12
|
-
isReactNative: true,
|
|
13
|
-
inlineProps: /* @__PURE__ */ new Set([
|
|
14
|
-
"src",
|
|
15
|
-
"width",
|
|
16
|
-
"height"
|
|
17
|
-
])
|
|
18
|
-
},
|
|
19
|
-
Text: {
|
|
20
|
-
isReactNative: true,
|
|
21
|
-
isText: true
|
|
22
|
-
},
|
|
23
|
-
TextInput: {
|
|
24
|
-
isReactNative: true,
|
|
25
|
-
isInput: true,
|
|
26
|
-
isText: true
|
|
27
|
-
},
|
|
28
|
-
default: { isReactNative: true }
|
|
29
|
-
};
|
|
1
|
+
function getReactNativeConfig(Component) {}
|
|
30
2
|
|
|
31
3
|
export { getReactNativeConfig };
|
|
32
4
|
//# sourceMappingURL=setupReactNative.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupReactNative.js","names":[],"sources":["esm/setupReactNative.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"setupReactNative.js","names":[],"sources":["esm/setupReactNative.js"],"sourcesContent":["function getReactNativeConfig(Component) {}\nexport { getReactNativeConfig };\n//# sourceMappingURL=setupReactNative.js.map\n"],"mappings":";AAAA,SAAS,qBAAqB,WAAW,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var ReactNativeStaticConfigs = /* @__PURE__ */ new WeakMap();
|
|
2
1
|
function getReactNativeConfig(Component) {
|
|
3
|
-
var _Component_State;
|
|
4
|
-
if (!Component) return;
|
|
5
2
|
var _Component_propTypes, _Component_propTypes1, _Component_propTypes2;
|
|
3
|
+
if (!Component) return;
|
|
6
4
|
if (((_Component_propTypes = Component.propTypes) === null || _Component_propTypes === void 0 ? void 0 : _Component_propTypes.onTextInput) || ((_Component_propTypes1 = Component.propTypes) === null || _Component_propTypes1 === void 0 ? void 0 : _Component_propTypes1.onChangeText)) return RNConfigs.TextInput;
|
|
7
5
|
if (Component.getSizeWithHeaders) return RNConfigs.Image;
|
|
8
6
|
if ((_Component_propTypes2 = Component.propTypes) === null || _Component_propTypes2 === void 0 ? void 0 : _Component_propTypes2.textBreakStrategy) return RNConfigs.Text;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupReactNative.native.js","names":[],"sources":["esm/setupReactNative.native.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"setupReactNative.native.js","names":[],"sources":["esm/setupReactNative.native.js"],"sourcesContent":["function getReactNativeConfig(Component) {\n\tvar _Component_propTypes, _Component_propTypes1, _Component_propTypes2;\n\tif (!Component) return;\n\tif (((_Component_propTypes = Component.propTypes) === null || _Component_propTypes === void 0 ? void 0 : _Component_propTypes.onTextInput) || ((_Component_propTypes1 = Component.propTypes) === null || _Component_propTypes1 === void 0 ? void 0 : _Component_propTypes1.onChangeText)) return RNConfigs.TextInput;\n\tif (Component.getSizeWithHeaders) return RNConfigs.Image;\n\tif ((_Component_propTypes2 = Component.propTypes) === null || _Component_propTypes2 === void 0 ? void 0 : _Component_propTypes2.textBreakStrategy) return RNConfigs.Text;\n\treturn RNConfigs.default;\n}\nvar RNConfigs = {\n\tImage: {\n\t\tisReactNative: true,\n\t\tinlineProps: /* @__PURE__ */ new Set([\n\t\t\t\"src\",\n\t\t\t\"width\",\n\t\t\t\"height\"\n\t\t])\n\t},\n\tText: {\n\t\tisReactNative: true,\n\t\tisText: true\n\t},\n\tTextInput: {\n\t\tisReactNative: true,\n\t\tisInput: true,\n\t\tisText: true\n\t},\n\tdefault: { isReactNative: true }\n};\nexport { getReactNativeConfig };\n//# sourceMappingURL=setupReactNative.js.map\n"],"mappings":";AAAA,SAAS,qBAAqB,WAAW;CACxC,IAAI,sBAAsB,uBAAuB;CACjD,IAAI,CAAC,WAAW;CAChB,MAAM,uBAAuB,UAAU,eAAe,QAAQ,yBAAyB,KAAK,IAAI,KAAK,IAAI,qBAAqB,kBAAkB,wBAAwB,UAAU,eAAe,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,eAAe,OAAO,UAAU;CAC3S,IAAI,UAAU,oBAAoB,OAAO,UAAU;CACnD,KAAK,wBAAwB,UAAU,eAAe,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,mBAAmB,OAAO,UAAU;CACpK,OAAO,UAAU;AAClB;AACA,IAAI,YAAY;CACf,OAAO;EACN,eAAe;EACf,6BAA6B,IAAI,IAAI;GACpC;GACA;GACA;EACD,CAAC;CACF;CACA,MAAM;EACL,eAAe;EACf,QAAQ;CACT;CACA,WAAW;EACV,eAAe;EACf,SAAS;EACT,QAAQ;CACT;CACA,SAAS,EAAE,eAAe,KAAK;AAChC"}
|