fix(ios): stabilize keyboard toolbar, image picker, and scrolling (#15182)

## Summary
- keep the editor active when iOS keyboard toolbar interactions move
focus into range-sync excluded widgets
- use the native iOS image picker/source sheet and sync native
presentation with the app theme
- pin `ListViewKit` to `1.1.6` so the iOS workspace resolves with Xcode
16.3
- restore vertical scrolling in the iOS `WKWebView` by removing the
global `contentOffset` reset while preserving zoom prevention

## Test plan
- [x] `yarn vitest --run --config \"vitest.config.ts\"
--browser.enabled=false \"src/__tests__/inline/active.unit.spec.ts\"`
- [x] `LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 xcodebuild
-resolvePackageDependencies -workspace
\"packages/frontend/apps/ios/App/App.xcworkspace\" -scheme \"App\"`
- [x] `xcodebuild -workspace \"App.xcworkspace\" -scheme \"App\"
-destination \"generic/platform=iOS Simulator\" build
CODE_SIGNING_ALLOWED=NO ONLY_ACTIVE_ARCH=YES ARCHS=arm64`
- [x] Xcode build validation for the updated PR branch
This commit is contained in:
keepClamDown
2026-07-09 11:11:55 +08:00
committed by GitHub
parent 9f8e5c0eb3
commit a868f54eeb
19 changed files with 1095 additions and 28 deletions
@@ -0,0 +1,5 @@
import type { NativeThemeMode } from './theme-mode';
export interface AffineThemePlugin {
onThemeChanged(options: { themeMode: NativeThemeMode }): Promise<void>;
}
@@ -0,0 +1,9 @@
import { registerPlugin } from '@capacitor/core';
import type { AffineThemePlugin } from './definitions';
const AffineTheme = registerPlugin<AffineThemePlugin>('AffineTheme');
export * from './definitions';
export * from './theme-mode';
export { AffineTheme };
@@ -0,0 +1 @@
export type NativeThemeMode = 'dark' | 'light' | 'system';
@@ -0,0 +1,13 @@
export interface PickedImageFile {
path: string;
name: string;
mimeType: string;
lastModified: number;
}
export interface ImagePickerPlugin {
pickImages(options?: { multiple?: boolean }): Promise<{
files: PickedImageFile[];
canceled?: boolean;
}>;
}
@@ -0,0 +1,8 @@
import { registerPlugin } from '@capacitor/core';
import type { ImagePickerPlugin } from './definitions';
const ImagePicker = registerPlugin<ImagePickerPlugin>('ImagePicker');
export * from './definitions';
export { ImagePicker };