@ng-native/components 0.28.0 → 0.30.0

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.
Files changed (123) hide show
  1. package/README.md +2 -2
  2. package/android/src/main/java/dev/ngnative/components/ColorSchemeModule.kt +116 -11
  3. package/dist/activity-indicator.js +3 -3
  4. package/dist/animated-style.js +3 -3
  5. package/dist/animations-web.js +3 -3
  6. package/dist/animations.js +3 -3
  7. package/dist/content-container.js +3 -3
  8. package/dist/context-menu.js +3 -3
  9. package/dist/drag-and-drop.js +6 -6
  10. package/dist/gestures-web.js +6 -6
  11. package/dist/gestures.js +6 -6
  12. package/dist/gradient-text.d.ts +1 -1
  13. package/dist/gradient-text.js +4 -4
  14. package/dist/gradient-text.js.map +1 -1
  15. package/dist/image-background.js +3 -3
  16. package/dist/image.js +3 -3
  17. package/dist/index.d.ts +3 -2
  18. package/dist/index.js +3 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/input-accessory-view.js +3 -3
  21. package/dist/keyboard-avoiding-view.js +3 -3
  22. package/dist/keyboard-dock.js +15 -15
  23. package/dist/markdown-blocks.d.ts +2 -1
  24. package/dist/markdown-blocks.js +22 -18
  25. package/dist/markdown-blocks.js.map +1 -1
  26. package/dist/markdown-columns.js +3 -3
  27. package/dist/markdown-stream.js +8 -5
  28. package/dist/markdown-stream.js.map +1 -1
  29. package/dist/markdown.js +5 -5
  30. package/dist/markdown.js.map +1 -1
  31. package/dist/menu.d.ts +11 -5
  32. package/dist/menu.js +24 -44
  33. package/dist/menu.js.map +1 -1
  34. package/dist/modal.js +8 -3
  35. package/dist/modal.js.map +1 -1
  36. package/dist/native-button.d.ts +25 -3
  37. package/dist/native-button.js +102 -8
  38. package/dist/native-button.js.map +1 -1
  39. package/dist/native-gesture.js +3 -3
  40. package/dist/native-ref.js +3 -3
  41. package/dist/press-menu.d.ts +38 -8
  42. package/dist/press-menu.js +80 -19
  43. package/dist/press-menu.js.map +1 -1
  44. package/dist/pressable.js +14 -13
  45. package/dist/pressable.js.map +1 -1
  46. package/dist/reanimated-web.js +6 -6
  47. package/dist/reanimated.js +6 -6
  48. package/dist/refresh-control.js +3 -3
  49. package/dist/safe-area-provider.js +3 -3
  50. package/dist/safe-area-view.js +3 -3
  51. package/dist/scroll-view-props.js +3 -3
  52. package/dist/scroll-view.d.ts +3 -1
  53. package/dist/scroll-view.js +10 -5
  54. package/dist/scroll-view.js.map +1 -1
  55. package/dist/section-list.d.ts +4 -4
  56. package/dist/section-list.js +37 -34
  57. package/dist/section-list.js.map +1 -1
  58. package/dist/shortcut.js +3 -3
  59. package/dist/sidebar-item.js +3 -3
  60. package/dist/sidebar-section.d.ts +12 -5
  61. package/dist/sidebar-section.js +32 -12
  62. package/dist/sidebar-section.js.map +1 -1
  63. package/dist/sidebar.d.ts +11 -3
  64. package/dist/sidebar.js +18 -8
  65. package/dist/sidebar.js.map +1 -1
  66. package/dist/split-view.d.ts +23 -2
  67. package/dist/split-view.js +36 -9
  68. package/dist/split-view.js.map +1 -1
  69. package/dist/stand-ins/animations.js +3 -3
  70. package/dist/sticky-headers.d.ts +19 -0
  71. package/dist/sticky-headers.js +67 -10
  72. package/dist/sticky-headers.js.map +1 -1
  73. package/dist/sticky-rows.d.ts +13 -11
  74. package/dist/sticky-rows.js +35 -21
  75. package/dist/sticky-rows.js.map +1 -1
  76. package/dist/svg-icon.d.ts +16 -2
  77. package/dist/svg-icon.js +19 -3
  78. package/dist/svg-icon.js.map +1 -1
  79. package/dist/switch.js +3 -3
  80. package/dist/template-slot.js +3 -3
  81. package/dist/text-input.js +3 -3
  82. package/dist/text.js +3 -3
  83. package/dist/touchable-opacity.js +3 -3
  84. package/dist/tray-icon.d.ts +7 -1
  85. package/dist/tray-icon.js +17 -5
  86. package/dist/tray-icon.js.map +1 -1
  87. package/dist/view-base.d.ts +18 -2
  88. package/dist/view-base.js +42 -10
  89. package/dist/view-base.js.map +1 -1
  90. package/dist/view.js +3 -3
  91. package/dist/virtual-list-layout.d.ts +5 -0
  92. package/dist/virtual-list-layout.js.map +1 -1
  93. package/dist/virtual-list-num-columns.d.ts +8 -4
  94. package/dist/virtual-list-num-columns.js +13 -5
  95. package/dist/virtual-list-num-columns.js.map +1 -1
  96. package/dist/virtual-list-sticky-level.d.ts +0 -6
  97. package/dist/virtual-list-sticky-level.js +5 -29
  98. package/dist/virtual-list-sticky-level.js.map +1 -1
  99. package/dist/virtual-list.d.ts +72 -11
  100. package/dist/virtual-list.js +285 -74
  101. package/dist/virtual-list.js.map +1 -1
  102. package/dist/visual-effect.d.ts +37 -0
  103. package/dist/visual-effect.js +60 -0
  104. package/dist/visual-effect.js.map +1 -0
  105. package/dist/worklet-scroll.js +3 -3
  106. package/dist/worklet-style.js +3 -3
  107. package/dist/written-props.js +9 -0
  108. package/dist/written-props.js.map +1 -1
  109. package/ios/NgNativeButtonComponentView.mm +8 -4
  110. package/ios/NgNativeButtonMetrics.h +9 -2
  111. package/ios/NgNativeButtonMetrics.mm +33 -4
  112. package/ios/NgNativeButtonShadowNode.h +2 -0
  113. package/ios/NgNativeButtonShadowNode.mm +5 -1
  114. package/ios/NgNativeComponents.podspec +2 -2
  115. package/ios/NgNativeKeyboardFocus.h +21 -0
  116. package/ios/NgNativeKeyboardFocus.mm +28 -0
  117. package/ios/NgNativeKeyboardFocusModule.mm +203 -0
  118. package/ios/NgNativeMenus.mm +62 -2
  119. package/ios/NgNativePressMenu.h +36 -0
  120. package/ios/NgNativePressMenu.mm +79 -0
  121. package/ios/NgNativeViewBinder.h +5 -0
  122. package/ios/NgNativeViewBinder.mm +31 -4
  123. package/package.json +6 -6
