tamagui 1.130.5 → 1.130.7
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 +75 -13
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +75 -13
- 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;
|
|
@@ -17626,6 +17679,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
17626
17679
|
if (!animationDriver) throw new Error("Must set animations in tamagui.config.ts");
|
|
17627
17680
|
var scrollBridge = (0, import_use_constant.useConstant)(function() {
|
|
17628
17681
|
var parentDragListeners = /* @__PURE__ */ new Set(), bridge = {
|
|
17682
|
+
hasScrollableContent: !1,
|
|
17629
17683
|
enabled: !1,
|
|
17630
17684
|
y: 0,
|
|
17631
17685
|
paneY: 0,
|
|
@@ -18040,7 +18094,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18040
18094
|
screenSize,
|
|
18041
18095
|
frameSize
|
|
18042
18096
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18043
|
-
isAbleToPosition && animateTo(position);
|
|
18097
|
+
isAbleToPosition && (animateTo(position), position === -1 && (scrollBridge.scrollLock = !1, scrollBridge.scrollStartY = -1));
|
|
18044
18098
|
}, [
|
|
18045
18099
|
isAbleToPosition,
|
|
18046
18100
|
position
|
|
@@ -18072,9 +18126,13 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18072
18126
|
var { dy } = param;
|
|
18073
18127
|
function getShouldSet() {
|
|
18074
18128
|
if (e.target === providerProps.handleRef.current) return !0;
|
|
18075
|
-
if (scrollBridge.
|
|
18076
|
-
|
|
18077
|
-
|
|
18129
|
+
if (scrollBridge.hasScrollableContent === !0) {
|
|
18130
|
+
if (scrollBridge.scrollLock) return !1;
|
|
18131
|
+
var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
18132
|
+
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18133
|
+
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18134
|
+
}
|
|
18135
|
+
return Math.abs(dy) > 5;
|
|
18078
18136
|
}
|
|
18079
18137
|
var granted = getShouldSet();
|
|
18080
18138
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -18495,9 +18553,13 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18495
18553
|
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
18496
18554
|
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
18497
18555
|
};
|
|
18498
|
-
return
|
|
18556
|
+
return (0, import_react3.useEffect)(function() {
|
|
18557
|
+
scrollBridge.hasScrollableContent = hasScrollableContent;
|
|
18558
|
+
}, [
|
|
18559
|
+
hasScrollableContent
|
|
18560
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
18499
18561
|
onLayout: function(e) {
|
|
18500
|
-
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18562
|
+
parentHeight.current = Math.ceil(e.nativeEvent.layout.height), setIsScrollable();
|
|
18501
18563
|
},
|
|
18502
18564
|
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
18503
18565
|
flex: 1,
|
|
@@ -18552,7 +18614,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18552
18614
|
pointerEvents: "none",
|
|
18553
18615
|
zIndex: -1,
|
|
18554
18616
|
onLayout: function(e) {
|
|
18555
|
-
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18617
|
+
contentHeight.current = Math.floor(e.nativeEvent.layout.height), setIsScrollable();
|
|
18556
18618
|
}
|
|
18557
18619
|
}),
|
|
18558
18620
|
children
|