@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,6 +1,26 @@
|
|
|
1
|
-
|
|
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 getExpandedShorthands_exports = {};
|
|
17
|
+
__export(getExpandedShorthands_exports, {
|
|
18
|
+
getExpandedShorthands: () => getExpandedShorthands
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(getExpandedShorthands_exports);
|
|
21
|
+
var import_config = require("../config");
|
|
2
22
|
function getExpandedShorthands(props) {
|
|
3
|
-
const shorthands = getConfig().shorthands;
|
|
23
|
+
const shorthands = (0, import_config.getConfig)().shorthands;
|
|
4
24
|
if (!shorthands)
|
|
5
25
|
return props;
|
|
6
26
|
const res = {};
|
|
@@ -8,7 +28,8 @@ function getExpandedShorthands(props) {
|
|
|
8
28
|
res[shorthands[key] || key] = props[key];
|
|
9
29
|
return res;
|
|
10
30
|
}
|
|
11
|
-
export
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
12
33
|
getExpandedShorthands
|
|
13
|
-
};
|
|
34
|
+
});
|
|
14
35
|
//# sourceMappingURL=getExpandedShorthands.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getExpandedShorthands.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAMnB,SAAS,sBACd,OAC2B;AAC3B,QAAM,iBAAa,yBAAU,EAAE;AAC/B,MAAI,CAAC;AAAY,WAAO;AACxB,QAAM,MAAM,CAAC;AACb,aAAW,OAAO;AAEhB,QAAI,WAAW,GAAG,KAAK,GAAG,IAAI,MAAM,GAAG;AAEzC,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,26 @@
|
|
|
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 getFontLanguage_exports = {};
|
|
17
|
+
__export(getFontLanguage_exports, {
|
|
18
|
+
getFontLanguage: () => getFontLanguage
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(getFontLanguage_exports);
|
|
1
21
|
const getFontLanguage = (fontFamily) => fontFamily.includes("_") ? fontFamily.split("_")[1] : null;
|
|
2
|
-
export
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
3
24
|
getFontLanguage
|
|
4
|
-
};
|
|
25
|
+
});
|
|
5
26
|
//# sourceMappingURL=getFontLanguage.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getFontLanguage.ts"],
|
|
4
|
-
"mappings": "AAAO,MAAM,kBAAkB,CAAC,eAC9B,WAAW,SAAS,GAAG,IAAI,WAAW,MAAM,GAAG,EAAE,CAAC,IAAI;",
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB,CAAC,eAC9B,WAAW,SAAS,GAAG,IAAI,WAAW,MAAM,GAAG,EAAE,CAAC,IAAI;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
|
|
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 getGroupPropParts_exports = {};
|
|
17
|
+
__export(getGroupPropParts_exports, {
|
|
18
|
+
getGroupPropParts: () => getGroupPropParts
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(getGroupPropParts_exports);
|
|
21
|
+
var import_useMedia = require("../hooks/useMedia");
|
|
2
22
|
function getGroupPropParts(groupProp) {
|
|
3
|
-
const mediaQueries = getMedia(), [_, name, part3, part4] = groupProp.split("-");
|
|
23
|
+
const mediaQueries = (0, import_useMedia.getMedia)(), [_, name, part3, part4] = groupProp.split("-");
|
|
4
24
|
let pseudo;
|
|
5
25
|
const media = part3 in mediaQueries ? part3 : void 0;
|
|
6
26
|
return media ? pseudo = part4 : pseudo = part3, { name, pseudo, media };
|
|
7
27
|
}
|
|
8
|
-
export
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
9
30
|
getGroupPropParts
|
|
10
|
-
};
|
|
31
|
+
});
|
|
11
32
|
//# sourceMappingURL=getGroupPropParts.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getGroupPropParts.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAyB;AAElB,SAAS,kBAAkB,WAAmB;AACnD,QAAM,mBAAe,0BAAS,GACxB,CAAC,GAAG,MAAM,OAAO,KAAK,IAAI,UAAU,MAAM,GAAG;AACnD,MAAI;AACJ,QAAM,QAAQ,SAAS,eAAe,QAAQ;AAC9C,SAAK,QAGH,SAAS,QAFT,SAAS,OAIJ,EAAE,MAAM,QAAQ,MAAM;AAC/B;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,61 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import { isDevTools } from "../constants/isDevTools";
|
|
26
|
-
import {
|
|
27
|
-
getMediaImportanceIfMoreImportant,
|
|
28
|
-
mediaState as globalMediaState,
|
|
29
|
-
isMediaKey,
|
|
30
|
-
mediaKeyMatch,
|
|
31
|
-
mediaQueryConfig,
|
|
32
|
-
mergeMediaByImportance
|
|
33
|
-
} from "../hooks/useMedia";
|
|
34
|
-
import { createMediaStyle } from "./createMediaStyle";
|
|
35
|
-
import { fixStyles } from "./expandStyles";
|
|
36
|
-
import { getGroupPropParts } from "./getGroupPropParts";
|
|
37
|
-
import {
|
|
38
|
-
generateAtomicStyles,
|
|
39
|
-
getStylesAtomic,
|
|
40
|
-
styleToCSS
|
|
41
|
-
} from "./getStylesAtomic";
|
|
42
|
-
import {
|
|
43
|
-
insertStyleRules
|
|
44
|
-
} from "./insertStyleRule";
|
|
45
|
-
import { log } from "./log";
|
|
46
|
-
import {
|
|
47
|
-
normalizeValueWithProperty
|
|
48
|
-
} from "./normalizeValueWithProperty";
|
|
49
|
-
import { getPropMappedFontFamily, propMapper } from "./propMapper";
|
|
50
|
-
import { pseudoDescriptors, pseudoPriorities } from "./pseudoDescriptors";
|
|
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 getSplitStyles_exports = {};
|
|
17
|
+
__export(getSplitStyles_exports, {
|
|
18
|
+
PROP_SPLIT: () => PROP_SPLIT,
|
|
19
|
+
getSplitStyles: () => getSplitStyles,
|
|
20
|
+
getSubStyle: () => getSubStyle,
|
|
21
|
+
useSplitStyles: () => useSplitStyles
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(getSplitStyles_exports);
|
|
24
|
+
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = require("react"), import_config = require("../config"), import_accessibilityDirectMap = require("../constants/accessibilityDirectMap"), import_constants2 = require("../constants/constants"), import_isDevTools = require("../constants/isDevTools"), import_useMedia = require("../hooks/useMedia"), import_createMediaStyle = require("./createMediaStyle"), import_expandStyles = require("./expandStyles"), import_getGroupPropParts = require("./getGroupPropParts"), import_getStylesAtomic = require("./getStylesAtomic"), import_insertStyleRule = require("./insertStyleRule"), import_log = require("./log"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_propMapper = require("./propMapper"), import_pseudoDescriptors = require("./pseudoDescriptors");
|
|
51
25
|
const IS_STATIC = process.env.IS_STATIC === "is_static";
|
|
52
26
|
let conf;
|
|
53
27
|
const PROP_SPLIT = "-";
|
|
54
28
|
function isValidStyleKey(key, staticConfig) {
|
|
55
|
-
return (staticConfig.validStyles || (staticConfig.isText ? stylePropsText : validStyles))[key] || staticConfig.acceptTokens && staticConfig.acceptTokens[key];
|
|
29
|
+
return (staticConfig.validStyles || (staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || staticConfig.acceptTokens && staticConfig.acceptTokens[key];
|
|
56
30
|
}
|
|
57
31
|
const getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
58
|
-
|
|
32
|
+
var _a, _b, _c, _e, _f, _g;
|
|
33
|
+
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
59
34
|
const { shorthands } = conf, {
|
|
60
35
|
isHOC,
|
|
61
36
|
isText,
|
|
@@ -65,7 +40,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
65
40
|
inlineWhenUnflattened,
|
|
66
41
|
parentStaticConfig,
|
|
67
42
|
acceptsClassName
|
|
68
|
-
} = staticConfig, viewProps = {}, mediaState = styleProps.mediaState ||
|
|
43
|
+
} = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = [], classNames = {}, transforms = {};
|
|
69
44
|
let pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, style = {}, className = props.className ?? "", mediaStylesSeen = 0;
|
|
70
45
|
const styleState = {
|
|
71
46
|
curProps: { ...props },
|
|
@@ -82,7 +57,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
82
57
|
context,
|
|
83
58
|
debug
|
|
84
59
|
};
|
|
85
|
-
process.env.NODE_ENV === "development" && debug && debug !== "profile" && isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), log({
|
|
60
|
+
process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
86
61
|
props,
|
|
87
62
|
staticConfig,
|
|
88
63
|
shouldDoClasses,
|
|
@@ -97,26 +72,26 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
97
72
|
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
98
73
|
continue;
|
|
99
74
|
const valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
100
|
-
if (styleState.curProps[keyInit] = valInit, !isAndroid && keyInit === "elevationAndroid")
|
|
75
|
+
if (styleState.curProps[keyInit] = valInit, !import_constants.isAndroid && keyInit === "elevationAndroid")
|
|
101
76
|
continue;
|
|
102
77
|
if (keyInit === "userSelect")
|
|
103
78
|
keyInit = "selectable", valInit = valInit !== "none";
|
|
104
79
|
else if (keyInit === "role") {
|
|
105
|
-
viewProps.accessibilityRole = accessibilityWebRoleToNativeRole[valInit];
|
|
80
|
+
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
106
81
|
continue;
|
|
107
82
|
} else if (keyInit.startsWith("aria-")) {
|
|
108
|
-
if (webToNativeAccessibilityDirectMap[keyInit]) {
|
|
109
|
-
const nativeA11yProp = webToNativeAccessibilityDirectMap[keyInit];
|
|
83
|
+
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
84
|
+
const nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
110
85
|
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
111
86
|
continue;
|
|
112
87
|
}
|
|
113
|
-
if (nativeAccessibilityValue[keyInit]) {
|
|
114
|
-
let field = nativeAccessibilityValue[keyInit];
|
|
88
|
+
if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
|
|
89
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
|
|
115
90
|
viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = {
|
|
116
91
|
[field]: valInit
|
|
117
92
|
};
|
|
118
|
-
} else if (nativeAccessibilityState[keyInit]) {
|
|
119
|
-
let field = nativeAccessibilityState[keyInit];
|
|
93
|
+
} else if (import_accessibilityDirectMap.nativeAccessibilityState[keyInit]) {
|
|
94
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityState[keyInit];
|
|
120
95
|
viewProps.accessibilityState ? viewProps.accessibilityState[field] = valInit : viewProps.accessibilityState = {
|
|
121
96
|
[field]: valInit
|
|
122
97
|
};
|
|
@@ -149,17 +124,17 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
149
124
|
const isShorthand = keyInit in shorthands;
|
|
150
125
|
let isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
151
126
|
const isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant;
|
|
152
|
-
let isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
127
|
+
let isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
153
128
|
const isStyleProp = isMediaOrPseudo || isVariant && !styleProps.noExpand || isValidStyleKeyInit || isShorthand;
|
|
154
129
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
155
130
|
continue;
|
|
156
131
|
const shouldPassProp = !isStyleProp || // is in parent variants
|
|
157
|
-
isHOC && parentStaticConfig
|
|
132
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
158
133
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(
|
|
159
134
|
` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`
|
|
160
|
-
), log({ isVariant, valInit, shouldPassProp }), isClient && log({
|
|
135
|
+
), (0, import_log.log)({ isVariant, valInit, shouldPassProp }), import_constants.isClient && (0, import_log.log)({
|
|
161
136
|
variants,
|
|
162
|
-
variant: variants
|
|
137
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
163
138
|
isVariant,
|
|
164
139
|
isHOCShouldPassThrough,
|
|
165
140
|
curProps: { ...styleState.curProps },
|
|
@@ -170,22 +145,22 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
170
145
|
style[keyInit] = valInit;
|
|
171
146
|
continue;
|
|
172
147
|
}
|
|
173
|
-
const expanded = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit ? [[keyInit, valInit]] : propMapper(keyInit, valInit, styleState), next = getPropMappedFontFamily(expanded);
|
|
148
|
+
const expanded = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit ? [[keyInit, valInit]] : (0, import_propMapper.propMapper)(keyInit, valInit, styleState), next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
174
149
|
if (next && (styleState.fontFamily = next), process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
175
150
|
console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
176
151
|
try {
|
|
177
|
-
!isServer && isDevTools && (log({
|
|
152
|
+
!import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
178
153
|
expanded,
|
|
179
154
|
styleProps,
|
|
180
155
|
componentState,
|
|
181
156
|
isVariant,
|
|
182
|
-
variant: variants
|
|
157
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
183
158
|
shouldPassProp,
|
|
184
159
|
isHOCShouldPassThrough,
|
|
185
160
|
theme,
|
|
186
161
|
usedKeys: { ...usedKeys },
|
|
187
162
|
curProps: { ...styleState.curProps }
|
|
188
|
-
}), log("expanded", expanded, `
|
|
163
|
+
}), (0, import_log.log)("expanded", expanded, `
|
|
189
164
|
usedKeys`, { ...usedKeys }, `
|
|
190
165
|
current`, {
|
|
191
166
|
...style
|
|
@@ -198,8 +173,8 @@ current`, {
|
|
|
198
173
|
for (const [key, val] of expanded) {
|
|
199
174
|
if (val == null || key in usedKeys)
|
|
200
175
|
continue;
|
|
201
|
-
if (isPseudo = key in validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && isMediaKey(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps
|
|
202
|
-
passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), log({ val, after: { ...viewProps[key] } }), console.groupEnd());
|
|
176
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && (inlineWhenUnflattened != null && inlineWhenUnflattened.has(key))) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
|
|
177
|
+
passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), (0, import_log.log)({ val, after: { ...viewProps[key] } }), console.groupEnd());
|
|
203
178
|
continue;
|
|
204
179
|
}
|
|
205
180
|
if (isPseudo) {
|
|
@@ -210,16 +185,16 @@ current`, {
|
|
|
210
185
|
key,
|
|
211
186
|
val,
|
|
212
187
|
styleProps.noClassNames
|
|
213
|
-
), descriptor = pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
188
|
+
), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
214
189
|
if (!descriptor)
|
|
215
190
|
continue;
|
|
216
|
-
if ((!shouldDoClasses || IS_STATIC) && (pseudos
|
|
191
|
+
if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
|
|
217
192
|
Object.assign(pseudos[key], pseudoStyleObject);
|
|
218
193
|
continue;
|
|
219
194
|
}
|
|
220
195
|
if (shouldDoClasses && !isExit) {
|
|
221
|
-
const pseudoStyles = generateAtomicStyles(pseudoStyleObject, descriptor);
|
|
222
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), log({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
|
|
196
|
+
const pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
|
|
197
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
|
|
223
198
|
for (const psuedoStyle of pseudoStyles) {
|
|
224
199
|
const fullKey = `${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}`;
|
|
225
200
|
fullKey in usedKeys || (psuedoStyle.identifier, void 0);
|
|
@@ -228,7 +203,7 @@ current`, {
|
|
|
228
203
|
if (!shouldDoClasses || isExit || isEnter) {
|
|
229
204
|
const descriptorKey = descriptor.stateKey || descriptor.name;
|
|
230
205
|
let isDisabled = componentState[descriptorKey] === !1;
|
|
231
|
-
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, { isDisabled }), log({ pseudoStyleObject, isDisabled, descriptor, componentState }), console.groupEnd());
|
|
206
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, { isDisabled }), (0, import_log.log)({ pseudoStyleObject, isDisabled, descriptor, componentState }), console.groupEnd());
|
|
232
207
|
const importance = descriptor.priority;
|
|
233
208
|
for (const pkey in pseudoStyleObject) {
|
|
234
209
|
const val2 = pseudoStyleObject[pkey];
|
|
@@ -237,7 +212,7 @@ current`, {
|
|
|
237
212
|
defaultValues != null && !(pkey in usedKeys) && mergeStyle(styleState, pkey, defaultValues);
|
|
238
213
|
} else {
|
|
239
214
|
const curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
240
|
-
shouldMerge && (pseudos
|
|
215
|
+
shouldMerge && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
241
216
|
importance,
|
|
242
217
|
curImportance,
|
|
243
218
|
pkey,
|
|
@@ -261,12 +236,12 @@ current`, {
|
|
|
261
236
|
const platform = key.slice(10);
|
|
262
237
|
if (
|
|
263
238
|
// supports web, ios, android
|
|
264
|
-
platform !== currentPlatform && // supports web, native
|
|
239
|
+
platform !== import_constants.currentPlatform && // supports web, native
|
|
265
240
|
platform !== "native"
|
|
266
241
|
)
|
|
267
242
|
continue;
|
|
268
243
|
}
|
|
269
|
-
hasMedia
|
|
244
|
+
hasMedia || (hasMedia = !0);
|
|
270
245
|
const mediaStyle = getSubStyle(
|
|
271
246
|
styleState,
|
|
272
247
|
key,
|
|
@@ -274,7 +249,7 @@ current`, {
|
|
|
274
249
|
// TODO try true like pseudo
|
|
275
250
|
!1
|
|
276
251
|
), mediaKeyShort = key.slice(1);
|
|
277
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} ${key}`, {
|
|
252
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
278
253
|
key,
|
|
279
254
|
val,
|
|
280
255
|
mediaStyle,
|
|
@@ -285,28 +260,28 @@ current`, {
|
|
|
285
260
|
const hasSpace = val.space;
|
|
286
261
|
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
287
262
|
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
|
|
288
|
-
const importance = getMediaImportanceIfMoreImportant(
|
|
263
|
+
const importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
289
264
|
mediaKeyShort,
|
|
290
265
|
"space",
|
|
291
266
|
usedKeys,
|
|
292
267
|
!0
|
|
293
268
|
);
|
|
294
|
-
importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && log(
|
|
269
|
+
importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
|
|
295
270
|
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
296
271
|
));
|
|
297
272
|
}
|
|
298
|
-
const mediaStyles = getStylesAtomic(mediaStyle, debug), priority = mediaStylesSeen;
|
|
273
|
+
const mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
299
274
|
mediaStylesSeen += 1;
|
|
300
275
|
for (const style2 of mediaStyles) {
|
|
301
|
-
const out = createMediaStyle(
|
|
276
|
+
const out = (0, import_createMediaStyle.createMediaStyle)(
|
|
302
277
|
style2,
|
|
303
278
|
mediaKeyShort,
|
|
304
|
-
mediaQueryConfig,
|
|
279
|
+
import_useMedia.mediaQueryConfig,
|
|
305
280
|
isMedia,
|
|
306
281
|
!1,
|
|
307
282
|
priority
|
|
308
283
|
);
|
|
309
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
|
|
284
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
310
285
|
const fullKey = `${style2.property}${PROP_SPLIT}${mediaKeyShort}`;
|
|
311
286
|
fullKey in usedKeys || (out.identifier, void 0);
|
|
312
287
|
}
|
|
@@ -321,25 +296,27 @@ current`, {
|
|
|
321
296
|
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
322
297
|
continue;
|
|
323
298
|
} else if (isGroupMedia) {
|
|
324
|
-
const groupInfo = getGroupPropParts(mediaKeyShort), groupName = groupInfo.name, groupContext = context
|
|
299
|
+
const groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
325
300
|
if (!groupContext) {
|
|
326
301
|
process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
327
302
|
continue;
|
|
328
303
|
}
|
|
329
|
-
const groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = componentState.group
|
|
304
|
+
const groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
330
305
|
if (groupMediaKey) {
|
|
331
|
-
mediaGroups
|
|
332
|
-
const mediaState2 = componentGroupState
|
|
333
|
-
let isActive = mediaState2
|
|
334
|
-
if (!mediaState2 && groupContext.layout && (isActive = mediaKeyMatch(groupMediaKey, groupContext.layout)), !isActive)
|
|
306
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
307
|
+
const mediaState2 = componentGroupState == null ? void 0 : componentGroupState.media;
|
|
308
|
+
let isActive = mediaState2 == null ? void 0 : mediaState2[groupMediaKey];
|
|
309
|
+
if (!mediaState2 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
335
310
|
continue;
|
|
336
311
|
importanceBump = 2;
|
|
337
312
|
}
|
|
338
313
|
if (groupPseudoKey) {
|
|
339
|
-
|
|
340
|
-
context
|
|
314
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
315
|
+
const componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
316
|
+
context.groups.state[groupName]).pseudo;
|
|
317
|
+
if (!(componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey]))
|
|
341
318
|
continue;
|
|
342
|
-
importanceBump = pseudoPriorities[groupPseudoKey];
|
|
319
|
+
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
343
320
|
}
|
|
344
321
|
}
|
|
345
322
|
for (const subKey in mediaStyle) {
|
|
@@ -347,7 +324,7 @@ current`, {
|
|
|
347
324
|
space = valInit.space;
|
|
348
325
|
continue;
|
|
349
326
|
}
|
|
350
|
-
mergeMediaByImportance(
|
|
327
|
+
(0, import_useMedia.mergeMediaByImportance)(
|
|
351
328
|
style,
|
|
352
329
|
mediaKeyShort,
|
|
353
330
|
subKey,
|
|
@@ -367,7 +344,7 @@ current`, {
|
|
|
367
344
|
if (
|
|
368
345
|
// is HOC we can just pass through the styles as props
|
|
369
346
|
// this fixes issues where style prop got merged with wrong priority
|
|
370
|
-
!isHOC && (isValidStyleKey(key, staticConfig) || isAndroid && key === "elevation")
|
|
347
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
371
348
|
) {
|
|
372
349
|
mergeStyle(styleState, key, val);
|
|
373
350
|
continue;
|
|
@@ -377,14 +354,14 @@ current`, {
|
|
|
377
354
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
378
355
|
console.groupCollapsed(" \u2714\uFE0F expand complete", keyInit);
|
|
379
356
|
try {
|
|
380
|
-
log("style", { ...style }), log("transforms", { ...transforms }), log("viewProps", { ...viewProps });
|
|
357
|
+
(0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
|
|
381
358
|
} catch {
|
|
382
359
|
}
|
|
383
360
|
console.groupEnd();
|
|
384
361
|
}
|
|
385
362
|
}
|
|
386
363
|
}
|
|
387
|
-
if (process.env.NODE_ENV === "development" && console.groupEnd(), props.style && mergeStylePropIntoStyle(styleState, props.style), !(styleProps.noNormalize === !1) && (fixStyles(style), isWeb && !staticConfig.isReactNative && styleToCSS(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
|
|
364
|
+
if (process.env.NODE_ENV === "development" && console.groupEnd(), props.style && mergeStylePropIntoStyle(styleState, props.style), !(styleProps.noNormalize === !1) && ((0, import_expandStyles.fixStyles)(style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
|
|
388
365
|
mergeTransform(style, key, val, !0);
|
|
389
366
|
}), parentSplitStyles && !shouldDoClasses))
|
|
390
367
|
for (const key in parentSplitStyles.style)
|
|
@@ -404,14 +381,14 @@ current`, {
|
|
|
404
381
|
mediaGroups
|
|
405
382
|
};
|
|
406
383
|
if (style.fontFamily) {
|
|
407
|
-
const faceInfo = getFont(style.fontFamily)
|
|
384
|
+
const faceInfo = (_e = (0, import_config.getFont)(style.fontFamily)) == null ? void 0 : _e.face;
|
|
408
385
|
if (faceInfo) {
|
|
409
|
-
const overrideFace = faceInfo[style.fontWeight]
|
|
386
|
+
const overrideFace = (_g = (_f = faceInfo[style.fontWeight]) == null ? void 0 : _f[style.fontStyle || "normal"]) == null ? void 0 : _g.val;
|
|
410
387
|
overrideFace && (style.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style.fontWeight, delete style.fontStyle);
|
|
411
388
|
}
|
|
412
|
-
process.env.NODE_ENV === "development" && debug && debug !== "profile" && log(`Found fontFamily native: ${style.fontFamily}`, faceInfo);
|
|
389
|
+
process.env.NODE_ENV === "development" && debug && debug !== "profile" && (0, import_log.log)(`Found fontFamily native: ${style.fontFamily}`, faceInfo);
|
|
413
390
|
}
|
|
414
|
-
if (className && (classNames.className = className), process.env.NODE_ENV === "development" && debug === "verbose" && isDevTools) {
|
|
391
|
+
if (className && (classNames.className = className), process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {
|
|
415
392
|
console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
416
393
|
try {
|
|
417
394
|
const logs = {
|
|
@@ -425,7 +402,7 @@ current`, {
|
|
|
425
402
|
parentSplitStyles
|
|
426
403
|
};
|
|
427
404
|
for (const key in logs)
|
|
428
|
-
log(key, logs[key]);
|
|
405
|
+
(0, import_log.log)(key, logs[key]);
|
|
429
406
|
} catch {
|
|
430
407
|
}
|
|
431
408
|
console.groupEnd();
|
|
@@ -434,13 +411,13 @@ current`, {
|
|
|
434
411
|
};
|
|
435
412
|
function mergeStyle(styleState, key, val, disableNormalize = !1) {
|
|
436
413
|
const { classNames, viewProps, style, usedKeys, styleProps } = styleState;
|
|
437
|
-
if (isWeb && val
|
|
438
|
-
classNames[key] = val, usedKeys[key]
|
|
439
|
-
else if (key in stylePropsTransform)
|
|
440
|
-
styleState.transforms
|
|
414
|
+
if (import_constants.isWeb && (val == null ? void 0 : val[0]) === "_")
|
|
415
|
+
classNames[key] = val, usedKeys[key] || (usedKeys[key] = 1);
|
|
416
|
+
else if (key in import_helpers.stylePropsTransform)
|
|
417
|
+
styleState.transforms || (styleState.transforms = {}), styleState.transforms[key] = val;
|
|
441
418
|
else {
|
|
442
|
-
const out = isWeb && !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
443
|
-
key in validStylesOnBaseProps ? viewProps[key] = out : style[key] = out;
|
|
419
|
+
const out = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
420
|
+
key in import_helpers.validStylesOnBaseProps ? viewProps[key] = out : style[key] = out;
|
|
444
421
|
}
|
|
445
422
|
}
|
|
446
423
|
const getSubStyle = (styleState, subKey, styleIn, avoidMergeTransform) => {
|
|
@@ -448,12 +425,12 @@ const getSubStyle = (styleState, subKey, styleIn, avoidMergeTransform) => {
|
|
|
448
425
|
for (let key in styleIn) {
|
|
449
426
|
const val = styleIn[key];
|
|
450
427
|
key = conf2.shorthands[key] || key;
|
|
451
|
-
const expanded = propMapper(key, val, styleState, { ...props, ...props[subKey] });
|
|
428
|
+
const expanded = (0, import_propMapper.propMapper)(key, val, styleState, { ...props, ...props[subKey] });
|
|
452
429
|
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip))
|
|
453
430
|
for (const [skey, sval] of expanded)
|
|
454
|
-
!avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key);
|
|
431
|
+
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
455
432
|
}
|
|
456
|
-
return styleProps.noNormalize || fixStyles(styleOut), styleOut;
|
|
433
|
+
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
457
434
|
};
|
|
458
435
|
function mergeStylePropIntoStyle(styleState, cur) {
|
|
459
436
|
if (!cur)
|
|
@@ -466,11 +443,11 @@ function mergeStylePropIntoStyle(styleState, cur) {
|
|
|
466
443
|
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
467
444
|
}
|
|
468
445
|
}
|
|
469
|
-
const useInsertEffectCompat = isWeb ? useInsertionEffect || useIsomorphicLayoutEffect : () => {
|
|
446
|
+
const useInsertEffectCompat = import_constants.isWeb ? import_react.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
470
447
|
}, useSplitStyles = (...args) => {
|
|
471
448
|
const res = getSplitStyles(...args);
|
|
472
449
|
return useInsertEffectCompat(() => {
|
|
473
|
-
insertStyleRules(res.rulesToInsert);
|
|
450
|
+
(0, import_insertStyleRule.insertStyleRules)(res.rulesToInsert);
|
|
474
451
|
}, [res.rulesToInsert]), res;
|
|
475
452
|
};
|
|
476
453
|
const animatableDefaults = {
|
|
@@ -482,7 +459,7 @@ const animatableDefaults = {
|
|
|
482
459
|
x: 0,
|
|
483
460
|
y: 0
|
|
484
461
|
}, lowercaseHyphenate = (match) => `-${match.toLowerCase()}`, hyphenate = (str) => str.replace(/[A-Z]/g, lowercaseHyphenate), mergeTransform = (obj, key, val, backwards = !1) => {
|
|
485
|
-
typeof obj.transform != "string" && (obj.transform
|
|
462
|
+
typeof obj.transform != "string" && (obj.transform || (obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
|
|
486
463
|
[mapTransformKeys[key] || key]: val
|
|
487
464
|
}));
|
|
488
465
|
}, mapTransformKeys = {
|
|
@@ -527,10 +504,11 @@ function passDownProp(viewProps, key, val, shouldMergeObject = !1) {
|
|
|
527
504
|
} else
|
|
528
505
|
viewProps[key] = val;
|
|
529
506
|
}
|
|
530
|
-
export
|
|
507
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
508
|
+
0 && (module.exports = {
|
|
531
509
|
PROP_SPLIT,
|
|
532
510
|
getSplitStyles,
|
|
533
511
|
getSubStyle,
|
|
534
512
|
useSplitStyles
|
|
535
|
-
};
|
|
513
|
+
});
|
|
536
514
|
//# sourceMappingURL=getSplitStyles.js.map
|