tamagui 1.126.3 → 1.126.4-1746355141077
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 +50 -46
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +50 -46
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -6997,14 +6997,16 @@ var require_mergeProps_native = __commonJS({
|
|
|
6997
6997
|
};
|
|
6998
6998
|
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
6999
6999
|
var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
|
|
7000
|
-
if (key in
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7000
|
+
if (!(b && (key in b || longhand && longhand in b))) {
|
|
7001
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
|
|
7002
|
+
out[key] = {
|
|
7003
|
+
...out[key],
|
|
7004
|
+
...val
|
|
7005
|
+
};
|
|
7006
|
+
return;
|
|
7007
|
+
}
|
|
7008
|
+
out[longhand || key] = val;
|
|
7006
7009
|
}
|
|
7007
|
-
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
7008
7010
|
}
|
|
7009
7011
|
}
|
|
7010
7012
|
});
|
|
@@ -16939,8 +16941,9 @@ var require_Adapt_native = __commonJS({
|
|
|
16939
16941
|
}, [
|
|
16940
16942
|
when,
|
|
16941
16943
|
platform2,
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
+
enabled,
|
|
16945
|
+
context.setWhen,
|
|
16946
|
+
context.setPlatform
|
|
16944
16947
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16945
16948
|
return function() {
|
|
16946
16949
|
var _context_setWhen, _context_setPlatform;
|
|
@@ -18398,9 +18401,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18398
18401
|
});
|
|
18399
18402
|
}, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
|
|
18400
18403
|
var { dy } = param;
|
|
18401
|
-
if (e.target === providerProps.handleRef.current || !scrollEnabled.current
|
|
18404
|
+
if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
|
|
18402
18405
|
var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
18403
|
-
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && isDraggingUp ? !1 : Math.abs(dy) >
|
|
18406
|
+
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
|
|
18404
18407
|
}, grant = function() {
|
|
18405
18408
|
setScrollEnabled(!1), setPanning(!0), stopSpring(), startY = at.current;
|
|
18406
18409
|
}, isExternalDrag = !1;
|
|
@@ -19569,48 +19572,44 @@ var require_Dialog_native = __commonJS({
|
|
|
19569
19572
|
});
|
|
19570
19573
|
return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
19571
19574
|
children: content
|
|
19572
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19573
|
-
hostName: context.adaptName,
|
|
19575
|
+
}) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19576
|
+
hostName: context.modal ? "root" : context.adaptName,
|
|
19574
19577
|
children: content
|
|
19575
|
-
});
|
|
19578
|
+
}) : content;
|
|
19576
19579
|
}, DialogPortal = function(props) {
|
|
19577
19580
|
var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19578
19581
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
19579
19582
|
var handleExitComplete = React4.useCallback(function() {
|
|
19580
19583
|
setIsFullyHidden(!0);
|
|
19581
|
-
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props)
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
children:
|
|
19586
|
-
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
stackZIndex: 1e3,
|
|
19605
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19606
|
-
children: framedContents
|
|
19607
|
-
})
|
|
19608
|
-
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19609
|
-
__scopeDialog,
|
|
19584
|
+
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
19585
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
19586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
19587
|
+
onExitComplete: handleExitComplete,
|
|
19588
|
+
children: isShowing || isAdapted ? children : null
|
|
19589
|
+
})
|
|
19590
|
+
});
|
|
19591
|
+
if (isFullyHidden && !isAdapted) return null;
|
|
19592
|
+
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
|
|
19593
|
+
scope: __scopeDialog,
|
|
19594
|
+
forceMount,
|
|
19595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
|
|
19596
|
+
pointerEvents: isShowing ? "auto" : "none",
|
|
19597
|
+
...frameProps,
|
|
19598
|
+
children: contents
|
|
19599
|
+
})
|
|
19600
|
+
});
|
|
19601
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
19602
|
+
zIndex,
|
|
19603
|
+
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
19604
|
+
// this makes sure its above (this first 1k) popovers on the same layer
|
|
19605
|
+
stackZIndex: 1e3,
|
|
19606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19610
19607
|
children: framedContents
|
|
19611
|
-
})
|
|
19612
|
-
}
|
|
19613
|
-
|
|
19608
|
+
})
|
|
19609
|
+
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19610
|
+
__scopeDialog,
|
|
19611
|
+
children: framedContents
|
|
19612
|
+
});
|
|
19614
19613
|
}, PassthroughTheme = function(param) {
|
|
19615
19614
|
var { children } = param, themeName = (0, import_core12.useThemeName)();
|
|
19616
19615
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
@@ -19624,6 +19623,11 @@ var require_Dialog_native = __commonJS({
|
|
|
19624
19623
|
var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19625
19624
|
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
19626
19625
|
"data-state": getState(context.open),
|
|
19626
|
+
// TODO: this will be apply for v2
|
|
19627
|
+
// onPress={() => {
|
|
19628
|
+
// // if the overlay is pressed, close the dialog
|
|
19629
|
+
// context.onOpenChange(false)
|
|
19630
|
+
// }}
|
|
19627
19631
|
// We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
|
|
19628
19632
|
pointerEvents: context.open ? "auto" : "none",
|
|
19629
19633
|
...overlayProps,
|