mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 02:17:31 +00:00
refactor(mobile): colocate chat pinch gesture hook and tests (#36690)
This commit is contained in:
@@ -35,7 +35,7 @@ import {
|
||||
type MobileNativeChatPendingItem
|
||||
} from './mobile-native-chat-render-data'
|
||||
import { useMobileNativeChatRowKeys } from './native-chat/transcript/mobile-native-chat-row-keys'
|
||||
import { useMobileNativeChatPinchGesture } from './use-mobile-native-chat-pinch-gesture'
|
||||
import { useMobileNativeChatPinchGesture } from './native-chat/transcript/use-mobile-native-chat-pinch-gesture'
|
||||
import { useMobileNativeChatTailFollow } from './use-mobile-native-chat-tail-follow'
|
||||
import { useMobileNativeChatTurnDisclosure } from './native-chat/transcript/use-mobile-native-chat-turn-disclosure'
|
||||
import {
|
||||
|
||||
+1
-4
@@ -1,10 +1,7 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create } from 'react-test-renderer'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import {
|
||||
FONT_SCALE_STEP,
|
||||
quantizeFontScale
|
||||
} from './native-chat/transcript/mobile-native-chat-message-text'
|
||||
import { FONT_SCALE_STEP, quantizeFontScale } from './mobile-native-chat-message-text'
|
||||
|
||||
const handlers: { start?: () => void; update?: (e: { scale: number }) => void } = {}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { useMemo, useRef, useState } from 'react'
|
||||
import { Gesture } from 'react-native-gesture-handler'
|
||||
import type { ComposedGesture } from 'react-native-gesture-handler'
|
||||
import { quantizeFontScale } from './native-chat/transcript/mobile-native-chat-message-text'
|
||||
import { quantizeFontScale } from './mobile-native-chat-message-text'
|
||||
|
||||
// Anchor each pinch on the committed scale so successive gestures compound.
|
||||
export function useMobileNativeChatPinchGesture(): {
|
||||
Reference in New Issue
Block a user