tamagui 1.75.7 → 1.75.8
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 +30 -18
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +30 -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,13 @@ 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
|
+
let isRNW = style.$$css;
|
|
3081
|
+
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
3082
|
+
}
|
|
3082
3083
|
}
|
|
3083
3084
|
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3084
3085
|
}, useSplitStyles = (...args) => {
|
|
@@ -7432,13 +7433,14 @@ var require_index_native15 = __commonJS({
|
|
|
7432
7433
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
7433
7434
|
__export2(src_exports2, {
|
|
7434
7435
|
Stack: () => Stack3,
|
|
7435
|
-
Text: () => Text3
|
|
7436
|
+
Text: () => Text3,
|
|
7437
|
+
View: () => View2
|
|
7436
7438
|
});
|
|
7437
7439
|
module2.exports = __toCommonJS2(src_exports2);
|
|
7438
7440
|
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
7441
|
__reExport2(src_exports2, require_index_native9(), module2.exports);
|
|
7440
7442
|
__reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
7441
|
-
var Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7443
|
+
var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7442
7444
|
(0, import_web.setupHooks)({
|
|
7443
7445
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7444
7446
|
usePropsTransform(elementType, propsIn, hostRef) {
|
|
@@ -9693,7 +9695,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9693
9695
|
},
|
|
9694
9696
|
(0, import_react2.useCallback)(
|
|
9695
9697
|
(value) => {
|
|
9696
|
-
|
|
9698
|
+
at.current = value, scrollBridge.paneY = value;
|
|
9697
9699
|
},
|
|
9698
9700
|
[animationDriver]
|
|
9699
9701
|
)
|
|
@@ -9728,18 +9730,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9728
9730
|
}, [hasntMeasured, screenSize]), (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
9729
9731
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
9730
9732
|
}, [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)(
|
|
9733
|
+
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
9734
|
() => {
|
|
9733
9735
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
9734
9736
|
return;
|
|
9735
9737
|
let minY = positions[0];
|
|
9736
9738
|
scrollBridge.paneMinY = minY;
|
|
9737
9739
|
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 = "");
|
|
9740
|
+
function setPanning(val) {
|
|
9741
|
+
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
9742
|
}
|
|
9741
9743
|
let release = ({ vy, dragAt }) => {
|
|
9742
|
-
isExternalDrag = !1, previouslyScrolling = !1,
|
|
9744
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
9743
9745
|
let end = dragAt + startY + frameSize * vy * 0.2, closestPoint = 0, dist = 1 / 0;
|
|
9744
9746
|
for (let i = 0; i < positions.length; i++) {
|
|
9745
9747
|
let position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -9755,7 +9757,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9755
9757
|
let isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
9756
9758
|
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp ? !1 : Math.abs(dy) > 5;
|
|
9757
9759
|
}, grant = () => {
|
|
9758
|
-
|
|
9760
|
+
setPanning(!0), stopSpring(), startY = at.current;
|
|
9759
9761
|
}, isExternalDrag = !1;
|
|
9760
9762
|
return scrollBridge.drag = (dy) => {
|
|
9761
9763
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
@@ -9778,14 +9780,20 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9778
9780
|
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
9779
9781
|
(e) => {
|
|
9780
9782
|
var _a;
|
|
9781
|
-
let next = (
|
|
9783
|
+
let next = Math.min(
|
|
9784
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
9785
|
+
import_react_native4.Dimensions.get("window").height
|
|
9786
|
+
);
|
|
9782
9787
|
next && setFrameSize(next);
|
|
9783
9788
|
},
|
|
9784
9789
|
[keyboardIsVisible]
|
|
9785
9790
|
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
9786
9791
|
(e) => {
|
|
9787
9792
|
var _a;
|
|
9788
|
-
let next = (
|
|
9793
|
+
let next = Math.min(
|
|
9794
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
9795
|
+
import_react_native4.Dimensions.get("window").height
|
|
9796
|
+
);
|
|
9789
9797
|
next && setMaxContentSize(next);
|
|
9790
9798
|
},
|
|
9791
9799
|
[keyboardIsVisible]
|
|
@@ -9845,6 +9853,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9845
9853
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
9846
9854
|
onLayout: handleAnimationViewLayout,
|
|
9847
9855
|
pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
|
|
9856
|
+
...!isDragging && {
|
|
9857
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
9858
|
+
animation
|
|
9859
|
+
},
|
|
9848
9860
|
style: [
|
|
9849
9861
|
{
|
|
9850
9862
|
position: "absolute",
|