tamagui 1.79.7 → 1.79.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 +22 -11
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +22 -11
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
package/dist/native.js
CHANGED
|
@@ -2654,7 +2654,10 @@ var require_propMapper_native = __commonJS({
|
|
|
2654
2654
|
return;
|
|
2655
2655
|
if (value === "unset") {
|
|
2656
2656
|
let unsetVal = (_a = styleStateIn.conf.unset) == null ? void 0 : _a[key];
|
|
2657
|
-
unsetVal != null
|
|
2657
|
+
if (unsetVal != null)
|
|
2658
|
+
value = unsetVal;
|
|
2659
|
+
else
|
|
2660
|
+
return;
|
|
2658
2661
|
}
|
|
2659
2662
|
let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
|
|
2660
2663
|
get(_, k) {
|
|
@@ -2985,7 +2988,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2985
2988
|
parentStaticConfig
|
|
2986
2989
|
}), console.groupEnd()), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
2987
2990
|
continue;
|
|
2988
|
-
if (isText && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
2991
|
+
if (isText && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && valInit !== "unset" && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
2989
2992
|
style[keyInit] = valInit;
|
|
2990
2993
|
continue;
|
|
2991
2994
|
}
|
|
@@ -10407,7 +10410,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
10407
10410
|
});
|
|
10408
10411
|
module2.exports = __toCommonJS2(SheetScrollView_exports);
|
|
10409
10412
|
var import_core13 = require_index_native15(), import_scroll_view = require_index_native33(), import_react2 = require("react"), import_SheetContext = require_SheetContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = (0, import_react2.forwardRef)(
|
|
10410
|
-
({ __scopeSheet, children, ...props }, ref) => {
|
|
10413
|
+
({ __scopeSheet, children, onScroll, ...props }, ref) => {
|
|
10411
10414
|
let context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = (0, import_react2.useRef)(null), state = (0, import_react2.useRef)({
|
|
10412
10415
|
lastPageY: 0,
|
|
10413
10416
|
dragAt: 0,
|
|
@@ -10437,7 +10440,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
10437
10440
|
scrollEventThrottle: 8,
|
|
10438
10441
|
onScroll: (e) => {
|
|
10439
10442
|
let { y } = e.nativeEvent.contentOffset;
|
|
10440
|
-
scrollBridge.y = y, y > 0 && (scrollBridge.scrollStartY = -1);
|
|
10443
|
+
scrollBridge.y = y, y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
10441
10444
|
},
|
|
10442
10445
|
onStartShouldSetResponder: () => (scrollBridge.scrollStartY = -1, state.current.isDragging = !0, !0),
|
|
10443
10446
|
onMoveShouldSetResponder: () => !1,
|
|
@@ -17230,8 +17233,8 @@ var require_SliderImpl_native = __commonJS({
|
|
|
17230
17233
|
onStartShouldSetResponder: () => !0,
|
|
17231
17234
|
onResponderTerminationRequest: () => !1,
|
|
17232
17235
|
onResponderGrant: (0, import_core13.composeEventHandlers)(props.onResponderGrant, (event) => {
|
|
17233
|
-
let target = event.target,
|
|
17234
|
-
import_core13.isWeb && target instanceof HTMLElement && context.thumbs.has(target) && target.focus(), onSlideStart(event, isStartingOnThumb ? "thumb" : "track");
|
|
17236
|
+
let target = event.target, thumbIndex = context.thumbs.get(target), isStartingOnThumb = thumbIndex !== void 0;
|
|
17237
|
+
import_core13.isWeb && target instanceof HTMLElement && context.thumbs.has(target) && target.focus(), !import_core13.isWeb && isStartingOnThumb && (context.valueIndexToChangeRef.current = thumbIndex), onSlideStart(event, isStartingOnThumb ? "thumb" : "track");
|
|
17235
17238
|
}),
|
|
17236
17239
|
onResponderMove: (0, import_core13.composeEventHandlers)(props.onResponderMove, (event) => {
|
|
17237
17240
|
event.stopPropagation(), onSlideMove(event);
|
|
@@ -17518,10 +17521,10 @@ var require_Slider_native = __commonJS({
|
|
|
17518
17521
|
), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers2.getLabel)(index, context.values.length), sizeIn = sizeProp ?? context.size ?? "$true", [size2, setSize] = React2.useState(() => (0, import_core13.getVariableValue)(getThumbSize(sizeIn).width)), thumbInBoundsOffset = size2 ? (0, import_helpers2.getThumbInBoundsOffset)(size2, percent, orientation.direction) : 0;
|
|
17519
17522
|
React2.useEffect(() => {
|
|
17520
17523
|
if (thumb)
|
|
17521
|
-
return context.thumbs.
|
|
17524
|
+
return context.thumbs.set(thumb, index), () => {
|
|
17522
17525
|
context.thumbs.delete(thumb);
|
|
17523
17526
|
};
|
|
17524
|
-
}, [thumb, context.thumbs]);
|
|
17527
|
+
}, [thumb, context.thumbs, index]);
|
|
17525
17528
|
let positionalStyles = context.orientation === "horizontal" ? {
|
|
17526
17529
|
x: thumbInBoundsOffset - size2 / 2,
|
|
17527
17530
|
y: -size2 / 2,
|
|
@@ -17584,13 +17587,12 @@ var require_Slider_native = __commonJS({
|
|
|
17584
17587
|
onSlideMove,
|
|
17585
17588
|
onSlideStart,
|
|
17586
17589
|
...sliderProps
|
|
17587
|
-
} = props, sliderRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef), thumbRefs = React2.useRef(/* @__PURE__ */ new
|
|
17590
|
+
} = props, sliderRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef), thumbRefs = React2.useRef(/* @__PURE__ */ new Map()), valueIndexToChangeRef = React2.useRef(0), isHorizontal = orientation === "horizontal", [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
|
|
17588
17591
|
prop: value,
|
|
17589
17592
|
defaultProp: defaultValue,
|
|
17590
17593
|
transition: !0,
|
|
17591
17594
|
onChange: (value2) => {
|
|
17592
|
-
|
|
17593
|
-
import_core13.isWeb && ((_a = [...thumbRefs.current][valueIndexToChangeRef.current]) == null || _a.focus()), onValueChange(value2);
|
|
17595
|
+
updateThumbFocus(valueIndexToChangeRef.current), onValueChange(value2);
|
|
17594
17596
|
}
|
|
17595
17597
|
});
|
|
17596
17598
|
import_core13.isWeb && React2.useEffect(() => {
|
|
@@ -17604,6 +17606,15 @@ var require_Slider_native = __commonJS({
|
|
|
17604
17606
|
node.removeEventListener("touchstart", preventDefault);
|
|
17605
17607
|
};
|
|
17606
17608
|
}, []);
|
|
17609
|
+
function updateThumbFocus(focusIndex) {
|
|
17610
|
+
if (import_core13.isWeb) {
|
|
17611
|
+
for (let [node, index] of thumbRefs.current.entries())
|
|
17612
|
+
if (index === focusIndex) {
|
|
17613
|
+
node.focus();
|
|
17614
|
+
return;
|
|
17615
|
+
}
|
|
17616
|
+
}
|
|
17617
|
+
}
|
|
17607
17618
|
function handleSlideMove(value2, event) {
|
|
17608
17619
|
updateValues(value2, valueIndexToChangeRef.current), onSlideMove == null || onSlideMove(event, value2);
|
|
17609
17620
|
}
|