@legendapp/list 3.0.3 → 3.0.5

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/reanimated.d.ts CHANGED
@@ -389,12 +389,22 @@ interface MaintainVisibleContentPositionConfig<ItemT = any> {
389
389
  size?: boolean;
390
390
  shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
391
391
  }
392
+ interface AnchoredEndSpaceReadyInfo {
393
+ anchorIndex: number | undefined;
394
+ anchorKey: string | undefined;
395
+ size: number;
396
+ }
397
+ interface ScrollToEndOptions {
398
+ animated?: boolean;
399
+ viewOffset?: number;
400
+ }
392
401
  interface AnchoredEndSpaceConfig {
393
402
  anchorIndex: number;
394
403
  anchorOffset?: number;
395
404
  anchorMaxSize?: number;
396
405
  includeInEndInset?: boolean;
397
406
  onSizeChanged?: (size: number) => void;
407
+ onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
398
408
  }
399
409
  interface StickyHeaderConfig {
400
410
  /**
@@ -526,10 +536,7 @@ type LegendListRef$1 = {
526
536
  * @param options.animated - If true, animates the scroll. Default: true.
527
537
  * @param options.viewOffset - Offset from the target position.
528
538
  */
529
- scrollToEnd(options?: {
530
- animated?: boolean | undefined;
531
- viewOffset?: number | undefined;
532
- }): Promise<void>;
539
+ scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
533
540
  /**
534
541
  * Scrolls to a specific index in the list.
535
542
  * @param params - Parameters for scrolling.
package/section-list.d.ts CHANGED
@@ -445,12 +445,22 @@ interface MaintainVisibleContentPositionConfig<ItemT = any> {
445
445
  size?: boolean;
446
446
  shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
447
447
  }
448
+ interface AnchoredEndSpaceReadyInfo {
449
+ anchorIndex: number | undefined;
450
+ anchorKey: string | undefined;
451
+ size: number;
452
+ }
453
+ interface ScrollToEndOptions {
454
+ animated?: boolean;
455
+ viewOffset?: number;
456
+ }
448
457
  interface AnchoredEndSpaceConfig {
449
458
  anchorIndex: number;
450
459
  anchorOffset?: number;
451
460
  anchorMaxSize?: number;
452
461
  includeInEndInset?: boolean;
453
462
  onSizeChanged?: (size: number) => void;
463
+ onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
454
464
  }
455
465
  interface StickyHeaderConfig {
456
466
  /**
@@ -582,10 +592,7 @@ type LegendListRef$1 = {
582
592
  * @param options.animated - If true, animates the scroll. Default: true.
583
593
  * @param options.viewOffset - Offset from the target position.
584
594
  */
585
- scrollToEnd(options?: {
586
- animated?: boolean | undefined;
587
- viewOffset?: number | undefined;
588
- }): Promise<void>;
595
+ scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
589
596
  /**
590
597
  * Scrolls to a specific index in the list.
591
598
  * @param params - Parameters for scrolling.