@tamagui/core 1.125.24 → 1.125.25
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/native.js +87 -83
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +78 -75
- package/dist/test.native.js.map +3 -3
- package/package.json +7 -7
package/dist/test.native.js
CHANGED
|
@@ -983,6 +983,79 @@ var require_index_native3 = __commonJS({
|
|
|
983
983
|
}
|
|
984
984
|
});
|
|
985
985
|
|
|
986
|
+
// ../web/dist/cjs/constants/constants.native.js
|
|
987
|
+
var require_constants_native2 = __commonJS({
|
|
988
|
+
"../web/dist/cjs/constants/constants.native.js"(exports2, module2) {
|
|
989
|
+
"use strict";
|
|
990
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
991
|
+
for (var name in all) __defProp2(target, name, {
|
|
992
|
+
get: all[name],
|
|
993
|
+
enumerable: !0
|
|
994
|
+
});
|
|
995
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
996
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
997
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
998
|
+
for (var _loop = function() {
|
|
999
|
+
var key = _step.value;
|
|
1000
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
1001
|
+
get: function() {
|
|
1002
|
+
return from[key];
|
|
1003
|
+
},
|
|
1004
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
1005
|
+
});
|
|
1006
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
1007
|
+
} catch (err) {
|
|
1008
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
1009
|
+
} finally {
|
|
1010
|
+
try {
|
|
1011
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1012
|
+
} finally {
|
|
1013
|
+
if (_didIteratorError)
|
|
1014
|
+
throw _iteratorError;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
return to;
|
|
1018
|
+
}, __toCommonJS2 = function(mod) {
|
|
1019
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
1020
|
+
value: !0
|
|
1021
|
+
}), mod);
|
|
1022
|
+
}, constants_exports = {};
|
|
1023
|
+
__export2(constants_exports, {
|
|
1024
|
+
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
1025
|
+
return FONT_DATA_ATTRIBUTE_NAME;
|
|
1026
|
+
},
|
|
1027
|
+
MISSING_THEME_MESSAGE: function() {
|
|
1028
|
+
return MISSING_THEME_MESSAGE;
|
|
1029
|
+
},
|
|
1030
|
+
THEME_CLASSNAME_PREFIX: function() {
|
|
1031
|
+
return THEME_CLASSNAME_PREFIX;
|
|
1032
|
+
},
|
|
1033
|
+
THEME_NAME_SEPARATOR: function() {
|
|
1034
|
+
return THEME_NAME_SEPARATOR;
|
|
1035
|
+
},
|
|
1036
|
+
stackDefaultStyles: function() {
|
|
1037
|
+
return stackDefaultStyles;
|
|
1038
|
+
},
|
|
1039
|
+
webViewFlexCompatStyles: function() {
|
|
1040
|
+
return webViewFlexCompatStyles;
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
1044
|
+
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
1045
|
+
display: "flex",
|
|
1046
|
+
alignItems: "stretch",
|
|
1047
|
+
flexDirection: "column",
|
|
1048
|
+
flexBasis: "auto",
|
|
1049
|
+
// @ts-expect-error
|
|
1050
|
+
boxSizing: "border-box",
|
|
1051
|
+
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
1052
|
+
minHeight: 0,
|
|
1053
|
+
minWidth: 0,
|
|
1054
|
+
flexShrink: 0
|
|
1055
|
+
}, MISSING_THEME_MESSAGE = "Missing theme.";
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
|
|
986
1059
|
// ../web/dist/cjs/config.native.js
|
|
987
1060
|
var require_config_native = __commonJS({
|
|
988
1061
|
"../web/dist/cjs/config.native.js"(exports2, module2) {
|
|
@@ -1077,7 +1150,7 @@ var require_config_native = __commonJS({
|
|
|
1077
1150
|
}
|
|
1078
1151
|
});
|
|
1079
1152
|
module2.exports = __toCommonJS2(config_exports);
|
|
1080
|
-
var import_constants2 = require_index_native2(), conf, getSetting2 = function(key) {
|
|
1153
|
+
var import_constants2 = require_index_native2(), import_constants22 = require_constants_native2(), conf, getSetting2 = function(key) {
|
|
1081
1154
|
var _conf_settings_key;
|
|
1082
1155
|
return (_conf_settings_key = conf.settings[key]) !== null && _conf_settings_key !== void 0 ? _conf_settings_key : (
|
|
1083
1156
|
// @ts-expect-error
|
|
@@ -2057,76 +2130,6 @@ var require_index_native4 = __commonJS({
|
|
|
2057
2130
|
}
|
|
2058
2131
|
});
|
|
2059
2132
|
|
|
2060
|
-
// ../web/dist/cjs/constants/constants.native.js
|
|
2061
|
-
var require_constants_native2 = __commonJS({
|
|
2062
|
-
"../web/dist/cjs/constants/constants.native.js"(exports2, module2) {
|
|
2063
|
-
"use strict";
|
|
2064
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2065
|
-
for (var name in all) __defProp2(target, name, {
|
|
2066
|
-
get: all[name],
|
|
2067
|
-
enumerable: !0
|
|
2068
|
-
});
|
|
2069
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
2070
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2071
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2072
|
-
for (var _loop = function() {
|
|
2073
|
-
var key = _step.value;
|
|
2074
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2075
|
-
get: function() {
|
|
2076
|
-
return from[key];
|
|
2077
|
-
},
|
|
2078
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2079
|
-
});
|
|
2080
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2081
|
-
} catch (err) {
|
|
2082
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2083
|
-
} finally {
|
|
2084
|
-
try {
|
|
2085
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2086
|
-
} finally {
|
|
2087
|
-
if (_didIteratorError)
|
|
2088
|
-
throw _iteratorError;
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
return to;
|
|
2092
|
-
}, __toCommonJS2 = function(mod) {
|
|
2093
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2094
|
-
value: !0
|
|
2095
|
-
}), mod);
|
|
2096
|
-
}, constants_exports = {};
|
|
2097
|
-
__export2(constants_exports, {
|
|
2098
|
-
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
2099
|
-
return FONT_DATA_ATTRIBUTE_NAME;
|
|
2100
|
-
},
|
|
2101
|
-
THEME_CLASSNAME_PREFIX: function() {
|
|
2102
|
-
return THEME_CLASSNAME_PREFIX;
|
|
2103
|
-
},
|
|
2104
|
-
THEME_NAME_SEPARATOR: function() {
|
|
2105
|
-
return THEME_NAME_SEPARATOR;
|
|
2106
|
-
},
|
|
2107
|
-
stackDefaultStyles: function() {
|
|
2108
|
-
return stackDefaultStyles;
|
|
2109
|
-
},
|
|
2110
|
-
webViewFlexCompatStyles: function() {
|
|
2111
|
-
return webViewFlexCompatStyles;
|
|
2112
|
-
}
|
|
2113
|
-
});
|
|
2114
|
-
module2.exports = __toCommonJS2(constants_exports);
|
|
2115
|
-
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
2116
|
-
display: "flex",
|
|
2117
|
-
alignItems: "stretch",
|
|
2118
|
-
flexDirection: "column",
|
|
2119
|
-
flexBasis: "auto",
|
|
2120
|
-
// @ts-expect-error
|
|
2121
|
-
boxSizing: "border-box",
|
|
2122
|
-
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
2123
|
-
minHeight: 0,
|
|
2124
|
-
minWidth: 0,
|
|
2125
|
-
flexShrink: 0
|
|
2126
|
-
};
|
|
2127
|
-
}
|
|
2128
|
-
});
|
|
2129
|
-
|
|
2130
2133
|
// ../web/dist/cjs/constants/isDevTools.native.js
|
|
2131
2134
|
var require_isDevTools_native = __commonJS({
|
|
2132
2135
|
"../web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
@@ -4694,7 +4697,7 @@ var require_propMapper_native = __commonJS({
|
|
|
4694
4697
|
try {
|
|
4695
4698
|
for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
4696
4699
|
var { name, spreadName } = _step.value;
|
|
4697
|
-
if (spreadName in variant && value in tokensParsed[name]) return variant[spreadName];
|
|
4700
|
+
if (spreadName in variant && name in tokensParsed && value in tokensParsed[name]) return variant[spreadName];
|
|
4698
4701
|
}
|
|
4699
4702
|
} catch (err) {
|
|
4700
4703
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -5725,7 +5728,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5725
5728
|
}
|
|
5726
5729
|
});
|
|
5727
5730
|
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
5728
|
-
var import_constants2 = require_index_native2(), import_react3 = require("react"), import_config = require_config_native(), ThemeStateContext = (0, import_react3.createContext)(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), HadTheme = /* @__PURE__ */ new WeakMap(), PendingUpdate = /* @__PURE__ */ new Map(), states = /* @__PURE__ */ new Map(), localStates = /* @__PURE__ */ new Map(), shouldForce = !1, forceUpdateThemes2 = function() {
|
|
5731
|
+
var import_constants2 = require_index_native2(), import_react3 = require("react"), import_config = require_config_native(), import_constants22 = require_constants_native2(), ThemeStateContext = (0, import_react3.createContext)(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), HadTheme = /* @__PURE__ */ new WeakMap(), PendingUpdate = /* @__PURE__ */ new Map(), states = /* @__PURE__ */ new Map(), localStates = /* @__PURE__ */ new Map(), shouldForce = !1, forceUpdateThemes2 = function() {
|
|
5729
5732
|
cacheVersion++, shouldForce = !0, allListeners.forEach(function(cb) {
|
|
5730
5733
|
return cb();
|
|
5731
5734
|
});
|
|
@@ -5735,7 +5738,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5735
5738
|
return rootThemeState;
|
|
5736
5739
|
}, useThemeState = function(props) {
|
|
5737
5740
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = arguments.length > 2 ? arguments[2] : void 0, { disable } = props, parentId = (0, import_react3.useContext)(ThemeStateContext);
|
|
5738
|
-
if (!parentId && !isRoot) throw new Error(
|
|
5741
|
+
if (!parentId && !isRoot) throw new Error(import_constants22.MISSING_THEME_MESSAGE);
|
|
5739
5742
|
if (disable) return states.get(parentId) || {
|
|
5740
5743
|
id: "",
|
|
5741
5744
|
name: "light",
|
|
@@ -5789,7 +5792,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5789
5792
|
];
|
|
5790
5793
|
if (!name) {
|
|
5791
5794
|
var next = lastState ?? parentState;
|
|
5792
|
-
if (!next) throw new Error(
|
|
5795
|
+
if (!next) throw new Error(import_constants22.MISSING_THEME_MESSAGE);
|
|
5793
5796
|
if (shouldRerender) {
|
|
5794
5797
|
var updated = {
|
|
5795
5798
|
...parentState || lastState
|