@tamagui/web 1.88.1 → 1.88.3
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/Tamagui.js +0 -6
- package/dist/cjs/config.js +5 -31
- package/dist/cjs/config.js.map +2 -2
- package/dist/cjs/constants/accessibilityDirectMap.js +0 -8
- package/dist/cjs/constants/constants.js +0 -7
- package/dist/cjs/constants/isDevTools.js +0 -4
- package/dist/cjs/contexts/ComponentContext.js +0 -4
- package/dist/cjs/createComponent.js +36 -51
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createComponent.native.js +15 -15
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createFont.js +0 -4
- package/dist/cjs/createShorthands.js +0 -4
- package/dist/cjs/createTamagui.js +2 -7
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/createTheme.js +0 -4
- package/dist/cjs/createTokens.js +0 -4
- package/dist/cjs/createVariable.js +0 -13
- package/dist/cjs/createVariables.js +0 -4
- package/dist/cjs/defaultComponentState.js +0 -6
- package/dist/cjs/helpers/ThemeManager.js +8 -16
- package/dist/cjs/helpers/ThemeManager.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.native.js +4 -4
- package/dist/cjs/helpers/ThemeManager.native.js.map +1 -1
- package/dist/cjs/helpers/ThemeManagerContext.js +0 -4
- package/dist/cjs/helpers/createMediaStyle.js +2 -7
- package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
- package/dist/cjs/helpers/createShallowSetState.js +0 -6
- package/dist/cjs/helpers/createStyledContext.js +0 -4
- package/dist/cjs/helpers/defaultOffset.js +0 -4
- package/dist/cjs/helpers/expandStyle.js +1 -6
- package/dist/cjs/helpers/expandStyle.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.js +0 -4
- package/dist/cjs/helpers/expandStyles.native.js +2 -1
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.js +0 -4
- package/dist/cjs/helpers/getFontLanguage.js +0 -4
- package/dist/cjs/helpers/getGroupPropParts.js +0 -4
- package/dist/cjs/helpers/getSplitStyles.js +13 -23
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +8 -8
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getStylesAtomic.js +3 -10
- package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.js +0 -4
- package/dist/cjs/helpers/getVariantExtras.js +1 -6
- package/dist/cjs/helpers/getVariantExtras.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.js +1 -14
- package/dist/cjs/helpers/insertStyleRule.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +2 -2
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.js +0 -4
- package/dist/cjs/helpers/isTamaguiComponent.js +1 -5
- package/dist/cjs/helpers/isTamaguiComponent.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiElement.js +0 -4
- package/dist/cjs/helpers/log.js +0 -4
- package/dist/cjs/helpers/matchMedia.js +0 -5
- package/dist/cjs/helpers/mergeProps.js +1 -5
- package/dist/cjs/helpers/mergeProps.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.js +1 -5
- package/dist/cjs/helpers/mergeVariants.js.map +1 -1
- package/dist/cjs/helpers/normalizeColor.js +0 -6
- package/dist/cjs/helpers/normalizeShadow.js +1 -6
- package/dist/cjs/helpers/normalizeShadow.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.js +0 -4
- package/dist/cjs/helpers/normalizeStylePropKeys.js +0 -4
- package/dist/cjs/helpers/normalizeValueWithProperty.js +0 -5
- package/dist/cjs/helpers/objectIdentityKey.js +0 -4
- package/dist/cjs/helpers/propMapper.js +8 -18
- package/dist/cjs/helpers/propMapper.js.map +1 -1
- package/dist/cjs/helpers/propMapper.native.js +2 -2
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.js +0 -5
- package/dist/cjs/helpers/proxyThemeVariables.js +0 -4
- package/dist/cjs/helpers/pseudoDescriptors.js +0 -6
- package/dist/cjs/helpers/registerCSSVariable.js +0 -6
- package/dist/cjs/helpers/themeable.js +2 -6
- package/dist/cjs/helpers/themeable.js.map +1 -1
- package/dist/cjs/helpers/themes.js +0 -4
- package/dist/cjs/helpers/timer.js +0 -4
- package/dist/cjs/hooks/useConfiguration.js +0 -4
- package/dist/cjs/hooks/useDisableSSR.js +1 -5
- package/dist/cjs/hooks/useDisableSSR.js.map +1 -1
- package/dist/cjs/hooks/useIsTouchDevice.js +0 -4
- package/dist/cjs/hooks/useMedia.js +3 -21
- package/dist/cjs/hooks/useMedia.js.map +1 -1
- package/dist/cjs/hooks/useMedia.native.js +2 -1
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useProps.js +2 -9
- package/dist/cjs/hooks/useProps.js.map +1 -1
- package/dist/cjs/hooks/useTheme.js +18 -28
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useTheme.native.js +1 -1
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeName.js +3 -7
- package/dist/cjs/hooks/useThemeName.js.map +1 -1
- package/dist/cjs/index.js +0 -78
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +0 -4
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/inject-styles.js +0 -4
- package/dist/cjs/insertFont.js +1 -9
- package/dist/cjs/insertFont.js.map +1 -1
- package/dist/cjs/internalWithTheme.js +0 -4
- package/dist/cjs/setupHooks.js +0 -5
- package/dist/cjs/setupReactNative.js +1 -7
- package/dist/cjs/setupReactNative.js.map +1 -1
- package/dist/cjs/styled.js +6 -10
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/views/Configuration.js +0 -4
- package/dist/cjs/views/FontLanguage.js +0 -4
- package/dist/cjs/views/Slot.js +0 -5
- package/dist/cjs/views/Stack.js +0 -4
- package/dist/cjs/views/TamaguiProvider.js +0 -4
- package/dist/cjs/views/Text.js +0 -4
- package/dist/cjs/views/Theme.js +3 -10
- package/dist/cjs/views/Theme.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.js +9 -16
- package/dist/cjs/views/ThemeDebug.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.js +0 -4
- package/dist/cjs/views/View.js +0 -4
- package/dist/esm/Tamagui.native.js +41 -14
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/config.native.js +51 -8
- package/dist/esm/config.native.js.map +2 -2
- package/dist/esm/constants/accessibilityDirectMap.native.js +27 -2
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +1 -1
- package/dist/esm/constants/constants.native.js +26 -2
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.native.js +23 -2
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +25 -4
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.native.js +130 -131
- package/dist/esm/createComponent.native.js.map +2 -2
- package/dist/esm/createFont.native.js +23 -2
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createShorthands.native.js +23 -2
- package/dist/esm/createShorthands.native.js.map +1 -1
- package/dist/esm/createTamagui.native.js +42 -34
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTheme.native.js +23 -2
- package/dist/esm/createTheme.native.js.map +1 -1
- package/dist/esm/createTokens.native.js +25 -4
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.native.js +38 -10
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.native.js +27 -7
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/defaultComponentState.native.js +25 -2
- package/dist/esm/defaultComponentState.native.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.native.js +44 -21
- package/dist/esm/helpers/ThemeManager.native.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.native.js +25 -4
- package/dist/esm/helpers/ThemeManagerContext.native.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.native.js +29 -9
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/esm/helpers/createShallowSetState.native.js +25 -2
- package/dist/esm/helpers/createShallowSetState.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +30 -11
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultOffset.native.js +23 -2
- package/dist/esm/helpers/defaultOffset.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +28 -6
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +28 -7
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js +25 -4
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/esm/helpers/getFontLanguage.native.js +23 -2
- package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +25 -4
- package/dist/esm/helpers/getGroupPropParts.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +97 -119
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +26 -2
- package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js +23 -2
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +27 -5
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +40 -11
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.js +23 -2
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js +24 -3
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +25 -5
- package/dist/esm/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/esm/helpers/log.native.js +23 -2
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +24 -2
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +26 -6
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +24 -3
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/normalizeColor.native.js +29 -7
- package/dist/esm/helpers/normalizeColor.native.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +28 -7
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +28 -11
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +23 -2
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +29 -9
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +23 -2
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +56 -38
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +26 -4
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.native.js +23 -2
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +25 -2
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +28 -5
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/themeable.native.js +33 -14
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- package/dist/esm/helpers/themes.native.js +26 -5
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/timer.native.js +23 -2
- package/dist/esm/helpers/timer.native.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.native.js +26 -7
- package/dist/esm/hooks/useConfiguration.native.js.map +1 -1
- package/dist/esm/hooks/useDisableSSR.native.js +25 -4
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.native.js +25 -5
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +49 -18
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useProps.native.js +31 -13
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +64 -46
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeName.native.js +28 -10
- package/dist/esm/hooks/useThemeName.native.js.map +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.native.js +154 -80
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/inject-styles.native.js +23 -2
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/insertFont.native.js +33 -11
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.native.js +14 -0
- package/dist/esm/interfaces/CSSColorNames.native.js.map +2 -2
- package/dist/esm/interfaces/GetRef.native.js +14 -0
- package/dist/esm/interfaces/GetRef.native.js.map +2 -2
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +14 -0
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +2 -2
- package/dist/esm/interfaces/Role.native.js +14 -0
- package/dist/esm/interfaces/Role.native.js.map +2 -2
- package/dist/esm/internalWithTheme.native.js +26 -6
- package/dist/esm/internalWithTheme.native.js.map +1 -1
- package/dist/esm/setupHooks.native.js +24 -2
- package/dist/esm/setupHooks.native.js.map +1 -1
- package/dist/esm/setupReactNative.native.js +26 -3
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/styled.native.js +31 -12
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/type-utils.native.js +14 -0
- package/dist/esm/type-utils.native.js.map +2 -2
- package/dist/esm/types.native.js +14 -0
- package/dist/esm/types.native.js.map +2 -2
- package/dist/esm/views/Configuration.native.js +26 -7
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +26 -7
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.types.native.js +14 -0
- package/dist/esm/views/FontLanguage.types.native.js.map +2 -2
- package/dist/esm/views/Slot.native.js +33 -15
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/Stack.native.js +27 -8
- package/dist/esm/views/Stack.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +35 -11
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.native.js +27 -7
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.native.js +51 -25
- package/dist/esm/views/Theme.native.js.map +2 -2
- package/dist/esm/views/ThemeDebug.native.js +23 -2
- package/dist/esm/views/ThemeDebug.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +28 -11
- package/dist/esm/views/ThemeProvider.native.js.map +2 -2
- package/dist/esm/views/View.native.js +27 -8
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +10 -10
- package/src/index.ts +3 -2
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var mergeVariants_exports = {};
|
|
17
|
+
__export(mergeVariants_exports, {
|
|
18
|
+
mergeVariants: () => mergeVariants
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(mergeVariants_exports);
|
|
1
21
|
const mergeVariants = (parentVariants, ourVariants, level = 0) => {
|
|
2
22
|
const variants = {};
|
|
3
23
|
for (const key in ourVariants) {
|
|
4
|
-
const parentVariant = parentVariants
|
|
24
|
+
const parentVariant = parentVariants == null ? void 0 : parentVariants[key], ourVariant = ourVariants[key];
|
|
5
25
|
!parentVariant || typeof ourVariant == "function" ? variants[key] = ourVariant : parentVariant && !ourVariant ? variants[key] = parentVariant[key] : level === 0 ? variants[key] = mergeVariants(
|
|
6
26
|
parentVariant,
|
|
7
27
|
ourVariant,
|
|
@@ -16,7 +36,8 @@ const mergeVariants = (parentVariants, ourVariants, level = 0) => {
|
|
|
16
36
|
...variants
|
|
17
37
|
};
|
|
18
38
|
};
|
|
19
|
-
export
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
20
41
|
mergeVariants
|
|
21
|
-
};
|
|
42
|
+
});
|
|
22
43
|
//# sourceMappingURL=mergeVariants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/mergeVariants.ts"],
|
|
4
|
-
"mappings": "AAKO,MAAM,gBAAgB,CAC3B,gBACA,aACA,QAAQ,MACL;AACH,QAAM,WAAW,CAAC;AAElB,aAAW,OAAO,aAAa;AAC7B,UAAM,gBAAgB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,gBAAgB,CAC3B,gBACA,aACA,QAAQ,MACL;AACH,QAAM,WAAW,CAAC;AAElB,aAAW,OAAO,aAAa;AAC7B,UAAM,gBAAgB,iDAAiB,MACjC,aAAa,YAAY,GAAG;AAClC,IAAI,CAAC,iBAAiB,OAAO,cAAe,aAC1C,SAAS,GAAG,IAAI,aACP,iBAAiB,CAAC,aAC3B,SAAS,GAAG,IAAI,cAAc,GAAG,IAE7B,UAAU,IACZ,SAAS,GAAG,IAAI;AAAA,MACd;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IACV,IAEA,SAAS,GAAG,IAAI;AAAA,MACd,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,EAGN;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var normalizeColor_exports = {};
|
|
17
|
+
__export(normalizeColor_exports, {
|
|
18
|
+
getRgba: () => getRgba,
|
|
19
|
+
normalizeColor: () => normalizeColor,
|
|
20
|
+
rgba: () => import_normalize_css_color2.rgba
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(normalizeColor_exports);
|
|
23
|
+
var import_normalize_css_color = require("@tamagui/normalize-css-color"), import_normalize_css_color2 = require("@tamagui/normalize-css-color");
|
|
3
24
|
const normalizeColor = (color, opacity) => {
|
|
4
25
|
if (!color)
|
|
5
26
|
return;
|
|
@@ -12,13 +33,14 @@ const normalizeColor = (color, opacity) => {
|
|
|
12
33
|
}
|
|
13
34
|
return color;
|
|
14
35
|
}, getRgba = (color) => {
|
|
15
|
-
const colorNum = normalizeCSSColor(color);
|
|
36
|
+
const colorNum = (0, import_normalize_css_color.normalizeCSSColor)(color);
|
|
16
37
|
if (colorNum != null)
|
|
17
|
-
return rgba(colorNum);
|
|
38
|
+
return (0, import_normalize_css_color.rgba)(colorNum);
|
|
18
39
|
};
|
|
19
|
-
export
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
20
42
|
getRgba,
|
|
21
43
|
normalizeColor,
|
|
22
|
-
|
|
23
|
-
};
|
|
44
|
+
rgba
|
|
45
|
+
});
|
|
24
46
|
//# sourceMappingURL=normalizeColor.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeColor.ts"],
|
|
4
|
-
"mappings": "AAAA
|
|
5
|
-
"names": ["rgba"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAwC,yCAExCA,8BAAqB;AAEd,MAAM,iBAAiB,CAAC,OAAuB,YAAqB;AACzE,MAAI,CAAC;AAAO;AACZ,MAAI,MAAM,CAAC,MAAM,OAAO,MAAM,WAAW,MAAM;AAC7C,WAAO;AAET,QAAMC,QAAO,QAAQ,KAAK;AAC1B,MAAIA,OAAM;AACR,UAAM,SAAS,GAAGA,MAAK,CAAC,IAAIA,MAAK,CAAC,IAAIA,MAAK,CAAC;AAC5C,WAAO,YAAY,IAAI,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI,WAAWA,MAAK,KAAK,CAAC;AAAA,EACpF;AACA,SAAO;AACT,GAEa,UAAU,CAAC,UAAkB;AACxC,QAAM,eAAW,8CAAkB,KAAK;AACxC,MAAI,YAAY;AACd,eAAO,iCAAK,QAAQ;AAExB;",
|
|
5
|
+
"names": ["import_normalize_css_color", "rgba"]
|
|
6
6
|
}
|
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var normalizeShadow_exports = {};
|
|
17
|
+
__export(normalizeShadow_exports, {
|
|
18
|
+
normalizeShadow: () => normalizeShadow
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(normalizeShadow_exports);
|
|
21
|
+
var import_defaultOffset = require("./defaultOffset"), import_normalizeColor = require("./normalizeColor");
|
|
3
22
|
function normalizeShadow({
|
|
4
23
|
shadowColor,
|
|
5
24
|
shadowOffset,
|
|
6
25
|
shadowOpacity,
|
|
7
26
|
shadowRadius
|
|
8
27
|
}) {
|
|
9
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
const { height, width } = shadowOffset || import_defaultOffset.defaultOffset;
|
|
10
30
|
return {
|
|
11
31
|
shadowOffset: {
|
|
12
32
|
width: width || 0,
|
|
13
33
|
height: height || 0
|
|
14
34
|
},
|
|
15
35
|
shadowRadius: shadowRadius || 0,
|
|
16
|
-
shadowColor: normalizeColor(shadowColor, 1),
|
|
17
|
-
shadowOpacity: shadowOpacity ?? (shadowColor ? getRgba(shadowColor)
|
|
36
|
+
shadowColor: (0, import_normalizeColor.normalizeColor)(shadowColor, 1),
|
|
37
|
+
shadowOpacity: shadowOpacity ?? (shadowColor ? (_a = (0, import_normalizeColor.getRgba)(shadowColor)) == null ? void 0 : _a.a : 1)
|
|
18
38
|
};
|
|
19
39
|
}
|
|
20
|
-
export
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
21
42
|
normalizeShadow
|
|
22
|
-
};
|
|
43
|
+
});
|
|
23
44
|
//# sourceMappingURL=normalizeShadow.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeShadow.ts"],
|
|
4
|
-
"mappings": "AAAA
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAA8B,4BAC9B,wBAAwC;AAEjC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AARxB;AASE,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,OAAO,SAAS;AAAA,MAChB,QAAQ,UAAU;AAAA,IACpB;AAAA,IACA,cAAc,gBAAgB;AAAA,IAC9B,iBAAa,sCAAe,aAAa,CAAC;AAAA,IAC1C,eAAe,kBAAkB,eAAc,wCAAQ,WAAW,MAAnB,mBAAsB,IAAI;AAAA,EAC3E;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,25 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var normalizeStyle_exports = {};
|
|
17
|
+
__export(normalizeStyle_exports, {
|
|
18
|
+
normalizeStyle: () => normalizeStyle
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(normalizeStyle_exports);
|
|
21
|
+
var import_expandStyle = require("./expandStyle"), import_expandStyles = require("./expandStyles"), import_isObj = require("./isObj"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_pseudoDescriptors = require("./pseudoDescriptors");
|
|
6
22
|
function normalizeStyle(style, disableNormalize = !1) {
|
|
7
23
|
const res = {};
|
|
8
24
|
for (let key in style) {
|
|
9
25
|
const prop = style[key];
|
|
10
26
|
if (prop == null)
|
|
11
27
|
continue;
|
|
12
|
-
if (key in pseudoDescriptors || // this should capture all parent-based styles like media, group, etc
|
|
13
|
-
key[0] === "$" && isObj(prop)) {
|
|
28
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors || // this should capture all parent-based styles like media, group, etc
|
|
29
|
+
key[0] === "$" && (0, import_isObj.isObj)(prop)) {
|
|
14
30
|
res[key] = normalizeStyle(prop, disableNormalize);
|
|
15
31
|
continue;
|
|
16
32
|
}
|
|
17
|
-
const value = disableNormalize ? prop : normalizeValueWithProperty(prop, key), out = expandStyle(key, value);
|
|
33
|
+
const value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
18
34
|
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
19
35
|
}
|
|
20
|
-
return fixStyles(res), res;
|
|
36
|
+
return (0, import_expandStyles.fixStyles)(res), res;
|
|
21
37
|
}
|
|
22
|
-
export
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
23
40
|
normalizeStyle
|
|
24
|
-
};
|
|
41
|
+
});
|
|
25
42
|
//# sourceMappingURL=normalizeStyle.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeStyle.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B,0BAC5B,sBAA0B,2BAC1B,eAAsB,oBACtB,oCAA2C,yCAC3C,2BAAkC;AAU3B,SAAS,eAAe,OAA4B,mBAAmB,IAAO;AACnF,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,UAAM,OAAO,MAAM,GAAG;AACtB,QAAI,QAAQ;AAAM;AAClB,QACE,OAAO;AAAA,IAEN,IAAI,CAAC,MAAM,WAAO,oBAAM,IAAI,GAC7B;AACA,UAAI,GAAG,IAAI,eAAe,MAAM,gBAAgB;AAChD;AAAA,IACF;AACA,UAAM,QAAQ,mBAAmB,WAAO,8DAA2B,MAAM,GAAG,GAEtE,UAAM,gCAAY,KAAK,KAAK;AAClC,IAAI,MACF,OAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC,IAE1C,IAAI,GAAG,IAAI;AAAA,EAEf;AAEA,4CAAU,GAAG,GAEN;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var normalizeStylePropKeys_native_exports = {};
|
|
17
|
+
__export(normalizeStylePropKeys_native_exports, {
|
|
18
|
+
normalizeStylePropKeys: () => normalizeStylePropKeys
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(normalizeStylePropKeys_native_exports);
|
|
1
21
|
const normalizeStylePropKeys = {
|
|
2
22
|
backgroundColor: !0,
|
|
3
23
|
borderColor: !0,
|
|
@@ -10,7 +30,8 @@ const normalizeStylePropKeys = {
|
|
|
10
30
|
textDecorationColor: !0,
|
|
11
31
|
textShadowColor: !0
|
|
12
32
|
};
|
|
13
|
-
export
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
14
35
|
normalizeStylePropKeys
|
|
15
|
-
};
|
|
36
|
+
});
|
|
16
37
|
//# sourceMappingURL=normalizeStylePropKeys.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeStylePropKeys.native.ts"],
|
|
4
|
-
"mappings": "AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var normalizeValueWithProperty_exports = {};
|
|
17
|
+
__export(normalizeValueWithProperty_exports, {
|
|
18
|
+
normalizeValueWithProperty: () => normalizeValueWithProperty,
|
|
19
|
+
reverseMapClassNameToValue: () => reverseMapClassNameToValue
|
|
20
|
+
});
|
|
21
|
+
module.exports = __toCommonJS(normalizeValueWithProperty_exports);
|
|
22
|
+
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_insertStyleRule = require("./insertStyleRule");
|
|
4
23
|
const stylePropsAllPlusTransforms = {
|
|
5
|
-
...stylePropsAll,
|
|
24
|
+
...import_helpers.stylePropsAll,
|
|
6
25
|
translateX: !0,
|
|
7
26
|
translateY: !0
|
|
8
27
|
};
|
|
9
28
|
function normalizeValueWithProperty(value, property = "") {
|
|
10
|
-
if (!isWeb || stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean")
|
|
29
|
+
if (!import_constants.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean")
|
|
11
30
|
return value;
|
|
12
31
|
let res = value;
|
|
13
32
|
return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}px` : property && (res = `${res}`), res);
|
|
14
33
|
}
|
|
15
34
|
const rcache = {};
|
|
16
35
|
function reverseMapClassNameToValue(key, className) {
|
|
17
|
-
const cssRule = getAllSelectors()[className];
|
|
36
|
+
const cssRule = (0, import_insertStyleRule.getAllSelectors)()[className];
|
|
18
37
|
if (rcache[cssRule])
|
|
19
38
|
return rcache[cssRule];
|
|
20
39
|
if (!cssRule) {
|
|
@@ -25,7 +44,7 @@ function reverseMapClassNameToValue(key, className) {
|
|
|
25
44
|
}
|
|
26
45
|
const cssVal = cssRule.replace(/.*:/, "").replace(/;.*/, "").trim();
|
|
27
46
|
let res;
|
|
28
|
-
return cssVal.startsWith("var(") ? res = cssVal : stylePropsUnitless[key] ? res = +cssVal : cssVal.endsWith("px") ? res = +cssVal.replace("px", "") : res = cssVal, rcache[cssRule] = res, process.env.NODE_ENV === "development" && typeof res == "number" && Number.isNaN(res) && console.info("Tamagui invalid parsed value, NaN:", {
|
|
47
|
+
return cssVal.startsWith("var(") ? res = cssVal : import_helpers.stylePropsUnitless[key] ? res = +cssVal : cssVal.endsWith("px") ? res = +cssVal.replace("px", "") : res = cssVal, rcache[cssRule] = res, process.env.NODE_ENV === "development" && typeof res == "number" && Number.isNaN(res) && console.info("Tamagui invalid parsed value, NaN:", {
|
|
29
48
|
res,
|
|
30
49
|
cssVal,
|
|
31
50
|
cssRule,
|
|
@@ -33,8 +52,9 @@ function reverseMapClassNameToValue(key, className) {
|
|
|
33
52
|
className
|
|
34
53
|
}), res;
|
|
35
54
|
}
|
|
36
|
-
export
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
37
57
|
normalizeValueWithProperty,
|
|
38
58
|
reverseMapClassNameToValue
|
|
39
|
-
};
|
|
59
|
+
});
|
|
40
60
|
//# sourceMappingURL=normalizeValueWithProperty.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeValueWithProperty.ts"],
|
|
4
|
-
"mappings": "AAKA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAsB,+BACtB,iBAAkD,6BAElD,yBAAgC;AAKhC,MAAM,8BAA8B;AAAA,EAClC,GAAG;AAAA,EACH,YAAY;AAAA,EACZ,YAAY;AACd;AAEO,SAAS,2BAA2B,OAAY,WAAW,IAAS;AAEzE,MADI,CAAC,0BAEH,kCAAmB,QAAQ,KAC1B,YAAY,CAAC,4BAA4B,QAAQ,KAClD,OAAO,SAAU;AAEjB,WAAO;AAET,MAAI,MAAM;AACV,SAAI,SAAS,OAAO,SAAU,WAAiB,SAC3C,OAAO,SAAU,WACnB,MAAM,GAAG,KAAK,OACL,aACT,MAAM,GAAG,GAAG,KAEP;AACT;AAIA,MAAM,SAAS,CAAC;AACT,SAAS,2BAA2B,KAAa,WAAmB;AAEzE,QAAM,cADY,wCAAgB,EACR,SAAS;AACnC,MAAI,OAAO,OAAO;AAChB,WAAO,OAAO,OAAO;AAGvB,MAAI,CAAC,SAAS;AACZ,IAAI,QAAQ,IAAI,aAAa,iBAC3B,QAAQ;AAAA,MACN,yBAAyB,GAAG,2BAA2B,SAAS;AAAA,IAClE;AAEF;AAAA,EACF;AACA,QAAM,SAAS,QAAQ,QAAQ,OAAO,EAAE,EAAE,QAAQ,OAAO,EAAE,EAAE,KAAK;AAClE,MAAI;AACJ,SAAI,OAAO,WAAW,MAAM,IAC1B,MAAM,SACG,kCAAmB,GAAG,IAC/B,MAAM,CAAC,SACE,OAAO,SAAS,IAAI,IAC7B,MAAM,CAAC,OAAO,QAAQ,MAAM,EAAE,IAE9B,MAAM,QAER,OAAO,OAAO,IAAI,KACd,QAAQ,IAAI,aAAa,iBAEvB,OAAO,OAAQ,YAAY,OAAO,MAAM,GAAG,KAC7C,QAAQ,KAAK,sCAAsC;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,GAGE;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var objectIdentityKey_exports = {};
|
|
17
|
+
__export(objectIdentityKey_exports, {
|
|
18
|
+
objectIdentityKey: () => objectIdentityKey
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(objectIdentityKey_exports);
|
|
1
21
|
function objectIdentityKey(obj) {
|
|
2
22
|
let k = "";
|
|
3
23
|
for (const key in obj) {
|
|
@@ -16,7 +36,8 @@ function objectIdentityKey(obj) {
|
|
|
16
36
|
return k;
|
|
17
37
|
}
|
|
18
38
|
const cache = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
export
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
20
41
|
objectIdentityKey
|
|
21
|
-
};
|
|
42
|
+
});
|
|
22
43
|
//# sourceMappingURL=objectIdentityKey.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/objectIdentityKey.tsx"],
|
|
4
|
-
"mappings": "AAAO,SAAS,kBAAkB,KAAa;AAC7C,MAAI,IAAI;AACR,aAAW,OAAO,KAAK;AACrB,SAAK;AACL,UAAM,MAAM,IAAI,GAAG;AACnB,QAAI,OAAO,OAAO;AAClB,QAAI,CAAC,OAAQ,SAAS,YAAY,SAAS;AACzC,WAAK,OAAO;AAAA,aACH,MAAM,IAAI,GAAG;AACtB,WAAK,MAAM,IAAI,GAAG;AAAA,SACb;AACL,UAAI,IAAI,KAAK,OAAO;AACpB,YAAM,IAAI,KAAK,CAAC,GAChB,KAAK;AAAA,IACP;AAAA,EACF;AACA,SAAO;AACT;AAEA,MAAM,QAAQ,oBAAI,QAAQ;",
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,kBAAkB,KAAa;AAC7C,MAAI,IAAI;AACR,aAAW,OAAO,KAAK;AACrB,SAAK;AACL,UAAM,MAAM,IAAI,GAAG;AACnB,QAAI,OAAO,OAAO;AAClB,QAAI,CAAC,OAAQ,SAAS,YAAY,SAAS;AACzC,WAAK,OAAO;AAAA,aACH,MAAM,IAAI,GAAG;AACtB,WAAK,MAAM,IAAI,GAAG;AAAA,SACb;AACL,UAAI,IAAI,KAAK,OAAO;AACpB,YAAM,IAAI,KAAK,CAAC,GAChB,KAAK;AAAA,IACP;AAAA,EACF;AACA,SAAO;AACT;AAEA,MAAM,QAAQ,oBAAI,QAAQ;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var propMapper_exports = {};
|
|
17
|
+
__export(propMapper_exports, {
|
|
18
|
+
getFontFamilyFromNameOrVariable: () => getFontFamilyFromNameOrVariable,
|
|
19
|
+
getPropMappedFontFamily: () => getPropMappedFontFamily,
|
|
20
|
+
getTokenForKey: () => getTokenForKey,
|
|
21
|
+
propMapper: () => propMapper
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(propMapper_exports);
|
|
24
|
+
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_isDevTools = require("../constants/isDevTools"), import_createVariable = require("../createVariable"), import_expandStyle = require("./expandStyle"), import_normalizeStyle = require("./normalizeStyle"), import_getVariantExtras = require("./getVariantExtras"), import_isObj = require("./isObj"), import_pseudoDescriptors = require("./pseudoDescriptors");
|
|
11
25
|
const propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
12
|
-
|
|
26
|
+
var _a;
|
|
27
|
+
if (lastFontFamilyToken = null, !import_constants.isAndroid && key === "elevationAndroid")
|
|
13
28
|
return;
|
|
14
29
|
if (value === "unset") {
|
|
15
|
-
const unsetVal = styleStateIn.conf.unset
|
|
30
|
+
const unsetVal = (_a = styleStateIn.conf.unset) == null ? void 0 : _a[key];
|
|
16
31
|
if (unsetVal != null)
|
|
17
32
|
value = unsetVal;
|
|
18
33
|
else
|
|
@@ -34,8 +49,8 @@ const propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
|
34
49
|
return variantValue;
|
|
35
50
|
}
|
|
36
51
|
let shouldReturn = !1;
|
|
37
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), shouldReturn || value != null) {
|
|
38
|
-
const result = (styleProps.noExpand ? null : expandStyle(key, value)) || [
|
|
52
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), shouldReturn || value != null) {
|
|
53
|
+
const result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [
|
|
39
54
|
[key, value]
|
|
40
55
|
];
|
|
41
56
|
return key === "fontFamily" && lastFontFamilyToken && fontFamilyCache.set(result, lastFontFamilyToken), result;
|
|
@@ -61,11 +76,11 @@ const propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
|
61
76
|
return;
|
|
62
77
|
}
|
|
63
78
|
if (typeof variantValue == "function") {
|
|
64
|
-
const fn = variantValue, extras = getVariantExtras(styleState);
|
|
79
|
+
const fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
65
80
|
variantValue = fn(value, extras), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" expanded functional variant", key), console.info({ fn, variantValue, extras }), console.groupEnd());
|
|
66
81
|
}
|
|
67
82
|
let fontFamilyResult;
|
|
68
|
-
if (isObj(variantValue)) {
|
|
83
|
+
if ((0, import_isObj.isObj)(variantValue)) {
|
|
69
84
|
const fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];
|
|
70
85
|
fontFamilyUpdate && (fontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf), styleState.fontFamily = fontFamilyResult, process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" updating font family", fontFamilyResult)), variantValue = resolveTokensAndVariants(
|
|
71
86
|
key,
|
|
@@ -76,26 +91,27 @@ const propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
|
76
91
|
);
|
|
77
92
|
}
|
|
78
93
|
if (variantValue) {
|
|
79
|
-
const expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);
|
|
94
|
+
const expanded = (0, import_normalizeStyle.normalizeStyle)(variantValue, !!styleProps.noNormalize);
|
|
80
95
|
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" expanding styles from ", variantValue, "to", expanded);
|
|
81
96
|
const next = Object.entries(expanded);
|
|
82
|
-
return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, getVariableValue(fontFamilyResult)), next;
|
|
97
|
+
return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
|
|
83
98
|
}
|
|
84
99
|
};
|
|
85
100
|
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
86
|
-
if (isVariable(input)) {
|
|
101
|
+
if ((0, import_createVariable.isVariable)(input)) {
|
|
87
102
|
const val = variableToFontNameCache.get(input);
|
|
88
103
|
if (val)
|
|
89
104
|
return val;
|
|
90
105
|
for (const key in conf.fontsParsed) {
|
|
91
106
|
const familyVariable = conf.fontsParsed[key].family;
|
|
92
|
-
if (isVariable(familyVariable) && (variableToFontNameCache.set(familyVariable, key), familyVariable === input))
|
|
107
|
+
if ((0, import_createVariable.isVariable)(familyVariable) && (variableToFontNameCache.set(familyVariable, key), familyVariable === input))
|
|
93
108
|
return key;
|
|
94
109
|
}
|
|
95
110
|
} else if (typeof input == "string" && input[0] === "$")
|
|
96
111
|
return input;
|
|
97
112
|
}
|
|
98
113
|
const variableToFontNameCache = /* @__PURE__ */ new WeakMap(), fontFamilyCache = /* @__PURE__ */ new WeakMap(), getPropMappedFontFamily = (expanded) => expanded && fontFamilyCache.get(expanded), resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
114
|
+
var _a;
|
|
99
115
|
const { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
100
116
|
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key, value);
|
|
101
117
|
for (const _key in value) {
|
|
@@ -110,11 +126,11 @@ const variableToFontNameCache = /* @__PURE__ */ new WeakMap(), fontFamilyCache =
|
|
|
110
126
|
const variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
111
127
|
if (variantOut)
|
|
112
128
|
for (const [key2, val2] of variantOut)
|
|
113
|
-
val2 != null && (key2 in pseudoDescriptors ? (res[key2]
|
|
129
|
+
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
114
130
|
}
|
|
115
131
|
continue;
|
|
116
132
|
}
|
|
117
|
-
if (isVariable(val)) {
|
|
133
|
+
if ((0, import_createVariable.isVariable)(val)) {
|
|
118
134
|
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues), process.env.NODE_ENV === "development" && debug === "verbose" && console.info("variable", subKey, res[subKey]);
|
|
119
135
|
continue;
|
|
120
136
|
}
|
|
@@ -126,12 +142,12 @@ const variableToFontNameCache = /* @__PURE__ */ new WeakMap(), fontFamilyCache =
|
|
|
126
142
|
res[subKey] = fVal;
|
|
127
143
|
continue;
|
|
128
144
|
}
|
|
129
|
-
if (isObj(val)) {
|
|
145
|
+
if ((0, import_isObj.isObj)(val)) {
|
|
130
146
|
const subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
131
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey]
|
|
147
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
132
148
|
} else
|
|
133
149
|
res[subKey] = val;
|
|
134
|
-
process.env.NODE_ENV === "development" && debug && res[subKey]
|
|
150
|
+
process.env.NODE_ENV === "development" && debug && ((_a = res[subKey]) == null ? void 0 : _a[0]) === "$" && console.warn(
|
|
135
151
|
`\u26A0\uFE0F Missing token in theme ${theme.name}:`,
|
|
136
152
|
subKey,
|
|
137
153
|
res[subKey],
|
|
@@ -166,23 +182,24 @@ const fontShorthand = {
|
|
|
166
182
|
};
|
|
167
183
|
let lastFontFamilyToken = null;
|
|
168
184
|
const getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
185
|
+
var _a, _b, _c, _d;
|
|
169
186
|
if (resolveAs === "none")
|
|
170
187
|
return value;
|
|
171
|
-
const { theme, conf = getConfig(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed;
|
|
188
|
+
const { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed;
|
|
172
189
|
let valOrVar, hasSet = !1;
|
|
173
190
|
if (theme && value in theme)
|
|
174
|
-
valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(` - resolving ${key} to theme value ${value}: ${valOrVar
|
|
191
|
+
valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(` - resolving ${key} to theme value ${value}: ${(_a = valOrVar == null ? void 0 : valOrVar.get) == null ? void 0 : _a.call(valOrVar)}`), hasSet = !0;
|
|
175
192
|
else if (value in conf.specificTokens)
|
|
176
193
|
hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
177
194
|
else {
|
|
178
|
-
const customTokenAccept = staticConfig
|
|
195
|
+
const customTokenAccept = (_b = staticConfig == null ? void 0 : staticConfig.acceptTokens) == null ? void 0 : _b[key];
|
|
179
196
|
if (customTokenAccept) {
|
|
180
197
|
const val = tokensParsed[customTokenAccept][value];
|
|
181
198
|
val && (valOrVar = val, hasSet = !0);
|
|
182
199
|
} else {
|
|
183
200
|
switch (key) {
|
|
184
201
|
case "fontFamily": {
|
|
185
|
-
valOrVar = (context
|
|
202
|
+
valOrVar = ((_c = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]) == null ? void 0 : _c.family) || value, lastFontFamilyToken = value, hasSet = !0;
|
|
186
203
|
break;
|
|
187
204
|
}
|
|
188
205
|
case "fontSize":
|
|
@@ -191,14 +208,14 @@ const getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
|
191
208
|
case "fontWeight": {
|
|
192
209
|
const defaultFont = conf.defaultFont || "$body", fam = fontFamily || defaultFont;
|
|
193
210
|
if (fam) {
|
|
194
|
-
const fontsParsed = context
|
|
195
|
-
valOrVar = (
|
|
211
|
+
const fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed[fam] || fontsParsed[defaultFont];
|
|
212
|
+
valOrVar = ((_d = font == null ? void 0 : font[fontShorthand[key] || key]) == null ? void 0 : _d[value]) || value, hasSet = !0;
|
|
196
213
|
}
|
|
197
214
|
break;
|
|
198
215
|
}
|
|
199
216
|
}
|
|
200
|
-
for (const cat in tokenCategories)
|
|
201
|
-
if (key in tokenCategories[cat]) {
|
|
217
|
+
for (const cat in import_helpers.tokenCategories)
|
|
218
|
+
if (key in import_helpers.tokenCategories[cat]) {
|
|
202
219
|
const res = tokensParsed[cat][value];
|
|
203
220
|
res != null && (valOrVar = res, hasSet = !0);
|
|
204
221
|
}
|
|
@@ -212,23 +229,24 @@ const getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
|
212
229
|
const out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
213
230
|
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar, out), out;
|
|
214
231
|
}
|
|
215
|
-
return process.env.NODE_ENV === "development" && isDevTools && styleState.debug === "verbose" && (console.groupCollapsed(" \uFE52 propMap (val)", key, value), console.info({ valOrVar, theme, hasSet }, theme ? theme[key] : ""), console.groupEnd()), value;
|
|
232
|
+
return process.env.NODE_ENV === "development" && import_isDevTools.isDevTools && styleState.debug === "verbose" && (console.groupCollapsed(" \uFE52 propMap (val)", key, value), console.info({ valOrVar, theme, hasSet }, theme ? theme[key] : ""), console.groupEnd()), value;
|
|
216
233
|
};
|
|
217
234
|
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
218
235
|
if (resolveValues === "none")
|
|
219
236
|
return valOrVar;
|
|
220
|
-
if (isVariable(valOrVar)) {
|
|
237
|
+
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
221
238
|
if (resolveValues === "value")
|
|
222
239
|
return valOrVar.val;
|
|
223
|
-
const get = valOrVar
|
|
240
|
+
const get = valOrVar == null ? void 0 : valOrVar.get;
|
|
224
241
|
return key !== "shadowColor" && typeof get == "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.val;
|
|
225
242
|
}
|
|
226
243
|
return valOrVar;
|
|
227
244
|
}
|
|
228
|
-
export
|
|
245
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
246
|
+
0 && (module.exports = {
|
|
229
247
|
getFontFamilyFromNameOrVariable,
|
|
230
248
|
getPropMappedFontFamily,
|
|
231
249
|
getTokenForKey,
|
|
232
250
|
propMapper
|
|
233
|
-
};
|
|
251
|
+
});
|
|
234
252
|
//# sourceMappingURL=propMapper.js.map
|