tamagui 1.75.7 → 1.75.9
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 +32 -18
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +32 -18
- package/dist/test.native.js.map +2 -2
- package/package.json +52 -52
package/dist/test.native.js
CHANGED
|
@@ -1664,14 +1664,14 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1664
1664
|
mediaKeys.map((k, index) => [k, new Array(index + 1).fill(":root").join("")])
|
|
1665
1665
|
));
|
|
1666
1666
|
}
|
|
1667
|
-
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and" : ""}
|
|
1667
|
+
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and " : ""}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? "" : enableMediaPropOrder ? (
|
|
1668
1668
|
// this new array should be cached
|
|
1669
1669
|
new Array(priority).fill(":root").join("")
|
|
1670
1670
|
) : (
|
|
1671
1671
|
// @ts-ignore
|
|
1672
1672
|
prefixes[mediaKey]
|
|
1673
1673
|
), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
|
|
1674
|
-
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}
|
|
1674
|
+
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: inline-size) {${styleRule}}`);
|
|
1675
1675
|
}
|
|
1676
1676
|
return {
|
|
1677
1677
|
property,
|
|
@@ -3073,12 +3073,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3073
3073
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
3074
3074
|
};
|
|
3075
3075
|
function mergeStylePropIntoStyle(styleState, cur) {
|
|
3076
|
-
if (cur)
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3076
|
+
if (!cur)
|
|
3077
|
+
return;
|
|
3078
|
+
let styles = Array.isArray(cur) ? cur : [cur];
|
|
3079
|
+
for (let style of styles) {
|
|
3080
|
+
if (!style)
|
|
3081
|
+
continue;
|
|
3082
|
+
let isRNW = style.$$css;
|
|
3083
|
+
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
3084
|
+
}
|
|
3082
3085
|
}
|
|
3083
3086
|
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3084
3087
|
}, useSplitStyles = (...args) => {
|
|
@@ -7432,13 +7435,14 @@ var require_index_native15 = __commonJS({
|
|
|
7432
7435
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
7433
7436
|
__export2(src_exports2, {
|
|
7434
7437
|
Stack: () => Stack3,
|
|
7435
|
-
Text: () => Text3
|
|
7438
|
+
Text: () => Text3,
|
|
7439
|
+
View: () => View2
|
|
7436
7440
|
});
|
|
7437
7441
|
module2.exports = __toCommonJS2(src_exports2);
|
|
7438
7442
|
var import_react_native_use_responder_events = require_index_native14(), import_web = require_index_native9(), import_react2 = require("react"), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_useElementLayout = require_useElementLayout_native(), import_usePlatformMethods = require_usePlatformMethods_native(), import_Pressability = require_Pressability_native();
|
|
7439
7443
|
__reExport2(src_exports2, require_index_native9(), module2.exports);
|
|
7440
7444
|
__reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
7441
|
-
var Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7445
|
+
var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7442
7446
|
(0, import_web.setupHooks)({
|
|
7443
7447
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7444
7448
|
usePropsTransform(elementType, propsIn, hostRef) {
|
|
@@ -9693,7 +9697,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9693
9697
|
},
|
|
9694
9698
|
(0, import_react2.useCallback)(
|
|
9695
9699
|
(value) => {
|
|
9696
|
-
|
|
9700
|
+
at.current = value, scrollBridge.paneY = value;
|
|
9697
9701
|
},
|
|
9698
9702
|
[animationDriver]
|
|
9699
9703
|
)
|
|
@@ -9728,18 +9732,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9728
9732
|
}, [hasntMeasured, screenSize]), (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
9729
9733
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
9730
9734
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
9731
|
-
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core13.useThemeName)(), panResponder = (0, import_react2.useMemo)(
|
|
9735
|
+
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core13.useThemeName)(), [isDragging, setIsDragging] = (0, import_react2.useState)(!1), panResponder = (0, import_react2.useMemo)(
|
|
9732
9736
|
() => {
|
|
9733
9737
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
9734
9738
|
return;
|
|
9735
9739
|
let minY = positions[0];
|
|
9736
9740
|
scrollBridge.paneMinY = minY;
|
|
9737
9741
|
let startY = at.current;
|
|
9738
|
-
function
|
|
9739
|
-
import_constants.SHEET_HIDDEN_STYLESHEET && (val ? import_constants.SHEET_HIDDEN_STYLESHEET.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : import_constants.SHEET_HIDDEN_STYLESHEET.innerText = "");
|
|
9742
|
+
function setPanning(val) {
|
|
9743
|
+
setIsDragging(val), import_constants.SHEET_HIDDEN_STYLESHEET && (val ? import_constants.SHEET_HIDDEN_STYLESHEET.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : import_constants.SHEET_HIDDEN_STYLESHEET.innerText = "");
|
|
9740
9744
|
}
|
|
9741
9745
|
let release = ({ vy, dragAt }) => {
|
|
9742
|
-
isExternalDrag = !1, previouslyScrolling = !1,
|
|
9746
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
9743
9747
|
let end = dragAt + startY + frameSize * vy * 0.2, closestPoint = 0, dist = 1 / 0;
|
|
9744
9748
|
for (let i = 0; i < positions.length; i++) {
|
|
9745
9749
|
let position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -9755,7 +9759,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9755
9759
|
let isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
9756
9760
|
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp ? !1 : Math.abs(dy) > 5;
|
|
9757
9761
|
}, grant = () => {
|
|
9758
|
-
|
|
9762
|
+
setPanning(!0), stopSpring(), startY = at.current;
|
|
9759
9763
|
}, isExternalDrag = !1;
|
|
9760
9764
|
return scrollBridge.drag = (dy) => {
|
|
9761
9765
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
@@ -9778,14 +9782,20 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9778
9782
|
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
9779
9783
|
(e) => {
|
|
9780
9784
|
var _a;
|
|
9781
|
-
let next = (
|
|
9785
|
+
let next = Math.min(
|
|
9786
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
9787
|
+
import_react_native4.Dimensions.get("window").height
|
|
9788
|
+
);
|
|
9782
9789
|
next && setFrameSize(next);
|
|
9783
9790
|
},
|
|
9784
9791
|
[keyboardIsVisible]
|
|
9785
9792
|
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
9786
9793
|
(e) => {
|
|
9787
9794
|
var _a;
|
|
9788
|
-
let next = (
|
|
9795
|
+
let next = Math.min(
|
|
9796
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
9797
|
+
import_react_native4.Dimensions.get("window").height
|
|
9798
|
+
);
|
|
9789
9799
|
next && setMaxContentSize(next);
|
|
9790
9800
|
},
|
|
9791
9801
|
[keyboardIsVisible]
|
|
@@ -9845,6 +9855,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9845
9855
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
9846
9856
|
onLayout: handleAnimationViewLayout,
|
|
9847
9857
|
pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
|
|
9858
|
+
...!isDragging && {
|
|
9859
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
9860
|
+
animation
|
|
9861
|
+
},
|
|
9848
9862
|
style: [
|
|
9849
9863
|
{
|
|
9850
9864
|
position: "absolute",
|