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/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,15 @@ 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
|
+
if (!style)
|
|
3254
|
+
continue;
|
|
3255
|
+
let isRNW = style.$$css;
|
|
3256
|
+
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
3257
|
+
}
|
|
3255
3258
|
}
|
|
3256
3259
|
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3257
3260
|
}, useSplitStyles = (...args) => {
|
|
@@ -7794,13 +7797,14 @@ var require_index_native15 = __commonJS({
|
|
|
7794
7797
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
7795
7798
|
__export2(src_exports2, {
|
|
7796
7799
|
Stack: () => Stack3,
|
|
7797
|
-
Text: () => Text3
|
|
7800
|
+
Text: () => Text3,
|
|
7801
|
+
View: () => View2
|
|
7798
7802
|
});
|
|
7799
7803
|
module2.exports = __toCommonJS2(src_exports2);
|
|
7800
7804
|
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
7805
|
__reExport2(src_exports2, require_index_native9(), module2.exports);
|
|
7802
7806
|
__reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
7803
|
-
var Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7807
|
+
var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7804
7808
|
(0, import_web.setupHooks)({
|
|
7805
7809
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7806
7810
|
usePropsTransform(elementType, propsIn, hostRef) {
|
|
@@ -10091,7 +10095,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10091
10095
|
},
|
|
10092
10096
|
(0, import_react2.useCallback)(
|
|
10093
10097
|
(value) => {
|
|
10094
|
-
|
|
10098
|
+
at.current = value, scrollBridge.paneY = value;
|
|
10095
10099
|
},
|
|
10096
10100
|
[animationDriver]
|
|
10097
10101
|
)
|
|
@@ -10126,18 +10130,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10126
10130
|
}, [hasntMeasured, screenSize]), (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
10127
10131
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
10128
10132
|
}, [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)(
|
|
10133
|
+
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
10134
|
() => {
|
|
10131
10135
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
10132
10136
|
return;
|
|
10133
10137
|
let minY = positions[0];
|
|
10134
10138
|
scrollBridge.paneMinY = minY;
|
|
10135
10139
|
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 = "");
|
|
10140
|
+
function setPanning(val) {
|
|
10141
|
+
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
10142
|
}
|
|
10139
10143
|
let release = ({ vy, dragAt }) => {
|
|
10140
|
-
isExternalDrag = !1, previouslyScrolling = !1,
|
|
10144
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
10141
10145
|
let end = dragAt + startY + frameSize * vy * 0.2, closestPoint = 0, dist = 1 / 0;
|
|
10142
10146
|
for (let i = 0; i < positions.length; i++) {
|
|
10143
10147
|
let position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -10153,7 +10157,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10153
10157
|
let isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
10154
10158
|
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp ? !1 : Math.abs(dy) > 5;
|
|
10155
10159
|
}, grant = () => {
|
|
10156
|
-
|
|
10160
|
+
setPanning(!0), stopSpring(), startY = at.current;
|
|
10157
10161
|
}, isExternalDrag = !1;
|
|
10158
10162
|
return scrollBridge.drag = (dy) => {
|
|
10159
10163
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
@@ -10176,14 +10180,20 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10176
10180
|
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
10177
10181
|
(e) => {
|
|
10178
10182
|
var _a;
|
|
10179
|
-
let next = (
|
|
10183
|
+
let next = Math.min(
|
|
10184
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10185
|
+
import_react_native4.Dimensions.get("window").height
|
|
10186
|
+
);
|
|
10180
10187
|
next && setFrameSize(next);
|
|
10181
10188
|
},
|
|
10182
10189
|
[keyboardIsVisible]
|
|
10183
10190
|
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
10184
10191
|
(e) => {
|
|
10185
10192
|
var _a;
|
|
10186
|
-
let next = (
|
|
10193
|
+
let next = Math.min(
|
|
10194
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10195
|
+
import_react_native4.Dimensions.get("window").height
|
|
10196
|
+
);
|
|
10187
10197
|
next && setMaxContentSize(next);
|
|
10188
10198
|
},
|
|
10189
10199
|
[keyboardIsVisible]
|
|
@@ -10243,6 +10253,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10243
10253
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
10244
10254
|
onLayout: handleAnimationViewLayout,
|
|
10245
10255
|
pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
|
|
10256
|
+
...!isDragging && {
|
|
10257
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
10258
|
+
animation
|
|
10259
|
+
},
|
|
10246
10260
|
style: [
|
|
10247
10261
|
{
|
|
10248
10262
|
position: "absolute",
|