react-native-gtkx 0.1.0-alpha.2 → 0.1.0-alpha.3
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/README.md +4 -5
- package/dist/apis/back-handler.d.ts +9 -0
- package/dist/apis/back-handler.js +30 -0
- package/dist/apis/back-handler.js.map +1 -0
- package/dist/apis/host.d.ts +7 -1
- package/dist/apis/host.gtkx.js +12 -1
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/apis/host.js.map +1 -1
- package/dist/apis/i18n-manager.d.ts +14 -0
- package/dist/apis/i18n-manager.js +20 -0
- package/dist/apis/i18n-manager.js.map +1 -0
- package/dist/apis/index.d.ts +17 -0
- package/dist/apis/index.js +5 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/interaction-manager.d.ts +16 -0
- package/dist/apis/interaction-manager.js +96 -0
- package/dist/apis/interaction-manager.js.map +1 -0
- package/dist/apis/linking.d.ts +4 -0
- package/dist/apis/linking.js +9 -0
- package/dist/apis/linking.js.map +1 -1
- package/dist/components/app-registry.d.ts +2 -0
- package/dist/components/app-registry.js +19 -2
- package/dist/components/app-registry.js.map +1 -1
- package/dist/components/flat-list.d.ts +2 -0
- package/dist/components/flat-list.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/root.d.ts +10 -1
- package/dist/components/root.js +39 -1
- package/dist/components/root.js.map +1 -1
- package/dist/components/scroll-view.js +58 -5
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/text-input.d.ts +1 -0
- package/dist/components/text-input.js +31 -3
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/use-layout-child.d.ts +1 -1
- package/dist/components/use-layout-child.js +22 -2
- package/dist/components/use-layout-child.js.map +1 -1
- package/dist/components/virtualized-list.d.ts +2 -0
- package/dist/components/virtualized-list.js +132 -10
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/gtkx/bridge/index.d.ts +4 -2
- package/dist/gtkx/bridge/index.js +6 -2
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/measure.js +5 -0
- package/dist/gtkx/bridge/measure.js.map +1 -1
- package/dist/gtkx/bridge/use-signal.d.ts +2 -0
- package/dist/gtkx/bridge/use-signal.js +30 -0
- package/dist/gtkx/bridge/use-signal.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/engine.d.ts +4 -0
- package/dist/layout/engine.js +97 -5
- package/dist/layout/engine.js.map +1 -1
- package/dist/layout/node.d.ts +1 -1
- package/dist/layout/node.js +8 -5
- package/dist/layout/node.js.map +1 -1
- package/dist/metro/index.js +1 -0
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/index.d.ts +44 -0
- package/dist/navigation/index.js +216 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/option-warnings.d.ts +2 -0
- package/dist/navigation/option-warnings.js +61 -0
- package/dist/navigation/option-warnings.js.map +1 -0
- package/dist/navigation/sidebar.d.ts +37 -0
- package/dist/navigation/sidebar.js +71 -0
- package/dist/navigation/sidebar.js.map +1 -0
- package/dist/perf.d.ts +9 -0
- package/dist/perf.js +156 -0
- package/dist/perf.js.map +1 -0
- package/dist/runner/host-dev.js +15 -6
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +24 -9
- package/dist/runner/host.js.map +1 -1
- package/dist/runner/index.js +4 -1
- package/dist/runner/index.js.map +1 -1
- package/dist/vite/index.d.ts +5 -4
- package/dist/vite/index.js +41 -7
- package/dist/vite/index.js.map +1 -1
- package/package.json +18 -10
- package/types.d.ts +13 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualized-list.js","sourceRoot":"","sources":["../../src/components/virtualized-list.tsx"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2EAA2E;AAC3E,sEAAsE;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CAAC,EAAE,CAAC;YACxD,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;IAED,yEAAyE;IACzE,KAAK,SAAS,CAAA;IACd,iEAAiE;IACjE,KAAK,SAAS,CAAA;IAEd,OAAO,CACL,MAAC,UAAU,OACL,WAAW,EACf,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,YAAY,EACtB,mBAAmB,EAAE,uBAAuB,EAC5C,QAAQ,EAAE,YAAY,aAErB,UAAU,CAAC,CAAC,CAAC;YACZ,kEAAkE;YAClE,8DAA8D;YAC9D,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,YAC/C,KAAC,iBAAiB,KAAG,GAChB,CACR,CAAC,CAAC,CAAC,IAAI,EAGP,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,EAC/D,KAAK,KAAK,CAAC,IAAI,SAAS,CAAC,kBAAkB,CAAC,EAC5C,KAAK,GAAG,CAAC,IAAI,CACZ,KAAC,IAAI,IACH,KAAK,EACH,UAAU;oBACR,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAE,EAAE;oBAC5B,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAE,EAAE,YAGhC,KAAK,GACD,CACR,EACA,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,IACrD,CACd,CAAA;AACH,CAAC,CACF,CAAA;AACD,oBAAoB,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,oBAEd,CAAA","sourcesContent":["// The windowed list core (RN VirtualizedList model, leaner): only the rows\n// around the viewport are mounted; the content View carries the prefix-sum\n// height so the ScrollView gets the full range; every mounted cell is\n// absolutely positioned at its offset. Heights come from getItemLayout (exact)\n// or estimatedItemSize refined by per-cell onLayout; corrections above the\n// first visible row are anchored by compensating the scroll offset in the\n// same commit (docs/research/list-window.md).\nimport {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactElement,\n type ReactNode,\n} from \"react\"\nimport type { StyleProp } from \"../contracts\"\nimport { ActivityIndicator } from \"./activity-indicator\"\nimport {\n ScrollView,\n StickySlot,\n type ScrollEvent,\n type ScrollViewHandle,\n type ScrollViewProps,\n} from \"./scroll-view\"\nimport type { LayoutEvent } from \"./use-layout-child\"\nimport { View } from \"./view\"\n\nexport type ListRenderItemInfo<T> = { item: T; index: number }\n\nexport type ItemLayout = { length: number; offset: number; index: number }\n\n// RN ViewToken: one entry per item in the viewability report.\nexport type ViewToken<T = unknown> = {\n item: T\n key: string\n index: number\n isViewable: boolean\n}\n\nexport type ViewabilityConfig = {\n // Percent (0..100) of the ITEM that must be visible. A fully visible item\n // always counts, even when it covers less than the threshold.\n itemVisiblePercentThreshold?: number\n // Percent (0..100) of the VIEWPORT the item must cover. Takes precedence\n // over itemVisiblePercentThreshold when both are set (RN ViewabilityHelper).\n viewAreaCoveragePercentThreshold?: number\n // The item must stay continuously visible this many ms before it is\n // reported viewable; scrolling out before that cancels the report.\n minimumViewTime?: number\n}\n\n// RN FlatList scroll surface on top of ScrollViewHandle. The handle is not\n// generic: scrollToItem takes the item as unknown and resolves the index with\n// indexOf on the latest data.\nexport type VirtualizedListHandle = ScrollViewHandle & {\n scrollToIndex(params: {\n index: number\n viewPosition?: number\n animated?: boolean\n }): void\n scrollToItem(params: {\n item: unknown\n viewPosition?: number\n animated?: boolean\n }): void\n scrollToOffset(params: { offset: number; animated?: boolean }): void\n}\n\nexport type VirtualizedListProps<T> = Omit<ScrollViewProps, \"children\"> & {\n data: readonly T[]\n renderItem: (info: ListRenderItemInfo<T>) => ReactElement | null\n keyExtractor?: (item: T, index: number) => string\n estimatedItemSize?: number\n getItemLayout?: (data: readonly T[], index: number) => ItemLayout\n // Overscan in viewport multiples (RN semantics, default 5: two viewports\n // above, two below, one visible).\n windowSize?: number\n initialNumToRender?: number\n extraData?: unknown\n // RN inverted semantics: the list opens at the START of the data (visually\n // at the far end — a chat's latest message sits at the bottom), and\n // contentOffset counts from that end. See the projection math below.\n inverted?: boolean\n // RefreshControl parity. Desktop has no pull gesture: `refreshing` renders\n // a spinner row above the content; `onRefresh` is accepted for RN API\n // compatibility but is never triggered by a gesture — app code must call\n // it itself (e.g. from a toolbar button or a keyboard shortcut).\n refreshing?: boolean\n onRefresh?: () => void\n ItemSeparatorComponent?: ComponentType | null\n ListHeaderComponent?: ComponentType | ReactElement | null\n ListFooterComponent?: ComponentType | ReactElement | null\n ListEmptyComponent?: ComponentType | ReactElement | null\n onEndReached?: () => void\n onEndReachedThreshold?: number\n onViewableItemsChanged?: (info: {\n viewableItems: ViewToken<T>[]\n changed: ViewToken<T>[]\n }) => void\n viewabilityConfig?: ViewabilityConfig\n style?: StyleProp\n}\n\nconst renderAux = (\n component: ComponentType | ReactElement | null | undefined,\n): ReactNode => {\n if (component === null || component === undefined) {\n return null\n }\n if (typeof component === \"function\") {\n const Aux = component\n return <Aux />\n }\n return component\n}\n\n// First index whose offset-end is past `target` (binary search over prefix\n// sums; offsets has count+1 entries).\nconst indexAt = (offsets: number[], target: number): number => {\n let low = 0\n let high = offsets.length - 2\n while (low < high) {\n const mid = (low + high) >> 1\n if (offsets[mid + 1]! <= target) {\n low = mid + 1\n } else {\n high = mid\n }\n }\n return low\n}\n\nconst VirtualizedListInner = forwardRef(\n <T,>(\n {\n data,\n renderItem,\n keyExtractor,\n estimatedItemSize = 44,\n getItemLayout,\n windowSize = 5,\n initialNumToRender = 10,\n extraData,\n inverted = false,\n refreshing = false,\n onRefresh,\n ItemSeparatorComponent,\n ListHeaderComponent,\n ListFooterComponent,\n ListEmptyComponent,\n onEndReached,\n onEndReachedThreshold = 0.1,\n onViewableItemsChanged,\n viewabilityConfig,\n onScroll,\n onContentSizeChange,\n onLayout,\n horizontal = false,\n stickyHeaderIndices,\n ...scrollProps\n }: VirtualizedListProps<T>,\n ref: React.Ref<VirtualizedListHandle>,\n ) => {\n const count = data.length\n const scrollRef = useRef<ScrollViewHandle>(null)\n\n const measured = useRef<(number | undefined)[]>([])\n const [version, setVersion] = useState(0)\n // Scroll position along the main axis (contentOffset.x when horizontal).\n // Always in RAW adjustment space — all windowing math below is raw.\n const scrollY = useRef(0)\n // Viewport extent along the main axis (width when horizontal).\n const viewportH = useRef(0)\n // RN-space offset for inverted lists. RN's scaleY(-1) flip puts\n // contentOffset 0 at the far (raw) end of the content, so the exposed\n // offset counts from there: exposed = maxRaw - raw. It is the pinned\n // source of truth across content growth — restoring raw from it is what\n // keeps an inverted chat glued to its latest message on prepend.\n const exposedOffset = useRef(0)\n // Main-axis content size as GTK last reported it (the adjustment range).\n // The raw scroll maximum is contentMain - viewport; before the first\n // report it falls back to the list extent (header/footer not yet known).\n const contentMain = useRef(0)\n const pendingAnchor = useRef(0)\n // scrollToIndex issued while sizes were still estimates: re-run the\n // positioning once after the remount measures real sizes (≤2 scrollTo\n // corrections in total).\n const pendingScrollIndex = useRef<{\n index: number\n viewPosition: number\n animated?: boolean\n } | null>(null)\n const endReachedForSize = useRef(-1)\n // Currently reported viewable tokens keyed by item key (isViewable true).\n const viewableTokens = useRef(new Map<string, ViewToken<T>>())\n // Items meeting the viewability criteria but still waiting out\n // minimumViewTime; cancelled if they leave the viewport first.\n const viewabilityTimers = useRef(\n new Map<string, ReturnType<typeof setTimeout>>(),\n )\n // Keys whose minimumViewTime elapsed while continuously visible.\n const maturedKeys = useRef(new Set<string>())\n // Timers must call the LATEST closure (data may change while pending).\n const recomputeViewabilityRef = useRef<() => void>(() => {})\n\n // Prefix sums; rebuilt on any size correction (O(N) — cheap even at\n // 10k, see the spike). getItemLayout skips measuring entirely.\n const offsets = useMemo(() => {\n const out = new Array<number>(count + 1)\n out[0] = 0\n for (let index = 0; index < count; index += 1) {\n const size = getItemLayout\n ? getItemLayout(data, index).length\n : (measured.current[index] ?? estimatedItemSize)\n out[index + 1] = out[index]! + size\n }\n return out\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [count, version, estimatedItemSize, getItemLayout, data])\n\n // INVERTED PROJECTION. RN implements inverted as a scaleY(-1) flip of\n // the scroller and every cell; the net layout is the data mirrored\n // around the content extent C = offsets[count]: data index i occupies\n // [C - offsets[i+1], C - offsets[i]) in raw scroll space, so data index\n // 0 sits at the far end. The flip also reverses the scroll axis: RN's\n // contentOffset counts from that far end, so the raw GTK offset and the\n // exposed RN offset are complements (exposed = maxRaw - raw).\n const cellStart = (index: number): number =>\n inverted ? offsets[count]! - offsets[index + 1]! : offsets[index]!\n\n const keyOf = (item: T, index: number): string =>\n keyExtractor ? keyExtractor(item, index) : String(index)\n\n const [range, setRange] = useState(() => ({\n first: 0,\n last: Math.min(count, initialNumToRender) - 1,\n }))\n\n const updateRange = (): void => {\n const overscan = Math.max(1, (windowSize - 1) / 2) * viewportH.current\n // Window in visual (scroll) coordinates.\n let start = scrollY.current - overscan\n let end = scrollY.current + viewportH.current + overscan\n if (inverted) {\n // Map the visual window back to data-offset space: visual position v\n // covers data offsets C - v (mirror around the extent), so the\n // visual window [start, end] covers data offsets [C - end, C - start].\n const extent = offsets[count]!\n ;[start, end] = [extent - end, extent - start]\n }\n const first = indexAt(offsets, Math.max(0, start))\n const last = Math.min(count - 1, indexAt(offsets, end))\n setRange((current) =>\n current.first === first && current.last === last\n ? current\n : { first, last },\n )\n }\n\n // Clamp a scroll target to the valid range of the axis.\n const clampOffset = (target: number): number => {\n const max = Math.max(0, offsets[count]! - viewportH.current)\n return Math.min(max, Math.max(0, target))\n }\n\n // Raw scroll maximum along the main axis (adjustment upper - page).\n const maxRawScroll = (): number =>\n Math.max(0, (contentMain.current || offsets[count]!) - viewportH.current)\n\n // Translate an RN-space main-axis offset into raw adjustment space (and\n // back — the mapping is its own inverse).\n const toRaw = (offset: number): number =>\n Math.max(0, maxRawScroll() - offset)\n\n // Raw scroll offset that places `index` in the viewport: viewPosition 0\n // aligns the cell start with the viewport start, 0.5 centers it, 1\n // aligns the cell end with the viewport end. Inverted flips which edge\n // viewPosition 0 means: RN computes the target in data space and the\n // scaleY(-1) flip shows it from the other end, so 0 aligns the cell\n // with the visual BOTTOM — in mirrored raw coordinates that is the\n // complementary alignment.\n const offsetForIndex = (index: number, viewPosition: number): number => {\n const size = offsets[index + 1]! - offsets[index]!\n const align = inverted ? 1 - viewPosition : viewPosition\n return clampOffset(cellStart(index) - align * (viewportH.current - size))\n }\n\n const scrollToAxis = (offset: number, animated?: boolean): void => {\n scrollRef.current?.scrollTo(\n horizontal ? { x: offset, animated } : { y: offset, animated },\n )\n }\n\n const scrollToIndex = (params: {\n index: number\n viewPosition?: number\n animated?: boolean\n }): void => {\n if (count === 0) {\n return\n }\n const index = Math.min(count - 1, Math.max(0, Math.trunc(params.index)))\n const viewPosition = params.viewPosition ?? 0\n // Without getItemLayout the target may rest on estimates: remember the\n // request so the version effect can re-run the positioning once the\n // remounted cells have measured (the ≤2-corrections convergence).\n pendingScrollIndex.current = getItemLayout\n ? null\n : { index, viewPosition, animated: params.animated }\n scrollToAxis(offsetForIndex(index, viewPosition), params.animated)\n }\n\n useImperativeHandle(ref, () => ({\n // Any direct scroll cancels a pending scrollToIndex correction. The\n // caller always speaks RN-space offsets; inverted translates the main\n // axis into raw adjustment space.\n scrollTo: (options) => {\n pendingScrollIndex.current = null\n const main = horizontal ? options.x : options.y\n if (!inverted || main === undefined) {\n scrollRef.current?.scrollTo(options)\n return\n }\n scrollRef.current?.scrollTo({\n ...options,\n ...(horizontal ? { x: toRaw(main) } : { y: toRaw(main) }),\n })\n },\n scrollToEnd: (options) => {\n pendingScrollIndex.current = null\n // Inverted: the END of the data sits at raw offset 0 (visual top).\n if (inverted) {\n scrollToAxis(0, options?.animated)\n return\n }\n scrollRef.current?.scrollToEnd(options)\n },\n scrollToOffset: ({ offset, animated }) => {\n pendingScrollIndex.current = null\n scrollToAxis(inverted ? toRaw(offset) : offset, animated)\n },\n scrollToIndex,\n scrollToItem: ({ item, viewPosition, animated }) => {\n const index = data.indexOf(item as T)\n if (index >= 0) {\n scrollToIndex({ index, viewPosition, animated })\n }\n },\n }))\n\n // Data changes move the window in BOTH directions: growth from an empty\n // list must extend the initial range, shrinking must clamp it.\n useLayoutEffect(() => {\n updateRange()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [count])\n\n // Runs right after offsets rebuilt from new measurements. A pending\n // scrollToIndex supersedes anchoring: re-issue the (now refined) target\n // once and stop — this is the second and final correction.\n useLayoutEffect(() => {\n const pending = pendingScrollIndex.current\n if (pending) {\n pendingScrollIndex.current = null\n pendingAnchor.current = 0\n scrollToAxis(\n offsetForIndex(pending.index, pending.viewPosition),\n pending.animated,\n )\n return\n }\n // Anchor: apply the accumulated correction delta right after offsets\n // rebuilt, in the same frame — the viewport does not visually move.\n if (pendingAnchor.current !== 0) {\n const delta = pendingAnchor.current\n pendingAnchor.current = 0\n scrollToAxis(scrollY.current + delta)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [version])\n\n const onItemLayout = (index: number, size: number): void => {\n if (getItemLayout) {\n return\n }\n const known = measured.current[index] ?? estimatedItemSize\n if (Math.abs(known - size) < 0.5) {\n return\n }\n measured.current[index] = size\n // A size change shifts every cell BEFORE the changed one in visual\n // order — for a normal list that is cells above the window (index <\n // first), compensated by the anchor. Inverted lists skip the anchor\n // entirely: their correction is the exposed-offset restore on the\n // content-size report, which re-pins the view to the far end exactly\n // like RN's flip keeps contentOffset counting from there.\n if (!inverted && index < range.first) {\n pendingAnchor.current += size - known\n }\n setVersion((value) => value + 1)\n }\n\n // VIEWABILITY. Pure math over the prefix sums — no widget queries. All\n // positions are visual (scroll-space): cellStart already folds in the\n // inverted mirror and scrollY/viewportH track the main axis, so the same\n // code serves normal, inverted, and horizontal lists.\n const recomputeViewability = (): void => {\n if (!onViewableItemsChanged) {\n return\n }\n const viewport = viewportH.current\n const extent = offsets[count] ?? 0\n // Items currently meeting the visibility criteria, in index order.\n const eligible = new Map<string, { item: T; index: number }>()\n if (count > 0 && viewport > 0 && extent > 0) {\n const windowStart = scrollY.current\n const windowEnd = windowStart + viewport\n // Visible data-index range: mirror the visual window into data-offset\n // space when inverted (same mapping as updateRange, zero overscan).\n let start = windowStart\n let end = windowEnd\n if (inverted) {\n ;[start, end] = [extent - end, extent - start]\n }\n const first = indexAt(offsets, Math.max(0, start))\n const last = Math.min(count - 1, indexAt(offsets, end))\n const areaThreshold =\n viewabilityConfig?.viewAreaCoveragePercentThreshold\n const itemThreshold = viewabilityConfig?.itemVisiblePercentThreshold\n for (let index = first; index <= last; index += 1) {\n const length = offsets[index + 1]! - offsets[index]!\n const startPos = cellStart(index)\n const visible =\n Math.min(startPos + length, windowEnd) -\n Math.max(startPos, windowStart)\n if (visible <= 0) {\n continue\n }\n let viewable: boolean\n if (visible >= length) {\n // A fully visible item always counts, even when it covers less\n // than the configured share (RN ViewabilityHelper).\n viewable = true\n } else if (areaThreshold !== undefined) {\n viewable = (100 * visible) / viewport >= areaThreshold\n } else if (itemThreshold !== undefined) {\n viewable = (100 * visible) / length >= itemThreshold\n } else {\n // RN default: any visible pixel counts.\n viewable = true\n }\n if (viewable) {\n const item = data[index]!\n eligible.set(keyOf(item, index), { item, index })\n }\n }\n }\n const minimumViewTime = viewabilityConfig?.minimumViewTime ?? 0\n // Leaving the viewport cancels a pending timer and resets maturity —\n // re-entering restarts the continuous-visibility clock.\n for (const [key, timer] of viewabilityTimers.current) {\n if (!eligible.has(key)) {\n clearTimeout(timer)\n viewabilityTimers.current.delete(key)\n }\n }\n for (const key of maturedKeys.current) {\n if (!eligible.has(key)) {\n maturedKeys.current.delete(key)\n }\n }\n const next = new Map<string, ViewToken<T>>()\n for (const [key, entry] of eligible) {\n if (\n minimumViewTime <= 0 ||\n viewableTokens.current.has(key) ||\n maturedKeys.current.has(key)\n ) {\n next.set(key, {\n item: entry.item,\n key,\n index: entry.index,\n isViewable: true,\n })\n } else if (!viewabilityTimers.current.has(key)) {\n const timer = setTimeout(() => {\n viewabilityTimers.current.delete(key)\n maturedKeys.current.add(key)\n recomputeViewabilityRef.current()\n }, minimumViewTime)\n viewabilityTimers.current.set(key, timer)\n }\n }\n // Emit only when the viewable KEY SET changed: newly-viewable tokens\n // first, then the ones that left (isViewable false), each index-ordered.\n const changed: ViewToken<T>[] = []\n for (const token of next.values()) {\n if (!viewableTokens.current.has(token.key)) {\n changed.push(token)\n }\n }\n for (const token of viewableTokens.current.values()) {\n if (!next.has(token.key)) {\n changed.push({ ...token, isViewable: false })\n }\n }\n // Keep tokens fresh (indices may shift under stable keys) but stay\n // silent while the key set is unchanged.\n viewableTokens.current = next\n if (changed.length === 0) {\n return\n }\n onViewableItemsChanged({ viewableItems: [...next.values()], changed })\n }\n useLayoutEffect(() => {\n recomputeViewabilityRef.current = recomputeViewability\n })\n\n const maybeFireEndReached = (): void => {\n // Before the first layout the viewport extent is unknown — every\n // trigger path below re-runs once it is.\n if (!onEndReached || viewportH.current <= 0) {\n return\n }\n const extent = offsets[count]!\n const threshold =\n viewportH.current * Math.max(0, onEndReachedThreshold ?? 0.1)\n // Distance from the viewport to the DATA end (RN semantics: the end\n // of `data`, not the visual bottom). Normal lists keep the data end\n // at raw position `extent`; the inverted projection places it at raw\n // position 0 (the visual top), so the distance is simply the raw\n // scroll offset — an inverted chat fires this while scrolling up\n // into its history, which is where \"load older\" belongs.\n // Content shorter than the viewport has a negative distance, so short\n // lists fire right after the first layout without any scrolling.\n const distance = inverted\n ? scrollY.current\n : extent - (scrollY.current + viewportH.current)\n if (extent > 0 && distance <= threshold) {\n if (endReachedForSize.current !== extent) {\n endReachedForSize.current = extent\n onEndReached()\n }\n }\n }\n\n const handleScroll = (event: ScrollEvent): void => {\n const raw = horizontal\n ? event.nativeEvent.contentOffset.x\n : event.nativeEvent.contentOffset.y\n scrollY.current = raw\n if (inverted) {\n exposedOffset.current = Math.max(0, maxRawScroll() - raw)\n // The caller sees RN-space offsets: contentOffset 0 is the far end\n // where the data starts (a chat's latest message).\n onScroll?.({\n nativeEvent: {\n ...event.nativeEvent,\n contentOffset: {\n x: horizontal\n ? exposedOffset.current\n : event.nativeEvent.contentOffset.x,\n y: horizontal\n ? event.nativeEvent.contentOffset.y\n : exposedOffset.current,\n },\n },\n })\n } else {\n onScroll?.(event)\n }\n updateRange()\n recomputeViewability()\n maybeFireEndReached()\n }\n\n const handleLayout = (event: LayoutEvent): void => {\n onLayout?.(event)\n viewportH.current = horizontal\n ? event.nativeEvent.layout.width\n : event.nativeEvent.layout.height\n if (inverted) {\n // The viewport changed under a pinned exposed offset: re-derive the\n // raw position and window against the value we are about to take.\n // Best effort — the adjustment may still clamp against the previous\n // page size; the next content-size report settles it.\n scrollY.current = toRaw(exposedOffset.current)\n scrollToAxis(scrollY.current)\n }\n updateRange()\n // First layout doubles as the initial viewability/end-reached pass.\n recomputeViewability()\n maybeFireEndReached()\n }\n\n const handleContentSizeChange = (width: number, height: number): void => {\n onContentSizeChange?.(width, height)\n contentMain.current = horizontal ? width : height\n if (!inverted) {\n return\n }\n // The raw scroll range changed under a pinned exposed offset: restore\n // the raw value from it (the adjustment is fresh — GTK emits \"changed\"\n // only after the allocation that resized it). Content prepended to an\n // inverted chat therefore appears WITHOUT the view moving, exactly\n // like RN's contentOffset staying put under the flip. This also\n // performs the initial positioning: exposed 0 = the data start.\n const raw = toRaw(exposedOffset.current)\n scrollY.current = raw\n scrollToAxis(raw)\n updateRange()\n }\n\n // Data or measurement changes move content under a static viewport (no\n // scroll event fires): refresh viewability and the end-reached trigger.\n useEffect(() => {\n recomputeViewability()\n maybeFireEndReached()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [offsets])\n\n // Unmount: cancel every pending minimumViewTime timer.\n useEffect(() => {\n const timers = viewabilityTimers.current\n return () => {\n for (const timer of timers.values()) {\n clearTimeout(timer)\n }\n timers.clear()\n }\n }, [])\n\n // Sticky cells (vertical, non-inverted): the ACTIVE header must stay\n // mounted even when its own offset left the window — extend the mount\n // set with it; geometry comes from the registry offsets, pinning is the\n // ScrollView registry's job (same mechanism as plain sticky children).\n const stickySorted =\n stickyHeaderIndices && !horizontal && !inverted\n ? [...stickyHeaderIndices].sort((a, b) => a - b)\n : []\n let activeStickyIndex = -1\n for (const stickyIndex of stickySorted) {\n if (stickyIndex < count && cellStart(stickyIndex) <= scrollY.current) {\n activeStickyIndex = stickyIndex\n }\n }\n\n const renderCell = (index: number): ReactNode => {\n const item = data[index]!\n const key = keyOf(item, index)\n // Vertical cells stretch across the width and sit at their offset;\n // horizontal cells stretch across the height and take their own\n // width from content (so onLayout can measure it).\n const cellStyle: StyleProp = horizontal\n ? { position: \"absolute\", left: cellStart(index), top: 0, bottom: 0 }\n : { position: \"absolute\", left: 0, right: 0, top: cellStart(index) }\n const measure = (event: {\n nativeEvent: { layout: { width: number; height: number } }\n }): void =>\n onItemLayout(\n index,\n horizontal\n ? event.nativeEvent.layout.width\n : event.nativeEvent.layout.height,\n )\n const body = (\n <>\n {renderItem({ item, index })}\n {index < count - 1 && ItemSeparatorComponent ? (\n <ItemSeparatorComponent />\n ) : null}\n </>\n )\n if (stickySorted.includes(index)) {\n return (\n <StickySlot\n key={key}\n stickyKey={`cell-${key}`}\n top={cellStart(index)}\n style={cellStyle}\n onLayout={measure}\n >\n {body}\n </StickySlot>\n )\n }\n return (\n <View\n key={key}\n style={cellStyle}\n onLayout={measure}\n >\n {body}\n </View>\n )\n }\n\n const cells: ReactNode[] = []\n if (count > 0) {\n if (activeStickyIndex >= 0 && activeStickyIndex < range.first) {\n cells.push(renderCell(activeStickyIndex))\n }\n const last = Math.min(range.last, count - 1)\n for (let index = range.first; index <= last; index += 1) {\n cells.push(renderCell(index))\n }\n }\n\n // extraData participates in identity so memoized parents re-render rows.\n void extraData\n // Accepted for RN parity only; no desktop gesture ever calls it.\n void onRefresh\n\n return (\n <ScrollView\n {...scrollProps}\n horizontal={horizontal}\n ref={scrollRef}\n onScroll={handleScroll}\n onContentSizeChange={handleContentSizeChange}\n onLayout={handleLayout}\n >\n {refreshing ? (\n // Desktop RefreshControl: no pull gesture exists, so `refreshing`\n // simply shows an in-flow spinner row above the list content.\n <View style={{ alignItems: \"center\", padding: 8 }}>\n <ActivityIndicator />\n </View>\n ) : null}\n {/* RN's flip mirrors the chrome too: on an inverted list the footer\n sits at the visual top and the header at the visual bottom. */}\n {renderAux(inverted ? ListFooterComponent : ListHeaderComponent)}\n {count === 0 && renderAux(ListEmptyComponent)}\n {count > 0 && (\n <View\n style={\n horizontal\n ? { width: offsets[count]! }\n : { height: offsets[count]! }\n }\n >\n {cells}\n </View>\n )}\n {renderAux(inverted ? ListHeaderComponent : ListFooterComponent)}\n </ScrollView>\n )\n },\n)\nVirtualizedListInner.displayName = \"VirtualizedList\"\n\nexport const VirtualizedList = VirtualizedListInner as <T>(\n props: VirtualizedListProps<T> & { ref?: React.Ref<VirtualizedListHandle> },\n) => ReactElement\n"]}
|
|
1
|
+
{"version":3,"file":"virtualized-list.js","sourceRoot":"","sources":["../../src/components/virtualized-list.tsx"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2EAA2E;AAC3E,sEAAsE;AACtE,+EAA+E;AAC/E,2EAA2E;AAC3E,0EAA0E;AAC1E,8CAA8C;AAC9C,OAAO,EACL,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAA;AAEd,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,OAAO,GACR,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EACL,UAAU,EACV,UAAU,GAIX,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,IAAI,EAAE,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M,EAAE,OAAO,CAAC,KAAK,CAAE,EAAE,YAGhC,KAAK,GACD,CACR,EACA,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,IACrD,CACd,CAAA;AACH,CAAC,CACF,CAAA;AACD,oBAAoB,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,oBAEd,CAAA","sourcesContent":["// The windowed list core (RN VirtualizedList model, leaner): only the rows\n// around the viewport are mounted; the content View carries the prefix-sum\n// height so the ScrollView gets the full range; every mounted cell is\n// absolutely positioned at its offset. Heights come from getItemLayout (exact)\n// or estimatedItemSize refined by per-cell onLayout; corrections above the\n// first visible row are anchored by compensating the scroll offset in the\n// same commit (docs/research/list-window.md).\nimport {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactElement,\n type ReactNode,\n} from \"react\"\nimport type { StyleProp } from \"../contracts\"\nimport {\n perfAddTime,\n perfBurst,\n perfCount,\n perfEnabled,\n perfNow,\n} from \"../perf\"\nimport { ActivityIndicator } from \"./activity-indicator\"\nimport {\n ScrollView,\n StickySlot,\n type ScrollEvent,\n type ScrollViewHandle,\n type ScrollViewProps,\n} from \"./scroll-view\"\nimport type { LayoutEvent } from \"./use-layout-child\"\nimport { View } from \"./view\"\n\nexport type ListRenderItemInfo<T> = { item: T; index: number }\n\nexport type ItemLayout = { length: number; offset: number; index: number }\n\n// RN ViewToken: one entry per item in the viewability report.\nexport type ViewToken<T = unknown> = {\n item: T\n key: string\n index: number\n isViewable: boolean\n}\n\nexport type ViewabilityConfig = {\n // Percent (0..100) of the ITEM that must be visible. A fully visible item\n // always counts, even when it covers less than the threshold.\n itemVisiblePercentThreshold?: number\n // Percent (0..100) of the VIEWPORT the item must cover. Takes precedence\n // over itemVisiblePercentThreshold when both are set (RN ViewabilityHelper).\n viewAreaCoveragePercentThreshold?: number\n // The item must stay continuously visible this many ms before it is\n // reported viewable; scrolling out before that cancels the report.\n minimumViewTime?: number\n}\n\n// RN FlatList scroll surface on top of ScrollViewHandle. The handle is not\n// generic: scrollToItem takes the item as unknown and resolves the index with\n// indexOf on the latest data.\nexport type VirtualizedListHandle = ScrollViewHandle & {\n scrollToIndex(params: {\n index: number\n viewPosition?: number\n animated?: boolean\n }): void\n scrollToItem(params: {\n item: unknown\n viewPosition?: number\n animated?: boolean\n }): void\n scrollToOffset(params: { offset: number; animated?: boolean }): void\n}\n\nexport type VirtualizedListProps<T> = Omit<ScrollViewProps, \"children\"> & {\n data: readonly T[]\n renderItem: (info: ListRenderItemInfo<T>) => ReactElement | null\n keyExtractor?: (item: T, index: number) => string\n estimatedItemSize?: number\n getItemLayout?: (data: readonly T[], index: number) => ItemLayout\n // Overscan in viewport multiples (RN semantics: `windowSize` viewports are\n // mounted, one of them visible). RN's mobile default is 5; the desktop\n // default is 11 — see the note on DEFAULT_WINDOW_SIZE.\n windowSize?: number\n initialNumToRender?: number\n // RN batching pair. Rows OUTSIDE the visible area are mounted at most\n // `maxToRenderPerBatch` per pass, one pass every `updateCellsBatchingPeriod`\n // ms, so a flick or a long jump spreads its mounts over frames instead of\n // stalling one. The visible rows never wait for a batch.\n maxToRenderPerBatch?: number\n updateCellsBatchingPeriod?: number\n extraData?: unknown\n // RN inverted semantics: the list opens at the START of the data (visually\n // at the far end — a chat's latest message sits at the bottom), and\n // contentOffset counts from that end. See the projection math below.\n inverted?: boolean\n // RefreshControl parity. Desktop has no pull gesture: `refreshing` renders\n // a spinner row above the content; `onRefresh` is accepted for RN API\n // compatibility but is never triggered by a gesture — app code must call\n // it itself (e.g. from a toolbar button or a keyboard shortcut).\n refreshing?: boolean\n onRefresh?: () => void\n ItemSeparatorComponent?: ComponentType | null\n ListHeaderComponent?: ComponentType | ReactElement | null\n ListFooterComponent?: ComponentType | ReactElement | null\n ListEmptyComponent?: ComponentType | ReactElement | null\n onEndReached?: () => void\n onEndReachedThreshold?: number\n onViewableItemsChanged?: (info: {\n viewableItems: ViewToken<T>[]\n changed: ViewToken<T>[]\n }) => void\n viewabilityConfig?: ViewabilityConfig\n style?: StyleProp\n}\n\nconst renderAux = (\n component: ComponentType | ReactElement | null | undefined,\n): ReactNode => {\n if (component === null || component === undefined) {\n return null\n }\n if (typeof component === \"function\") {\n const Aux = component\n return <Aux />\n }\n return component\n}\n\n// First index whose offset-end is past `target` (binary search over prefix\n// sums; offsets has count+1 entries).\nconst indexAt = (offsets: number[], target: number): number => {\n let low = 0\n let high = offsets.length - 2\n while (low < high) {\n const mid = (low + high) >> 1\n if (offsets[mid + 1]! <= target) {\n low = mid + 1\n } else {\n high = mid\n }\n }\n return low\n}\n\n// Overscan default. RN ships 5 because a phone pays for mounted rows in\n// memory; a desktop app does not, and here the mounted set is what costs\n// frames: every window boundary crossing is a mount + Yoga reflow + GTK\n// allocate burst, so a WIDER window means fewer crossings per scrolled pixel.\n// Measured (docs/research/scroll-performance.md): 11 instead of 5 cuts\n// mount/unmount churn by ~21% and late frames from ~10/s to ~7.7/s.\nconst DEFAULT_WINDOW_SIZE = 11\n\n// Perf: counts real React mounts/unmounts of windowed cells (rendered as a\n// null child inside each cell only when GTKX_PERF=1).\nconst CellMountProbe = (): null => {\n useLayoutEffect(() => {\n perfCount(\"vl.cellMount\")\n perfBurst(\"vl.mountsPerFrame\")\n return () => {\n perfCount(\"vl.cellUnmount\")\n }\n }, [])\n return null\n}\n\nconst VirtualizedListInner = forwardRef(\n <T,>(\n {\n data,\n renderItem,\n keyExtractor,\n estimatedItemSize = 44,\n getItemLayout,\n windowSize = DEFAULT_WINDOW_SIZE,\n initialNumToRender = 10,\n maxToRenderPerBatch = 10,\n updateCellsBatchingPeriod = 50,\n extraData,\n inverted = false,\n refreshing = false,\n onRefresh,\n ItemSeparatorComponent,\n ListHeaderComponent,\n ListFooterComponent,\n ListEmptyComponent,\n onEndReached,\n onEndReachedThreshold = 0.1,\n onViewableItemsChanged,\n viewabilityConfig,\n onScroll,\n onContentSizeChange,\n onLayout,\n horizontal = false,\n stickyHeaderIndices,\n ...scrollProps\n }: VirtualizedListProps<T>,\n ref: React.Ref<VirtualizedListHandle>,\n ) => {\n const count = data.length\n const scrollRef = useRef<ScrollViewHandle>(null)\n\n const measured = useRef<(number | undefined)[]>([])\n const [version, setVersion] = useState(0)\n // Scroll position along the main axis (contentOffset.x when horizontal).\n // Always in RAW adjustment space — all windowing math below is raw.\n const scrollY = useRef(0)\n // Viewport extent along the main axis (width when horizontal).\n const viewportH = useRef(0)\n // RN-space offset for inverted lists. RN's scaleY(-1) flip puts\n // contentOffset 0 at the far (raw) end of the content, so the exposed\n // offset counts from there: exposed = maxRaw - raw. It is the pinned\n // source of truth across content growth — restoring raw from it is what\n // keeps an inverted chat glued to its latest message on prepend.\n const exposedOffset = useRef(0)\n // Main-axis content size as GTK last reported it (the adjustment range).\n // The raw scroll maximum is contentMain - viewport; before the first\n // report it falls back to the list extent (header/footer not yet known).\n const contentMain = useRef(0)\n const pendingAnchor = useRef(0)\n // scrollToIndex issued while sizes were still estimates: re-run the\n // positioning once after the remount measures real sizes (≤2 scrollTo\n // corrections in total).\n const pendingScrollIndex = useRef<{\n index: number\n viewPosition: number\n animated?: boolean\n } | null>(null)\n const endReachedForSize = useRef(-1)\n // Currently reported viewable tokens keyed by item key (isViewable true).\n const viewableTokens = useRef(new Map<string, ViewToken<T>>())\n // Items meeting the viewability criteria but still waiting out\n // minimumViewTime; cancelled if they leave the viewport first.\n const viewabilityTimers = useRef(\n new Map<string, ReturnType<typeof setTimeout>>(),\n )\n // Keys whose minimumViewTime elapsed while continuously visible.\n const maturedKeys = useRef(new Set<string>())\n // Timers must call the LATEST closure (data may change while pending).\n const recomputeViewabilityRef = useRef<() => void>(() => {})\n\n // Prefix sums; rebuilt on any size correction (O(N) — cheap even at\n // 10k, see the spike). getItemLayout skips measuring entirely.\n const offsets = useMemo(() => {\n const out = new Array<number>(count + 1)\n out[0] = 0\n for (let index = 0; index < count; index += 1) {\n const size = getItemLayout\n ? getItemLayout(data, index).length\n : (measured.current[index] ?? estimatedItemSize)\n out[index + 1] = out[index]! + size\n }\n return out\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [count, version, estimatedItemSize, getItemLayout, data])\n\n // INVERTED PROJECTION. RN implements inverted as a scaleY(-1) flip of\n // the scroller and every cell; the net layout is the data mirrored\n // around the content extent C = offsets[count]: data index i occupies\n // [C - offsets[i+1], C - offsets[i]) in raw scroll space, so data index\n // 0 sits at the far end. The flip also reverses the scroll axis: RN's\n // contentOffset counts from that far end, so the raw GTK offset and the\n // exposed RN offset are complements (exposed = maxRaw - raw).\n const cellStart = (index: number): number =>\n inverted ? offsets[count]! - offsets[index + 1]! : offsets[index]!\n\n const keyOf = (item: T, index: number): string =>\n keyExtractor ? keyExtractor(item, index) : String(index)\n\n const [range, setRange] = useState(() => ({\n first: 0,\n last: Math.min(count, initialNumToRender) - 1,\n }))\n // Mirror of `range` for event-time math: several scroll events (and a\n // batch timer) can run before React re-renders, and each needs the range\n // the previous one asked for, not the one currently rendered.\n const rangeRef = useRef(range)\n const batchTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n // Mount allowance as a token bucket: maxToRenderPerBatch rows per\n // updateCellsBatchingPeriod, NOT per pass. One frame can run several passes\n // (scroll event, content-size report, measurement version bump) and a\n // per-pass cap would let them stack back into the burst we are avoiding.\n // A steady scroll needs about one row per frame, far under the refill, so\n // its window still follows the offset exactly.\n const batchTokens = useRef(0)\n const batchFilledAt = useRef(0)\n // The batch timer must call the LATEST closure (offsets/data may change).\n const updateRangeRef = useRef<() => void>(() => {})\n\n // Index range covering the visual window grown by `overscan` px on both\n // sides (0 → exactly the visible rows).\n const rangeFor = (overscan: number): { first: number; last: number } => {\n let start = scrollY.current - overscan\n let end = scrollY.current + viewportH.current + overscan\n if (inverted) {\n // Map the visual window back to data-offset space: visual position v\n // covers data offsets C - v (mirror around the extent), so the\n // visual window [start, end] covers data offsets [C - end, C - start].\n const extent = offsets[count]!\n ;[start, end] = [extent - end, extent - start]\n }\n return {\n first: indexAt(offsets, Math.max(0, start)),\n last: Math.min(count - 1, indexAt(offsets, end)),\n }\n }\n\n const updateRange = (): void => {\n perfCount(\"vl.updateRange\")\n const target = rangeFor(\n Math.max(1, (windowSize - 1) / 2) * viewportH.current,\n )\n const current = rangeRef.current\n // MOUNT BUDGET (RN maxToRenderPerBatch). A flick or a scrollToOffset\n // moves the offset by whole viewports in a single frame, so the target\n // window can be an almost entirely new set of rows — mounting it in one\n // go is a burst of cell mounts + Yoga reflow + GTK allocate that shows\n // up as a visible mid-flick stall (docs/research/scroll-performance.md).\n // The VISIBLE rows are always mounted at once (a blank row is worse than\n // a late one); the overscan beyond them fills in over the following\n // batches.\n const visible = rangeFor(0)\n // Reuse the mounted set only when it still covers what is on screen.\n // The mounted set is ONE contiguous range, so keeping a window that no\n // longer reaches the visible rows would mean mounting the whole gap\n // between them in this pass — the burst, by another route. Overlapping\n // the target window is not enough: with a wide windowSize a jump of\n // several viewports still overlaps it.\n const reusable =\n current.last >= visible.first && current.first <= visible.last\n // Keep what is both mounted and still wanted, always covering the\n // visible rows; after a teleport nothing is reusable and the visible\n // rows are the whole starting window.\n let first = reusable\n ? Math.min(Math.max(current.first, target.first), visible.first)\n : visible.first\n let last = reusable\n ? Math.max(Math.min(current.last, target.last), visible.last)\n : visible.last\n // Rows the visible set already costs this pass count against the batch:\n // after a teleport they ARE the batch.\n const kept = reusable\n ? Math.max(\n 0,\n Math.min(last, current.last) - Math.max(first, current.first) + 1,\n )\n : 0\n const now = Date.now()\n if (now - batchFilledAt.current >= updateCellsBatchingPeriod) {\n batchTokens.current = maxToRenderPerBatch\n batchFilledAt.current = now\n }\n let budget = Math.max(0, batchTokens.current - (last - first + 1 - kept))\n while (budget > 0 && (first > target.first || last < target.last)) {\n if (last < target.last) {\n last += 1\n budget -= 1\n }\n if (budget > 0 && first > target.first) {\n first -= 1\n budget -= 1\n }\n }\n batchTokens.current = budget\n if (first !== current.first || last !== current.last) {\n perfCount(\"vl.rangeChange\")\n rangeRef.current = { first, last }\n setRange({ first, last })\n }\n // Still short of the full window: continue on the next batch tick.\n if (first > target.first || last < target.last) {\n perfCount(\"vl.rangePending\")\n if (batchTimer.current === null) {\n batchTimer.current = setTimeout(() => {\n batchTimer.current = null\n updateRangeRef.current()\n }, updateCellsBatchingPeriod)\n }\n }\n }\n useLayoutEffect(() => {\n updateRangeRef.current = updateRange\n })\n\n useEffect(() => {\n return () => {\n if (batchTimer.current !== null) {\n clearTimeout(batchTimer.current)\n batchTimer.current = null\n }\n }\n }, [])\n\n // Clamp a scroll target to the valid range of the axis.\n const clampOffset = (target: number): number => {\n const max = Math.max(0, offsets[count]! - viewportH.current)\n return Math.min(max, Math.max(0, target))\n }\n\n // Raw scroll maximum along the main axis (adjustment upper - page).\n const maxRawScroll = (): number =>\n Math.max(0, (contentMain.current || offsets[count]!) - viewportH.current)\n\n // Translate an RN-space main-axis offset into raw adjustment space (and\n // back — the mapping is its own inverse).\n const toRaw = (offset: number): number =>\n Math.max(0, maxRawScroll() - offset)\n\n // Raw scroll offset that places `index` in the viewport: viewPosition 0\n // aligns the cell start with the viewport start, 0.5 centers it, 1\n // aligns the cell end with the viewport end. Inverted flips which edge\n // viewPosition 0 means: RN computes the target in data space and the\n // scaleY(-1) flip shows it from the other end, so 0 aligns the cell\n // with the visual BOTTOM — in mirrored raw coordinates that is the\n // complementary alignment.\n const offsetForIndex = (index: number, viewPosition: number): number => {\n const size = offsets[index + 1]! - offsets[index]!\n const align = inverted ? 1 - viewPosition : viewPosition\n return clampOffset(cellStart(index) - align * (viewportH.current - size))\n }\n\n const scrollToAxis = (offset: number, animated?: boolean): void => {\n scrollRef.current?.scrollTo(\n horizontal ? { x: offset, animated } : { y: offset, animated },\n )\n }\n\n const scrollToIndex = (params: {\n index: number\n viewPosition?: number\n animated?: boolean\n }): void => {\n if (count === 0) {\n return\n }\n const index = Math.min(count - 1, Math.max(0, Math.trunc(params.index)))\n const viewPosition = params.viewPosition ?? 0\n // Without getItemLayout the target may rest on estimates: remember the\n // request so the version effect can re-run the positioning once the\n // remounted cells have measured (the ≤2-corrections convergence).\n pendingScrollIndex.current = getItemLayout\n ? null\n : { index, viewPosition, animated: params.animated }\n scrollToAxis(offsetForIndex(index, viewPosition), params.animated)\n }\n\n useImperativeHandle(ref, () => ({\n // Any direct scroll cancels a pending scrollToIndex correction. The\n // caller always speaks RN-space offsets; inverted translates the main\n // axis into raw adjustment space.\n scrollTo: (options) => {\n pendingScrollIndex.current = null\n const main = horizontal ? options.x : options.y\n if (!inverted || main === undefined) {\n scrollRef.current?.scrollTo(options)\n return\n }\n scrollRef.current?.scrollTo({\n ...options,\n ...(horizontal ? { x: toRaw(main) } : { y: toRaw(main) }),\n })\n },\n scrollToEnd: (options) => {\n pendingScrollIndex.current = null\n // Inverted: the END of the data sits at raw offset 0 (visual top).\n if (inverted) {\n scrollToAxis(0, options?.animated)\n return\n }\n scrollRef.current?.scrollToEnd(options)\n },\n scrollToOffset: ({ offset, animated }) => {\n pendingScrollIndex.current = null\n scrollToAxis(inverted ? toRaw(offset) : offset, animated)\n },\n scrollToIndex,\n scrollToItem: ({ item, viewPosition, animated }) => {\n const index = data.indexOf(item as T)\n if (index >= 0) {\n scrollToIndex({ index, viewPosition, animated })\n }\n },\n }))\n\n // Data changes move the window in BOTH directions: growth from an empty\n // list must extend the initial range, shrinking must clamp it.\n useLayoutEffect(() => {\n updateRange()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [count])\n\n // Runs right after offsets rebuilt from new measurements. A pending\n // scrollToIndex supersedes anchoring: re-issue the (now refined) target\n // once and stop — this is the second and final correction.\n useLayoutEffect(() => {\n const pending = pendingScrollIndex.current\n if (pending) {\n pendingScrollIndex.current = null\n pendingAnchor.current = 0\n scrollToAxis(\n offsetForIndex(pending.index, pending.viewPosition),\n pending.animated,\n )\n return\n }\n // Anchor: apply the accumulated correction delta right after offsets\n // rebuilt, in the same frame — the viewport does not visually move.\n if (pendingAnchor.current !== 0) {\n const delta = pendingAnchor.current\n pendingAnchor.current = 0\n scrollToAxis(scrollY.current + delta)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [version])\n\n const onItemLayout = (index: number, size: number): void => {\n if (getItemLayout) {\n return\n }\n const known = measured.current[index] ?? estimatedItemSize\n if (Math.abs(known - size) < 0.5) {\n return\n }\n measured.current[index] = size\n perfCount(\"vl.versionBump\")\n perfBurst(\"vl.bumpsPerFrame\")\n // A size change shifts every cell BEFORE the changed one in visual\n // order — for a normal list that is cells above the window (index <\n // first), compensated by the anchor. Inverted lists skip the anchor\n // entirely: their correction is the exposed-offset restore on the\n // content-size report, which re-pins the view to the far end exactly\n // like RN's flip keeps contentOffset counting from there.\n if (!inverted && index < range.first) {\n pendingAnchor.current += size - known\n }\n setVersion((value) => value + 1)\n }\n\n // VIEWABILITY. Pure math over the prefix sums — no widget queries. All\n // positions are visual (scroll-space): cellStart already folds in the\n // inverted mirror and scrollY/viewportH track the main axis, so the same\n // code serves normal, inverted, and horizontal lists.\n const recomputeViewability = (): void => {\n if (!onViewableItemsChanged) {\n return\n }\n const viewport = viewportH.current\n const extent = offsets[count] ?? 0\n // Items currently meeting the visibility criteria, in index order.\n const eligible = new Map<string, { item: T; index: number }>()\n if (count > 0 && viewport > 0 && extent > 0) {\n const windowStart = scrollY.current\n const windowEnd = windowStart + viewport\n // Visible data-index range: mirror the visual window into data-offset\n // space when inverted (same mapping as updateRange, zero overscan).\n let start = windowStart\n let end = windowEnd\n if (inverted) {\n ;[start, end] = [extent - end, extent - start]\n }\n const first = indexAt(offsets, Math.max(0, start))\n const last = Math.min(count - 1, indexAt(offsets, end))\n const areaThreshold =\n viewabilityConfig?.viewAreaCoveragePercentThreshold\n const itemThreshold = viewabilityConfig?.itemVisiblePercentThreshold\n for (let index = first; index <= last; index += 1) {\n const length = offsets[index + 1]! - offsets[index]!\n const startPos = cellStart(index)\n const visible =\n Math.min(startPos + length, windowEnd) -\n Math.max(startPos, windowStart)\n if (visible <= 0) {\n continue\n }\n let viewable: boolean\n if (visible >= length) {\n // A fully visible item always counts, even when it covers less\n // than the configured share (RN ViewabilityHelper).\n viewable = true\n } else if (areaThreshold !== undefined) {\n viewable = (100 * visible) / viewport >= areaThreshold\n } else if (itemThreshold !== undefined) {\n viewable = (100 * visible) / length >= itemThreshold\n } else {\n // RN default: any visible pixel counts.\n viewable = true\n }\n if (viewable) {\n const item = data[index]!\n eligible.set(keyOf(item, index), { item, index })\n }\n }\n }\n const minimumViewTime = viewabilityConfig?.minimumViewTime ?? 0\n // Leaving the viewport cancels a pending timer and resets maturity —\n // re-entering restarts the continuous-visibility clock.\n for (const [key, timer] of viewabilityTimers.current) {\n if (!eligible.has(key)) {\n clearTimeout(timer)\n viewabilityTimers.current.delete(key)\n }\n }\n for (const key of maturedKeys.current) {\n if (!eligible.has(key)) {\n maturedKeys.current.delete(key)\n }\n }\n const next = new Map<string, ViewToken<T>>()\n for (const [key, entry] of eligible) {\n if (\n minimumViewTime <= 0 ||\n viewableTokens.current.has(key) ||\n maturedKeys.current.has(key)\n ) {\n next.set(key, {\n item: entry.item,\n key,\n index: entry.index,\n isViewable: true,\n })\n } else if (!viewabilityTimers.current.has(key)) {\n const timer = setTimeout(() => {\n viewabilityTimers.current.delete(key)\n maturedKeys.current.add(key)\n recomputeViewabilityRef.current()\n }, minimumViewTime)\n viewabilityTimers.current.set(key, timer)\n }\n }\n // Emit only when the viewable KEY SET changed: newly-viewable tokens\n // first, then the ones that left (isViewable false), each index-ordered.\n const changed: ViewToken<T>[] = []\n for (const token of next.values()) {\n if (!viewableTokens.current.has(token.key)) {\n changed.push(token)\n }\n }\n for (const token of viewableTokens.current.values()) {\n if (!next.has(token.key)) {\n changed.push({ ...token, isViewable: false })\n }\n }\n // Keep tokens fresh (indices may shift under stable keys) but stay\n // silent while the key set is unchanged.\n viewableTokens.current = next\n if (changed.length === 0) {\n return\n }\n onViewableItemsChanged({ viewableItems: [...next.values()], changed })\n }\n useLayoutEffect(() => {\n recomputeViewabilityRef.current = recomputeViewability\n })\n\n const maybeFireEndReached = (): void => {\n // Before the first layout the viewport extent is unknown — every\n // trigger path below re-runs once it is.\n if (!onEndReached || viewportH.current <= 0) {\n return\n }\n const extent = offsets[count]!\n const threshold =\n viewportH.current * Math.max(0, onEndReachedThreshold ?? 0.1)\n // Distance from the viewport to the DATA end (RN semantics: the end\n // of `data`, not the visual bottom). Normal lists keep the data end\n // at raw position `extent`; the inverted projection places it at raw\n // position 0 (the visual top), so the distance is simply the raw\n // scroll offset — an inverted chat fires this while scrolling up\n // into its history, which is where \"load older\" belongs.\n // Content shorter than the viewport has a negative distance, so short\n // lists fire right after the first layout without any scrolling.\n const distance = inverted\n ? scrollY.current\n : extent - (scrollY.current + viewportH.current)\n if (extent > 0 && distance <= threshold) {\n if (endReachedForSize.current !== extent) {\n endReachedForSize.current = extent\n onEndReached()\n }\n }\n }\n\n const handleScroll = (event: ScrollEvent): void => {\n const raw = horizontal\n ? event.nativeEvent.contentOffset.x\n : event.nativeEvent.contentOffset.y\n scrollY.current = raw\n if (inverted) {\n exposedOffset.current = Math.max(0, maxRawScroll() - raw)\n // The caller sees RN-space offsets: contentOffset 0 is the far end\n // where the data starts (a chat's latest message).\n onScroll?.({\n nativeEvent: {\n ...event.nativeEvent,\n contentOffset: {\n x: horizontal\n ? exposedOffset.current\n : event.nativeEvent.contentOffset.x,\n y: horizontal\n ? event.nativeEvent.contentOffset.y\n : exposedOffset.current,\n },\n },\n })\n } else {\n onScroll?.(event)\n }\n updateRange()\n recomputeViewability()\n maybeFireEndReached()\n }\n\n const handleLayout = (event: LayoutEvent): void => {\n onLayout?.(event)\n viewportH.current = horizontal\n ? event.nativeEvent.layout.width\n : event.nativeEvent.layout.height\n if (inverted) {\n // The viewport changed under a pinned exposed offset: re-derive the\n // raw position and window against the value we are about to take.\n // Best effort — the adjustment may still clamp against the previous\n // page size; the next content-size report settles it.\n scrollY.current = toRaw(exposedOffset.current)\n scrollToAxis(scrollY.current)\n }\n updateRange()\n // First layout doubles as the initial viewability/end-reached pass.\n recomputeViewability()\n maybeFireEndReached()\n }\n\n const handleContentSizeChange = (width: number, height: number): void => {\n onContentSizeChange?.(width, height)\n contentMain.current = horizontal ? width : height\n if (!inverted) {\n return\n }\n // The raw scroll range changed under a pinned exposed offset: restore\n // the raw value from it (the adjustment is fresh — GTK emits \"changed\"\n // only after the allocation that resized it). Content prepended to an\n // inverted chat therefore appears WITHOUT the view moving, exactly\n // like RN's contentOffset staying put under the flip. This also\n // performs the initial positioning: exposed 0 = the data start.\n const raw = toRaw(exposedOffset.current)\n scrollY.current = raw\n scrollToAxis(raw)\n updateRange()\n }\n\n // Data or measurement changes move content under a static viewport (no\n // scroll event fires): refresh viewability and the end-reached trigger.\n useEffect(() => {\n recomputeViewability()\n maybeFireEndReached()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [offsets])\n\n // Unmount: cancel every pending minimumViewTime timer.\n useEffect(() => {\n const timers = viewabilityTimers.current\n return () => {\n for (const timer of timers.values()) {\n clearTimeout(timer)\n }\n timers.clear()\n }\n }, [])\n\n // Sticky cells (vertical, non-inverted): the ACTIVE header must stay\n // mounted even when its own offset left the window — extend the mount\n // set with it; geometry comes from the registry offsets, pinning is the\n // ScrollView registry's job (same mechanism as plain sticky children).\n const stickySorted =\n stickyHeaderIndices && !horizontal && !inverted\n ? [...stickyHeaderIndices].sort((a, b) => a - b)\n : []\n let activeStickyIndex = -1\n for (const stickyIndex of stickySorted) {\n if (stickyIndex < count && cellStart(stickyIndex) <= scrollY.current) {\n activeStickyIndex = stickyIndex\n }\n }\n\n const renderCell = (index: number): ReactNode => {\n const item = data[index]!\n const key = keyOf(item, index)\n // Vertical cells stretch across the width and sit at their offset;\n // horizontal cells stretch across the height and take their own\n // width from content (so onLayout can measure it).\n const cellStyle: StyleProp = horizontal\n ? { position: \"absolute\", left: cellStart(index), top: 0, bottom: 0 }\n : { position: \"absolute\", left: 0, right: 0, top: cellStart(index) }\n const measure = (event: {\n nativeEvent: { layout: { width: number; height: number } }\n }): void =>\n onItemLayout(\n index,\n horizontal\n ? event.nativeEvent.layout.width\n : event.nativeEvent.layout.height,\n )\n const body = (\n <>\n {perfEnabled ? <CellMountProbe /> : null}\n {renderItem({ item, index })}\n {index < count - 1 && ItemSeparatorComponent ? (\n <ItemSeparatorComponent />\n ) : null}\n </>\n )\n if (stickySorted.includes(index)) {\n return (\n <StickySlot\n key={key}\n stickyKey={`cell-${key}`}\n top={cellStart(index)}\n style={cellStyle}\n onLayout={measure}\n >\n {body}\n </StickySlot>\n )\n }\n return (\n <View\n key={key}\n style={cellStyle}\n onLayout={measure}\n >\n {body}\n </View>\n )\n }\n\n const cells: ReactNode[] = []\n const renderStart = perfEnabled ? perfNow() : 0\n if (count > 0) {\n if (activeStickyIndex >= 0 && activeStickyIndex < range.first) {\n cells.push(renderCell(activeStickyIndex))\n }\n const last = Math.min(range.last, count - 1)\n for (let index = range.first; index <= last; index += 1) {\n cells.push(renderCell(index))\n }\n }\n if (perfEnabled) {\n // Element construction only — reconciliation and host mutations happen\n // inside React afterwards; those are visible in engine.flush and the\n // mount counters instead.\n perfAddTime(\"vl.renderCells\", perfNow() - renderStart)\n perfCount(\"vl.render\")\n }\n\n // extraData participates in identity so memoized parents re-render rows.\n void extraData\n // Accepted for RN parity only; no desktop gesture ever calls it.\n void onRefresh\n\n return (\n <ScrollView\n {...scrollProps}\n horizontal={horizontal}\n ref={scrollRef}\n onScroll={handleScroll}\n onContentSizeChange={handleContentSizeChange}\n onLayout={handleLayout}\n >\n {refreshing ? (\n // Desktop RefreshControl: no pull gesture exists, so `refreshing`\n // simply shows an in-flow spinner row above the list content.\n <View style={{ alignItems: \"center\", padding: 8 }}>\n <ActivityIndicator />\n </View>\n ) : null}\n {/* RN's flip mirrors the chrome too: on an inverted list the footer\n sits at the visual top and the header at the visual bottom. */}\n {renderAux(inverted ? ListFooterComponent : ListHeaderComponent)}\n {count === 0 && renderAux(ListEmptyComponent)}\n {count > 0 && (\n <View\n style={\n horizontal\n ? { width: offsets[count]! }\n : { height: offsets[count]! }\n }\n >\n {cells}\n </View>\n )}\n {renderAux(inverted ? ListHeaderComponent : ListFooterComponent)}\n </ScrollView>\n )\n },\n)\nVirtualizedListInner.displayName = \"VirtualizedList\"\n\nexport const VirtualizedList = VirtualizedListInner as <T>(\n props: VirtualizedListProps<T> & { ref?: React.Ref<VirtualizedListHandle> },\n) => ReactElement\n"]}
|
|
@@ -7,8 +7,10 @@ import * as Gsk from "@gtkx/gi/gsk";
|
|
|
7
7
|
import * as Gtk from "@gtkx/gi/gtk";
|
|
8
8
|
import * as Pango from "@gtkx/gi/pango";
|
|
9
9
|
export { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango };
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
10
|
+
export { AdwApplicationWindow, AdwHeaderBar, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwToolbarView, } from "@gtkx/jsx/adw";
|
|
11
|
+
export { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkEntry, GtkGestureClick, GtkLabel, GtkListBox, GtkListBoxRow, GtkPicture, GtkScrolledWindow, GtkSpinner, GtkSwitch, GtkTextView, GtkWindow, } from "@gtkx/jsx/gtk";
|
|
12
|
+
export { createPortal, createRoot, quit, useApplication, useParentWindow, useProperty, type Root, } from "@gtkx/react";
|
|
13
|
+
export { useSignal } from "./use-signal";
|
|
12
14
|
export { css, cx, injectGlobal } from "@gtkx/css";
|
|
13
15
|
export { createTextProbe, measureWidget, toNumber } from "./measure";
|
|
14
16
|
export { getViewBoxComponent, setBoxPassthrough } from "./view-box";
|
|
@@ -15,8 +15,12 @@ import * as Gsk from "@gtkx/gi/gsk";
|
|
|
15
15
|
import * as Gtk from "@gtkx/gi/gtk";
|
|
16
16
|
import * as Pango from "@gtkx/gi/pango";
|
|
17
17
|
export { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango };
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
18
|
+
export { AdwApplicationWindow, AdwHeaderBar, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwToolbarView, } from "@gtkx/jsx/adw";
|
|
19
|
+
export { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkEntry, GtkGestureClick, GtkLabel, GtkListBox, GtkListBoxRow, GtkPicture, GtkScrolledWindow, GtkSpinner, GtkSwitch, GtkTextView, GtkWindow, } from "@gtkx/jsx/gtk";
|
|
20
|
+
export { createPortal, createRoot, quit, useApplication, useParentWindow, useProperty, } from "@gtkx/react";
|
|
21
|
+
// useSignal comes from ./use-signal, not @gtkx/react — see the workaround note
|
|
22
|
+
// there (rc.2 delivers a stale handler).
|
|
23
|
+
export { useSignal } from "./use-signal";
|
|
20
24
|
export { css, cx, injectGlobal } from "@gtkx/css";
|
|
21
25
|
export { createTextProbe, measureWidget, toNumber } from "./measure";
|
|
22
26
|
export { getViewBoxComponent, setBoxPassthrough } from "./view-box";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/index.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,gFAAgF;AAChF,EAAE;AACF,8EAA8E;AAC9E,oFAAoF;AAEpF,2EAA2E;AAC3E,sEAAsE;AACtE,qDAAqD;AACrD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,GAAG,EA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,UAAU,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,WAAW,GAEZ,MAAM,aAAa,CAAA;AAEpB,+EAA+E;AAC/E,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,GAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA","sourcesContent":["// The ONLY module allowed to import @gtkx/* (enforced by eslint no-restricted-imports).\n// gtkx is an RC dependency: when its API moves, this bridge absorbs the change.\n//\n// rc.1 caveats baked into this surface (see docs/research/yoga-gtk-spike.md):\n// - 64-bit FFI values arrive as BigInt → normalize with toNumber() at this boundary\n\n// import-then-export (not `export * as`): the latter is the one syntax the\n// stock @react-native/babel-preset cannot transform — this form keeps\n// consumer apps on their unmodified RN Babel config.\nimport * as Adw from \"@gtkx/gi/adw\"\nimport * as Gdk from \"@gtkx/gi/gdk\"\nimport * as Gio from \"@gtkx/gi/gio\"\nimport * as GLib from \"@gtkx/gi/glib\"\nimport * as Graphene from \"@gtkx/gi/graphene\"\nimport * as Gsk from \"@gtkx/gi/gsk\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport * as Pango from \"@gtkx/gi/pango\"\n\nexport { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango }\n\nexport {\n AdwApplicationWindow,\n AdwHeaderBar,\n AdwNavigationPage,\n AdwNavigationSplitView,\n AdwNavigationView,\n AdwToolbarView,\n} from \"@gtkx/jsx/adw\"\n\nexport {\n GtkApplication,\n GtkApplicationWindow,\n GtkBox,\n GtkButton,\n GtkEntry,\n GtkGestureClick,\n GtkLabel,\n GtkListBox,\n GtkListBoxRow,\n GtkPicture,\n GtkScrolledWindow,\n GtkSpinner,\n GtkSwitch,\n GtkTextView,\n GtkWindow,\n} from \"@gtkx/jsx/gtk\"\n\nexport {\n createPortal,\n createRoot,\n quit,\n useApplication,\n useParentWindow,\n useProperty,\n type Root,\n} from \"@gtkx/react\"\n\n// useSignal comes from ./use-signal, not @gtkx/react — see the workaround note\n// there (rc.2 delivers a stale handler).\nexport { useSignal } from \"./use-signal\"\n\nexport { css, cx, injectGlobal } from \"@gtkx/css\"\n\nexport { createTextProbe, measureWidget, toNumber } from \"./measure\"\nexport { getViewBoxComponent, setBoxPassthrough } from \"./view-box\"\nexport {\n allocateChild,\n attachRnLayout,\n detachRnLayout,\n queueAllocate,\n queueResize,\n type RnLayoutHooks,\n type RnLayoutOrientation,\n} from \"./layout-manager\"\nexport { colorScheme, styleManager } from \"./theme\"\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as Gtk from "@gtkx/gi/gtk";
|
|
2
|
+
import { perfAddTime, perfEnabled, perfNow } from "../../perf";
|
|
2
3
|
// 64-bit FFI values cross the boundary as BigInt — normalize before doing math.
|
|
3
4
|
export const toNumber = (value) => typeof value === "bigint" ? Number(value) : value;
|
|
4
5
|
// Gtk.Widget.measure() works synchronously on unmapped widgets (request phase),
|
|
@@ -8,7 +9,11 @@ export const measureWidget = (widget, orientation, forSize = -1) => {
|
|
|
8
9
|
? Gtk.Orientation.HORIZONTAL
|
|
9
10
|
: Gtk.Orientation.VERTICAL;
|
|
10
11
|
const constraint = forSize > 0 ? Math.floor(forSize) : -1;
|
|
12
|
+
const start = perfEnabled ? perfNow() : 0;
|
|
11
13
|
const [minimum, natural] = widget.measure(gtkOrientation, constraint);
|
|
14
|
+
if (perfEnabled) {
|
|
15
|
+
perfAddTime("gtk.measure", perfNow() - start);
|
|
16
|
+
}
|
|
12
17
|
return { minimum: toNumber(minimum), natural: toNumber(natural) };
|
|
13
18
|
};
|
|
14
19
|
// Offscreen label used as a Pango-backed text measurer for Yoga text nodes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measure.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/measure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"measure.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/measure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAS9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAsB,EAAU,EAAE,CACzD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAEnD,gFAAgF;AAChF,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAkB,EAClB,WAA+B,EAC/B,OAAO,GAAG,CAAC,CAAC,EACG,EAAE;IACjB,MAAM,cAAc,GAClB,WAAW,KAAK,YAAY;QAC1B,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,UAAU;QAC5B,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAA;IAC9B,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IACzC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAA;IACrE,IAAI,WAAW,EAAE,CAAC;QAChB,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,CAAA;IAC/C,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAA;AACnE,CAAC,CAAA;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG,GAAc,EAAE;IAC7C,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE,CAAA;IAC7B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import * as Gtk from \"@gtkx/gi/gtk\"\nimport { perfAddTime, perfEnabled, perfNow } from \"../../perf\"\n\nexport type MeasureOrientation = \"horizontal\" | \"vertical\"\n\nexport type MeasureResult = {\n minimum: number\n natural: number\n}\n\n// 64-bit FFI values cross the boundary as BigInt — normalize before doing math.\nexport const toNumber = (value: number | bigint): number =>\n typeof value === \"bigint\" ? Number(value) : value\n\n// Gtk.Widget.measure() works synchronously on unmapped widgets (request phase),\n// returns [min, nat, minBaseline, natBaseline]. This is the Yoga measure input.\nexport const measureWidget = (\n widget: Gtk.Widget,\n orientation: MeasureOrientation,\n forSize = -1,\n): MeasureResult => {\n const gtkOrientation =\n orientation === \"horizontal\"\n ? Gtk.Orientation.HORIZONTAL\n : Gtk.Orientation.VERTICAL\n const constraint = forSize > 0 ? Math.floor(forSize) : -1\n const start = perfEnabled ? perfNow() : 0\n const [minimum, natural] = widget.measure(gtkOrientation, constraint)\n if (perfEnabled) {\n perfAddTime(\"gtk.measure\", perfNow() - start)\n }\n return { minimum: toNumber(minimum), natural: toNumber(natural) }\n}\n\n// Offscreen label used as a Pango-backed text measurer for Yoga text nodes.\nexport const createTextProbe = (): Gtk.Label => {\n const probe = new Gtk.Label()\n probe.setWrap(true)\n return probe\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// RC2-WORKAROUND(use-signal-stale-handler): @gtkx/react's useSignal documents
|
|
2
|
+
// that "each emission runs the handler from the latest render", and rc.1
|
|
3
|
+
// delivered that by pinning the handler in a ref. rc.2 routes it through
|
|
4
|
+
// React's useEffectEvent instead, and under the gtkx reconciler that event ref
|
|
5
|
+
// stops refreshing for components deep in the tree: a ScrollView measured at
|
|
6
|
+
// its 8th render still ran the closure captured at mount (a plain ref in the
|
|
7
|
+
// same component reported 8, the useEffectEvent one reported 1). The
|
|
8
|
+
// consequence is not subtle — the mount-time scroll handler windows a
|
|
9
|
+
// VirtualizedList against the data it saw at mount, so a list whose rows
|
|
10
|
+
// arrive from a fetch renders EMPTY as soon as it is scrolled.
|
|
11
|
+
//
|
|
12
|
+
// Restore the documented contract at the bridge: keep the latest handler in a
|
|
13
|
+
// ref of our own and hand gtkx a stable wrapper (stable so the connection is
|
|
14
|
+
// never re-established, which is what its useEffectEvent was for). The ref is
|
|
15
|
+
// refreshed in an INSERTION effect — the earliest commit phase, ahead of every
|
|
16
|
+
// layout effect, so a signal emitted from one (the list's own scroll
|
|
17
|
+
// corrections) already sees the handler from the render being committed.
|
|
18
|
+
import { useSignal as useGtkxSignal } from "@gtkx/react";
|
|
19
|
+
import { useCallback, useInsertionEffect, useRef } from "react";
|
|
20
|
+
export const useSignal = (object, signal, handler, options) => {
|
|
21
|
+
// The handler type is generic in the signal name; the wrapper only forwards
|
|
22
|
+
// arguments, so it crosses that boundary as an untyped callable.
|
|
23
|
+
const latest = useRef(() => undefined);
|
|
24
|
+
useInsertionEffect(() => {
|
|
25
|
+
latest.current = handler;
|
|
26
|
+
});
|
|
27
|
+
const stable = useCallback((...args) => latest.current(...args), []);
|
|
28
|
+
useGtkxSignal(object, signal, stable, options);
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=use-signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-signal.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/use-signal.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,yEAAyE;AACzE,+EAA+E;AAC/E,6EAA6E;AAC7E,6EAA6E;AAC7E,qEAAqE;AACrE,sEAAsE;AACtE,yEAAyE;AACzE,+DAA+D;AAC/D,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,qEAAqE;AACrE,yEAAyE;AACzE,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAI/D,MAAM,CAAC,MAAM,SAAS,GAAyB,CAC7C,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,EACP,EAAE;IACF,4EAA4E;IAC5E,iEAAiE;IACjE,MAAM,MAAM,GAAG,MAAM,CAAa,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IAClD,kBAAkB,CAAC,GAAG,EAAE;QACtB,MAAM,CAAC,OAAO,GAAG,OAAgC,CAAA;IACnD,CAAC,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,EACpC,EAAE,CACH,CAAA;IACD,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAmC,EAAE,OAAO,CAAC,CAAA;AAC7E,CAAC,CAAA","sourcesContent":["// RC2-WORKAROUND(use-signal-stale-handler): @gtkx/react's useSignal documents\n// that \"each emission runs the handler from the latest render\", and rc.1\n// delivered that by pinning the handler in a ref. rc.2 routes it through\n// React's useEffectEvent instead, and under the gtkx reconciler that event ref\n// stops refreshing for components deep in the tree: a ScrollView measured at\n// its 8th render still ran the closure captured at mount (a plain ref in the\n// same component reported 8, the useEffectEvent one reported 1). The\n// consequence is not subtle — the mount-time scroll handler windows a\n// VirtualizedList against the data it saw at mount, so a list whose rows\n// arrive from a fetch renders EMPTY as soon as it is scrolled.\n//\n// Restore the documented contract at the bridge: keep the latest handler in a\n// ref of our own and hand gtkx a stable wrapper (stable so the connection is\n// never re-established, which is what its useEffectEvent was for). The ref is\n// refreshed in an INSERTION effect — the earliest commit phase, ahead of every\n// layout effect, so a signal emitted from one (the list's own scroll\n// corrections) already sees the handler from the render being committed.\nimport { useSignal as useGtkxSignal } from \"@gtkx/react\"\nimport { useCallback, useInsertionEffect, useRef } from \"react\"\n\ntype AnyHandler = (...args: unknown[]) => unknown\n\nexport const useSignal: typeof useGtkxSignal = (\n object,\n signal,\n handler,\n options,\n) => {\n // The handler type is generic in the signal name; the wrapper only forwards\n // arguments, so it crosses that boundary as an untyped callable.\n const latest = useRef<AnyHandler>(() => undefined)\n useInsertionEffect(() => {\n latest.current = handler as unknown as AnyHandler\n })\n const stable = useCallback<AnyHandler>(\n (...args) => latest.current(...args),\n [],\n )\n useGtkxSignal(object, signal, stable as unknown as typeof handler, options)\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ActivityIndicator, Animated, AppRegistry, Easing, FlatList, Image, Modal, Pressable, Root, SafeAreaView, ScrollView, SectionList, StatusBar, Switch, Text, TextInput, TouchableOpacity, View, type ActivityIndicatorProps, type FlatListProps, type ImageProps, type ImageSource, type LayoutEvent, type ListRenderItemInfo, type ModalProps, type PressableProps, type PressableStateCallbackType, type PressEvent, type RootProps, type RunApplicationParams, type ScrollEvent, type ScrollViewHandle, type ScrollViewProps, type SectionListProps, type SwitchProps, type TextInputProps, type TextProps, type TouchableOpacityProps, type ViewabilityConfig, type ViewProps, type ViewToken, } from "./components/index";
|
|
1
|
+
export { ActivityIndicator, Animated, AppRegistry, Easing, FlatList, Image, Modal, IntrinsicRoot, NestedRoot, Pressable, Root, SafeAreaView, ScrollView, SectionList, StatusBar, Switch, Text, TextInput, TouchableOpacity, View, type ActivityIndicatorProps, type FlatListProps, type ImageProps, type ImageSource, type LayoutEvent, type ListRenderItemInfo, type ModalProps, type PressableProps, type PressableStateCallbackType, type IntrinsicRootProps, type NestedRootProps, type PressEvent, type RootProps, type RunApplicationParams, type ScrollEvent, type ScrollViewHandle, type ScrollViewProps, type SectionListProps, type SwitchProps, type TextInputProps, type TextProps, type TouchableOpacityProps, type ViewabilityConfig, type ViewProps, type ViewToken, } from "./components/index";
|
|
2
2
|
export type { FlatListHandle } from "./components/flat-list";
|
|
3
|
-
export { Alert, Appearance, AppState, DevSettings, Dimensions, Linking, Platform, useColorScheme, useWindowDimensions, type AlertButton, type AlertButtonStyle, type AlertOptions, type AppearancePreferences, type AppStateEvent, type AppStateStatus, type ColorSchemeName, type DimensionKey, type DimensionsPayload, type PlatformSelectSpec, type ScaledSize, } from "./apis/index";
|
|
3
|
+
export { Alert, Appearance, AppState, BackHandler, DevSettings, Dimensions, I18nManager, InteractionManager, Linking, Platform, useColorScheme, useWindowDimensions, type AlertButton, type AlertButtonStyle, type AlertOptions, type AppearancePreferences, type AppStateEvent, type AppStateStatus, type ColorSchemeName, type DimensionKey, type DimensionsPayload, type InteractionPromise, type PlatformSelectSpec, type ScaledSize, } from "./apis/index";
|
|
4
4
|
export { PlatformColor, StyleSheet } from "./style/index";
|
|
5
5
|
export type { DimensionValue, FlatStyle, LayoutStyle, PointerEventsValue, StyleProp, TransformPart, VisualStyle, } from "./contracts";
|
|
6
6
|
export declare const version = "0.1.0";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Public surface of react-native-gtkx, mirroring the `react-native` module.
|
|
2
2
|
// Components: 006 · APIs: 007 · StyleSheet: 005 · layout engine underneath: 004.
|
|
3
|
-
export { ActivityIndicator, Animated, AppRegistry, Easing, FlatList, Image, Modal, Pressable, Root, SafeAreaView, ScrollView, SectionList, StatusBar, Switch, Text, TextInput, TouchableOpacity, View, } from "./components/index";
|
|
4
|
-
export { Alert, Appearance, AppState, DevSettings, Dimensions, Linking, Platform, useColorScheme, useWindowDimensions, } from "./apis/index";
|
|
3
|
+
export { ActivityIndicator, Animated, AppRegistry, Easing, FlatList, Image, Modal, IntrinsicRoot, NestedRoot, Pressable, Root, SafeAreaView, ScrollView, SectionList, StatusBar, Switch, Text, TextInput, TouchableOpacity, View, } from "./components/index";
|
|
4
|
+
export { Alert, Appearance, AppState, BackHandler, DevSettings, Dimensions, I18nManager, InteractionManager, Linking, Platform, useColorScheme, useWindowDimensions, } from "./apis/index";
|
|
5
5
|
export { PlatformColor, StyleSheet } from "./style/index";
|
|
6
6
|
export const version = "0.1.0";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,iFAAiF;AAEjF,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,iFAAiF;AAEjF,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,IAAI,GA0BL,MAAM,oBAAoB,CAAA;AAM3B,OAAO,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,cAAc,EACd,mBAAmB,GAapB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAYzD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA","sourcesContent":["// Public surface of react-native-gtkx, mirroring the `react-native` module.\n// Components: 006 · APIs: 007 · StyleSheet: 005 · layout engine underneath: 004.\n\nexport {\n ActivityIndicator,\n Animated,\n AppRegistry,\n Easing,\n FlatList,\n Image,\n Modal,\n IntrinsicRoot,\n NestedRoot,\n Pressable,\n Root,\n SafeAreaView,\n ScrollView,\n SectionList,\n StatusBar,\n Switch,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n type ActivityIndicatorProps,\n type FlatListProps,\n type ImageProps,\n type ImageSource,\n type LayoutEvent,\n type ListRenderItemInfo,\n type ModalProps,\n type PressableProps,\n type PressableStateCallbackType,\n type IntrinsicRootProps,\n type NestedRootProps,\n type PressEvent,\n type RootProps,\n type RunApplicationParams,\n type ScrollEvent,\n type ScrollViewHandle,\n type ScrollViewProps,\n type SectionListProps,\n type SwitchProps,\n type TextInputProps,\n type TextProps,\n type TouchableOpacityProps,\n type ViewabilityConfig,\n type ViewProps,\n type ViewToken,\n} from \"./components/index\"\n\n// List scroll handle (scrollTo/scrollToEnd/scrollToIndex/scrollToItem/\n// scrollToOffset) — exported straight from the component module.\nexport type { FlatListHandle } from \"./components/flat-list\"\n\nexport {\n Alert,\n Appearance,\n AppState,\n BackHandler,\n DevSettings,\n Dimensions,\n I18nManager,\n InteractionManager,\n Linking,\n Platform,\n useColorScheme,\n useWindowDimensions,\n type AlertButton,\n type AlertButtonStyle,\n type AlertOptions,\n type AppearancePreferences,\n type AppStateEvent,\n type AppStateStatus,\n type ColorSchemeName,\n type DimensionKey,\n type DimensionsPayload,\n type InteractionPromise,\n type PlatformSelectSpec,\n type ScaledSize,\n} from \"./apis/index\"\n\nexport { PlatformColor, StyleSheet } from \"./style/index\"\n\nexport type {\n DimensionValue,\n FlatStyle,\n LayoutStyle,\n PointerEventsValue,\n StyleProp,\n TransformPart,\n VisualStyle,\n} from \"./contracts\"\n\nexport const version = \"0.1.0\"\n"]}
|
package/dist/layout/engine.d.ts
CHANGED
|
@@ -9,14 +9,18 @@ export declare class LayoutEngine {
|
|
|
9
9
|
private dirty;
|
|
10
10
|
private scheduled;
|
|
11
11
|
private disposed;
|
|
12
|
+
private dirtyNodes;
|
|
13
|
+
private walkAll;
|
|
12
14
|
constructor(viewport: ViewportSize);
|
|
13
15
|
createNode(): LayoutNode;
|
|
14
16
|
setViewport(viewport: ViewportSize): void;
|
|
15
17
|
getViewport(): ViewportSize;
|
|
16
18
|
flushSync(): void;
|
|
19
|
+
measureContent(orientation: "horizontal" | "vertical", forSize: number): number;
|
|
17
20
|
dispose(): void;
|
|
18
21
|
private requestFlush;
|
|
19
22
|
private commitTree;
|
|
23
|
+
private dirtyPath;
|
|
20
24
|
private collectChanges;
|
|
21
25
|
private freeTree;
|
|
22
26
|
}
|