@tamagui/web 1.88.21 → 1.88.23
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/esm/Tamagui.native.js +14 -41
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/config.native.js +4 -40
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +2 -27
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +1 -1
- package/dist/esm/constants/constants.native.js +2 -26
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.native.js +2 -23
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +4 -25
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.native.js +108 -100
- package/dist/esm/createComponent.native.js.map +2 -2
- package/dist/esm/createFont.native.js +2 -23
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createShorthands.native.js +2 -23
- package/dist/esm/createShorthands.native.js.map +1 -1
- package/dist/esm/createTamagui.native.js +33 -40
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTheme.native.js +2 -23
- package/dist/esm/createTheme.native.js.map +1 -1
- package/dist/esm/createTokens.native.js +4 -25
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.native.js +10 -38
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.native.js +7 -27
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/defaultComponentState.native.js +2 -25
- package/dist/esm/defaultComponentState.native.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.native.js +12 -33
- package/dist/esm/helpers/ThemeManager.native.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.native.js +4 -25
- package/dist/esm/helpers/ThemeManagerContext.native.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.native.js +8 -28
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/esm/helpers/createShallowSetState.native.js +2 -25
- package/dist/esm/helpers/createShallowSetState.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +11 -30
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultOffset.native.js +2 -23
- package/dist/esm/helpers/defaultOffset.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +5 -26
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +6 -26
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js +4 -25
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/esm/helpers/getFontLanguage.native.js +2 -23
- package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +4 -25
- package/dist/esm/helpers/getGroupPropParts.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +108 -83
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +2 -26
- package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js +2 -23
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +4 -26
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +8 -36
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.js +2 -23
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js +2 -23
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +5 -25
- package/dist/esm/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/esm/helpers/log.native.js +2 -23
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +2 -24
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +5 -25
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +2 -23
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/normalizeColor.native.js +7 -29
- package/dist/esm/helpers/normalizeColor.native.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +7 -27
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +11 -28
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +2 -23
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -29
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +2 -23
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +31 -46
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +4 -26
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.native.js +2 -23
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +2 -25
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +5 -28
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +2 -23
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/themeable.native.js +12 -31
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- package/dist/esm/helpers/themes.native.js +5 -26
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/timer.native.js +2 -23
- package/dist/esm/helpers/timer.native.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.native.js +7 -26
- package/dist/esm/hooks/useConfiguration.native.js.map +1 -1
- package/dist/esm/hooks/useDisableSSR.native.js +4 -25
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.native.js +5 -25
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +14 -44
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useProps.native.js +12 -29
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +27 -47
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeName.native.js +8 -26
- package/dist/esm/hooks/useThemeName.native.js.map +1 -1
- package/dist/esm/index.native.js +79 -155
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/inject-styles.native.js +2 -23
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/insertFont.native.js +10 -31
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.native.js +0 -14
- package/dist/esm/interfaces/CSSColorNames.native.js.map +2 -2
- package/dist/esm/interfaces/GetRef.native.js +0 -14
- package/dist/esm/interfaces/GetRef.native.js.map +2 -2
- package/dist/esm/interfaces/KeyTypes.native.js +0 -14
- package/dist/esm/interfaces/KeyTypes.native.js.map +2 -2
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +0 -14
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +2 -2
- package/dist/esm/interfaces/Role.native.js +0 -14
- package/dist/esm/interfaces/Role.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentState.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentState.native.js.map +2 -2
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js +0 -14
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +2 -2
- package/dist/esm/internalWithTheme.native.js +6 -26
- package/dist/esm/internalWithTheme.native.js.map +1 -1
- package/dist/esm/setupHooks.native.js +2 -24
- package/dist/esm/setupHooks.native.js.map +1 -1
- package/dist/esm/setupReactNative.native.js +2 -24
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/styled.native.js +8 -27
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/type-utils.native.js +0 -14
- package/dist/esm/type-utils.native.js.map +2 -2
- package/dist/esm/types.native.js +2 -21
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/Configuration.native.js +7 -26
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +7 -26
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.types.native.js +0 -14
- package/dist/esm/views/FontLanguage.types.native.js.map +2 -2
- package/dist/esm/views/Slot.native.js +15 -33
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/Stack.native.js +8 -27
- package/dist/esm/views/Stack.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +11 -35
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.native.js +7 -27
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.native.js +23 -47
- package/dist/esm/views/Theme.native.js.map +2 -2
- package/dist/esm/views/ThemeDebug.native.js +2 -23
- package/dist/esm/views/ThemeDebug.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +11 -28
- package/dist/esm/views/ThemeProvider.native.js.map +2 -2
- package/dist/esm/views/View.native.js +8 -27
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
|
|
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 registerCSSVariable_exports = {};
|
|
17
|
-
__export(registerCSSVariable_exports, {
|
|
18
|
-
registerCSSVariable: () => registerCSSVariable,
|
|
19
|
-
tokensValueToVariable: () => tokensValueToVariable,
|
|
20
|
-
variableToCSS: () => variableToCSS
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(registerCSSVariable_exports);
|
|
23
|
-
var import_createVariable = require("../createVariable");
|
|
1
|
+
import { createCSSVariable, getVariableValue } from "../createVariable";
|
|
24
2
|
const registerCSSVariable = (v) => {
|
|
25
|
-
tokensValueToVariable.set(
|
|
26
|
-
}, variableToCSS = (v, unitless = !1) => `--${
|
|
27
|
-
|
|
28
|
-
0 && (module.exports = {
|
|
3
|
+
tokensValueToVariable.set(getVariableValue(v), v);
|
|
4
|
+
}, variableToCSS = (v, unitless = !1) => `--${createCSSVariable(v.name, !1)}:${!unitless && typeof v.val == "number" ? `${v.val}px` : v.val}`, tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
5
|
+
export {
|
|
29
6
|
registerCSSVariable,
|
|
30
7
|
tokensValueToVariable,
|
|
31
8
|
variableToCSS
|
|
32
|
-
}
|
|
9
|
+
};
|
|
33
10
|
//# sourceMappingURL=registerCSSVariable.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/registerCSSVariable.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AACA,SAAS,mBAAmB,wBAAwB;AAG7C,MAAM,sBAAsB,CAAC,MAA8B;AAChE,wBAAsB,IAAI,iBAAiB,CAAC,GAAG,CAAC;AAClD,GAEa,gBAAgB,CAAC,GAAa,WAAW,OAC7C,KAAK,kBAAkB,EAAE,MAAM,EAAK,CAAC,IAC1C,CAAC,YAAY,OAAO,EAAE,OAAQ,WAAW,GAAG,EAAE,GAAG,OAAO,EAAE,GAC5D,IAGW,wBAAwB,oBAAI,IAAc;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,23 +1,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 skipProps_exports = {};
|
|
17
|
-
__export(skipProps_exports, {
|
|
18
|
-
skipProps: () => skipProps
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(skipProps_exports);
|
|
21
1
|
const skipProps = {
|
|
22
2
|
untilMeasured: 1,
|
|
23
3
|
animation: 1,
|
|
@@ -47,8 +27,7 @@ Object.assign(skipProps, {
|
|
|
47
27
|
outlineWidth: 1,
|
|
48
28
|
outlineColor: 1
|
|
49
29
|
});
|
|
50
|
-
|
|
51
|
-
0 && (module.exports = {
|
|
30
|
+
export {
|
|
52
31
|
skipProps
|
|
53
|
-
}
|
|
32
|
+
};
|
|
54
33
|
//# sourceMappingURL=skipProps.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/skipProps.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAGO,MAAM,YAAY;AAAA,EACvB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,KAAK;AAAA,EACL,OAAO;AAAA;AAAA,EACP,OAAO;AACT;AAEI,QAAQ,IAAI,aAAa,WAC3B,UAAU,mBAAmB,IAAI;AAKjC,OAAO,OAAO,WAAW;AAAA,EACvB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,wBAAwB;AAAA,EACxB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAChB,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,32 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 themeable_exports = {};
|
|
17
|
-
__export(themeable_exports, {
|
|
18
|
-
themeable: () => themeable
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(themeable_exports);
|
|
21
|
-
var import_react = require("react"), import_Theme = require("../views/Theme"), import_jsx_runtime = (
|
|
22
|
-
// @ts-expect-error its ok
|
|
23
|
-
require("react/jsx-runtime")
|
|
24
|
-
);
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { Theme } from "../views/Theme";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
25
4
|
function themeable(Component, staticConfig) {
|
|
26
|
-
const withTheme =
|
|
27
|
-
const { themeInverse, theme, componentName, themeReset, ...rest } = props, element =
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
const withTheme = forwardRef(function(props, ref) {
|
|
6
|
+
const { themeInverse, theme, componentName, themeReset, ...rest } = props, element = (
|
|
7
|
+
// @ts-expect-error its ok
|
|
8
|
+
/* @__PURE__ */ jsx(Component, { ref, ...rest, "data-disable-theme": !0 })
|
|
9
|
+
);
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Theme,
|
|
30
12
|
{
|
|
31
13
|
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName),
|
|
32
14
|
name: theme,
|
|
@@ -40,8 +22,7 @@ function themeable(Component, staticConfig) {
|
|
|
40
22
|
});
|
|
41
23
|
return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
|
|
42
24
|
}
|
|
43
|
-
|
|
44
|
-
0 && (module.exports = {
|
|
25
|
+
export {
|
|
45
26
|
themeable
|
|
46
|
-
}
|
|
27
|
+
};
|
|
47
28
|
//# sourceMappingURL=themeable.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/themeable.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAG3B,SAAS,aAAa;AAWhB;AATC,SAAS,UACd,WACA,cACA;AAyBA,QAAM,YAxBqB,WAAW,SAAmB,OAAuB,KAAK;AACnF,UAAM,EAAE,cAAc,OAAO,eAAe,YAAY,GAAG,KAAK,IAAI,OAE9D;AAAA;AAAA,MAEJ,oBAAC,aAAU,KAAW,GAAG,MAAM,sBAAkB,IAAC;AAAA;AAgBpD,WAZE;AAAA,MAAC;AAAA;AAAA,QACC,eAAe,kBAAiB,6CAAc;AAAA,QAC9C,MAAM;AAAA,QACN,uBAAmB;AAAA,QACnB,OAAO,MAAM;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QAEN;AAAA;AAAA,IACH;AAAA,EAIJ,CAAC;AAGD,mBAAU,cAAc,WACrB,uCAAmB,iBAAgB,uCAAmB,SAAQ,WACjE,KAEO;AAGT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
|
|
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 themes_exports = {};
|
|
17
|
-
__export(themes_exports, {
|
|
18
|
-
ensureThemeVariable: () => ensureThemeVariable
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(themes_exports);
|
|
21
|
-
var import_createVariable = require("../createVariable");
|
|
1
|
+
import { createVariable, isVariable } from "../createVariable";
|
|
22
2
|
function ensureThemeVariable(theme, key) {
|
|
23
3
|
const val = theme[key];
|
|
24
|
-
|
|
4
|
+
isVariable(val) ? val.name !== key && (theme[key] = createVariable({
|
|
25
5
|
key: val.name,
|
|
26
6
|
name: key,
|
|
27
7
|
val: val.val
|
|
28
|
-
})) : theme[key] =
|
|
8
|
+
})) : theme[key] = createVariable({
|
|
29
9
|
key,
|
|
30
10
|
name: key,
|
|
31
11
|
val
|
|
32
12
|
});
|
|
33
13
|
}
|
|
34
|
-
|
|
35
|
-
0 && (module.exports = {
|
|
14
|
+
export {
|
|
36
15
|
ensureThemeVariable
|
|
37
|
-
}
|
|
16
|
+
};
|
|
38
17
|
//# sourceMappingURL=themes.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/themes.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,gBAAgB,kBAAkB;AAIpC,SAAS,oBAAoB,OAAY,KAAa;AAC3D,QAAM,MAAM,MAAM,GAAG;AACrB,EAAK,WAAW,GAAG,IAOb,IAAI,SAAS,QAEf,MAAM,GAAG,IAAI,eAAe;AAAA,IAC1B,KAAK,IAAI;AAAA,IACT,MAAM;AAAA,IACN,KAAK,IAAI;AAAA,EACX,CAAC,KAZH,MAAM,GAAG,IAAI,eAAe;AAAA,IAC1B;AAAA,IACA,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AAWL;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,23 +1,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 timer_exports = {};
|
|
17
|
-
__export(timer_exports, {
|
|
18
|
-
time: () => time
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(timer_exports);
|
|
21
1
|
const timer = require("@tamagui/timer").timer();
|
|
22
2
|
setTimeout(() => {
|
|
23
3
|
timer.print();
|
|
@@ -25,8 +5,7 @@ setTimeout(() => {
|
|
|
25
5
|
const time = timer.start({
|
|
26
6
|
quiet: !0
|
|
27
7
|
});
|
|
28
|
-
|
|
29
|
-
0 && (module.exports = {
|
|
8
|
+
export {
|
|
30
9
|
time
|
|
31
|
-
}
|
|
10
|
+
};
|
|
32
11
|
//# sourceMappingURL=timer.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/timer.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,MAAM,QAAQ,QAAQ,gBAAgB,EAAE,MAAM;AAE9C,WAAW,MAAM;AACf,QAAM,MAAM;AACd,GAAG,GAAI;AAEA,MAAM,OAAO,MAAM,MAAM;AAAA,EAC9B,OAAO;AACT,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 useConfiguration_exports = {};
|
|
17
|
-
__export(useConfiguration_exports, {
|
|
18
|
-
useConfiguration: () => useConfiguration
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(useConfiguration_exports);
|
|
21
|
-
var import_react = require("react"), import_config = require("../config"), import_ComponentContext = require("../contexts/ComponentContext");
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { getConfig } from "../config";
|
|
3
|
+
import { ComponentContext } from "../contexts/ComponentContext";
|
|
22
4
|
const useConfiguration = () => {
|
|
23
|
-
const { groups, animationDriver, ...restComponentConfig } =
|
|
5
|
+
const { groups, animationDriver, ...restComponentConfig } = useContext(ComponentContext), { animations, ...restConfig } = getConfig();
|
|
24
6
|
return {
|
|
25
7
|
...restConfig,
|
|
26
8
|
...restComponentConfig,
|
|
27
|
-
animationDriver: animationDriver ??
|
|
9
|
+
animationDriver: animationDriver ?? getConfig().animations
|
|
28
10
|
};
|
|
29
11
|
};
|
|
30
|
-
|
|
31
|
-
0 && (module.exports = {
|
|
12
|
+
export {
|
|
32
13
|
useConfiguration
|
|
33
|
-
}
|
|
14
|
+
};
|
|
34
15
|
//# sourceMappingURL=useConfiguration.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useConfiguration.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AAE1B,MAAM,mBAAmB,MAAM;AACpC,QAAM,EAAE,QAAQ,iBAAiB,GAAG,oBAAoB,IAAI,WAAW,gBAAgB,GACjF,EAAE,YAAY,GAAG,WAAW,IAAI,UAAU;AAChD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH,iBAAiB,mBAAmB,UAAU,EAAE;AAAA,EAClD;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
|
|
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 useDisableSSR_exports = {};
|
|
17
|
-
__export(useDisableSSR_exports, {
|
|
18
|
-
getDisableSSR: () => getDisableSSR
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(useDisableSSR_exports);
|
|
21
|
-
var import_config = require("../config");
|
|
1
|
+
import { getConfig } from "../config";
|
|
22
2
|
function getDisableSSR(componentContext) {
|
|
23
|
-
return (componentContext == null ? void 0 : componentContext.disableSSR) ??
|
|
3
|
+
return (componentContext == null ? void 0 : componentContext.disableSSR) ?? getConfig().disableSSR;
|
|
24
4
|
}
|
|
25
|
-
|
|
26
|
-
0 && (module.exports = {
|
|
5
|
+
export {
|
|
27
6
|
getDisableSSR
|
|
28
|
-
}
|
|
7
|
+
};
|
|
29
8
|
//# sourceMappingURL=useDisableSSR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useDisableSSR.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAGnB,SAAS,cAAc,kBAAsC;AAClE,UAAO,qDAAkB,eAAc,UAAU,EAAE;AACrD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 useIsTouchDevice_exports = {};
|
|
17
|
-
__export(useIsTouchDevice_exports, {
|
|
18
|
-
useIsTouchDevice: () => useIsTouchDevice
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(useIsTouchDevice_exports);
|
|
21
|
-
var import_constants = require("@tamagui/constants"), import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr");
|
|
22
|
-
const useIsTouchDevice = () => import_constants.isWeb ? (0, import_use_did_finish_ssr.useDidFinishSSR)() ? import_constants.isTouchable : !1 : !0;
|
|
23
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
24
|
-
0 && (module.exports = {
|
|
1
|
+
import { isTouchable, isWeb } from "@tamagui/constants";
|
|
2
|
+
import { useDidFinishSSR } from "@tamagui/use-did-finish-ssr";
|
|
3
|
+
const useIsTouchDevice = () => isWeb ? useDidFinishSSR() ? isTouchable : !1 : !0;
|
|
4
|
+
export {
|
|
25
5
|
useIsTouchDevice
|
|
26
|
-
}
|
|
6
|
+
};
|
|
27
7
|
//# sourceMappingURL=useIsTouchDevice.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useIsTouchDevice.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,aAAa,aAAa;AACnC,SAAS,uBAAuB;AAEzB,MAAM,mBAAmB,MACtB,QAAe,gBAAgB,IAAI,cAAc,KAAzC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 useMedia_exports = {};
|
|
17
|
-
__export(useMedia_exports, {
|
|
18
|
-
configureMedia: () => configureMedia,
|
|
19
|
-
getMedia: () => getMedia,
|
|
20
|
-
getMediaImportanceIfMoreImportant: () => getMediaImportanceIfMoreImportant,
|
|
21
|
-
getMediaKeyImportance: () => getMediaKeyImportance,
|
|
22
|
-
isMediaKey: () => isMediaKey,
|
|
23
|
-
mediaKeyMatch: () => mediaKeyMatch,
|
|
24
|
-
mediaKeyToQuery: () => mediaKeyToQuery,
|
|
25
|
-
mediaKeys: () => mediaKeys,
|
|
26
|
-
mediaObjectToString: () => mediaObjectToString,
|
|
27
|
-
mediaQueryConfig: () => mediaQueryConfig,
|
|
28
|
-
mediaState: () => mediaState,
|
|
29
|
-
mergeMediaByImportance: () => mergeMediaByImportance,
|
|
30
|
-
setMediaShouldUpdate: () => setMediaShouldUpdate,
|
|
31
|
-
setupMediaListeners: () => setupMediaListeners,
|
|
32
|
-
useMedia: () => useMedia
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(useMedia_exports);
|
|
35
|
-
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_config = require("../config"), import_matchMedia = require("../helpers/matchMedia"), import_pseudoDescriptors = require("../helpers/pseudoDescriptors"), import_useDisableSSR = require("./useDisableSSR");
|
|
1
|
+
import { isServer, isWeb } from "@tamagui/constants";
|
|
2
|
+
import { useRef, useSyncExternalStore } from "react";
|
|
3
|
+
import { getConfig } from "../config";
|
|
4
|
+
import { matchMedia } from "../helpers/matchMedia";
|
|
5
|
+
import { pseudoDescriptors } from "../helpers/pseudoDescriptors";
|
|
6
|
+
import { getDisableSSR } from "./useDisableSSR";
|
|
36
7
|
let mediaState = (
|
|
37
8
|
// development only safeguard
|
|
38
9
|
process.env.NODE_ENV === "development" ? new Proxy(
|
|
@@ -61,12 +32,12 @@ const mediaQueryConfig = {}, getMedia = () => mediaState, mediaKeys = /* @__PURE
|
|
|
61
32
|
return !1;
|
|
62
33
|
};
|
|
63
34
|
let initState;
|
|
64
|
-
const defaultMediaImportance = Object.keys(
|
|
35
|
+
const defaultMediaImportance = Object.keys(pseudoDescriptors).length;
|
|
65
36
|
let mediaKeysOrdered;
|
|
66
37
|
const getMediaKeyImportance = (key) => {
|
|
67
38
|
if (process.env.NODE_ENV === "development" && key[0] === "$")
|
|
68
39
|
throw new Error("use short key");
|
|
69
|
-
return
|
|
40
|
+
return getConfig().settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100;
|
|
70
41
|
}, dispose = /* @__PURE__ */ new Set();
|
|
71
42
|
let mediaVersion = 0;
|
|
72
43
|
const configureMedia = (config) => {
|
|
@@ -83,7 +54,7 @@ function unlisten() {
|
|
|
83
54
|
}
|
|
84
55
|
let setupVersion = -1;
|
|
85
56
|
function setupMediaListeners() {
|
|
86
|
-
if (!(
|
|
57
|
+
if (!(isWeb && isServer) && setupVersion !== mediaVersion) {
|
|
87
58
|
setupVersion = mediaVersion, unlisten();
|
|
88
59
|
for (const key in mediaQueryConfig) {
|
|
89
60
|
let update2 = function() {
|
|
@@ -91,7 +62,7 @@ function setupMediaListeners() {
|
|
|
91
62
|
next !== mediaState[key] && (mediaState = { ...mediaState, [key]: next }, updateCurrentState());
|
|
92
63
|
};
|
|
93
64
|
var update = update2;
|
|
94
|
-
const str = mediaObjectToString(mediaQueryConfig[key], key), getMatch = () =>
|
|
65
|
+
const str = mediaObjectToString(mediaQueryConfig[key], key), getMatch = () => matchMedia(str), match = getMatch();
|
|
95
66
|
if (!match)
|
|
96
67
|
throw new Error("\u26A0\uFE0F No match");
|
|
97
68
|
match.addListener(update2), dispose.add(() => {
|
|
@@ -115,7 +86,7 @@ function subscribe(subscriber) {
|
|
|
115
86
|
return listeners.add(subscriber), () => listeners.delete(subscriber);
|
|
116
87
|
}
|
|
117
88
|
function useMedia(uid, componentContext) {
|
|
118
|
-
const internal =
|
|
89
|
+
const internal = useRef(), initialState = (getDisableSSR(componentContext) || !isWeb ? mediaState : initState) || {}, state = useSyncExternalStore(
|
|
119
90
|
subscribe,
|
|
120
91
|
() => {
|
|
121
92
|
if (!internal.current)
|
|
@@ -136,7 +107,7 @@ function useMedia(uid, componentContext) {
|
|
|
136
107
|
});
|
|
137
108
|
}
|
|
138
109
|
const getMediaImportanceIfMoreImportant = (mediaKey, key, importancesUsed, isSizeMedia) => {
|
|
139
|
-
const conf =
|
|
110
|
+
const conf = getConfig(), importance = isSizeMedia && !conf.settings.mediaPropOrder ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
|
|
140
111
|
return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
|
|
141
112
|
};
|
|
142
113
|
function mergeMediaByImportance(onto, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
|
|
@@ -170,8 +141,7 @@ function mediaKeyMatch(key, dimensions) {
|
|
|
170
141
|
return isMax ? givenVal < expectedVal : givenVal > expectedVal;
|
|
171
142
|
});
|
|
172
143
|
}
|
|
173
|
-
|
|
174
|
-
0 && (module.exports = {
|
|
144
|
+
export {
|
|
175
145
|
configureMedia,
|
|
176
146
|
getMedia,
|
|
177
147
|
getMediaImportanceIfMoreImportant,
|
|
@@ -187,5 +157,5 @@ function mediaKeyMatch(key, dimensions) {
|
|
|
187
157
|
setMediaShouldUpdate,
|
|
188
158
|
setupMediaListeners,
|
|
189
159
|
useMedia
|
|
190
|
-
}
|
|
160
|
+
};
|
|
191
161
|
//# sourceMappingURL=useMedia.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useMedia.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,UAAU,aAAa;AAChC,SAAS,QAAQ,4BAA4B;AAE7C,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAWlC,SAAS,qBAAqB;AAEvB,IAAI;AAAA;AAAA,EAET,QAAQ,IAAI,aAAa,gBACrB,IAAI;AAAA,IACF,CAAC;AAAA,IACD;AAAA,MACE,IAAI,QAAQ,KAAK;AACf,YACE,OAAO,OAAQ,YACf,IAAI,CAAC,MAAM;AAAA,QAEX,IAAI,CAAC,MAAM;AAEX,gBAAM,IAAI,MAAM,yCAAyC,GAAG,EAAE;AAEhE,eAAO,QAAQ,IAAI,QAAQ,GAAG;AAAA,MAChC;AAAA,IACF;AAAA,EACF,IACC,CAAC;AAAA;AAED,MAAM,mBAAiC,CAAC,GAElC,WAAW,MAAM,YAEjB,YAAY,oBAAI,IAAY,GAE5B,aAAa,CAAC,QAA6B;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MAAM,OAAO,QAAQ,KAAK,EAC7B,IAAI,CAAC,CAAC,SAAS,KAAK,OACnB,UAAU,cAAc,OAAO,GAC3B,OAAO,SAAU,WACZ,IAAI,OAAO,KAAK,KAAK,OAE1B,OAAO,SAAU,YAAY,kBAAkB,KAAK,OAAO,MAC7D,QAAQ,GAAG,KAAK,OAEX,IAAI,OAAO,KAAK,KAAK,KAC7B,EACA,KAAK,OAAO;AACf,SAAI,QACF,sBAAsB,GAAG,IAAI,MAE/B,MAAM,IAAI,OAAO,GAAG,GACb;AACT;AAEO,SAAS,gBAAgB,KAAa;AAC3C,SAAO,sBAAsB,GAAG,KAAK,oBAAoB,iBAAiB,GAAG,GAAG,GAAG;AACrF;AAEO,SAAS,cACd,KACA,YACA;AACA,QAAM,eAAe,iBAAiB,GAAG;AASzC,SARe,OAAO,KAAK,YAAY,EAAE,MAAM,CAAC,UAAU;AACxD,UAAM,cAAc,CAAC,aAAa,KAAK,GACjC,QAAQ,MAAM,WAAW,KAAK,GAC9B,UAAU,MAAM,SAAS,OAAO,GAChC,WAAW,WAAW,UAAU,UAAU,QAAQ;AAExD,WAAO,QAAQ,WAAW,cAAc,WAAW;AAAA,EACrD,CAAC;AAEH;",
|
|
5
5
|
"names": ["update"]
|
|
6
6
|
}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 useProps_exports = {};
|
|
17
|
-
__export(useProps_exports, {
|
|
18
|
-
useProps: () => useProps,
|
|
19
|
-
usePropsAndStyle: () => usePropsAndStyle,
|
|
20
|
-
useStyle: () => useStyle
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(useProps_exports);
|
|
23
|
-
var import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_defaultComponentState = require("../defaultComponentState"), import_getSplitStyles = require("../helpers/getSplitStyles"), import_Stack = require("../views/Stack"), import_useMedia = require("./useMedia"), import_useTheme = require("./useTheme");
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ComponentContext } from "../contexts/ComponentContext";
|
|
3
|
+
import { defaultComponentStateMounted } from "../defaultComponentState";
|
|
4
|
+
import { useSplitStyles } from "../helpers/getSplitStyles";
|
|
5
|
+
import { Stack } from "../views/Stack";
|
|
6
|
+
import { useMedia } from "./useMedia";
|
|
7
|
+
import { useThemeWithState } from "./useTheme";
|
|
24
8
|
function useProps(props, opts) {
|
|
25
9
|
const [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
26
10
|
...opts,
|
|
@@ -38,14 +22,14 @@ function useStyle(props, opts) {
|
|
|
38
22
|
}
|
|
39
23
|
function usePropsAndStyle(props, opts) {
|
|
40
24
|
var _a, _b;
|
|
41
|
-
const staticConfig = ((_a = opts == null ? void 0 : opts.forComponent) == null ? void 0 : _a.staticConfig) ??
|
|
25
|
+
const staticConfig = ((_a = opts == null ? void 0 : opts.forComponent) == null ? void 0 : _a.staticConfig) ?? Stack.staticConfig, [themeState, theme] = useThemeWithState({
|
|
42
26
|
componentName: staticConfig.componentName
|
|
43
|
-
}), componentContext =
|
|
27
|
+
}), componentContext = useContext(ComponentContext), media = useMedia(), splitStyles = useSplitStyles(
|
|
44
28
|
props,
|
|
45
29
|
staticConfig,
|
|
46
30
|
theme,
|
|
47
31
|
((_b = themeState.state) == null ? void 0 : _b.name) || "",
|
|
48
|
-
|
|
32
|
+
defaultComponentStateMounted,
|
|
49
33
|
{
|
|
50
34
|
isAnimated: !1,
|
|
51
35
|
mediaState: media,
|
|
@@ -59,10 +43,9 @@ function usePropsAndStyle(props, opts) {
|
|
|
59
43
|
);
|
|
60
44
|
return [splitStyles.viewProps, splitStyles.style, theme, media];
|
|
61
45
|
}
|
|
62
|
-
|
|
63
|
-
0 && (module.exports = {
|
|
46
|
+
export {
|
|
64
47
|
useProps,
|
|
65
48
|
usePropsAndStyle,
|
|
66
49
|
useStyle
|
|
67
|
-
}
|
|
50
|
+
};
|
|
68
51
|
//# sourceMappingURL=useProps.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useProps.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,wBAAwB;AACjC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAQ/B,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAuB3B,SAAS,SACd,OACA,MAC4B;AAC5B,QAAM,CAAC,UAAU,QAAQ,IAAI,iBAAiB,OAAO;AAAA,IACnD,GAAG;AAAA,IACH,UAAU;AAAA,IACV,aAAa;AAAA,IACb,eAAe;AAAA,EACjB,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;AAQO,SAAS,SACd,OACA,MAC4B;AAC5B,SAAO,iBAAiB,OAAO,IAAI,EAAE,CAAC;AACxC;AAQO,SAAS,iBACd,OACA,MACsF;AA3ExF;AA4EE,QAAM,iBAAe,kCAAM,iBAAN,mBAAoB,iBAAgB,MAAM,cACzD,CAAC,YAAY,KAAK,IAAI,kBAAkB;AAAA,IAC5C,eAAe,aAAa;AAAA,EAC9B,CAAC,GACK,mBAAmB,WAAW,gBAAgB,GAC9C,QAAQ,SAAS,GACjB,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,MACA,gBAAW,UAAX,mBAAkB,SAAQ;AAAA,IAC1B;AAAA,IACA;AAAA,MACE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,eAAe;AAAA,MACf,GAAG;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,SAAO,CAAC,YAAY,WAAW,YAAY,OAAO,OAAO,KAAK;AAChE;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|