@legendapp/list 3.0.0-beta.42 → 3.0.0-beta.44

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/animated.d.ts CHANGED
@@ -329,11 +329,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
329
329
  * Pairs of viewability configs and their callbacks for tracking visibility.
330
330
  */
331
331
  viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs<ItemT> | undefined;
332
- /**
333
- * If true, delays rendering until initial layout is complete.
334
- * @default false
335
- */
336
- waitForInitialLayout?: boolean;
337
332
  onLoad?: (info: {
338
333
  elapsedTimeInMs: number;
339
334
  }) => void;
package/index.d.ts CHANGED
@@ -402,11 +402,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
402
402
  * Pairs of viewability configs and their callbacks for tracking visibility.
403
403
  */
404
404
  viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs$1<ItemT> | undefined;
405
- /**
406
- * If true, delays rendering until initial layout is complete.
407
- * @default false
408
- */
409
- waitForInitialLayout?: boolean;
410
405
  onLoad?: (info: {
411
406
  elapsedTimeInMs: number;
412
407
  }) => void;
@@ -505,6 +500,43 @@ interface ScrollTarget$1 {
505
500
  viewOffset?: number;
506
501
  viewPosition?: number;
507
502
  }
503
+ type BootstrapInitialScrollSession = {
504
+ frameHandle?: number;
505
+ mountFrameCount: number;
506
+ passCount: number;
507
+ previousResolvedOffset?: number;
508
+ scroll: number;
509
+ seedContentOffset: number;
510
+ targetIndexSeed?: number;
511
+ visibleIndices?: readonly number[];
512
+ };
513
+ type InternalScrollTarget = ScrollTarget$1 & {
514
+ waitForInitialScrollCompletionFrame?: boolean;
515
+ };
516
+ type InitialScrollSessionCompletion = {
517
+ didDispatchNativeScroll?: boolean;
518
+ didRetrySilentInitialScroll?: boolean;
519
+ watchdog?: {
520
+ startScroll: number;
521
+ targetOffset: number;
522
+ };
523
+ };
524
+ interface InternalInitialScrollTarget extends ScrollIndexWithOffsetAndContentOffset$1 {
525
+ preserveForBottomPadding?: boolean;
526
+ preserveForFooterLayout?: boolean;
527
+ }
528
+ type InternalInitialScrollSessionBase = {
529
+ completion?: InitialScrollSessionCompletion;
530
+ previousDataLength: number;
531
+ };
532
+ type OffsetInitialScrollSession = InternalInitialScrollSessionBase & {
533
+ kind: "offset";
534
+ };
535
+ type BootstrapOwnedInitialScrollSession = InternalInitialScrollSessionBase & {
536
+ bootstrap?: BootstrapInitialScrollSession;
537
+ kind: "bootstrap";
538
+ };
539
+ type InternalInitialScrollSession = OffsetInitialScrollSession | BootstrapOwnedInitialScrollSession;
508
540
  interface InternalState$1 {
509
541
  activeStickyIndex: number | undefined;
510
542
  adjustingFromInitialMount?: number;
@@ -519,6 +551,7 @@ interface InternalState$1 {
519
551
  containerItemTypes: Map<number, string>;
520
552
  dataChangeEpoch: number;
521
553
  dataChangeNeedsScrollUpdate: boolean;
554
+ deferredPublicOnScrollEvent?: NativeSyntheticEvent$1<NativeScrollEvent$1>;
522
555
  didColumnsChange?: boolean;
523
556
  didDataChange?: boolean;
524
557
  didFinishInitialScroll?: boolean;
@@ -538,19 +571,8 @@ interface InternalState$1 {
538
571
  ignoreScrollFromMVCPIgnored?: boolean;
539
572
  ignoreScrollFromMVCPTimeout?: any;
540
573
  indexByKey: Map<string, number>;
541
- initialAnchor?: InitialScrollAnchor$1;
542
- initialNativeScrollWatchdog?: {
543
- startScroll: number;
544
- targetOffset: number;
545
- };
546
- initialScrollLastDidFinish: boolean;
547
- initialScrollLastTarget: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
548
- initialScrollLastTargetUsesOffset: boolean;
549
- initialScrollPreviousDataLength: number;
550
- initialScrollRetryLastLength: number | undefined;
551
- initialScrollRetryWindowUntil: number;
552
- initialScroll: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
553
- initialScrollUsesOffset: boolean;
574
+ initialScrollSession?: InternalInitialScrollSession;
575
+ initialScroll: InternalInitialScrollTarget | undefined;
554
576
  isAtEnd: boolean;
555
577
  isAtStart: boolean;
556
578
  isEndReached: boolean | null;
@@ -588,6 +610,7 @@ interface InternalState$1 {
588
610
  queuedCalculateItemsInView: number | undefined;
589
611
  queuedMVCPRecalculate?: number;
590
612
  queuedInitialLayout?: boolean | undefined;
613
+ reprocessCurrentScroll?: () => void;
591
614
  refScroller: React.RefObject<LegendListScrollerRef$1 | null>;
592
615
  scroll: number;
593
616
  scrollAdjustHandler: ScrollAdjustHandler;
@@ -599,7 +622,7 @@ interface InternalState$1 {
599
622
  scroll: number;
600
623
  time: number;
601
624
  }>;
602
- scrollingTo?: ScrollTarget$1 | undefined;
625
+ scrollingTo?: InternalScrollTarget | undefined;
603
626
  scrollLastCalculate?: number;
604
627
  scrollLength: number;
605
628
  scrollPending: number;
@@ -900,6 +923,7 @@ interface ScrollIndexWithOffsetPosition$1 extends ScrollIndexWithOffset$1 {
900
923
  interface ScrollIndexWithOffsetAndContentOffset$1 extends ScrollIndexWithOffsetPosition$1 {
901
924
  contentOffset?: number;
902
925
  }
926
+ /** @deprecated Kept for backwards compatibility. Use `ScrollIndexWithOffsetPosition`. */
903
927
  interface InitialScrollAnchor$1 extends ScrollIndexWithOffsetPosition$1 {
904
928
  attempts?: number;
905
929
  lastDelta?: number;
@@ -992,7 +1016,7 @@ type ScrollIndexWithOffset = ScrollIndexWithOffset$1;
992
1016
  type ScrollIndexWithOffsetPosition = ScrollIndexWithOffsetPosition$1;
993
1017
  /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
994
1018
  type ScrollIndexWithOffsetAndContentOffset = ScrollIndexWithOffsetAndContentOffset$1;
995
- /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1019
+ /** @deprecated Use `ScrollIndexWithOffsetPosition`, or `@legendapp/list/react-native` / `@legendapp/list/react` for strict typing */
996
1020
  type InitialScrollAnchor = InitialScrollAnchor$1;
997
1021
  /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
998
1022
  type GetRenderedItemResult<ItemT> = GetRenderedItemResult$1<ItemT>;