tamagui 1.111.9 → 1.111.11
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 +86 -51
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +70 -46
- package/dist/test.native.js.map +2 -2
- package/package.json +56 -56
package/dist/native.js
CHANGED
|
@@ -281,15 +281,15 @@ var require_PresenceContext_native = __commonJS({
|
|
|
281
281
|
}, PresenceContext_exports = {};
|
|
282
282
|
__export2(PresenceContext_exports, {
|
|
283
283
|
PresenceContext: function() {
|
|
284
|
-
return
|
|
284
|
+
return PresenceContext2;
|
|
285
285
|
},
|
|
286
286
|
ResetPresence: function() {
|
|
287
|
-
return
|
|
287
|
+
return ResetPresence2;
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
module2.exports = __toCommonJS2(PresenceContext_exports);
|
|
291
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react")),
|
|
292
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
291
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react")), PresenceContext2 = /* @__PURE__ */ React4.createContext(null), ResetPresence2 = function(props) {
|
|
292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PresenceContext2.Provider, {
|
|
293
293
|
value: null,
|
|
294
294
|
children: props.children
|
|
295
295
|
});
|
|
@@ -348,32 +348,32 @@ var require_usePresence_native = __commonJS({
|
|
|
348
348
|
}, usePresence_exports = {};
|
|
349
349
|
__export2(usePresence_exports, {
|
|
350
350
|
isPresent: function() {
|
|
351
|
-
return
|
|
351
|
+
return isPresent2;
|
|
352
352
|
},
|
|
353
353
|
useIsPresent: function() {
|
|
354
|
-
return
|
|
354
|
+
return useIsPresent2;
|
|
355
355
|
},
|
|
356
356
|
usePresence: function() {
|
|
357
|
-
return
|
|
357
|
+
return usePresence2;
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
module2.exports = __toCommonJS2(usePresence_exports);
|
|
361
361
|
var React4 = __toESM2(require("react")), import_PresenceContext = require_PresenceContext_native();
|
|
362
|
-
function
|
|
362
|
+
function usePresence2() {
|
|
363
363
|
var context = React4.useContext(import_PresenceContext.PresenceContext);
|
|
364
364
|
if (!context) return [
|
|
365
365
|
!0,
|
|
366
366
|
null,
|
|
367
367
|
context
|
|
368
368
|
];
|
|
369
|
-
var { id, isPresent:
|
|
369
|
+
var { id, isPresent: isPresent22, onExitComplete, register } = context;
|
|
370
370
|
React4.useEffect(function() {
|
|
371
371
|
return register(id);
|
|
372
372
|
}, []);
|
|
373
373
|
var safeToRemove = function() {
|
|
374
374
|
return onExitComplete == null ? void 0 : onExitComplete(id);
|
|
375
375
|
};
|
|
376
|
-
return !
|
|
376
|
+
return !isPresent22 && onExitComplete ? [
|
|
377
377
|
!1,
|
|
378
378
|
safeToRemove,
|
|
379
379
|
context
|
|
@@ -383,10 +383,10 @@ var require_usePresence_native = __commonJS({
|
|
|
383
383
|
context
|
|
384
384
|
];
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
386
|
+
function useIsPresent2() {
|
|
387
|
+
return isPresent2(React4.useContext(import_PresenceContext.PresenceContext));
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function isPresent2(context) {
|
|
390
390
|
return context === null ? !0 : context.isPresent;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -396,7 +396,12 @@ var require_usePresence_native = __commonJS({
|
|
|
396
396
|
var require_index_native3 = __commonJS({
|
|
397
397
|
"../../core/use-presence/dist/cjs/index.native.js"(exports2, module2) {
|
|
398
398
|
"use strict";
|
|
399
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty,
|
|
399
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
400
|
+
for (var name in all) __defProp2(target, name, {
|
|
401
|
+
get: all[name],
|
|
402
|
+
enumerable: !0
|
|
403
|
+
});
|
|
404
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
400
405
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
401
406
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
402
407
|
for (var _loop = function() {
|
|
@@ -419,16 +424,30 @@ var require_index_native3 = __commonJS({
|
|
|
419
424
|
}
|
|
420
425
|
}
|
|
421
426
|
return to;
|
|
422
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
423
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
424
427
|
}, __toCommonJS2 = function(mod) {
|
|
425
428
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
426
429
|
value: !0
|
|
427
430
|
}), mod);
|
|
428
431
|
}, src_exports2 = {};
|
|
432
|
+
__export2(src_exports2, {
|
|
433
|
+
PresenceContext: function() {
|
|
434
|
+
return import_PresenceContext.PresenceContext;
|
|
435
|
+
},
|
|
436
|
+
ResetPresence: function() {
|
|
437
|
+
return import_PresenceContext.ResetPresence;
|
|
438
|
+
},
|
|
439
|
+
isPresent: function() {
|
|
440
|
+
return import_usePresence.isPresent;
|
|
441
|
+
},
|
|
442
|
+
useIsPresent: function() {
|
|
443
|
+
return import_usePresence.useIsPresent;
|
|
444
|
+
},
|
|
445
|
+
usePresence: function() {
|
|
446
|
+
return import_usePresence.usePresence;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
429
449
|
module2.exports = __toCommonJS2(src_exports2);
|
|
430
|
-
|
|
431
|
-
__reExport2(src_exports2, require_usePresence_native(), module2.exports);
|
|
450
|
+
var import_PresenceContext = require_PresenceContext_native(), import_usePresence = require_usePresence_native();
|
|
432
451
|
}
|
|
433
452
|
});
|
|
434
453
|
|
|
@@ -488,12 +507,12 @@ var require_PresenceChild_native = __commonJS({
|
|
|
488
507
|
});
|
|
489
508
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
490
509
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native2(), import_use_presence = require_index_native3(), React4 = __toESM2(require("react")), import_react3 = require("react"), PresenceChild = /* @__PURE__ */ React4.memo(function(param) {
|
|
491
|
-
var { children, initial, isPresent, onExitComplete, exitVariant, enterVariant, enterExitVariant, presenceAffectsLayout, custom } = param, presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap), id = (0, import_react3.useId)() || "", context = React4.useMemo(
|
|
510
|
+
var { children, initial, isPresent: isPresent2, onExitComplete, exitVariant, enterVariant, enterExitVariant, presenceAffectsLayout, custom } = param, presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap), id = (0, import_react3.useId)() || "", context = React4.useMemo(
|
|
492
511
|
function() {
|
|
493
512
|
return {
|
|
494
513
|
id,
|
|
495
514
|
initial,
|
|
496
|
-
isPresent,
|
|
515
|
+
isPresent: isPresent2,
|
|
497
516
|
custom,
|
|
498
517
|
exitVariant,
|
|
499
518
|
enterVariant,
|
|
@@ -531,7 +550,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
531
550
|
*/
|
|
532
551
|
// @ts-expect-error its ok
|
|
533
552
|
presenceAffectsLayout ? void 0 : [
|
|
534
|
-
|
|
553
|
+
isPresent2,
|
|
535
554
|
exitVariant,
|
|
536
555
|
enterVariant
|
|
537
556
|
]
|
|
@@ -541,11 +560,11 @@ var require_PresenceChild_native = __commonJS({
|
|
|
541
560
|
return presenceChildren.set(key, !1);
|
|
542
561
|
});
|
|
543
562
|
}, [
|
|
544
|
-
|
|
563
|
+
isPresent2
|
|
545
564
|
]), React4.useEffect(function() {
|
|
546
|
-
!
|
|
565
|
+
!isPresent2 && !presenceChildren.size && (onExitComplete == null || onExitComplete());
|
|
547
566
|
}, [
|
|
548
|
-
|
|
567
|
+
isPresent2
|
|
549
568
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_use_presence.PresenceContext.Provider, {
|
|
550
569
|
value: context,
|
|
551
570
|
children
|
|
@@ -7704,7 +7723,7 @@ var require_Theme_native = __commonJS({
|
|
|
7704
7723
|
if (!themeManager) throw new Error(process.env.NODE_ENV === "development" ? "\u274C No theme found, either incorrect name, potential duplicate tamagui deps, or TamaguiProvider not providing themes." : "\u274C 005");
|
|
7705
7724
|
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || stateRef.current.hasEverThemed || typeof props.inverse == "boolean";
|
|
7706
7725
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
|
|
7707
|
-
process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug && (0, import_log.log)(`adding theme: isRoot ${isRoot}, inverse ${"inverse" in props}, isNewTheme ${isNewTheme}, hasEver ${stateRef.current.hasEverThemed}`, props);
|
|
7726
|
+
process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug === "verbose" && (0, import_log.log)(`adding theme: isRoot ${isRoot}, inverse ${"inverse" in props}, isNewTheme ${isNewTheme}, hasEver ${stateRef.current.hasEverThemed}`, props);
|
|
7708
7727
|
var next = children;
|
|
7709
7728
|
shallow && (next = import_react3.Children.toArray(children).map(function(child) {
|
|
7710
7729
|
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
|
|
@@ -8405,7 +8424,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8405
8424
|
}
|
|
8406
8425
|
process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
8407
8426
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClassNames && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
8408
|
-
process.env.NODE_ENV === "development" && debugProp && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, {
|
|
8427
|
+
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, {
|
|
8409
8428
|
enabled: shouldListenForMedia,
|
|
8410
8429
|
keys: mediaListeningKeys
|
|
8411
8430
|
});
|
|
@@ -8452,7 +8471,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8452
8471
|
staticConfig,
|
|
8453
8472
|
stateRef
|
|
8454
8473
|
});
|
|
8455
|
-
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${viewProps.className || ""} ${animations.className}`)), process.env.NODE_ENV === "development" && time && time`animations`;
|
|
8474
|
+
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)), process.env.NODE_ENV === "development" && time && time`animations`;
|
|
8456
8475
|
}
|
|
8457
8476
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
8458
8477
|
|
|
@@ -8477,7 +8496,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8477
8496
|
});
|
|
8478
8497
|
};
|
|
8479
8498
|
process.env.NODE_ENV === "development" && import_constants4.isWeb && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
8480
|
-
|
|
8499
|
+
if (debugProp === "verbose") {
|
|
8500
|
+
var cssStyleDeclarationToObject2 = function(style) {
|
|
8501
|
+
for (var styleObject = {}, i = 0; i < style.length; i++) {
|
|
8502
|
+
var prop = style[i];
|
|
8503
|
+
styleObject[prop] = style.getPropertyValue(prop);
|
|
8504
|
+
}
|
|
8505
|
+
return styleObject;
|
|
8506
|
+
}, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host));
|
|
8507
|
+
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
8508
|
+
}
|
|
8481
8509
|
}), import_react3.default.useEffect(function() {
|
|
8482
8510
|
if (!disabled) {
|
|
8483
8511
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
@@ -8486,8 +8514,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8486
8514
|
});
|
|
8487
8515
|
return;
|
|
8488
8516
|
}
|
|
8517
|
+
var tm;
|
|
8489
8518
|
if (state.unmounted) {
|
|
8490
|
-
|
|
8519
|
+
process.env.TAMAGUI_REACT_19 && animationDriver != null && animationDriver.supportsCSSVars ? tm = setTimeout(function() {
|
|
8520
|
+
setStateShallow({
|
|
8521
|
+
unmounted: !1
|
|
8522
|
+
});
|
|
8523
|
+
}) : setStateShallow({
|
|
8491
8524
|
unmounted: !1
|
|
8492
8525
|
});
|
|
8493
8526
|
return;
|
|
@@ -8501,7 +8534,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8501
8534
|
pseudoGroups
|
|
8502
8535
|
});
|
|
8503
8536
|
return function() {
|
|
8504
|
-
dispose == null || dispose(), componentSetStates.delete(setState);
|
|
8537
|
+
clearTimeout(tm), dispose == null || dispose(), componentSetStates.delete(setState);
|
|
8505
8538
|
};
|
|
8506
8539
|
}
|
|
8507
8540
|
}, [
|
|
@@ -8610,8 +8643,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8610
8643
|
process.env.NODE_ENV === "development" && time && time`spaced-as-child`;
|
|
8611
8644
|
var useChildrenResult;
|
|
8612
8645
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
8613
|
-
var
|
|
8614
|
-
|
|
8646
|
+
var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
8647
|
+
ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
|
|
8615
8648
|
children: content
|
|
8616
8649
|
})), process.env.NODE_ENV === "development" && time && time`create-element`;
|
|
8617
8650
|
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
@@ -8668,7 +8701,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8668
8701
|
if (import_constants4.isWeb) {
|
|
8669
8702
|
console.groupCollapsed(title);
|
|
8670
8703
|
try {
|
|
8671
|
-
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (
|
|
8704
|
+
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
8705
|
+
propsIn,
|
|
8706
|
+
props,
|
|
8672
8707
|
animationStyles,
|
|
8673
8708
|
classNames,
|
|
8674
8709
|
content,
|
|
@@ -8694,7 +8729,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8694
8729
|
themeState,
|
|
8695
8730
|
viewProps,
|
|
8696
8731
|
willBeAnimated
|
|
8697
|
-
})
|
|
8732
|
+
});
|
|
8698
8733
|
} catch {
|
|
8699
8734
|
} finally {
|
|
8700
8735
|
console.groupEnd();
|
|
@@ -15396,7 +15431,9 @@ var require_Adapt_native = __commonJS({
|
|
|
15396
15431
|
return typeof when == "function" ? enabled = when({
|
|
15397
15432
|
media
|
|
15398
15433
|
}) : (enabled = !platform2, platform2 === "touch" && (enabled = import_constants4.isTouchable), platform2 === "native" && (enabled = !import_constants4.isWeb), platform2 === "web" && (enabled = import_constants4.isWeb), platform2 === "ios" && (enabled = import_constants4.isIos), platform2 === "android" && (enabled = import_constants4.isAndroid), when && !media[when] && (enabled = !1)), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
15399
|
-
enabled
|
|
15434
|
+
if (enabled) return context == null || context.setWhen(when || enabled), function() {
|
|
15435
|
+
context == null || context.setWhen(null);
|
|
15436
|
+
};
|
|
15400
15437
|
}, [
|
|
15401
15438
|
when,
|
|
15402
15439
|
context,
|
|
@@ -23499,10 +23536,9 @@ async function convertValueToCoords(state, options) {
|
|
|
23499
23536
|
crossAxis: 0,
|
|
23500
23537
|
alignmentAxis: null
|
|
23501
23538
|
} : {
|
|
23502
|
-
mainAxis: 0,
|
|
23503
|
-
crossAxis: 0,
|
|
23504
|
-
alignmentAxis:
|
|
23505
|
-
...rawValue
|
|
23539
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
23540
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
23541
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
23506
23542
|
};
|
|
23507
23543
|
return alignment && typeof alignmentAxis == "number" && (crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis), isVertical ? {
|
|
23508
23544
|
x: crossAxis * crossAxisMulti,
|
|
@@ -23891,7 +23927,11 @@ var computePosition, arrow2, autoPlacement2, flip2, hide2, inline2, offset2, shi
|
|
|
23891
23927
|
...limitedCoords,
|
|
23892
23928
|
data: {
|
|
23893
23929
|
x: limitedCoords.x - x,
|
|
23894
|
-
y: limitedCoords.y - y
|
|
23930
|
+
y: limitedCoords.y - y,
|
|
23931
|
+
enabled: {
|
|
23932
|
+
[mainAxis]: checkMainAxis,
|
|
23933
|
+
[crossAxis]: checkCrossAxis
|
|
23934
|
+
}
|
|
23895
23935
|
}
|
|
23896
23936
|
};
|
|
23897
23937
|
}
|
|
@@ -23933,11 +23973,11 @@ var computePosition, arrow2, autoPlacement2, flip2, hide2, inline2, offset2, shi
|
|
|
23933
23973
|
name: "size",
|
|
23934
23974
|
options,
|
|
23935
23975
|
async fn(state) {
|
|
23936
|
-
var { placement, rects, platform: platform2, elements } = state, { apply = function() {
|
|
23976
|
+
var _state$middlewareData, _state$middlewareData2, { placement, rects, platform: platform2, elements } = state, { apply = function() {
|
|
23937
23977
|
}, ...detectOverflowOptions } = evaluate(options, state), overflow = await detectOverflow2(state, detectOverflowOptions), side = getSide(placement), alignment = getAlignment(placement), isYAxis = getSideAxis(placement) === "y", { width, height } = rects.floating, heightSide, widthSide;
|
|
23938
23978
|
side === "top" || side === "bottom" ? (heightSide = side, widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right") : (widthSide = side, heightSide = alignment === "end" ? "top" : "bottom");
|
|
23939
23979
|
var maximumClippingHeight = height - overflow.top - overflow.bottom, maximumClippingWidth = width - overflow.left - overflow.right, overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight), overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth), noShift = !state.middlewareData.shift, availableHeight = overflowAvailableHeight, availableWidth = overflowAvailableWidth;
|
|
23940
|
-
if (
|
|
23980
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x && (availableWidth = maximumClippingWidth), (_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y && (availableHeight = maximumClippingHeight), noShift && !alignment) {
|
|
23941
23981
|
var xMin = max(overflow.left, 0), xMax = max(overflow.right, 0), yMin = max(overflow.top, 0), yMax = max(overflow.bottom, 0);
|
|
23942
23982
|
isYAxis ? availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)) : availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
23943
23983
|
}
|
|
@@ -24625,7 +24665,7 @@ var require_Popper_native = __commonJS({
|
|
|
24625
24665
|
Object.assign(setupOptions, options);
|
|
24626
24666
|
}
|
|
24627
24667
|
function Popper(props) {
|
|
24628
|
-
var _middlewareData_checkFloating, { children, size: size4, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset4, disableRTL, __scopePopper } = props,
|
|
24668
|
+
var _middlewareData_checkFloating, { children, size: size4, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset4, disableRTL, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset4 ?? arrowSize, floating = (0, import_floating.useFloating)({
|
|
24629
24669
|
strategy,
|
|
24630
24670
|
placement,
|
|
24631
24671
|
sameScrollView: !1,
|
|
@@ -24675,7 +24715,6 @@ var require_Popper_native = __commonJS({
|
|
|
24675
24715
|
arrowRef: setArrow,
|
|
24676
24716
|
arrowStyle: middlewareData.arrow,
|
|
24677
24717
|
onArrowSize: setArrowSize,
|
|
24678
|
-
isMounted,
|
|
24679
24718
|
scope: __scopePopper,
|
|
24680
24719
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
24681
24720
|
...floating
|
|
@@ -24724,7 +24763,7 @@ var require_Popper_native = __commonJS({
|
|
|
24724
24763
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24725
24764
|
}
|
|
24726
24765
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24727
|
-
var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size4,
|
|
24766
|
+
var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size4, update, floatingStyles, hasFloating } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), finalHasFloatingValue = !1;
|
|
24728
24767
|
if (import_constants4.isAndroid) {
|
|
24729
24768
|
var initialRender = React4.useRef(!0), finalHasFloating = React4.useRef(!1);
|
|
24730
24769
|
hasFloating === !1 && (initialRender.current = !1), initialRender.current || (finalHasFloating.current = hasFloating), finalHasFloatingValue = finalHasFloating.current;
|
|
@@ -24743,14 +24782,11 @@ var require_Popper_native = __commonJS({
|
|
|
24743
24782
|
props
|
|
24744
24783
|
]), [needsMeasure, setNeedsMeasure] = React4.useState(!0);
|
|
24745
24784
|
React4.useEffect(function() {
|
|
24746
|
-
(x || y) && setNeedsMeasure(!1);
|
|
24785
|
+
enableAnimationForPositionChange && (x || y) && setNeedsMeasure(!1);
|
|
24747
24786
|
}, [
|
|
24787
|
+
enableAnimationForPositionChange,
|
|
24748
24788
|
x,
|
|
24749
24789
|
y
|
|
24750
|
-
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
24751
|
-
isMounted && update();
|
|
24752
|
-
}, [
|
|
24753
|
-
isMounted
|
|
24754
24790
|
]);
|
|
24755
24791
|
var show = !0;
|
|
24756
24792
|
if (import_constants4.isAndroid) {
|
|
@@ -24763,7 +24799,6 @@ var require_Popper_native = __commonJS({
|
|
|
24763
24799
|
y
|
|
24764
24800
|
]);
|
|
24765
24801
|
}
|
|
24766
|
-
if (!isMounted) return null;
|
|
24767
24802
|
var frameProps = {
|
|
24768
24803
|
ref: contentRefs,
|
|
24769
24804
|
x: x || 0,
|