@ng-native/components 0.5.0 → 0.7.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.
- package/dist/html-entities.d.ts +7 -0
- package/dist/html-entities.js +59 -0
- package/dist/html-entities.js.map +1 -0
- package/dist/markdown-blocks.d.ts +79 -0
- package/dist/markdown-blocks.js +212 -0
- package/dist/markdown-blocks.js.map +1 -0
- package/dist/markdown.d.ts +63 -0
- package/dist/markdown.js +338 -0
- package/dist/markdown.js.map +1 -0
- package/dist/virtual-list.d.ts +16 -0
- package/dist/virtual-list.js +91 -36
- package/dist/virtual-list.js.map +1 -1
- package/package.json +14 -5
package/dist/virtual-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../src/virtual-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,eAAe,EACf,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAML,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAkC,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,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I,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;uGARU,cAAc;2FAAd,cAAc;;2FAAd,cAAc;kBAP1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE;wBACJ,SAAS,EAAE,aAAa;wBACxB,UAAU,EAAE,kBAAkB;qBAC/B;iBACF","sourcesContent":["import {\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n afterEveryRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n inject,\n input,\n linkedSignal,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n type HostNode,\n type NativeSyntheticEvent,\n type ScrollDrive,\n type ScrollRange,\n type StaticTransform,\n nativePlatform,\n pinnedRange,\n} from '@ng-native/fabric';\nimport { HeightIndex } from './height-index.ts';\nimport { type KeyboardShouldPersistTaps, dismissKeyboardOnTap } from './keyboard-taps.ts';\nimport { RefreshControl } from './refresh-control.ts';\nimport { STICKY_SETTLE_MS } from './sticky-headers.ts';\nimport { TemplateSlot } from './template-slot.ts';\nimport { ZeroSizeWarning, checksZeroSize, written } from './zero-size-warning.ts';\nimport { View } from './view.ts';\nimport { ScrollViewProps } from './scroll-view-props.ts';\n\n/** One rendered row: the item, its index, and a stable style object for its slot. */\nexport interface VirtualRow<T> {\n readonly index: number;\n /**\n * A key that a row keeps while its item stays in the window, and that passes to a row arriving\n * once it has left. `track row.slot` recycles rows: the view of a row scrolling out is reused for\n * the one scrolling in, with only its bindings updated, rather than one destroyed and one created\n * each time. A slot follows its item, not its position, so an insert above the window moves no\n * row to another item.\n */\n readonly slot: number;\n /**\n * The item's identity, from `keyExtractor`, or the item itself without one. `track row.key`\n * gives each item a view of its own for as long as it is in the window and never recycles one,\n * which is what a row holding state of its own, or animating, needs.\n */\n readonly key: unknown;\n readonly item: T;\n readonly style: Record<string, unknown>;\n /**\n * A slot kept rendered but hidden, still bound to the last item it showed, so the next row of\n * its type to arrive reuses its views instead of building them. Always last in the window.\n */\n readonly parked?: true;\n}\n\n/**\n * Space around the rows, inside the scrolling content: one number for every side, or a side each,\n * as FlatList's `contentContainerStyle` padding.\n */\nexport type VirtualListPadding =\n | number\n | {\n readonly top?: number;\n readonly right?: number;\n readonly bottom?: number;\n readonly left?: number;\n };\n\n/** The padding on each side, in points. */\ninterface Edges {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\n/** A row height: one for every row, or one per item. */\nexport type VirtualItemHeight<T> = number | ((item: T, index: number) => number);\n\n/**\n * Keep what is on screen where it is when rows are added or removed before it, as\n * `ScrollView`'s `maintainVisibleContentPosition` does in React Native.\n */\nexport interface VirtualListVisiblePosition {\n /** Rows before this index are never what the position is held by. Defaults to 0. */\n readonly minIndexForVisible?: number;\n /**\n * Within this many points of the start, show what arrived instead of holding position: a feed\n * at its top scrolls to the new posts, a chat at its newest message follows the next one.\n */\n readonly autoscrollToTopThreshold?: number;\n}\n\n/** What a separator template is given: the rows either side of it, as FlatList's `leadingItem`. */\nexport interface VirtualListSeparatorContext<T> {\n readonly $implicit: T;\n readonly leadingItem: T;\n readonly trailingItem: T;\n readonly leadingIndex: number;\n}\n\n/**\n * Marks the template drawn between two rows: `<ng-template virtualListSeparator let-leading>`.\n * FlatList's `ItemSeparatorComponent`.\n */\n@Directive({ selector: 'ng-template[virtualListSeparator]' })\nexport class VirtualListSeparator<T = unknown> {\n readonly template = inject<TemplateRef<VirtualListSeparatorContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _directive: VirtualListSeparator<T>,\n context: unknown,\n ): context is VirtualListSeparatorContext<T> {\n return true;\n }\n}\n\n/** One separator the list is drawing: its slot, and what its template is told. */\ninterface Gap<T> {\n readonly index: number;\n readonly style: Record<string, unknown>;\n readonly context: VirtualListSeparatorContext<T>;\n}\n\n/** A parked slot: out of layout, out of sight, and out of the accessibility tree. */\nconst PARKED: Record<string, unknown> = Object.freeze({ display: 'none' });\n\n/** How many hidden slots of each row type are kept ready for reuse. */\nconst PARK_LIMIT = 6;\n\n/** The style of a row that sizes itself and needs nothing else: in flow, where it falls. */\nconst IN_FLOW: Record<string, unknown> = Object.freeze({});\n\n/** Points of drift below which a held position is left alone, as UIKit rounds to half-points. */\nconst HOLD_TOLERANCE = 0.5;\n\n/** The row a held position is held by: its key, and how far into it the viewport starts. */\ninterface Anchor<T> {\n readonly key: unknown;\n readonly within: number;\n /** The items the anchor was taken against, to look for a successor in if its row goes. */\n readonly items: readonly T[];\n readonly index: number;\n}\n\n/** What the window is built from: the visible row and the edges of what is rendered. */\ninterface Span {\n readonly first: number;\n readonly last: number;\n}\n\n/**\n * Windowed list: a native scroll view whose content is sized to the full list, with only the\n * visible slice rendered. Commits as `RCTScrollView`.\n *\n * RN's FlatList, SectionList and VirtualizedList are a large React component tree, and none of\n * it is reachable. This is the small equivalent. Angular's own `@for` does the rendering, so\n * tracking, reuse and destruction all behave normally, and the loop stays in the caller's\n * template:\n *\n * ```html\n * <virtual-list #list [items]=\"rows()\" [itemHeight]=\"44\" (endReached)=\"loadMore()\">\n * <text listHeader>Header</text>\n * @for (row of list.window(); track row.slot) {\n * <view [virtualListRow]=\"row\"><text>{{ row.item.label }}</text></view>\n * }\n * <text listFooter>Footer</text>\n * </virtual-list>\n * ```\n *\n * With `itemHeight`, every row's size is known up front and each is absolutely positioned at its\n * offset. Without it, rows size themselves, as a feed's posts and a chat's messages do: the window\n * is laid out in normal flow after a spacer standing in for the rows above it, so native places\n * every row correctly in the frame it first appears, and each row's layout tells the list its\n * height for sizing what is not rendered. Until a row has been measured it counts as\n * `estimatedItemHeight`. Measurements are kept by `keyExtractor`, so they follow their item across\n * inserts, removals and moves. `virtualListRow` on each row's view applies its style and reports\n * its layout; `[style]=\"row.style\"` still works for fixed heights, which need no measuring.\n *\n * Content marked `listHeader` and `listFooter` renders above and below the rows in normal flow,\n * as FlatList's header and footer components do. A `<refresh-control>` projects like any child.\n *\n * `<ng-template virtualListSeparator let-leading let-trailing=\"trailingItem\">` is drawn between\n * each pair of rows and not after the last, as FlatList's `ItemSeparatorComponent` is. It is drawn\n * inside the leading row's slot, at its trailing edge, so `itemHeight` includes it the way\n * `getItemLayout`'s `length` includes it in RN; a measured row has it drawn over its trailing edge\n * once its height is known. The slot it sits in lets touches through to the row underneath.\n *\n * `horizontal` swaps the axis: rows are placed by `left` and sized by `width`, and the offset is\n * read from `contentOffset.x`. `inverted` is a scale of -1 on the list and on each row, which is\n * how FlatList does it too - the list scrolls from the bottom and each row is flipped back the\n * right way up. The first item is the one at the bottom, so a chat passes its messages newest\n * first.\n *\n * `stickyIndices` pins a row to the leading edge while the rows under it scroll past, which is\n * FlatList's `stickyHeaderIndices` counted without the header. `stickyHeader` pins the\n * `listHeader` content the same way, FlatList's index 0 when it has a `ListHeaderComponent`, and\n * the first sticky row pushes it off as RN's sticky headers push each other. Neither is native:\n * RN's `ScrollView.js` translates a sticky child against the scroll offset in JavaScript, and a\n * row here follows the offset the same way while it is the current one - by its `top` when\n * absolutely positioned, by a transform when in flow.\n *\n * What is on screen stays on screen when a measured row above it turns out taller or shorter than\n * its estimate: the offset is corrected by the difference. `maintainVisibleContentPosition` does\n * the same for rows inserted or removed above it, which a feed receiving new posts and a chat\n * loading older messages above the ones being read both need.\n *\n * ponytail: viewability is `itemVisiblePercentThreshold` only: `minimumViewTime` and\n * `waitForInteraction` are timing policy on top of the same measurement, and nothing has needed\n * them. A separator is not told `highlighted`, which RN drives from the row's press state. A\n * sticky header follows the scroll a commit behind native, where RN's is on the native driver. A\n * held position is restored by a `scrollTo` after the commit, not in the mount as native\n * `maintainVisibleContentPosition` is, so a correction made mid-fling lands where the last scroll\n * event said the list was.\n */\n@Component({\n selector: 'virtual-list',\n exportAs: 'virtualList',\n imports: [TemplateSlot, View],\n // See ScrollView: the canvas carries only a height, so Fabric would flatten it away and drags\n // over the gaps between rows would not scroll. Separators come after the rows so they draw over\n // the slot they share. The spacer is there only when rows are in flow.\n // A refresh control comes first, as the scroll view's own child; see ScrollView.\n template: `\n <ng-content select=\"refresh-control\" />\n <view [style]=\"headerStyle()\" (layout)=\"onHeaderLayout($event)\"\n ><ng-content select=\"[listHeader]\"\n /></view>\n <view #rows [style]=\"canvas()\" collapsable=\"false\">\n @if (measuring()) {\n <view [style]=\"spacer()\"></view>\n }\n <ng-content />\n @if (separator(); as separator) {\n @for (gap of gaps(); track gap.index) {\n <view [style]=\"gap.style\"\n ><ng-container [templateSlot]=\"separator.template\" [templateSlotContext]=\"gap.context\"\n /></view>\n }\n }\n </view>\n <view [style]=\"footerStyle()\"><ng-content select=\"[listFooter]\" /></view>\n `,\n host: {\n // ScrollView.js's `baseHorizontal`: a column would stack the header, canvas and footer, and\n // the canvas, holding only absolutely positioned rows, would have no height to give them. A\n // top-level prop, as on <scroll-view>, so the caller's own [style] still applies over it.\n '[flexDirection]': \"horizontal() ? 'row' : 'column'\",\n '[horizontal]': 'horizontal()',\n '[nestedScrollEnabled]': 'nestedScroll()',\n // A prop rather than `[style.transform]`: Angular stringifies a style binding, and a\n // transform is a list of objects. The engine flattens style into props anyway, so this is\n // where it would have ended up.\n '[transform]': 'flip()',\n '[scrollEventThrottle]': 'scrollEventThrottle()',\n '(scroll)': 'onScroll($event)',\n '(layout)': 'onLayout($event)',\n '(contentSizeChange)': 'onContentSize($event)',\n },\n})\nexport class VirtualList<T> extends ScrollViewProps {\n readonly items = input.required<readonly T[]>();\n /**\n * A fixed height, or a function for variable ones, when every row's size is known up front. The\n * function form builds a cumulative offset table and binary-searches it, which is what section\n * lists need: a header row and an item row are different heights, so uniform maths cannot place\n * them. Leave it unset for rows that size themselves.\n */\n readonly itemHeight = input<VirtualItemHeight<T>>();\n /**\n * What a row that sizes itself counts as until it has been measured. The closer it is, the more\n * honest the scroll bar is and the less a jump to an unmeasured row has to correct.\n */\n readonly estimatedItemHeight = input<VirtualItemHeight<T>>(50);\n /**\n * Space around the rows, inside the scrolling content. The leading side comes before the first\n * row and the trailing side after the last; the sides across the axis inset every row. The\n * header and footer sit outside it, as FlatList's do outside `contentContainerStyle`.\n */\n readonly contentPadding = input<VirtualListPadding>(0);\n /** Space between one row and the next, along the axis: not before the first or after the last. */\n readonly rowGap = input(0, { transform: numberAttribute });\n /**\n * An item's identity, as FlatList's `keyExtractor`: what a measured height, a slot and a held\n * position follow across an insert. Without it an item is its own key, which is enough for items\n * that are replaced, not copied, when they change.\n */\n readonly keyExtractor = input<(item: T, index: number) => unknown>();\n /**\n * What kind of row an item is, when rows of different kinds share the list: a text post and a\n * photo post, a message and a date divider. A slot is only ever recycled into a row of the same\n * type, so its views are reused rather than torn down for another kind's, as UIKit's reuse\n * identifiers and FlashList's `getItemType` do.\n */\n readonly itemType = input<(item: T, index: number) => unknown>();\n /** Keep what is on screen still when rows are inserted or removed before it. */\n readonly maintainVisibleContentPosition = input<VirtualListVisiblePosition>();\n /** Rows rendered beyond each edge of the viewport, to cover fling gaps. */\n readonly overscan = input(4, { transform: numberAttribute });\n /** How close to the end, in viewport heights, `(endReached)` fires. RN's default is 2. */\n readonly endReachedThreshold = input(2, { transform: numberAttribute });\n\n /** Lay the rows out along x instead of y, and scroll that way. */\n readonly horizontal = input(false, { transform: booleanAttribute });\n /** Start at the end and scroll backwards, with every row flipped back the right way up. */\n readonly inverted = input(false, { transform: booleanAttribute });\n /**\n * Rows that pin to the leading edge while the ones under them scroll past. Ascending; a row is\n * pinned from the moment it would leave until the next sticky row pushes it off.\n */\n readonly stickyIndices = input<readonly number[]>([]);\n /** Pin the `listHeader` content to the leading edge until the first sticky row pushes it off. */\n readonly stickyHeader = input(false, { transform: booleanAttribute });\n /** What a tap in the list does while a text input has the keyboard up. See `ScrollView`. */\n readonly keyboardShouldPersistTaps = input<KeyboardShouldPersistTaps>('never');\n /** How much of a row must be on screen to count as viewable. RN's default is 0, meaning any. */\n readonly itemVisiblePercentThreshold = input(0, { transform: numberAttribute });\n\n /**\n * The scroll position is within `endReachedThreshold` of the end: once per item count, and again\n * after the list has scrolled away from the end and come back.\n */\n readonly endReached = output<{ distanceFromEnd: number }>();\n\n /** Which rows are on screen, and what changed since last time. */\n readonly viewableItemsChanged = output<{\n viewable: readonly VirtualRow<T>[];\n entered: readonly number[];\n left: readonly number[];\n }>();\n\n private readonly viewport = signal(0);\n /** The leading edge of the viewport in content space, which sticky rows and viewability need. */\n private readonly offset = signal(0);\n private readonly headerHeight = signal(0);\n /** What native reported the content measures along the axis, once it has. */\n private contentSize = 0;\n /** The item count `endReached` last fired for, cleared once the list is away from the end. */\n private endReachedFor = -1;\n\n /** Slot styles are cached so a scroll does not hand Fabric new prop objects for stable rows. */\n private readonly slots = new Map<number, Record<string, unknown>>();\n /** A separator's slot style, per row slot style, so it is as stable as the row's own. */\n private readonly gapStyles = new WeakMap<object, Record<string, unknown>>();\n /** The same for a measured row's separator, by key, while its place and size stay put. */\n private readonly measuredGaps = new Map<unknown, Record<string, unknown>>();\n\n protected readonly separator = contentChild<VirtualListSeparator<T>>(VirtualListSeparator);\n private readonly refreshControl = contentChild(RefreshControl);\n\n /** See ScrollView: inside Android's swipe layout the list must see a drag first. */\n protected readonly nestedScroll = computed(() =>\n nativePlatform() === 'android' && this.refreshControl() ? true : undefined,\n );\n\n /**\n * Whether native moves sticky rows. Each then stays at its own place in the list and native\n * translates it on every frame the list scrolls, as RN's `ScrollViewStickyHeader` does; a\n * translate committed from each scroll event lands a frame or more late, and on a fast fling\n * the row shudders and comes away from the edge.\n */\n private readonly nativeSticky = this.engine.drivesScroll;\n /** The offset once scrolling pauses, which the settled translate of a native-moved row is from. */\n private readonly settled = signal(0);\n private settleTimer: ReturnType<typeof setTimeout> | undefined;\n /** What native is moving, by row view, with the transform kept beside the translate. */\n private readonly drives = new Map<HostNode, { drive: ScrollDrive; statics: string }>();\n private readonly canvasView = viewChild.required('rows', { read: ElementRef });\n\n /** Whether the scroll offset is needed as a signal, which only pinning needs. */\n private readonly pinning = computed(() => this.stickyHeader() || this.stickyIndices().length > 0);\n\n /** Rows size themselves and are laid out in flow, rather than placed at a known offset. */\n readonly measuring = computed(() => this.itemHeight() === undefined);\n\n /** The padding on each side. */\n private readonly edges = computed<Edges>(() => {\n const padding = this.contentPadding();\n if (typeof padding === 'number') {\n return { top: padding, right: padding, bottom: padding, left: padding };\n }\n const { top = 0, right = 0, bottom = 0, left = 0 } = padding ?? {};\n return { top, right, bottom, left };\n });\n\n /** The padding before the first row, along the axis. */\n private readonly lead = computed(() =>\n this.horizontal() ? this.edges().left : this.edges().top,\n );\n\n /** The rows' insets across the axis, as the props that place an absolutely positioned row. */\n private readonly across = computed((): Record<string, number> => {\n const { top, right, bottom, left } = this.edges();\n return this.horizontal() ? { top, bottom } : { left, right };\n });\n\n /** Heights native has reported, by key. */\n private readonly measured = new Map<unknown, number>();\n /** Bumped when a measurement changes, which is what re-sizes the list. */\n private readonly measuredVersion = signal(0);\n\n /** Each item's key, or null when items are their own. */\n private readonly keys = computed<readonly unknown[] | null>(() => {\n const extract = this.keyExtractor();\n return extract ? this.items().map(extract) : null;\n });\n\n private keyAt(index: number): unknown {\n return this.keys()?.[index] ?? this.items()[index];\n }\n\n /**\n * Each row's size and where it starts, for variable heights; uniform rows need no index at all.\n * Built once per change of items. A measurement changes it in place and bumps\n * `measuredVersion`, which is what everything that reads it depends on, so a row laying out\n * costs a walk of the tree rather than a rebuild of every offset.\n */\n private readonly table = computed<HeightIndex | null>(() => {\n const height = this.itemHeight();\n if (typeof height === 'number') return null;\n\n // Each row's entry is its size and the gap after it, so where a row starts counts the gaps\n // before it without a second table.\n const gap = this.rowGap();\n const items = this.items();\n const sizes = new Float64Array(items.length);\n if (height) {\n for (let i = 0; i < items.length; i++) sizes[i] = height(items[i]!, i) + gap;\n return new HeightIndex(sizes);\n }\n const estimate = this.estimatedItemHeight();\n const keys = this.keys();\n for (let i = 0; i < items.length; i++) {\n const size =\n this.measured.get(keys ? keys[i] : items[i]) ??\n (typeof estimate === 'number' ? estimate : estimate(items[i]!, i));\n sizes[i] = size + gap;\n }\n return new HeightIndex(sizes);\n });\n\n /** Where each key is, so a measurement finds its row without a search. */\n private readonly indexOfKey = computed(() => {\n if (!this.measuring()) return null;\n const map = new Map<unknown, number>();\n (this.keys() ?? this.items()).forEach((key, index) => map.set(key, index));\n return map;\n });\n\n /** The index, with a dependency on its measurements for whoever is reading it. */\n private layout(): HeightIndex | null {\n const table = this.table();\n if (table) this.measuredVersion();\n return table;\n }\n\n /**\n * The list's own total extent along its axis: the padding at both ends, the rows, and a gap\n * between each two of them.\n */\n private readonly extent = computed(() => {\n const table = this.layout();\n const count = this.items().length;\n const rows = table ? table.total : count * this.stride();\n const { top, right, bottom, left } = this.edges();\n const padding = this.horizontal() ? left + right : top + bottom;\n return padding + (count ? rows - this.rowGap() : 0);\n });\n\n /** A fixed-height row and the gap after it. */\n private stride(): number {\n return (this.itemHeight() as number) + this.rowGap();\n }\n\n protected readonly canvas = computed(() =>\n this.horizontal() ? { width: this.extent(), flexDirection: 'row' } : { height: this.extent() },\n );\n\n /**\n * `scaleY: -1` on the list, and the same on every row.\n *\n * The list ends up scrolled from the far end with its rows in reverse, and the second flip puts\n * each row's own content back the right way up. It is what `FlatList` does, and it is why an\n * inverted list needs no reversed maths: the first item is at offset 0, which is the bottom.\n */\n protected readonly flip = computed<StaticTransform[] | undefined>(() => {\n if (!this.inverted()) return undefined;\n const scale: StaticTransform = this.horizontal() ? { scaleX: -1 } : { scaleY: -1 };\n return [scale];\n });\n\n /**\n * The flip as a style's transform: CSS text, which the engine turns into the list native reads.\n * A style binding validates its values as the DOM's, and warns on a list in development.\n */\n private readonly flipText = computed(() => {\n if (!this.inverted()) return undefined;\n return this.horizontal() ? 'scaleX(-1)' : 'scaleY(-1)';\n });\n\n /**\n * What places a row in flow: the gap after it and the padding across the axis, as margins, since\n * native lays the row out. Empty when there are none, so a plain list commits no margins.\n */\n private readonly flowSpacing = computed<Record<string, unknown>>(() => {\n const gap = this.rowGap();\n const { top, right, bottom, left } = this.edges();\n const spacing: Record<string, number> = this.horizontal()\n ? { marginRight: gap, marginTop: top, marginBottom: bottom }\n : { marginBottom: gap, marginLeft: left, marginRight: right };\n return Object.fromEntries(Object.entries(spacing).filter(([, value]) => value !== 0));\n });\n\n /** A row in flow, flipped back when the list is inverted. One object, so rows never re-clone. */\n private readonly flowStyle = computed(() => {\n const flip = this.flipText();\n const spacing = this.flowSpacing();\n if (!flip && Object.keys(spacing).length === 0) return IN_FLOW;\n return flip ? { ...spacing, transform: flip } : spacing;\n });\n\n /** Top of a row: the leading padding, and every row and gap before it. */\n private topOf(index: number): number {\n const table = this.layout();\n return this.lead() + (table ? table.topOf(index) : index * this.stride());\n }\n\n /** A row's own size, without the gap after it. */\n private heightOf(index: number): number {\n const table = this.layout();\n return table ? table.heightOf(index) - this.rowGap() : (this.itemHeight() as number);\n }\n\n /** First row whose bottom, or the gap after it, is past `y`. */\n private indexAt(y: number): number {\n const table = this.layout();\n const along = y - this.lead();\n if (!table) return Math.max(0, Math.floor(along / this.stride()));\n return table.indexAt(along);\n }\n\n // --- holding position -------------------------------------------------------------------\n\n /** The row the viewport's leading edge is in, taken at each scroll. */\n private anchor: Anchor<T> | null = null;\n /** The last offset seen. A field rather than a signal: reading it renders nothing. */\n private lastOffset = 0;\n /**\n * A correction to make once the commit that needs it is on its way to native: an offset in the\n * rows' own space, after the header, or the very start of the list.\n */\n private pendingScroll: { offset: number; animated: boolean } | 'start' | null = null;\n\n /** What moves the rows: which items, and where each one is. */\n private readonly placement = computed(() => ({\n items: this.items(),\n table: this.table(),\n version: this.measuredVersion(),\n }));\n\n /**\n * The first *visible* row, not the first rendered one, and not the raw scroll offset. A fling\n * produces a scroll event per frame, and setting a signal on each one costs a change-detection\n * pass even when the visible rows are identical. Deriving the index in the handler means most\n * scroll events change nothing and cost nothing.\n *\n * Linked to the rows' placement, because that is when the row on screen can move without the\n * user scrolling: an insert above it, or a row above it measuring differently from its estimate.\n * The index follows the anchored row there, and the offset follows it too.\n */\n private readonly visible = linkedSignal<\n { items: readonly T[]; table: HeightIndex | null; version: number },\n number\n >({\n source: this.placement,\n computation: (placement) => this.reanchor(placement.items),\n });\n\n /** Take the anchor at a row, keeping the viewport where it is. */\n private anchorAt(at: number, offset: number): void {\n const items = this.items();\n if (!items.length) {\n this.anchor = null;\n return;\n }\n const index = Math.min(at, items.length - 1);\n this.anchor = { key: this.keyAt(index), within: offset - this.topOf(index), items, index };\n }\n\n /**\n * Where the row on screen went when the rows moved under it, and the offset that keeps it where\n * the user left it. An insert or a removal is only held when the caller asked for it; a row\n * above measuring differently always is, since nothing the user did moved anything.\n */\n private reanchor(items: readonly T[]): number {\n const anchor = this.anchor;\n // Empty for a moment, as a filter typed through leaves it: the offset is kept for what comes.\n if (!items.length) return 0;\n if (!anchor) return this.atOffset();\n\n const index = this.heldIndex(anchor, items);\n if (index === 'start') return this.showStart();\n if (index < 0) return this.atOffset();\n const held = this.topOf(index) + anchor.within;\n if (Math.abs(held - this.lastOffset) > HOLD_TOLERANCE) {\n this.pendingScroll = { offset: held, animated: false };\n this.lastOffset = held;\n }\n this.anchor = { ...anchor, items, index };\n return index;\n }\n\n /**\n * The row under the offset native is still at, in rows that have just replaced the old ones, as\n * a filter replaces them. Native keeps its offset whatever the items became, so the window is\n * worked out from that, not from the old row's index, which in the new rows sits somewhere else.\n * When the new rows end before that offset, the list is scrolled back to their end: native\n * would otherwise stay scrolled past it, showing nothing until the next drag.\n */\n private atOffset(): number {\n const end = Math.max(0, this.extent() - this.viewport());\n if (this.viewport() > 0 && this.lastOffset > end + HOLD_TOLERANCE) {\n this.pendingScroll = { offset: end, animated: false };\n this.lastOffset = end;\n }\n const index = Math.max(0, Math.min(this.indexAt(this.lastOffset), this.items().length - 1));\n this.anchorAt(index, this.lastOffset);\n return index;\n }\n\n /**\n * The index to hold the viewport at, -1 to let it move, or the start of the list when an\n * insert lands within the autoscroll threshold of it.\n */\n private heldIndex(anchor: Anchor<T>, items: readonly T[]): number | 'start' {\n if (items === anchor.items) return anchor.index;\n const hold = this.maintainVisibleContentPosition();\n if (!hold) return -1;\n const threshold = hold.autoscrollToTopThreshold;\n if (threshold !== undefined && this.lastOffset <= threshold) return 'start';\n const index = this.successorOf(anchor, items);\n return index < (hold.minIndexForVisible ?? 0) ? -1 : index;\n }\n\n /** Scroll to what arrived at the start, rather than holding the viewport past it. */\n private showStart(): number {\n this.anchorAt(0, 0);\n if (this.lastOffset !== 0) this.pendingScroll = 'start';\n this.lastOffset = 0;\n return 0;\n }\n\n /**\n * The anchored row's new index, or the first row after it that survived when it did not. Only\n * the rows that were rendered are searched for a successor: past those the viewport has moved\n * on, and holding it by something off screen would be holding it by nothing the user saw.\n */\n private successorOf(anchor: Anchor<T>, items: readonly T[]): number {\n const keys = this.keys() ?? items;\n const index = keys.indexOf(anchor.key);\n if (index !== -1) return index;\n const extract = this.keyExtractor();\n const was = anchor.items;\n const limit = Math.min(was.length, anchor.index + this.overscan() * 4 + 1);\n for (let i = anchor.index + 1; i < limit; i++) {\n const successor = keys.indexOf(extract ? extract(was[i]!, i) : was[i]);\n if (successor !== -1) return successor;\n }\n return -1;\n }\n\n /** Make a queued correction, after the commit that moved the rows has gone to native. */\n private flushScroll(): void {\n const pending = this.pendingScroll;\n if (!pending) return;\n this.pendingScroll = null;\n if (pending === 'start') this.scrollToOffset({ offset: 0, animated: true });\n else this.scrollToOffset({ offset: this.headerHeight() + pending.offset, animated: false });\n }\n\n /** In development, a list with rows that stays at zero size; see `ZeroSizeWarning`. */\n private readonly zeroSize = checksZeroSize()\n ? new ZeroSizeWarning(\n () => written(this.node),\n () => !!this.horizontal(),\n )\n : null;\n\n constructor() {\n super();\n afterEveryRender(() => {\n this.flushScroll();\n if (this.nativeSticky) this.driveStickyRows();\n });\n const stop = dismissKeyboardOnTap(this.engine, this.node, () =>\n this.keyboardShouldPersistTaps(),\n );\n inject(DestroyRef).onDestroy(() => {\n stop();\n clearTimeout(this.settleTimer);\n this.zeroSize?.stop();\n for (const held of this.drives.values()) held.drive.stop();\n });\n if (this.zeroSize) this.checkZeroSize(this.zeroSize);\n }\n\n /** Whether the viewport has been laid out yet, so a zero in it is a measurement. */\n private viewportMeasured = false;\n\n /**\n * In development, rows that arrive in a list already measured at zero, or go from one, with no\n * new layout to say so: an update to `items` alone does not lay the viewport out again.\n */\n private checkZeroSize(warning: ZeroSizeWarning): void {\n effect(() => {\n const hasRows = this.items().length > 0;\n if (this.viewportMeasured) warning.laidOut(untracked(this.viewport), hasRows);\n });\n }\n\n // --- the window ---------------------------------------------------------------------------\n\n /** The rows to render, and the edges of the run they sit in. */\n private readonly span = computed<Span | null>(() => {\n const items = this.items();\n const viewport = this.viewport();\n const overscan = this.overscan();\n if (!items.length) return null;\n\n const visible = Math.min(this.visible(), items.length - 1);\n const first = Math.max(0, visible - overscan);\n // Before the first layout we have no viewport, so render a screen's worth optimistically\n // rather than nothing: an empty first frame is worse than a few extra rows.\n const budget = viewport > 0 ? viewport : this.heightOf(first) * overscan * 2;\n /*\n * Measured from the top of the first *visible* row, not the first rendered one.\n *\n * Anchoring it at `first` - which is already backed off by the overscan - spent the budget\n * on rows above the viewport, so the window ran out that far before the bottom of the\n * screen. The trailing `+ overscan` hid it whenever every row was the same height, because\n * then the rows added below happened to be worth exactly the rows wasted above. With mixed\n * heights they are not, and the list clips short of its own bottom.\n */\n const top = this.topOf(visible);\n\n let last = visible;\n while (last < items.length && this.topOf(last) < top + budget) last++;\n return { first, last: Math.min(items.length, last + overscan) };\n });\n\n readonly window = computed<VirtualRow<T>[]>(() => {\n const span = this.span();\n if (!span) return [];\n const rows = this.rowsFor(this.items(), span.first, span.last);\n this.trimParked();\n for (const pool of this.parked.values()) rows.push(...pool);\n // The cache exists for rows that stay in the window between scrolls; anything that has left\n // it is rebuilt if it comes back, so the map stays the size of the window, not of the list.\n for (const index of this.slots.keys()) {\n if (index < span.first || index >= span.last) this.slots.delete(index);\n }\n return rows;\n });\n\n /**\n * What stands in for the rows above the window when rows are in flow: their total extent, less\n * a pinned row's, which is rendered in flow ahead of the window.\n */\n protected readonly spacer = computed(() => {\n const span = this.span();\n let lead = span ? this.topOf(span.first) : 0;\n const pinned = this.pinnedIndex();\n if (span && pinned !== null && pinned < span.first) {\n lead = this.nativeSticky ? this.topOf(pinned) : lead - this.heightOf(pinned) - this.rowGap();\n }\n return this.horizontal() ? { width: Math.max(0, lead) } : { height: Math.max(0, lead) };\n });\n\n /** The rows from `first` up to `last`, and the pinned row above them if there is one. */\n private rowsFor(items: readonly T[], first: number, last: number): VirtualRow<T>[] {\n const rows: VirtualRow<T>[] = [];\n const pinned = this.pinnedIndex();\n const pinnedAbove = pinned !== null && pinned < first;\n this.releaseRecycled(first, last, pinnedAbove ? pinned : null);\n // The pinned row is on screen even when its own place in the list is not, which is the whole\n // point of it, so it is rendered whether or not the window reaches that far.\n if (pinnedAbove) {\n const key = this.keyAt(pinned);\n rows.push(\n this.hold({\n index: pinned,\n slot: this.recycledSlot(key, items[pinned]!, pinned),\n key,\n item: items[pinned]!,\n style: this.nativeSticky\n ? this.stickyStyle(pinned)\n : this.measuring()\n ? this.pinnedFlowStyle(this.topOf(first) - this.heightOf(pinned) - this.rowGap())\n : this.slotStyle(pinned, this.offset()),\n }),\n );\n }\n for (let index = first; index < last; index++) {\n const key = this.keyAt(index);\n rows.push(\n this.hold({\n index,\n slot: this.recycledSlot(key, items[index]!, index),\n key,\n item: items[index]!,\n style: this.styleFor(index, index === pinned),\n }),\n );\n }\n if (pinnedAbove && this.nativeSticky && this.measuring()) this.leadWindow(rows, pinned, first);\n return rows;\n }\n\n /**\n * A pinned row native moves stays at its own place, so the rows between it and the window are\n * made up before the window rather than after the row: new props on a view native is moving\n * put its transform back for a frame.\n */\n private leadWindow(rows: VirtualRow<T>[], pinned: number, first: number): void {\n const lead = rows[1];\n // The pinned row's own gap already follows it in flow.\n const between = this.topOf(first) - this.topOf(pinned) - this.heightOf(pinned) - this.rowGap();\n if (!lead || between <= 0) return;\n const margin = this.horizontal() ? 'marginLeft' : 'marginTop';\n rows[1] = this.hold({ ...lead, style: { ...lead.style, [margin]: between } });\n }\n\n private styleFor(index: number, pinned: boolean): Record<string, unknown> {\n if (this.nativeSticky && this.nextSticky().has(index)) return this.stickyStyle(index);\n if (this.measuring()) {\n return pinned ? this.pinnedFlowStyle(this.topOf(index)) : this.flowStyle();\n }\n return pinned ? this.slotStyle(index, this.offset()) : this.slotStyle(index);\n }\n\n /** A pinned row in flow, moved from where flow put it to the leading edge by a transform. */\n private pinnedFlowStyle(at: number): Record<string, unknown> {\n const shift = Math.max(0, this.offset() - at);\n const move = `${this.horizontal() ? 'translateX' : 'translateY'}(${shift}px)`;\n const flip = this.flipText();\n return { ...this.flowSpacing(), zIndex: 1, transform: flip ? `${move} ${flip}` : move };\n }\n\n /**\n * A sticky row native moves: at its own place, with the translate native had reached when\n * scrolling paused, so the props agree with what is on screen.\n */\n private stickyStyle(index: number): Record<string, unknown> {\n const horizontal = this.horizontal();\n const style: Record<string, unknown> = this.measuring()\n ? { ...this.flowSpacing() }\n : { ...this.slotStyle(index) };\n style['zIndex'] = 1;\n const top = this.topOf(index);\n const shift = Math.min(Math.max(0, this.settled() - top), this.stopOf(index) - top);\n const move = shift > 0 ? `${horizontal ? 'translateX' : 'translateY'}(${shift}px)` : '';\n const transform = [move, this.flipText() ?? ''].filter(Boolean).join(' ');\n if (transform) style['transform'] = transform;\n return style;\n }\n\n /** Each sticky row, and the one after it, which pushes it off. */\n private readonly nextSticky = computed(() => {\n const sticky = this.stickyIndices();\n return new Map(sticky.map((index, at) => [index, sticky[at + 1]]));\n });\n\n /** Where a sticky row stops, pushed off by the next: that row's top, less this row's size. */\n private stopOf(index: number): number {\n const next = this.nextSticky().get(index);\n return next === undefined ? Infinity : this.topOf(next) - this.heightOf(index);\n }\n\n /**\n * How native moves a rendered row, or null when it does not: along the scroll view's own\n * offset, which counts the header, from the row's top until the next sticky row pushes it off.\n */\n private stickyDrive(\n row: VirtualRow<T>,\n ): { range: ScrollRange; statics: readonly StaticTransform[] } | null {\n if (!this.nativeSticky || row.parked || !this.nextSticky().has(row.index)) return null;\n const header = this.headerHeight();\n const start = header + this.topOf(row.index);\n return {\n range: pinnedRange(start, header + this.stopOf(row.index)),\n statics: this.flip() ?? [],\n };\n }\n\n /**\n * Hand each rendered sticky row's view to native to move, and let go of the rest. The rows'\n * views are the canvas's element children in window order, after the spacer, which is how\n * `@for` over `window()` leaves them.\n */\n private driveStickyRows(): void {\n if (!this.pinning() && this.drives.size === 0) return;\n const canvas = this.canvasView().nativeElement as HostNode;\n const views = canvas.children\n .filter((child) => child.kind === 'element')\n .slice(this.measuring() ? 1 : 0);\n const axis = this.horizontal() ? 'x' : 'y';\n const live = new Set<HostNode>();\n this.window().forEach((row, at) => {\n const view = views[at];\n const next = this.stickyDrive(row);\n if (!view || !next) return;\n live.add(view);\n const statics = JSON.stringify(next.statics);\n const held = this.drives.get(view);\n if (held?.statics === statics) return held.drive.update(next.range);\n held?.drive.stop();\n const drive = this.engine.driveByScroll(view, this.node, axis, next.range, next.statics);\n if (drive) this.drives.set(view, { drive, statics });\n });\n for (const [view, held] of this.drives) {\n if (live.has(view)) continue;\n held.drive.stop();\n this.drives.delete(view);\n }\n }\n\n /** Which recycling slot each rendered item holds, by key: its type, and the row it last drew. */\n private readonly recycled = new Map<\n unknown,\n { slot: number; type: unknown; row: VirtualRow<T> | null }\n >();\n /** Slots that have left the window and are kept hidden, by the type of row that held them. */\n private readonly parked = new Map<unknown, VirtualRow<T>[]>();\n private nextSlot = 0;\n\n /** Note the row a slot is drawing, for parking it once it leaves. */\n private hold(row: VirtualRow<T>): VirtualRow<T> {\n const held = this.recycled.get(row.key);\n if (held) held.row = row;\n return row;\n }\n\n /**\n * Park the slots of the items that have left the window, for the items arriving.\n *\n * Parked rather than freed: a slot missing from the window is destroyed by `@for`, so a slot is\n * only reused if a row of its type arrives in the same pass as it left. Kept rendered and\n * hidden, it waits for the next row of its type however many passes later, which is what a\n * reuse queue of cells does in UIKit.\n */\n private releaseRecycled(first: number, last: number, pinned: number | null): void {\n const keep = new Set<unknown>();\n for (let index = first; index < last; index++) keep.add(this.keyAt(index));\n if (pinned !== null) keep.add(this.keyAt(pinned));\n for (const [key, held] of this.recycled) {\n if (keep.has(key)) continue;\n this.recycled.delete(key);\n let pool = this.parked.get(held.type);\n if (!pool) this.parked.set(held.type, (pool = []));\n pool.push({ ...(held.row ?? this.placeholder(key, held.slot)), parked: true, style: PARKED });\n }\n }\n\n /**\n * Keep a few hidden slots of each type once this pass has taken what it needs, dropping the\n * oldest: `@for` destroys the views of a slot that leaves the window for good.\n */\n private trimParked(): void {\n for (const pool of this.parked.values()) {\n if (pool.length > PARK_LIMIT) pool.splice(0, pool.length - PARK_LIMIT);\n }\n }\n\n /** A parked row for a slot that never drew, which only a slot taken and left in one pass is. */\n private placeholder(key: unknown, slot: number): VirtualRow<T> {\n return { index: -1, slot, key, item: this.items()[0]!, style: PARKED };\n }\n\n private recycledSlot(key: unknown, item: T, index: number): number {\n const held = this.recycled.get(key);\n if (held) return held.slot;\n const type = this.itemType()?.(item, index);\n const slot = this.parked.get(type)?.pop()?.slot ?? this.nextSlot++;\n this.recycled.set(key, { slot, type, row: null });\n return slot;\n }\n\n /**\n * A row laid itself out; what `virtualListRow` calls. Only a row that sizes itself is measured,\n * and a height that has not changed changes nothing.\n */\n measureRow(row: VirtualRow<T>, layout: { width?: number; height?: number } | undefined): void {\n if (!this.measuring() || !layout || row.parked) return;\n const size = this.horizontal() ? layout.width : layout.height;\n if (size === undefined || this.measured.get(row.key) === size) return;\n this.measured.set(row.key, size);\n this.forgetDeparted();\n const index = this.indexOfKey()?.get(row.key);\n if (index === undefined) return;\n this.table()?.set(index, size + this.rowGap());\n this.measuredVersion.update((version) => version + 1);\n }\n\n /** Drop the measurements of items long gone, so churn cannot grow the map without bound. */\n private forgetDeparted(): void {\n const items = this.items();\n if (this.measured.size <= items.length * 2 + 64) return;\n const current = new Set(this.keys() ?? items);\n for (const key of this.measured.keys()) if (!current.has(key)) this.measured.delete(key);\n }\n\n /** A separator for every rendered row but the list's last, in its leading row's slot. */\n protected readonly gaps = computed<Gap<T>[]>(() => {\n if (!this.separator()) return [];\n const items = this.items();\n const gaps: Gap<T>[] = [];\n for (const row of this.window()) {\n if (row.parked || row.index >= items.length - 1) continue;\n const style = this.measuring() ? this.measuredGapStyle(row) : this.gapStyle(row);\n if (!style) continue;\n const trailingItem = items[row.index + 1]!;\n gaps.push({\n index: row.index,\n style,\n context: {\n $implicit: row.item,\n leadingItem: row.item,\n trailingItem,\n leadingIndex: row.index,\n },\n });\n }\n return gaps;\n });\n\n /** The row's own slot, laid out to put the separator at its trailing edge. */\n private gapStyle(row: VirtualRow<T>): Record<string, unknown> {\n let style = this.gapStyles.get(row.style);\n if (!style) {\n style = {\n ...row.style,\n flexDirection: this.horizontal() ? 'row' : 'column',\n justifyContent: 'flex-end',\n pointerEvents: 'box-none',\n };\n this.gapStyles.set(row.style, style);\n }\n return style;\n }\n\n /**\n * A measured row's slot, over the row itself: nothing until its height is known, since drawing\n * it at the estimate would put a line through the middle of a row that turns out taller.\n */\n private measuredGapStyle(row: VirtualRow<T>): Record<string, unknown> | null {\n if (!this.measured.has(row.key)) return null;\n const start = this.topOf(row.index);\n const size = this.heightOf(row.index);\n const horizontal = this.horizontal();\n const flip = this.flipText();\n const across = this.across();\n const cached = this.measuredGaps.get(row.key);\n const placed = horizontal\n ? { ...across, left: start, width: size, transform: flip }\n : { ...across, top: start, height: size, transform: flip };\n if (cached && holds(cached, placed)) return cached;\n const style: Record<string, unknown> = horizontal\n ? { position: 'absolute', ...across, left: start, width: size, flexDirection: 'row' }\n : { position: 'absolute', ...across, top: start, height: size };\n style['justifyContent'] = 'flex-end';\n style['pointerEvents'] = 'box-none';\n if (flip) style['transform'] = flip;\n this.measuredGaps.set(row.key, style);\n if (this.measuredGaps.size > 256) this.measuredGaps.clear();\n return style;\n }\n\n /**\n * The header's translation while it is pinned: the scroll position, held back at zero by an\n * overscroll and at the first sticky row, which pushes it off.\n */\n protected readonly headerStyle = computed(() => {\n const flip = this.flipText();\n if (!this.stickyHeader()) return flip ? { transform: flip } : undefined;\n const along = this.offset() + this.headerHeight();\n const first = this.stickyIndices()[0];\n const limit = first === undefined ? Infinity : this.topOf(first);\n const shift = Math.min(Math.max(0, along), limit);\n const move = shift > 0 ? `${this.horizontal() ? 'translateX' : 'translateY'}(${shift}px)` : '';\n const transform = [move, flip ?? ''].filter(Boolean).join(' ');\n return transform ? { zIndex: 1, transform } : { zIndex: 1 };\n });\n\n /**\n * The footer, flipped back like every row when the list is inverted, as FlatList inverts its\n * header and footer cells too; otherwise both read upside down.\n */\n protected readonly footerStyle = computed(() => {\n const flip = this.flipText();\n return flip ? { transform: flip } : undefined;\n });\n\n /**\n * The sticky row currently holding the leading edge: the last one at or before the offset.\n * Null when the list has scrolled back above the first of them.\n */\n private readonly pinnedIndex = computed<number | null>(() => {\n const sticky = this.stickyIndices();\n if (sticky.length === 0) return null;\n const offset = this.offset();\n\n let pinned: number | null = null;\n for (const index of sticky) {\n if (this.topOf(index) <= offset) pinned = index;\n else break;\n }\n return pinned;\n });\n\n /** Which rows are on screen far enough to count, by the caller's threshold. */\n private viewableAt(offset: number): number[] {\n const viewport = this.viewport();\n if (!viewport) return [];\n\n const threshold = this.itemVisiblePercentThreshold() / 100;\n const rows: number[] = [];\n for (const row of this.window()) {\n if (row.parked) continue;\n const start = this.topOf(row.index);\n const size = this.heightOf(row.index);\n const shown = Math.min(start + size, offset + viewport) - Math.max(start, offset);\n if (shown > 0 && shown >= size * threshold) rows.push(row.index);\n }\n return rows;\n }\n\n /** The last set announced, so the output fires on a change rather than on every frame. */\n private announced: number[] = [];\n\n /**\n * Announce a change in what is on screen.\n *\n * Deliberately not a `computed` over a signal offset. A fling produces a scroll event per\n * frame, and writing a signal on each one costs a change-detection pass whether or not anything\n * moved into view; comparing here costs an array walk over the window and emits only when the\n * set really changed.\n */\n private announceViewable(offset: number): void {\n const viewable = this.viewableAt(offset);\n const entered = viewable.filter((index) => !this.announced.includes(index));\n const left = this.announced.filter((index) => !viewable.includes(index));\n if (entered.length === 0 && left.length === 0) return;\n\n this.announced = viewable;\n const items = this.items();\n this.viewableItemsChanged.emit({\n viewable: viewable.map((index) => {\n const key = this.keyAt(index);\n return {\n index,\n // What is viewable is in the window, so it holds a slot already.\n slot: this.recycled.get(key)?.slot ?? -1,\n key,\n item: items[index]!,\n style: this.styleFor(index, false),\n };\n }),\n entered,\n left,\n });\n }\n\n /**\n * Scroll so that a row is at the start of the viewport, less `viewOffset`. The window moves\n * there at once, and the row is held there while the rows around it are measured.\n */\n scrollToIndex(options: { index: number; animated?: boolean; viewOffset?: number }): void {\n const items = this.items();\n if (!items.length) return;\n const index = Math.max(0, Math.min(options.index, items.length - 1));\n const within = -(options.viewOffset ?? 0);\n const offset = this.topOf(index) + within;\n this.lastOffset = offset;\n this.anchor = { key: this.keyAt(index), within, items, index };\n this.visible.set(index);\n this.scrollToOffset({ offset: this.headerHeight() + offset, animated: options.animated });\n }\n\n /** Scroll to an offset along the list's own axis: x when it is horizontal, y otherwise. */\n scrollToOffset(options: { offset: number; animated?: boolean }): void {\n const { offset, animated = true } = options;\n const [x, y] = this.horizontal() ? [offset, 0] : [0, offset];\n this.engine.dispatchCommand(this.node, 'scrollTo', [x, y, animated]);\n }\n\n scrollToEnd(options: { animated?: boolean } = {}): void {\n this.engine.dispatchCommand(this.node, 'scrollToEnd', [options.animated ?? true]);\n }\n\n private slotStyle(index: number, pinnedAt?: number): Record<string, unknown> {\n const start = pinnedAt ?? this.topOf(index);\n const size = this.heightOf(index);\n const horizontal = this.horizontal();\n const key = horizontal ? 'left' : 'top';\n const extent = horizontal ? 'width' : 'height';\n\n const flip = this.flipText();\n const across = this.across();\n\n let style = this.slots.get(index);\n // The flip is part of the comparison because turning the list over changes every row, and a\n // cached slot would otherwise keep the orientation it was built with.\n const placed = { ...across, [extent]: size, [key]: start, transform: flip };\n const stale = !style || pinnedAt !== undefined || !holds(style, placed);\n\n if (stale) {\n style = horizontal\n ? { position: 'absolute', ...across, left: start, width: size }\n : { position: 'absolute', ...across, top: start, height: size };\n // A pinned row draws over the ones sliding under it; the transform is the row's half of\n // the inversion.\n if (pinnedAt !== undefined) style['zIndex'] = 1;\n if (flip) style['transform'] = flip;\n this.slots.set(index, style);\n return style;\n }\n return style!;\n }\n\n protected onScroll(\n event: NativeSyntheticEvent<{ contentOffset?: { x?: number; y?: number } }>,\n ): void {\n const contentOffset = event.nativeEvent?.contentOffset;\n const along = (this.horizontal() ? contentOffset?.x : contentOffset?.y) ?? 0;\n const content = along - this.headerHeight();\n\n // The first *visible* row, not the first rendered one. The overscan is applied where the\n // window is built, so that both edges can be measured from the same place.\n // Not clamped to the items: an input set in the same task as this event has not reached the\n // list yet, and the window clamps when it renders.\n const visible = this.indexAt(content);\n if (visible !== this.visible()) this.visible.set(visible);\n this.lastOffset = content;\n this.anchorAt(visible, content);\n // A pinned row follows the scroll continuously, so with sticky rows the offset has to be a\n // signal - and only then. Without them this stays a field, and a fling that moves no row in\n // or out of the window costs no change detection at all.\n if (this.pinning()) this.offset.set(content);\n if (this.nativeSticky && this.pinning()) this.settleAfterPause(content);\n this.checkEnd(along);\n this.announceViewable(content);\n }\n\n /** A pinned row's translate, settled once scrolling pauses: see `STICKY_SETTLE_MS`. */\n private settleAfterPause(content: number): void {\n clearTimeout(this.settleTimer);\n this.settleTimer = setTimeout(() => this.settled.set(content), STICKY_SETTLE_MS);\n }\n\n protected onLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n const layout = event.nativeEvent?.layout;\n this.viewport.set((this.horizontal() ? layout?.width : layout?.height) ?? 0);\n this.viewportMeasured = true;\n this.zeroSize?.laidOut(this.viewport(), this.items().length > 0);\n this.announceViewable(this.lastOffset);\n }\n\n /** The header's extent along the axis, which every row sits after. */\n protected onHeaderLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n const layout = event.nativeEvent?.layout;\n const height = (this.horizontal() ? layout?.width : layout?.height) ?? 0;\n if (height === this.headerHeight()) return;\n this.headerHeight.set(height);\n this.holdPastHeader();\n }\n\n /**\n * The header grew or shrank - a typing indicator in a chat's, a banner in a feed's - and every\n * row moved with it. Held like an insert when the caller asked for that and the viewport is\n * past the header, among the rows; at the start the user is looking at the header, and it is\n * left to push the rows along. Made at once rather than after a render, because a layout arrives\n * outside change detection and nothing else may be about to render.\n */\n private holdPastHeader(): void {\n const hold = this.maintainVisibleContentPosition();\n if (!hold || this.lastOffset <= (hold.autoscrollToTopThreshold ?? 0)) return;\n this.scrollToOffset({ offset: this.headerHeight() + this.lastOffset, animated: false });\n }\n\n protected onContentSize(event: NativeSyntheticEvent<{ width?: number; height?: number }>): void {\n const size = event.nativeEvent;\n this.contentSize = (this.horizontal() ? size?.width : size?.height) ?? 0;\n }\n\n private checkEnd(y: number): void {\n const count = this.items().length;\n const viewport = this.viewport();\n if (!count || !viewport) return;\n const total = this.contentSize || this.headerHeight() + this.extent();\n const distanceFromEnd = total - (y + viewport);\n // Away from the end again re-arms it, as React Native does, so a load that failed is retried\n // the next time the user comes back down.\n if (distanceFromEnd > this.endReachedThreshold() * viewport) {\n this.endReachedFor = -1;\n return;\n }\n if (this.endReachedFor === count) return;\n this.endReachedFor = count;\n this.endReached.emit({ distanceFromEnd });\n }\n}\n\n/** Whether a cached slot style already has every one of these props. */\nfunction holds(style: Record<string, unknown>, props: Record<string, unknown>): boolean {\n return Object.entries(props).every(([prop, value]) => style[prop] === value);\n}\n\n/**\n * Put on each row's view: `<view [virtualListRow]=\"row\">`. Applies the row's style, and reports\n * the row's layout to the list, which is how a list of rows that size themselves learns how tall\n * each one is.\n */\n@Directive({\n selector: '[virtualListRow]',\n host: {\n '[style]': 'row().style',\n '(layout)': 'onLayout($event)',\n },\n})\nexport class VirtualListRow<T = unknown> {\n readonly row = input.required<VirtualRow<T>>({ alias: 'virtualListRow' });\n private readonly list = inject<VirtualList<T>>(VirtualList);\n\n protected onLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n this.list.measureRow(this.row(), event.nativeEvent?.layout);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../src/virtual-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,eAAe,EACf,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAML,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAkC,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;AA0EzD;;;GAGG;AAEH,MAAM,OAAO,oBAAoB;IACtB,QAAQ,GAAG,MAAM,CAA8C,WAAW,CAAC,CAAC;IAErF,MAAM,CAAC,sBAAsB,CAC3B,UAAmC,EACnC,OAAgB;QAEhB,OAAO,IAAI,CAAC;IACd,CAAC;uGARU,oBAAoB;2FAApB,oBAAoB;;2FAApB,oBAAoB;kBADhC,SAAS;mBAAC,EAAE,QAAQ,EAAE,mCAAmC,EAA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;mBAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE;wBACJ,SAAS,EAAE,aAAa;wBACxB,8CAA8C;wBAC9C,oBAAoB,EAAE,4BAA4B;wBAClD,UAAU,EAAE,kBAAkB;qBAC/B;iBACF","sourcesContent":["import {\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n afterEveryRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n inject,\n input,\n linkedSignal,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n type HostNode,\n type NativeSyntheticEvent,\n type ScrollDrive,\n type ScrollRange,\n type StaticTransform,\n nativePlatform,\n pinnedRange,\n} from '@ng-native/fabric';\nimport { HeightIndex } from './height-index.ts';\nimport { type KeyboardShouldPersistTaps, dismissKeyboardOnTap } from './keyboard-taps.ts';\nimport { RefreshControl } from './refresh-control.ts';\nimport { STICKY_SETTLE_MS } from './sticky-headers.ts';\nimport { TemplateSlot } from './template-slot.ts';\nimport { ZeroSizeWarning, checksZeroSize, written } from './zero-size-warning.ts';\nimport { View } from './view.ts';\nimport { ScrollViewProps } from './scroll-view-props.ts';\n\n/** One rendered row: the item, its index, and a stable style object for its slot. */\nexport interface VirtualRow<T> {\n readonly index: number;\n /**\n * A key that a row keeps while its item stays in the window, and that passes to a row arriving\n * once it has left. `track row.slot` recycles rows: the view of a row scrolling out is reused for\n * the one scrolling in, with only its bindings updated, rather than one destroyed and one created\n * each time. A slot follows its item, not its position, so an insert above the window moves no\n * row to another item.\n */\n readonly slot: number;\n /**\n * The item's identity, from `keyExtractor`, or the item itself without one. `track row.key`\n * gives each item a view of its own for as long as it is in the window and never recycles one,\n * which is what a row holding state of its own, or animating, needs.\n */\n readonly key: unknown;\n readonly item: T;\n readonly style: Record<string, unknown>;\n /**\n * A slot kept rendered but hidden, still bound to the last item it showed, so the next row of\n * its type to arrive reuses its views instead of building them. Always last in the window.\n */\n readonly parked?: true;\n}\n\n/**\n * Space around the rows, inside the scrolling content: one number for every side, or a side each,\n * as FlatList's `contentContainerStyle` padding.\n */\nexport type VirtualListPadding =\n | number\n | {\n readonly top?: number;\n readonly right?: number;\n readonly bottom?: number;\n readonly left?: number;\n };\n\n/** The padding on each side, in points. */\ninterface Edges {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\n/** A row height: one for every row, or one per item. */\nexport type VirtualItemHeight<T> = number | ((item: T, index: number) => number);\n\n/**\n * Keep what is on screen where it is when rows are added or removed before it, as\n * `ScrollView`'s `maintainVisibleContentPosition` does in React Native.\n */\nexport interface VirtualListVisiblePosition {\n /** Rows before this index are never what the position is held by. Defaults to 0. */\n readonly minIndexForVisible?: number;\n /**\n * Within this many points of the start, show what arrived instead of holding position: a feed\n * at its top scrolls to the new posts, a chat at its newest message follows the next one.\n */\n readonly autoscrollToTopThreshold?: number;\n}\n\n/** What a separator template is given: the rows either side of it, as FlatList's `leadingItem`. */\nexport interface VirtualListSeparatorContext<T> {\n readonly $implicit: T;\n readonly leadingItem: T;\n readonly trailingItem: T;\n readonly leadingIndex: number;\n}\n\n/**\n * Marks the template drawn between two rows: `<ng-template virtualListSeparator let-leading>`.\n * FlatList's `ItemSeparatorComponent`.\n */\n@Directive({ selector: 'ng-template[virtualListSeparator]' })\nexport class VirtualListSeparator<T = unknown> {\n readonly template = inject<TemplateRef<VirtualListSeparatorContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _directive: VirtualListSeparator<T>,\n context: unknown,\n ): context is VirtualListSeparatorContext<T> {\n return true;\n }\n}\n\n/** One separator the list is drawing: its slot, and what its template is told. */\ninterface Gap<T> {\n readonly index: number;\n readonly style: Record<string, unknown>;\n readonly context: VirtualListSeparatorContext<T>;\n}\n\n/**\n * A parked slot: out of the flow, out of sight and out of reach, with its view kept to be used\n * again. Not `display: none`, which is an element with no view. A screen reader passes over a\n * view with no opacity, and `VirtualListRow` says so outright where a row uses it. Moved off the\n * list as well, since `pointer-events: none` is CSS's: something inside a row with a\n * `pointer-events` of its own would still take a touch where the row was left.\n */\nconst PARKED: Record<string, unknown> = Object.freeze({\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n transform: 'translateX(-100000px)',\n});\n\n/** How many hidden slots of each row type are kept ready for reuse. */\nconst PARK_LIMIT = 6;\n\n/** The style of a row that sizes itself and needs nothing else: in flow, where it falls. */\nconst IN_FLOW: Record<string, unknown> = Object.freeze({});\n\n/** Points of drift below which a held position is left alone, as UIKit rounds to half-points. */\nconst HOLD_TOLERANCE = 0.5;\n\n/** The row a held position is held by: its key, and how far into it the viewport starts. */\ninterface Anchor<T> {\n readonly key: unknown;\n readonly within: number;\n /** The items the anchor was taken against, to look for a successor in if its row goes. */\n readonly items: readonly T[];\n readonly index: number;\n}\n\n/** What the window is built from: the visible row and the edges of what is rendered. */\ninterface Span {\n readonly first: number;\n readonly last: number;\n}\n\n/**\n * Windowed list: a native scroll view whose content is sized to the full list, with only the\n * visible slice rendered. Commits as `RCTScrollView`.\n *\n * RN's FlatList, SectionList and VirtualizedList are a large React component tree, and none of\n * it is reachable. This is the small equivalent. Angular's own `@for` does the rendering, so\n * tracking, reuse and destruction all behave normally, and the loop stays in the caller's\n * template:\n *\n * ```html\n * <virtual-list #list [items]=\"rows()\" [itemHeight]=\"44\" (endReached)=\"loadMore()\">\n * <text listHeader>Header</text>\n * @for (row of list.window(); track row.slot) {\n * <view [virtualListRow]=\"row\"><text>{{ row.item.label }}</text></view>\n * }\n * <text listFooter>Footer</text>\n * </virtual-list>\n * ```\n *\n * With `itemHeight`, every row's size is known up front and each is absolutely positioned at its\n * offset. Without it, rows size themselves, as a feed's posts and a chat's messages do: the window\n * is laid out in normal flow after a spacer standing in for the rows above it, so native places\n * every row correctly in the frame it first appears, and each row's layout tells the list its\n * height for sizing what is not rendered. Until a row has been measured it counts as\n * `estimatedItemHeight`. Measurements are kept by `keyExtractor`, so they follow their item across\n * inserts, removals and moves. `virtualListRow` on each row's view applies its style and reports\n * its layout; `[style]=\"row.style\"` still works for fixed heights, which need no measuring.\n *\n * Content marked `listHeader` and `listFooter` renders above and below the rows in normal flow,\n * as FlatList's header and footer components do. A `<refresh-control>` projects like any child.\n *\n * `<ng-template virtualListSeparator let-leading let-trailing=\"trailingItem\">` is drawn between\n * each pair of rows and not after the last, as FlatList's `ItemSeparatorComponent` is. It is drawn\n * inside the leading row's slot, at its trailing edge, so `itemHeight` includes it the way\n * `getItemLayout`'s `length` includes it in RN; a measured row has it drawn over its trailing edge\n * once its height is known. The slot it sits in lets touches through to the row underneath.\n *\n * `horizontal` swaps the axis: rows are placed by `left` and sized by `width`, and the offset is\n * read from `contentOffset.x`. `inverted` is a scale of -1 on the list and on each row, which is\n * how FlatList does it too - the list scrolls from the bottom and each row is flipped back the\n * right way up. The first item is the one at the bottom, so a chat passes its messages newest\n * first.\n *\n * `stickyIndices` pins a row to the leading edge while the rows under it scroll past, which is\n * FlatList's `stickyHeaderIndices` counted without the header. `stickyHeader` pins the\n * `listHeader` content the same way, FlatList's index 0 when it has a `ListHeaderComponent`, and\n * the first sticky row pushes it off as RN's sticky headers push each other. Neither is native:\n * RN's `ScrollView.js` translates a sticky child against the scroll offset in JavaScript, and a\n * row here follows the offset the same way while it is the current one - by its `top` when\n * absolutely positioned, by a transform when in flow.\n *\n * What is on screen stays on screen when a measured row above it turns out taller or shorter than\n * its estimate: the offset is corrected by the difference. `maintainVisibleContentPosition` does\n * the same for rows inserted or removed above it, which a feed receiving new posts and a chat\n * loading older messages above the ones being read both need.\n *\n * ponytail: viewability is `itemVisiblePercentThreshold` only: `minimumViewTime` and\n * `waitForInteraction` are timing policy on top of the same measurement, and nothing has needed\n * them. A separator is not told `highlighted`, which RN drives from the row's press state. A\n * sticky header follows the scroll a commit behind native, where RN's is on the native driver. A\n * held position is restored by a `scrollTo` after the commit, not in the mount as native\n * `maintainVisibleContentPosition` is, so a correction made mid-fling lands where the last scroll\n * event said the list was.\n */\n@Component({\n selector: 'virtual-list',\n exportAs: 'virtualList',\n imports: [TemplateSlot, View],\n // One content view holds the header, the rows and the footer, as ScrollView.js's content\n // container does: Android's ScrollView takes one child and throws on a second. It is never\n // collapsed, or Fabric would flatten it away and hand the scroll view all three again.\n // See ScrollView: the canvas carries only a height, so Fabric would flatten it away and drags\n // over the gaps between rows would not scroll. Separators come after the rows so they draw over\n // the slot they share. The spacer is there only when rows are in flow.\n // A refresh control comes first, as the scroll view's own child; see ScrollView.\n template: `\n <ng-content select=\"refresh-control\" />\n <view [style]=\"content()\" collapsable=\"false\">\n <view [style]=\"headerStyle()\" (layout)=\"onHeaderLayout($event)\"\n ><ng-content select=\"[listHeader]\"\n /></view>\n <view #rows [style]=\"canvas()\" collapsable=\"false\">\n @if (measuring()) {\n <view [style]=\"spacer()\"></view>\n }\n <ng-content />\n @if (separator(); as separator) {\n @for (gap of gaps(); track gap.index) {\n <view [style]=\"gap.style\"\n ><ng-container\n [templateSlot]=\"separator.template\"\n [templateSlotContext]=\"gap.context\"\n /></view>\n }\n }\n </view>\n <view [style]=\"footerStyle()\"><ng-content select=\"[listFooter]\" /></view>\n </view>\n `,\n host: {\n // ScrollView.js's `baseHorizontal`: a column would stack the header, canvas and footer, and\n // the canvas, holding only absolutely positioned rows, would have no height to give them. A\n // top-level prop, as on <scroll-view>, so the caller's own [style] still applies over it.\n '[flexDirection]': \"horizontal() ? 'row' : 'column'\",\n '[horizontal]': 'horizontal()',\n '[nestedScrollEnabled]': 'nestedScroll()',\n // A prop rather than `[style.transform]`: Angular stringifies a style binding, and a\n // transform is a list of objects. The engine flattens style into props anyway, so this is\n // where it would have ended up.\n '[transform]': 'flip()',\n '[scrollEventThrottle]': 'scrollEventThrottle()',\n '(scroll)': 'onScroll($event)',\n '(layout)': 'onLayout($event)',\n '(contentSizeChange)': 'onContentSize($event)',\n },\n})\nexport class VirtualList<T> extends ScrollViewProps {\n readonly items = input.required<readonly T[]>();\n /**\n * A fixed height, or a function for variable ones, when every row's size is known up front. The\n * function form builds a cumulative offset table and binary-searches it, which is what section\n * lists need: a header row and an item row are different heights, so uniform maths cannot place\n * them. Leave it unset for rows that size themselves.\n */\n readonly itemHeight = input<VirtualItemHeight<T>>();\n /**\n * What a row that sizes itself counts as until it has been measured. The closer it is, the more\n * honest the scroll bar is and the less a jump to an unmeasured row has to correct.\n */\n readonly estimatedItemHeight = input<VirtualItemHeight<T>>(50);\n /**\n * Space around the rows, inside the scrolling content. The leading side comes before the first\n * row and the trailing side after the last; the sides across the axis inset every row. The\n * header and footer sit outside it, as FlatList's do outside `contentContainerStyle`.\n */\n readonly contentPadding = input<VirtualListPadding>(0);\n /** Space between one row and the next, along the axis: not before the first or after the last. */\n readonly rowGap = input(0, { transform: numberAttribute });\n /**\n * An item's identity, as FlatList's `keyExtractor`: what a measured height, a slot and a held\n * position follow across an insert. Without it an item is its own key, which is enough for items\n * that are replaced, not copied, when they change.\n */\n readonly keyExtractor = input<(item: T, index: number) => unknown>();\n /**\n * What kind of row an item is, when rows of different kinds share the list: a text post and a\n * photo post, a message and a date divider. A slot is only ever recycled into a row of the same\n * type, so its views are reused rather than torn down for another kind's, as UIKit's reuse\n * identifiers and FlashList's `getItemType` do.\n */\n readonly itemType = input<(item: T, index: number) => unknown>();\n /** Keep what is on screen still when rows are inserted or removed before it. */\n readonly maintainVisibleContentPosition = input<VirtualListVisiblePosition>();\n /** Rows rendered beyond each edge of the viewport, to cover fling gaps. */\n readonly overscan = input(4, { transform: numberAttribute });\n /** How close to the end, in viewport heights, `(endReached)` fires. RN's default is 2. */\n readonly endReachedThreshold = input(2, { transform: numberAttribute });\n\n /** Lay the rows out along x instead of y, and scroll that way. */\n readonly horizontal = input(false, { transform: booleanAttribute });\n /** Start at the end and scroll backwards, with every row flipped back the right way up. */\n readonly inverted = input(false, { transform: booleanAttribute });\n /**\n * Rows that pin to the leading edge while the ones under them scroll past. Ascending; a row is\n * pinned from the moment it would leave until the next sticky row pushes it off.\n */\n readonly stickyIndices = input<readonly number[]>([]);\n /** Pin the `listHeader` content to the leading edge until the first sticky row pushes it off. */\n readonly stickyHeader = input(false, { transform: booleanAttribute });\n /** What a tap in the list does while a text input has the keyboard up. See `ScrollView`. */\n readonly keyboardShouldPersistTaps = input<KeyboardShouldPersistTaps>('never');\n /** How much of a row must be on screen to count as viewable. RN's default is 0, meaning any. */\n readonly itemVisiblePercentThreshold = input(0, { transform: numberAttribute });\n\n /**\n * The scroll position is within `endReachedThreshold` of the end: once per item count, and again\n * after the list has scrolled away from the end and come back.\n */\n readonly endReached = output<{ distanceFromEnd: number }>();\n\n /** Which rows are on screen, and what changed since last time. */\n readonly viewableItemsChanged = output<{\n viewable: readonly VirtualRow<T>[];\n entered: readonly number[];\n left: readonly number[];\n }>();\n\n private readonly viewport = signal(0);\n /** The leading edge of the viewport in content space, which sticky rows and viewability need. */\n private readonly offset = signal(0);\n private readonly headerHeight = signal(0);\n /** What native reported the content measures along the axis, once it has. */\n private contentSize = 0;\n /** The rows' own extent when native reported that, so a report for other rows is not used. */\n private contentSizeFor = -1;\n /** The item count `endReached` last fired for, cleared once the list is away from the end. */\n private endReachedFor = -1;\n\n /** Slot styles are cached so a scroll does not hand Fabric new prop objects for stable rows. */\n private readonly slots = new Map<number, Record<string, unknown>>();\n /** A separator's slot style, per row slot style, so it is as stable as the row's own. */\n private readonly gapStyles = new WeakMap<object, Record<string, unknown>>();\n /** The same for a measured row's separator, by key, while its place and size stay put. */\n private readonly measuredGaps = new Map<unknown, Record<string, unknown>>();\n\n protected readonly separator = contentChild<VirtualListSeparator<T>>(VirtualListSeparator);\n private readonly refreshControl = contentChild(RefreshControl);\n\n /** See ScrollView: inside Android's swipe layout the list must see a drag first. */\n protected readonly nestedScroll = computed(() =>\n nativePlatform() === 'android' && this.refreshControl() ? true : undefined,\n );\n\n /**\n * Whether native moves sticky rows. Each then stays at its own place in the list and native\n * translates it on every frame the list scrolls, as RN's `ScrollViewStickyHeader` does; a\n * translate committed from each scroll event lands a frame or more late, and on a fast fling\n * the row shudders and comes away from the edge.\n */\n private readonly nativeSticky = this.engine.drivesScroll;\n /** The offset once scrolling pauses, which the settled translate of a native-moved row is from. */\n private readonly settled = signal(0);\n private settleTimer: ReturnType<typeof setTimeout> | undefined;\n /** What native is moving, by row view, with the transform kept beside the translate. */\n private readonly drives = new Map<HostNode, { drive: ScrollDrive; statics: string }>();\n private readonly canvasView = viewChild.required('rows', { read: ElementRef });\n\n /** Whether the scroll offset is needed as a signal, which only pinning needs. */\n private readonly pinning = computed(() => this.stickyHeader() || this.stickyIndices().length > 0);\n\n /** Rows size themselves and are laid out in flow, rather than placed at a known offset. */\n readonly measuring = computed(() => this.itemHeight() === undefined);\n\n /** The padding on each side. */\n private readonly edges = computed<Edges>(() => {\n const padding = this.contentPadding();\n if (typeof padding === 'number') {\n return { top: padding, right: padding, bottom: padding, left: padding };\n }\n const { top = 0, right = 0, bottom = 0, left = 0 } = padding ?? {};\n return { top, right, bottom, left };\n });\n\n /** The padding before the first row, along the axis. */\n private readonly lead = computed(() =>\n this.horizontal() ? this.edges().left : this.edges().top,\n );\n\n /** The rows' insets across the axis, as the props that place an absolutely positioned row. */\n private readonly across = computed((): Record<string, number> => {\n const { top, right, bottom, left } = this.edges();\n return this.horizontal() ? { top, bottom } : { left, right };\n });\n\n /** Heights native has reported, by key. */\n private readonly measured = new Map<unknown, number>();\n /** Bumped when a measurement changes, which is what re-sizes the list. */\n private readonly measuredVersion = signal(0);\n\n /** Each item's key, or null when items are their own. */\n private readonly keys = computed<readonly unknown[] | null>(() => {\n const extract = this.keyExtractor();\n return extract ? this.items().map(extract) : null;\n });\n\n private keyAt(index: number): unknown {\n return this.keys()?.[index] ?? this.items()[index];\n }\n\n /**\n * Each row's size and where it starts, for variable heights; uniform rows need no index at all.\n * Built once per change of items. A measurement changes it in place and bumps\n * `measuredVersion`, which is what everything that reads it depends on, so a row laying out\n * costs a walk of the tree rather than a rebuild of every offset.\n */\n private readonly table = computed<HeightIndex | null>(() => {\n const height = this.itemHeight();\n if (typeof height === 'number') return null;\n\n // Each row's entry is its size and the gap after it, so where a row starts counts the gaps\n // before it without a second table.\n const gap = this.rowGap();\n const items = this.items();\n const sizes = new Float64Array(items.length);\n if (height) {\n for (let i = 0; i < items.length; i++) sizes[i] = height(items[i]!, i) + gap;\n return new HeightIndex(sizes);\n }\n const estimate = this.estimatedItemHeight();\n const keys = this.keys();\n for (let i = 0; i < items.length; i++) {\n const size =\n this.measured.get(keys ? keys[i] : items[i]) ??\n (typeof estimate === 'number' ? estimate : estimate(items[i]!, i));\n sizes[i] = size + gap;\n }\n return new HeightIndex(sizes);\n });\n\n /** Where each key is, so a measurement finds its row without a search. */\n private readonly indexOfKey = computed(() => {\n if (!this.measuring()) return null;\n const map = new Map<unknown, number>();\n (this.keys() ?? this.items()).forEach((key, index) => map.set(key, index));\n return map;\n });\n\n /** The index, with a dependency on its measurements for whoever is reading it. */\n private layout(): HeightIndex | null {\n const table = this.table();\n if (table) this.measuredVersion();\n return table;\n }\n\n /**\n * The list's own total extent along its axis: the padding at both ends, the rows, and a gap\n * between each two of them.\n */\n private readonly extent = computed(() => {\n const table = this.layout();\n const count = this.items().length;\n const rows = table ? table.total : count * this.stride();\n const { top, right, bottom, left } = this.edges();\n const padding = this.horizontal() ? left + right : top + bottom;\n return padding + (count ? rows - this.rowGap() : 0);\n });\n\n /** A fixed-height row and the gap after it. */\n private stride(): number {\n return (this.itemHeight() as number) + this.rowGap();\n }\n\n /** ScrollView.js's `contentContainerHorizontal`: the header, rows and footer side by side. */\n protected readonly content = computed(() =>\n this.horizontal() ? { flexDirection: 'row' } : undefined,\n );\n\n protected readonly canvas = computed(() =>\n this.horizontal() ? { width: this.extent(), flexDirection: 'row' } : { height: this.extent() },\n );\n\n /**\n * `scaleY: -1` on the list, and the same on every row.\n *\n * The list ends up scrolled from the far end with its rows in reverse, and the second flip puts\n * each row's own content back the right way up. It is what `FlatList` does, and it is why an\n * inverted list needs no reversed maths: the first item is at offset 0, which is the bottom.\n */\n protected readonly flip = computed<StaticTransform[] | undefined>(() => {\n if (!this.inverted()) return undefined;\n const scale: StaticTransform = this.horizontal() ? { scaleX: -1 } : { scaleY: -1 };\n return [scale];\n });\n\n /**\n * The flip as a style's transform: CSS text, which the engine turns into the list native reads.\n * A style binding validates its values as the DOM's, and warns on a list in development.\n */\n private readonly flipText = computed(() => {\n if (!this.inverted()) return undefined;\n return this.horizontal() ? 'scaleX(-1)' : 'scaleY(-1)';\n });\n\n /**\n * What places a row in flow: the gap after it and the padding across the axis, as margins, since\n * native lays the row out. Empty when there are none, so a plain list commits no margins.\n */\n private readonly flowSpacing = computed<Record<string, unknown>>(() => {\n const gap = this.rowGap();\n const { top, right, bottom, left } = this.edges();\n const spacing: Record<string, number> = this.horizontal()\n ? { marginRight: gap, marginTop: top, marginBottom: bottom }\n : { marginBottom: gap, marginLeft: left, marginRight: right };\n return Object.fromEntries(Object.entries(spacing).filter(([, value]) => value !== 0));\n });\n\n /** A row in flow, flipped back when the list is inverted. One object, so rows never re-clone. */\n private readonly flowStyle = computed(() => {\n const flip = this.flipText();\n const spacing = this.flowSpacing();\n if (!flip && Object.keys(spacing).length === 0) return IN_FLOW;\n return flip ? { ...spacing, transform: flip } : spacing;\n });\n\n /** Top of a row: the leading padding, and every row and gap before it. */\n private topOf(index: number): number {\n const table = this.layout();\n return this.lead() + (table ? table.topOf(index) : index * this.stride());\n }\n\n /** A row's own size, without the gap after it. */\n private heightOf(index: number): number {\n const table = this.layout();\n return table ? table.heightOf(index) - this.rowGap() : (this.itemHeight() as number);\n }\n\n /** First row whose bottom, or the gap after it, is past `y`. */\n private indexAt(y: number): number {\n const table = this.layout();\n const along = y - this.lead();\n if (!table) return Math.max(0, Math.floor(along / this.stride()));\n return table.indexAt(along);\n }\n\n // --- holding position -------------------------------------------------------------------\n\n /** The row the viewport's leading edge is in, taken at each scroll. */\n private anchor: Anchor<T> | null = null;\n /** The last offset seen. A field rather than a signal: reading it renders nothing. */\n private lastOffset = 0;\n /**\n * A correction to make once the commit that needs it is on its way to native: an offset in the\n * rows' own space, after the header, or the very start of the list.\n */\n private pendingScroll: { offset: number; animated: boolean } | 'start' | null = null;\n\n /** What moves the rows: which items, and where each one is. */\n private readonly placement = computed(() => ({\n items: this.items(),\n table: this.table(),\n version: this.measuredVersion(),\n }));\n\n /**\n * The first *visible* row, not the first rendered one, and not the raw scroll offset. A fling\n * produces a scroll event per frame, and setting a signal on each one costs a change-detection\n * pass even when the visible rows are identical. Deriving the index in the handler means most\n * scroll events change nothing and cost nothing.\n *\n * Linked to the rows' placement, because that is when the row on screen can move without the\n * user scrolling: an insert above it, or a row above it measuring differently from its estimate.\n * The index follows the anchored row there, and the offset follows it too.\n */\n private readonly visible = linkedSignal<\n { items: readonly T[]; table: HeightIndex | null; version: number },\n number\n >({\n source: this.placement,\n computation: (placement) => this.reanchor(placement.items),\n });\n\n /** Take the anchor at a row, keeping the viewport where it is. */\n private anchorAt(at: number, offset: number): void {\n const items = this.items();\n if (!items.length) {\n this.anchor = null;\n return;\n }\n const index = Math.min(at, items.length - 1);\n this.anchor = { key: this.keyAt(index), within: offset - this.topOf(index), items, index };\n }\n\n /**\n * Where the row on screen went when the rows moved under it, and the offset that keeps it where\n * the user left it. An insert or a removal is only held when the caller asked for it; a row\n * above measuring differently always is, since nothing the user did moved anything.\n */\n private reanchor(items: readonly T[]): number {\n const anchor = this.anchor;\n // Empty for a moment, as a filter typed through leaves it: the offset is kept for what comes.\n if (!items.length) return 0;\n if (!anchor) return this.atOffset();\n\n const index = this.heldIndex(anchor, items);\n if (index === 'start') return this.showStart();\n if (index < 0) return this.atOffset();\n const held = this.topOf(index) + anchor.within;\n if (Math.abs(held - this.lastOffset) > HOLD_TOLERANCE) {\n this.pendingScroll = { offset: held, animated: false };\n this.lastOffset = held;\n }\n this.anchor = { ...anchor, items, index };\n return index;\n }\n\n /**\n * The row under the offset native is still at, in rows that have just replaced the old ones, as\n * a filter replaces them. Native keeps its offset whatever the items became, so the window is\n * worked out from that, not from the old row's index, which in the new rows sits somewhere else.\n * When the new rows end before that offset, the list is scrolled back to their end: native\n * would otherwise stay scrolled past it, showing nothing until the next drag.\n */\n private atOffset(): number {\n const end = Math.max(0, this.extent() - this.viewport());\n if (this.viewport() > 0 && this.lastOffset > end + HOLD_TOLERANCE) {\n this.pendingScroll = { offset: end, animated: false };\n this.lastOffset = end;\n }\n const index = Math.max(0, Math.min(this.indexAt(this.lastOffset), this.items().length - 1));\n this.anchorAt(index, this.lastOffset);\n return index;\n }\n\n /**\n * The index to hold the viewport at, -1 to let it move, or the start of the list when an\n * insert lands within the autoscroll threshold of it.\n */\n private heldIndex(anchor: Anchor<T>, items: readonly T[]): number | 'start' {\n if (items === anchor.items) return anchor.index;\n const hold = this.maintainVisibleContentPosition();\n if (!hold) return -1;\n const threshold = hold.autoscrollToTopThreshold;\n if (threshold !== undefined && this.lastOffset <= threshold) return 'start';\n const index = this.successorOf(anchor, items);\n return index < (hold.minIndexForVisible ?? 0) ? -1 : index;\n }\n\n /** Scroll to what arrived at the start, rather than holding the viewport past it. */\n private showStart(): number {\n this.anchorAt(0, 0);\n if (this.lastOffset !== 0) this.pendingScroll = 'start';\n this.lastOffset = 0;\n return 0;\n }\n\n /**\n * The anchored row's new index, or the first row after it that survived when it did not. Only\n * the rows that were rendered are searched for a successor: past those the viewport has moved\n * on, and holding it by something off screen would be holding it by nothing the user saw.\n */\n private successorOf(anchor: Anchor<T>, items: readonly T[]): number {\n const keys = this.keys() ?? items;\n const index = keys.indexOf(anchor.key);\n if (index !== -1) return index;\n const extract = this.keyExtractor();\n const was = anchor.items;\n const limit = Math.min(was.length, anchor.index + this.overscan() * 4 + 1);\n for (let i = anchor.index + 1; i < limit; i++) {\n const successor = keys.indexOf(extract ? extract(was[i]!, i) : was[i]);\n if (successor !== -1) return successor;\n }\n return -1;\n }\n\n /** Make a queued correction, after the commit that moved the rows has gone to native. */\n private flushScroll(): void {\n const pending = this.pendingScroll;\n if (!pending) return;\n this.pendingScroll = null;\n if (pending === 'start') this.scrollToOffset({ offset: 0, animated: true });\n else this.scrollToOffset({ offset: this.headerHeight() + pending.offset, animated: false });\n }\n\n /** In development, a list with rows that stays at zero size; see `ZeroSizeWarning`. */\n private readonly zeroSize = checksZeroSize()\n ? new ZeroSizeWarning(\n () => written(this.node),\n () => !!this.horizontal(),\n )\n : null;\n\n constructor() {\n super();\n afterEveryRender(() => {\n this.flushScroll();\n if (this.nativeSticky) this.driveStickyRows();\n this.recheckItems();\n });\n const stop = dismissKeyboardOnTap(this.engine, this.node, () =>\n this.keyboardShouldPersistTaps(),\n );\n inject(DestroyRef).onDestroy(() => {\n stop();\n clearTimeout(this.settleTimer);\n this.zeroSize?.stop();\n for (const held of this.drives.values()) held.drive.stop();\n });\n if (this.zeroSize) this.checkZeroSize(this.zeroSize);\n }\n\n /** The items the end and viewability were last checked against after a render. */\n private checkedItems: readonly T[] | null = null;\n\n /**\n * New items can bring the end within reach or change what is on screen with no scroll: a list\n * shorter than its viewport, a page appended while at the end, a filter. Checked once the rows\n * they make are rendered, and only when they changed, so any other render costs a comparison.\n */\n private recheckItems(): void {\n const items = this.items();\n if (items === this.checkedItems) return;\n this.checkedItems = items;\n this.checkEnd(this.headerHeight() + this.lastOffset);\n this.announceViewable(this.lastOffset);\n }\n\n /** Whether the viewport has been laid out yet, so a zero in it is a measurement. */\n private viewportMeasured = false;\n\n /**\n * In development, rows that arrive in a list already measured at zero, or go from one, with no\n * new layout to say so: an update to `items` alone does not lay the viewport out again.\n */\n private checkZeroSize(warning: ZeroSizeWarning): void {\n effect(() => {\n const hasRows = this.items().length > 0;\n if (this.viewportMeasured) warning.laidOut(untracked(this.viewport), hasRows);\n });\n }\n\n // --- the window ---------------------------------------------------------------------------\n\n /** The rows to render, and the edges of the run they sit in. */\n private readonly span = computed<Span | null>(() => {\n const items = this.items();\n const viewport = this.viewport();\n const overscan = this.overscan();\n if (!items.length) return null;\n\n const visible = Math.min(this.visible(), items.length - 1);\n const first = Math.max(0, visible - overscan);\n // Before the first layout we have no viewport, so render a screen's worth optimistically\n // rather than nothing: an empty first frame is worse than a few extra rows.\n const budget = viewport > 0 ? viewport : this.heightOf(first) * overscan * 2;\n /*\n * Measured from the top of the first *visible* row, not the first rendered one.\n *\n * Anchoring it at `first` - which is already backed off by the overscan - spent the budget\n * on rows above the viewport, so the window ran out that far before the bottom of the\n * screen. The trailing `+ overscan` hid it whenever every row was the same height, because\n * then the rows added below happened to be worth exactly the rows wasted above. With mixed\n * heights they are not, and the list clips short of its own bottom.\n */\n const top = this.topOf(visible);\n\n let last = visible;\n while (last < items.length && this.topOf(last) < top + budget) last++;\n return { first, last: Math.min(items.length, last + overscan) };\n });\n\n readonly window = computed<VirtualRow<T>[]>(() => {\n const span = this.span();\n if (!span) return [];\n const rows = this.rowsFor(this.items(), span.first, span.last);\n this.trimParked();\n for (const pool of this.parked.values()) rows.push(...pool);\n // The cache exists for rows that stay in the window between scrolls; anything that has left\n // it is rebuilt if it comes back, so the map stays the size of the window, not of the list.\n for (const index of this.slots.keys()) {\n if (index < span.first || index >= span.last) this.slots.delete(index);\n }\n return rows;\n });\n\n /**\n * What stands in for the rows above the window when rows are in flow: their total extent, less\n * a pinned row's, which is rendered in flow ahead of the window.\n */\n protected readonly spacer = computed(() => {\n const span = this.span();\n let lead = span ? this.topOf(span.first) : 0;\n const pinned = this.pinnedIndex();\n if (span && pinned !== null && pinned < span.first) {\n lead = this.nativeSticky ? this.topOf(pinned) : lead - this.heightOf(pinned) - this.rowGap();\n }\n return this.horizontal() ? { width: Math.max(0, lead) } : { height: Math.max(0, lead) };\n });\n\n /** The rows from `first` up to `last`, and the pinned row above them if there is one. */\n private rowsFor(items: readonly T[], first: number, last: number): VirtualRow<T>[] {\n const rows: VirtualRow<T>[] = [];\n const pinned = this.pinnedIndex();\n const pinnedAbove = pinned !== null && pinned < first;\n this.releaseRecycled(first, last, pinnedAbove ? pinned : null);\n // The pinned row is on screen even when its own place in the list is not, which is the whole\n // point of it, so it is rendered whether or not the window reaches that far.\n if (pinnedAbove) {\n const key = this.keyAt(pinned);\n rows.push(\n this.hold({\n index: pinned,\n slot: this.recycledSlot(key, items[pinned]!, pinned),\n key,\n item: items[pinned]!,\n style: this.nativeSticky\n ? this.stickyStyle(pinned)\n : this.measuring()\n ? this.pinnedFlowStyle(this.topOf(first) - this.heightOf(pinned) - this.rowGap())\n : this.slotStyle(pinned, this.offset()),\n }),\n );\n }\n for (let index = first; index < last; index++) {\n const key = this.keyAt(index);\n rows.push(\n this.hold({\n index,\n slot: this.recycledSlot(key, items[index]!, index),\n key,\n item: items[index]!,\n style: this.styleFor(index, index === pinned),\n }),\n );\n }\n if (pinnedAbove && this.nativeSticky && this.measuring()) this.leadWindow(rows, pinned, first);\n return rows;\n }\n\n /**\n * A pinned row native moves stays at its own place, so the rows between it and the window are\n * made up before the window rather than after the row: new props on a view native is moving\n * put its transform back for a frame.\n */\n private leadWindow(rows: VirtualRow<T>[], pinned: number, first: number): void {\n const lead = rows[1];\n // The pinned row's own gap already follows it in flow.\n const between = this.topOf(first) - this.topOf(pinned) - this.heightOf(pinned) - this.rowGap();\n if (!lead || between <= 0) return;\n const margin = this.horizontal() ? 'marginLeft' : 'marginTop';\n rows[1] = this.hold({ ...lead, style: { ...lead.style, [margin]: between } });\n }\n\n private styleFor(index: number, pinned: boolean): Record<string, unknown> {\n if (this.nativeSticky && this.nextSticky().has(index)) return this.stickyStyle(index);\n if (this.measuring()) {\n return pinned ? this.pinnedFlowStyle(this.topOf(index)) : this.flowStyle();\n }\n return pinned ? this.slotStyle(index, this.offset()) : this.slotStyle(index);\n }\n\n /** A pinned row in flow, moved from where flow put it to the leading edge by a transform. */\n private pinnedFlowStyle(at: number): Record<string, unknown> {\n const shift = Math.max(0, this.offset() - at);\n const move = `${this.horizontal() ? 'translateX' : 'translateY'}(${shift}px)`;\n const flip = this.flipText();\n return { ...this.flowSpacing(), zIndex: 1, transform: flip ? `${move} ${flip}` : move };\n }\n\n /**\n * A sticky row native moves: at its own place, with the translate native had reached when\n * scrolling paused, so the props agree with what is on screen.\n */\n private stickyStyle(index: number): Record<string, unknown> {\n const horizontal = this.horizontal();\n const style: Record<string, unknown> = this.measuring()\n ? { ...this.flowSpacing() }\n : { ...this.slotStyle(index) };\n style['zIndex'] = 1;\n const top = this.topOf(index);\n const shift = Math.min(Math.max(0, this.settled() - top), this.stopOf(index) - top);\n const move = shift > 0 ? `${horizontal ? 'translateX' : 'translateY'}(${shift}px)` : '';\n const transform = [move, this.flipText() ?? ''].filter(Boolean).join(' ');\n if (transform) style['transform'] = transform;\n return style;\n }\n\n /** Each sticky row, and the one after it, which pushes it off. */\n private readonly nextSticky = computed(() => {\n const sticky = this.stickyIndices();\n return new Map(sticky.map((index, at) => [index, sticky[at + 1]]));\n });\n\n /** Where a sticky row stops, pushed off by the next: that row's top, less this row's size. */\n private stopOf(index: number): number {\n const next = this.nextSticky().get(index);\n return next === undefined ? Infinity : this.topOf(next) - this.heightOf(index);\n }\n\n /**\n * How native moves a rendered row, or null when it does not: along the scroll view's own\n * offset, which counts the header, from the row's top until the next sticky row pushes it off.\n */\n private stickyDrive(\n row: VirtualRow<T>,\n ): { range: ScrollRange; statics: readonly StaticTransform[] } | null {\n if (!this.nativeSticky || row.parked || !this.nextSticky().has(row.index)) return null;\n const header = this.headerHeight();\n const start = header + this.topOf(row.index);\n return {\n range: pinnedRange(start, header + this.stopOf(row.index)),\n statics: this.flip() ?? [],\n };\n }\n\n /**\n * Hand each rendered sticky row's view to native to move, and let go of the rest. The rows'\n * views are the canvas's element children in window order, after the spacer, which is how\n * `@for` over `window()` leaves them.\n */\n private driveStickyRows(): void {\n if (!this.pinning() && this.drives.size === 0) return;\n const canvas = this.canvasView().nativeElement as HostNode;\n const views = canvas.children\n .filter((child) => child.kind === 'element')\n .slice(this.measuring() ? 1 : 0);\n const axis = this.horizontal() ? 'x' : 'y';\n const live = new Set<HostNode>();\n this.window().forEach((row, at) => {\n const view = views[at];\n const next = this.stickyDrive(row);\n if (!view || !next) return;\n live.add(view);\n const statics = JSON.stringify(next.statics);\n const held = this.drives.get(view);\n if (held?.statics === statics) return held.drive.update(next.range);\n held?.drive.stop();\n const drive = this.engine.driveByScroll(view, this.node, axis, next.range, next.statics);\n if (drive) this.drives.set(view, { drive, statics });\n });\n for (const [view, held] of this.drives) {\n if (live.has(view)) continue;\n held.drive.stop();\n this.drives.delete(view);\n }\n }\n\n /** Which recycling slot each rendered item holds, by key: its type, and the row it last drew. */\n private readonly recycled = new Map<\n unknown,\n { slot: number; type: unknown; row: VirtualRow<T> | null }\n >();\n /** Slots that have left the window and are kept hidden, by the type of row that held them. */\n private readonly parked = new Map<unknown, VirtualRow<T>[]>();\n private nextSlot = 0;\n\n /** Note the row a slot is drawing, for parking it once it leaves. */\n private hold(row: VirtualRow<T>): VirtualRow<T> {\n const held = this.recycled.get(row.key);\n if (held) held.row = row;\n return row;\n }\n\n /**\n * Park the slots of the items that have left the window, for the items arriving.\n *\n * Parked rather than freed: a slot missing from the window is destroyed by `@for`, so a slot is\n * only reused if a row of its type arrives in the same pass as it left. Kept rendered and\n * hidden, it waits for the next row of its type however many passes later, which is what a\n * reuse queue of cells does in UIKit.\n */\n private releaseRecycled(first: number, last: number, pinned: number | null): void {\n const keep = new Set<unknown>();\n for (let index = first; index < last; index++) keep.add(this.keyAt(index));\n if (pinned !== null) keep.add(this.keyAt(pinned));\n for (const [key, held] of this.recycled) {\n if (keep.has(key)) continue;\n this.recycled.delete(key);\n let pool = this.parked.get(held.type);\n if (!pool) this.parked.set(held.type, (pool = []));\n pool.push({ ...(held.row ?? this.placeholder(key, held.slot)), parked: true, style: PARKED });\n }\n }\n\n /**\n * Keep a few hidden slots of each type once this pass has taken what it needs, dropping the\n * oldest: `@for` destroys the views of a slot that leaves the window for good.\n */\n private trimParked(): void {\n for (const pool of this.parked.values()) {\n if (pool.length > PARK_LIMIT) pool.splice(0, pool.length - PARK_LIMIT);\n }\n }\n\n /** A parked row for a slot that never drew, which only a slot taken and left in one pass is. */\n private placeholder(key: unknown, slot: number): VirtualRow<T> {\n return { index: -1, slot, key, item: this.items()[0]!, style: PARKED };\n }\n\n private recycledSlot(key: unknown, item: T, index: number): number {\n const held = this.recycled.get(key);\n if (held) return held.slot;\n const type = this.itemType()?.(item, index);\n const slot = this.parked.get(type)?.pop()?.slot ?? this.nextSlot++;\n this.recycled.set(key, { slot, type, row: null });\n return slot;\n }\n\n /**\n * A row laid itself out; what `virtualListRow` calls. Only a row that sizes itself is measured,\n * and a height that has not changed changes nothing.\n */\n measureRow(row: VirtualRow<T>, layout: { width?: number; height?: number } | undefined): void {\n if (!this.measuring() || !layout || row.parked) return;\n const size = this.horizontal() ? layout.width : layout.height;\n if (size === undefined || this.measured.get(row.key) === size) return;\n this.measured.set(row.key, size);\n this.forgetDeparted();\n const index = this.indexOfKey()?.get(row.key);\n if (index === undefined) return;\n this.table()?.set(index, size + this.rowGap());\n this.measuredVersion.update((version) => version + 1);\n }\n\n /** Drop the measurements of items long gone, so churn cannot grow the map without bound. */\n private forgetDeparted(): void {\n const items = this.items();\n if (this.measured.size <= items.length * 2 + 64) return;\n const current = new Set(this.keys() ?? items);\n for (const key of this.measured.keys()) if (!current.has(key)) this.measured.delete(key);\n }\n\n /** A separator for every rendered row but the list's last, in its leading row's slot. */\n protected readonly gaps = computed<Gap<T>[]>(() => {\n if (!this.separator()) return [];\n const items = this.items();\n const gaps: Gap<T>[] = [];\n for (const row of this.window()) {\n if (row.parked || row.index >= items.length - 1) continue;\n const style = this.measuring() ? this.measuredGapStyle(row) : this.gapStyle(row);\n if (!style) continue;\n const trailingItem = items[row.index + 1]!;\n gaps.push({\n index: row.index,\n style,\n context: {\n $implicit: row.item,\n leadingItem: row.item,\n trailingItem,\n leadingIndex: row.index,\n },\n });\n }\n return gaps;\n });\n\n /** The row's own slot, laid out to put the separator at its trailing edge. */\n private gapStyle(row: VirtualRow<T>): Record<string, unknown> {\n let style = this.gapStyles.get(row.style);\n if (!style) {\n style = {\n ...row.style,\n flexDirection: this.horizontal() ? 'row' : 'column',\n justifyContent: 'flex-end',\n pointerEvents: 'box-none',\n };\n this.gapStyles.set(row.style, style);\n }\n return style;\n }\n\n /**\n * A measured row's slot, over the row itself: nothing until its height is known, since drawing\n * it at the estimate would put a line through the middle of a row that turns out taller.\n */\n private measuredGapStyle(row: VirtualRow<T>): Record<string, unknown> | null {\n if (!this.measured.has(row.key)) return null;\n const start = this.topOf(row.index);\n const size = this.heightOf(row.index);\n const horizontal = this.horizontal();\n const flip = this.flipText();\n const across = this.across();\n const cached = this.measuredGaps.get(row.key);\n const placed = horizontal\n ? { ...across, left: start, width: size, transform: flip }\n : { ...across, top: start, height: size, transform: flip };\n if (cached && holds(cached, placed)) return cached;\n const style: Record<string, unknown> = horizontal\n ? { position: 'absolute', ...across, left: start, width: size, flexDirection: 'row' }\n : { position: 'absolute', ...across, top: start, height: size };\n style['justifyContent'] = 'flex-end';\n style['pointerEvents'] = 'box-none';\n if (flip) style['transform'] = flip;\n this.measuredGaps.set(row.key, style);\n if (this.measuredGaps.size > 256) this.measuredGaps.clear();\n return style;\n }\n\n /**\n * The header's translation while it is pinned: the scroll position, held back at zero by an\n * overscroll and at the first sticky row, which pushes it off.\n */\n protected readonly headerStyle = computed(() => {\n const flip = this.flipText();\n if (!this.stickyHeader()) return flip ? { transform: flip } : undefined;\n const along = this.offset() + this.headerHeight();\n const first = this.stickyIndices()[0];\n const limit = first === undefined ? Infinity : this.topOf(first);\n const shift = Math.min(Math.max(0, along), limit);\n const move = shift > 0 ? `${this.horizontal() ? 'translateX' : 'translateY'}(${shift}px)` : '';\n const transform = [move, flip ?? ''].filter(Boolean).join(' ');\n return transform ? { zIndex: 1, transform } : { zIndex: 1 };\n });\n\n /**\n * The footer, flipped back like every row when the list is inverted, as FlatList inverts its\n * header and footer cells too; otherwise both read upside down.\n */\n protected readonly footerStyle = computed(() => {\n const flip = this.flipText();\n return flip ? { transform: flip } : undefined;\n });\n\n /**\n * The sticky row currently holding the leading edge: the last one at or before the offset.\n * Null when the list has scrolled back above the first of them.\n */\n private readonly pinnedIndex = computed<number | null>(() => {\n const sticky = this.stickyIndices();\n if (sticky.length === 0) return null;\n const offset = this.offset();\n\n let pinned: number | null = null;\n for (const index of sticky) {\n if (this.topOf(index) <= offset) pinned = index;\n else break;\n }\n return pinned;\n });\n\n /** Which rows are on screen far enough to count, by the caller's threshold. */\n private viewableAt(offset: number): number[] {\n const viewport = this.viewport();\n if (!viewport) return [];\n\n const threshold = this.itemVisiblePercentThreshold() / 100;\n const rows: number[] = [];\n for (const row of this.window()) {\n if (row.parked) continue;\n const start = this.topOf(row.index);\n const size = this.heightOf(row.index);\n const shown = Math.min(start + size, offset + viewport) - Math.max(start, offset);\n if (shown > 0 && shown >= size * threshold) rows.push(row.index);\n }\n return rows;\n }\n\n /** The last set announced, so the output fires on a change rather than on every frame. */\n private announced: number[] = [];\n /** The items the last set was announced from: new items are a change even at the same indices. */\n private announcedFrom: readonly T[] | null = null;\n\n /**\n * Announce a change in what is on screen.\n *\n * Deliberately not a `computed` over a signal offset. A fling produces a scroll event per\n * frame, and writing a signal on each one costs a change-detection pass whether or not anything\n * moved into view; comparing here costs an array walk over the window and emits only when the\n * set really changed.\n */\n private announceViewable(offset: number): void {\n const viewable = this.viewableAt(offset);\n const entered = viewable.filter((index) => !this.announced.includes(index));\n const left = this.announced.filter((index) => !viewable.includes(index));\n const items = this.items();\n const same = items === this.announcedFrom || viewable.length === 0;\n if (entered.length === 0 && left.length === 0 && same) return;\n\n this.announced = viewable;\n this.announcedFrom = items;\n this.viewableItemsChanged.emit({\n viewable: viewable.map((index) => {\n const key = this.keyAt(index);\n return {\n index,\n // What is viewable is in the window, so it holds a slot already.\n slot: this.recycled.get(key)?.slot ?? -1,\n key,\n item: items[index]!,\n style: this.styleFor(index, false),\n };\n }),\n entered,\n left,\n });\n }\n\n /**\n * Scroll so that a row is at the start of the viewport, less `viewOffset`. The window moves\n * there at once, and the row is held there while the rows around it are measured.\n */\n scrollToIndex(options: { index: number; animated?: boolean; viewOffset?: number }): void {\n const items = this.items();\n if (!items.length) return;\n const index = Math.max(0, Math.min(options.index, items.length - 1));\n const within = -(options.viewOffset ?? 0);\n const offset = this.topOf(index) + within;\n this.lastOffset = offset;\n this.anchor = { key: this.keyAt(index), within, items, index };\n this.visible.set(index);\n this.scrollToOffset({ offset: this.headerHeight() + offset, animated: options.animated });\n }\n\n /** Scroll to an offset along the list's own axis: x when it is horizontal, y otherwise. */\n scrollToOffset(options: { offset: number; animated?: boolean }): void {\n const { offset, animated = true } = options;\n const [x, y] = this.horizontal() ? [offset, 0] : [0, offset];\n this.engine.dispatchCommand(this.node, 'scrollTo', [x, y, animated]);\n }\n\n scrollToEnd(options: { animated?: boolean } = {}): void {\n this.engine.dispatchCommand(this.node, 'scrollToEnd', [options.animated ?? true]);\n }\n\n private slotStyle(index: number, pinnedAt?: number): Record<string, unknown> {\n const start = pinnedAt ?? this.topOf(index);\n const size = this.heightOf(index);\n const horizontal = this.horizontal();\n const key = horizontal ? 'left' : 'top';\n const extent = horizontal ? 'width' : 'height';\n\n const flip = this.flipText();\n const across = this.across();\n\n let style = this.slots.get(index);\n // The flip is part of the comparison because turning the list over changes every row, and a\n // cached slot would otherwise keep the orientation it was built with.\n const placed = { ...across, [extent]: size, [key]: start, transform: flip };\n const stale = !style || pinnedAt !== undefined || !holds(style, placed);\n\n if (stale) {\n style = horizontal\n ? { position: 'absolute', ...across, left: start, width: size }\n : { position: 'absolute', ...across, top: start, height: size };\n // A pinned row draws over the ones sliding under it; the transform is the row's half of\n // the inversion.\n if (pinnedAt !== undefined) style['zIndex'] = 1;\n if (flip) style['transform'] = flip;\n this.slots.set(index, style);\n return style;\n }\n return style!;\n }\n\n protected onScroll(\n event: NativeSyntheticEvent<{ contentOffset?: { x?: number; y?: number } }>,\n ): void {\n const contentOffset = event.nativeEvent?.contentOffset;\n const along = (this.horizontal() ? contentOffset?.x : contentOffset?.y) ?? 0;\n const content = along - this.headerHeight();\n\n // The first *visible* row, not the first rendered one. The overscan is applied where the\n // window is built, so that both edges can be measured from the same place.\n // Not clamped to the items: an input set in the same task as this event has not reached the\n // list yet, and the window clamps when it renders.\n const visible = this.indexAt(content);\n if (visible !== this.visible()) this.visible.set(visible);\n this.lastOffset = content;\n this.anchorAt(visible, content);\n // A pinned row follows the scroll continuously, so with sticky rows the offset has to be a\n // signal - and only then. Without them this stays a field, and a fling that moves no row in\n // or out of the window costs no change detection at all.\n if (this.pinning()) this.offset.set(content);\n if (this.nativeSticky && this.pinning()) this.settleAfterPause(content);\n this.checkEnd(along);\n this.announceViewable(content);\n }\n\n /** A pinned row's translate, settled once scrolling pauses: see `STICKY_SETTLE_MS`. */\n private settleAfterPause(content: number): void {\n clearTimeout(this.settleTimer);\n this.settleTimer = setTimeout(() => this.settled.set(content), STICKY_SETTLE_MS);\n }\n\n protected onLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n const layout = event.nativeEvent?.layout;\n this.viewport.set((this.horizontal() ? layout?.width : layout?.height) ?? 0);\n this.viewportMeasured = true;\n this.zeroSize?.laidOut(this.viewport(), this.items().length > 0);\n this.checkEnd(this.headerHeight() + this.lastOffset);\n this.announceViewable(this.lastOffset);\n }\n\n /** The header's extent along the axis, which every row sits after. */\n protected onHeaderLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n const layout = event.nativeEvent?.layout;\n const height = (this.horizontal() ? layout?.width : layout?.height) ?? 0;\n if (height === this.headerHeight()) return;\n this.headerHeight.set(height);\n this.holdPastHeader();\n }\n\n /**\n * The header grew or shrank - a typing indicator in a chat's, a banner in a feed's - and every\n * row moved with it. Held like an insert when the caller asked for that and the viewport is\n * past the header, among the rows; at the start the user is looking at the header, and it is\n * left to push the rows along. Made at once rather than after a render, because a layout arrives\n * outside change detection and nothing else may be about to render.\n */\n private holdPastHeader(): void {\n const hold = this.maintainVisibleContentPosition();\n if (!hold || this.lastOffset <= (hold.autoscrollToTopThreshold ?? 0)) return;\n this.scrollToOffset({ offset: this.headerHeight() + this.lastOffset, animated: false });\n }\n\n protected onContentSize(event: NativeSyntheticEvent<{ width?: number; height?: number }>): void {\n const size = event.nativeEvent;\n this.contentSize = (this.horizontal() ? size?.width : size?.height) ?? 0;\n this.contentSizeFor = this.extent();\n this.checkEnd(this.headerHeight() + this.lastOffset);\n }\n\n private checkEnd(y: number): void {\n const count = this.items().length;\n const viewport = this.viewport();\n if (!count || !viewport) return;\n // Native's size is for the rows it last laid out; until it reports for these, their own extent.\n const extent = this.extent();\n const reported = this.contentSizeFor === extent ? this.contentSize : 0;\n const total = reported || this.headerHeight() + extent;\n const distanceFromEnd = total - (y + viewport);\n // Away from the end again re-arms it, as React Native does, so a load that failed is retried\n // the next time the user comes back down.\n if (distanceFromEnd > this.endReachedThreshold() * viewport) {\n this.endReachedFor = -1;\n return;\n }\n if (this.endReachedFor === count) return;\n this.endReachedFor = count;\n this.endReached.emit({ distanceFromEnd });\n }\n}\n\n/** Whether a cached slot style already has every one of these props. */\nfunction holds(style: Record<string, unknown>, props: Record<string, unknown>): boolean {\n return Object.entries(props).every(([prop, value]) => style[prop] === value);\n}\n\n/**\n * Put on each row's view: `<view [virtualListRow]=\"row\">`. Applies the row's style, and reports\n * the row's layout to the list, which is how a list of rows that size themselves learns how tall\n * each one is.\n */\n@Directive({\n selector: '[virtualListRow]',\n host: {\n '[style]': 'row().style',\n // A parked row is not read out: see `PARKED`.\n '[attr.aria-hidden]': 'row().parked ? true : null',\n '(layout)': 'onLayout($event)',\n },\n})\nexport class VirtualListRow<T = unknown> {\n readonly row = input.required<VirtualRow<T>>({ alias: 'virtualListRow' });\n private readonly list = inject<VirtualList<T>>(VirtualList);\n\n protected onLayout(\n event: NativeSyntheticEvent<{ layout?: { width?: number; height?: number } }>,\n ): void {\n this.list.measureRow(this.row(), event.nativeEvent?.layout);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-native/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Angular Native's core components: view, text, image, pressable, scroll-view, virtual-list, text-input and the rest of React Native's set.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"browser": "./dist/gestures-web.js",
|
|
31
31
|
"default": "./dist/gestures.js"
|
|
32
32
|
},
|
|
33
|
+
"./markdown": {
|
|
34
|
+
"types": "./dist/markdown.d.ts",
|
|
35
|
+
"default": "./dist/markdown.js"
|
|
36
|
+
},
|
|
33
37
|
"./reanimated": {
|
|
34
38
|
"types": "./dist/reanimated.d.ts",
|
|
35
39
|
"browser": "./dist/reanimated-web.js",
|
|
@@ -53,8 +57,8 @@
|
|
|
53
57
|
"access": "public"
|
|
54
58
|
},
|
|
55
59
|
"dependencies": {
|
|
56
|
-
"@ng-native/device": "0.
|
|
57
|
-
"@ng-native/fabric": "0.
|
|
60
|
+
"@ng-native/device": "0.7.0",
|
|
61
|
+
"@ng-native/fabric": "0.7.0"
|
|
58
62
|
},
|
|
59
63
|
"peerDependencies": {
|
|
60
64
|
"@angular/core": "^22.0.0",
|
|
@@ -63,7 +67,8 @@
|
|
|
63
67
|
"react-native-reanimated": "^4.5.1",
|
|
64
68
|
"react-native-safe-area-context": "^5.7.0",
|
|
65
69
|
"react-native-keyboard-controller": "^1.21.9",
|
|
66
|
-
"@react-native-masked-view/masked-view": ">=0.3.0"
|
|
70
|
+
"@react-native-masked-view/masked-view": ">=0.3.0",
|
|
71
|
+
"marked": "^18.0.14"
|
|
67
72
|
},
|
|
68
73
|
"nx": {
|
|
69
74
|
"tags": [
|
|
@@ -94,6 +99,9 @@
|
|
|
94
99
|
},
|
|
95
100
|
"@react-native-masked-view/masked-view": {
|
|
96
101
|
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"marked": {
|
|
104
|
+
"optional": true
|
|
97
105
|
}
|
|
98
106
|
},
|
|
99
107
|
"repository": {
|
|
@@ -106,7 +114,8 @@
|
|
|
106
114
|
],
|
|
107
115
|
"devDependencies": {
|
|
108
116
|
"@angular/core": "22.2.0",
|
|
109
|
-
"@babel/core": "^7.29.7"
|
|
117
|
+
"@babel/core": "^7.29.7",
|
|
118
|
+
"marked": "^18.0.14"
|
|
110
119
|
},
|
|
111
120
|
"scripts": {
|
|
112
121
|
"build": "ngc -p tsconfig.build.json",
|