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/native.js
CHANGED
|
@@ -1719,14 +1719,14 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1719
1719
|
mediaKeys.map((k, index) => [k, new Array(index + 1).fill(":root").join("")])
|
|
1720
1720
|
));
|
|
1721
1721
|
}
|
|
1722
|
-
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and" : ""}
|
|
1722
|
+
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and " : ""}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? "" : enableMediaPropOrder ? (
|
|
1723
1723
|
// this new array should be cached
|
|
1724
1724
|
new Array(priority).fill(":root").join("")
|
|
1725
1725
|
) : (
|
|
1726
1726
|
// @ts-ignore
|
|
1727
1727
|
prefixes[mediaKey]
|
|
1728
1728
|
), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
|
|
1729
|
-
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}
|
|
1729
|
+
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: inline-size) {${styleRule}}`);
|
|
1730
1730
|
}
|
|
1731
1731
|
return {
|
|
1732
1732
|
property,
|
|
@@ -3246,12 +3246,13 @@ current`, {
|
|
|
3246
3246
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
3247
3247
|
};
|
|
3248
3248
|
function mergeStylePropIntoStyle(styleState, cur) {
|
|
3249
|
-
if (cur)
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3249
|
+
if (!cur)
|
|
3250
|
+
return;
|
|
3251
|
+
let styles = Array.isArray(cur) ? cur : [cur];
|
|
3252
|
+
for (let style of styles) {
|
|
3253
|
+
let isRNW = style.$$css;
|
|
3254
|
+
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
3255
|
+
}
|
|
3255
3256
|
}
|
|
3256
3257
|
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3257
3258
|
}, useSplitStyles = (...args) => {
|
|
@@ -7794,13 +7795,14 @@ var require_index_native15 = __commonJS({
|
|
|
7794
7795
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
7795
7796
|
__export2(src_exports2, {
|
|
7796
7797
|
Stack: () => Stack3,
|
|
7797
|
-
Text: () => Text3
|
|
7798
|
+
Text: () => Text3,
|
|
7799
|
+
View: () => View2
|
|
7798
7800
|
});
|
|
7799
7801
|
module2.exports = __toCommonJS2(src_exports2);
|
|
7800
7802
|
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();
|
|
7801
7803
|
__reExport2(src_exports2, require_index_native9(), module2.exports);
|
|
7802
7804
|
__reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
7803
|
-
var Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7805
|
+
var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7804
7806
|
(0, import_web.setupHooks)({
|
|
7805
7807
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7806
7808
|
usePropsTransform(elementType, propsIn, hostRef) {
|
|
@@ -10091,7 +10093,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10091
10093
|
},
|
|
10092
10094
|
(0, import_react2.useCallback)(
|
|
10093
10095
|
(value) => {
|
|
10094
|
-
|
|
10096
|
+
at.current = value, scrollBridge.paneY = value;
|
|
10095
10097
|
},
|
|
10096
10098
|
[animationDriver]
|
|
10097
10099
|
)
|
|
@@ -10126,18 +10128,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10126
10128
|
}, [hasntMeasured, screenSize]), (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
10127
10129
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
10128
10130
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
10129
|
-
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core13.useThemeName)(), panResponder = (0, import_react2.useMemo)(
|
|
10131
|
+
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)(
|
|
10130
10132
|
() => {
|
|
10131
10133
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
10132
10134
|
return;
|
|
10133
10135
|
let minY = positions[0];
|
|
10134
10136
|
scrollBridge.paneMinY = minY;
|
|
10135
10137
|
let startY = at.current;
|
|
10136
|
-
function
|
|
10137
|
-
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 = "");
|
|
10138
|
+
function setPanning(val) {
|
|
10139
|
+
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 = "");
|
|
10138
10140
|
}
|
|
10139
10141
|
let release = ({ vy, dragAt }) => {
|
|
10140
|
-
isExternalDrag = !1, previouslyScrolling = !1,
|
|
10142
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
10141
10143
|
let end = dragAt + startY + frameSize * vy * 0.2, closestPoint = 0, dist = 1 / 0;
|
|
10142
10144
|
for (let i = 0; i < positions.length; i++) {
|
|
10143
10145
|
let position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -10153,7 +10155,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10153
10155
|
let isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
10154
10156
|
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp ? !1 : Math.abs(dy) > 5;
|
|
10155
10157
|
}, grant = () => {
|
|
10156
|
-
|
|
10158
|
+
setPanning(!0), stopSpring(), startY = at.current;
|
|
10157
10159
|
}, isExternalDrag = !1;
|
|
10158
10160
|
return scrollBridge.drag = (dy) => {
|
|
10159
10161
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
@@ -10176,14 +10178,20 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10176
10178
|
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
10177
10179
|
(e) => {
|
|
10178
10180
|
var _a;
|
|
10179
|
-
let next = (
|
|
10181
|
+
let next = Math.min(
|
|
10182
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10183
|
+
import_react_native4.Dimensions.get("window").height
|
|
10184
|
+
);
|
|
10180
10185
|
next && setFrameSize(next);
|
|
10181
10186
|
},
|
|
10182
10187
|
[keyboardIsVisible]
|
|
10183
10188
|
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
10184
10189
|
(e) => {
|
|
10185
10190
|
var _a;
|
|
10186
|
-
let next = (
|
|
10191
|
+
let next = Math.min(
|
|
10192
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10193
|
+
import_react_native4.Dimensions.get("window").height
|
|
10194
|
+
);
|
|
10187
10195
|
next && setMaxContentSize(next);
|
|
10188
10196
|
},
|
|
10189
10197
|
[keyboardIsVisible]
|
|
@@ -10243,6 +10251,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10243
10251
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
10244
10252
|
onLayout: handleAnimationViewLayout,
|
|
10245
10253
|
pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
|
|
10254
|
+
...!isDragging && {
|
|
10255
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
10256
|
+
animation
|
|
10257
|
+
},
|
|
10246
10258
|
style: [
|
|
10247
10259
|
{
|
|
10248
10260
|
position: "absolute",
|