tamagui 1.130.3 → 1.130.4
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 +266 -218
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +265 -216
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -7871,10 +7871,7 @@ var require_Theme_native = __commonJS({
|
|
|
7871
7871
|
}
|
|
7872
7872
|
});
|
|
7873
7873
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
7874
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(),
|
|
7875
|
-
className: "",
|
|
7876
|
-
style: {}
|
|
7877
|
-
}, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7874
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(), Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7878
7875
|
if (props.disable) return props.children;
|
|
7879
7876
|
var { passThrough } = props, isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
|
|
7880
7877
|
return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
@@ -7922,17 +7919,21 @@ var require_Theme_native = __commonJS({
|
|
|
7922
7919
|
forceClassName,
|
|
7923
7920
|
themeState,
|
|
7924
7921
|
state,
|
|
7925
|
-
|
|
7922
|
+
themeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)
|
|
7926
7923
|
}), forceClassName === !1) return children;
|
|
7927
7924
|
if (import_constants4.isWeb) {
|
|
7928
|
-
var { className = "",
|
|
7925
|
+
var baseStyle = props.contain ? inertContainedStyle : inertStyle, { className = "", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);
|
|
7929
7926
|
if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7930
|
-
className: `${className}
|
|
7931
|
-
style: passThrough ?
|
|
7927
|
+
className: `${className} is_Theme`,
|
|
7928
|
+
style: passThrough ? baseStyle : {
|
|
7929
|
+
color,
|
|
7930
|
+
...baseStyle
|
|
7931
|
+
},
|
|
7932
7932
|
children
|
|
7933
7933
|
}), state.hasEverThemed === "wrapped") {
|
|
7934
|
-
var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""}
|
|
7934
|
+
var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} ` : "";
|
|
7935
7935
|
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7936
|
+
style: baseStyle,
|
|
7936
7937
|
className: className1,
|
|
7937
7938
|
children
|
|
7938
7939
|
});
|
|
@@ -7941,14 +7942,21 @@ var require_Theme_native = __commonJS({
|
|
|
7941
7942
|
}
|
|
7942
7943
|
return children;
|
|
7943
7944
|
}
|
|
7944
|
-
|
|
7945
|
+
var inertStyle = {
|
|
7946
|
+
display: "contents"
|
|
7947
|
+
}, inertContainedStyle = {
|
|
7948
|
+
display: "contents",
|
|
7949
|
+
contain: "strict"
|
|
7950
|
+
}, empty = {
|
|
7951
|
+
className: "",
|
|
7952
|
+
color: void 0
|
|
7953
|
+
};
|
|
7954
|
+
function getThemeClassNameAndColor(themeState, props) {
|
|
7945
7955
|
var isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
7946
7956
|
if (!themeState.isNew && !props.forceClassName) return empty;
|
|
7947
|
-
var themeColor = themeState != null && themeState.theme && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : "",
|
|
7948
|
-
color: themeColor
|
|
7949
|
-
} : void 0, maxInverses = (0, import_config.getSetting)("maxDarkLightNesting") || 3, themeClassName = themeState.inverses >= maxInverses ? themeState.name : themeState.name.replace(schemePrefix, ""), className = `${isRoot ? "" : "t_sub_theme"} t_${themeClassName}`;
|
|
7957
|
+
var themeColor = themeState != null && themeState.theme && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : "", maxInverses = (0, import_config.getSetting)("maxDarkLightNesting") || 3, themeClassName = themeState.inverses >= maxInverses ? themeState.name : themeState.name.replace(schemePrefix, ""), className = `${isRoot ? "" : "t_sub_theme"} t_${themeClassName}`;
|
|
7950
7958
|
return {
|
|
7951
|
-
|
|
7959
|
+
color: themeColor,
|
|
7952
7960
|
className
|
|
7953
7961
|
};
|
|
7954
7962
|
}
|
|
@@ -9055,13 +9063,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9055
9063
|
onPress,
|
|
9056
9064
|
onLongPress
|
|
9057
9065
|
});
|
|
9058
|
-
process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child
|
|
9059
|
-
var useChildrenResult;
|
|
9060
|
-
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
|
|
9066
|
+
process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child`, splitStyles || (content = propsIn.children, elementType = BaseViewComponent, viewProps = {
|
|
9061
9067
|
style: {
|
|
9062
9068
|
display: "contents"
|
|
9063
9069
|
}
|
|
9064
|
-
})
|
|
9070
|
+
});
|
|
9071
|
+
var useChildrenResult;
|
|
9072
|
+
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
9065
9073
|
var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!// not when passing down to child
|
|
9066
9074
|
(!asChild && // not when passThrough
|
|
9067
9075
|
splitStyles && // not when HOC
|
|
@@ -13419,7 +13427,6 @@ var require_index_native19 = __commonJS({
|
|
|
13419
13427
|
return cb();
|
|
13420
13428
|
}), queuedUpdates.clear()));
|
|
13421
13429
|
}
|
|
13422
|
-
var expectedFrameTime = 16.67, numDroppedFramesUntilPause = 10;
|
|
13423
13430
|
function startGlobalIntersectionObserver() {
|
|
13424
13431
|
!import_constants4.isClient || globalIntersectionObserver || (globalIntersectionObserver = new IntersectionObserver(function(entries) {
|
|
13425
13432
|
entries.forEach(function(entry) {
|
|
@@ -13432,20 +13439,18 @@ var require_index_native19 = __commonJS({
|
|
|
13432
13439
|
}
|
|
13433
13440
|
if (import_constants4.isClient) if (rAF) {
|
|
13434
13441
|
layoutOnAnimationFrame = function() {
|
|
13435
|
-
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
13436
|
-
if (lastFrameAt = now, frameCount++, frameCount % RUN_EVERY_X_FRAMES === 0) {
|
|
13437
|
-
frameCount = 0, rAF(layoutOnAnimationFrame);
|
|
13438
|
-
return;
|
|
13439
|
-
}
|
|
13440
13442
|
if (strategy !== "off") {
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13443
|
+
if (frameCount++ % RUN_EVERY_X_FRAMES !== 0) {
|
|
13444
|
+
rAF(layoutOnAnimationFrame);
|
|
13445
|
+
return;
|
|
13446
|
+
}
|
|
13447
|
+
frameCount === Number.MAX_SAFE_INTEGER && (frameCount = 0), Nodes.forEach(function(node) {
|
|
13448
|
+
updateLayoutIfChanged(node);
|
|
13444
13449
|
});
|
|
13445
13450
|
}
|
|
13446
13451
|
rAF(layoutOnAnimationFrame);
|
|
13447
|
-
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, supportsCheckVisibility = "checkVisibility" in document.body
|
|
13448
|
-
async function updateLayoutIfChanged(node
|
|
13452
|
+
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, supportsCheckVisibility = "checkVisibility" in document.body;
|
|
13453
|
+
async function updateLayoutIfChanged(node) {
|
|
13449
13454
|
if (IntersectionState.get(node) !== !1 && !(process.env.TAMAGUI_ONLAYOUT_VISIBILITY_CHECK === "1" && supportsCheckVisibility && !node.checkVisibility())) {
|
|
13450
13455
|
var onLayout = LayoutHandlers.get(node);
|
|
13451
13456
|
if (typeof onLayout == "function") {
|
|
@@ -13457,7 +13462,7 @@ var require_index_native19 = __commonJS({
|
|
|
13457
13462
|
getBoundingClientRectAsync(node),
|
|
13458
13463
|
getBoundingClientRectAsync(parentNode)
|
|
13459
13464
|
]);
|
|
13460
|
-
if (nr === !1 || pr === !1
|
|
13465
|
+
if (nr === !1 || pr === !1) return;
|
|
13461
13466
|
nodeRect = nr, parentRect = pr;
|
|
13462
13467
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
13463
13468
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
@@ -13475,9 +13480,9 @@ var require_index_native19 = __commonJS({
|
|
|
13475
13480
|
}
|
|
13476
13481
|
}
|
|
13477
13482
|
}
|
|
13478
|
-
rAF(layoutOnAnimationFrame), frameCount = 0, RUN_EVERY_X_FRAMES =
|
|
13483
|
+
rAF(layoutOnAnimationFrame), frameCount = 0, RUN_EVERY_X_FRAMES = 8;
|
|
13479
13484
|
} else process.env.NODE_ENV === "development" && console.warn("No requestAnimationFrame - please polyfill for onLayout to work correctly");
|
|
13480
|
-
var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility,
|
|
13485
|
+
var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility, frameCount, RUN_EVERY_X_FRAMES, getElementLayoutEvent = function(nodeRect, parentRect) {
|
|
13481
13486
|
return {
|
|
13482
13487
|
nativeEvent: {
|
|
13483
13488
|
layout: getRelativeDimensions(nodeRect, parentRect),
|
|
@@ -13542,7 +13547,7 @@ var require_index_native19 = __commonJS({
|
|
|
13542
13547
|
if (onLayout) {
|
|
13543
13548
|
var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
|
|
13544
13549
|
if (node2) {
|
|
13545
|
-
|
|
13550
|
+
Nodes.add(node2), startGlobalIntersectionObserver(), globalIntersectionObserver && (globalIntersectionObserver.observe(node2), IntersectionState.set(node2, !0));
|
|
13546
13551
|
var parentNode = node2.parentNode;
|
|
13547
13552
|
return parentNode && onLayout(getElementLayoutEvent(node2.getBoundingClientRect(), parentNode.getBoundingClientRect())), function() {
|
|
13548
13553
|
Nodes.delete(node2), LayoutHandlers.delete(node2), NodeRectCache.delete(node2), LastChangeTime.delete(node2), IntersectionState.delete(node2), globalIntersectionObserver && globalIntersectionObserver.unobserve(node2);
|
|
@@ -16828,7 +16833,7 @@ var require_Portal_native = __commonJS({
|
|
|
16828
16833
|
}
|
|
16829
16834
|
});
|
|
16830
16835
|
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
16831
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
16836
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_constants4 = require_constants_native3(), import_GorhomPortalItem = require_GorhomPortalItem_native(), import_helpers = require_helpers_native(), createPortal = function() {
|
|
16832
16837
|
if (import_constants4.IS_FABRIC) try {
|
|
16833
16838
|
var _ReactFabricShimModule_default, ReactFabricShimModule = require_fake_react_native(), _ReactFabricShimModule_default_createPortal;
|
|
16834
16839
|
return (_ReactFabricShimModule_default_createPortal = ReactFabricShimModule == null || (_ReactFabricShimModule_default = ReactFabricShimModule.default) === null || _ReactFabricShimModule_default === void 0 ? void 0 : _ReactFabricShimModule_default.createPortal) !== null && _ReactFabricShimModule_default_createPortal !== void 0 ? _ReactFabricShimModule_default_createPortal : ReactFabricShimModule.createPortal;
|
|
@@ -16842,15 +16847,17 @@ var require_Portal_native = __commonJS({
|
|
|
16842
16847
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
16843
16848
|
}
|
|
16844
16849
|
}(), Portal = function(propsIn) {
|
|
16845
|
-
var
|
|
16850
|
+
var rootTag = React4.useContext(import_react_native4.RootTagContext), zIndex = (0, import_z_index_stack2.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn)), { children, passThrough } = propsIn, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
16846
16851
|
pointerEvents: "box-none",
|
|
16847
|
-
fullscreen: !0,
|
|
16848
16852
|
position: "absolute",
|
|
16853
|
+
inset: 0,
|
|
16849
16854
|
maxWidth: "100%",
|
|
16850
|
-
|
|
16851
|
-
|
|
16855
|
+
zIndex,
|
|
16856
|
+
passThrough,
|
|
16857
|
+
children
|
|
16852
16858
|
});
|
|
16853
16859
|
return !createPortal || !import_constants4.USE_NATIVE_PORTAL || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortalItem.GorhomPortalItem, {
|
|
16860
|
+
passThrough,
|
|
16854
16861
|
hostName: "root",
|
|
16855
16862
|
children: contents
|
|
16856
16863
|
}) : createPortal(contents, rootTag);
|
|
@@ -18643,11 +18650,11 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18643
18650
|
scrollBridge.paneMinY = minY;
|
|
18644
18651
|
var startY = at.current;
|
|
18645
18652
|
function setPanning(val) {
|
|
18646
|
-
setIsDragging(val),
|
|
18653
|
+
setIsDragging(val), import_constants4.isClient && (sheetHiddenStyleSheet || (sheetHiddenStyleSheet = document.createElement("style"), typeof document.head < "u" && document.head.appendChild(sheetHiddenStyleSheet)), val ? sheetHiddenStyleSheet.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : sheetHiddenStyleSheet.innerText = "");
|
|
18647
18654
|
}
|
|
18648
18655
|
var release = function(param) {
|
|
18649
18656
|
var { vy, dragAt } = param;
|
|
18650
|
-
if (!scrollBridge.scrollLock) {
|
|
18657
|
+
if (scrollBridge.setParentDragging(!1), !scrollBridge.scrollLock) {
|
|
18651
18658
|
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
18652
18659
|
for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
|
|
18653
18660
|
var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -18826,6 +18833,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18826
18833
|
...portalProps,
|
|
18827
18834
|
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
|
|
18828
18835
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
18836
|
+
contain: !0,
|
|
18829
18837
|
forceClassName: !0,
|
|
18830
18838
|
name: themeName,
|
|
18831
18839
|
children: contents
|
|
@@ -19013,116 +19021,139 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
19013
19021
|
}
|
|
19014
19022
|
});
|
|
19015
19023
|
module2.exports = __toCommonJS2(SheetScrollView_exports);
|
|
19016
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_scroll_view = require_index_native37(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19031
|
-
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
if (state.current.isDraggingScrollArea) {
|
|
19040
|
-
state.current.isDraggingScrollArea = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
19041
|
-
var vy = 0;
|
|
19042
|
-
if (state.current.dys.length) {
|
|
19043
|
-
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
19044
|
-
return a + b;
|
|
19045
|
-
}, 0) : 0, avgDy = dist / recentDys.length;
|
|
19046
|
-
vy = avgDy * 0.04;
|
|
19047
|
-
}
|
|
19048
|
-
state.current.dys = [], scrollBridge.release({
|
|
19049
|
-
dragAt: state.current.dragAt,
|
|
19050
|
-
vy
|
|
19051
|
-
});
|
|
19052
|
-
}
|
|
19053
|
-
}, scrollable = scrollEnabled;
|
|
19054
|
-
return (0, import_react3.useEffect)(function() {
|
|
19055
|
-
if (!(typeof window > "u") && scrollRef.current) {
|
|
19056
|
-
var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
|
|
19057
|
-
node.addEventListener(
|
|
19058
|
-
"touchmove",
|
|
19059
|
-
function(e) {
|
|
19060
|
-
scrollBridge.isParentDragging && node.scrollTo({
|
|
19061
|
-
top: scrollBridge.y,
|
|
19062
|
-
behavior: "instant"
|
|
19063
|
-
});
|
|
19064
|
-
},
|
|
19065
|
-
// can't preventdefault its not cancellable
|
|
19066
|
-
{
|
|
19067
|
-
signal: controller.signal,
|
|
19068
|
-
passive: !1
|
|
19069
|
-
}
|
|
19070
|
-
);
|
|
19071
|
-
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
19072
|
-
});
|
|
19073
|
-
return function() {
|
|
19074
|
-
disposeBridgeListen(), controller.abort();
|
|
19024
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_scroll_view = require_index_native37(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(
|
|
19025
|
+
// we disallow customizing it because we want to let people know it doens't work well with out measuring of inner content
|
|
19026
|
+
// height using a view
|
|
19027
|
+
function(param, ref) {
|
|
19028
|
+
var { __scopeSheet, children, onScroll, scrollEnabled: scrollEnabledProp, ...props } = param, context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge, setHasScrollView } = context, [scrollEnabled, setScrollEnabled_] = (0, import_use_controllable_state.useControllableState)({
|
|
19029
|
+
prop: scrollEnabledProp,
|
|
19030
|
+
defaultProp: !0
|
|
19031
|
+
}), scrollRef = import_react3.default.useRef(null), setScrollEnabled = function(next) {
|
|
19032
|
+
var _scrollRef_current_setNativeProps, _scrollRef_current;
|
|
19033
|
+
(_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 || (_scrollRef_current_setNativeProps = _scrollRef_current.setNativeProps) === null || _scrollRef_current_setNativeProps === void 0 || _scrollRef_current_setNativeProps.call(_scrollRef_current, {
|
|
19034
|
+
scrollEnabled: next
|
|
19035
|
+
}), setScrollEnabled_(next);
|
|
19036
|
+
}, state = import_react3.default.useRef({
|
|
19037
|
+
lastPageY: 0,
|
|
19038
|
+
dragAt: 0,
|
|
19039
|
+
dys: [],
|
|
19040
|
+
// store a few recent dys to get velocity on release
|
|
19041
|
+
isScrolling: !1,
|
|
19042
|
+
isDraggingScrollArea: !1
|
|
19043
|
+
});
|
|
19044
|
+
(0, import_react3.useEffect)(function() {
|
|
19045
|
+
return setHasScrollView(!0), function() {
|
|
19046
|
+
setHasScrollView(!1);
|
|
19075
19047
|
};
|
|
19076
|
-
}
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
|
|
19084
|
-
|
|
19085
|
-
|
|
19086
|
-
// })}
|
|
19087
|
-
onScroll: function(e) {
|
|
19088
|
-
var { y } = e.nativeEvent.contentOffset;
|
|
19089
|
-
scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
19090
|
-
},
|
|
19091
|
-
// This assures that we do not skip the "scrollBridge" values processing
|
|
19092
|
-
// when passing this prop into a <Sheet.ScrollView /> overriding it here
|
|
19093
|
-
// Useful when using this ScrollView with lists such as "FlashList", i.e.
|
|
19094
|
-
// ```
|
|
19095
|
-
// renderScrollComponent={Sheet.ScrollView}
|
|
19096
|
-
// ```
|
|
19097
|
-
onStartShouldSetResponder: function() {
|
|
19098
|
-
return scrollBridge.scrollStartY = -1, state.current.isDraggingScrollArea = !0, scrollable;
|
|
19099
|
-
},
|
|
19100
|
-
// setting to false while onResponderMove is disabled
|
|
19101
|
-
onMoveShouldSetResponder: function(e) {
|
|
19102
|
-
return scrollable;
|
|
19103
|
-
},
|
|
19104
|
-
contentContainerStyle: {
|
|
19105
|
-
minHeight: "100%"
|
|
19106
|
-
},
|
|
19107
|
-
onResponderMove: function(e) {
|
|
19108
|
-
if (import_core12.isWeb) {
|
|
19109
|
-
var { pageY } = e.nativeEvent;
|
|
19110
|
-
state.current.isScrolling || scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
19111
|
-
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
19112
|
-
state.current.lastPageY = pageY;
|
|
19113
|
-
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
19114
|
-
if (shouldScrollLock && !state.current.isScrolling) {
|
|
19115
|
-
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
19116
|
-
return;
|
|
19048
|
+
}, []);
|
|
19049
|
+
var release = function() {
|
|
19050
|
+
if (state.current.isDraggingScrollArea) {
|
|
19051
|
+
state.current.isDraggingScrollArea = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
19052
|
+
var vy = 0;
|
|
19053
|
+
if (state.current.dys.length) {
|
|
19054
|
+
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
19055
|
+
return a + b;
|
|
19056
|
+
}, 0) : 0, avgDy = dist / recentDys.length;
|
|
19057
|
+
vy = avgDy * 0.04;
|
|
19117
19058
|
}
|
|
19118
|
-
|
|
19119
|
-
|
|
19059
|
+
state.current.dys = [], scrollBridge.release({
|
|
19060
|
+
dragAt: state.current.dragAt,
|
|
19061
|
+
vy
|
|
19062
|
+
});
|
|
19120
19063
|
}
|
|
19121
|
-
},
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19064
|
+
}, scrollable = scrollEnabled;
|
|
19065
|
+
(0, import_react3.useEffect)(function() {
|
|
19066
|
+
if (import_core12.isClient && scrollRef.current) {
|
|
19067
|
+
var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
|
|
19068
|
+
node.addEventListener(
|
|
19069
|
+
"touchmove",
|
|
19070
|
+
function(e) {
|
|
19071
|
+
scrollBridge.isParentDragging && node.scrollTo({
|
|
19072
|
+
top: scrollBridge.y,
|
|
19073
|
+
behavior: "instant"
|
|
19074
|
+
});
|
|
19075
|
+
},
|
|
19076
|
+
// can't preventdefault its not cancellable
|
|
19077
|
+
{
|
|
19078
|
+
signal: controller.signal,
|
|
19079
|
+
passive: !1
|
|
19080
|
+
}
|
|
19081
|
+
);
|
|
19082
|
+
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
19083
|
+
});
|
|
19084
|
+
return function() {
|
|
19085
|
+
disposeBridgeListen(), controller.abort();
|
|
19086
|
+
};
|
|
19087
|
+
}
|
|
19088
|
+
}, []);
|
|
19089
|
+
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
19090
|
+
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
19091
|
+
};
|
|
19092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
19093
|
+
onLayout: function(e) {
|
|
19094
|
+
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
19095
|
+
},
|
|
19096
|
+
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
19097
|
+
flex: 1,
|
|
19098
|
+
scrollEventThrottle: 8,
|
|
19099
|
+
onResponderRelease: release,
|
|
19100
|
+
className: "_ovs-contain",
|
|
19101
|
+
scrollEnabled: scrollable,
|
|
19102
|
+
// {...(Platform.OS === 'android' && {
|
|
19103
|
+
// pointerEvents: scrollable ? undefined : 'none',
|
|
19104
|
+
// })}
|
|
19105
|
+
onScroll: function(e) {
|
|
19106
|
+
var { y } = e.nativeEvent.contentOffset;
|
|
19107
|
+
scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
19108
|
+
},
|
|
19109
|
+
// This assures that we do not skip the "scrollBridge" values processing
|
|
19110
|
+
// when passing this prop into a <Sheet.ScrollView /> overriding it here
|
|
19111
|
+
// Useful when using this ScrollView with lists such as "FlashList", i.e.
|
|
19112
|
+
// ```
|
|
19113
|
+
// renderScrollComponent={Sheet.ScrollView}
|
|
19114
|
+
// ```
|
|
19115
|
+
onStartShouldSetResponder: function() {
|
|
19116
|
+
return scrollBridge.scrollStartY = -1, state.current.isDraggingScrollArea = !0, scrollable;
|
|
19117
|
+
},
|
|
19118
|
+
// setting to false while onResponderMove is disabled
|
|
19119
|
+
onMoveShouldSetResponder: function(e) {
|
|
19120
|
+
return scrollable;
|
|
19121
|
+
},
|
|
19122
|
+
contentContainerStyle: {
|
|
19123
|
+
minHeight: "100%"
|
|
19124
|
+
},
|
|
19125
|
+
onResponderMove: function(e) {
|
|
19126
|
+
if (import_core12.isWeb) {
|
|
19127
|
+
var { pageY } = e.nativeEvent;
|
|
19128
|
+
state.current.isScrolling || scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
19129
|
+
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
19130
|
+
state.current.lastPageY = pageY;
|
|
19131
|
+
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = hasScrollableContent && (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
19132
|
+
if (shouldScrollLock && !state.current.isScrolling) {
|
|
19133
|
+
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
19134
|
+
return;
|
|
19135
|
+
}
|
|
19136
|
+
if (scrollBridge.y >= 0) return;
|
|
19137
|
+
setScrollEnabled(!1), scrollBridge.drag(dragAt), state.current.dragAt = dragAt, state.current.dys.push(dy), state.current.dys.length > 100 && (state.current.dys = state.current.dys.slice(-10));
|
|
19138
|
+
}
|
|
19139
|
+
},
|
|
19140
|
+
...props,
|
|
19141
|
+
children: [
|
|
19142
|
+
/* content height measurer */
|
|
19143
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
19144
|
+
position: "absolute",
|
|
19145
|
+
inset: 0,
|
|
19146
|
+
pointerEvents: "none",
|
|
19147
|
+
zIndex: -1,
|
|
19148
|
+
onLayout: function(e) {
|
|
19149
|
+
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
19150
|
+
}
|
|
19151
|
+
}),
|
|
19152
|
+
children
|
|
19153
|
+
]
|
|
19154
|
+
});
|
|
19155
|
+
}
|
|
19156
|
+
);
|
|
19126
19157
|
}
|
|
19127
19158
|
});
|
|
19128
19159
|
|
|
@@ -24110,6 +24141,7 @@ var require_Animate_native = __commonJS({
|
|
|
24110
24141
|
},
|
|
24111
24142
|
children
|
|
24112
24143
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
24144
|
+
passThrough,
|
|
24113
24145
|
...props,
|
|
24114
24146
|
children: mounted || passThrough ? children : null
|
|
24115
24147
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
@@ -24879,8 +24911,8 @@ var require_Popover_native = __commonJS({
|
|
|
24879
24911
|
}
|
|
24880
24912
|
});
|
|
24881
24913
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24882
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24883
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24914
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_scroll_view = require_index_native37(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24915
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24884
24916
|
return React4.useEffect(function() {
|
|
24885
24917
|
return onCustomAnchorAdd(), function() {
|
|
24886
24918
|
return onCustomAnchorRemove();
|
|
@@ -24894,7 +24926,7 @@ var require_Popover_native = __commonJS({
|
|
|
24894
24926
|
ref: forwardedRef
|
|
24895
24927
|
});
|
|
24896
24928
|
}), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24897
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24929
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24898
24930
|
if (!props.children) return null;
|
|
24899
24931
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24900
24932
|
"aria-expanded": context.open,
|
|
@@ -24938,7 +24970,7 @@ var require_Popover_native = __commonJS({
|
|
|
24938
24970
|
children: trigger
|
|
24939
24971
|
});
|
|
24940
24972
|
}), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24941
|
-
var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
24973
|
+
var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
24942
24974
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24943
24975
|
if (context.open) {
|
|
24944
24976
|
var content = contentRef.current;
|
|
@@ -24948,17 +24980,19 @@ var require_Popover_native = __commonJS({
|
|
|
24948
24980
|
context.open
|
|
24949
24981
|
]), !context.keepChildrenMounted && isFullyHidden) return null;
|
|
24950
24982
|
var _contentImplProps_pointerEvents;
|
|
24951
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24952
|
-
|
|
24983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
24984
|
+
passThrough: context.breakpointActive,
|
|
24985
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24953
24986
|
zIndex,
|
|
24954
24987
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24988
|
+
passThrough: context.breakpointActive,
|
|
24955
24989
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24956
24990
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24957
24991
|
...contentImplProps,
|
|
24958
24992
|
enableRemoveScroll,
|
|
24959
24993
|
ref: composedRefs,
|
|
24960
24994
|
setIsFullyHidden,
|
|
24961
|
-
__scopePopover,
|
|
24995
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24962
24996
|
// we make sure we're not trapping once it's been closed
|
|
24963
24997
|
// (closed !== unmounted when animating out)
|
|
24964
24998
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -24983,55 +25017,76 @@ var require_Popover_native = __commonJS({
|
|
|
24983
25017
|
})
|
|
24984
25018
|
})
|
|
24985
25019
|
});
|
|
24986
|
-
}))
|
|
24987
|
-
|
|
24988
|
-
|
|
25020
|
+
})), useParentContexts = function(scope) {
|
|
25021
|
+
var popperContext = (0, import_popper.usePopperContext)(scope || POPOVER_SCOPE), adaptContext = (0, import_adapt.useAdaptContext)(), context = usePopoverContext(scope || POPOVER_SCOPE);
|
|
25022
|
+
return {
|
|
25023
|
+
popperContext,
|
|
25024
|
+
adaptContext,
|
|
25025
|
+
context
|
|
25026
|
+
};
|
|
25027
|
+
};
|
|
25028
|
+
function RepropagateParentContexts(param) {
|
|
25029
|
+
var { adaptContext, children, context, popperContext, scope } = param;
|
|
24989
25030
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24990
|
-
scope
|
|
25031
|
+
scope,
|
|
24991
25032
|
...popperContext,
|
|
24992
25033
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24993
|
-
...
|
|
25034
|
+
...context,
|
|
24994
25035
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
24995
|
-
...
|
|
24996
|
-
children
|
|
25036
|
+
...adaptContext,
|
|
25037
|
+
children
|
|
24997
25038
|
})
|
|
24998
25039
|
})
|
|
24999
25040
|
});
|
|
25000
25041
|
}
|
|
25001
|
-
function
|
|
25002
|
-
var {
|
|
25003
|
-
|
|
25004
|
-
scope
|
|
25005
|
-
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
|
|
25009
|
-
|
|
25042
|
+
var PortalAdaptSafe = function(param) {
|
|
25043
|
+
var { children, __scopePopover } = param;
|
|
25044
|
+
if (needsRepropagation) {
|
|
25045
|
+
var scope = __scopePopover || POPOVER_SCOPE, parentContexts = useParentContexts(scope);
|
|
25046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
25048
|
+
scope,
|
|
25049
|
+
...parentContexts,
|
|
25050
|
+
children
|
|
25051
|
+
})
|
|
25052
|
+
});
|
|
25053
|
+
}
|
|
25054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25055
|
+
children
|
|
25056
|
+
});
|
|
25057
|
+
};
|
|
25058
|
+
function PopoverPortal(props) {
|
|
25059
|
+
var scope = props.__scopePopover || POPOVER_SCOPE, zIndex = props.zIndex, themeName = (0, import_core12.useThemeName)(), content = props.children;
|
|
25060
|
+
if (needsRepropagation) {
|
|
25061
|
+
var parentContexts = useParentContexts(scope);
|
|
25062
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
25063
|
+
scope,
|
|
25064
|
+
...parentContexts,
|
|
25065
|
+
children: content
|
|
25066
|
+
});
|
|
25067
|
+
}
|
|
25068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
25069
|
+
passThrough: props.passThrough,
|
|
25010
25070
|
stackZIndex: !0,
|
|
25011
25071
|
zIndex,
|
|
25012
25072
|
children: (
|
|
25013
25073
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
25014
25074
|
/* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
|
|
25015
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
25016
|
-
passThrough:
|
|
25075
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
25076
|
+
passThrough: props.passThrough,
|
|
25077
|
+
contain: !0,
|
|
25017
25078
|
forceClassName: !0,
|
|
25018
25079
|
name: themeName,
|
|
25019
|
-
children:
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
}),
|
|
25024
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
25025
|
-
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
25026
|
-
children: contents
|
|
25027
|
-
})
|
|
25028
|
-
]
|
|
25080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
25081
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
25082
|
+
children: content
|
|
25083
|
+
})
|
|
25029
25084
|
})
|
|
25030
25085
|
)
|
|
25031
25086
|
});
|
|
25032
25087
|
}
|
|
25033
25088
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25034
|
-
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
|
|
25089
|
+
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
|
|
25035
25090
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
25036
25091
|
}, [
|
|
25037
25092
|
setIsFullyHidden
|
|
@@ -25039,42 +25094,27 @@ var require_Popover_native = __commonJS({
|
|
|
25039
25094
|
disable: context.breakpointActive,
|
|
25040
25095
|
children
|
|
25041
25096
|
});
|
|
25042
|
-
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25043
|
-
|
|
25044
|
-
|
|
25045
|
-
|
|
25046
|
-
|
|
25047
|
-
|
|
25048
|
-
|
|
25049
|
-
|
|
25097
|
+
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
25098
|
+
type: "presence",
|
|
25099
|
+
present: !!open,
|
|
25100
|
+
keepChildrenMounted: !!keepChildrenMounted,
|
|
25101
|
+
onExitComplete: handleExitComplete,
|
|
25102
|
+
lazyMount,
|
|
25103
|
+
passThrough: context.breakpointActive,
|
|
25104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
25105
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
25106
|
+
"data-state": getState(open),
|
|
25107
|
+
id: context.contentId,
|
|
25108
|
+
ref: forwardedRef,
|
|
25050
25109
|
passThrough: context.breakpointActive,
|
|
25051
|
-
|
|
25052
|
-
|
|
25053
|
-
"data-state": getState(open),
|
|
25054
|
-
id: context.contentId,
|
|
25055
|
-
ref: forwardedRef,
|
|
25056
|
-
passThrough: context.breakpointActive,
|
|
25057
|
-
...contentProps,
|
|
25110
|
+
...contentProps,
|
|
25111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
25058
25112
|
children: contents
|
|
25059
|
-
}, context.contentId)
|
|
25060
|
-
})
|
|
25061
|
-
});
|
|
25062
|
-
}), RepropagatePopperAdapt = function(param) {
|
|
25063
|
-
var { children, __scopePopover } = param;
|
|
25064
|
-
if (needsRepropagation) {
|
|
25065
|
-
var popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
|
|
25066
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25067
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
25068
|
-
...popperContext,
|
|
25069
|
-
children
|
|
25070
25113
|
})
|
|
25071
|
-
})
|
|
25072
|
-
}
|
|
25073
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25074
|
-
children
|
|
25114
|
+
}, context.contentId)
|
|
25075
25115
|
});
|
|
25076
|
-
}, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25077
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
25116
|
+
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25117
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE);
|
|
25078
25118
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
25079
25119
|
...rest,
|
|
25080
25120
|
ref: forwardedRef,
|
|
@@ -25094,7 +25134,14 @@ var require_Popover_native = __commonJS({
|
|
|
25094
25134
|
});
|
|
25095
25135
|
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
25096
25136
|
var context = usePopoverContext(POPOVER_SCOPE);
|
|
25097
|
-
return
|
|
25137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
25138
|
+
ref,
|
|
25139
|
+
// when adapted, no pointer events!
|
|
25140
|
+
pointerEvents: context.breakpointActive ? "none" : void 0,
|
|
25141
|
+
scrollEnabled: !context.breakpointActive,
|
|
25142
|
+
passThrough: context.breakpointActive,
|
|
25143
|
+
...props
|
|
25144
|
+
});
|
|
25098
25145
|
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
25099
25146
|
var id = React4.useId();
|
|
25100
25147
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
@@ -25174,7 +25221,7 @@ var require_Popover_native = __commonJS({
|
|
|
25174
25221
|
keepChildrenMounted
|
|
25175
25222
|
}, memoizedChildren = React4.useMemo(function() {
|
|
25176
25223
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
25177
|
-
scope: __scopePopover,
|
|
25224
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
25178
25225
|
...popoverContext,
|
|
25179
25226
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
25180
25227
|
onOpenChange: setOpen,
|
|
@@ -25182,6 +25229,7 @@ var require_Popover_native = __commonJS({
|
|
|
25182
25229
|
})
|
|
25183
25230
|
});
|
|
25184
25231
|
}, [
|
|
25232
|
+
__scopePopover,
|
|
25185
25233
|
setOpen,
|
|
25186
25234
|
children,
|
|
25187
25235
|
...Object.values(popoverContext)
|
|
@@ -25204,7 +25252,7 @@ var require_Popover_native = __commonJS({
|
|
|
25204
25252
|
return open ? "open" : "closed";
|
|
25205
25253
|
}
|
|
25206
25254
|
var PopoverSheetController = function(param) {
|
|
25207
|
-
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
25255
|
+
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
25208
25256
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
25209
25257
|
onOpenChange: function(val) {
|
|
25210
25258
|
if (getShowSheet()) {
|