@legendapp/list 2.0.6 → 2.0.7

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/.DS_Store ADDED
Binary file
package/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 2.0.7
2
+ - Fix: Layout not working on react-native-macos because of transform instead of position
3
+
1
4
  ## 2.0.6
2
5
  - Fix: updateItemPositions edge case with items multiple screen heights long was breaking the loop too early
3
6
 
package/index.js CHANGED
@@ -266,17 +266,13 @@ var PositionViewAnimated = typedMemo(function PositionView2({
266
266
  const position$ = useValue$(`containerPosition${id}`, {
267
267
  getValue: (v) => v != null ? v : POSITION_OUT_OF_VIEW
268
268
  });
269
- return /* @__PURE__ */ React2__namespace.createElement(
270
- reactNative.Animated.View,
271
- {
272
- ref: refView,
273
- style: [
274
- style,
275
- horizontal ? { transform: [{ translateX: position$ }] } : { transform: [{ translateY: position$ }] }
276
- ],
277
- ...rest
278
- }
279
- );
269
+ let position;
270
+ if (reactNative.Platform.OS === "ios" || reactNative.Platform.OS === "android") {
271
+ position = horizontal ? { transform: [{ translateX: position$ }] } : { transform: [{ translateY: position$ }] };
272
+ } else {
273
+ position = horizontal ? { left: position$ } : { top: position$ };
274
+ }
275
+ return /* @__PURE__ */ React2__namespace.createElement(reactNative.Animated.View, { ref: refView, style: [style, position], ...rest });
280
276
  });
281
277
  var PositionViewSticky = typedMemo(function PositionViewSticky2({
282
278
  id,
package/index.mjs CHANGED
@@ -245,17 +245,13 @@ var PositionViewAnimated = typedMemo(function PositionView2({
245
245
  const position$ = useValue$(`containerPosition${id}`, {
246
246
  getValue: (v) => v != null ? v : POSITION_OUT_OF_VIEW
247
247
  });
248
- return /* @__PURE__ */ React2.createElement(
249
- Animated.View,
250
- {
251
- ref: refView,
252
- style: [
253
- style,
254
- horizontal ? { transform: [{ translateX: position$ }] } : { transform: [{ translateY: position$ }] }
255
- ],
256
- ...rest
257
- }
258
- );
248
+ let position;
249
+ if (Platform.OS === "ios" || Platform.OS === "android") {
250
+ position = horizontal ? { transform: [{ translateX: position$ }] } : { transform: [{ translateY: position$ }] };
251
+ } else {
252
+ position = horizontal ? { left: position$ } : { top: position$ };
253
+ }
254
+ return /* @__PURE__ */ React2.createElement(Animated.View, { ref: refView, style: [style, position], ...rest });
259
255
  });
260
256
  var PositionViewSticky = typedMemo(function PositionViewSticky2({
261
257
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
5
5
  "sideEffects": false,
6
6
  "private": false,