tamagui 1.130.4 → 1.130.6
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/index.cjs +11 -11
- package/dist/cjs/views/Input.cjs +1 -1
- package/dist/cjs/views/TextArea.cjs +2 -2
- package/dist/native.js +85 -27
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +85 -27
- package/dist/test.native.js.map +3 -3
- package/package.json +58 -56
package/dist/test.native.js
CHANGED
|
@@ -2197,6 +2197,58 @@ var require_constants_native2 = __commonJS({
|
|
|
2197
2197
|
}
|
|
2198
2198
|
});
|
|
2199
2199
|
|
|
2200
|
+
// ../../core/web/dist/cjs/loadDuplicatedConfig.native.js
|
|
2201
|
+
var require_loadDuplicatedConfig_native = __commonJS({
|
|
2202
|
+
"../../core/web/dist/cjs/loadDuplicatedConfig.native.js"(exports2, module2) {
|
|
2203
|
+
"use strict";
|
|
2204
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2205
|
+
for (var name in all) __defProp2(target, name, {
|
|
2206
|
+
get: all[name],
|
|
2207
|
+
enumerable: !0
|
|
2208
|
+
});
|
|
2209
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2210
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2211
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2212
|
+
for (var _loop = function() {
|
|
2213
|
+
var key = _step.value;
|
|
2214
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2215
|
+
get: function() {
|
|
2216
|
+
return from[key];
|
|
2217
|
+
},
|
|
2218
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2219
|
+
});
|
|
2220
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2221
|
+
} catch (err) {
|
|
2222
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2223
|
+
} finally {
|
|
2224
|
+
try {
|
|
2225
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2226
|
+
} finally {
|
|
2227
|
+
if (_didIteratorError)
|
|
2228
|
+
throw _iteratorError;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
return to;
|
|
2232
|
+
}, __toCommonJS2 = function(mod) {
|
|
2233
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2234
|
+
value: !0
|
|
2235
|
+
}), mod);
|
|
2236
|
+
}, loadDuplicatedConfig_exports = {};
|
|
2237
|
+
__export2(loadDuplicatedConfig_exports, {
|
|
2238
|
+
loadDuplicatedConfig: function() {
|
|
2239
|
+
return loadDuplicatedConfig;
|
|
2240
|
+
}
|
|
2241
|
+
});
|
|
2242
|
+
module2.exports = __toCommonJS2(loadDuplicatedConfig_exports);
|
|
2243
|
+
var hasLogged = !1;
|
|
2244
|
+
function loadDuplicatedConfig() {
|
|
2245
|
+
return globalThis.__tamaguiConfig ? (hasLogged = !0, hasLogged || console.warn(`Warning: You have duplicate Tamagui dependencies which can cause major, confusing issues.
|
|
2246
|
+
In dev/test, we're working around this by loading a previously loaded config.
|
|
2247
|
+
In production, this will error.`), globalThis.__tamaguiConfig) : null;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
|
|
2200
2252
|
// ../../core/web/dist/cjs/config.native.js
|
|
2201
2253
|
var require_config_native = __commonJS({
|
|
2202
2254
|
"../../core/web/dist/cjs/config.native.js"(exports2, module2) {
|
|
@@ -2291,7 +2343,7 @@ var require_config_native = __commonJS({
|
|
|
2291
2343
|
}
|
|
2292
2344
|
});
|
|
2293
2345
|
module2.exports = __toCommonJS2(config_exports);
|
|
2294
|
-
var import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), conf, getSetting2 = function(key) {
|
|
2346
|
+
var import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), conf, getSetting2 = function(key) {
|
|
2295
2347
|
var _conf_settings_key;
|
|
2296
2348
|
return (_conf_settings_key = conf.settings[key]) !== null && _conf_settings_key !== void 0 ? _conf_settings_key : (
|
|
2297
2349
|
// @ts-expect-error
|
|
@@ -2302,6 +2354,8 @@ var require_config_native = __commonJS({
|
|
|
2302
2354
|
}, setConfigFont = function(name, font, fontParsed) {
|
|
2303
2355
|
conf.fonts[name] = font, conf.fontsParsed[`$${name}`] = fontParsed;
|
|
2304
2356
|
}, getConfig3 = function() {
|
|
2357
|
+
var dup = (0, import_loadDuplicatedConfig.loadDuplicatedConfig)();
|
|
2358
|
+
if (dup) return dup;
|
|
2305
2359
|
if (!conf) throw new Error("Missing tamagui config, you either have a duplicate config, or haven't set it up. Be sure createTamagui is called before rendering. Also, make sure all of your tamagui dependencies are on the same version (`tamagui`, `@tamagui/package-name`, etc.) not just in your package.json, but in your lockfile.");
|
|
2306
2360
|
return conf;
|
|
2307
2361
|
}, getConfigMaybe = function() {
|
|
@@ -9439,7 +9493,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
9439
9493
|
}
|
|
9440
9494
|
});
|
|
9441
9495
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
9442
|
-
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(),
|
|
9496
|
+
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), import_Tamagui = require_Tamagui_native();
|
|
9443
9497
|
function shouldTokenCategoryHaveUnits(category) {
|
|
9444
9498
|
var UNIT_CATEGORIES = /* @__PURE__ */ new Set([
|
|
9445
9499
|
"size",
|
|
@@ -9449,9 +9503,8 @@ var require_createTamagui_native = __commonJS({
|
|
|
9449
9503
|
return UNIT_CATEGORIES.has(category);
|
|
9450
9504
|
}
|
|
9451
9505
|
function createTamagui2(configIn) {
|
|
9452
|
-
var _configIn_settings;
|
|
9453
|
-
if (
|
|
9454
|
-
if (createdConfigs.has(configIn)) return configIn;
|
|
9506
|
+
var _configIn_settings, dup = (0, import_loadDuplicatedConfig.loadDuplicatedConfig)();
|
|
9507
|
+
if (dup) return dup;
|
|
9455
9508
|
var tokensParsed = {}, tokens = (0, import_createVariables.createVariables)(configIn.tokens || {});
|
|
9456
9509
|
if (configIn.tokens) {
|
|
9457
9510
|
var tokensMerged = {};
|
|
@@ -9600,7 +9653,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
9600
9653
|
specificTokens,
|
|
9601
9654
|
defaultFontToken
|
|
9602
9655
|
};
|
|
9603
|
-
if ((0, import_config.setConfig)(config), (0, import_useMedia.configureMedia)(config),
|
|
9656
|
+
if ((0, import_config.setConfig)(config), (0, import_useMedia.configureMedia)(config), globalThis.__tamaguiConfig = config, import_config.configListeners.size && (import_config.configListeners.forEach(function(cb) {
|
|
9604
9657
|
return cb(config);
|
|
9605
9658
|
}), import_config.configListeners.clear()), !1)
|
|
9606
9659
|
var _process_env_DEBUG;
|
|
@@ -18464,29 +18517,34 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18464
18517
|
}
|
|
18465
18518
|
}, scrollable = scrollEnabled;
|
|
18466
18519
|
(0, import_react3.useEffect)(function() {
|
|
18520
|
+
var _scrollRef_current;
|
|
18467
18521
|
if (import_core12.isClient && scrollRef.current) {
|
|
18468
|
-
var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
|
|
18469
|
-
node
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18522
|
+
var controller = new AbortController(), node = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.getScrollableNode();
|
|
18523
|
+
if (node) {
|
|
18524
|
+
node.addEventListener(
|
|
18525
|
+
"touchmove",
|
|
18526
|
+
function(e) {
|
|
18527
|
+
scrollBridge.isParentDragging && node.scrollTo({
|
|
18528
|
+
top: scrollBridge.y,
|
|
18529
|
+
behavior: "instant"
|
|
18530
|
+
});
|
|
18531
|
+
},
|
|
18532
|
+
// can't preventdefault its not cancellable
|
|
18533
|
+
{
|
|
18534
|
+
signal: controller.signal,
|
|
18535
|
+
passive: !1
|
|
18536
|
+
}
|
|
18537
|
+
);
|
|
18538
|
+
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
18539
|
+
});
|
|
18540
|
+
return function() {
|
|
18541
|
+
disposeBridgeListen(), controller.abort();
|
|
18542
|
+
};
|
|
18543
|
+
}
|
|
18488
18544
|
}
|
|
18489
|
-
}, [
|
|
18545
|
+
}, [
|
|
18546
|
+
scrollRef
|
|
18547
|
+
]);
|
|
18490
18548
|
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
18491
18549
|
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
18492
18550
|
};
|