From 79957647f96862fcdac227c49f84c5d9973cc660 Mon Sep 17 00:00:00 2001 From: huhuanming Date: Mon, 21 Sep 2026 14:02:07 +0800 Subject: [PATCH 1/2] fix: stabilize desktop section index --- .../src/NativeList.tsx | 1 + .../src/NativeList.types.ts | 5 +- .../src/NativeList.web.tsx | 6 +- .../src/__tests__/NativeList.web.test.ts | 113 +++++++- .../src/web/NativeListWebEngine.ts | 259 +++++++++++++++--- 5 files changed, 336 insertions(+), 48 deletions(-) diff --git a/native-views/react-native-native-list/src/NativeList.tsx b/native-views/react-native-native-list/src/NativeList.tsx index ca414390e..5381726f6 100644 --- a/native-views/react-native-native-list/src/NativeList.tsx +++ b/native-views/react-native-native-list/src/NativeList.tsx @@ -97,6 +97,7 @@ export const NativeList = forwardRef( { snapshot, webVirtualizationEnabled: _webVirtualizationEnabled, + webSectionIndexContainerRef: _webSectionIndexContainerRef, keyboardDismissMode = 'none', keyboardShouldPersistTaps = 'never', onRowAction, diff --git a/native-views/react-native-native-list/src/NativeList.types.ts b/native-views/react-native-native-list/src/NativeList.types.ts index 2456bda0c..448796e56 100644 --- a/native-views/react-native-native-list/src/NativeList.types.ts +++ b/native-views/react-native-native-list/src/NativeList.types.ts @@ -1,4 +1,5 @@ -import type { ViewProps } from 'react-native'; +import type { RefObject } from 'react'; +import type { View, ViewProps } from 'react-native'; import type { ActionAnchorInvalidatedEvent, EndReachedEvent, @@ -120,6 +121,8 @@ export type NativeListProps = Omit & snapshot: NativeListSnapshot; /** Web only. Defaults to true and is ignored by the native host. */ webVirtualizationEnabled?: boolean; + /** Web only. Hosts the section index inside this container. */ + webSectionIndexContainerRef?: RefObject; /** Defaults to `none`. `interactive` behaves as `none` on Android. */ keyboardDismissMode?: NativeListKeyboardDismissMode; /** diff --git a/native-views/react-native-native-list/src/NativeList.web.tsx b/native-views/react-native-native-list/src/NativeList.web.tsx index b32240cc2..40aec4bcb 100644 --- a/native-views/react-native-native-list/src/NativeList.web.tsx +++ b/native-views/react-native-native-list/src/NativeList.web.tsx @@ -83,6 +83,7 @@ export const NativeList = forwardRef( { snapshot, webVirtualizationEnabled = true, + webSectionIndexContainerRef, keyboardDismissMode: _keyboardDismissMode, keyboardShouldPersistTaps: _keyboardShouldPersistTaps, onRowAction, @@ -175,7 +176,8 @@ export const NativeList = forwardRef( host, snapshotRef.current, callbacksRef.current, - webVirtualizationEnabledRef.current + webVirtualizationEnabledRef.current, + webSectionIndexContainerRef?.current as unknown as HTMLElement | null ); engineRef.current = engine; appliedSnapshotRef.current = snapshotRef.current; @@ -195,7 +197,7 @@ export const NativeList = forwardRef( engine.destroy(); if (engineRef.current === engine) engineRef.current = undefined; }; - }, [host]); + }, [host, webSectionIndexContainerRef]); useEffect(() => { engineRef.current?.setVirtualizationEnabled(webVirtualizationEnabled); diff --git a/native-views/react-native-native-list/src/__tests__/NativeList.web.test.ts b/native-views/react-native-native-list/src/__tests__/NativeList.web.test.ts index f8cfca5a9..cab49c03c 100644 --- a/native-views/react-native-native-list/src/__tests__/NativeList.web.test.ts +++ b/native-views/react-native-native-list/src/__tests__/NativeList.web.test.ts @@ -1,8 +1,4 @@ -import type { - IdentityRow, - NativeListSnapshot, - RowModel, -} from '../models'; +import type { IdentityRow, NativeListSnapshot, RowModel } from '../models'; import { WEB_LIST_CSS, WEB_REORDER_ANIMATION, @@ -16,6 +12,10 @@ import { resolveWebCollapsiblePagerRawOffset, resolveWebCollapsiblePagerScrollMetrics, visibleWebLayoutItems, + webSectionIndexActiveKey, + webSectionIndexContainerLayout, + webSectionIndexInverseScale, + webSectionIndexMetrics, webReorderAutoScrollVelocity, webReorderEventForRows, webLayoutItemsForMount, @@ -152,15 +152,104 @@ function snapshot( } describe('NativeList pure DOM web layout', () => { - it('uses list-relative offsets inside a collapsible pager viewport', () => { - expect(resolveWebCollapsiblePagerScrollMetrics(134, 800, 134, 120)).toEqual({ - offset: 0, - viewportLength: 680, + it('centers a fixed-spacing container-hosted section index', () => { + expect(webSectionIndexContainerLayout(22, 668)).toEqual({ + top: 84, + height: 500, + }); + expect(webSectionIndexContainerLayout(22, 588)).toEqual({ + top: 44, + height: 500, + }); + expect(webSectionIndexContainerLayout(22, 472)).toEqual({ + top: 0, + height: 472, + }); + expect(webSectionIndexMetrics(22, 472, true)).toEqual({ + originY: 8, + trackHeight: 456, }); - expect(resolveWebCollapsiblePagerScrollMetrics(734, 800, 134, 120)).toEqual({ - offset: 600, - viewportLength: 680, + expect(webSectionIndexMetrics(22, 700, true)).toEqual({ + originY: 8, + trackHeight: 484, }); + expect(webSectionIndexMetrics(22, 472)).toEqual({ + originY: 60, + trackHeight: 352, + }); + }); + + it('cancels the container scale without changing section index layout', () => { + expect(webSectionIndexInverseScale(640, 608)).toBeCloseTo(1 / 0.95); + expect(webSectionIndexInverseScale(640, 642.77888)).toBeCloseTo( + 1 / 1.004342 + ); + expect(webSectionIndexInverseScale(640, 640)).toBe(1); + expect(webSectionIndexInverseScale(640, 0)).toBe(1); + }); + + it('keeps the final indexed section active at the scroll limit', () => { + const indexedRows: readonly RowModel[] = [ + { + type: 'sectionHeader', + key: 'header-x', + sectionKey: 'x', + indexTitle: 'X', + title: 'X', + }, + { + type: 'identity', + key: 'x-row', + sectionKey: 'x', + leading: { kind: 'icon', name: 'x' }, + title: 'X row', + }, + { + type: 'sectionHeader', + key: 'header-z', + sectionKey: 'z', + indexTitle: 'Z', + title: 'Z', + }, + { + type: 'identity', + key: 'z-row', + sectionKey: 'z', + leading: { kind: 'icon', name: 'z' }, + title: 'Z row', + }, + ]; + const layout = computeWebListLayout( + snapshot({ kind: 'sectioned' }, indexedRows), + 320, + 120 + ); + expect(webSectionIndexActiveKey(indexedRows, layout, 0, 120)).toBe( + 'header-x' + ); + expect( + webSectionIndexActiveKey( + indexedRows, + layout, + layout.contentHeight - 120, + 120 + ) + ).toBe('header-z'); + }); + + it('uses list-relative offsets inside a collapsible pager viewport', () => { + expect(resolveWebCollapsiblePagerScrollMetrics(134, 800, 134, 120)).toEqual( + { + offset: 0, + viewportLength: 680, + } + ); + expect(resolveWebCollapsiblePagerScrollMetrics(734, 800, 134, 120)).toEqual( + { + offset: 600, + viewportLength: 680, + } + ); expect(resolveWebCollapsiblePagerRawOffset(600, 134)).toBe(734); expect(resolveWebCollapsiblePagerScrollMetrics(-20, 80, -1, 120)).toEqual({ offset: 0, diff --git a/native-views/react-native-native-list/src/web/NativeListWebEngine.ts b/native-views/react-native-native-list/src/web/NativeListWebEngine.ts index 59b4bc757..dd0a0940e 100644 --- a/native-views/react-native-native-list/src/web/NativeListWebEngine.ts +++ b/native-views/react-native-native-list/src/web/NativeListWebEngine.ts @@ -50,9 +50,14 @@ import { const SECTION_INDEX_CONTENT_INSET = 16; const SECTION_INDEX_RAIL_WIDTH = 32; const SECTION_INDEX_EDGE_PADDING = 8; -const SECTION_INDEX_LABEL_SPACING = 16; +const SECTION_INDEX_MIN_LABEL_SPACING = 16; +const SECTION_INDEX_CONTAINER_LABEL_SPACING = 22; const SECTION_INDEX_MIN_HEIGHT = 120; const SECTION_INDEX_WINDOW_Z_INDEX = 100_000; +const SECTION_INDEX_TRANSFORM_MIN_TRACKING_FRAMES = 12; +const SECTION_INDEX_TRANSFORM_MAX_TRACKING_FRAMES = 90; +const SECTION_INDEX_TRANSFORM_SETTLED_FRAMES = 4; +const SECTION_INDEX_TRANSFORM_SETTLED_EPSILON = 0.0001; const DEFAULT_VIEWPORT_WIDTH = 320; const DEFAULT_VIEWPORT_HEIGHT = 640; const OVERSCAN_VIEWPORTS = 1; @@ -116,6 +121,74 @@ export type WebListLayout = Readonly<{ horizontal: boolean; }>; +export function webSectionIndexMetrics( + entryCount: number, + viewportHeight: number, + alignStart = false +) { + const availableHeight = Math.max( + 0, + viewportHeight - SECTION_INDEX_EDGE_PADDING * 2 + ); + const labelSpacing = alignStart + ? SECTION_INDEX_CONTAINER_LABEL_SPACING + : SECTION_INDEX_MIN_LABEL_SPACING; + const trackHeight = Math.min(availableHeight, labelSpacing * entryCount); + return { + originY: alignStart + ? SECTION_INDEX_EDGE_PADDING + : (viewportHeight - trackHeight) / 2, + trackHeight, + }; +} + +export function webSectionIndexContainerLayout( + entryCount: number, + containerHeight: number +) { + const height = Math.min( + Math.max(0, containerHeight), + SECTION_INDEX_EDGE_PADDING * 2 + + SECTION_INDEX_CONTAINER_LABEL_SPACING * entryCount + ); + return { + top: Math.max(0, (containerHeight - height) / 2), + height, + }; +} + +export function webSectionIndexInverseScale( + layoutHeight: number, + renderedHeight: number +) { + if (layoutHeight <= 0 || renderedHeight <= 0) return 1; + return layoutHeight / renderedHeight; +} + +export function webSectionIndexActiveKey( + rows: readonly RowModel[], + layout: WebListLayout, + offset: number, + viewportLength: number +): string | undefined { + const indexedRows = rows.flatMap((row, index) => + row.type === 'sectionHeader' && row.sticky !== false && row.indexTitle + ? [{ key: row.key, index }] + : [] + ); + const maxOffset = Math.max(0, layout.contentHeight - viewportLength); + if (maxOffset > 0 && offset >= maxOffset - 1) { + return indexedRows.at(-1)?.key; + } + let activeKey: string | undefined; + indexedRows.forEach(({ key, index }) => { + if (itemStart(layout.items[index], layout.horizontal) <= offset) { + activeKey = key; + } + }); + return activeKey; +} + export type WebMarketLayoutStyle = Readonly<{ horizontalPadding: number; verticalPadding: number; @@ -940,7 +1013,7 @@ export const WEB_LIST_CSS = ` .ok-native-list-subtitle-segments{display:flex;align-items:center;min-width:0;max-width:100%;height:20px}.ok-native-list-subtitle-segments>.ok-native-list-secondary{flex:0 1 auto;min-width:0}.ok-native-list-subtitle-dot{flex:0 0 4px;width:4px;height:4px;margin:0 6px;border-radius:50%;background:var(--nl-disabled)}.ok-native-list-wallet-row>.ok-native-list-flex{flex:0 1 auto;width:100%;align-items:center}.ok-native-list-wallet-badges{display:flex;gap:4px;justify-content:center;margin-top:4px;height:20px;max-width:100%}.ok-native-list-wallet-badges>.ok-native-list-badge{background:var(--nl-strong);color:var(--nl-secondary);font-size:12px;line-height:16px;height:20px;box-sizing:border-box;padding:2px 4px}.ok-native-list-visual-overlay{position:absolute;display:flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:50%;overflow:hidden;line-height:1;font-size:10px}.ok-native-list-visual-overlay img,.ok-native-list-visual-overlay svg{width:100%;height:100%;object-fit:contain} .ok-native-list-row.ok-native-list-market-skeleton{padding:12px 20px;gap:0}.ok-native-list-skeleton-left{display:flex;align-items:center;gap:12px;flex:1}.ok-native-list-skeleton-text{display:flex;flex-direction:column;gap:4px}.ok-native-list-skeleton-right{display:flex;align-items:center;gap:8px}.ok-native-list-skeleton-mark{display:block;flex-shrink:0;border-radius:8px;animation:ok-native-list-skeleton 1.5s linear infinite alternate}@keyframes ok-native-list-skeleton{from{background-color:var(--nl-skeleton-base)}to{background-color:var(--nl-skeleton-highlight)}}.ok-native-list-market-spinner{display:block;width:20px;height:20px;flex-shrink:0;color:var(--nl-icon);animation:ok-native-list-spin .75s linear infinite} @media (prefers-reduced-motion:reduce){.ok-native-list-index-preview,.ok-native-list-refresh{transition:none}.ok-native-list-spinner,.ok-native-list-market-spinner{animation:none}.ok-native-list-skeleton-mark{animation:none;background:var(--nl-skeleton-base)}} -.ok-native-list-footer{flex:0 0 auto;min-height:0}.ok-native-list-sticky{position:absolute;z-index:4;left:0;right:0;top:0;pointer-events:auto;box-shadow:0 1px 0 var(--nl-separator)}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport{scrollbar-width:none}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport::-webkit-scrollbar,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport::-webkit-scrollbar{display:none}.ok-native-list-index-rail{position:absolute;z-index:6;top:0;right:0;bottom:0;width:${SECTION_INDEX_RAIL_WIDTH}px;touch-action:none;cursor:pointer;font-family:Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.ok-native-list-index-rail[hidden]{display:none}.ok-native-list-index-button{appearance:none;position:absolute;left:15px;display:flex;width:14px;height:14px;align-items:center;justify-content:center;padding:0;transform:translateY(-50%);border:0;border-radius:7px;background:transparent;color:var(--nl-disabled);font-family:inherit;font-size:10px;font-weight:400;line-height:1;cursor:pointer}.ok-native-list-index-button[data-active="true"]{background:var(--nl-positive);color:var(--nl-inverse-text);font-weight:500}.ok-native-list-index-button:focus-visible{outline:2px solid var(--nl-positive);outline-offset:1px} +.ok-native-list-footer{flex:0 0 auto;min-height:0}.ok-native-list-sticky{position:absolute;z-index:4;left:0;right:0;top:0;pointer-events:auto;box-shadow:0 1px 0 var(--nl-separator)}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport{scrollbar-width:none}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport::-webkit-scrollbar,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport::-webkit-scrollbar{display:none}.ok-native-list-index-rail{position:absolute;z-index:6;top:0;right:0;bottom:0;width:${SECTION_INDEX_RAIL_WIDTH}px;touch-action:none;cursor:pointer;font-family:Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.ok-native-list-index-rail[hidden]{display:none}.ok-native-list-index-button{appearance:none;position:absolute;left:15px;display:flex;width:14px;height:14px;align-items:center;justify-content:center;padding:0;transform:translateY(-50%);border:0;border-radius:7px;background:transparent;color:var(--nl-disabled);font-family:inherit;font-size:10px;font-weight:400;line-height:1;cursor:pointer;opacity:.5;transition:opacity .15s ease}.ok-native-list-index-rail:hover .ok-native-list-index-button,.ok-native-list-index-rail:focus-within .ok-native-list-index-button,.ok-native-list-index-button[data-active="true"]{opacity:1}.ok-native-list-index-button[data-active="true"]{background:var(--nl-positive);color:var(--nl-inverse-text);font-weight:500}.ok-native-list-index-button:focus-visible{outline:2px solid var(--nl-positive);outline-offset:1px} .ok-native-list-refresh{position:absolute;z-index:7;left:50%;top:8px;display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:var(--nl-inverse);color:var(--nl-inverse-text);font-size:12px;opacity:0;transform:translate(-50%,-16px);transition:opacity .15s ease,transform .15s ease;pointer-events:none}.ok-native-list-refresh[data-visible="true"]{opacity:1;transform:translate(-50%,0)} .ok-native-list-warning{height:auto;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:14px 12px;border-top:1px solid;border-bottom:1px solid;box-sizing:border-box;cursor:default}.ok-native-list-warning-title,.ok-native-list-warning-message{font-size:14px;line-height:20px;white-space:normal;overflow-wrap:anywhere}.ok-native-list-warning-title{font-weight:500;color:var(--nl-primary)}.ok-native-list-warning-message{font-weight:400;color:var(--nl-secondary)} .ok-native-list-subtitle-segments{display:flex;align-items:center;min-width:0;max-width:100%;height:20px}.ok-native-list-subtitle-segments>.ok-native-list-secondary{flex:0 1 auto;min-width:0}.ok-native-list-subtitle-dot{flex:0 0 4px;width:4px;height:4px;margin:0 6px;border-radius:50%;background:var(--nl-disabled)}.ok-native-list-wallet-row>.ok-native-list-flex{flex:0 1 auto;width:100%;align-items:center}.ok-native-list-wallet-badges{display:flex;gap:4px;justify-content:center;margin-top:4px;height:20px;max-width:100%}.ok-native-list-wallet-badges>.ok-native-list-badge{background:var(--nl-strong);color:var(--nl-secondary);font-size:12px;line-height:16px;height:20px;box-sizing:border-box;padding:2px 4px}.ok-native-list-visual-overlay{position:absolute;display:flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:50%;overflow:hidden;line-height:1;font-size:10px}.ok-native-list-visual-overlay img,.ok-native-list-visual-overlay svg{width:100%;height:100%;object-fit:contain} @@ -3469,6 +3542,7 @@ export class NativeListWebEngine { private readonly refreshIndicator: HTMLElement; private readonly reorderPreview: HTMLElement; private readonly previousHostPosition: string; + private readonly sectionIndexContainer: HTMLElement | undefined; private snapshot: NativeListSnapshot; private rows: readonly RowModel[] = []; private selectedKeys: ReadonlySet = new Set(); @@ -3483,6 +3557,10 @@ export class NativeListWebEngine { private readonly pool: HTMLElement[] = []; private frameHandle: number | undefined; private resizeObserver: ResizeObserver | undefined; + private sectionIndexTransformObserver: MutationObserver | undefined; + private sectionIndexTransformFrame: number | undefined; + private sectionIndexTransformTrackingFrames = 0; + private sectionIndexTransformSettledFrames = 0; private pendingScroll: PendingScroll | undefined; private lastVisibleSignature: string | undefined; // OneKey patch: URI leases outlive DOM overscan only inside this bounded window. @@ -3528,6 +3606,7 @@ export class NativeListWebEngine { private lastViewportWidth = -1; private lastViewportHeight = -1; private destroyed = false; + private sectionIndexAlignStart = false; // OneKey patch: warning banners are measured after normal browser text wrapping. private measuredWarningHeights = new Map(); @@ -3535,12 +3614,14 @@ export class NativeListWebEngine { host: HTMLElement, snapshot: NativeListSnapshot, callbacks: NativeListWebCallbacks, - virtualizationEnabled = true + virtualizationEnabled = true, + sectionIndexContainer?: HTMLElement | null ) { this.document = host.ownerDocument; this.snapshot = validateSnapshot(snapshot); this.callbacks = callbacks; this.virtualizationEnabled = virtualizationEnabled; + this.sectionIndexContainer = sectionIndexContainer ?? undefined; this.previousHostPosition = host.style.position; if (!host.style.position) host.style.position = 'relative'; @@ -3674,6 +3755,7 @@ export class NativeListWebEngine { this.handleWindowResize ); } + this.observeSectionIndexTransforms(); this.applySnapshot(this.snapshot); } @@ -3853,9 +3935,12 @@ export class NativeListWebEngine { this.invalidateActionAnchor('destroy'); this.destroyed = true; if (this.frameHandle !== undefined) this.cancelFrame(this.frameHandle); + if (this.sectionIndexTransformFrame !== undefined) + this.cancelFrame(this.sectionIndexTransformFrame); if (this.reorderMovementTimer !== undefined) this.document.defaultView?.clearTimeout(this.reorderMovementTimer); this.resizeObserver?.disconnect(); + this.sectionIndexTransformObserver?.disconnect(); this.document.defaultView?.removeEventListener( 'resize', this.handleWindowResize @@ -4342,7 +4427,7 @@ export class NativeListWebEngine { const { trackHeight } = this.sectionIndexMetrics(viewportHeight); const maxVisible = Math.max( 1, - Math.floor(trackHeight / SECTION_INDEX_LABEL_SPACING) + Math.floor(trackHeight / SECTION_INDEX_MIN_LABEL_SPACING) ); if (entryCount <= maxVisible) { return Array.from({ length: entryCount }, (_, index) => index); @@ -4356,18 +4441,11 @@ export class NativeListWebEngine { } private sectionIndexMetrics(viewportHeight: number) { - const availableHeight = Math.max( - 0, - viewportHeight - SECTION_INDEX_EDGE_PADDING * 2 - ); - const trackHeight = Math.min( - availableHeight, - SECTION_INDEX_LABEL_SPACING * this.sectionIndexEntries.length + return webSectionIndexMetrics( + this.sectionIndexEntries.length, + viewportHeight, + this.sectionIndexAlignStart ); - return { - originY: (viewportHeight - trackHeight) / 2, - trackHeight, - }; } private configureSectionIndexRail( @@ -4382,6 +4460,8 @@ export class NativeListWebEngine { : 'ltr'; this.indexRail.style.direction = direction; if (!windowCentered) { + this.sectionIndexAlignStart = false; + this.resetSectionIndexTransformCompensation(); if (this.indexRail.parentElement !== this.viewportFrame) { this.viewportFrame.appendChild(this.indexRail); } @@ -4397,15 +4477,50 @@ export class NativeListWebEngine { } if (!view) return viewportHeight; + const sectionIndexContainer = this.sectionIndexContainer?.isConnected + ? this.sectionIndexContainer + : undefined; + const frame = this.viewportFrame.getBoundingClientRect(); + if (sectionIndexContainer) { + const container = sectionIndexContainer.getBoundingClientRect(); + const railLayout = webSectionIndexContainerLayout( + this.sectionIndexEntries.length, + sectionIndexContainer.clientHeight || container.height + ); + if (this.indexRail.parentElement !== sectionIndexContainer) { + sectionIndexContainer.appendChild(this.indexRail); + } + this.sectionIndexAlignStart = true; + this.indexRail.style.position = 'absolute'; + this.indexRail.style.removeProperty('left'); + this.indexRail.style.removeProperty('right'); + this.indexRail.style.insetInlineEnd = + String( + Math.max( + 0, + direction === 'rtl' + ? frame.left - container.left + : container.right - frame.right + ) + ) + 'px'; + this.indexRail.style.top = String(railLayout.top) + 'px'; + this.indexRail.style.bottom = 'auto'; + this.indexRail.style.height = String(railLayout.height) + 'px'; + this.indexRail.style.zIndex = String(SECTION_INDEX_WINDOW_Z_INDEX); + this.startSectionIndexTransformCompensation(); + return railLayout.height; + } + + this.sectionIndexAlignStart = false; + this.resetSectionIndexTransformCompensation(); const visualViewport = view.visualViewport; const windowTop = visualViewport?.offsetTop ?? 0; const windowHeight = visualViewport?.height ?? view.innerHeight; const railHeight = Math.min( windowHeight, SECTION_INDEX_EDGE_PADDING * 2 + - SECTION_INDEX_LABEL_SPACING * this.sectionIndexEntries.length + SECTION_INDEX_MIN_LABEL_SPACING * this.sectionIndexEntries.length ); - const frame = this.viewportFrame.getBoundingClientRect(); if (this.indexRail.parentElement !== this.document.body) { this.document.body.appendChild(this.indexRail); } @@ -4427,6 +4542,86 @@ export class NativeListWebEngine { return railHeight; } + private observeSectionIndexTransforms() { + const container = this.sectionIndexContainer; + const MutationObserverConstructor = + this.document.defaultView?.MutationObserver; + if (!container || !MutationObserverConstructor) return; + this.sectionIndexTransformObserver = new MutationObserverConstructor(() => + this.startSectionIndexTransformCompensation() + ); + let element: HTMLElement | null = container; + while (element) { + this.sectionIndexTransformObserver.observe(element, { + attributes: true, + attributeFilter: ['style'], + }); + if (element === this.document.body) break; + element = element.parentElement; + } + } + + private startSectionIndexTransformCompensation() { + this.sectionIndexTransformTrackingFrames = 0; + this.sectionIndexTransformSettledFrames = 0; + this.updateSectionIndexTransformCompensation(); + this.scheduleSectionIndexTransformCompensation(); + } + + private scheduleSectionIndexTransformCompensation() { + if ( + this.destroyed || + this.sectionIndexTransformFrame !== undefined || + this.indexRail.parentElement !== this.sectionIndexContainer + ) { + return; + } + this.sectionIndexTransformFrame = this.requestFrame(() => { + this.sectionIndexTransformFrame = undefined; + const settled = this.updateSectionIndexTransformCompensation(); + this.sectionIndexTransformTrackingFrames += 1; + this.sectionIndexTransformSettledFrames = settled + ? this.sectionIndexTransformSettledFrames + 1 + : 0; + if ( + this.sectionIndexTransformTrackingFrames < + SECTION_INDEX_TRANSFORM_MAX_TRACKING_FRAMES && + (this.sectionIndexTransformTrackingFrames < + SECTION_INDEX_TRANSFORM_MIN_TRACKING_FRAMES || + this.sectionIndexTransformSettledFrames < + SECTION_INDEX_TRANSFORM_SETTLED_FRAMES) + ) { + this.scheduleSectionIndexTransformCompensation(); + } + }); + } + + private updateSectionIndexTransformCompensation() { + const container = this.sectionIndexContainer; + if (!container || this.indexRail.parentElement !== container) return true; + const inverseScale = webSectionIndexInverseScale( + container.clientHeight, + container.getBoundingClientRect().height + ); + this.indexRail.style.transformOrigin = 'center center'; + this.indexRail.style.transform = + Math.abs(inverseScale - 1) < SECTION_INDEX_TRANSFORM_SETTLED_EPSILON + ? 'none' + : `scale(${String(inverseScale)})`; + return Math.abs(inverseScale - 1) < SECTION_INDEX_TRANSFORM_SETTLED_EPSILON; + } + + private resetSectionIndexTransformCompensation() { + if (this.sectionIndexTransformFrame !== undefined) { + this.cancelFrame(this.sectionIndexTransformFrame); + this.sectionIndexTransformFrame = undefined; + } + this.sectionIndexTransformTrackingFrames = 0; + this.sectionIndexTransformSettledFrames = 0; + this.indexRail.style.removeProperty('transform'); + this.indexRail.style.removeProperty('transform-origin'); + } + private renderSectionIndex(viewportHeight: number, stickyInset: number) { this.indexRail.replaceChildren(); if (!sectionIndexEnabled(this.snapshot)) { @@ -4468,10 +4663,15 @@ export class NativeListWebEngine { const metrics = this.sectionIndexMetrics(indexLayoutHeight); const visibleTrackHeight = Math.min( metrics.trackHeight, - SECTION_INDEX_LABEL_SPACING * visibleEntryIndices.length + SECTION_INDEX_MIN_LABEL_SPACING * visibleEntryIndices.length ); + const allEntriesVisible = + visibleEntryIndices.length === this.sectionIndexEntries.length; + const resolvedVisibleTrackHeight = allEntriesVisible + ? metrics.trackHeight + : visibleTrackHeight; const visibleOriginY = - metrics.originY + (metrics.trackHeight - visibleTrackHeight) / 2; + metrics.originY + (metrics.trackHeight - resolvedVisibleTrackHeight) / 2; const fragment = this.document.createDocumentFragment(); visibleEntryIndices.forEach((entryIndex, visibleIndex) => { const entry = this.sectionIndexEntries[entryIndex]; @@ -4490,7 +4690,7 @@ export class NativeListWebEngine { button.style.top = String( visibleOriginY + - (visibleTrackHeight * (visibleIndex + 0.5)) / + (resolvedVisibleTrackHeight * (visibleIndex + 0.5)) / visibleEntryIndices.length ) + 'px'; fragment.appendChild(button); @@ -4637,19 +4837,12 @@ export class NativeListWebEngine { // private updateSectionIndex(firstVisibleIndex: number) { private updateSectionIndex() { - let activeKey: string | undefined; - this.snapshot.rows.forEach((row, index) => { - if ( - // OneKey patch: a spacer ending exactly at the viewport is not the active section. - // index <= firstVisibleIndex && - itemStart(this.layout.items[index], this.layout.horizontal) <= - this.currentOffset() && - row.type === 'sectionHeader' && - row.sticky !== false && - row.indexTitle - ) - activeKey = row.key; - }); + const activeKey = webSectionIndexActiveKey( + this.snapshot.rows, + this.layout, + this.currentOffset(), + this.viewportLength() + ); this.indexRail .querySelectorAll('[data-section-key]') .forEach((button) => From 108b94b30dbcd9fe6307a777a46ac068fb9a30be Mon Sep 17 00:00:00 2001 From: huhuanming Date: Mon, 21 Sep 2026 14:02:21 +0800 Subject: [PATCH 2/2] chore: bump app modules to 3.0.153 --- native-modules/native-logger/package.json | 2 +- native-modules/react-native-aes-crypto/package.json | 2 +- native-modules/react-native-app-update/package.json | 2 +- native-modules/react-native-async-storage/package.json | 2 +- .../react-native-background-thread/package.json | 2 +- native-modules/react-native-bundle-crypto/package.json | 2 +- native-modules/react-native-bundle-update/package.json | 2 +- .../package.json | 2 +- native-modules/react-native-cloud-fs/package.json | 2 +- native-modules/react-native-cloud-kit-module/package.json | 2 +- native-modules/react-native-device-utils/package.json | 2 +- native-modules/react-native-dns-lookup/package.json | 2 +- .../react-native-get-random-values/package.json | 2 +- .../react-native-image-crop-picker/package.json | 2 +- native-modules/react-native-keychain-module/package.json | 2 +- native-modules/react-native-lite-card/package.json | 2 +- native-modules/react-native-network-info/package.json | 2 +- native-modules/react-native-network-throttle/package.json | 2 +- native-modules/react-native-pbkdf2/package.json | 2 +- native-modules/react-native-perf-memory/package.json | 2 +- native-modules/react-native-perf-stats/package.json | 2 +- native-modules/react-native-ping/package.json | 2 +- native-modules/react-native-range-downloader/package.json | 2 +- native-modules/react-native-sni-connect/package.json | 2 +- native-modules/react-native-splash-screen/package.json | 2 +- .../react-native-split-bundle-loader/package.json | 2 +- native-modules/react-native-tcp-socket/package.json | 2 +- native-modules/react-native-zip-archive/package.json | 2 +- native-views/react-native-auto-size-input/package.json | 2 +- native-views/react-native-chart-webview/package.json | 2 +- native-views/react-native-image/package.json | 4 ++-- native-views/react-native-native-list/package.json | 6 +++--- native-views/react-native-native-sheet/package.json | 2 +- native-views/react-native-pager-view/package.json | 4 ++-- native-views/react-native-perp-depth-bar/package.json | 2 +- native-views/react-native-scroll-guard/package.json | 2 +- native-views/react-native-segment-slider/package.json | 2 +- native-views/react-native-skeleton/package.json | 2 +- native-views/react-native-tab-view/package.json | 2 +- native-views/react-native-text-input/package.json | 2 +- native-views/react-native-text/package.json | 2 +- yarn.lock | 8 ++++---- 42 files changed, 49 insertions(+), 49 deletions(-) diff --git a/native-modules/native-logger/package.json b/native-modules/native-logger/package.json index e84f04037..e104303cd 100644 --- a/native-modules/native-logger/package.json +++ b/native-modules/native-logger/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-native-logger", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-native-logger", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-aes-crypto/package.json b/native-modules/react-native-aes-crypto/package.json index 70e57f523..109f7e782 100644 --- a/native-modules/react-native-aes-crypto/package.json +++ b/native-modules/react-native-aes-crypto/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-aes-crypto", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-aes-crypto", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-app-update/package.json b/native-modules/react-native-app-update/package.json index eecf8effe..83c310893 100644 --- a/native-modules/react-native-app-update/package.json +++ b/native-modules/react-native-app-update/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-app-update", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-app-update", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-async-storage/package.json b/native-modules/react-native-async-storage/package.json index 6043c335f..88eb5bd53 100644 --- a/native-modules/react-native-async-storage/package.json +++ b/native-modules/react-native-async-storage/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-async-storage", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-async-storage", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-background-thread/package.json b/native-modules/react-native-background-thread/package.json index 6aecacbc2..9be8107f1 100644 --- a/native-modules/react-native-background-thread/package.json +++ b/native-modules/react-native-background-thread/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-background-thread", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-background-thread", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-bundle-crypto/package.json b/native-modules/react-native-bundle-crypto/package.json index 16b213bd1..71527f4b6 100644 --- a/native-modules/react-native-bundle-crypto/package.json +++ b/native-modules/react-native-bundle-crypto/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-bundle-crypto", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-bundle-crypto", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-bundle-update/package.json b/native-modules/react-native-bundle-update/package.json index 2314d648d..e37d802b1 100644 --- a/native-modules/react-native-bundle-update/package.json +++ b/native-modules/react-native-bundle-update/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-bundle-update", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-bundle-update", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-check-biometric-auth-changed/package.json b/native-modules/react-native-check-biometric-auth-changed/package.json index d873a0a8b..8749eeb06 100644 --- a/native-modules/react-native-check-biometric-auth-changed/package.json +++ b/native-modules/react-native-check-biometric-auth-changed/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-check-biometric-auth-changed", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-check-biometric-auth-changed", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-cloud-fs/package.json b/native-modules/react-native-cloud-fs/package.json index 1633b94cc..894ac7033 100644 --- a/native-modules/react-native-cloud-fs/package.json +++ b/native-modules/react-native-cloud-fs/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-cloud-fs", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-cloud-fs TurboModule for OneKey", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-cloud-kit-module/package.json b/native-modules/react-native-cloud-kit-module/package.json index ddce8b0d5..0794d40cc 100644 --- a/native-modules/react-native-cloud-kit-module/package.json +++ b/native-modules/react-native-cloud-kit-module/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-cloud-kit-module", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-cloud-kit-module", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-device-utils/package.json b/native-modules/react-native-device-utils/package.json index f02bca839..f38edab35 100644 --- a/native-modules/react-native-device-utils/package.json +++ b/native-modules/react-native-device-utils/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-device-utils", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-device-utils", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-dns-lookup/package.json b/native-modules/react-native-dns-lookup/package.json index 1da4341be..cc4fb8c07 100644 --- a/native-modules/react-native-dns-lookup/package.json +++ b/native-modules/react-native-dns-lookup/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-dns-lookup", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-dns-lookup", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-get-random-values/package.json b/native-modules/react-native-get-random-values/package.json index 6a9013feb..55e416974 100644 --- a/native-modules/react-native-get-random-values/package.json +++ b/native-modules/react-native-get-random-values/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-get-random-values", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-get-random-values", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-image-crop-picker/package.json b/native-modules/react-native-image-crop-picker/package.json index 8d5eb8baa..1fea79de3 100644 --- a/native-modules/react-native-image-crop-picker/package.json +++ b/native-modules/react-native-image-crop-picker/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-image-crop-picker", - "version": "3.0.152", + "version": "3.0.153", "description": "Single photo picker and cropper Nitro module for OneKey, replacing react-native-image-crop-picker", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-keychain-module/package.json b/native-modules/react-native-keychain-module/package.json index 4f97e9bd1..8cd435a08 100644 --- a/native-modules/react-native-keychain-module/package.json +++ b/native-modules/react-native-keychain-module/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-keychain-module", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-keychain-module", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-lite-card/package.json b/native-modules/react-native-lite-card/package.json index 840720458..b9795ab94 100644 --- a/native-modules/react-native-lite-card/package.json +++ b/native-modules/react-native-lite-card/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-lite-card", - "version": "3.0.152", + "version": "3.0.153", "description": "lite card", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-network-info/package.json b/native-modules/react-native-network-info/package.json index 61181b288..8ed74ef77 100644 --- a/native-modules/react-native-network-info/package.json +++ b/native-modules/react-native-network-info/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-network-info", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-network-info", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-network-throttle/package.json b/native-modules/react-native-network-throttle/package.json index eeeefc619..195e551c0 100644 --- a/native-modules/react-native-network-throttle/package.json +++ b/native-modules/react-native-network-throttle/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-network-throttle", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-network-throttle", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-pbkdf2/package.json b/native-modules/react-native-pbkdf2/package.json index 71e98b0fe..70d3a0188 100644 --- a/native-modules/react-native-pbkdf2/package.json +++ b/native-modules/react-native-pbkdf2/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-pbkdf2", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-pbkdf2", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-perf-memory/package.json b/native-modules/react-native-perf-memory/package.json index 25e099817..4784543fe 100644 --- a/native-modules/react-native-perf-memory/package.json +++ b/native-modules/react-native-perf-memory/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-perf-memory", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-perf-memory", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-perf-stats/package.json b/native-modules/react-native-perf-stats/package.json index bca62060c..5831f1993 100644 --- a/native-modules/react-native-perf-stats/package.json +++ b/native-modules/react-native-perf-stats/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-perf-stats", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-perf-stats", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-ping/package.json b/native-modules/react-native-ping/package.json index 96c065ae0..6b887391f 100644 --- a/native-modules/react-native-ping/package.json +++ b/native-modules/react-native-ping/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-ping", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-ping TurboModule for OneKey", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-range-downloader/package.json b/native-modules/react-native-range-downloader/package.json index 461558b26..cc8223f6f 100644 --- a/native-modules/react-native-range-downloader/package.json +++ b/native-modules/react-native-range-downloader/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-range-downloader", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-range-downloader", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-sni-connect/package.json b/native-modules/react-native-sni-connect/package.json index 33ccb6b80..317b3324c 100644 --- a/native-modules/react-native-sni-connect/package.json +++ b/native-modules/react-native-sni-connect/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-sni-connect", - "version": "3.0.152", + "version": "3.0.153", "description": "A React Native library for SNI-based HTTP requests with DNS caching and request management", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-splash-screen/package.json b/native-modules/react-native-splash-screen/package.json index 3e76bc81f..ffc4f3015 100644 --- a/native-modules/react-native-splash-screen/package.json +++ b/native-modules/react-native-splash-screen/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-splash-screen", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-splash-screen", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-split-bundle-loader/package.json b/native-modules/react-native-split-bundle-loader/package.json index 82cc14182..11b40ef38 100644 --- a/native-modules/react-native-split-bundle-loader/package.json +++ b/native-modules/react-native-split-bundle-loader/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-split-bundle-loader", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-split-bundle-loader", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-tcp-socket/package.json b/native-modules/react-native-tcp-socket/package.json index dde85b8bf..9c57787d4 100644 --- a/native-modules/react-native-tcp-socket/package.json +++ b/native-modules/react-native-tcp-socket/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-tcp-socket", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-tcp-socket", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-modules/react-native-zip-archive/package.json b/native-modules/react-native-zip-archive/package.json index 66765de49..d3e0cd601 100644 --- a/native-modules/react-native-zip-archive/package.json +++ b/native-modules/react-native-zip-archive/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-zip-archive", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-zip-archive Nitro HybridObject for OneKey", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-auto-size-input/package.json b/native-views/react-native-auto-size-input/package.json index 868e35ab4..431321705 100644 --- a/native-views/react-native-auto-size-input/package.json +++ b/native-views/react-native-auto-size-input/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-auto-size-input", - "version": "3.0.152", + "version": "3.0.153", "description": "Auto-sizing text input with font scaling, prefix and suffix support", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-chart-webview/package.json b/native-views/react-native-chart-webview/package.json index c1fa48671..2d4605e3c 100644 --- a/native-views/react-native-chart-webview/package.json +++ b/native-views/react-native-chart-webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-chart-webview", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-chart-webview", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-image/package.json b/native-views/react-native-image/package.json index 4a31e23af..8c37ee2b6 100644 --- a/native-views/react-native-image/package.json +++ b/native-views/react-native-image/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-image", - "version": "3.0.152", + "version": "3.0.153", "description": "High-performance native image view for OneKey", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", @@ -81,7 +81,7 @@ "typescript": "^5.9.2" }, "peerDependencies": { - "@onekeyfe/react-native-skeleton": "3.0.152", + "@onekeyfe/react-native-skeleton": "3.0.153", "react": "*", "react-native": "*", "react-native-nitro-modules": "0.37.0" diff --git a/native-views/react-native-native-list/package.json b/native-views/react-native-native-list/package.json index e0443b8c5..40949e8fc 100644 --- a/native-views/react-native-native-list/package.json +++ b/native-views/react-native-native-list/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-native-list", - "version": "3.0.152", + "version": "3.0.153", "description": "Template-driven native RecyclerView and UICollectionView for React Native", "source": "./src/index.ts", "main": "./lib/module/index.js", @@ -83,8 +83,8 @@ "typescript": "^5.9.2" }, "peerDependencies": { - "@onekeyfe/react-native-image": "3.0.152", - "@onekeyfe/react-native-native-logger": "3.0.152", + "@onekeyfe/react-native-image": "3.0.153", + "@onekeyfe/react-native-native-logger": "3.0.153", "react": "*", "react-native": "*", "react-native-nitro-modules": "0.37.0" diff --git a/native-views/react-native-native-sheet/package.json b/native-views/react-native-native-sheet/package.json index f34fa104d..0c035d6db 100644 --- a/native-views/react-native-native-sheet/package.json +++ b/native-views/react-native-native-sheet/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-native-sheet", - "version": "3.0.152", + "version": "3.0.153", "description": "Native bottom sheet host for arbitrary React Native content", "source": "./src/index.tsx", "main": "./lib/module/index.js", diff --git a/native-views/react-native-pager-view/package.json b/native-views/react-native-pager-view/package.json index 341ee98c0..3a8dffcb7 100644 --- a/native-views/react-native-pager-view/package.json +++ b/native-views/react-native-pager-view/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-pager-view", - "version": "3.0.152", + "version": "3.0.153", "description": "React Native wrapper for Android and iOS ViewPager", "source": "./src/index.tsx", "main": "./lib/module/index.js", @@ -66,7 +66,7 @@ "typescript": "^5.9.2" }, "peerDependencies": { - "@onekeyfe/react-native-native-logger": "3.0.152", + "@onekeyfe/react-native-native-logger": "3.0.153", "react": "*", "react-native": "*" }, diff --git a/native-views/react-native-perp-depth-bar/package.json b/native-views/react-native-perp-depth-bar/package.json index e06cd820a..04a0785bb 100644 --- a/native-views/react-native-perp-depth-bar/package.json +++ b/native-views/react-native-perp-depth-bar/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-perp-depth-bar", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-perp-depth-bar", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-scroll-guard/package.json b/native-views/react-native-scroll-guard/package.json index 30eb174ce..ff3912d57 100644 --- a/native-views/react-native-scroll-guard/package.json +++ b/native-views/react-native-scroll-guard/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-scroll-guard", - "version": "3.0.152", + "version": "3.0.153", "description": "A native view wrapper that prevents parent scrollable containers (PagerView/ViewPager2) from intercepting child scroll gestures", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-segment-slider/package.json b/native-views/react-native-segment-slider/package.json index 03d5edabf..6911e88eb 100644 --- a/native-views/react-native-segment-slider/package.json +++ b/native-views/react-native-segment-slider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-segment-slider", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-segment-slider", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-skeleton/package.json b/native-views/react-native-skeleton/package.json index 91e45af61..8a6796c9a 100644 --- a/native-views/react-native-skeleton/package.json +++ b/native-views/react-native-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-skeleton", - "version": "3.0.152", + "version": "3.0.153", "description": "react-native-skeleton", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/native-views/react-native-tab-view/package.json b/native-views/react-native-tab-view/package.json index b26082cc0..611f07a4c 100644 --- a/native-views/react-native-tab-view/package.json +++ b/native-views/react-native-tab-view/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-tab-view", - "version": "3.0.152", + "version": "3.0.153", "description": "Native Bottom Tabs for React Native (UIKit implementation)", "source": "./src/index.tsx", "main": "./lib/module/index.js", diff --git a/native-views/react-native-text-input/package.json b/native-views/react-native-text-input/package.json index 11b70bb04..11eb02630 100644 --- a/native-views/react-native-text-input/package.json +++ b/native-views/react-native-text-input/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-text-input", - "version": "3.0.152", + "version": "3.0.153", "description": "React Native TextInput with native paste events", "source": "./src/index.tsx", "main": "./lib/module/index.js", diff --git a/native-views/react-native-text/package.json b/native-views/react-native-text/package.json index 18c1c4a58..da050b87a 100644 --- a/native-views/react-native-text/package.json +++ b/native-views/react-native-text/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/react-native-text", - "version": "3.0.152", + "version": "3.0.153", "description": "Opt-in native text rendering for React Native", "source": "./src/index.ts", "main": "./lib/module/index.js", diff --git a/yarn.lock b/yarn.lock index 391ca5c55..9f81b4649 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3587,7 +3587,7 @@ __metadata: react-test-renderer: "npm:19.2.3" typescript: "npm:^5.9.2" peerDependencies: - "@onekeyfe/react-native-skeleton": 3.0.152 + "@onekeyfe/react-native-skeleton": 3.0.153 react: "*" react-native: "*" react-native-nitro-modules: 0.37.0 @@ -3688,8 +3688,8 @@ __metadata: react-native-nitro-modules: "npm:0.37.0" typescript: "npm:^5.9.2" peerDependencies: - "@onekeyfe/react-native-image": 3.0.152 - "@onekeyfe/react-native-native-logger": 3.0.152 + "@onekeyfe/react-native-image": 3.0.153 + "@onekeyfe/react-native-native-logger": 3.0.153 react: "*" react-native: "*" react-native-nitro-modules: 0.37.0 @@ -3841,7 +3841,7 @@ __metadata: react-native-builder-bob: "npm:^0.40.13" typescript: "npm:^5.9.2" peerDependencies: - "@onekeyfe/react-native-native-logger": 3.0.152 + "@onekeyfe/react-native-native-logger": 3.0.153 react: "*" react-native: "*" languageName: unknown