@tamagui/web 3.0.0-beta.831.1 → 3.0.0-beta.889.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/createComponent.cjs +12 -1
- package/dist/cjs/createComponent.native.cjs +12 -1
- package/dist/cjs/createComponent.native.js +12 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.js +1 -1
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +0 -10
- package/dist/cjs/createVariable.native.cjs +0 -10
- package/dist/cjs/createVariable.native.js +0 -10
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/helpers/borderComponents.cjs +62 -0
- package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
- package/dist/cjs/helpers/borderComponents.native.js +84 -0
- package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
- package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
- package/dist/cjs/helpers/createStyledContext.cjs +10 -18
- package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +128 -109
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +1042 -1715
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1081 -1887
- package/dist/cjs/helpers/getSplitStyles.native.js +1081 -1887
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +163 -1
- package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +9 -8
- package/dist/cjs/helpers/log.native.cjs +9 -8
- package/dist/cjs/helpers/log.native.js +9 -8
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +44 -13
- package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
- package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfig.cjs +1 -50
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -1
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/cjs/helpers/styledDynamic.cjs +160 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
- package/dist/cjs/helpers/styledDynamic.native.js +197 -0
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +15 -38
- package/dist/cjs/helpers/tokenCategories.native.cjs +15 -40
- package/dist/cjs/helpers/tokenCategories.native.js +15 -40
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +17 -12
- package/dist/cjs/helpers/variableValue.native.cjs +46 -23
- package/dist/cjs/helpers/variableValue.native.js +46 -23
- package/dist/cjs/helpers/variableValue.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +5 -4
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
- package/dist/cjs/helpers/warnOnce.native.js +6 -4
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +41 -82
- package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
- package/dist/cjs/hooks/useComponentState.native.js +45 -84
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.js +2 -2
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.cjs} +16 -8
- package/dist/cjs/{helpers/directStyleCSS.native.cjs → hooks/useStyle.native.cjs} +16 -4
- package/dist/cjs/hooks/useStyle.native.js +34 -0
- package/dist/cjs/hooks/useStyle.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeState.cjs +25 -90
- package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
- package/dist/cjs/hooks/useThemeState.native.js +34 -94
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +6 -3
- package/dist/cjs/index.native.cjs +6 -3
- package/dist/cjs/index.native.js +6 -3
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +2 -2
- package/dist/cjs/static-resolve.native.cjs +2 -2
- package/dist/cjs/static-resolve.native.js +2 -2
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +91 -0
- package/dist/cjs/style.native.cjs +98 -0
- package/dist/cjs/style.native.js +100 -0
- package/dist/cjs/style.native.js.map +1 -0
- package/dist/cjs/styled.cjs +11 -6
- package/dist/cjs/styled.native.cjs +11 -6
- package/dist/cjs/styled.native.js +11 -6
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +6 -4
- package/dist/cjs/types.native.cjs +6 -4
- package/dist/cjs/types.native.js +6 -4
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +17 -12
- package/dist/cjs/views/Text.native.cjs +1 -0
- package/dist/cjs/views/Text.native.js +1 -0
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +3 -3
- package/dist/cjs/views/Theme.native.cjs +3 -3
- package/dist/cjs/views/Theme.native.js +3 -3
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/esm/createComponent.mjs +12 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +12 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +1 -1
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +1 -1
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +1 -9
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +1 -9
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/helpers/borderComponents.mjs +37 -0
- package/dist/esm/helpers/borderComponents.mjs.map +1 -0
- package/dist/esm/helpers/borderComponents.native.js +55 -0
- package/dist/esm/helpers/borderComponents.native.js.map +1 -0
- package/dist/esm/helpers/createDesignSystem.mjs +0 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +10 -18
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +14 -18
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +6 -6
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +6 -6
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +126 -109
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs +5 -1
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +5 -1
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +1034 -1705
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1071 -1871
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +164 -2
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +187 -2
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +5 -2
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +7 -2
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +9 -8
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +9 -8
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +44 -13
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +79 -14
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +1 -50
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -1
- package/dist/esm/helpers/styleStaticConfig.native.js +1 -51
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -1
- package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/esm/helpers/styledDynamic.mjs +136 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
- package/dist/esm/helpers/styledDynamic.native.js +169 -0
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +15 -36
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +15 -38
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +17 -12
- package/dist/esm/helpers/variableValue.mjs.map +1 -1
- package/dist/esm/helpers/variableValue.native.js +46 -23
- package/dist/esm/helpers/variableValue.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +5 -4
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -4
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +41 -82
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +45 -84
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +2 -2
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +2 -2
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useStyle.mjs +11 -0
- package/dist/esm/hooks/useStyle.mjs.map +1 -0
- package/dist/esm/hooks/useStyle.native.js +11 -0
- package/dist/esm/hooks/useStyle.native.js.map +1 -0
- package/dist/esm/hooks/useThemeState.mjs +25 -90
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +34 -94
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.native.js +6 -4
- package/dist/esm/static-resolve.mjs +3 -3
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +3 -3
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +58 -0
- package/dist/esm/style.mjs.map +1 -0
- package/dist/esm/style.native.js +63 -0
- package/dist/esm/style.native.js.map +1 -0
- package/dist/esm/styled.mjs +12 -6
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +12 -6
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -4
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -4
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +1 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +1 -2
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +17 -12
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Theme.mjs +3 -3
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +3 -3
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -4
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/package.json +15 -15
- package/src/createComponent.tsx +21 -1
- package/src/createStyledHOC.tsx +4 -2
- package/src/createVariable.ts +0 -10
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +9 -9
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +192 -207
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2080 -3270
- package/src/helpers/grammarConfig.ts +218 -1
- package/src/helpers/insertStyleRule.tsx +4 -2
- package/src/helpers/log.ts +12 -11
- package/src/helpers/mergeVariants.ts +55 -18
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeStyleEngine.ts +55 -14
- package/src/helpers/normalizeValueWithProperty.ts +10 -12
- package/src/helpers/parseBorderShorthand.native.ts +23 -45
- package/src/helpers/parseOutlineShorthand.native.ts +9 -40
- package/src/helpers/resolveSafeArea.ts +34 -101
- package/src/helpers/resolveVariantStyle.ts +77 -0
- package/src/helpers/styleFrontend.ts +8 -5
- package/src/helpers/styleStaticConfig.ts +5 -72
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +40 -65
- package/src/helpers/variableValue.ts +20 -15
- package/src/helpers/warnOnce.ts +5 -4
- package/src/hooks/useAnimationDriver.ts +6 -2
- package/src/hooks/useComponentState.ts +55 -183
- package/src/hooks/useMedia.tsx +10 -8
- package/src/hooks/useStyle.ts +10 -0
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +6 -6
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +7 -4
- package/src/style.ts +97 -0
- package/src/styled.tsx +39 -68
- package/src/types.tsx +105 -169
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +20 -14
- package/src/views/Theme.tsx +13 -9
- package/src/views/ThemeDebug.tsx +0 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createVariable.d.ts +0 -2
- package/types/createVariable.d.ts.map +1 -1
- package/types/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +20 -19
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
- package/types/helpers/getDynamicVal.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +3 -5
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +25 -2
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +6 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
- package/types/helpers/resolveSafeArea.d.ts +0 -1
- package/types/helpers/resolveSafeArea.d.ts.map +1 -1
- package/types/helpers/resolveVariantStyle.d.ts +3 -0
- package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +3 -5
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +4 -9
- package/types/helpers/styleStaticConfig.d.ts.map +1 -1
- package/types/helpers/styleStaticConfigCore.d.ts +4 -0
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
- package/types/helpers/styledDynamic.d.ts +18 -0
- package/types/helpers/styledDynamic.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +0 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +68 -68
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +4 -0
- package/types/hooks/useStyle.d.ts.map +1 -0
- package/types/hooks/useThemeState.d.ts +1 -11
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +6 -4
- package/types/index.d.ts.map +1 -1
- package/types/internalRuntimeTypes.d.ts +1 -1
- package/types/internalRuntimeTypes.d.ts.map +1 -1
- package/types/static-resolve.d.ts.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +10 -10
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +74 -49
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +0 -345
- package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
- package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
- package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
- package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
- package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/cjs/helpers/variantResolvers.cjs +0 -87
- package/dist/cjs/helpers/variantResolvers.native.cjs +0 -140
- package/dist/cjs/helpers/variantResolvers.native.js +0 -142
- package/dist/cjs/helpers/variantResolvers.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -317
- package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSS.native.js +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
- package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
- package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/esm/helpers/getVariantExtras.mjs +0 -69
- package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
- package/dist/esm/helpers/getVariantExtras.native.js +0 -70
- package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/esm/helpers/variantResolvers.mjs +0 -65
- package/dist/esm/helpers/variantResolvers.mjs.map +0 -1
- package/dist/esm/helpers/variantResolvers.native.js +0 -116
- package/dist/esm/helpers/variantResolvers.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -513
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/variantResolvers.ts +0 -121
- package/types/helpers/directStyleCSS.d.ts +0 -28
- package/types/helpers/directStyleCSS.d.ts.map +0 -1
- package/types/helpers/directStyleCSS.native.d.ts +0 -2
- package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
- package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
- package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/variantResolvers.d.ts +0 -9
- package/types/helpers/variantResolvers.d.ts.map +0 -1
|
@@ -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"}
|
|
@@ -21,56 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var styleStaticConfig_exports = {};
|
|
22
22
|
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
23
23
|
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
24
|
-
var import_helpers = require("@tamagui/helpers");
|
|
25
24
|
var import_grammarConfig = require("./grammarConfig.cjs");
|
|
26
|
-
const styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
27
25
|
function getStyleStaticConfig(staticConfig, conf) {
|
|
28
|
-
|
|
29
|
-
const revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
30
|
-
const cached = configCache?.get(conf);
|
|
31
|
-
if (cached?.revision === revision) return cached.value;
|
|
32
|
-
const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(staticConfig, conf);
|
|
33
|
-
const variants = normalized ? normalized.variants : staticConfig.variants;
|
|
34
|
-
const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
35
|
-
const authoredDefaultProps = staticConfig.defaultProps;
|
|
36
|
-
let baseStyle;
|
|
37
|
-
let baseVariantProps;
|
|
38
|
-
let defaultProps;
|
|
39
|
-
if (authoredDefaultProps) {
|
|
40
|
-
const validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
41
|
-
for (const key in authoredDefaultProps) {
|
|
42
|
-
const isVariant = Boolean(variants?.[key]);
|
|
43
|
-
const isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
44
|
-
if (isVariant || isStyle) {
|
|
45
|
-
;
|
|
46
|
-
(baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
|
|
47
|
-
}
|
|
48
|
-
if (isVariant || !isStyle) {
|
|
49
|
-
;
|
|
50
|
-
(defaultProps ||= {})[key] = authoredDefaultProps[key];
|
|
51
|
-
}
|
|
52
|
-
if (isVariant) {
|
|
53
|
-
;
|
|
54
|
-
(baseVariantProps ||= {})[key] = authoredDefaultProps[key];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
|
|
59
|
-
const value = {
|
|
60
|
-
baseStyle: baseStyle || authoredBaseStyle,
|
|
61
|
-
baseVariantProps,
|
|
62
|
-
defaultProps,
|
|
63
|
-
styledContextKeys: keys ? new Set(keys) : null,
|
|
64
|
-
variants,
|
|
65
|
-
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
66
|
-
};
|
|
67
|
-
if (!configCache) {
|
|
68
|
-
configCache = /* @__PURE__ */ new WeakMap();
|
|
69
|
-
styleStaticConfigCache.set(staticConfig, configCache);
|
|
70
|
-
}
|
|
71
|
-
configCache.set(conf, {
|
|
72
|
-
revision,
|
|
73
|
-
value
|
|
74
|
-
});
|
|
75
|
-
return value;
|
|
26
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
76
27
|
}
|
|
@@ -23,57 +23,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
var styleStaticConfig_exports = {};
|
|
24
24
|
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
25
|
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
-
var import_helpers = require("@tamagui/helpers");
|
|
27
26
|
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
28
|
-
var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
29
27
|
function getStyleStaticConfig(staticConfig, conf) {
|
|
30
|
-
|
|
31
|
-
var configCache = styleStaticConfigCache.get(staticConfig);
|
|
32
|
-
var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
33
|
-
var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
|
|
34
|
-
if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
|
|
35
|
-
var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
|
|
36
|
-
var variants = normalized ? normalized.variants : staticConfig.variants;
|
|
37
|
-
var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
38
|
-
var authoredDefaultProps = staticConfig.defaultProps;
|
|
39
|
-
var baseStyle;
|
|
40
|
-
var baseVariantProps;
|
|
41
|
-
var defaultProps;
|
|
42
|
-
if (authoredDefaultProps) {
|
|
43
|
-
var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
44
|
-
for (var key in authoredDefaultProps) {
|
|
45
|
-
var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
|
|
46
|
-
var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
47
|
-
if (isVariant || isStyle) {
|
|
48
|
-
;
|
|
49
|
-
(baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
|
|
50
|
-
}
|
|
51
|
-
if (isVariant || !isStyle) {
|
|
52
|
-
;
|
|
53
|
-
(defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
|
|
54
|
-
}
|
|
55
|
-
if (isVariant) {
|
|
56
|
-
;
|
|
57
|
-
(baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
|
|
62
|
-
var value = {
|
|
63
|
-
baseStyle: baseStyle || authoredBaseStyle,
|
|
64
|
-
baseVariantProps,
|
|
65
|
-
defaultProps,
|
|
66
|
-
styledContextKeys: keys ? new Set(keys) : null,
|
|
67
|
-
variants,
|
|
68
|
-
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
69
|
-
};
|
|
70
|
-
if (!configCache) {
|
|
71
|
-
configCache = /* @__PURE__ */ new WeakMap();
|
|
72
|
-
styleStaticConfigCache.set(staticConfig, configCache);
|
|
73
|
-
}
|
|
74
|
-
configCache.set(conf, {
|
|
75
|
-
revision,
|
|
76
|
-
value
|
|
77
|
-
});
|
|
78
|
-
return value;
|
|
28
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
79
29
|
}
|
|
@@ -23,59 +23,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
var styleStaticConfig_exports = {};
|
|
24
24
|
__export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
|
|
25
25
|
module.exports = __toCommonJS(styleStaticConfig_exports);
|
|
26
|
-
var import_helpers = require("@tamagui/helpers");
|
|
27
26
|
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
28
|
-
var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
29
27
|
function getStyleStaticConfig(staticConfig, conf) {
|
|
30
|
-
|
|
31
|
-
var configCache = styleStaticConfigCache.get(staticConfig);
|
|
32
|
-
var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
|
|
33
|
-
var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
|
|
34
|
-
if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
|
|
35
|
-
var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
|
|
36
|
-
var variants = normalized ? normalized.variants : staticConfig.variants;
|
|
37
|
-
var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
38
|
-
var authoredDefaultProps = staticConfig.defaultProps;
|
|
39
|
-
var baseStyle;
|
|
40
|
-
var baseVariantProps;
|
|
41
|
-
var defaultProps;
|
|
42
|
-
if (authoredDefaultProps) {
|
|
43
|
-
var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
44
|
-
for (var key in authoredDefaultProps) {
|
|
45
|
-
var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
|
|
46
|
-
var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
|
|
47
|
-
if (isVariant || isStyle) {
|
|
48
|
-
;
|
|
49
|
-
(baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
|
|
50
|
-
}
|
|
51
|
-
if (isVariant || !isStyle) {
|
|
52
|
-
;
|
|
53
|
-
(defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
|
|
54
|
-
}
|
|
55
|
-
if (isVariant) {
|
|
56
|
-
;
|
|
57
|
-
(baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
|
|
62
|
-
var value = {
|
|
63
|
-
baseStyle: baseStyle || authoredBaseStyle,
|
|
64
|
-
baseVariantProps,
|
|
65
|
-
defaultProps,
|
|
66
|
-
styledContextKeys: keys ? new Set(keys) : null,
|
|
67
|
-
variants,
|
|
68
|
-
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
69
|
-
};
|
|
70
|
-
if (!configCache) {
|
|
71
|
-
configCache = /* @__PURE__ */ new WeakMap();
|
|
72
|
-
styleStaticConfigCache.set(staticConfig, configCache);
|
|
73
|
-
}
|
|
74
|
-
configCache.set(conf, {
|
|
75
|
-
revision,
|
|
76
|
-
value
|
|
77
|
-
});
|
|
78
|
-
return value;
|
|
28
|
+
return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
|
|
79
29
|
}
|
|
80
30
|
|
|
81
31
|
//# sourceMappingURL=styleStaticConfig.native.js.map
|
|
@@ -1 +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
|
|
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"}
|