New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@infinite-list/data-model

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@infinite-list/data-model - npm Package Compare versions

Comparing version 0.2.45-recycle-group.38 to 0.2.45-recycle-group.39

dist/__test__/dist/ListDimensions.test.d.ts

4

dist/ListBaseDimensions.d.ts

@@ -112,2 +112,6 @@ import Batchinator from '@x-oasis/batchinator';

};
resolveRecycleItemLayout(info: any, indexToOffsetMap: any): {
offset: any;
length: any;
};
resolveRecycleRecycleState(state: ListState<ItemT>): any[];

@@ -114,0 +118,0 @@ resolveRecycleState(state: ListState<ItemT>): {

4

dist/vendor/IntegerBufferSet.d.ts

@@ -17,4 +17,4 @@ import Heap from '@x-oasis/heap';

getNewPositionForValue(value: number): number;
getMinValue(): number;
getMaxValue(): number;
getMinValue(): any;
getMaxValue(): any;
setPositionValue(position: number, value: number): void;

@@ -21,0 +21,0 @@ replaceFurthestValuePosition(lowValue: number, highValue: number, newValue: number, useMinValueFn?: (options: {

{
"name": "@infinite-list/data-model",
"version": "0.2.45-recycle-group.38",
"version": "0.2.45-recycle-group.39",
"files": [

@@ -5,0 +5,0 @@ "dist",

@@ -644,2 +644,56 @@ import noop from '@x-oasis/noop';

resolveRecycleItemLayout(info, indexToOffsetMap) {
const { meta: itemMeta, targetIndex } = info;
const itemLayout = itemMeta?.getLayout();
const itemLength =
(itemLayout?.height || 0) + (itemMeta?.getSeparatorLength() || 0);
if (
!itemMeta.isApproximateLayout &&
indexToOffsetMap[targetIndex] != null
) {
return {
offset: indexToOffsetMap[targetIndex],
length: itemLength,
};
}
const prevIndex = targetIndex - 1;
const prevMeta = this.getFinalIndexItemMeta(prevIndex);
if (!prevMeta?.isApproximateLayout) {
const prevOffset =
indexToOffsetMap[prevIndex] != null
? indexToOffsetMap[prevIndex]
: this.getFinalIndexKeyOffset(prevIndex) || 0;
const prevLayout = prevMeta?.getLayout();
const prevLength =
(prevLayout?.height || 0) + (prevMeta?.getSeparatorLength() || 0);
return {
offset: prevOffset + prevLength,
length: itemLength,
};
}
const nextIndex = targetIndex + 1;
const nextMeta = this.getFinalIndexItemMeta(nextIndex);
if (!nextMeta?.isApproximateLayout) {
const nextOffset =
indexToOffsetMap[nextIndex] != null
? indexToOffsetMap[nextIndex]
: this.getFinalIndexKeyOffset(nextIndex) || 0;
return {
offset: nextOffset - itemLength,
length: itemLength,
};
}
return {
length: itemLength,
offset: this.itemOffsetBeforeLayoutReady,
};
}
resolveRecycleRecycleState(state: ListState<ItemT>) {

@@ -716,5 +770,2 @@ const { visibleEndIndex, visibleStartIndex: _visibleStartIndex } = state;

const item = this.getData()[targetIndex];
const itemLayout = itemMeta?.getLayout();
const itemLength =
(itemLayout?.height || 0) + (itemMeta?.getSeparatorLength() || 0);

@@ -743,3 +794,2 @@ const itemMetaState =

targetIndex,
length: itemLength,
isSpace: false,

@@ -755,9 +805,4 @@ isSticky: false,

// 如果没有offset,说明item是新增的,那么它渲染就在最开始位置好了
offset:
itemLength && !itemMeta.isApproximateLayout
? indexToOffsetMap[targetIndex] == null
? this.itemOffsetBeforeLayoutReady
: indexToOffsetMap[targetIndex]
: this.itemOffsetBeforeLayoutReady,
position: 'buffered',
...this.resolveRecycleItemLayout(info, indexToOffsetMap),
});

@@ -764,0 +809,0 @@ });

@@ -515,3 +515,3 @@ import noop from '@x-oasis/noop';

if (this._approximateMode && !meta.isApproximateLayout) {
if (this._approximateMode && meta.isApproximateLayout) {
meta.setLayout({ x: 0, y: 0, height: 0, width: 0 });

@@ -518,0 +518,0 @@ this._selectValue.setLength(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc