@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.881.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +40 -19
- package/dist/cjs/createComponent.native.cjs +42 -21
- package/dist/cjs/createComponent.native.js +42 -21
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +0 -10
- package/dist/cjs/createVariable.native.cjs +0 -10
- package/dist/cjs/createVariable.native.js +0 -10
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/borderComponents.cjs +62 -0
- package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
- package/dist/cjs/helpers/borderComponents.native.js +84 -0
- package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
- package/dist/cjs/helpers/createStyledContext.cjs +10 -18
- package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +133 -114
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +1063 -2168
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +163 -1
- package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +9 -8
- package/dist/cjs/helpers/log.native.cjs +9 -8
- package/dist/cjs/helpers/log.native.js +9 -8
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +44 -13
- package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
- package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/{getDefaultProps.native.cjs → styleStaticConfig.cjs} +7 -8
- package/dist/cjs/helpers/{getDefaultProps.native.js → styleStaticConfig.native.cjs} +7 -8
- package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/cjs/helpers/styledDynamic.cjs +160 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
- package/dist/cjs/helpers/styledDynamic.native.js +197 -0
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +12 -74
- package/dist/cjs/helpers/tokenCategories.native.cjs +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +17 -12
- package/dist/cjs/helpers/variableValue.native.cjs +46 -23
- package/dist/cjs/helpers/variableValue.native.js +46 -23
- package/dist/cjs/helpers/variableValue.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +5 -4
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
- package/dist/cjs/helpers/warnOnce.native.js +6 -4
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +41 -82
- package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
- package/dist/cjs/hooks/useComponentState.native.js +45 -84
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.js +2 -2
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/{helpers/getDefaultProps.cjs → hooks/useStyle.cjs} +10 -4
- package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.native.cjs} +16 -6
- package/dist/cjs/hooks/useStyle.native.js +34 -0
- package/dist/cjs/hooks/useStyle.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeState.cjs +25 -90
- package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
- package/dist/cjs/hooks/useThemeState.native.js +34 -94
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -12
- package/dist/cjs/index.native.cjs +9 -12
- package/dist/cjs/index.native.js +9 -12
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +8 -7
- package/dist/cjs/static-resolve.native.cjs +8 -7
- package/dist/cjs/static-resolve.native.js +8 -7
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +91 -0
- package/dist/cjs/style.native.cjs +98 -0
- package/dist/cjs/style.native.js +100 -0
- package/dist/cjs/style.native.js.map +1 -0
- package/dist/cjs/styled.cjs +15 -62
- package/dist/cjs/styled.native.cjs +15 -64
- package/dist/cjs/styled.native.js +15 -64
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +4 -22
- package/dist/cjs/types.native.cjs +4 -22
- package/dist/cjs/types.native.js +4 -22
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +21 -14
- package/dist/cjs/views/Text.native.cjs +5 -2
- package/dist/cjs/views/Text.native.js +5 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +2 -2
- package/dist/cjs/views/Theme.native.cjs +2 -2
- package/dist/cjs/views/Theme.native.js +2 -2
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +41 -20
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +43 -22
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +1 -9
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +1 -9
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/borderComponents.mjs +37 -0
- package/dist/esm/helpers/borderComponents.mjs.map +1 -0
- package/dist/esm/helpers/borderComponents.native.js +55 -0
- package/dist/esm/helpers/borderComponents.native.js.map +1 -0
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +0 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +10 -18
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +14 -18
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +8 -10
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +8 -10
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +131 -114
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs +5 -1
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +5 -1
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +1052 -2151
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1090 -2481
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +164 -2
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +187 -2
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +5 -2
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +7 -2
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +9 -8
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +9 -8
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +44 -13
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +79 -14
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/esm/helpers/styledDynamic.mjs +136 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
- package/dist/esm/helpers/styledDynamic.native.js +169 -0
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +12 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +12 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +17 -12
- package/dist/esm/helpers/variableValue.mjs.map +1 -1
- package/dist/esm/helpers/variableValue.native.js +46 -23
- package/dist/esm/helpers/variableValue.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +5 -4
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -4
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +41 -82
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +45 -84
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +2 -2
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +2 -2
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useStyle.mjs +11 -0
- package/dist/esm/hooks/useStyle.mjs.map +1 -0
- package/dist/esm/hooks/useStyle.native.js +11 -0
- package/dist/esm/hooks/useStyle.native.js.map +1 -0
- package/dist/esm/hooks/useThemeState.mjs +25 -90
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +34 -94
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/index.native.js +8 -8
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +11 -9
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +11 -9
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +58 -0
- package/dist/esm/style.mjs.map +1 -0
- package/dist/esm/style.native.js +63 -0
- package/dist/esm/style.native.js.map +1 -0
- package/dist/esm/styled.mjs +17 -62
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +17 -64
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -21
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -21
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +1 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +1 -2
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +21 -14
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +2 -2
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +2 -2
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -4
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +62 -31
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/createVariable.ts +0 -10
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +11 -13
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +197 -206
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2058 -4052
- package/src/helpers/grammarConfig.ts +218 -1
- package/src/helpers/insertStyleRule.tsx +4 -2
- package/src/helpers/log.ts +12 -11
- package/src/helpers/mergeVariants.ts +55 -18
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeStyleEngine.ts +55 -14
- package/src/helpers/normalizeValueWithProperty.ts +10 -12
- package/src/helpers/parseBorderShorthand.native.ts +23 -45
- package/src/helpers/parseOutlineShorthand.native.ts +9 -40
- package/src/helpers/resolveSafeArea.ts +34 -101
- package/src/helpers/resolveVariantStyle.ts +77 -0
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +16 -9
- package/src/helpers/styleStaticConfig.ts +21 -0
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +32 -88
- package/src/helpers/variableValue.ts +20 -15
- package/src/helpers/warnOnce.ts +5 -4
- package/src/hooks/useAnimationDriver.ts +6 -2
- package/src/hooks/useComponentState.ts +55 -183
- package/src/hooks/useMedia.tsx +10 -8
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useStyle.ts +10 -0
- package/src/hooks/useTheme.tsx +1 -1
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +14 -10
- package/src/internal-runtime.ts +10 -9
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +25 -18
- package/src/style.ts +97 -0
- package/src/styled.tsx +46 -332
- package/src/types.tsx +107 -192
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +26 -21
- package/src/views/Theme.tsx +10 -8
- package/src/views/ThemeDebug.tsx +0 -1
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createVariable.d.ts +0 -2
- package/types/createVariable.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +25 -22
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
- package/types/helpers/getDynamicVal.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +9 -11
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +25 -2
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +6 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
- package/types/helpers/resolveSafeArea.d.ts +0 -1
- package/types/helpers/resolveSafeArea.d.ts.map +1 -1
- package/types/helpers/resolveVariantStyle.d.ts +3 -0
- package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +7 -9
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +14 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/styleStaticConfigCore.d.ts +4 -0
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
- package/types/helpers/styledDynamic.d.ts +18 -0
- package/types/helpers/styledDynamic.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +0 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +68 -68
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +4 -0
- package/types/hooks/useStyle.d.ts.map +1 -0
- package/types/hooks/useThemeState.d.ts +1 -11
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +8 -8
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/internalRuntimeTypes.d.ts +1 -1
- package/types/internalRuntimeTypes.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +12 -48
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +75 -60
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +0 -348
- package/dist/cjs/helpers/directStyleCSS.native.cjs +0 -20
- package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
- package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
- package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
- package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
- package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -320
- package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSS.native.js +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
- package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
- package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/getVariantExtras.mjs +0 -69
- package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
- package/dist/esm/helpers/getVariantExtras.native.js +0 -70
- package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -534
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/directStyleCSS.d.ts +0 -28
- package/types/helpers/directStyleCSS.d.ts.map +0 -1
- package/types/helpers/directStyleCSS.native.d.ts +0 -2
- package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
- package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
- package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
|
@@ -19,108 +19,43 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
var resolveSafeArea_exports = {};
|
|
22
|
-
__export(resolveSafeArea_exports, {
|
|
23
|
-
expandSafeAreaValue: () => expandSafeAreaValue,
|
|
24
|
-
isSafeAreaKey: () => isSafeAreaKey
|
|
25
|
-
});
|
|
22
|
+
__export(resolveSafeArea_exports, { expandSafeAreaValue: () => expandSafeAreaValue });
|
|
26
23
|
module.exports = __toCommonJS(resolveSafeArea_exports);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
margin: [
|
|
49
|
-
"top",
|
|
50
|
-
"right",
|
|
51
|
-
"bottom",
|
|
52
|
-
"left"
|
|
53
|
-
],
|
|
54
|
-
marginTop: "top",
|
|
55
|
-
marginBottom: "bottom",
|
|
56
|
-
marginLeft: "left",
|
|
57
|
-
marginRight: "right",
|
|
58
|
-
marginHorizontal: ["left", "right"],
|
|
59
|
-
marginVertical: ["top", "bottom"],
|
|
60
|
-
marginStart: "left",
|
|
61
|
-
marginEnd: "right",
|
|
62
|
-
marginBlock: ["top", "bottom"],
|
|
63
|
-
marginInline: ["left", "right"],
|
|
64
|
-
marginBlockStart: "top",
|
|
65
|
-
marginBlockEnd: "bottom",
|
|
66
|
-
marginInlineStart: "left",
|
|
67
|
-
marginInlineEnd: "right",
|
|
68
|
-
inset: [
|
|
69
|
-
"top",
|
|
70
|
-
"right",
|
|
71
|
-
"bottom",
|
|
72
|
-
"left"
|
|
73
|
-
],
|
|
74
|
-
top: "top",
|
|
75
|
-
bottom: "bottom",
|
|
76
|
-
left: "left",
|
|
77
|
-
right: "right",
|
|
78
|
-
start: "left",
|
|
79
|
-
end: "right"
|
|
24
|
+
const allEdges = [
|
|
25
|
+
"top",
|
|
26
|
+
"right",
|
|
27
|
+
"bottom",
|
|
28
|
+
"left"
|
|
29
|
+
];
|
|
30
|
+
const suffixEdges = {
|
|
31
|
+
Horizontal: ["left", "right"],
|
|
32
|
+
Inline: ["left", "right"],
|
|
33
|
+
Vertical: ["top", "bottom"],
|
|
34
|
+
Block: ["top", "bottom"],
|
|
35
|
+
Start: ["left"],
|
|
36
|
+
InlineStart: ["left"],
|
|
37
|
+
End: ["right"],
|
|
38
|
+
InlineEnd: ["right"],
|
|
39
|
+
Top: ["top"],
|
|
40
|
+
BlockStart: ["top"],
|
|
41
|
+
Bottom: ["bottom"],
|
|
42
|
+
BlockEnd: ["bottom"],
|
|
43
|
+
Left: ["left"],
|
|
44
|
+
Right: ["right"]
|
|
80
45
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
46
|
+
function safeAreaEdges(key) {
|
|
47
|
+
if (key === "inset") return ["", allEdges];
|
|
48
|
+
if (/^(top|right|bottom|left)$/.test(key)) return ["", [key]];
|
|
49
|
+
if (key === "start") return ["", ["left"]];
|
|
50
|
+
if (key === "end") return ["", ["right"]];
|
|
51
|
+
const match = /^(padding|margin)(.*)$/.exec(key);
|
|
52
|
+
if (!match) return;
|
|
53
|
+
const edges = match[2] ? suffixEdges[match[2]] : allEdges;
|
|
54
|
+
return edges && [match[1], edges];
|
|
89
55
|
}
|
|
90
56
|
function expandSafeAreaValue(key) {
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
const base = baseKeyForExpansion[key];
|
|
97
|
-
if (base === "") {
|
|
98
|
-
return edges.map((e) => [edgeToSideKey[e], envForEdge[e]]);
|
|
99
|
-
}
|
|
100
|
-
return edges.map((e) => [`${base}${edgeToPascal[e]}`, envForEdge[e]]);
|
|
57
|
+
const match = safeAreaEdges(key);
|
|
58
|
+
if (!match) return;
|
|
59
|
+
const [base, edges] = match;
|
|
60
|
+
return edges.map((edge) => [base ? `${base}${edge[0].toUpperCase()}${edge.slice(1)}` : edge, `env(safe-area-inset-${edge})`]);
|
|
101
61
|
}
|
|
102
|
-
const edgeToPascal = {
|
|
103
|
-
top: "Top",
|
|
104
|
-
bottom: "Bottom",
|
|
105
|
-
left: "Left",
|
|
106
|
-
right: "Right"
|
|
107
|
-
};
|
|
108
|
-
const edgeToSideKey = {
|
|
109
|
-
top: "top",
|
|
110
|
-
bottom: "bottom",
|
|
111
|
-
left: "left",
|
|
112
|
-
right: "right"
|
|
113
|
-
};
|
|
114
|
-
const baseKeyForExpansion = {
|
|
115
|
-
padding: "padding",
|
|
116
|
-
paddingHorizontal: "padding",
|
|
117
|
-
paddingVertical: "padding",
|
|
118
|
-
paddingBlock: "padding",
|
|
119
|
-
paddingInline: "padding",
|
|
120
|
-
margin: "margin",
|
|
121
|
-
marginHorizontal: "margin",
|
|
122
|
-
marginVertical: "margin",
|
|
123
|
-
marginBlock: "margin",
|
|
124
|
-
marginInline: "margin",
|
|
125
|
-
inset: ""
|
|
126
|
-
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var resolveVariantStyle_exports = {};
|
|
22
|
+
__export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
|
|
23
|
+
module.exports = __toCommonJS(resolveVariantStyle_exports);
|
|
24
|
+
var import_getSplitStyles = require("./getSplitStyles.cjs");
|
|
25
|
+
var import_isObj = require("./isObj.cjs");
|
|
26
|
+
var import_skipProps = require("./skipProps.cjs");
|
|
27
|
+
var import_styleOriginalValues = require("./styleOriginalValues.cjs");
|
|
28
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
29
|
+
var import_styledDynamic = require("./styledDynamic.cjs");
|
|
30
|
+
function resolveVariantStyle(state, variants, key, value, parentKey = key, parentCondition) {
|
|
31
|
+
const definition = variants[key];
|
|
32
|
+
if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!(typeof value === "string" && definition && typeof definition === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, (payload, condition) => resolveSelection(state, variants, key, payload, parentKey, condition || void 0))) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
resolveSelection(state, variants, key, value, parentKey, parentCondition);
|
|
39
|
+
}
|
|
40
|
+
function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
41
|
+
const definition = variants[key];
|
|
42
|
+
let output;
|
|
43
|
+
if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
|
|
44
|
+
output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
|
|
45
|
+
} else if (definition && typeof definition === "object" && value !== void 0) {
|
|
46
|
+
output = definition[value];
|
|
47
|
+
}
|
|
48
|
+
if (!(0, import_isObj.isObj)(output)) return;
|
|
49
|
+
const originals = import_styleOriginalValues.styleOriginalValues.get(output);
|
|
50
|
+
for (const outputKey in output) {
|
|
51
|
+
if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
|
|
52
|
+
const raw = output[outputKey];
|
|
53
|
+
if (raw == null) continue;
|
|
54
|
+
const value2 = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
|
|
55
|
+
(0, import_getSplitStyles.emitVariantStyle)(state, outputKey, value2, originals?.[outputKey] ?? raw, condition, parentKey === key && outputKey === key);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var resolveVariantStyle_exports = {};
|
|
24
|
+
__export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
|
|
25
|
+
module.exports = __toCommonJS(resolveVariantStyle_exports);
|
|
26
|
+
var import_getSplitStyles = require("./getSplitStyles.native.js");
|
|
27
|
+
var import_isObj = require("./isObj.native.js");
|
|
28
|
+
var import_skipProps = require("./skipProps.native.js");
|
|
29
|
+
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
30
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
31
|
+
var import_styledDynamic = require("./styledDynamic.native.js");
|
|
32
|
+
function _type_of(obj) {
|
|
33
|
+
"@swc/helpers - typeof";
|
|
34
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
35
|
+
}
|
|
36
|
+
function resolveVariantStyle(state, variants, key, value) {
|
|
37
|
+
var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
|
|
38
|
+
var definition = variants[key];
|
|
39
|
+
if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (!(typeof value === "string" && definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
|
|
43
|
+
return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
|
|
44
|
+
})) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
resolveSelection(state, variants, key, value, parentKey, parentCondition);
|
|
48
|
+
}
|
|
49
|
+
function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
50
|
+
var definition = variants[key];
|
|
51
|
+
var output;
|
|
52
|
+
if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
|
|
53
|
+
output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
|
|
54
|
+
} else if (definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value !== void 0) {
|
|
55
|
+
output = definition[value];
|
|
56
|
+
}
|
|
57
|
+
if (!(0, import_isObj.isObj)(output)) return;
|
|
58
|
+
var originals = import_styleOriginalValues.styleOriginalValues.get(output);
|
|
59
|
+
for (var outputKey in output) {
|
|
60
|
+
if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
|
|
61
|
+
var raw = output[outputKey];
|
|
62
|
+
if (raw == null) continue;
|
|
63
|
+
var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
|
|
64
|
+
var _originals_outputKey;
|
|
65
|
+
(0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var resolveVariantStyle_exports = {};
|
|
24
|
+
__export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
|
|
25
|
+
module.exports = __toCommonJS(resolveVariantStyle_exports);
|
|
26
|
+
var import_getSplitStyles = require("./getSplitStyles.native.js");
|
|
27
|
+
var import_isObj = require("./isObj.native.js");
|
|
28
|
+
var import_skipProps = require("./skipProps.native.js");
|
|
29
|
+
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
30
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
31
|
+
var import_styledDynamic = require("./styledDynamic.native.js");
|
|
32
|
+
function _type_of(obj) {
|
|
33
|
+
"@swc/helpers - typeof";
|
|
34
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
35
|
+
}
|
|
36
|
+
function resolveVariantStyle(state, variants, key, value) {
|
|
37
|
+
var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
|
|
38
|
+
var definition = variants[key];
|
|
39
|
+
if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (!(typeof value === "string" && definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
|
|
43
|
+
return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
|
|
44
|
+
})) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
resolveSelection(state, variants, key, value, parentKey, parentCondition);
|
|
48
|
+
}
|
|
49
|
+
function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
50
|
+
var definition = variants[key];
|
|
51
|
+
var output;
|
|
52
|
+
if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
|
|
53
|
+
output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
|
|
54
|
+
} else if (definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value !== void 0) {
|
|
55
|
+
output = definition[value];
|
|
56
|
+
}
|
|
57
|
+
if (!(0, import_isObj.isObj)(output)) return;
|
|
58
|
+
var originals = import_styleOriginalValues.styleOriginalValues.get(output);
|
|
59
|
+
for (var outputKey in output) {
|
|
60
|
+
if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
|
|
61
|
+
var raw = output[outputKey];
|
|
62
|
+
if (raw == null) continue;
|
|
63
|
+
var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
|
|
64
|
+
var _originals_outputKey;
|
|
65
|
+
(0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=resolveVariantStyle.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveVariantStyle.native.js","names":[],"sources":["cjs/helpers/resolveVariantStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariantStyle_exports = {};\n__export(resolveVariantStyle_exports, {\n resolveVariantStyle: () => resolveVariantStyle\n});\nmodule.exports = __toCommonJS(resolveVariantStyle_exports);\nvar import_getSplitStyles = require(\"./getSplitStyles\");\nvar import_isObj = require(\"./isObj\");\nvar import_skipProps = require(\"./skipProps\");\nvar import_styleOriginalValues = require(\"./styleOriginalValues\");\nvar import_normalizeValueWithProperty = require(\"./normalizeValueWithProperty\");\nvar import_styledDynamic = require(\"./styledDynamic\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction resolveVariantStyle(state, variants, key, value) {\n var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;\n var definition = variants[key];\n if (typeof definition !== \"function\" && (0, import_styledDynamic.isStyledDynamic)(definition)) {\n return;\n }\n if (!(typeof value === \"string\" && definition && (typeof definition === \"undefined\" ? \"undefined\" : _type_of(definition)) === \"object\" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {\n return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);\n })) {\n return;\n }\n resolveSelection(state, variants, key, value, parentKey, parentCondition);\n}\nfunction resolveSelection(state, variants, key, value, parentKey, condition) {\n var definition = variants[key];\n var output;\n if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === \"function\") {\n output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));\n } else if (definition && (typeof definition === \"undefined\" ? \"undefined\" : _type_of(definition)) === \"object\" && value !== void 0) {\n output = definition[value];\n }\n if (!(0, import_isObj.isObj)(output)) return;\n var originals = import_styleOriginalValues.styleOriginalValues.get(output);\n for (var outputKey in output) {\n if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;\n var raw = output[outputKey];\n if (raw == null) continue;\n var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);\n var _originals_outputKey;\n (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);\n }\n}\n//# sourceMappingURL=resolveVariantStyle.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B,EACpC,2BAA2B,oBAC7B,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,wBAAwB,QAAQ,4BAAkB;AACtD,IAAI,eAAe,QAAQ,mBAAS;AACpC,IAAI,mBAAmB,QAAQ,uBAAa;AAC5C,IAAI,6BAA6B,QAAQ,iCAAuB;AAChE,IAAI,oCAAoC,QAAQ,wCAA8B;AAC9E,IAAI,uBAAuB,QAAQ,2BAAiB;AACpD,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,SAAS,oBAAoB,OAAO,UAAU,KAAK,OAAO;CACxD,IAAI,YAAY,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,KAAK,kBAAkB,UAAU,SAAS,IAAI,UAAU,KAAK,KAAK;CACnJ,IAAI,aAAa,SAAS;CAC1B,IAAI,OAAO,eAAe,eAAe,GAAG,qBAAqB,gBAAe,CAAE,UAAU,GAAG;EAC7F;CACF;CACA,IAAI,EAAE,OAAO,UAAU,YAAY,eAAe,OAAO,eAAe,cAAc,cAAc,SAAS,UAAU,OAAO,YAAY,SAAS,gBAAgB,GAAG,sBAAsB,qBAAoB,CAAE,OAAO,KAAK,OAAO,iBAAiB,SAAS,SAAS,WAAW;EACjR,OAAO,iBAAiB,OAAO,UAAU,KAAK,SAAS,WAAW,aAAa,KAAK,CAAC;CACvF,CAAC,GAAG;EACF;CACF;CACA,iBAAiB,OAAO,UAAU,KAAK,OAAO,WAAW,eAAe;AAC1E;AACA,SAAS,iBAAiB,OAAO,UAAU,KAAK,OAAO,WAAW,WAAW;CAC3E,IAAI,aAAa,SAAS;CAC1B,IAAI;CACJ,KAAK,GAAG,qBAAqB,gBAAe,CAAE,UAAU,KAAK,OAAO,eAAe,YAAY;EAC7F,SAAS,WAAW,QAAQ,GAAG,qBAAqB,cAAa,CAAE,KAAK,CAAC;CAC3E,OAAO,IAAI,eAAe,OAAO,eAAe,cAAc,cAAc,SAAS,UAAU,OAAO,YAAY,UAAU,KAAK,GAAG;EAClI,SAAS,WAAW;CACtB;CACA,IAAI,EAAE,GAAG,aAAa,MAAK,CAAE,MAAM,GAAG;CACtC,IAAI,YAAY,2BAA2B,oBAAoB,IAAI,MAAM;CACzE,KAAK,IAAI,aAAa,QAAQ;EAC5B,IAAI,CAAC,MAAM,WAAW,UAAU,aAAa,iBAAiB,WAAW;EACzE,IAAI,MAAM,OAAO;EACjB,IAAI,OAAO,MAAM;EACjB,IAAI,UAAU,MAAM,WAAW,cAAc,OAAO,GAAG,kCAAkC,2BAA0B,CAAE,KAAK,MAAM,KAAK,WAAW,cAAc,SAAS;EACvK,IAAI;EACJ,CAAC,GAAG,sBAAsB,iBAAgB,CAAE,OAAO,WAAW,UAAU,uBAAuB,cAAc,QAAQ,cAAc,KAAK,IAAI,KAAK,IAAI,UAAU,gBAAgB,QAAQ,yBAAyB,KAAK,IAAI,uBAAuB,KAAK,WAAW,cAAc,OAAO,cAAc,GAAG;CACxS;AACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var splitStyleProps_exports = {};
|
|
22
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
23
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
24
|
+
var import_helpers = require("@tamagui/helpers");
|
|
25
|
+
var import_config = require("../config.cjs");
|
|
26
|
+
function splitStyleProps(props, options = {}) {
|
|
27
|
+
const styleProps = {};
|
|
28
|
+
const regularProps = {};
|
|
29
|
+
const { expandShorthands = false, filter } = options;
|
|
30
|
+
const shorthands = (0, import_config.getConfig)().shorthands;
|
|
31
|
+
const filterIsFunction = typeof filter === "function";
|
|
32
|
+
const propsRecord = props;
|
|
33
|
+
for (const originalKey in props) {
|
|
34
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
35
|
+
const value = propsRecord[originalKey];
|
|
36
|
+
const key = shorthands[originalKey] || originalKey;
|
|
37
|
+
const isStyleProp = key in import_helpers.stylePropsAll;
|
|
38
|
+
const selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
39
|
+
if (selected) {
|
|
40
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
41
|
+
} else {
|
|
42
|
+
regularProps[originalKey] = value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return [styleProps, regularProps];
|
|
46
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var splitStyleProps_exports = {};
|
|
24
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
25
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_config = require("../config.native.js");
|
|
28
|
+
function splitStyleProps(props) {
|
|
29
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
30
|
+
var styleProps = {};
|
|
31
|
+
var regularProps = {};
|
|
32
|
+
var { expandShorthands = false, filter } = options;
|
|
33
|
+
var shorthands = (0, import_config.getConfig)().shorthands;
|
|
34
|
+
var filterIsFunction = typeof filter === "function";
|
|
35
|
+
var propsRecord = props;
|
|
36
|
+
for (var originalKey in props) {
|
|
37
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
38
|
+
var value = propsRecord[originalKey];
|
|
39
|
+
var key = shorthands[originalKey] || originalKey;
|
|
40
|
+
var isStyleProp = key in import_helpers.stylePropsAll;
|
|
41
|
+
var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
42
|
+
if (selected) {
|
|
43
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
44
|
+
} else {
|
|
45
|
+
regularProps[originalKey] = value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return [styleProps, regularProps];
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var splitStyleProps_exports = {};
|
|
24
|
+
__export(splitStyleProps_exports, { splitStyleProps: () => splitStyleProps });
|
|
25
|
+
module.exports = __toCommonJS(splitStyleProps_exports);
|
|
26
|
+
var import_helpers = require("@tamagui/helpers");
|
|
27
|
+
var import_config = require("../config.native.js");
|
|
28
|
+
function splitStyleProps(props) {
|
|
29
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
30
|
+
var styleProps = {};
|
|
31
|
+
var regularProps = {};
|
|
32
|
+
var { expandShorthands = false, filter } = options;
|
|
33
|
+
var shorthands = (0, import_config.getConfig)().shorthands;
|
|
34
|
+
var filterIsFunction = typeof filter === "function";
|
|
35
|
+
var propsRecord = props;
|
|
36
|
+
for (var originalKey in props) {
|
|
37
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
38
|
+
var value = propsRecord[originalKey];
|
|
39
|
+
var key = shorthands[originalKey] || originalKey;
|
|
40
|
+
var isStyleProp = key in import_helpers.stylePropsAll;
|
|
41
|
+
var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
42
|
+
if (selected) {
|
|
43
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
44
|
+
} else {
|
|
45
|
+
regularProps[originalKey] = value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return [styleProps, regularProps];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=splitStyleProps.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitStyleProps.native.js","names":[],"sources":["cjs/helpers/splitStyleProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar splitStyleProps_exports = {};\n__export(splitStyleProps_exports, {\n splitStyleProps: () => splitStyleProps\n});\nmodule.exports = __toCommonJS(splitStyleProps_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_config = require(\"../config\");\nfunction splitStyleProps(props) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var styleProps = {};\n var regularProps = {};\n var { expandShorthands = false, filter } = options;\n var shorthands = (0, import_config.getConfig)().shorthands;\n var filterIsFunction = typeof filter === \"function\";\n var propsRecord = props;\n for (var originalKey in props) {\n if (!Object.hasOwn(props, originalKey)) continue;\n var value = propsRecord[originalKey];\n var key = shorthands[originalKey] || originalKey;\n var isStyleProp = key in import_helpers.stylePropsAll;\n var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;\n if (selected) {\n styleProps[expandShorthands ? key : originalKey] = value;\n } else {\n regularProps[originalKey] = value;\n }\n }\n return [\n styleProps,\n regularProps\n ];\n}\n//# sourceMappingURL=splitStyleProps.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB,EAChC,uBAAuB,gBACzB,CAAC;AACD,OAAO,UAAU,aAAa,uBAAuB;AACrD,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,gBAAgB,QAAQ,qBAAW;AACvC,SAAS,gBAAgB,OAAO;CAC9B,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,aAAa,CAAC;CAClB,IAAI,eAAe,CAAC;CACpB,IAAI,EAAE,mBAAmB,OAAO,WAAW;CAC3C,IAAI,cAAc,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CAChD,IAAI,mBAAmB,OAAO,WAAW;CACzC,IAAI,cAAc;CAClB,KAAK,IAAI,eAAe,OAAO;EAC7B,IAAI,CAAC,OAAO,OAAO,OAAO,WAAW,GAAG;EACxC,IAAI,QAAQ,YAAY;EACxB,IAAI,MAAM,WAAW,gBAAgB;EACrC,IAAI,cAAc,OAAO,eAAe;EACxC,IAAI,WAAW,SAAS,mBAAmB,OAAO,KAAK,OAAO,aAAa,WAAW,IAAI,OAAO,OAAO,QAAQ,GAAG,IAAI;EACvH,IAAI,UAAU;GACZ,WAAW,mBAAmB,MAAM,eAAe;EACrD,OAAO;GACL,aAAa,eAAe;EAC9B;CACF;CACA,OAAO,CACL,YACA,YACF;AACF"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -20,9 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
18
|
return to;
|
|
21
19
|
};
|
|
22
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
var styleStaticConfig_exports = {};
|
|
22
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
23
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
24
|
+
var import_grammarConfig = require("./grammarConfig.cjs");
|
|
25
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
26
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
27
|
+
}
|
|
@@ -20,11 +20,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
return to;
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var
|
|
24
|
-
__export(
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=getDefaultProps.native.js.map
|
|
23
|
+
var styleStaticConfig_exports = {};
|
|
24
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
+
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
27
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
28
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var styleStaticConfig_exports = {};
|
|
24
|
+
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
|
+
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
+
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
27
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
28
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=styleStaticConfig.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleStaticConfig.native.js","names":[],"sources":["cjs/helpers/styleStaticConfig.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfig_exports = {};\n__export(styleStaticConfig_exports, {\n getStyleStaticConfig: () => getStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfig_exports);\nvar import_grammarConfig = require(\"./grammarConfig\");\nfunction getStyleStaticConfig(staticConfig, conf) {\n return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);\n}\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,4BAA4B,CAAC;AACjC,SAAS,2BAA2B,EAClC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,yBAAyB;AACvD,IAAI,uBAAuB,QAAQ,2BAAiB;AACpD,SAAS,qBAAqB,cAAc,MAAM;CAChD,QAAQ,GAAG,qBAAqB,uBAAsB,CAAE,IAAI,CAAC,CAAC,kBAAkB,cAAc,IAAI;AACpG"}
|