@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
|
@@ -23,11 +23,11 @@ __export(normalizeValueWithProperty_exports, { normalizeValueWithProperty: () =>
|
|
|
23
23
|
module.exports = __toCommonJS(normalizeValueWithProperty_exports);
|
|
24
24
|
var import_constants = require("@tamagui/constants");
|
|
25
25
|
var import_helpers = require("@tamagui/helpers");
|
|
26
|
-
const
|
|
27
|
-
...import_helpers.stylePropsAll,
|
|
28
|
-
translateX
|
|
29
|
-
translateY
|
|
30
|
-
|
|
26
|
+
const unitfulProps = new Set([
|
|
27
|
+
...Object.keys(import_helpers.stylePropsAll),
|
|
28
|
+
"translateX",
|
|
29
|
+
"translateY"
|
|
30
|
+
].filter((key) => !import_helpers.stylePropsUnitless[key]));
|
|
31
31
|
const pxStringRe = /^-?\d*\.?\d+px$/;
|
|
32
32
|
function normalizeValueWithProperty(value, property = "") {
|
|
33
33
|
if (!import_constants.isWeb) {
|
|
@@ -36,9 +36,8 @@ function normalizeValueWithProperty(value, property = "") {
|
|
|
36
36
|
}
|
|
37
37
|
return value;
|
|
38
38
|
}
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
}
|
|
39
|
+
if (property !== "" && !unitfulProps.has(property)) return value;
|
|
40
|
+
if (typeof value === "boolean") return value;
|
|
42
41
|
if (value && typeof value === "object") {
|
|
43
42
|
if (typeof value.__getValue === "function") {
|
|
44
43
|
value = value.__getValue();
|
|
@@ -29,11 +29,13 @@ function _type_of(obj) {
|
|
|
29
29
|
"@swc/helpers - typeof";
|
|
30
30
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
...import_helpers.stylePropsAll,
|
|
34
|
-
translateX
|
|
35
|
-
translateY
|
|
36
|
-
|
|
32
|
+
var unitfulProps = new Set([
|
|
33
|
+
...Object.keys(import_helpers.stylePropsAll),
|
|
34
|
+
"translateX",
|
|
35
|
+
"translateY"
|
|
36
|
+
].filter(function(key) {
|
|
37
|
+
return !import_helpers.stylePropsUnitless[key];
|
|
38
|
+
}));
|
|
37
39
|
var pxStringRe = /^-?\d*\.?\d+px$/;
|
|
38
40
|
function normalizeValueWithProperty(value) {
|
|
39
41
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
@@ -43,9 +45,8 @@ function normalizeValueWithProperty(value) {
|
|
|
43
45
|
}
|
|
44
46
|
return value;
|
|
45
47
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
}
|
|
48
|
+
if (property !== "" && !unitfulProps.has(property)) return value;
|
|
49
|
+
if (typeof value === "boolean") return value;
|
|
49
50
|
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") {
|
|
50
51
|
if (typeof value.__getValue === "function") {
|
|
51
52
|
value = value.__getValue();
|
|
@@ -29,11 +29,13 @@ function _type_of(obj) {
|
|
|
29
29
|
"@swc/helpers - typeof";
|
|
30
30
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
...import_helpers.stylePropsAll,
|
|
34
|
-
translateX
|
|
35
|
-
translateY
|
|
36
|
-
|
|
32
|
+
var unitfulProps = new Set([
|
|
33
|
+
...Object.keys(import_helpers.stylePropsAll),
|
|
34
|
+
"translateX",
|
|
35
|
+
"translateY"
|
|
36
|
+
].filter(function(key) {
|
|
37
|
+
return !import_helpers.stylePropsUnitless[key];
|
|
38
|
+
}));
|
|
37
39
|
var pxStringRe = /^-?\d*\.?\d+px$/;
|
|
38
40
|
function normalizeValueWithProperty(value) {
|
|
39
41
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
@@ -43,9 +45,8 @@ function normalizeValueWithProperty(value) {
|
|
|
43
45
|
}
|
|
44
46
|
return value;
|
|
45
47
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
}
|
|
48
|
+
if (property !== "" && !unitfulProps.has(property)) return value;
|
|
49
|
+
if (typeof value === "boolean") return value;
|
|
49
50
|
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") {
|
|
50
51
|
if (typeof value.__getValue === "function") {
|
|
51
52
|
value = value.__getValue();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeValueWithProperty.native.js","names":[],"sources":["cjs/helpers/normalizeValueWithProperty.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 normalizeValueWithProperty_exports = {};\n__export(normalizeValueWithProperty_exports, {\n normalizeValueWithProperty: () => normalizeValueWithProperty\n});\nmodule.exports = __toCommonJS(normalizeValueWithProperty_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_helpers = require(\"@tamagui/helpers\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar
|
|
1
|
+
{"version":3,"file":"normalizeValueWithProperty.native.js","names":[],"sources":["cjs/helpers/normalizeValueWithProperty.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 normalizeValueWithProperty_exports = {};\n__export(normalizeValueWithProperty_exports, {\n normalizeValueWithProperty: () => normalizeValueWithProperty\n});\nmodule.exports = __toCommonJS(normalizeValueWithProperty_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_helpers = require(\"@tamagui/helpers\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar unitfulProps = new Set([\n ...Object.keys(import_helpers.stylePropsAll),\n \"translateX\",\n \"translateY\"\n].filter(function(key) {\n return !import_helpers.stylePropsUnitless[key];\n}));\nvar pxStringRe = /^-?\\d*\\.?\\d+px$/;\nfunction normalizeValueWithProperty(value) {\n var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n if (!import_constants.isWeb) {\n if (typeof value === \"string\" && pxStringRe.test(value)) {\n return Number.parseFloat(value);\n }\n return value;\n }\n if (property !== \"\" && !unitfulProps.has(property)) return value;\n if (typeof value === \"boolean\") return value;\n if (value && (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"object\") {\n if (typeof value.__getValue === \"function\") {\n value = value.__getValue();\n } else {\n return value;\n }\n }\n var res = value;\n if (typeof value === \"number\") {\n res = `${value}px`;\n } else if (property) {\n res = `${res}`;\n }\n return res;\n}\n//# sourceMappingURL=normalizeValueWithProperty.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,qCAAqC,CAAC;AAC1C,SAAS,oCAAoC,EAC3C,kCAAkC,2BACpC,CAAC;AACD,OAAO,UAAU,aAAa,kCAAkC;AAChE,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,IAAI,eAAe,IAAI,IAAI;CACzB,GAAG,OAAO,KAAK,eAAe,aAAa;CAC3C;CACA;AACF,CAAC,CAAC,OAAO,SAAS,KAAK;CACrB,OAAO,CAAC,eAAe,mBAAmB;AAC5C,CAAC,CAAC;AACF,IAAI,aAAa;AACjB,SAAS,2BAA2B,OAAO;CACzC,IAAI,WAAW,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAChF,IAAI,CAAC,iBAAiB,OAAO;EAC3B,IAAI,OAAO,UAAU,YAAY,WAAW,KAAK,KAAK,GAAG;GACvD,OAAO,OAAO,WAAW,KAAK;EAChC;EACA,OAAO;CACT;CACA,IAAI,aAAa,MAAM,CAAC,aAAa,IAAI,QAAQ,GAAG,OAAO;CAC3D,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,IAAI,UAAU,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO,UAAU;EACxF,IAAI,OAAO,MAAM,eAAe,YAAY;GAC1C,QAAQ,MAAM,WAAW;EAC3B,OAAO;GACL,OAAO;EACT;CACF;CACA,IAAI,MAAM;CACV,IAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,GAAG,MAAM;CACjB,OAAO,IAAI,UAAU;EACnB,MAAM,GAAG;CACX;CACA,OAAO;AACT"}
|
|
@@ -21,20 +21,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var parseBorderShorthand_native_exports = {};
|
|
24
|
-
__export(parseBorderShorthand_native_exports, {
|
|
24
|
+
__export(parseBorderShorthand_native_exports, {
|
|
25
|
+
parseBorderShorthand: () => parseBorderShorthand,
|
|
26
|
+
toNativeBorderWidth: () => toNativeBorderWidth
|
|
27
|
+
});
|
|
25
28
|
module.exports = __toCommonJS(parseBorderShorthand_native_exports);
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"inset",
|
|
34
|
-
"outset",
|
|
35
|
-
"none",
|
|
36
|
-
"hidden"
|
|
37
|
-
]);
|
|
29
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
30
|
+
function toNativeBorderWidth(width) {
|
|
31
|
+
if (width === "thin") return 1;
|
|
32
|
+
if (width === "medium") return 3;
|
|
33
|
+
if (width === "thick") return 5;
|
|
34
|
+
return width.endsWith("px") || !/[a-z%]/i.test(width) ? Number.parseFloat(width) : width;
|
|
35
|
+
}
|
|
38
36
|
function parseBorderShorthand(value) {
|
|
39
37
|
if (value === "none" || value === "0") {
|
|
40
38
|
return [
|
|
@@ -45,52 +43,23 @@ function parseBorderShorthand(value) {
|
|
|
45
43
|
["borderStyle", "solid"]
|
|
46
44
|
];
|
|
47
45
|
}
|
|
48
|
-
var
|
|
49
|
-
var borderWidth;
|
|
50
|
-
var borderStyle;
|
|
51
|
-
var borderColor;
|
|
52
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
53
|
-
try {
|
|
54
|
-
for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
55
|
-
var part = _step.value;
|
|
56
|
-
if (borderStyles.has(part)) {
|
|
57
|
-
borderStyle = part;
|
|
58
|
-
} else if (/^[\d.]+(?:px|em|rem|%|pt|vw|vh)?$/.test(part)) {
|
|
59
|
-
var num = parseFloat(part);
|
|
60
|
-
borderWidth = part.endsWith("px") || !part.match(/[a-z%]/i) ? num : part;
|
|
61
|
-
} else {
|
|
62
|
-
borderColor = part;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
} catch (err) {
|
|
66
|
-
_didIteratorError = true;
|
|
67
|
-
_iteratorError = err;
|
|
68
|
-
} finally {
|
|
69
|
-
try {
|
|
70
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
71
|
-
_iterator.return();
|
|
72
|
-
}
|
|
73
|
-
} finally {
|
|
74
|
-
if (_didIteratorError) {
|
|
75
|
-
throw _iteratorError;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
46
|
+
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value);
|
|
79
47
|
var result = [];
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
result.push(["
|
|
83
|
-
result.push(["
|
|
84
|
-
result.push(["
|
|
48
|
+
if (width !== void 0) {
|
|
49
|
+
var nativeWidth = toNativeBorderWidth(width);
|
|
50
|
+
result.push(["borderTopWidth", nativeWidth]);
|
|
51
|
+
result.push(["borderRightWidth", nativeWidth]);
|
|
52
|
+
result.push(["borderBottomWidth", nativeWidth]);
|
|
53
|
+
result.push(["borderLeftWidth", nativeWidth]);
|
|
85
54
|
}
|
|
86
|
-
if (
|
|
87
|
-
result.push(["borderStyle",
|
|
55
|
+
if (style !== void 0) {
|
|
56
|
+
result.push(["borderStyle", style]);
|
|
88
57
|
}
|
|
89
|
-
if (
|
|
90
|
-
result.push(["borderTopColor",
|
|
91
|
-
result.push(["borderRightColor",
|
|
92
|
-
result.push(["borderBottomColor",
|
|
93
|
-
result.push(["borderLeftColor",
|
|
58
|
+
if (color !== void 0) {
|
|
59
|
+
result.push(["borderTopColor", color]);
|
|
60
|
+
result.push(["borderRightColor", color]);
|
|
61
|
+
result.push(["borderBottomColor", color]);
|
|
62
|
+
result.push(["borderLeftColor", color]);
|
|
94
63
|
}
|
|
95
64
|
return result.length > 0 ? result : void 0;
|
|
96
65
|
}
|
|
@@ -21,20 +21,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var parseBorderShorthand_native_exports = {};
|
|
24
|
-
__export(parseBorderShorthand_native_exports, {
|
|
24
|
+
__export(parseBorderShorthand_native_exports, {
|
|
25
|
+
parseBorderShorthand: () => parseBorderShorthand,
|
|
26
|
+
toNativeBorderWidth: () => toNativeBorderWidth
|
|
27
|
+
});
|
|
25
28
|
module.exports = __toCommonJS(parseBorderShorthand_native_exports);
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"inset",
|
|
34
|
-
"outset",
|
|
35
|
-
"none",
|
|
36
|
-
"hidden"
|
|
37
|
-
]);
|
|
29
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
30
|
+
function toNativeBorderWidth(width) {
|
|
31
|
+
if (width === "thin") return 1;
|
|
32
|
+
if (width === "medium") return 3;
|
|
33
|
+
if (width === "thick") return 5;
|
|
34
|
+
return width.endsWith("px") || !/[a-z%]/i.test(width) ? Number.parseFloat(width) : width;
|
|
35
|
+
}
|
|
38
36
|
function parseBorderShorthand(value) {
|
|
39
37
|
if (value === "none" || value === "0") {
|
|
40
38
|
return [
|
|
@@ -45,52 +43,23 @@ function parseBorderShorthand(value) {
|
|
|
45
43
|
["borderStyle", "solid"]
|
|
46
44
|
];
|
|
47
45
|
}
|
|
48
|
-
var
|
|
49
|
-
var borderWidth;
|
|
50
|
-
var borderStyle;
|
|
51
|
-
var borderColor;
|
|
52
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
53
|
-
try {
|
|
54
|
-
for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
55
|
-
var part = _step.value;
|
|
56
|
-
if (borderStyles.has(part)) {
|
|
57
|
-
borderStyle = part;
|
|
58
|
-
} else if (/^[\d.]+(?:px|em|rem|%|pt|vw|vh)?$/.test(part)) {
|
|
59
|
-
var num = parseFloat(part);
|
|
60
|
-
borderWidth = part.endsWith("px") || !part.match(/[a-z%]/i) ? num : part;
|
|
61
|
-
} else {
|
|
62
|
-
borderColor = part;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
} catch (err) {
|
|
66
|
-
_didIteratorError = true;
|
|
67
|
-
_iteratorError = err;
|
|
68
|
-
} finally {
|
|
69
|
-
try {
|
|
70
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
71
|
-
_iterator.return();
|
|
72
|
-
}
|
|
73
|
-
} finally {
|
|
74
|
-
if (_didIteratorError) {
|
|
75
|
-
throw _iteratorError;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
46
|
+
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value);
|
|
79
47
|
var result = [];
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
result.push(["
|
|
83
|
-
result.push(["
|
|
84
|
-
result.push(["
|
|
48
|
+
if (width !== void 0) {
|
|
49
|
+
var nativeWidth = toNativeBorderWidth(width);
|
|
50
|
+
result.push(["borderTopWidth", nativeWidth]);
|
|
51
|
+
result.push(["borderRightWidth", nativeWidth]);
|
|
52
|
+
result.push(["borderBottomWidth", nativeWidth]);
|
|
53
|
+
result.push(["borderLeftWidth", nativeWidth]);
|
|
85
54
|
}
|
|
86
|
-
if (
|
|
87
|
-
result.push(["borderStyle",
|
|
55
|
+
if (style !== void 0) {
|
|
56
|
+
result.push(["borderStyle", style]);
|
|
88
57
|
}
|
|
89
|
-
if (
|
|
90
|
-
result.push(["borderTopColor",
|
|
91
|
-
result.push(["borderRightColor",
|
|
92
|
-
result.push(["borderBottomColor",
|
|
93
|
-
result.push(["borderLeftColor",
|
|
58
|
+
if (color !== void 0) {
|
|
59
|
+
result.push(["borderTopColor", color]);
|
|
60
|
+
result.push(["borderRightColor", color]);
|
|
61
|
+
result.push(["borderBottomColor", color]);
|
|
62
|
+
result.push(["borderLeftColor", color]);
|
|
94
63
|
}
|
|
95
64
|
return result.length > 0 ? result : void 0;
|
|
96
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseBorderShorthand.native.js","names":[],"sources":["cjs/helpers/parseBorderShorthand.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 parseBorderShorthand_native_exports = {};\n__export(parseBorderShorthand_native_exports, {\n parseBorderShorthand: () => parseBorderShorthand\n});\nmodule.exports = __toCommonJS(parseBorderShorthand_native_exports);\nvar
|
|
1
|
+
{"version":3,"file":"parseBorderShorthand.native.js","names":[],"sources":["cjs/helpers/parseBorderShorthand.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 parseBorderShorthand_native_exports = {};\n__export(parseBorderShorthand_native_exports, {\n parseBorderShorthand: () => parseBorderShorthand,\n toNativeBorderWidth: () => toNativeBorderWidth\n});\nmodule.exports = __toCommonJS(parseBorderShorthand_native_exports);\nvar import_borderComponents = require(\"./borderComponents\");\nfunction toNativeBorderWidth(width) {\n if (width === \"thin\") return 1;\n if (width === \"medium\") return 3;\n if (width === \"thick\") return 5;\n return width.endsWith(\"px\") || !/[a-z%]/i.test(width) ? Number.parseFloat(width) : width;\n}\nfunction parseBorderShorthand(value) {\n if (value === \"none\" || value === \"0\") {\n return [\n [\n \"borderTopWidth\",\n 0\n ],\n [\n \"borderRightWidth\",\n 0\n ],\n [\n \"borderBottomWidth\",\n 0\n ],\n [\n \"borderLeftWidth\",\n 0\n ],\n [\n \"borderStyle\",\n \"solid\"\n ]\n ];\n }\n var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value);\n var result = [];\n if (width !== void 0) {\n var nativeWidth = toNativeBorderWidth(width);\n result.push([\n \"borderTopWidth\",\n nativeWidth\n ]);\n result.push([\n \"borderRightWidth\",\n nativeWidth\n ]);\n result.push([\n \"borderBottomWidth\",\n nativeWidth\n ]);\n result.push([\n \"borderLeftWidth\",\n nativeWidth\n ]);\n }\n if (style !== void 0) {\n result.push([\n \"borderStyle\",\n style\n ]);\n }\n if (color !== void 0) {\n result.push([\n \"borderTopColor\",\n color\n ]);\n result.push([\n \"borderRightColor\",\n color\n ]);\n result.push([\n \"borderBottomColor\",\n color\n ]);\n result.push([\n \"borderLeftColor\",\n color\n ]);\n }\n return result.length > 0 ? result : void 0;\n}\n//# sourceMappingURL=parseBorderShorthand.native.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,sCAAsC,CAAC;AAC3C,SAAS,qCAAqC;CAC5C,4BAA4B;CAC5B,2BAA2B;AAC7B,CAAC;AACD,OAAO,UAAU,aAAa,mCAAmC;AACjE,IAAI,0BAA0B,QAAQ,8BAAoB;AAC1D,SAAS,oBAAoB,OAAO;CAClC,IAAI,UAAU,QAAQ,OAAO;CAC7B,IAAI,UAAU,UAAU,OAAO;CAC/B,IAAI,UAAU,SAAS,OAAO;CAC9B,OAAO,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,WAAW,KAAK,IAAI;AACrF;AACA,SAAS,qBAAqB,OAAO;CACnC,IAAI,UAAU,UAAU,UAAU,KAAK;EACrC,OAAO;GACL,CACE,kBACA,CACF;GACA,CACE,oBACA,CACF;GACA,CACE,qBACA,CACF;GACA,CACE,mBACA,CACF;GACA,CACE,eACA,OACF;EACF;CACF;CACA,IAAI,EAAE,OAAO,OAAO,WAAW,GAAG,wBAAwB,yBAAwB,CAAE,KAAK;CACzF,IAAI,SAAS,CAAC;CACd,IAAI,UAAU,KAAK,GAAG;EACpB,IAAI,cAAc,oBAAoB,KAAK;EAC3C,OAAO,KAAK,CACV,kBACA,WACF,CAAC;EACD,OAAO,KAAK,CACV,oBACA,WACF,CAAC;EACD,OAAO,KAAK,CACV,qBACA,WACF,CAAC;EACD,OAAO,KAAK,CACV,mBACA,WACF,CAAC;CACH;CACA,IAAI,UAAU,KAAK,GAAG;EACpB,OAAO,KAAK,CACV,eACA,KACF,CAAC;CACH;CACA,IAAI,UAAU,KAAK,GAAG;EACpB,OAAO,KAAK,CACV,kBACA,KACF,CAAC;EACD,OAAO,KAAK,CACV,oBACA,KACF,CAAC;EACD,OAAO,KAAK,CACV,qBACA,KACF,CAAC;EACD,OAAO,KAAK,CACV,mBACA,KACF,CAAC;CACH;CACA,OAAO,OAAO,SAAS,IAAI,SAAS,KAAK;AAC3C"}
|
|
@@ -23,62 +23,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
var parseOutlineShorthand_native_exports = {};
|
|
24
24
|
__export(parseOutlineShorthand_native_exports, { parseOutlineShorthand: () => parseOutlineShorthand });
|
|
25
25
|
module.exports = __toCommonJS(parseOutlineShorthand_native_exports);
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
"dashed",
|
|
29
|
-
"dotted",
|
|
30
|
-
"double",
|
|
31
|
-
"groove",
|
|
32
|
-
"ridge",
|
|
33
|
-
"inset",
|
|
34
|
-
"outset",
|
|
35
|
-
"none",
|
|
36
|
-
"hidden"
|
|
37
|
-
]);
|
|
26
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
27
|
+
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
38
28
|
function parseOutlineShorthand(value) {
|
|
39
29
|
if (value === "none" || value === "0") {
|
|
40
30
|
return [["outlineWidth", 0], ["outlineStyle", "none"]];
|
|
41
31
|
}
|
|
42
|
-
var
|
|
43
|
-
var outlineWidth;
|
|
44
|
-
var outlineStyle;
|
|
45
|
-
var outlineColor;
|
|
46
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
47
|
-
try {
|
|
48
|
-
for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
49
|
-
var part = _step.value;
|
|
50
|
-
if (outlineStyles.has(part)) {
|
|
51
|
-
outlineStyle = part;
|
|
52
|
-
} else if (/^[\d.]+(?:px|em|rem|%|pt|vw|vh)?$/.test(part)) {
|
|
53
|
-
var num = parseFloat(part);
|
|
54
|
-
outlineWidth = part.endsWith("px") || !part.match(/[a-z%]/i) ? num : part;
|
|
55
|
-
} else {
|
|
56
|
-
outlineColor = part;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
} catch (err) {
|
|
60
|
-
_didIteratorError = true;
|
|
61
|
-
_iteratorError = err;
|
|
62
|
-
} finally {
|
|
63
|
-
try {
|
|
64
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
65
|
-
_iterator.return();
|
|
66
|
-
}
|
|
67
|
-
} finally {
|
|
68
|
-
if (_didIteratorError) {
|
|
69
|
-
throw _iteratorError;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
32
|
+
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value, true);
|
|
73
33
|
var result = [];
|
|
74
|
-
if (
|
|
75
|
-
result.push(["outlineWidth",
|
|
34
|
+
if (width !== void 0) {
|
|
35
|
+
result.push(["outlineWidth", (0, import_parseBorderShorthand.toNativeBorderWidth)(width)]);
|
|
76
36
|
}
|
|
77
|
-
if (
|
|
78
|
-
result.push(["outlineStyle",
|
|
37
|
+
if (style !== void 0) {
|
|
38
|
+
result.push(["outlineStyle", style]);
|
|
79
39
|
}
|
|
80
|
-
if (
|
|
81
|
-
result.push(["outlineColor",
|
|
40
|
+
if (color !== void 0) {
|
|
41
|
+
result.push(["outlineColor", color]);
|
|
82
42
|
}
|
|
83
43
|
return result.length > 0 ? result : void 0;
|
|
84
44
|
}
|
|
@@ -23,62 +23,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
var parseOutlineShorthand_native_exports = {};
|
|
24
24
|
__export(parseOutlineShorthand_native_exports, { parseOutlineShorthand: () => parseOutlineShorthand });
|
|
25
25
|
module.exports = __toCommonJS(parseOutlineShorthand_native_exports);
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
"dashed",
|
|
29
|
-
"dotted",
|
|
30
|
-
"double",
|
|
31
|
-
"groove",
|
|
32
|
-
"ridge",
|
|
33
|
-
"inset",
|
|
34
|
-
"outset",
|
|
35
|
-
"none",
|
|
36
|
-
"hidden"
|
|
37
|
-
]);
|
|
26
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
27
|
+
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
38
28
|
function parseOutlineShorthand(value) {
|
|
39
29
|
if (value === "none" || value === "0") {
|
|
40
30
|
return [["outlineWidth", 0], ["outlineStyle", "none"]];
|
|
41
31
|
}
|
|
42
|
-
var
|
|
43
|
-
var outlineWidth;
|
|
44
|
-
var outlineStyle;
|
|
45
|
-
var outlineColor;
|
|
46
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
47
|
-
try {
|
|
48
|
-
for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
49
|
-
var part = _step.value;
|
|
50
|
-
if (outlineStyles.has(part)) {
|
|
51
|
-
outlineStyle = part;
|
|
52
|
-
} else if (/^[\d.]+(?:px|em|rem|%|pt|vw|vh)?$/.test(part)) {
|
|
53
|
-
var num = parseFloat(part);
|
|
54
|
-
outlineWidth = part.endsWith("px") || !part.match(/[a-z%]/i) ? num : part;
|
|
55
|
-
} else {
|
|
56
|
-
outlineColor = part;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
} catch (err) {
|
|
60
|
-
_didIteratorError = true;
|
|
61
|
-
_iteratorError = err;
|
|
62
|
-
} finally {
|
|
63
|
-
try {
|
|
64
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
65
|
-
_iterator.return();
|
|
66
|
-
}
|
|
67
|
-
} finally {
|
|
68
|
-
if (_didIteratorError) {
|
|
69
|
-
throw _iteratorError;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
32
|
+
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value, true);
|
|
73
33
|
var result = [];
|
|
74
|
-
if (
|
|
75
|
-
result.push(["outlineWidth",
|
|
34
|
+
if (width !== void 0) {
|
|
35
|
+
result.push(["outlineWidth", (0, import_parseBorderShorthand.toNativeBorderWidth)(width)]);
|
|
76
36
|
}
|
|
77
|
-
if (
|
|
78
|
-
result.push(["outlineStyle",
|
|
37
|
+
if (style !== void 0) {
|
|
38
|
+
result.push(["outlineStyle", style]);
|
|
79
39
|
}
|
|
80
|
-
if (
|
|
81
|
-
result.push(["outlineColor",
|
|
40
|
+
if (color !== void 0) {
|
|
41
|
+
result.push(["outlineColor", color]);
|
|
82
42
|
}
|
|
83
43
|
return result.length > 0 ? result : void 0;
|
|
84
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseOutlineShorthand.native.js","names":[],"sources":["cjs/helpers/parseOutlineShorthand.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 parseOutlineShorthand_native_exports = {};\n__export(parseOutlineShorthand_native_exports, {\n parseOutlineShorthand: () => parseOutlineShorthand\n});\nmodule.exports = __toCommonJS(parseOutlineShorthand_native_exports);\nvar
|
|
1
|
+
{"version":3,"file":"parseOutlineShorthand.native.js","names":[],"sources":["cjs/helpers/parseOutlineShorthand.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 parseOutlineShorthand_native_exports = {};\n__export(parseOutlineShorthand_native_exports, {\n parseOutlineShorthand: () => parseOutlineShorthand\n});\nmodule.exports = __toCommonJS(parseOutlineShorthand_native_exports);\nvar import_borderComponents = require(\"./borderComponents\");\nvar import_parseBorderShorthand = require(\"./parseBorderShorthand.native\");\nfunction parseOutlineShorthand(value) {\n if (value === \"none\" || value === \"0\") {\n return [\n [\n \"outlineWidth\",\n 0\n ],\n [\n \"outlineStyle\",\n \"none\"\n ]\n ];\n }\n var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(value, true);\n var result = [];\n if (width !== void 0) {\n result.push([\n \"outlineWidth\",\n (0, import_parseBorderShorthand.toNativeBorderWidth)(width)\n ]);\n }\n if (style !== void 0) {\n result.push([\n \"outlineStyle\",\n style\n ]);\n }\n if (color !== void 0) {\n result.push([\n \"outlineColor\",\n color\n ]);\n }\n return result.length > 0 ? result : void 0;\n}\n//# sourceMappingURL=parseOutlineShorthand.native.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,uCAAuC,CAAC;AAC5C,SAAS,sCAAsC,EAC7C,6BAA6B,sBAC/B,CAAC;AACD,OAAO,UAAU,aAAa,oCAAoC;AAClE,IAAI,0BAA0B,QAAQ,8BAAoB;AAC1D,IAAI,8BAA8B,QAAQ,kCAA+B;AACzE,SAAS,sBAAsB,OAAO;CACpC,IAAI,UAAU,UAAU,UAAU,KAAK;EACrC,OAAO,CACL,CACE,gBACA,CACF,GACA,CACE,gBACA,MACF,CACF;CACF;CACA,IAAI,EAAE,OAAO,OAAO,WAAW,GAAG,wBAAwB,yBAAwB,CAAE,OAAO,IAAI;CAC/F,IAAI,SAAS,CAAC;CACd,IAAI,UAAU,KAAK,GAAG;EACpB,OAAO,KAAK,CACV,iBACC,GAAG,4BAA4B,oBAAmB,CAAE,KAAK,CAC5D,CAAC;CACH;CACA,IAAI,UAAU,KAAK,GAAG;EACpB,OAAO,KAAK,CACV,gBACA,KACF,CAAC;CACH;CACA,IAAI,UAAU,KAAK,GAAG;EACpB,OAAO,KAAK,CACV,gBACA,KACF,CAAC;CACH;CACA,OAAO,OAAO,SAAS,IAAI,SAAS,KAAK;AAC3C"}
|