@micromag/screen-game-sort 0.4.56 → 0.4.60
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/es/index.js +11 -7
- package/package.json +13 -13
package/es/index.js
CHANGED
|
@@ -240,6 +240,17 @@ function GameSort(_ref) {
|
|
|
240
240
|
}
|
|
241
241
|
}, [api]);
|
|
242
242
|
|
|
243
|
+
// Before :
|
|
244
|
+
// useEffect(() => {
|
|
245
|
+
// if (!isView) {
|
|
246
|
+
// return;
|
|
247
|
+
// }
|
|
248
|
+
|
|
249
|
+
// updateSpring(sortedItems, {
|
|
250
|
+
// initial: initialSortedItemsRef.current === sortedItems,
|
|
251
|
+
// });
|
|
252
|
+
// }, [sortedItems, itemsHeight]);
|
|
253
|
+
|
|
243
254
|
// useLayoutEffect runs AFTER react-spring's internal layout effect which
|
|
244
255
|
// resets springs to {y:0, scale:1}. We api.stop() the reset, then immediately
|
|
245
256
|
// re-apply the correct shuffled positions before the browser paints.
|
|
@@ -312,12 +323,6 @@ function GameSort(_ref) {
|
|
|
312
323
|
var sortedIndex = sortedItems.findIndex(function (it) {
|
|
313
324
|
return it === item;
|
|
314
325
|
});
|
|
315
|
-
|
|
316
|
-
// const heights = sortedItems.map((sortedItem) => {
|
|
317
|
-
// const elementIndex = items.findIndex((it) => it === sortedItem);
|
|
318
|
-
// return elementsRef.current[elementIndex]?.getBoundingClientRect()?.height || 0;
|
|
319
|
-
// });
|
|
320
|
-
|
|
321
326
|
var refs = sortedItems.map(function (it) {
|
|
322
327
|
return elementsRef.current[it.id] || null;
|
|
323
328
|
});
|
|
@@ -356,7 +361,6 @@ function GameSort(_ref) {
|
|
|
356
361
|
if (trackingEnabled) {
|
|
357
362
|
trackEvent('drag', "item_".concat(itemIndex));
|
|
358
363
|
}
|
|
359
|
-
// updateIndex(item, newIndex !== -1 ? newIndex : sortedIndex);
|
|
360
364
|
}
|
|
361
365
|
}, {
|
|
362
366
|
axis: 'y',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-game-sort",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.60",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -65,17 +65,17 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@babel/runtime": "^7.28.6",
|
|
68
|
-
"@micromag/core": "^0.4.
|
|
69
|
-
"@micromag/element-background": "^0.4.
|
|
70
|
-
"@micromag/element-button": "^0.4.
|
|
71
|
-
"@micromag/element-container": "^0.4.
|
|
72
|
-
"@micromag/element-footer": "^0.4.
|
|
73
|
-
"@micromag/element-header": "^0.4.
|
|
74
|
-
"@micromag/element-heading": "^0.4.
|
|
75
|
-
"@micromag/element-layout": "^0.4.
|
|
76
|
-
"@micromag/element-text": "^0.4.
|
|
77
|
-
"@micromag/element-visual": "^0.4.
|
|
78
|
-
"@micromag/transforms": "^0.4.
|
|
68
|
+
"@micromag/core": "^0.4.60",
|
|
69
|
+
"@micromag/element-background": "^0.4.60",
|
|
70
|
+
"@micromag/element-button": "^0.4.60",
|
|
71
|
+
"@micromag/element-container": "^0.4.60",
|
|
72
|
+
"@micromag/element-footer": "^0.4.60",
|
|
73
|
+
"@micromag/element-header": "^0.4.60",
|
|
74
|
+
"@micromag/element-heading": "^0.4.60",
|
|
75
|
+
"@micromag/element-layout": "^0.4.60",
|
|
76
|
+
"@micromag/element-text": "^0.4.60",
|
|
77
|
+
"@micromag/element-visual": "^0.4.60",
|
|
78
|
+
"@micromag/transforms": "^0.4.60",
|
|
79
79
|
"@react-spring/web": "^10.0.3",
|
|
80
80
|
"@use-gesture/react": "^10.3.0",
|
|
81
81
|
"classnames": "^2.2.6",
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "515ac855ce6094c26f37b1dbf413ee80064713e6",
|
|
91
91
|
"types": "es/index.d.ts"
|
|
92
92
|
}
|