tamagui 1.100.0 → 1.100.2
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 +200 -89
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +200 -89
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -2862,6 +2862,70 @@ var require_useDisableSSR_native = __commonJS({
|
|
|
2862
2862
|
}
|
|
2863
2863
|
});
|
|
2864
2864
|
|
|
2865
|
+
// ../web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
2866
|
+
var require_useDidHydrateOnce_native = __commonJS({
|
|
2867
|
+
"../web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
2868
|
+
"use strict";
|
|
2869
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2870
|
+
for (var name in all) __defProp2(target, name, {
|
|
2871
|
+
get: all[name],
|
|
2872
|
+
enumerable: !0
|
|
2873
|
+
});
|
|
2874
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2875
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2876
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2877
|
+
for (var _loop = function() {
|
|
2878
|
+
var key = _step.value;
|
|
2879
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2880
|
+
get: function() {
|
|
2881
|
+
return from[key];
|
|
2882
|
+
},
|
|
2883
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2884
|
+
});
|
|
2885
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2886
|
+
} catch (err) {
|
|
2887
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2888
|
+
} finally {
|
|
2889
|
+
try {
|
|
2890
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2891
|
+
} finally {
|
|
2892
|
+
if (_didIteratorError)
|
|
2893
|
+
throw _iteratorError;
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
return to;
|
|
2897
|
+
}, __toCommonJS2 = function(mod) {
|
|
2898
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2899
|
+
value: !0
|
|
2900
|
+
}), mod);
|
|
2901
|
+
}, useDidHydrateOnce_exports = {};
|
|
2902
|
+
__export2(useDidHydrateOnce_exports, {
|
|
2903
|
+
useDidHydrateOnce: function() {
|
|
2904
|
+
return useDidHydrateOnce;
|
|
2905
|
+
},
|
|
2906
|
+
useDidHydrateOnceRoot: function() {
|
|
2907
|
+
return useDidHydrateOnceRoot;
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
module2.exports = __toCommonJS2(useDidHydrateOnce_exports);
|
|
2911
|
+
var import_react4 = require("react"), didHydrateOnce = !1;
|
|
2912
|
+
function useDidHydrateOnceRoot() {
|
|
2913
|
+
(0, import_react4.useEffect)(function() {
|
|
2914
|
+
var tm = setInterval(function() {
|
|
2915
|
+
Date.now() - last > 32 && (didHydrateOnce = !0, clearInterval(tm));
|
|
2916
|
+
}, 16);
|
|
2917
|
+
return function() {
|
|
2918
|
+
clearInterval(tm);
|
|
2919
|
+
};
|
|
2920
|
+
}, []);
|
|
2921
|
+
}
|
|
2922
|
+
var last = Date.now();
|
|
2923
|
+
function useDidHydrateOnce() {
|
|
2924
|
+
return didHydrateOnce || (last = Date.now()), didHydrateOnce;
|
|
2925
|
+
}
|
|
2926
|
+
}
|
|
2927
|
+
});
|
|
2928
|
+
|
|
2865
2929
|
// ../web/dist/cjs/hooks/useMedia.native.js
|
|
2866
2930
|
var require_useMedia_native = __commonJS({
|
|
2867
2931
|
"../web/dist/cjs/hooks/useMedia.native.js"(exports2, module2) {
|
|
@@ -2948,7 +3012,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2948
3012
|
}
|
|
2949
3013
|
});
|
|
2950
3014
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
2951
|
-
var import_constants4 = require_index_native6(), import_react4 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native();
|
|
3015
|
+
var import_constants4 = require_index_native6(), import_react4 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native();
|
|
2952
3016
|
function _array_like_to_array2(arr, len) {
|
|
2953
3017
|
(len == null || len > arr.length) && (len = arr.length);
|
|
2954
3018
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -3097,9 +3161,21 @@ var require_useMedia_native = __commonJS({
|
|
|
3097
3161
|
return listeners.delete(subscriber);
|
|
3098
3162
|
};
|
|
3099
3163
|
}
|
|
3164
|
+
function useLayoutExternalStore(subscriber, getSnapshot, getServerSnapshot) {
|
|
3165
|
+
var hasHydrated = (0, import_useDidHydrateOnce.useDidHydrateOnce)(), _useState = _sliced_to_array((0, import_react4.useState)(hasHydrated ? mediaState3 : getServerSnapshot), 2), state = _useState[0], setState = _useState[1];
|
|
3166
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
3167
|
+
var update = function() {
|
|
3168
|
+
setState(function(prev) {
|
|
3169
|
+
var next = getSnapshot();
|
|
3170
|
+
return next !== prev ? next : prev;
|
|
3171
|
+
});
|
|
3172
|
+
};
|
|
3173
|
+
return update(), subscriber(update);
|
|
3174
|
+
}, []), state;
|
|
3175
|
+
}
|
|
3100
3176
|
function useMedia3(uid, componentContext) {
|
|
3101
|
-
var internal = (0, import_react4.useRef)(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants4.isWeb ? mediaState3 : initState) || {}, state = (
|
|
3102
|
-
if (!internal.current) return
|
|
3177
|
+
var internal = (0, import_react4.useRef)(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants4.isWeb ? mediaState3 : initState) || {}, state = useLayoutExternalStore(subscribe, function() {
|
|
3178
|
+
if (!internal.current) return mediaState3;
|
|
3103
3179
|
var _internal_current = internal.current, touched = _internal_current.touched, prev = _internal_current.prev, componentState = uid ? shouldUpdate.get(uid) : void 0;
|
|
3104
3180
|
if (componentState && componentState.enabled === !1) return prev;
|
|
3105
3181
|
var _componentState_keys, testKeys = (_componentState_keys = componentState == null ? void 0 : componentState.keys) !== null && _componentState_keys !== void 0 ? _componentState_keys : (!componentState || componentState.enabled) && touched ? _to_consumable_array2(touched) : null, hasntUpdated = !testKeys || (testKeys == null ? void 0 : testKeys.every(function(key) {
|
|
@@ -8337,7 +8413,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8337
8413
|
}
|
|
8338
8414
|
});
|
|
8339
8415
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8340
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react4 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_themeable = require_themeable_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native();
|
|
8416
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react4 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_themeable = require_themeable_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native();
|
|
8341
8417
|
function _array_like_to_array2(arr, len) {
|
|
8342
8418
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8343
8419
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -8456,7 +8532,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8456
8532
|
return !!(next || curStateRef.hasAnimated);
|
|
8457
8533
|
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
8458
8534
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8459
|
-
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative), hasEnterState = hasEnterStyle || isEntering,
|
|
8535
|
+
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative), hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = (0, import_useDidHydrateOnce.useDidHydrateOnce)(), initialState = hasEnterState || !didHydrateOnce && hasRNAnimation ? (
|
|
8536
|
+
// on the very first render we switch all spring animation drivers to css rendering
|
|
8537
|
+
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8538
|
+
// without flickers of the wrong colors.
|
|
8539
|
+
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8540
|
+
// we can avoid the extra re-render on mount
|
|
8541
|
+
import_constants4.isWeb && !didHydrateOnce ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
8542
|
+
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8460
8543
|
disabled != null && (initialState.disabled = disabled);
|
|
8461
8544
|
var states = (0, import_react4.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
8462
8545
|
import_constants4.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState(_object_spread9({}, state)));
|
|
@@ -8667,7 +8750,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8667
8750
|
};
|
|
8668
8751
|
(0, import_react4.useEffect)(function() {
|
|
8669
8752
|
if (!disabled) {
|
|
8670
|
-
if (state.unmounted === !0) {
|
|
8753
|
+
if (state.unmounted === !0 && hasEnterStyle) {
|
|
8671
8754
|
setStateShallow({
|
|
8672
8755
|
unmounted: "should-enter"
|
|
8673
8756
|
});
|
|
@@ -11637,7 +11720,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11637
11720
|
}
|
|
11638
11721
|
});
|
|
11639
11722
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
11640
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), React2 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
11723
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), React2 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native();
|
|
11641
11724
|
function _define_property9(obj, key, value) {
|
|
11642
11725
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
11643
11726
|
value,
|
|
@@ -11693,7 +11776,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11693
11776
|
"disableInjectCSS",
|
|
11694
11777
|
"config"
|
|
11695
11778
|
]);
|
|
11696
|
-
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && React2.useInsertionEffect(function() {
|
|
11779
|
+
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), React2.useInsertionEffect(function() {
|
|
11697
11780
|
if (config && (config.disableSSR || document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), !disableInjectCSS)) {
|
|
11698
11781
|
var style = document.createElement("style");
|
|
11699
11782
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -11703,7 +11786,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11703
11786
|
}, [
|
|
11704
11787
|
config,
|
|
11705
11788
|
disableInjectCSS
|
|
11706
|
-
]);
|
|
11789
|
+
]));
|
|
11707
11790
|
var _themePropsProvider_defaultTheme;
|
|
11708
11791
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
11709
11792
|
animationDriver: config == null ? void 0 : config.animations,
|
|
@@ -25321,14 +25404,17 @@ var require_Group_native = __commonJS({
|
|
|
25321
25404
|
Item: GroupItem
|
|
25322
25405
|
});
|
|
25323
25406
|
}
|
|
25324
|
-
var GroupItem = function(props) {
|
|
25407
|
+
var GroupItem = /* @__PURE__ */ import_react4.default.forwardRef(function(props, ref) {
|
|
25325
25408
|
var _children_props, __scopeGroup = props.__scopeGroup, children = props.children, forcePlacement = props.forcePlacement, groupItemProps = useGroupItem({
|
|
25326
25409
|
disabled: /* @__PURE__ */ (0, import_react4.isValidElement)(children) ? children.props.disabled : void 0
|
|
25327
25410
|
}, forcePlacement, __scopeGroup);
|
|
25328
|
-
return /* @__PURE__ */ (0, import_react4.isValidElement)(children) ? (0, import_core12.isTamaguiElement)(children) ? /* @__PURE__ */ import_react4.default.cloneElement(children, groupItemProps)
|
|
25329
|
-
|
|
25411
|
+
return /* @__PURE__ */ (0, import_react4.isValidElement)(children) ? (0, import_core12.isTamaguiElement)(children) ? /* @__PURE__ */ import_react4.default.cloneElement(children, _object_spread_props8(_object_spread9({}, groupItemProps), {
|
|
25412
|
+
ref
|
|
25413
|
+
})) : /* @__PURE__ */ import_react4.default.cloneElement(children, {
|
|
25414
|
+
style: _object_spread9({}, (_children_props = children.props) === null || _children_props === void 0 ? void 0 : _children_props.style, groupItemProps),
|
|
25415
|
+
ref
|
|
25330
25416
|
}) : children;
|
|
25331
|
-
}, useGroupItem = function(childrenProps, forcePlacement, __scopeGroup) {
|
|
25417
|
+
}), useGroupItem = function(childrenProps, forcePlacement, __scopeGroup) {
|
|
25332
25418
|
var treeIndex = (0, import_reforest.useIndex)(), context = useGroupContext("GroupItem", __scopeGroup);
|
|
25333
25419
|
if (import_react4.default.useEffect(function() {
|
|
25334
25420
|
return context.onItemMount(), function() {
|
|
@@ -26965,10 +27051,12 @@ function _detectOverflow() {
|
|
|
26965
27051
|
case 6:
|
|
26966
27052
|
return clippingClientRect = rectToClientRect.apply(void 0, [
|
|
26967
27053
|
_state.sent()
|
|
26968
|
-
]), rect = elementContext === "floating" ?
|
|
27054
|
+
]), rect = elementContext === "floating" ? {
|
|
26969
27055
|
x,
|
|
26970
|
-
y
|
|
26971
|
-
|
|
27056
|
+
y,
|
|
27057
|
+
width: rects.floating.width,
|
|
27058
|
+
height: rects.floating.height
|
|
27059
|
+
} : rects.reference, [
|
|
26972
27060
|
4,
|
|
26973
27061
|
platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)
|
|
26974
27062
|
];
|
|
@@ -27002,6 +27090,7 @@ function _detectOverflow() {
|
|
|
27002
27090
|
return offsetScale = _tmp3, platform.convertOffsetParentRelativeRectToViewportRelativeRect ? [
|
|
27003
27091
|
4,
|
|
27004
27092
|
platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
27093
|
+
elements,
|
|
27005
27094
|
rect,
|
|
27006
27095
|
offsetParent,
|
|
27007
27096
|
strategy
|
|
@@ -27208,10 +27297,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
27208
27297
|
case 8:
|
|
27209
27298
|
ref = computeCoordsFromPlacement(rects, statefulPlacement, rtl), x = ref.x, y = ref.y, _state.label = 9;
|
|
27210
27299
|
case 9:
|
|
27211
|
-
|
|
27212
|
-
3,
|
|
27213
|
-
10
|
|
27214
|
-
];
|
|
27300
|
+
i = -1, _state.label = 10;
|
|
27215
27301
|
case 10:
|
|
27216
27302
|
return i++, [
|
|
27217
27303
|
3,
|
|
@@ -27271,7 +27357,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
27271
27357
|
case 3:
|
|
27272
27358
|
_tmp = !_state.sent(), _state.label = 4;
|
|
27273
27359
|
case 4:
|
|
27274
|
-
return _tmp && (clientSize = elements.floating[clientProp] || rects.floating[length]), centerToReference = endDiff / 2 - startDiff / 2, largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1, minPadding = min(paddingObject[minProp], largestPossiblePadding), maxPadding = min(paddingObject[maxProp], largestPossiblePadding), min$1 = minPadding, max2 = clientSize - arrowDimensions[length] - maxPadding, center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference, offset3 = clamp(min$1, center, max2), shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center
|
|
27360
|
+
return _tmp && (clientSize = elements.floating[clientProp] || rects.floating[length]), centerToReference = endDiff / 2 - startDiff / 2, largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1, minPadding = min(paddingObject[minProp], largestPossiblePadding), maxPadding = min(paddingObject[maxProp], largestPossiblePadding), min$1 = minPadding, max2 = clientSize - arrowDimensions[length] - maxPadding, center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference, offset3 = clamp(min$1, center, max2), shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset3 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0, alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0, [
|
|
27275
27361
|
2,
|
|
27276
27362
|
(_obj1 = {}, _define_property2(_obj1, axis, coords[axis] + alignmentOffset), _define_property2(_obj1, "data", _object_spread2((_obj = {}, _define_property2(_obj, axis, offset3), _define_property2(_obj, "centerOffset", center - offset3 - alignmentOffset), _obj), shouldAddOffset && {
|
|
27277
27363
|
alignmentOffset
|
|
@@ -27762,7 +27848,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
27762
27848
|
options,
|
|
27763
27849
|
fn: function(state) {
|
|
27764
27850
|
return _async_to_generator(function() {
|
|
27765
|
-
var placement, rects, platform, elements, _evaluate, _evaluate_apply, apply, detectOverflowOptions, overflow, side, alignment, isYAxis, _rects_floating, width, height, heightSide, widthSide, overflowAvailableHeight, overflowAvailableWidth, noShift, availableHeight, availableWidth,
|
|
27851
|
+
var placement, rects, platform, elements, _evaluate, _evaluate_apply, apply, detectOverflowOptions, overflow, side, alignment, isYAxis, _rects_floating, width, height, heightSide, widthSide, maximumClippingHeight, maximumClippingWidth, overflowAvailableHeight, overflowAvailableWidth, noShift, availableHeight, availableWidth, xMin, xMax, yMin, yMax, nextDimensions;
|
|
27766
27852
|
return _ts_generator(this, function(_state) {
|
|
27767
27853
|
switch (_state.label) {
|
|
27768
27854
|
case 0:
|
|
@@ -27789,7 +27875,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
27789
27875
|
case 3:
|
|
27790
27876
|
widthSide = side, heightSide = alignment === "end" ? "top" : "bottom", _state.label = 4;
|
|
27791
27877
|
case 4:
|
|
27792
|
-
return overflowAvailableHeight = height - overflow[heightSide], overflowAvailableWidth = width - overflow[widthSide], noShift = !state.middlewareData.shift, availableHeight = overflowAvailableHeight, availableWidth = overflowAvailableWidth, isYAxis ?
|
|
27878
|
+
return 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, isYAxis ? availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth : availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight, noShift && !alignment && (xMin = max(overflow.left, 0), xMax = max(overflow.right, 0), yMin = max(overflow.top, 0), yMax = max(overflow.bottom, 0), 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))), [
|
|
27793
27879
|
4,
|
|
27794
27880
|
apply(_object_spread_props2(_object_spread2({}, state), {
|
|
27795
27881
|
availableWidth,
|
|
@@ -27920,24 +28006,7 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
27920
28006
|
}
|
|
27921
28007
|
}), n.default = e, Object.freeze(n);
|
|
27922
28008
|
}
|
|
27923
|
-
var React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React2),
|
|
27924
|
-
var isRef = function(value) {
|
|
27925
|
-
return {}.hasOwnProperty.call(value, "current");
|
|
27926
|
-
}, element = options.element, padding = options.padding;
|
|
27927
|
-
return {
|
|
27928
|
-
name: "arrow",
|
|
27929
|
-
options,
|
|
27930
|
-
fn: function(args) {
|
|
27931
|
-
return element && isRef(element) ? element.current != null ? core.arrow({
|
|
27932
|
-
element: element.current,
|
|
27933
|
-
padding
|
|
27934
|
-
}).fn(args) : {} : element ? core.arrow({
|
|
27935
|
-
element,
|
|
27936
|
-
padding
|
|
27937
|
-
}).fn(args) : {};
|
|
27938
|
-
}
|
|
27939
|
-
};
|
|
27940
|
-
}, ORIGIN$1 = {
|
|
28009
|
+
var React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React2), ORIGIN$1 = {
|
|
27941
28010
|
x: 0,
|
|
27942
28011
|
y: 0
|
|
27943
28012
|
};
|
|
@@ -28173,61 +28242,103 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
28173
28242
|
update
|
|
28174
28243
|
]);
|
|
28175
28244
|
}
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28245
|
+
var arrow$1 = function(options) {
|
|
28246
|
+
var isRef = function(value) {
|
|
28247
|
+
return {}.hasOwnProperty.call(value, "current");
|
|
28248
|
+
};
|
|
28249
|
+
return {
|
|
28250
|
+
name: "arrow",
|
|
28251
|
+
options,
|
|
28252
|
+
fn: function(state) {
|
|
28253
|
+
var _ref = typeof options == "function" ? options(state) : options, element = _ref.element, padding = _ref.padding;
|
|
28254
|
+
return element && isRef(element) ? element.current != null ? core.arrow({
|
|
28255
|
+
element: element.current,
|
|
28256
|
+
padding
|
|
28257
|
+
}).fn(state) : {} : element ? core.arrow({
|
|
28258
|
+
element,
|
|
28259
|
+
padding
|
|
28260
|
+
}).fn(state) : {};
|
|
28261
|
+
}
|
|
28262
|
+
};
|
|
28263
|
+
}, offset3 = function(options, deps) {
|
|
28264
|
+
return _object_spread_props8(_object_spread9({}, core.offset(options)), {
|
|
28265
|
+
options: [
|
|
28266
|
+
options,
|
|
28267
|
+
deps
|
|
28268
|
+
]
|
|
28269
|
+
});
|
|
28270
|
+
}, shift3 = function(options, deps) {
|
|
28271
|
+
return _object_spread_props8(_object_spread9({}, core.shift(options)), {
|
|
28272
|
+
options: [
|
|
28273
|
+
options,
|
|
28274
|
+
deps
|
|
28275
|
+
]
|
|
28276
|
+
});
|
|
28277
|
+
}, limitShift3 = function(options, deps) {
|
|
28278
|
+
return _object_spread_props8(_object_spread9({}, core.limitShift(options)), {
|
|
28279
|
+
options: [
|
|
28280
|
+
options,
|
|
28281
|
+
deps
|
|
28282
|
+
]
|
|
28283
|
+
});
|
|
28284
|
+
}, flip3 = function(options, deps) {
|
|
28285
|
+
return _object_spread_props8(_object_spread9({}, core.flip(options)), {
|
|
28286
|
+
options: [
|
|
28287
|
+
options,
|
|
28288
|
+
deps
|
|
28289
|
+
]
|
|
28290
|
+
});
|
|
28291
|
+
}, size3 = function(options, deps) {
|
|
28292
|
+
return _object_spread_props8(_object_spread9({}, core.size(options)), {
|
|
28293
|
+
options: [
|
|
28294
|
+
options,
|
|
28295
|
+
deps
|
|
28296
|
+
]
|
|
28297
|
+
});
|
|
28298
|
+
}, autoPlacement3 = function(options, deps) {
|
|
28299
|
+
return _object_spread_props8(_object_spread9({}, core.autoPlacement(options)), {
|
|
28300
|
+
options: [
|
|
28301
|
+
options,
|
|
28302
|
+
deps
|
|
28303
|
+
]
|
|
28304
|
+
});
|
|
28305
|
+
}, hide3 = function(options, deps) {
|
|
28306
|
+
return _object_spread_props8(_object_spread9({}, core.hide(options)), {
|
|
28307
|
+
options: [
|
|
28308
|
+
options,
|
|
28309
|
+
deps
|
|
28310
|
+
]
|
|
28311
|
+
});
|
|
28312
|
+
}, inline3 = function(options, deps) {
|
|
28313
|
+
return _object_spread_props8(_object_spread9({}, core.inline(options)), {
|
|
28314
|
+
options: [
|
|
28315
|
+
options,
|
|
28316
|
+
deps
|
|
28317
|
+
]
|
|
28318
|
+
});
|
|
28319
|
+
}, arrow2 = function(options, deps) {
|
|
28320
|
+
return _object_spread_props8(_object_spread9({}, arrow$1(options)), {
|
|
28321
|
+
options: [
|
|
28322
|
+
options,
|
|
28323
|
+
deps
|
|
28324
|
+
]
|
|
28325
|
+
});
|
|
28326
|
+
};
|
|
28182
28327
|
Object.defineProperty(exports2, "detectOverflow", {
|
|
28183
28328
|
enumerable: !0,
|
|
28184
28329
|
get: function() {
|
|
28185
28330
|
return core.detectOverflow;
|
|
28186
28331
|
}
|
|
28187
28332
|
});
|
|
28188
|
-
Object.defineProperty(exports2, "flip", {
|
|
28189
|
-
enumerable: !0,
|
|
28190
|
-
get: function() {
|
|
28191
|
-
return core.flip;
|
|
28192
|
-
}
|
|
28193
|
-
});
|
|
28194
|
-
Object.defineProperty(exports2, "hide", {
|
|
28195
|
-
enumerable: !0,
|
|
28196
|
-
get: function() {
|
|
28197
|
-
return core.hide;
|
|
28198
|
-
}
|
|
28199
|
-
});
|
|
28200
|
-
Object.defineProperty(exports2, "inline", {
|
|
28201
|
-
enumerable: !0,
|
|
28202
|
-
get: function() {
|
|
28203
|
-
return core.inline;
|
|
28204
|
-
}
|
|
28205
|
-
});
|
|
28206
|
-
Object.defineProperty(exports2, "limitShift", {
|
|
28207
|
-
enumerable: !0,
|
|
28208
|
-
get: function() {
|
|
28209
|
-
return core.limitShift;
|
|
28210
|
-
}
|
|
28211
|
-
});
|
|
28212
|
-
Object.defineProperty(exports2, "offset", {
|
|
28213
|
-
enumerable: !0,
|
|
28214
|
-
get: function() {
|
|
28215
|
-
return core.offset;
|
|
28216
|
-
}
|
|
28217
|
-
});
|
|
28218
|
-
Object.defineProperty(exports2, "shift", {
|
|
28219
|
-
enumerable: !0,
|
|
28220
|
-
get: function() {
|
|
28221
|
-
return core.shift;
|
|
28222
|
-
}
|
|
28223
|
-
});
|
|
28224
|
-
Object.defineProperty(exports2, "size", {
|
|
28225
|
-
enumerable: !0,
|
|
28226
|
-
get: function() {
|
|
28227
|
-
return core.size;
|
|
28228
|
-
}
|
|
28229
|
-
});
|
|
28230
28333
|
exports2.arrow = arrow2;
|
|
28334
|
+
exports2.autoPlacement = autoPlacement3;
|
|
28335
|
+
exports2.flip = flip3;
|
|
28336
|
+
exports2.hide = hide3;
|
|
28337
|
+
exports2.inline = inline3;
|
|
28338
|
+
exports2.limitShift = limitShift3;
|
|
28339
|
+
exports2.offset = offset3;
|
|
28340
|
+
exports2.shift = shift3;
|
|
28341
|
+
exports2.size = size3;
|
|
28231
28342
|
exports2.useFloating = useFloating2;
|
|
28232
28343
|
}
|
|
28233
28344
|
});
|