@@ -1,5 +1,6 @@
1
1
  import { Component, DestroyRef, Directive, ElementRef, TemplateRef, afterEveryRender, booleanAttribute, computed, contentChild, effect, inject, input, linkedSignal, output, signal, untracked, viewChild, } from '@angular/core';
2
- import { nativePlatform, } from '@ng-native/fabric';
2
+ import { nativePlatform, nextFrame, } from '@ng-native/fabric';
3
+ import { IN_FORM_SHEET } from '@ng-native/device';
3
4
  import { HeightIndex } from "./height-index.js";
4
5
  import { dismissKeyboardOnTap } from "./keyboard-taps.js";
5
6
  import { RefreshControl } from "./refresh-control.js";
@@ -21,10 +22,10 @@ export class VirtualListSeparator {
21
22
  static ngTemplateContextGuard(_directive, context) {
22
23
  return true;
23
24
  }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualListSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.0", type: VirtualListSeparator, isStandalone: true, selector: "ng-template[virtualListSeparator]", ngImport: i0 });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualListSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
26
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: VirtualListSeparator, isStandalone: true, selector: "ng-template[virtualListSeparator]", ngImport: i0 });
26
27
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualListSeparator, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualListSeparator, decorators: [{
28
29
  type: Directive,
29
30
  args: [{ selector: 'ng-template[virtualListSeparator]' }]
30
31
  }] });
@@ -54,6 +55,22 @@ const HOLD_TOLERANCE = 0.5;
54
55
  const FILL_BATCH_MS = 50;
55
56
  /** How long without a scroll event counts as the scroll having stopped. */
56
57
  const PAUSE_MS = 200;
58
+ /**
59
+ * How long a scroll the app makes waits for the render its handler schedules. Angular starts that
60
+ * from a timer of zero or the next frame, whichever is first, so this one is due after it.
61
+ */
62
+ const ASKED_MS = 50;
63
+ /**
64
+ * Wait until Android has mounted what was rendered in this task. Its views are queued by the time
65
+ * the first frame's callback runs, and each frame mounts them before it runs any callback, so
66
+ * they are mounted by the second's.
67
+ */
68
+ const framesToMount = async () => {
69
+ await nextFrame();
70
+ await nextFrame();
71
+ };
72
+ /** No row takes a line to itself but the sticky ones. */
73
+ const noFullLine = () => false;
57
74
  /**
58
75
  * Windowed list: a native scroll view whose content is sized to the full list, with only the
59
76
  * visible slice rendered. Commits as `RCTScrollView`.
@@ -205,6 +222,8 @@ export class VirtualList extends ScrollViewProps {
205
222
  * after the list has scrolled away from the end and come back.
206
223
  */
207
224
  endReached = output();
225
+ /** The content's size changed: the header, the rows and the footer together, as `<scroll-view>` reports its own. */
226
+ contentSizeChange = output();
208
227
  /** Which rows are on screen, and what changed since last time. */
209
228
  viewableItemsChanged = output();
