tamagui 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 +55 -55
package/dist/native.js
CHANGED
|
@@ -2082,6 +2082,87 @@ var require_index_native10 = __commonJS({
|
|
|
2082
2082
|
}
|
|
2083
2083
|
});
|
|
2084
2084
|
|
|
2085
|
+
// ../../core/web/dist/cjs/constants/constants.native.js
|
|
2086
|
+
var require_constants_native2 = __commonJS({
|
|
2087
|
+
"../../core/web/dist/cjs/constants/constants.native.js"(exports2, module2) {
|
|
2088
|
+
"use strict";
|
|
2089
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2090
|
+
for (var name in all) __defProp2(target, name, {
|
|
2091
|
+
get: all[name],
|
|
2092
|
+
enumerable: !0
|
|
2093
|
+
});
|
|
2094
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2095
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2096
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2097
|
+
for (var _loop = function() {
|
|
2098
|
+
var key = _step.value;
|
|
2099
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2100
|
+
get: function() {
|
|
2101
|
+
return from[key];
|
|
2102
|
+
},
|
|
2103
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2104
|
+
});
|
|
2105
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2106
|
+
} catch (err) {
|
|
2107
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2108
|
+
} finally {
|
|
2109
|
+
try {
|
|
2110
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2111
|
+
} finally {
|
|
2112
|
+
if (_didIteratorError)
|
|
2113
|
+
throw _iteratorError;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
return to;
|
|
2117
|
+
}, __toCommonJS2 = function(mod) {
|
|
2118
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2119
|
+
value: !0
|
|
2120
|
+
}), mod);
|
|
2121
|
+
}, constants_exports = {};
|
|
2122
|
+
__export2(constants_exports, {
|
|
2123
|
+
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
2124
|
+
return FONT_DATA_ATTRIBUTE_NAME;
|
|
2125
|
+
},
|
|
2126
|
+
MISSING_THEME_MESSAGE: function() {
|
|
2127
|
+
return MISSING_THEME_MESSAGE;
|
|
2128
|
+
},
|
|
2129
|
+
THEME_CLASSNAME_PREFIX: function() {
|
|
2130
|
+
return THEME_CLASSNAME_PREFIX;
|
|
2131
|
+
},
|
|
2132
|
+
THEME_NAME_SEPARATOR: function() {
|
|
2133
|
+
return THEME_NAME_SEPARATOR;
|
|
2134
|
+
},
|
|
2135
|
+
stackDefaultStyles: function() {
|
|
2136
|
+
return stackDefaultStyles;
|
|
2137
|
+
},
|
|
2138
|
+
webViewFlexCompatStyles: function() {
|
|
2139
|
+
return webViewFlexCompatStyles;
|
|
2140
|
+
}
|
|
2141
|
+
});
|
|
2142
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
2143
|
+
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
2144
|
+
display: "flex",
|
|
2145
|
+
alignItems: "stretch",
|
|
2146
|
+
flexDirection: "column",
|
|
2147
|
+
flexBasis: "auto",
|
|
2148
|
+
// @ts-expect-error
|
|
2149
|
+
boxSizing: "border-box",
|
|
2150
|
+
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
2151
|
+
minHeight: 0,
|
|
2152
|
+
minWidth: 0,
|
|
2153
|
+
flexShrink: 0
|
|
2154
|
+
}, MISSING_THEME_MESSAGE = process.env.NODE_ENV === "development" ? `Can't find Tamagui configuration.
|
|
2155
|
+
|
|
2156
|
+
99% of the time this is due to having mis-matched versions of Tamagui dependencies.
|
|
2157
|
+
Ensure that every "tamagui" and "@tamagui/*" dependency is pinned to exactly the same version.
|
|
2158
|
+
|
|
2159
|
+
We have a CLI tool to help check this:
|
|
2160
|
+
|
|
2161
|
+
npx @tamagui/cli check
|
|
2162
|
+
` : "Missing theme.";
|
|
2163
|
+
}
|
|
2164
|
+
});
|
|
2165
|
+
|
|
2085
2166
|
// ../../core/web/dist/cjs/config.native.js
|
|
2086
2167
|
var require_config_native = __commonJS({
|
|
2087
2168
|
"../../core/web/dist/cjs/config.native.js"(exports2, module2) {
|
|
@@ -2176,15 +2257,8 @@ var require_config_native = __commonJS({
|
|
|
2176
2257
|
}
|
|
2177
2258
|
});
|
|
2178
2259
|
module2.exports = __toCommonJS2(config_exports);
|
|
2179
|
-
var import_constants4 = require_index_native6(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
2180
|
-
Haven't called createTamagui yet.
|
|
2181
|
-
|
|
2182
|
-
This often happens due to having duplicate Tamagui sub-dependencies.
|
|
2183
|
-
|
|
2184
|
-
Tamagui needs every @tamagui/* dependency to be on the exact same version, we include an upgrade script
|
|
2185
|
-
with the starter kits that you can call with "yarn upgrade:tamagui" to help with this.
|
|
2186
|
-
|
|
2187
|
-
You may want to clear your node_modules as well and run a fresh install after ugprading.
|
|
2260
|
+
var import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
2261
|
+
Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
2188
2262
|
` : "\u274C Error 001", getSetting2 = function(key) {
|
|
2189
2263
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
2190
2264
|
var _conf_settings_key;
|
|
@@ -3421,76 +3495,6 @@ var require_index_native11 = __commonJS({
|
|
|
3421
3495
|
}
|
|
3422
3496
|
});
|
|
3423
3497
|
|
|
3424
|
-
// ../../core/web/dist/cjs/constants/constants.native.js
|
|
3425
|
-
var require_constants_native2 = __commonJS({
|
|
3426
|
-
"../../core/web/dist/cjs/constants/constants.native.js"(exports2, module2) {
|
|
3427
|
-
"use strict";
|
|
3428
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3429
|
-
for (var name in all) __defProp2(target, name, {
|
|
3430
|
-
get: all[name],
|
|
3431
|
-
enumerable: !0
|
|
3432
|
-
});
|
|
3433
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
3434
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3435
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
3436
|
-
for (var _loop = function() {
|
|
3437
|
-
var key = _step.value;
|
|
3438
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
3439
|
-
get: function() {
|
|
3440
|
-
return from[key];
|
|
3441
|
-
},
|
|
3442
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
3443
|
-
});
|
|
3444
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
3445
|
-
} catch (err) {
|
|
3446
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
3447
|
-
} finally {
|
|
3448
|
-
try {
|
|
3449
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3450
|
-
} finally {
|
|
3451
|
-
if (_didIteratorError)
|
|
3452
|
-
throw _iteratorError;
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
return to;
|
|
3456
|
-
}, __toCommonJS2 = function(mod) {
|
|
3457
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3458
|
-
value: !0
|
|
3459
|
-
}), mod);
|
|
3460
|
-
}, constants_exports = {};
|
|
3461
|
-
__export2(constants_exports, {
|
|
3462
|
-
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
3463
|
-
return FONT_DATA_ATTRIBUTE_NAME;
|
|
3464
|
-
},
|
|
3465
|
-
THEME_CLASSNAME_PREFIX: function() {
|
|
3466
|
-
return THEME_CLASSNAME_PREFIX;
|
|
3467
|
-
},
|
|
3468
|
-
THEME_NAME_SEPARATOR: function() {
|
|
3469
|
-
return THEME_NAME_SEPARATOR;
|
|
3470
|
-
},
|
|
3471
|
-
stackDefaultStyles: function() {
|
|
3472
|
-
return stackDefaultStyles;
|
|
3473
|
-
},
|
|
3474
|
-
webViewFlexCompatStyles: function() {
|
|
3475
|
-
return webViewFlexCompatStyles;
|
|
3476
|
-
}
|
|
3477
|
-
});
|
|
3478
|
-
module2.exports = __toCommonJS2(constants_exports);
|
|
3479
|
-
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
3480
|
-
display: "flex",
|
|
3481
|
-
alignItems: "stretch",
|
|
3482
|
-
flexDirection: "column",
|
|
3483
|
-
flexBasis: "auto",
|
|
3484
|
-
// @ts-expect-error
|
|
3485
|
-
boxSizing: "border-box",
|
|
3486
|
-
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
3487
|
-
minHeight: 0,
|
|
3488
|
-
minWidth: 0,
|
|
3489
|
-
flexShrink: 0
|
|
3490
|
-
};
|
|
3491
|
-
}
|
|
3492
|
-
});
|
|
3493
|
-
|
|
3494
3498
|
// ../../core/web/dist/cjs/constants/isDevTools.native.js
|
|
3495
3499
|
var require_isDevTools_native = __commonJS({
|
|
3496
3500
|
"../../core/web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
@@ -6076,7 +6080,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6076
6080
|
try {
|
|
6077
6081
|
for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
6078
6082
|
var { name, spreadName } = _step.value;
|
|
6079
|
-
if (spreadName in variant && value in tokensParsed[name]) return variant[spreadName];
|
|
6083
|
+
if (spreadName in variant && name in tokensParsed && value in tokensParsed[name]) return variant[spreadName];
|
|
6080
6084
|
}
|
|
6081
6085
|
} catch (err) {
|
|
6082
6086
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -7197,7 +7201,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7197
7201
|
}
|
|
7198
7202
|
});
|
|
7199
7203
|
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
7200
|
-
var import_constants4 = require_index_native6(), 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() {
|
|
7204
|
+
var import_constants4 = require_index_native6(), 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() {
|
|
7201
7205
|
cacheVersion++, shouldForce = !0, allListeners.forEach(function(cb) {
|
|
7202
7206
|
return cb();
|
|
7203
7207
|
});
|
|
@@ -7207,7 +7211,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7207
7211
|
return rootThemeState;
|
|
7208
7212
|
}, useThemeState = function(props) {
|
|
7209
7213
|
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);
|
|
7210
|
-
if (!parentId && !isRoot) throw new Error(
|
|
7214
|
+
if (!parentId && !isRoot) throw new Error(import_constants22.MISSING_THEME_MESSAGE);
|
|
7211
7215
|
if (disable) return states.get(parentId) || {
|
|
7212
7216
|
id: "",
|
|
7213
7217
|
name: "light",
|
|
@@ -7275,7 +7279,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7275
7279
|
];
|
|
7276
7280
|
if (!name) {
|
|
7277
7281
|
var next = lastState ?? parentState;
|
|
7278
|
-
if (!next) throw new Error(
|
|
7282
|
+
if (!next) throw new Error(import_constants22.MISSING_THEME_MESSAGE);
|
|
7279
7283
|
if (shouldRerender) {
|
|
7280
7284
|
var updated = {
|
|
7281
7285
|
...parentState || lastState
|