210
229
  viewport = signal(0, /* @ts-ignore */
@@ -227,8 +246,9 @@ export class VirtualList extends ScrollViewProps {
227
246
  ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
228
247
  refreshControl = contentChild(RefreshControl, /* @ts-ignore */
229
248
  ...(ngDevMode ? [{ debugName: "refreshControl" }] : /* istanbul ignore next */ []));
230
- /** See ScrollView: inside Android's swipe layout the list must see a drag first. */
231
- nestedScroll = computed(() => nativePlatform() === 'android' && this.refreshControl() ? true : undefined, /* @ts-ignore */
249
+ inSheet = inject(IN_FORM_SHEET);
250
+ /** See ScrollView: inside Android's swipe layout or a form sheet the list must see a drag first. */
251
+ nestedScroll = computed(() => nativePlatform() === 'android' && (this.inSheet || this.refreshControl()) ? true : undefined, /* @ts-ignore */
232
252
  ...(ngDevMode ? [{ debugName: "nestedScroll" }] : /* istanbul ignore next */ []));
233
253
  /** Viewports filled past the overscan, before and after the visible rows in index order. */
234
254
  fill = signal({ before: 0, after: 0 }, /* @ts-ignore */
@@ -305,21 +325,25 @@ export class VirtualList extends ScrollViewProps {
305
325
  const columns = this.columns();
306
326
  if (columns === 1)
307
327
  return null;
308
- const count = this.items().length;
328
+ const items = this.items();
329
+ const count = items.length;
309
330
  const sticky = this.sticky.rows();
331
+ const fullLine = this.columnLayout?.fullLineOf?.() ?? noFullLine;
310
332
  const of = new Int32Array(count);
333
+ const alone = new Uint8Array(count);
311
334
  const starts = [];
312
335
  let column = columns;
313
336
  for (let i = 0; i < count; i++) {
314
- const alone = sticky.has(i);
315
- if (alone || column === columns) {
337
+ const own = sticky.has(i) || fullLine(items[i], i);
338
+ if (own || column === columns) {
316
339
  starts.push(i);
317
340
  column = 0;
318
341
  }
319
342
  of[i] = starts.length - 1;
320
- column = alone ? columns : column + 1;
343
+ alone[i] = own ? 1 : 0;
344
+ column = own ? columns : column + 1;
321
345
  }
322
- return { of, starts };
346
+ return { of, starts, alone };
323
347
  }, /* @ts-ignore */
324
348
  ...(ngDevMode ? [{ debugName: "lines" }] : /* istanbul ignore next */ []));
325
349
  /** The props across each column, built once per change of columns, gap or padding. */
@@ -334,7 +358,7 @@ export class VirtualList extends ScrollViewProps {
334
358
  /** An item's insets across the axis: its column's, or the whole width's. */
335
359
  acrossOf(index) {
336
360
  const lines = this.lines();
337
- if (!lines || this.sticky.rows().has(index))
361
+ if (!lines || lines.alone[index] === 1)
338
362
  return this.across();
339
363
  return this.columnAcross()[index - lines.starts[lines.of[index]]];
340
364
  }
@@ -526,6 +550,19 @@ export class VirtualList extends ScrollViewProps {
526
550
  * rows' own space, after the header, or the very start of the list.
527
551
  */
528
552
  pendingScroll = null;
553
+ /**
554
+ * The app's last scroll, kept for the render its handler schedules. Native makes the scroll with
555
+ * the rows it has, and that render may be what gives the list its new ones.
556
+ */
557
+ asked = null;
558
+ askedTimer;
559
+ /** The rows' extent at the last render, and what native is sure to have mounted of it. */
560
+ renderedExtent = 0;
561
+ mountedExtent = 0;
562
+ /** Counts the times the rows got shorter, after which an earlier render's extent is stale. */
563
+ shortened = 0;
564
+ /** Counts the scrolls sent, so one waiting to be made again gives way to what came after it. */
565
+ scrollsSent = 0;
529
566
  /** What moves the rows: which items, and where each one is. */
530
567
  placement = computed(() => ({
531
568
  items: this.items(),
@@ -619,6 +656,9 @@ export class VirtualList extends ScrollViewProps {
619
656
  heldIndex(anchor, items) {
620
657
  if (items === anchor.items)
621
658
  return anchor.index;
659
+ // Already at the offset the app asked for, which is where it wants the new items seen from.
660
+ if (this.asked?.command === 'scrollTo' && !this.asked.animated)
661
+ return -1;
622
662
  const hold = this.maintainVisibleContentPosition();
623
663
  if (!hold)
624
664
  return -1;
@@ -656,16 +696,54 @@ export class VirtualList extends ScrollViewProps {
656
696
  }
657
697
  return -1;
658
698
  }
659
- /** Make a queued correction, after the commit that moved the rows has gone to native. */
699
+ /**
700
+ * Make a queued correction, after the commit that moved the rows has gone to native, and then
701
+ * the app's scroll again when the correction would undo it, or when it was to past the end the
702
+ * new items have. A jump takes the correction's place; an animation starts from it.
703
+ */
660
704
  flushScroll() {
661
705
  const pending = this.pendingScroll;
662
- if (!pending)
706
+ const asked = this.asked;
707
+ if (!pending && !asked)
663
708
  return;
664
709
  this.pendingScroll = null;
665
- if (pending === 'start')
666
- this.scrollToOffset({ offset: 0, animated: true });
667
- else
668
- this.scrollToOffset({ offset: this.headerHeight() + pending.offset, animated: false });
710
+ this.forgetAsked();
711
+ if (pending && (!asked || asked.animated)) {
712
+ // A jump when the app's animation follows, which would replace one to the start.
713
+ if (pending === 'start')
714
+ this.sendScrollTo(0, !asked);
715
+ else
716
+ this.sendScrollTo(this.headerHeight() + pending.offset, false);
717
+ }
718
+ if (asked && (pending || this.endsBefore(asked)))
719
+ asked.send();
720
+ }
721
+ /** Whether the items given since a scroll end before where it was going. */
722
+ endsBefore({ items, landing }) {
723
+ const end = Math.max(0, this.extent() - this.viewport());
724
+ return items !== this.items() && landing > end + HOLD_TOLERANCE;
725
+ }
726
+ /**
727
+ * Keep a scroll the app made, to `offset`, for the next render. A jump is there already, so the
728
+ * list is too. An animation has yet to leave: the rows stay those on screen, and follow it.
729
+ */
730
+ ask(scroll, offset) {
731
+ this.forgetAsked();
732
+ // Nothing is corrected before the first layout, and native may have no view to scroll.
733
+ if (this.viewport() <= 0)
734
+ return;
735
+ // Only its end stops it: an inset before the rows puts native above zero.
736
+ const landing = Math.min(offset, this.reachable(offset)) - this.headerHeight();
737
+ this.asked = { ...scroll, landing, items: this.items() };
738
+ this.askedTimer = setTimeout(() => this.forgetAsked(), ASKED_MS);
739
+ if (scroll.animated)
740
+ return;
741
+ this.lastOffset = landing;
742
+ this.anchorAt(this.indexAt(landing), landing);
743
+ }
744
+ forgetAsked() {
745
+ clearTimeout(this.askedTimer);
746
+ this.asked = null;
669
747
  }
670
748
  /** In development, a list with rows that stays at zero size; see `ZeroSizeWarning`. */
671
749
  zeroSize = checksZeroSize()
@@ -675,6 +753,7 @@ export class VirtualList extends ScrollViewProps {
675
753
  super();
676
754
  afterEveryRender(() => {
677
755
  this.flushScroll();
756
+ this.trackMounted();
678
757
  if (this.sticky.native)
679
758
  this.driveStickyRows();
680
759
  this.recheckItems();
@@ -690,6 +769,8 @@ export class VirtualList extends ScrollViewProps {
690
769
  this.sticky.destroy();
691
770
  clearTimeout(this.fillTimer);
692
771
  clearTimeout(this.speedTimer);
772
+ this.forgetAsked();
773
+ this.scrollsSent++;
693
774
  this.zeroSize?.stop();
694
775
  });
695
776
  if (this.zeroSize)
@@ -804,23 +885,56 @@ export class VirtualList extends ScrollViewProps {
804
885
  */
805
886
  spacer = computed(() => {
806
887
  const span = this.span();
807
- let lead = span ? this.topOf(span.first) : 0;
808
- const [pinned] = this.sticky.pinned();
809
- if (span && pinned !== undefined && pinned < span.first) {
810
- lead = this.sticky.native ? this.topOf(pinned) : lead - this.heightOf(pinned) - this.rowGap();
811
- }
812
- return this.horizontal() ? { width: Math.max(0, lead) } : { height: Math.max(0, lead) };
888
+ const lead = span ? Math.max(0, this.flowStart(span.first, this.rendersAhead())) : 0;
889
+ return this.horizontal() ? { width: lead } : { height: lead };
813
890
  }, /* @ts-ignore */
814
891
  ...(ngDevMode ? [{ debugName: "spacer" }] : /* istanbul ignore next */ []));
815
- /** The rows from `first` up to `last`, and the pinned rows above them if there are any. */
892
+ /**
893
+ * Where the first row rendered in flow starts: `first`'s place, less each row rendered ahead of
894
+ * it, or where native moves them, the first of those rows' own place. Less than nothing where a
895
+ * negative gap overlaps the rows not rendered, which the spacer cannot be: the first row takes
896
+ * the rest as a margin (`rowsFor`).
897
+ */
898
+ flowStart(first, ahead) {
899
+ if (this.sticky.native && ahead.length > 0)
900
+ return this.topOf(ahead[0]);
901
+ let start = this.topOf(first);
902
+ for (const index of ahead)
903
+ start -= this.heightOf(index) + this.rowGap();
904
+ return start;
905
+ }
906
+ /**
907
+ * The rows rendered ahead of the window: the pinned rows it has left behind, and where native
908
+ * moves rows in flow, the row before each pinned row after the outermost. Flow places a row
909
+ * after the row before it, so with that row rendered too, a pinned row is at its own place
910
+ * with no margin of its own, and its props stay as they are as the window moves past it.
911
+ */
912
+ rendersAhead = computed(() => {
913
+ const span = this.span();
914
+ if (!span)
915
+ return [];
916
+ const pinned = this.sticky.pinned();
917
+ const ahead = new Set(pinned.filter((index) => index < span.first));
918
+ if (this.sticky.native && this.measuring()) {
919
+ for (const index of pinned.slice(1)) {
920
+ if (index <= span.first && index - 1 < span.first)
921
+ ahead.add(index - 1);
922
+ }
923
+ }
924
+ return [...ahead].sort((a, b) => a - b);
925
+ }, { ...(ngDevMode ? { debugName: "rendersAhead" } : /* istanbul ignore next */ {}), equal: (a, b) => a.length === b.length && a.every((index, at) => index === b[at]) });
926
+ /** The rows from `first` up to `last`, and the rows ahead of them if there are any. */
816
927
  rowsFor(items, first, last) {
817
928
  const rows = [];
818
929
  const pinned = this.sticky.pinned();
819
- const above = pinned.filter((index) => index < first);
820
- this.releaseRecycled(first, last, above);
930
+ const ahead = this.rendersAhead();
931
+ this.releaseRecycled(first, last, ahead);
932
+ // Where flow puts each row ahead of the window, where JavaScript moves the pinned ones.
933
+ const start = this.flowStart(first, ahead);
934
+ let at = start;
821
935
  // A pinned row is on screen even when its own place in the list is not, which is the whole
822
936
  // point of it, so it is rendered whether or not the window reaches that far.
823
- for (const index of above) {
937
+ for (const index of ahead) {
824
938
  const key = this.keyAt(index);
825
939
  rows.push(this.hold({
826
940
  index,
@@ -828,11 +942,14 @@ export class VirtualList extends ScrollViewProps {
828
942
  key,
829
943
  item: items[index],
830
944
  style: this.sticky.native
831
- ? this.sticky.style(index)
945
+ ? pinned.includes(index)
946
+ ? this.sticky.style(index)
947
+ : this.flowStyle()
832
948
  : this.measuring()
833
- ? this.sticky.flowStyle(index, this.topOf(first) - this.heightOf(index) - this.rowGap())
949
+ ? this.sticky.flowStyle(index, at)
834
950
  : this.sticky.slotStyle(index),
835
951
  }));
952
+ at += this.heightOf(index) + this.rowGap();
836
953
  }
837
954
  for (let index = first; index < last; index++) {
838
955
  const key = this.keyAt(index);
@@ -844,26 +961,39 @@ export class VirtualList extends ScrollViewProps {
844
961
  style: this.styleFor(index, pinned.includes(index)),
845
962
  }));
846
963
  }
847
- // Rows in flow pin one at a time, so the one above the window is the only one.
848
- const [lead] = above;
849
- if (lead !== undefined && this.sticky.native && this.measuring()) {
850
- this.leadWindow(rows, lead, first);
964
+ if (ahead.length > 0 && this.sticky.native && this.measuring()) {
965
+ this.placeAhead(rows, ahead.length + 1, pinned);
851
966
  }
967
+ if (start < 0)
968
+ this.startBefore(rows, start);
852
969
  return rows;
853
970
  }
971
+ /** Start the first row in flow at `start`, below zero, where the spacer cannot reach. */
972
+ startBefore(rows, start) {
973
+ const [row] = rows;
974
+ if (!row || !this.measuring())
975
+ return;
976
+ const margin = this.horizontal() ? 'marginLeft' : 'marginTop';
977
+ rows[0] = this.hold({ ...row, style: { ...row.style, [margin]: start } });
978
+ }
854
979
  /**
855
- * A pinned row native moves stays at its own place, so the rows between it and the window are
856
- * made up before the window rather than after the row: new props on a view native is moving
857
- * put its transform back for a frame.
980
+ * A pinned row native moves stays at its own place, so the rows that are not rendered between
981
+ * it and the next are made up by a margin on the next row that is not pinned, up to the
982
+ * window's first, a negative one where a negative gap overlaps them: new props on a view native
983
+ * is moving put its transform back for a frame.
858
984
  */
859
- leadWindow(rows, pinned, first) {
860
- const lead = rows[1];
861
- // The pinned row's own gap already follows it in flow.
862
- const between = this.topOf(first) - this.topOf(pinned) - this.heightOf(pinned) - this.rowGap();
863
- if (!lead || between <= 0)
864
- return;
985
+ placeAhead(rows, count, pinned) {
865
986
  const margin = this.horizontal() ? 'marginLeft' : 'marginTop';
866
- rows[1] = this.hold({ ...lead, style: { ...lead.style, [margin]: between } });
987
+ let end = this.topOf(rows[0].index);
988
+ for (let at = 0; at < Math.min(count, rows.length); at++) {
989
+ const row = rows[at];
990
+ const start = this.topOf(row.index);
991
+ if (start !== end && !pinned.includes(row.index)) {
992
+ rows[at] = this.hold({ ...row, style: { ...row.style, [margin]: start - end } });
993
+ }
994
+ // A row's own gap already follows it in flow.
995
+ end = start + this.heightOf(row.index) + this.rowGap();
996
+ }
867
997
  }
868
998
  styleFor(index, pinned) {
869
999
  if (this.sticky.native && this.sticky.rows().has(index))
@@ -1143,31 +1273,104 @@ export class VirtualList extends ScrollViewProps {
1143
1273
  * there at once, and the row is held there while the rows around it are measured.
1144
1274
  */
1145
1275
  scrollToIndex(options) {
1146
- const items = this.items();
1147
- if (!items.length)
1148
- return;
1149
- const index = Math.max(0, Math.min(options.index, items.length - 1));
1150
- const within = -(options.viewOffset ?? 0);
1151
- const offset = this.topOf(index) + within;
1152
- this.lastOffset = offset;
1153
- this.anchor = { key: this.keyAt(index), within, items, index };
1154
- this.jumpTo(index);
1155
- // The start of its line, which is what a scroll event there gives, so the fill keeps its way.
1156
- this.moveTo(this.lineStart(this.lineOf(index)));
1157
- this.scrollToOffset({ offset: this.headerHeight() + offset, animated: options.animated });
1276
+ // Untracked, as are the other scrolls: they read the list's state and write what it depends on,
1277
+ // so an effect that called one would depend on that too, and run again without end.
1278
+ untracked(() => {
1279
+ const items = this.items();
1280
+ if (!items.length)
1281
+ return;
1282
+ const index = Math.max(0, Math.min(options.index, items.length - 1));
1283
+ const within = -(options.viewOffset ?? 0);
1284
+ const offset = this.topOf(index) + within;
1285
+ this.lastOffset = offset;
1286
+ this.anchor = { key: this.keyAt(index), within, items, index };
1287
+ this.jumpTo(index);
1288
+ // The start of its line, which is what a scroll event there gives, so the fill keeps its way.
1289
+ this.moveTo(this.lineStart(this.lineOf(index)));
1290
+ // The list is at the row already, so the new items are placed from there.
1291
+ this.forgetAsked();
1292
+ this.sendScrollTo(this.headerHeight() + offset, options.animated ?? true);
1293
+ });
1158
1294
  }
1159
1295
  /** Scroll to an offset along the list's own axis: x when it is horizontal, y otherwise. */
1160
1296
  scrollToOffset(options) {
1161
1297
  const { offset, animated = true } = options;
1298
+ const send = () => this.sendScrollTo(offset, animated);
1299
+ untracked(() => {
1300
+ send();
1301
+ this.ask({ command: 'scrollTo', animated, send }, offset);
1302
+ });
1303
+ }
1304
+ scrollToEnd(options = {}) {
1305
+ const animated = options.animated ?? true;
1306
+ const send = () => this.sendScrollToEnd(animated);
1307
+ untracked(() => {
1308
+ send();
1309
+ this.ask({ command: 'scrollToEnd', animated, send }, Infinity);
1310
+ });
1311
+ }
1312
+ sendScrollTo(offset, animated) {
1162
1313
  this.jumpTo(this.indexAt(offset - this.headerHeight()));
1163
1314
  const [x, y] = this.horizontal() ? [offset, 0] : [0, offset];
1164
1315
  this.sticky.jumping(this.reachable(offset), animated);
1165
- this.engine.dispatchCommand(this.node, 'scrollTo', [x, y, animated]);
1316
+ // In place of a correction queued in this render, which would undo it once that is done.
1317
+ this.pendingScroll = null;
1318
+ // An animation is sent to the offset itself, and stopped by what is mounted as it runs.
1319
+ const short = !animated && this.stopsShort(offset, this.viewport());
1320
+ this.dispatchScroll('scrollTo', [x, y, animated], short);
1166
1321
  }
1167
- scrollToEnd(options = {}) {
1168
- this.sticky.jumping(this.reachable(Infinity), options.animated ?? true);
1322
+ sendScrollToEnd(animated) {
1323
+ this.sticky.jumping(this.reachable(Infinity), animated);
1169
1324
  this.jumpTo(this.items().length - 1);
1170
- this.engine.dispatchCommand(this.node, 'scrollToEnd', [options.animated ?? true]);
1325
+ this.pendingScroll = null;
1326
+ // An animation is sent to the bottom of the rows, a viewport past where a jump stops.
1327
+ const short = this.stopsShort(Infinity, animated ? 0 : this.viewport());
1328
+ this.dispatchScroll('scrollToEnd', [animated], short);
1329
+ }
1330
+ /** Send a scroll, and again once the rows are mounted if it stops short without them. */
1331
+ dispatchScroll(command, args, short) {
1332
+ this.engine.dispatchCommand(this.node, command, args);
1333
+ const scroll = ++this.scrollsSent;
1334
+ if (!short)
1335
+ return;
1336
+ void framesToMount().then(() => {
1337
+ if (scroll !== this.scrollsSent)
1338
+ return;
1339
+ // Nor is the scroll that reports this one a fling.
1340
+ this.stopSpeed();
1341
+ this.engine.dispatchCommand(this.node, command, args);
1342
+ });
1343
+ }
1344
+ /**
1345
+ * Whether native may stop a scroll to `offset` short, `before` the bottom of the rows it has
1346
+ * mounted. Android runs the commands it has waiting before it mounts the views it has waiting,
1347
+ * so one sent after a render can run on the rows before it. iOS keeps them in order.
1348
+ */
1349
+ stopsShort(offset, before) {
1350
+ const extent = this.extent();
1351
+ const viewport = this.viewport();
1352
+ if (nativePlatform() !== 'android' || viewport <= 0)
1353
+ return false;
1354
+ const header = this.headerHeight();
1355
+ const end = Math.min(offset, header + extent - viewport);
1356
+ return end > Math.max(0, header + this.mountedExtent - before) + HOLD_TOLERANCE;
1357
+ }
1358
+ /** Follow what native has mounted: less at once, and more once the frames for it have run. */
1359
+ trackMounted() {
1360
+ if (nativePlatform() !== 'android')
1361
+ return;
1362
+ const extent = this.extent();
1363
+ if (extent === this.renderedExtent)
1364
+ return;
1365
+ if (extent < this.renderedExtent)
1366
+ this.shortened++;
1367
+ this.renderedExtent = extent;
1368
+ this.mountedExtent = Math.min(this.mountedExtent, extent);
1369
+ const shortened = this.shortened;
1370
+ void framesToMount().then(() => {
1371
+ if (shortened === this.shortened)
1372
+ this.mountedExtent = extent;
1373
+ });
1171
1374
  }
1172
1375
  slotStyle(index) {
1173
1376
  const start = this.topOf(index);
@@ -1359,13 +1562,20 @@ export class VirtualList extends ScrollViewProps {
1359
1562
  const hold = this.maintainVisibleContentPosition();
1360
1563
  if (!hold || this.lastOffset <= (hold.autoscrollToTopThreshold ?? 0))
1361
1564
  return false;
1362
- this.scrollToOffset({ offset: this.headerHeight() + this.lastOffset, animated: false });
1565
+ this.sendScrollTo(this.headerHeight() + this.lastOffset, false);
1363
1566
  return true;
1364
1567
  }
1365
- onContentSize(event) {
1366
- const size = event.nativeEvent;
1367
- this.contentSize = (this.horizontal() ? size?.width : size?.height) ?? 0;
1568
+ /**
1569
+ * The content view was laid out: its size is the scroll view's content size, footer and all, as
1570
+ * ScrollView.js reads it. Native sends a scroll view no `contentSizeChange` of its own.
1571
+ */
1572
+ onContentLayout(event) {
1573
+ const layout = event.nativeEvent?.layout;
1574
+ if (!layout)
1575
+ return;
1576
+ this.contentSize = this.horizontal() ? layout.width : layout.height;
1368
1577
  this.contentSizeFor = this.headerHeight() + this.extent();
1578
+ this.contentSizeChange.emit({ width: layout.width, height: layout.height });
1369
1579
  this.checkEnd(this.headerHeight() + this.lastOffset);
1370
1580
  }
1371
1581
  /** The scroll view's content along the axis, header and all. */
@@ -1376,6 +1586,8 @@ export class VirtualList extends ScrollViewProps {
1376
1586
  }
1377
1587
  /** The user took the scroll over: native's own events move the rows from here. */
1378
1588
  onDragBegin() {
1589
+ this.forgetAsked();
1590
+ this.scrollsSent++;
1379
1591
  this.sticky.dragged();
1380
1592
  }
1381
1593
  /** A scroll came to rest: see `StickyRows.rested`. */
@@ -1412,10 +1624,10 @@ export class VirtualList extends ScrollViewProps {
1412
1624
  this.endReachedFor = count;
1413
1625
  this.endReached.emit({ distanceFromEnd });
1414
1626
  }
1415
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualList, deps: [], target: i0.ɵɵFactoryTarget.Component });
1416
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: VirtualList, isStandalone: true, selector: "virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, estimatedItemHeight: { classPropertyName: "estimatedItemHeight", publicName: "estimatedItemHeight", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, keyExtractor: { classPropertyName: "keyExtractor", publicName: "keyExtractor", isSignal: true, isRequired: false, transformFunction: null }, itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, maintainVisibleContentPosition: { classPropertyName: "maintainVisibleContentPosition", publicName: "maintainVisibleContentPosition", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null }, windowSize: { classPropertyName: "windowSize", publicName: "windowSize", isSignal: true, isRequired: false, transformFunction: null }, velocityLead: { classPropertyName: "velocityLead", publicName: "velocityLead", isSignal: true, isRequired: false, transformFunction: null }, endReachedThreshold: { classPropertyName: "endReachedThreshold", publicName: "endReachedThreshold", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, stickyIndices: { classPropertyName: "stickyIndices", publicName: "stickyIndices", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, keyboardShouldPersistTaps: { classPropertyName: "keyboardShouldPersistTaps", publicName: "keyboardShouldPersistTaps", isSignal: true, isRequired: false, transformFunction: null }, itemVisiblePercentThreshold: { classPropertyName: "itemVisiblePercentThreshold", publicName: "itemVisiblePercentThreshold", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { endReached: "endReached", viewableItemsChanged: "viewableItemsChanged" }, host: { listeners: { "scrollBeginDrag": "onDragBegin()", "momentumScrollEnd": "onScrollEnd()", "layout": "onLayout($event)", "contentSizeChange": "onContentSize($event)" }, properties: { "flexDirection": "horizontal() ? 'row' : 'column'", "horizontal": "horizontal()", "nestedScrollEnabled": "nestedScroll()", "transform": "flip()", "scrollEventThrottle": "scrollEventThrottle()" } }, queries: [{ propertyName: "separator", first: true, predicate: VirtualListSeparator, descendants: true, isSignal: true }, { propertyName: "refreshControl", first: true, predicate: RefreshControl, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "canvasView", first: true, predicate: ["rows"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "headerView", first: true, predicate: ["header"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["virtualList"], usesInheritance: true, ngImport: i0, template: `
1627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualList, deps: [], target: i0.ɵɵFactoryTarget.Component });
1628
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.0", type: VirtualList, isStandalone: true, selector: "virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, estimatedItemHeight: { classPropertyName: "estimatedItemHeight", publicName: "estimatedItemHeight", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, keyExtractor: { classPropertyName: "keyExtractor", publicName: "keyExtractor", isSignal: true, isRequired: false, transformFunction: null }, itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: false, transformFunction: null }, maintainVisibleContentPosition: { classPropertyName: "maintainVisibleContentPosition", publicName: "maintainVisibleContentPosition", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null }, windowSize: { classPropertyName: "windowSize", publicName: "windowSize", isSignal: true, isRequired: false, transformFunction: null }, velocityLead: { classPropertyName: "velocityLead", publicName: "velocityLead", isSignal: true, isRequired: false, transformFunction: null }, endReachedThreshold: { classPropertyName: "endReachedThreshold", publicName: "endReachedThreshold", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, stickyIndices: { classPropertyName: "stickyIndices", publicName: "stickyIndices", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, keyboardShouldPersistTaps: { classPropertyName: "keyboardShouldPersistTaps", publicName: "keyboardShouldPersistTaps", isSignal: true, isRequired: false, transformFunction: null }, itemVisiblePercentThreshold: { classPropertyName: "itemVisiblePercentThreshold", publicName: "itemVisiblePercentThreshold", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { endReached: "endReached", contentSizeChange: "contentSizeChange", viewableItemsChanged: "viewableItemsChanged" }, host: { listeners: { "scrollBeginDrag": "onDragBegin()", "momentumScrollEnd": "onScrollEnd()", "layout": "onLayout($event)" }, properties: { "flexDirection": "horizontal() ? 'row' : 'column'", "horizontal": "horizontal()", "nestedScrollEnabled": "nestedScroll()", "transform": "flip()", "scrollEventThrottle": "scrollEventThrottle()" } }, queries: [{ propertyName: "separator", first: true, predicate: VirtualListSeparator, descendants: true, isSignal: true }, { propertyName: "refreshControl", first: true, predicate: RefreshControl, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "canvasView", first: true, predicate: ["rows"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "headerView", first: true, predicate: ["header"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["virtualList"], usesInheritance: true, ngImport: i0, template: `
1417
1629
  <ng-content select="refresh-control" />
1418
- <view [style]="content()" collapsable="false">
1630
+ <view [style]="content()" collapsable="false" (layout)="onContentLayout($event)">
1419
1631
  <view #header [style]="headerStyle()" (layout)="onHeaderLayout($event)"
1420
1632
  ><ng-content select="[listHeader]"
1421
1633
  /></view>
@@ -1438,7 +1650,7 @@ export class VirtualList extends ScrollViewProps {
1438
1650
  </view>
1439
1651
  `, isInline: true, dependencies: [{ kind: "directive", type: TemplateSlot, selector: "[templateSlot]", inputs: ["templateSlot", "templateSlotContext"] }, { kind: "directive", type: View, selector: "view" }] });
1440
1652
  }
1441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualList, decorators: [{
1653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualList, decorators: [{
1442
1654
  type: Component,
1443
1655
  args: [{
1444
1656
  selector: 'virtual-list',
@@ -1453,7 +1665,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
1453
1665
  // A refresh control comes first, as the scroll view's own child; see ScrollView.
1454
1666
  template: `
1455
1667
  <ng-content select="refresh-control" />
1456
- <view [style]="content()" collapsable="false">
1668
+ <view [style]="content()" collapsable="false" (layout)="onContentLayout($event)">
1457
1669
  <view #header [style]="headerStyle()" (layout)="onHeaderLayout($event)"
1458
1670
  ><ng-content select="[listHeader]"
1459
1671
  /></view>
@@ -1490,10 +1702,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
1490
1702
  '(scrollBeginDrag)': 'onDragBegin()',
1491
1703
  '(momentumScrollEnd)': 'onScrollEnd()',
1492
1704
  '(layout)': 'onLayout($event)',
1493
- '(contentSizeChange)': 'onContentSize($event)',
1494
1705
  },
1495
1706
  }]
1496
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], estimatedItemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "estimatedItemHeight", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPadding", required: false }] }], rowGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowGap", required: false }] }], keyExtractor: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyExtractor", required: false }] }], itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: false }] }], maintainVisibleContentPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "maintainVisibleContentPosition", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], windowSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowSize", required: false }] }], velocityLead: [{ type: i0.Input, args: [{ isSignal: true, alias: "velocityLead", required: false }] }], endReachedThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "endReachedThreshold", required: false }] }], horizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "horizontal", required: false }] }], inverted: [{ type: i0.Input, args: [{ isSignal: true, alias: "inverted", required: false }] }], stickyIndices: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyIndices", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], keyboardShouldPersistTaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardShouldPersistTaps", required: false }] }], itemVisiblePercentThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemVisiblePercentThreshold", required: false }] }], endReached: [{ type: i0.Output, args: ["endReached"] }], viewableItemsChanged: [{ type: i0.Output, args: ["viewableItemsChanged"] }], separator: [{ type: i0.ContentChild, args: [i0.forwardRef(() => VirtualListSeparator), { isSignal: true }] }], refreshControl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => RefreshControl), { isSignal: true }] }], canvasView: [{ type: i0.ViewChild, args: ['rows', { ...{ read: ElementRef }, isSignal: true }] }], headerView: [{ type: i0.ViewChild, args: ['header', { ...{ read: ElementRef }, isSignal: true }] }] } });
1707
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], estimatedItemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "estimatedItemHeight", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPadding", required: false }] }], rowGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowGap", required: false }] }], keyExtractor: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyExtractor", required: false }] }], itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: false }] }], maintainVisibleContentPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "maintainVisibleContentPosition", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], windowSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowSize", required: false }] }], velocityLead: [{ type: i0.Input, args: [{ isSignal: true, alias: "velocityLead", required: false }] }], endReachedThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "endReachedThreshold", required: false }] }], horizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "horizontal", required: false }] }], inverted: [{ type: i0.Input, args: [{ isSignal: true, alias: "inverted", required: false }] }], stickyIndices: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyIndices", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], keyboardShouldPersistTaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardShouldPersistTaps", required: false }] }], itemVisiblePercentThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemVisiblePercentThreshold", required: false }] }], endReached: [{ type: i0.Output, args: ["endReached"] }], contentSizeChange: [{ type: i0.Output, args: ["contentSizeChange"] }], viewableItemsChanged: [{ type: i0.Output, args: ["viewableItemsChanged"] }], separator: [{ type: i0.ContentChild, args: [i0.forwardRef(() => VirtualListSeparator), { isSignal: true }] }], refreshControl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => RefreshControl), { isSignal: true }] }], canvasView: [{ type: i0.ViewChild, args: ['rows', { ...{ read: ElementRef }, isSignal: true }] }], headerView: [{ type: i0.ViewChild, args: ['header', { ...{ read: ElementRef }, isSignal: true }] }] } });
1497
1708
  /** Whether a cached slot style already has every one of these props. */
1498
1709
  function holds(style, props) {
1499
1710
  return Object.entries(props).every(([prop, value]) => style[prop] === value);
@@ -1519,10 +1730,10 @@ export class VirtualListRow {
1519
1730
  this.layout = event.nativeEvent?.layout ?? this.layout;
1520
1731
  this.list.measureRow(this.row(), event.nativeEvent?.layout);
1521
1732
  }
1522
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualListRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1523
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.0", type: VirtualListRow, isStandalone: true, selector: "[virtualListRow]", inputs: { row: { classPropertyName: "row", publicName: "virtualListRow", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "layout": "onLayout($event)" }, properties: { "style": "row().style", "attr.aria-hidden": "row().parked ? true : null" } }, ngImport: i0 });
1733
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualListRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1734
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.3.0", type: VirtualListRow, isStandalone: true, selector: "[virtualListRow]", inputs: { row: { classPropertyName: "row", publicName: "virtualListRow", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "layout": "onLayout($event)" }, properties: { "style": "row().style", "attr.aria-hidden": "row().parked ? true : null" } }, ngImport: i0 });
1524
1735
  }
1525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: VirtualListRow, decorators: [{
1736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: VirtualListRow, decorators: [{
1526
1737
  type: Directive,
1527
1738
  args: [{
1528
1739
  selector: '[virtualListRow]',