chore(mobile): upgrade to Expo SDK 58 and React Native 0.88 RC (#12045)
Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
5cc99e1c23
commit
8dc07f199c
68 files changed
+2433
-3240
No files matched your search
@@ -401,6 +401,9 @@ const config: ExpoConfig = {
|
||||
android: {
|
||||
// Keep the supported floor explicit and covered by native notification tests.
|
||||
minSdkVersion: 24,
|
||||
// kotlinx-io uses Kotlin 2.3's return-value checker annotation, while
|
||||
// SDK 58 builds with Kotlin 2.2. It has no runtime behavior.
|
||||
extraProguardRules: "-dontwarn kotlin.MustUseReturnValues",
|
||||
},
|
||||
ios: {
|
||||
deploymentTarget: "18.0",
|
||||
@@ -419,7 +422,6 @@ const config: ExpoConfig = {
|
||||
// would delete the asset catalog) and its xcodeproj mod creates the widget
|
||||
// target (which must exist before the compile phase can be attached).
|
||||
...(!isIosPersonalTeamBuild ? ["./plugins/withWidgetLogoAsset.cjs", widgetsPlugin] : []),
|
||||
"./plugins/withIosSceneLifecycle.cjs",
|
||||
"./plugins/withAndroidCleartextTraffic.cjs",
|
||||
"./plugins/withAndroidGradleHeap.cjs",
|
||||
"./plugins/withAndroidInputBackground.cjs",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/EventEmitters.h>
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/Props.h>
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/RCTComponentViewHelpers.h>
|
||||
#import "RCTFabricComponentsPlugins.h"
|
||||
#import <React/RCTFabricComponentsPlugins.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#import <React/RCTViewManager.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
#import "RCTBridge.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@interface T3MarkdownTextManager : RCTViewManager
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/EventEmitters.h>
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/Props.h>
|
||||
#import <react/renderer/components/T3MarkdownTextSpec/RCTComponentViewHelpers.h>
|
||||
#import "RCTFabricComponentsPlugins.h"
|
||||
#import <React/RCTFabricComponentsPlugins.h>
|
||||
#import "Utils.h"
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
StyleSheet,
|
||||
Text as RNText,
|
||||
type ColorValue,
|
||||
type TextInstance,
|
||||
type TextProps,
|
||||
type ViewStyle,
|
||||
} from "react-native";
|
||||
@@ -43,7 +44,7 @@ export type ContextMenuActionEvent = {
|
||||
* while the React Native Text fallback reports measured `TextLayoutLine`s.
|
||||
*/
|
||||
export type MarkdownTextPrimitiveProps = Omit<TextProps, "onTextLayout"> & {
|
||||
nativeTextRef?: Ref<RNText>;
|
||||
nativeTextRef?: Ref<TextInstance>;
|
||||
selectionHandleColor?: ColorValue;
|
||||
uiTextView?: boolean;
|
||||
contextMenuConfig?: string;
|
||||
@@ -134,13 +135,17 @@ function AndroidMarkdownText({
|
||||
contextClipboardConfig: _contextClipboardConfig,
|
||||
...props
|
||||
}: MarkdownTextPrimitiveProps) {
|
||||
const textRef = React.useRef<RNText | null>(null);
|
||||
React.useImperativeHandle<RNText | null, RNText | null>(nativeTextRef, () => textRef.current, []);
|
||||
const textRef = React.useRef<TextInstance | null>(null);
|
||||
React.useImperativeHandle<TextInstance | null, TextInstance | null>(
|
||||
nativeTextRef,
|
||||
() => textRef.current,
|
||||
[],
|
||||
);
|
||||
const color = processColor(selectionHandleColor);
|
||||
const applyHandleColor = React.useCallback(() => {
|
||||
if (!textRef.current || typeof color !== "number") return;
|
||||
const reactTag = findNodeHandle(textRef.current);
|
||||
if (reactTag !== null) setMarkdownSelectionHandleColor(reactTag, color);
|
||||
if (reactTag != null) setMarkdownSelectionHandleColor(reactTag, color);
|
||||
}, [color]);
|
||||
|
||||
// RN's selectionColor only sets the highlight. Retint mounted handles when
|
||||
|
||||
@@ -6,14 +6,14 @@ import {
|
||||
Linking,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
Text as RNText,
|
||||
type TextInstance,
|
||||
type TextStyle,
|
||||
useColorScheme,
|
||||
View,
|
||||
} from "react-native";
|
||||
|
||||
import { MarkdownTextPrimitive } from "./MarkdownTextPrimitive";
|
||||
import { markdownFileIconSource } from "./markdownFileIcons";
|
||||
import { markdownFileIconSource, markdownIconAssetUri } from "./markdownFileIcons";
|
||||
import { markdownLinkIconSource } from "./markdownLinkIcons";
|
||||
import { resolveMarkdownFileIcon, resolveMarkdownLinkIcon } from "./markdownLinks";
|
||||
import type { NativeMarkdownTextRun } from "./nativeMarkdownText";
|
||||
@@ -236,11 +236,11 @@ export function NativeMarkdownSelectableText(props: {
|
||||
interactive: Boolean(run.href),
|
||||
iconUri:
|
||||
!contextReference && run.fileIcon
|
||||
? Image.resolveAssetSource(markdownFileIconSource(run.fileIcon)).uri
|
||||
? markdownIconAssetUri(markdownFileIconSource(run.fileIcon))
|
||||
: contextRecord?.kind === "mention" && "path" in contextRecord
|
||||
? Image.resolveAssetSource(
|
||||
? markdownIconAssetUri(
|
||||
markdownFileIconSource(resolveMarkdownFileIcon(contextRecord.path)),
|
||||
).uri
|
||||
)
|
||||
: undefined,
|
||||
fontSize: props.textStyle.fontSize * 0.8,
|
||||
foreground: props.textStyle.color,
|
||||
@@ -297,10 +297,12 @@ export function NativeMarkdownSelectableText(props: {
|
||||
? JSON.stringify({ fragment: contextClipboardFragment, ranges })
|
||||
: "";
|
||||
const attachAndroidText = useCallback(
|
||||
(textView: RNText | null) => {
|
||||
(textView: TextInstance | null) => {
|
||||
if (Platform.OS !== "android" || !containsInlineIcon || !textView) return;
|
||||
const reactTag = findNodeHandle(textView);
|
||||
if (reactTag !== null) installMarkdownCopySanitizer(reactTag, contextClipboardConfig);
|
||||
if (typeof reactTag === "number") {
|
||||
installMarkdownCopySanitizer(reactTag, contextClipboardConfig);
|
||||
}
|
||||
},
|
||||
[containsInlineIcon, contextClipboardConfig],
|
||||
);
|
||||
@@ -358,6 +360,12 @@ export function NativeMarkdownSelectableText(props: {
|
||||
else void Linking.openURL(href);
|
||||
}
|
||||
: undefined;
|
||||
const fileIconUri = run.fileIcon
|
||||
? markdownIconAssetUri(markdownFileIconSource(run.fileIcon))
|
||||
: undefined;
|
||||
const linkIconUri = linkIcon
|
||||
? markdownIconAssetUri(markdownLinkIconSource(linkIcon))
|
||||
: undefined;
|
||||
return (
|
||||
<MarkdownTextPrimitive
|
||||
key={key}
|
||||
@@ -366,12 +374,12 @@ export function NativeMarkdownSelectableText(props: {
|
||||
Platform.OS === "ios"
|
||||
? chip
|
||||
? `t3-chip:${JSON.stringify(chip)}`
|
||||
: run.fileIcon
|
||||
? `t3-file:${Image.resolveAssetSource(markdownFileIconSource(run.fileIcon)).uri}`
|
||||
: fileIconUri
|
||||
? `t3-file:${fileIconUri}`
|
||||
: run.skillName
|
||||
? "t3-skill:sf:cube"
|
||||
: linkIcon
|
||||
? `t3-link:${Image.resolveAssetSource(markdownLinkIconSource(linkIcon)).uri}`
|
||||
: linkIconUri
|
||||
? `t3-link:${linkIconUri}`
|
||||
: undefined
|
||||
: undefined
|
||||
}
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
||||
import type { ViewProps } from "react-native";
|
||||
import type {
|
||||
BubblingEventHandler,
|
||||
Int32,
|
||||
WithDefault,
|
||||
} from "react-native/Libraries/Types/CodegenTypes";
|
||||
import { codegenNativeComponent, type CodegenTypes, type ViewProps } from "react-native";
|
||||
|
||||
interface TargetedEvent {
|
||||
target: Int32;
|
||||
target: CodegenTypes.Int32;
|
||||
}
|
||||
|
||||
interface TextLayoutEvent extends TargetedEvent {
|
||||
@@ -21,19 +15,19 @@ interface TextLayoutEvent extends TargetedEvent {
|
||||
* @property end - The end index of the selected range (0-based, exclusive)
|
||||
*/
|
||||
interface SelectionChangeEvent extends TargetedEvent {
|
||||
start: Int32;
|
||||
end: Int32;
|
||||
start: CodegenTypes.Int32;
|
||||
end: CodegenTypes.Int32;
|
||||
}
|
||||
|
||||
type EllipsizeMode = "head" | "middle" | "tail" | "clip";
|
||||
|
||||
interface NativeProps extends ViewProps {
|
||||
contextClipboardConfig?: string;
|
||||
numberOfLines?: Int32;
|
||||
allowFontScaling?: WithDefault<boolean, true>;
|
||||
ellipsizeMode?: WithDefault<EllipsizeMode, "tail">;
|
||||
numberOfLines?: CodegenTypes.Int32;
|
||||
allowFontScaling?: CodegenTypes.WithDefault<boolean, true>;
|
||||
ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, "tail">;
|
||||
selectable?: boolean;
|
||||
onTextLayout?: BubblingEventHandler<TextLayoutEvent>;
|
||||
onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>;
|
||||
/**
|
||||
* Callback fired when the text selection changes.
|
||||
*
|
||||
@@ -48,7 +42,7 @@ interface NativeProps extends ViewProps {
|
||||
* </MarkdownTextPrimitive>
|
||||
* ```
|
||||
*/
|
||||
onSelectionChange?: BubblingEventHandler<SelectionChangeEvent>;
|
||||
onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>;
|
||||
}
|
||||
|
||||
export default codegenNativeComponent<NativeProps>("T3MarkdownText", {
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import type { ColorValue, ViewProps } from "react-native";
|
||||
import type {
|
||||
BubblingEventHandler,
|
||||
Float,
|
||||
Int32,
|
||||
WithDefault,
|
||||
} from "react-native/Libraries/Types/CodegenTypes";
|
||||
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
|
||||
import {
|
||||
codegenNativeComponent,
|
||||
type CodegenTypes,
|
||||
type ColorValue,
|
||||
type ViewProps,
|
||||
} from "react-native";
|
||||
|
||||
interface TargetedEvent {
|
||||
target: Int32;
|
||||
target: CodegenTypes.Int32;
|
||||
}
|
||||
|
||||
interface ContextMenuActionEvent extends TargetedEvent {
|
||||
@@ -35,21 +33,21 @@ type TextAlign = "auto" | "left" | "right" | "center" | "justify";
|
||||
interface NativeProps extends ViewProps {
|
||||
text: string;
|
||||
color?: ColorValue;
|
||||
fontSize?: Float;
|
||||
fontStyle?: WithDefault<FontStyle, "normal">;
|
||||
fontWeight?: WithDefault<NativeFontWeight, "normal">;
|
||||
fontSize?: CodegenTypes.Float;
|
||||
fontStyle?: CodegenTypes.WithDefault<FontStyle, "normal">;
|
||||
fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, "normal">;
|
||||
fontFamily?: string;
|
||||
letterSpacing?: Float;
|
||||
lineHeight?: Float;
|
||||
textDecorationLine?: WithDefault<TextDecorationLine, "none">;
|
||||
textDecorationStyle?: WithDefault<TextDecorationStyle, "solid">;
|
||||
letterSpacing?: CodegenTypes.Float;
|
||||
lineHeight?: CodegenTypes.Float;
|
||||
textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, "none">;
|
||||
textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, "solid">;
|
||||
textDecorationColor?: ColorValue;
|
||||
textAlign?: WithDefault<TextAlign, "auto">;
|
||||
shadowRadius?: WithDefault<Float, 0>;
|
||||
textAlign?: CodegenTypes.WithDefault<TextAlign, "auto">;
|
||||
shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
|
||||
contextMenuConfig?: string;
|
||||
onPress?: BubblingEventHandler<TargetedEvent>;
|
||||
onLongPress?: BubblingEventHandler<TargetedEvent>;
|
||||
onContextMenuAction?: BubblingEventHandler<ContextMenuActionEvent>;
|
||||
onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
|
||||
onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
|
||||
onContextMenuAction?: CodegenTypes.BubblingEventHandler<ContextMenuActionEvent>;
|
||||
}
|
||||
|
||||
export default codegenNativeComponent<NativeProps>("T3MarkdownTextRun", {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ImageSourcePropType } from "react-native";
|
||||
import { Image, type ImageSourcePropType } from "react-native";
|
||||
|
||||
import type { MarkdownFileIcon } from "./markdownLinks";
|
||||
import { MARKDOWN_FILE_ICON_SOURCES } from "./markdownFileIcons.generated";
|
||||
@@ -6,3 +6,12 @@ import { MARKDOWN_FILE_ICON_SOURCES } from "./markdownFileIcons.generated";
|
||||
export function markdownFileIconSource(icon: MarkdownFileIcon): ImageSourcePropType {
|
||||
return MARKDOWN_FILE_ICON_SOURCES[icon];
|
||||
}
|
||||
|
||||
/**
|
||||
* Bundled icon URI handed to native views that draw the icon themselves. The
|
||||
* sources are static requires, so this only comes back undefined when the
|
||||
* bundler dropped the asset; callers treat a missing icon as "no icon".
|
||||
*/
|
||||
export function markdownIconAssetUri(source: ImageSourcePropType): string | undefined {
|
||||
return Image.resolveAssetSource(source)?.uri;
|
||||
}
|
||||
+48
-47
@@ -49,7 +49,8 @@
|
||||
"@clerk/expo": "catalog:",
|
||||
"@effect/atom-react": "catalog:",
|
||||
"@expo-google-fonts/dm-sans": "^0.4.2",
|
||||
"@expo/ui": "~57.0.14",
|
||||
"@expo/metro-runtime": "~58.0.9",
|
||||
"@expo/ui": "~58.0.9",
|
||||
"@legendapp/list": "catalog:",
|
||||
"@material/material-color-utilities": "0.3.0",
|
||||
"@noble/curves": "catalog:",
|
||||
@@ -73,56 +74,56 @@
|
||||
"clsx": "^2.1.1",
|
||||
"diff": "8.0.3",
|
||||
"effect": "catalog:",
|
||||
"expo": "~57.0.18",
|
||||
"expo-asset": "~57.0.15",
|
||||
"expo-audio": "57.0.4",
|
||||
"expo-auth-session": "~57.0.10",
|
||||
"expo-blur": "~57.0.2",
|
||||
"expo-build-properties": "~57.0.15",
|
||||
"expo-camera": "~57.0.4",
|
||||
"expo-clipboard": "~57.0.1",
|
||||
"expo-constants": "~57.0.16",
|
||||
"expo-crypto": "~57.0.2",
|
||||
"expo-dev-client": "~57.0.16",
|
||||
"expo-device": "~57.0.1",
|
||||
"expo-document-picker": "~57.0.1",
|
||||
"expo-file-system": "~57.0.6",
|
||||
"expo-font": "~57.0.2",
|
||||
"expo-glass-effect": "~57.0.1",
|
||||
"expo-haptics": "~57.0.2",
|
||||
"expo-image": "~57.0.3",
|
||||
"expo-image-manipulator": "~57.0.17",
|
||||
"expo-image-picker": "~57.0.14",
|
||||
"expo-keep-awake": "~57.0.2",
|
||||
"expo-linking": "~57.0.8",
|
||||
"expo-network": "~57.0.1",
|
||||
"expo-notifications": "57.0.15",
|
||||
"expo": "58.0.0",
|
||||
"expo-asset": "~58.0.9",
|
||||
"expo-audio": "58.0.3",
|
||||
"expo-auth-session": "~58.0.6",
|
||||
"expo-blur": "58.0.2",
|
||||
"expo-build-properties": "~58.0.9",
|
||||
"expo-camera": "~58.0.5",
|
||||
"expo-clipboard": "~58.0.2",
|
||||
"expo-constants": "~58.0.9",
|
||||
"expo-crypto": "~58.0.3",
|
||||
"expo-dev-client": "~58.0.9",
|
||||
"expo-device": "~58.0.3",
|
||||
"expo-document-picker": "~58.0.3",
|
||||
"expo-file-system": "~58.0.4",
|
||||
"expo-font": "~58.0.4",
|
||||
"expo-glass-effect": "58.0.3",
|
||||
"expo-haptics": "~58.0.3",
|
||||
"expo-image": "~58.0.8",
|
||||
"expo-image-manipulator": "~58.0.10",
|
||||
"expo-image-picker": "~58.0.9",
|
||||
"expo-keep-awake": "~58.0.2",
|
||||
"expo-linking": "~58.0.9",
|
||||
"expo-network": "~58.0.2",
|
||||
"expo-notifications": "~58.0.9",
|
||||
"expo-paste-input": "^0.1.15",
|
||||
"expo-quick-actions": "^6.0.2",
|
||||
"expo-secure-store": "~57.0.2",
|
||||
"expo-sharing": "57.0.17",
|
||||
"expo-splash-screen": "~57.0.8",
|
||||
"expo-sqlite": "~57.0.2",
|
||||
"expo-symbols": "~57.0.2",
|
||||
"expo-updates": "~57.0.19",
|
||||
"expo-video": "~57.0.3",
|
||||
"expo-web-browser": "~57.0.2",
|
||||
"expo-widgets": "57.0.15",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-native": "0.86.3",
|
||||
"react-native-gesture-handler": "~2.32.0",
|
||||
"expo-secure-store": "~58.0.1",
|
||||
"expo-sharing": "58.0.12",
|
||||
"expo-splash-screen": "~58.0.2",
|
||||
"expo-sqlite": "~58.0.7",
|
||||
"expo-symbols": "~58.0.3",
|
||||
"expo-updates": "~58.0.11",
|
||||
"expo-video": "~58.0.5",
|
||||
"expo-web-browser": "~58.0.3",
|
||||
"expo-widgets": "58.0.9",
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0",
|
||||
"react-native": "0.88.0-rc.3",
|
||||
"react-native-gesture-handler": "~3.2.1",
|
||||
"react-native-image-viewing": "^0.2.2",
|
||||
"react-native-keyboard-controller": "1.21.13",
|
||||
"react-native-keyboard-controller": "1.22.4",
|
||||
"react-native-nitro-markdown": "^0.5.0",
|
||||
"react-native-nitro-modules": "0.35.9",
|
||||
"react-native-reanimated": "4.5.5",
|
||||
"react-native-safe-area-context": "~5.7.0",
|
||||
"react-native-screens": "~4.26.0",
|
||||
"react-native-reanimated": "4.7.0",
|
||||
"react-native-safe-area-context": "~5.9.1",
|
||||
"react-native-screens": "~4.28.0",
|
||||
"react-native-shiki-engine": "^0.3.12",
|
||||
"react-native-svg": "15.15.4",
|
||||
"react-native-webview": "^13.16.1",
|
||||
"react-native-worklets": "0.11.4",
|
||||
"react-native-svg": "15.15.5",
|
||||
"react-native-webview": "14.0.1",
|
||||
"react-native-worklets": "0.13.0",
|
||||
"shiki": "4.2.0",
|
||||
"tailwind-merge": "^3.5.0",
|
||||
"uniwind": "1.11.0"
|
||||
@@ -130,9 +131,9 @@
|
||||
"devDependencies": {
|
||||
"@effect/vitest": "catalog:",
|
||||
"@pierre/trees": "1.0.0-beta.4",
|
||||
"@types/react": "~19.2.0",
|
||||
"@types/react": "~19.3.0",
|
||||
"@types/react-dom": "~19.2.3",
|
||||
"babel-preset-expo": "~57.0.9",
|
||||
"babel-preset-expo": "~58.0.6",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
const { withAppDelegate, withInfoPlist } = require("expo/config-plugins");
|
||||
|
||||
const SCENE_DELEGATE = `
|
||||
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func scene(
|
||||
_ scene: UIScene,
|
||||
willConnectTo session: UISceneSession,
|
||||
options connectionOptions: UIScene.ConnectionOptions
|
||||
) {
|
||||
guard
|
||||
let windowScene = scene as? UIWindowScene,
|
||||
let appDelegate = UIApplication.shared.delegate as? AppDelegate
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
let appWindow: UIWindow
|
||||
if let existingWindow = appDelegate.window {
|
||||
appWindow = existingWindow
|
||||
} else {
|
||||
appWindow = UIWindow(windowScene: windowScene)
|
||||
appDelegate.window = appWindow
|
||||
appDelegate.reactNativeFactory?.startReactNative(
|
||||
withModuleName: "main",
|
||||
in: appWindow,
|
||||
launchOptions: appDelegate.sceneLaunchOptions)
|
||||
appDelegate.sceneLaunchOptions = nil
|
||||
}
|
||||
|
||||
window = appWindow
|
||||
appWindow.windowScene = windowScene
|
||||
appWindow.makeKeyAndVisible()
|
||||
|
||||
if let url = connectionOptions.urlContexts.first?.url {
|
||||
_ = appDelegate.application(UIApplication.shared, open: url, options: [:])
|
||||
}
|
||||
|
||||
if let userActivity = connectionOptions.userActivities.first {
|
||||
_ = appDelegate.application(
|
||||
UIApplication.shared,
|
||||
continue: userActivity,
|
||||
restorationHandler: { _ in })
|
||||
}
|
||||
}
|
||||
|
||||
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
|
||||
guard
|
||||
let url = URLContexts.first?.url,
|
||||
let appDelegate = UIApplication.shared.delegate as? AppDelegate
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
_ = appDelegate.application(UIApplication.shared, open: url, options: [:])
|
||||
}
|
||||
|
||||
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
|
||||
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
|
||||
return
|
||||
}
|
||||
|
||||
_ = appDelegate.application(
|
||||
UIApplication.shared,
|
||||
continue: userActivity,
|
||||
restorationHandler: { _ in })
|
||||
}
|
||||
}`;
|
||||
|
||||
module.exports = function withIosSceneLifecycle(config) {
|
||||
config = withInfoPlist(config, (nextConfig) => {
|
||||
nextConfig.modResults.UIApplicationSceneManifest = {
|
||||
UIApplicationSupportsMultipleScenes: false,
|
||||
UISceneConfigurations: {
|
||||
UIWindowSceneSessionRoleApplication: [
|
||||
{
|
||||
UISceneConfigurationName: "Default Configuration",
|
||||
UISceneDelegateClassName: "$(PRODUCT_MODULE_NAME).SceneDelegate",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
return nextConfig;
|
||||
});
|
||||
|
||||
return withAppDelegate(config, (nextConfig) => {
|
||||
if (nextConfig.modResults.language !== "swift") {
|
||||
throw new Error("The iOS scene lifecycle plugin requires a Swift AppDelegate.");
|
||||
}
|
||||
|
||||
// Creating the window before a scene exists leaves iOS share scenes with
|
||||
// incorrect geometry, even if windowScene is assigned afterward.
|
||||
const startup =
|
||||
/window = UIWindow\(frame: UIScreen\.main\.bounds\)\s+factory\.startReactNative\(\s+withModuleName: "main",\s+in: window,\s+launchOptions: launchOptions\)/;
|
||||
if (startup.test(nextConfig.modResults.contents)) {
|
||||
nextConfig.modResults.contents = nextConfig.modResults.contents.replace(
|
||||
startup,
|
||||
"sceneLaunchOptions = launchOptions",
|
||||
);
|
||||
} else if (!nextConfig.modResults.contents.includes("sceneLaunchOptions = launchOptions")) {
|
||||
throw new Error("Could not move React Native startup into the iOS scene lifecycle.");
|
||||
}
|
||||
if (!nextConfig.modResults.contents.includes("var sceneLaunchOptions:")) {
|
||||
nextConfig.modResults.contents = nextConfig.modResults.contents.replace(
|
||||
"var window: UIWindow?",
|
||||
"var window: UIWindow?\n var sceneLaunchOptions: [UIApplication.LaunchOptionsKey: Any]?",
|
||||
);
|
||||
}
|
||||
if (!nextConfig.modResults.contents.includes("class SceneDelegate:")) {
|
||||
nextConfig.modResults.contents += SCENE_DELEGATE;
|
||||
} else {
|
||||
nextConfig.modResults.contents = nextConfig.modResults.contents.replace(
|
||||
"in: appWindow,\n launchOptions: nil)",
|
||||
"in: appWindow,\n launchOptions: appDelegate.sceneLaunchOptions)\n appDelegate.sceneLaunchOptions = nil",
|
||||
);
|
||||
}
|
||||
|
||||
return nextConfig;
|
||||
});
|
||||
};
|
||||
@@ -1,58 +0,0 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import withIosSceneLifecycle from "./withIosSceneLifecycle.cjs";
|
||||
|
||||
const appDelegate = `class AppDelegate: ExpoAppDelegate {
|
||||
var window: UIWindow?
|
||||
func application() {
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
factory.startReactNative(
|
||||
withModuleName: "main",
|
||||
in: window,
|
||||
launchOptions: launchOptions)
|
||||
}
|
||||
}`;
|
||||
|
||||
async function transform(contents) {
|
||||
const config = withIosSceneLifecycle({ name: "Test", slug: "test" });
|
||||
const result = await config.mods.ios.appDelegate({
|
||||
...config,
|
||||
modRequest: { platform: "ios", modName: "appDelegate", introspect: false },
|
||||
modResults: { language: "swift", contents },
|
||||
});
|
||||
return result.modResults.contents;
|
||||
}
|
||||
|
||||
describe("iOS scene lifecycle generation", () => {
|
||||
it("creates the window in the scene before starting React Native and retains launch options", async () => {
|
||||
const result = await transform(appDelegate);
|
||||
const [startup, scene] = result.split("class SceneDelegate:");
|
||||
expect(startup).not.toContain("UIWindow(frame:");
|
||||
expect(startup).not.toContain("startReactNative(");
|
||||
expect(startup).toContain("sceneLaunchOptions = launchOptions");
|
||||
expect(scene.indexOf("UIWindow(windowScene: windowScene)")).toBeLessThan(
|
||||
scene.indexOf("startReactNative("),
|
||||
);
|
||||
expect(scene).toContain("launchOptions: appDelegate.sceneLaunchOptions)");
|
||||
expect(scene).toContain("appDelegate.sceneLaunchOptions = nil");
|
||||
});
|
||||
|
||||
it("does not duplicate startup or scene code on subsequent prebuilds", async () => {
|
||||
const generated = await transform(appDelegate);
|
||||
expect(await transform(generated)).toBe(generated);
|
||||
});
|
||||
|
||||
it("updates the previously generated scene delegate", async () => {
|
||||
const generated = await transform(appDelegate);
|
||||
const oldScene = generated
|
||||
.slice(generated.indexOf("class SceneDelegate:"))
|
||||
.replace("launchOptions: appDelegate.sceneLaunchOptions)", "launchOptions: nil)")
|
||||
.replace(" appDelegate.sceneLaunchOptions = nil\n", "");
|
||||
expect(await transform(`${appDelegate}\n\n${oldScene}`)).toBe(generated);
|
||||
});
|
||||
|
||||
it("fails visibly when the Expo startup template changes", async () => {
|
||||
await expect(transform("class AppDelegate: ExpoAppDelegate {}")).rejects.toThrow(
|
||||
"Could not move React Native startup",
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -76,10 +76,7 @@ function AppContent() {
|
||||
<GestureHandlerRootView className="flex-1">
|
||||
<KeyboardProvider statusBarTranslucent>
|
||||
<SafeAreaProvider>
|
||||
<StatusBar
|
||||
barStyle={themeAppearance === "dark" ? "light-content" : "dark-content"}
|
||||
translucent
|
||||
/>
|
||||
<StatusBar barStyle={themeAppearance === "dark" ? "light-content" : "dark-content"} />
|
||||
{/* The navigation theme drives the NATIVE header appearance: native-stack
|
||||
forwards `dark` as the nav bar's overrideUserInterfaceStyle. Without
|
||||
this, React Navigation defaults to its light theme and every native
|
||||
|
||||
@@ -520,7 +520,12 @@ function RootStackLayout(props: {
|
||||
const navigation = useNavigation();
|
||||
const { pendingShare } = useIncomingShare();
|
||||
const sharePresentationRef = useRef(EMPTY_INCOMING_SHARE_PRESENTATION_STATE);
|
||||
useAgentNotificationNavigation();
|
||||
// Keyboard commands follow the top route; notification suppression follows
|
||||
// the thread beneath overlay sheets.
|
||||
const path = getPathFromState(props.state, navigationPathConfig);
|
||||
const pathname = path.startsWith("/") ? path : `/${path}`;
|
||||
const workspaceLocation = workspaceLocationFromState(props.state);
|
||||
useAgentNotificationNavigation(workspaceLocation.pathname);
|
||||
// Presents the T3 Connect onboarding sheet after an in-session sign-in.
|
||||
useConnectOnboardingNavigation();
|
||||
// Launcher app shortcuts: routes shortcut taps and tracks opened threads.
|
||||
@@ -540,11 +545,6 @@ function RootStackLayout(props: {
|
||||
params: { incomingShareId: transition.shareIdToPresent },
|
||||
});
|
||||
}, [navigation, pendingShare, props.state]);
|
||||
// Full pathname (sheets included) for keyboard-command scoping; the
|
||||
// workspace layout only reacts to the underlying non-overlay route.
|
||||
const path = getPathFromState(props.state, navigationPathConfig);
|
||||
const pathname = path.startsWith("/") ? path : `/${path}`;
|
||||
const workspaceLocation = workspaceLocationFromState(props.state);
|
||||
|
||||
return (
|
||||
<HardwareKeyboardCommandProvider pathname={pathname}>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { MenuAction, MenuComponentProps } from "@react-native-menu/menu";
|
||||
import type { ReactNode } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import type { StyleProp, ViewStyle } from "react-native";
|
||||
import type { StyleProp, ViewInstance, ViewStyle } from "react-native";
|
||||
import { BackHandler, Pressable, ScrollView, View } from "react-native";
|
||||
import { useKeyboardState } from "react-native-keyboard-controller";
|
||||
import Animated, { FadeIn } from "react-native-reanimated";
|
||||
@@ -73,8 +73,8 @@ export function AndroidAnchoredMenu(props: AndroidAnchoredMenuProps) {
|
||||
overlay === null
|
||||
? desiredMenuWidth
|
||||
: Math.min(desiredMenuWidth, Math.max(0, overlay.width - 2 * SCREEN_MARGIN));
|
||||
const anchorRef = useRef<View>(null);
|
||||
const overlayRef = useRef<View>(null);
|
||||
const anchorRef = useRef<ViewInstance>(null);
|
||||
const overlayRef = useRef<ViewInstance>(null);
|
||||
|
||||
const keyboardVisible = useKeyboardState((state) => state.isVisible);
|
||||
const keyboardHeight = useKeyboardState((state) => state.height);
|
||||
|
||||
@@ -2,6 +2,7 @@ import {
|
||||
Platform,
|
||||
Text as RNText,
|
||||
TextInput as RNTextInput,
|
||||
type TextInputInstance,
|
||||
type TextInputProps as RNTextInputProps,
|
||||
type TextProps as RNTextProps,
|
||||
} from "react-native";
|
||||
@@ -26,7 +27,7 @@ export function AppText({ className, ...props }: AppTextProps) {
|
||||
|
||||
export type AppTextInputProps = Omit<RNTextInputProps, "placeholderTextColor"> & {
|
||||
readonly className?: string;
|
||||
readonly ref?: React.Ref<RNTextInput>;
|
||||
readonly ref?: React.Ref<TextInputInstance>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -127,7 +127,7 @@ async function materializeDataUrlPreview(id: string, dataUrl: string): Promise<s
|
||||
const file = new File(directory, `${id}.${extension}`);
|
||||
if (!file.exists) {
|
||||
file.create();
|
||||
file.write(dataUrl.slice(comma + 1), { encoding: "base64" });
|
||||
await file.write(dataUrl.slice(comma + 1), { encoding: "base64" });
|
||||
}
|
||||
return file.uri;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { GlassView, isGlassEffectAPIAvailable } from "expo-glass-effect";
|
||||
import type { ReactNode, Ref } from "react";
|
||||
import { Platform, View, type ColorValue, type ViewProps, type ViewStyle } from "react-native";
|
||||
import {
|
||||
Platform,
|
||||
View,
|
||||
type ColorValue,
|
||||
type ViewInstance,
|
||||
type ViewProps,
|
||||
type ViewStyle,
|
||||
} from "react-native";
|
||||
import { withUniwind } from "uniwind";
|
||||
|
||||
import { cn } from "../lib/cn";
|
||||
@@ -14,7 +21,7 @@ const ThemedGlassView = withUniwind(GlassView, {
|
||||
});
|
||||
|
||||
interface GlassSurfaceProps extends ViewProps {
|
||||
readonly ref?: Ref<View>;
|
||||
readonly ref?: Ref<ViewInstance>;
|
||||
readonly children: ReactNode;
|
||||
readonly glassEffectStyle?: "clear" | "regular" | "none";
|
||||
readonly tintColor?: ColorValue;
|
||||
|
||||
@@ -15,7 +15,7 @@ export function LoadingScreen(props: {
|
||||
|
||||
return (
|
||||
<View className="flex-1 bg-screen" style={{ paddingTop: insets.top }}>
|
||||
<StatusBar barStyle={colorScheme === "dark" ? "light-content" : "dark-content"} translucent />
|
||||
<StatusBar barStyle={colorScheme === "dark" ? "light-content" : "dark-content"} />
|
||||
<View className="flex-1 items-center justify-center gap-5 px-6">
|
||||
<BrandMark compact />
|
||||
{messagePlacement === "above-spinner" ? (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RefObject } from "react";
|
||||
import { Pressable, TextInput, View } from "react-native";
|
||||
import { Pressable, TextInput, type TextInputInstance, View } from "react-native";
|
||||
|
||||
import { SymbolView } from "./AppSymbol";
|
||||
import { useAndroidControlSizing } from "./useAndroidControlSizing";
|
||||
@@ -12,7 +12,7 @@ export function MaterialSearchField({
|
||||
value,
|
||||
onChangeText,
|
||||
}: {
|
||||
readonly inputRef: RefObject<TextInput | null>;
|
||||
readonly inputRef: RefObject<TextInputInstance | null>;
|
||||
readonly accessibilityLabel: string;
|
||||
readonly clearAccessibilityLabel: string;
|
||||
readonly placeholder: string;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { BackHandler, Keyboard, Pressable, TextInput, View } from "react-native";
|
||||
import {
|
||||
BackHandler,
|
||||
Keyboard,
|
||||
Pressable,
|
||||
TextInput,
|
||||
type TextInputInstance,
|
||||
View,
|
||||
} from "react-native";
|
||||
import { useMaterialToolbarLayout } from "./useMaterialToolbarLayout";
|
||||
import { NativeStackScreenOptions } from "../native/StackHeader";
|
||||
import { AndroidWorkspaceSidebarButton } from "../features/layout/workspace-sidebar-toolbar";
|
||||
@@ -18,7 +25,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
|
||||
const { paddingTop, paddingBottom } = useMaterialToolbarLayout();
|
||||
const { scale, buttonSize, iconSize, smallIconSize } = useAndroidControlSizing();
|
||||
const { themeVariables } = useAppearancePreferences();
|
||||
const inputRef = useRef<TextInput>(null);
|
||||
const inputRef = useRef<TextInputInstance>(null);
|
||||
const [searchOpen, setSearchOpen] = useState(false);
|
||||
const searching = search !== undefined && (searchOpen || search.value.length > 0);
|
||||
const onSearchChange = search?.onChangeText;
|
||||
|
||||
@@ -14,7 +14,7 @@ import * as Queue from "effect/Queue";
|
||||
import * as Schedule from "effect/Schedule";
|
||||
import * as Stream from "effect/Stream";
|
||||
import * as SubscriptionRef from "effect/SubscriptionRef";
|
||||
import { AppState, type AppStateStatus } from "react-native";
|
||||
import { AppState } from "react-native";
|
||||
|
||||
import * as MobileStorage from "../persistence/mobile-storage";
|
||||
import {
|
||||
@@ -27,8 +27,10 @@ const REPORT_INTERVAL_MS = 25_000;
|
||||
const LEASE_TTL_MS = 45_000;
|
||||
const BASELINE_SCOPES: ReadonlyArray<BackgroundScope> = [{ type: "provider-status" }];
|
||||
|
||||
// `AppState.currentState` is a loosely typed string that can be unset before
|
||||
// the first change event; anything outside the known states reports as unknown.
|
||||
function normalizeAppState(
|
||||
state: AppStateStatus,
|
||||
state: string | null | undefined,
|
||||
): NonNullable<ClientActivityReportInput["appState"]> {
|
||||
if (state === "active" || state === "inactive" || state === "background") return state;
|
||||
return "unknown";
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import type { Notification } from "expo-notifications";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { foregroundNotificationBehavior } from "./foregroundNotificationBehavior";
|
||||
import { threadDeepLinkOnScreen } from "./notificationPayload";
|
||||
|
||||
function notificationWithData(data: Record<string, unknown>): Notification {
|
||||
return {
|
||||
date: 0,
|
||||
request: { identifier: "notification-1", content: { data }, trigger: null },
|
||||
} as unknown as Notification;
|
||||
}
|
||||
|
||||
describe("threadDeepLinkOnScreen", () => {
|
||||
it("maps a thread route and its nested screens to the thread deep link", () => {
|
||||
expect(threadDeepLinkOnScreen("/threads/env-1/thread-1")).toBe("/threads/env-1/thread-1");
|
||||
expect(threadDeepLinkOnScreen("/threads/env-1/thread-1/files/src")).toBe(
|
||||
"/threads/env-1/thread-1",
|
||||
);
|
||||
});
|
||||
|
||||
it("returns null outside a thread", () => {
|
||||
expect(threadDeepLinkOnScreen("/")).toBeNull();
|
||||
expect(threadDeepLinkOnScreen("/settings")).toBeNull();
|
||||
expect(threadDeepLinkOnScreen("/threads/env-1")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("foregroundNotificationBehavior", () => {
|
||||
it("suppresses a notification for the thread already on screen", () => {
|
||||
const behavior = foregroundNotificationBehavior(
|
||||
notificationWithData({ environmentId: "env-1", threadId: "thread-1" }),
|
||||
"/threads/env-1/thread-1",
|
||||
);
|
||||
expect(behavior.shouldShowBanner).toBe(false);
|
||||
expect(behavior.shouldShowList).toBe(false);
|
||||
expect(behavior.shouldPlaySound).toBe(false);
|
||||
});
|
||||
|
||||
it("shows a notification for another thread", () => {
|
||||
const behavior = foregroundNotificationBehavior(
|
||||
notificationWithData({ deepLink: "/threads/env-1/thread-2" }),
|
||||
"/threads/env-1/thread-1",
|
||||
);
|
||||
expect(behavior.shouldShowBanner).toBe(true);
|
||||
expect(behavior.shouldShowList).toBe(true);
|
||||
});
|
||||
|
||||
it("shows a notification when no thread is open or the payload has no target", () => {
|
||||
expect(
|
||||
foregroundNotificationBehavior(
|
||||
notificationWithData({ environmentId: "env-1", threadId: "thread-1" }),
|
||||
null,
|
||||
).shouldShowBanner,
|
||||
).toBe(true);
|
||||
expect(
|
||||
foregroundNotificationBehavior(notificationWithData({}), "/threads/env-1/thread-1")
|
||||
.shouldShowBanner,
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Notification, NotificationBehavior } from "expo-notifications";
|
||||
|
||||
import { extractAgentNotificationDeepLink } from "./notificationPayload";
|
||||
|
||||
const SHOW: NotificationBehavior = {
|
||||
shouldShowBanner: true,
|
||||
shouldShowList: true,
|
||||
shouldPlaySound: true,
|
||||
shouldSetBadge: false,
|
||||
};
|
||||
|
||||
const SUPPRESS: NotificationBehavior = {
|
||||
shouldShowBanner: false,
|
||||
shouldShowList: false,
|
||||
shouldPlaySound: false,
|
||||
shouldSetBadge: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Decides how a notification that arrives while the app is open is presented.
|
||||
* A notification for the thread already on screen is redundant with the live
|
||||
* feed, so it stays silent; everything else banners like it would in the
|
||||
* background. `deepLinkOnScreen` is the normalized `/threads/:env/:thread`
|
||||
* path of the current route, or null when no thread is open.
|
||||
*/
|
||||
export function foregroundNotificationBehavior(
|
||||
notification: Notification,
|
||||
deepLinkOnScreen: string | null,
|
||||
): NotificationBehavior {
|
||||
const target = extractAgentNotificationDeepLink({ notification });
|
||||
if (target !== null && target === deepLinkOnScreen) {
|
||||
return SUPPRESS;
|
||||
}
|
||||
return SHOW;
|
||||
}
|
||||
@@ -2,12 +2,27 @@ import { useEffect, useRef } from "react";
|
||||
import * as Notifications from "expo-notifications";
|
||||
import { useLinkTo } from "@react-navigation/native";
|
||||
|
||||
import { routeAgentNotificationResponseOnce } from "./notificationPayload";
|
||||
import { foregroundNotificationBehavior } from "./foregroundNotificationBehavior";
|
||||
import { routeAgentNotificationResponseOnce, threadDeepLinkOnScreen } from "./notificationPayload";
|
||||
import { consumeLastAgentNotificationResponse } from "./notificationResponseConsumer";
|
||||
|
||||
export function useAgentNotificationNavigation(): void {
|
||||
export function useAgentNotificationNavigation(pathname: string): void {
|
||||
const linkTo = useLinkTo();
|
||||
const handledResponseIds = useRef(new Set<string>());
|
||||
// Read through a ref so the native handler registered once below sees the
|
||||
// current route without re-registering on every navigation.
|
||||
const deepLinkOnScreen = useRef<string | null>(null);
|
||||
deepLinkOnScreen.current = threadDeepLinkOnScreen(pathname);
|
||||
|
||||
useEffect(() => {
|
||||
Notifications.setNotificationHandler({
|
||||
handleNotification: (notification) =>
|
||||
Promise.resolve(foregroundNotificationBehavior(notification, deepLinkOnScreen.current)),
|
||||
});
|
||||
return () => {
|
||||
Notifications.setNotificationHandler(null);
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleResponse = (response: Notifications.NotificationResponse): void => {
|
||||
|
||||
@@ -69,6 +69,19 @@ function normalizeThreadDeepLink(value: string): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The deep link a notification would have to carry to target the thread the
|
||||
* given route is showing, including its nested screens such as the file
|
||||
* inspector. Null when the route is not inside a thread.
|
||||
*/
|
||||
export function threadDeepLinkOnScreen(pathname: string): string | null {
|
||||
const match = /^\/threads\/([^/]+)\/([^/]+)(?:\/|$)/.exec(pathname);
|
||||
if (!match?.[1] || !match[2]) {
|
||||
return null;
|
||||
}
|
||||
return `/threads/${match[1]}/${match[2]}`;
|
||||
}
|
||||
|
||||
export function extractAgentNotificationDeepLink(response: unknown): string | null {
|
||||
const data = dataFromNotificationResponse(response);
|
||||
const deepLink = data?.deepLink;
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
useWindowDimensions,
|
||||
View,
|
||||
} from "react-native";
|
||||
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
||||
import { GestureDetector, useNativeGesture } from "react-native-gesture-handler";
|
||||
import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
|
||||
|
||||
import { AppText as Text } from "../../components/AppText";
|
||||
@@ -185,9 +185,7 @@ function ArchivedThreadRow(props: {
|
||||
readonly onDelete: () => void;
|
||||
readonly onSwipeableClose: (methods: SwipeableMethods) => void;
|
||||
readonly onSwipeableWillOpen: (methods: SwipeableMethods) => void;
|
||||
readonly simultaneousSwipeGesture?: ComponentProps<
|
||||
typeof ThreadSwipeable
|
||||
>["simultaneousWithExternalGesture"];
|
||||
readonly simultaneousSwipeGesture?: ComponentProps<typeof ThreadSwipeable>["simultaneousWith"];
|
||||
readonly onUnarchive: () => void;
|
||||
readonly thread: EnvironmentThreadShell;
|
||||
}) {
|
||||
@@ -221,7 +219,7 @@ function ArchivedThreadRow(props: {
|
||||
label: "Unarchive",
|
||||
onPress: props.onUnarchive,
|
||||
}}
|
||||
simultaneousWithExternalGesture={props.simultaneousSwipeGesture}
|
||||
simultaneousWith={props.simultaneousSwipeGesture}
|
||||
threadTitle={props.thread.title}
|
||||
>
|
||||
{() => (
|
||||
@@ -303,7 +301,7 @@ export function ArchivedThreadsScreen(props: {
|
||||
}) {
|
||||
const { onDeleteThread, onUnarchiveThread } = props;
|
||||
const openSwipeableRef = useRef<SwipeableMethods | null>(null);
|
||||
const archiveScrollGesture = useMemo(() => Gesture.Native(), []);
|
||||
const archiveScrollGesture = useNativeGesture();
|
||||
const environmentLabelsById = useMemo(
|
||||
() =>
|
||||
new Map(
|
||||
|
||||
@@ -13,13 +13,7 @@ import {
|
||||
} from "@t3tools/contracts";
|
||||
import { useAtomValue } from "@effect/atom-react";
|
||||
import { useCallback, useState } from "react";
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Pressable,
|
||||
type NativeSyntheticEvent,
|
||||
type TextLayoutEventData,
|
||||
View,
|
||||
} from "react-native";
|
||||
import { ActivityIndicator, Pressable, type TextLayoutEvent, View } from "react-native";
|
||||
|
||||
import { AppText as Text } from "../../components/AppText";
|
||||
import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
|
||||
@@ -334,7 +328,7 @@ function CloudEnvironmentRowShell(props: {
|
||||
const isErrorExpanded = errorCanExpand && props.errorExpanded;
|
||||
const StatusContainer = errorCanExpand ? Pressable : View;
|
||||
const onMeasuredErrorTextLayout = useCallback(
|
||||
(event: NativeSyntheticEvent<TextLayoutEventData>) => {
|
||||
(event: TextLayoutEvent) => {
|
||||
if (!props.connectionError) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ function DeviceStreamDocumentView({
|
||||
readonly onStreaming: () => void;
|
||||
readonly onRecoverProcess: () => boolean;
|
||||
}) {
|
||||
const webView = useRef<WebView>(null);
|
||||
const webView = useRef<WebView<object>>(null);
|
||||
const active = useRef(true);
|
||||
const failed = useRef(false);
|
||||
const [status, setStatus] = useState<DeviceStreamStatus>("connecting");
|
||||
@@ -148,7 +148,7 @@ function DeviceStreamDocumentView({
|
||||
};
|
||||
return (
|
||||
<View className="flex-1" style={{ backgroundColor: background }}>
|
||||
<WebView
|
||||
<WebView<object>
|
||||
ref={webView}
|
||||
source={source}
|
||||
originWhitelist={["*"]}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
|
||||
import { BackHandler, Keyboard, type TextInput, View } from "react-native";
|
||||
import { BackHandler, Keyboard, type TextInputInstance, View } from "react-native";
|
||||
|
||||
import { AndroidHeaderIconButton, AndroidScreenHeader } from "../../components/AndroidScreenHeader";
|
||||
import { AndroidAnchoredMenu } from "../../components/AndroidAnchoredMenu";
|
||||
@@ -16,7 +16,7 @@ export function MaterialFilesHeader(props: {
|
||||
readonly leading?: ReactNode;
|
||||
}) {
|
||||
const { paddingTop, paddingBottom } = useMaterialToolbarLayout();
|
||||
const searchRef = useRef<TextInput>(null);
|
||||
const searchRef = useRef<TextInputInstance>(null);
|
||||
const [searchOpen, setSearchOpen] = useState(false);
|
||||
const searching = searchOpen || props.searchQuery.length > 0;
|
||||
const { onSearchQueryChange } = props;
|
||||
|
||||
@@ -309,8 +309,8 @@ export function HomeScreen(props: HomeScreenProps) {
|
||||
(event: GestureResponderEvent, started: boolean) => {
|
||||
const { changedTouches, touches } = event.nativeEvent;
|
||||
swipeRowActivation.trackTouches(
|
||||
started ? changedTouches.map((touch) => touch.identifier) : [],
|
||||
touches.map((touch) => touch.identifier),
|
||||
started ? changedTouches.map((touch) => String(touch.identifier)) : [],
|
||||
touches.map((touch) => String(touch.identifier)),
|
||||
);
|
||||
},
|
||||
[swipeRowActivation],
|
||||
@@ -945,7 +945,7 @@ export function HomeScreen(props: HomeScreenProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const listHeader = Platform.OS === "ios" ? null : <HomeTopContentSpacer />;
|
||||
const listHeader = Platform.OS === "ios" ? undefined : <HomeTopContentSpacer />;
|
||||
|
||||
// Project scoping lives in the header filter menu (no inline chip row on
|
||||
// mobile — the menu is the one filter surface).
|
||||
@@ -954,7 +954,7 @@ export function HomeScreen(props: HomeScreenProps) {
|
||||
// Use the v2 project scope for its empty state. Snoozed threads need no
|
||||
// special empty state: their shelf header is a list row even while collapsed.
|
||||
const v2ListEmpty =
|
||||
hasSearchQuery && threadSearch.isPending ? null : hasSearchQuery ? (
|
||||
hasSearchQuery && threadSearch.isPending ? undefined : hasSearchQuery ? (
|
||||
<EmptyState
|
||||
title="No results"
|
||||
detail={`No threads matching "${props.searchQuery}".`}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { useCallback, useEffect, useRef, useState, type ComponentProps } from "react";
|
||||
import { BackHandler, Keyboard, type TextInput, View, type LayoutChangeEvent } from "react-native";
|
||||
import {
|
||||
BackHandler,
|
||||
Keyboard,
|
||||
type TextInputInstance,
|
||||
View,
|
||||
type LayoutChangeEvent,
|
||||
} from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import type { MenuAction } from "@react-native-menu/menu";
|
||||
|
||||
@@ -33,7 +39,7 @@ export function MaterialThreadListToolbar(props: {
|
||||
const { height: toolbarHeight, ...headerPadding } = useMaterialToolbarLayout();
|
||||
const { state } = useWorkspaceState();
|
||||
const { onRequestVisibility, onSearchQueryChange } = props;
|
||||
const searchRef = useRef<TextInput>(null);
|
||||
const searchRef = useRef<TextInputInstance>(null);
|
||||
const [searchOpen, setSearchOpen] = useState(false);
|
||||
const searching = searchOpen || props.searchQuery.length > 0;
|
||||
const openSearch = useCallback(() => {
|
||||
|
||||
@@ -266,9 +266,7 @@ interface ThreadSwipeableProps {
|
||||
readonly resetKey?: string;
|
||||
/** Paints the row without swipe machinery; see swipe-row-activation. */
|
||||
readonly dormant?: boolean;
|
||||
readonly simultaneousWithExternalGesture?: ComponentProps<
|
||||
typeof ReanimatedSwipeable
|
||||
>["simultaneousWithExternalGesture"];
|
||||
readonly simultaneousWith?: ComponentProps<typeof ReanimatedSwipeable>["simultaneousWith"];
|
||||
readonly threadTitle: string;
|
||||
}
|
||||
|
||||
@@ -433,7 +431,7 @@ function ThreadSwipeableRow(props: ThreadSwipeableProps) {
|
||||
animationOptions={THREAD_SWIPE_SPRING}
|
||||
childrenContainerStyle={{ backgroundColor: props.backgroundColor }}
|
||||
containerStyle={[{ backgroundColor: props.backgroundColor }, props.containerStyle]}
|
||||
dragOffsetFromRightEdge={8}
|
||||
dragOffsetFromRight={-8}
|
||||
enabled={!isDismissing && props.enabled !== false && gateEnabled}
|
||||
enableTrackpadTwoFingerGesture={props.enableTrackpadSwipe ?? true}
|
||||
// Fail the swipe once the pan is vertically dominant (patched-in RNGH
|
||||
@@ -497,7 +495,7 @@ function ThreadSwipeableRow(props: ThreadSwipeableProps) {
|
||||
</Animated.View>
|
||||
)}
|
||||
rightThreshold={actionsWidth * 0.42}
|
||||
simultaneousWithExternalGesture={props.simultaneousWithExternalGesture}
|
||||
simultaneousWith={props.simultaneousWith}
|
||||
>
|
||||
{props.children(close)}
|
||||
</ReanimatedSwipeable>
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
TextInput,
|
||||
useWindowDimensions,
|
||||
View,
|
||||
type TextInputInstance,
|
||||
} from "react-native";
|
||||
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
@@ -151,7 +152,7 @@ export function CommandPalette(props: {
|
||||
const [visible, setVisible] = useState(true);
|
||||
const pendingAction = useRef<(() => void) | null>(null);
|
||||
const closing = useRef(false);
|
||||
const inputRef = useRef<TextInput>(null);
|
||||
const inputRef = useRef<TextInputInstance>(null);
|
||||
const listRef = useRef<FlatList<CommandPaletteItem>>(null);
|
||||
const { width, height } = useWindowDimensions();
|
||||
const searchEnvironmentIds = useMemo(
|
||||
|
||||
@@ -68,7 +68,7 @@ export async function writeIncomingShareDraft(draft: IncomingShareDraft): Promis
|
||||
if (!file.exists) {
|
||||
file.create({ intermediates: true, overwrite: true });
|
||||
}
|
||||
file.write(JSON.stringify(draft));
|
||||
await file.write(JSON.stringify(draft));
|
||||
} catch (cause) {
|
||||
throw new IncomingShareStorageError({ operation: "write", shareId: draft.id, cause });
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
View,
|
||||
type LayoutChangeEvent,
|
||||
type NativeSyntheticEvent,
|
||||
type TextInputInstance,
|
||||
type ViewProps,
|
||||
} from "react-native";
|
||||
|
||||
@@ -61,7 +62,7 @@ function estimateGridSize(input: {
|
||||
|
||||
const FallbackTerminalSurface = memo(function FallbackTerminalSurface(props: TerminalSurfaceProps) {
|
||||
const fontSize = props.fontSize ?? MOBILE_TYPOGRAPHY.label.fontSize;
|
||||
const inputRef = useRef<TextInput>(null);
|
||||
const inputRef = useRef<TextInputInstance>(null);
|
||||
const { themeAppearance, themeId } = useAppearancePreferences();
|
||||
const theme = props.theme ?? getMobileTerminalTheme(themeId, themeAppearance);
|
||||
const statusLabel = props.isRunning
|
||||
|
||||
@@ -139,7 +139,7 @@ export function CustomSnoozeSheet(props: {
|
||||
modifiers={[
|
||||
datePickerStyle("wheel"),
|
||||
labelsHidden(),
|
||||
frame({ maxWidth: Infinity, height: 180 }),
|
||||
frame({ maxWidth: Infinity, minHeight: 180, maxHeight: 180 }),
|
||||
]}
|
||||
/>
|
||||
) : (
|
||||
@@ -154,7 +154,7 @@ export function CustomSnoozeSheet(props: {
|
||||
modifiers={[
|
||||
pickerStyle("wheel"),
|
||||
labelsHidden(),
|
||||
frame({ minWidth: 0, maxWidth: Infinity, height: 180 }),
|
||||
frame({ minWidth: 0, maxWidth: Infinity, minHeight: 180, maxHeight: 180 }),
|
||||
clipped(),
|
||||
]}
|
||||
>
|
||||
@@ -177,7 +177,7 @@ export function CustomSnoozeSheet(props: {
|
||||
modifiers={[
|
||||
pickerStyle("wheel"),
|
||||
labelsHidden(),
|
||||
frame({ minWidth: 0, maxWidth: Infinity, height: 180 }),
|
||||
frame({ minWidth: 0, maxWidth: Infinity, minHeight: 180, maxHeight: 180 }),
|
||||
clipped(),
|
||||
]}
|
||||
>
|
||||
|
||||
@@ -47,6 +47,7 @@ import {
|
||||
useWindowDimensions,
|
||||
View,
|
||||
type GestureResponderEvent,
|
||||
type ViewInstance,
|
||||
} from "react-native";
|
||||
import {
|
||||
KeyboardController,
|
||||
@@ -321,7 +322,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
|
||||
const composerEditorRef = useRef<ComposerEditorHandle>(null);
|
||||
const draftMessageRef = useRef(props.draftMessage);
|
||||
draftMessageRef.current = props.draftMessage;
|
||||
const composerOverlayRef = useRef<View>(null);
|
||||
const composerOverlayRef = useRef<ViewInstance>(null);
|
||||
const listRef = useRef<LegendListRef>(null);
|
||||
const feedTouchStartRef = useRef<{ pageX: number; pageY: number } | null>(null);
|
||||
const selectedThreadKeyRef = useRef(selectedThreadKey);
|
||||
|
||||
@@ -14,9 +14,9 @@ import type { MenuAction } from "@react-native-menu/menu";
|
||||
import { useAtomValue } from "@effect/atom-react";
|
||||
import { type EnvironmentId, resolveEnvironmentMachineKind } from "@t3tools/contracts";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import type { LayoutChangeEvent } from "react-native";
|
||||
import type { LayoutChangeEvent, TextInputInstance } from "react-native";
|
||||
import { Platform, StyleSheet, TextInput, View } from "react-native";
|
||||
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
||||
import { GestureDetector, useNativeGesture } from "react-native-gesture-handler";
|
||||
import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import type { SearchBarCommands } from "react-native-screens";
|
||||
@@ -139,10 +139,10 @@ function ThreadNavigationSidebarPane(
|
||||
const threads = useThreadShells();
|
||||
const { environments: workspaceEnvironments, state: catalogState } = useWorkspaceState();
|
||||
const { savedConnectionsById } = useSavedRemoteConnections();
|
||||
const searchInputRef = useRef<TextInput>(null);
|
||||
const searchInputRef = useRef<TextInputInstance>(null);
|
||||
const searchBarRef = useRef<SearchBarCommands>(null);
|
||||
const openSwipeableRef = useRef<SwipeableMethods | null>(null);
|
||||
const sidebarScrollGesture = useMemo(() => Gesture.Native(), []);
|
||||
const sidebarScrollGesture = useNativeGesture();
|
||||
const {
|
||||
archiveThread,
|
||||
confirmDeleteThread,
|
||||
|
||||
@@ -523,9 +523,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
|
||||
readonly activationKey?: string;
|
||||
readonly searchMatch?: EnvironmentThreadSearchMatch;
|
||||
readonly searchQuery?: string;
|
||||
readonly simultaneousSwipeGesture?: ComponentProps<
|
||||
typeof ThreadSwipeable
|
||||
>["simultaneousWithExternalGesture"];
|
||||
readonly simultaneousSwipeGesture?: ComponentProps<typeof ThreadSwipeable>["simultaneousWith"];
|
||||
}) {
|
||||
const { width: windowWidth } = useWindowDimensions();
|
||||
const {
|
||||
@@ -1198,7 +1196,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
|
||||
primaryAction={primaryAction}
|
||||
secondaryAction={secondaryAction}
|
||||
resetKey={`${thread.environmentId}:${thread.id}:${variant}:${snoozedRow}:${thread.settledAt}:${thread.unsettledAt}:${thread.snoozedUntil}`}
|
||||
simultaneousWithExternalGesture={props.simultaneousSwipeGesture}
|
||||
simultaneousWith={props.simultaneousSwipeGesture}
|
||||
threadTitle={thread.title}
|
||||
>
|
||||
{(close) => (
|
||||
|
||||
@@ -14,6 +14,6 @@ export async function writeFileAtomically(file: File, contents: string): Promise
|
||||
tempFileSequence += 1;
|
||||
const temp = new FileConstructor(file.parentDirectory, `${file.name}.${tempFileSequence}.tmp`);
|
||||
temp.create({ intermediates: true, overwrite: true });
|
||||
temp.write(contents);
|
||||
await temp.write(contents);
|
||||
temp.moveSync(file, { overwrite: true });
|
||||
}
|
||||
@@ -276,7 +276,7 @@ async function uploadFileBytes(
|
||||
try {
|
||||
if (fileUri === undefined && inlineDataUrl !== undefined) {
|
||||
file.create();
|
||||
file.write(inlineDataUrl.slice(inlineDataUrl.indexOf(",") + 1), {
|
||||
await file.write(inlineDataUrl.slice(inlineDataUrl.indexOf(",") + 1), {
|
||||
encoding: "base64",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ export async function persistComposerAttachmentFile(
|
||||
try {
|
||||
let copiedBytes = 0;
|
||||
while (true) {
|
||||
const chunk = reader.readBytes(
|
||||
const chunk = await reader.readBytes(
|
||||
Math.min(ATTACHMENT_COPY_CHUNK_BYTES, maxBytes - copiedBytes + 1),
|
||||
);
|
||||
if (chunk.byteLength === 0) {
|
||||
@@ -171,7 +171,7 @@ export async function persistComposerAttachmentFile(
|
||||
if (copiedBytes > maxBytes) {
|
||||
throw new Error(fileAttachmentTooLargeMessage(name, maxBytes));
|
||||
}
|
||||
writer.writeBytes(chunk);
|
||||
await writer.writeBytes(chunk);
|
||||
}
|
||||
} finally {
|
||||
writer.close();
|
||||
|
||||
@@ -13,9 +13,12 @@ import {
|
||||
type Ref,
|
||||
} from "react";
|
||||
import type { NativeSyntheticEvent, StyleProp, ViewProps, ViewStyle } from "react-native";
|
||||
import { Image, StyleSheet } from "react-native";
|
||||
import { StyleSheet } from "react-native";
|
||||
|
||||
import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
|
||||
import {
|
||||
markdownFileIconSource,
|
||||
markdownIconAssetUri,
|
||||
} from "@t3tools/mobile-markdown-text/file-icons";
|
||||
import {
|
||||
composerChipSizeSuffix,
|
||||
contextChipPresentation,
|
||||
@@ -109,8 +112,8 @@ function basename(path: string): string {
|
||||
return separator >= 0 ? path.slice(separator + 1) : path;
|
||||
}
|
||||
|
||||
function fileIconUri(path: string): string {
|
||||
return Image.resolveAssetSource(markdownFileIconSource(resolveMarkdownFileIcon(path))).uri;
|
||||
function fileIconUri(path: string): string | null {
|
||||
return markdownIconAssetUri(markdownFileIconSource(resolveMarkdownFileIcon(path))) ?? null;
|
||||
}
|
||||
|
||||
export function ComposerEditor({
|
||||
|
||||
@@ -16,7 +16,10 @@ import {
|
||||
import type { NativeSyntheticEvent, ViewProps } from "react-native";
|
||||
import { Image, Platform, StyleSheet } from "react-native";
|
||||
|
||||
import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
|
||||
import {
|
||||
markdownFileIconSource,
|
||||
markdownIconAssetUri,
|
||||
} from "@t3tools/mobile-markdown-text/file-icons";
|
||||
import {
|
||||
composerChipSizeSuffix,
|
||||
contextChipPresentation,
|
||||
@@ -110,8 +113,8 @@ function basename(path: string): string {
|
||||
return separator >= 0 ? path.slice(separator + 1) : path;
|
||||
}
|
||||
|
||||
function fileIconUri(path: string): string {
|
||||
return Image.resolveAssetSource(markdownFileIconSource(resolveMarkdownFileIcon(path))).uri;
|
||||
function fileIconUri(path: string): string | null {
|
||||
return markdownIconAssetUri(markdownFileIconSource(resolveMarkdownFileIcon(path))) ?? null;
|
||||
}
|
||||
|
||||
export function ComposerEditor({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TextInputWrapper } from "expo-paste-input";
|
||||
import { useImperativeHandle, useRef } from "react";
|
||||
import { TextInput, type TextInput as RNTextInput } from "react-native";
|
||||
import { TextInput, type TextInputInstance } from "react-native";
|
||||
|
||||
import { useFontFamily } from "../lib/useFontFamily";
|
||||
import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole";
|
||||
@@ -21,7 +21,7 @@ export function ComposerEditor({
|
||||
readOnly = false,
|
||||
...props
|
||||
}: ComposerEditorProps) {
|
||||
const inputRef = useRef<RNTextInput>(null);
|
||||
const inputRef = useRef<TextInputInstance>(null);
|
||||
const bodyText = useScaledTextRole("body");
|
||||
const fontFamily = useFontFamily("regular");
|
||||
const handlePaste = useNativePaste((uris) => onPasteImages?.(uris));
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { NativeSyntheticEvent, ViewProps } from "react-native";
|
||||
|
||||
import type { HardwareKeyboardCommand } from "../features/keyboard/hardwareKeyboardCommands";
|
||||
|
||||
interface NativeKeyboardCommandsProps extends ViewProps, PropsWithChildren {
|
||||
interface NativeKeyboardCommandsProps extends ViewProps {
|
||||
readonly enabledCommands: ReadonlyArray<HardwareKeyboardCommand>;
|
||||
readonly onCommand: (
|
||||
event: NativeSyntheticEvent<{ readonly command: HardwareKeyboardCommand }>,
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { NativeSyntheticEvent, ViewProps } from "react-native";
|
||||
|
||||
import type { HardwareKeyboardCommand } from "../features/keyboard/hardwareKeyboardCommands";
|
||||
|
||||
interface NativeKeyboardCommandsProps extends ViewProps, PropsWithChildren {
|
||||
interface NativeKeyboardCommandsProps extends ViewProps {
|
||||
readonly enabledCommands: ReadonlyArray<HardwareKeyboardCommand>;
|
||||
readonly onCommand: (
|
||||
event: NativeSyntheticEvent<{ readonly command: HardwareKeyboardCommand }>,
|
||||
|
||||
@@ -29,7 +29,7 @@ function SubscriptionUsage(
|
||||
// The extension evaluates this function without the app's module scope.
|
||||
const family = environment.widgetFamily;
|
||||
// Gallery snapshots can render an old timeline entry after it has expired.
|
||||
const now = Math.max(environment.date.getTime(), Date.now());
|
||||
const now = Math.max(environment.date?.getTime() ?? 0, Date.now());
|
||||
const accessory = family === "accessoryRectangular";
|
||||
const compact =
|
||||
family === "systemSmall" || accessory || environment.levelOfDetail === "simplified";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "expo/tsconfig.base",
|
||||
"extends": "expo/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"allowImportingTsExtensions": true,
|
||||
"strict": true,
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
"@types/compression": "^1.8.1",
|
||||
"@types/culori": "^4.0.1",
|
||||
"@types/mdast": "^4.0.4",
|
||||
"@types/react": "~19.2.14",
|
||||
"@types/react": "~19.3.0",
|
||||
"@types/react-dom": "~19.2.3",
|
||||
"@types/react-test-renderer": "19.1.0",
|
||||
"@vercel/config": "^0.3.0",
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
diff --git a/android/build.gradle b/android/build.gradle
|
||||
index 6bd6d5acf6ac3da78232170a6ea8c2b0f6e5504e..a827dad53dcd8c1b2f47fce30ea8bf9140787f38 100644
|
||||
--- a/android/build.gradle
|
||||
+++ b/android/build.gradle
|
||||
@@ -146,6 +146,12 @@ dependencies {
|
||||
implementation "androidx.activity:activity-compose:$activityComposeVersion"
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycleVersion"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion"
|
||||
+ // ClerkComposeNativeViewHost imports LocalSavedStateRegistryOwner and
|
||||
+ // LocalLifecycleOwner from these artifacts. Earlier SDKs leaked them onto
|
||||
+ // the compile classpath through clerk-android-ui's navigation3 runtime
|
||||
+ // dependency; AGP 9 resolves the compile classpath on its own.
|
||||
+ implementation "androidx.savedstate:savedstate-compose:1.4.0"
|
||||
+ implementation "androidx.lifecycle:lifecycle-runtime-compose:2.10.0"
|
||||
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
}
|
||||
diff --git a/ios/ClerkAuthNativeView.swift b/ios/ClerkAuthNativeView.swift
|
||||
index 5f8d2ba66d5b232890af75c22b173c86d2ef546b..b170304cbf2fbaae8032db8dd6f89b6a59c6e3fe 100644
|
||||
--- a/ios/ClerkAuthNativeView.swift
|
||||
|
||||
@@ -1,24 +1,10 @@
|
||||
diff --git a/build/serializer/sourceMap.js b/build/serializer/sourceMap.js
|
||||
index 547e53377a7c560db8dfd983601606de15896e07..29a0c855088bceacb7ba00a627615539cbf37738 100644
|
||||
index 2a58f57..a90ce77 100644
|
||||
--- a/build/serializer/sourceMap.js
|
||||
+++ b/build/serializer/sourceMap.js
|
||||
@@ -27,6 +27,13 @@ function loadSourcemapCodec() {
|
||||
}
|
||||
return _sourcemapCodec;
|
||||
}
|
||||
+let _traceMapping;
|
||||
+function loadTraceMapping() {
|
||||
+ if (!_traceMapping) {
|
||||
+ _traceMapping = require('@jridgewell/trace-mapping');
|
||||
+ }
|
||||
+ return _traceMapping;
|
||||
+}
|
||||
let _Generator;
|
||||
function loadGenerator() {
|
||||
if (!_Generator) {
|
||||
@@ -224,6 +231,58 @@ function repairInvalidNegativeIndices(map) {
|
||||
}
|
||||
return changed ? { ...map, mappings: encode(decoded) } : map;
|
||||
@@ -177,6 +177,58 @@ function repairInvalidNegativeIndices(map) {
|
||||
mappings: encode(decoded)
|
||||
} : map;
|
||||
}
|
||||
+// Hermes can emit mappings for Metro trailer/debug lines that have no
|
||||
+// corresponding Metro source-map line. @jridgewell/remapping assumes every
|
||||
@@ -72,11 +58,11 @@ index 547e53377a7c560db8dfd983601606de15896e07..29a0c855088bceacb7ba00a627615539
|
||||
+ }
|
||||
+ return sanitized;
|
||||
+}
|
||||
// `maps[0]` is the original-most transform; `maps[maps.length - 1]` is
|
||||
// the most recent. Built on `@jridgewell/remapping` instead of mozilla's
|
||||
// `SourceMapConsumer`-based composer.
|
||||
@@ -251,7 +310,7 @@ function composeSourceMaps(maps) {
|
||||
return { ...map, ignoreList: map.x_google_ignoreList };
|
||||
function composeSourceMaps(maps) {
|
||||
if (maps.length < 1) {
|
||||
throw new Error('composeSourceMaps: Expected at least one map');
|
||||
@@ -192,7 +244,7 @@ function composeSourceMaps(maps) {
|
||||
};
|
||||
});
|
||||
// Metro convention is original-first; remapping is most-recent first.
|
||||
- let input = normalized.slice().reverse();
|
||||
@@ -2,6 +2,14 @@ diff --git a/ios/MenuViewManager.mm b/ios/MenuViewManager.mm
|
||||
index 3d149b3e7426b8f7c999603ddf1e15e12331c33a..e80fe2caae86e339fcb03408419a7d64b3e5b04f 100644
|
||||
--- a/ios/MenuViewManager.mm
|
||||
+++ b/ios/MenuViewManager.mm
|
||||
@@ -1,6 +1,6 @@
|
||||
#import <React/RCTViewManager.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
-#import "RCTBridge.h"
|
||||
+#import <React/RCTBridge.h>
|
||||
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
// NEW ARCH
|
||||
@@ -65,6 +65,10 @@ - (UIView *)view
|
||||
* onOpenMenu: callback to be called when the menu is opened
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/ios/AudioRecorder.swift b/ios/AudioRecorder.swift
|
||||
index 20020bff9f8ba7bb6e7f61c99b4de5d29eee00db..284c22f12e30c8c2ed16feb141876cbfd8897c90 100644
|
||||
index 73c6a036be6c76e219774a8d1e1cc3a7f18e6f8e..edfbbe00c2b0f3544bcbe42d02b829bf310d241c 100644
|
||||
--- a/ios/AudioRecorder.swift
|
||||
+++ b/ios/AudioRecorder.swift
|
||||
@@ -216,15 +216,15 @@ class AudioRecorder: SharedRef<AVAudioRecorder>, RecordingResultHandler {
|
||||
@@ -268,16 +268,16 @@ class AudioRecorder: SharedRef<AVAudioRecorder>, RecordingResultHandler {
|
||||
}
|
||||
|
||||
func didFinish(_ recorder: AVAudioRecorder, successfully flag: Bool) {
|
||||
@@ -11,6 +11,7 @@ index 20020bff9f8ba7bb6e7f61c99b4de5d29eee00db..284c22f12e30c8c2ed16feb141876cbf
|
||||
+ // Update internal state when AVAudioRecorder finishes or fails.
|
||||
+ currentState = flag ? .stopped : .error
|
||||
resetDurationTracking()
|
||||
durationLimitSeconds = nil
|
||||
|
||||
emit(event: recordingStatus, payload: [
|
||||
"id": id,
|
||||
@@ -0,0 +1,57 @@
|
||||
diff --git a/build/BlurView.types.d.ts b/build/BlurView.types.d.ts
|
||||
index cc93ffe2cd398a73ac50ebbe5427cbe4187fd83b..7246e9ffbe67af7da4fed20e1e08d0768be812a3 100644
|
||||
--- a/build/BlurView.types.d.ts
|
||||
+++ b/build/BlurView.types.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RefObject } from 'react';
|
||||
-import type { ViewProps, View } from 'react-native';
|
||||
+import type { ViewProps, ViewInstance } from 'react-native';
|
||||
/**
|
||||
* Blur method to use on Android.
|
||||
*
|
||||
@@ -24,7 +24,7 @@ export type BlurViewProps = {
|
||||
*
|
||||
* @platform android
|
||||
*/
|
||||
- blurTarget?: RefObject<View | null>;
|
||||
+ blurTarget?: RefObject<ViewInstance | null>;
|
||||
/**
|
||||
* A tint mode which will be applied to the view.
|
||||
*
|
||||
@@ -68,6 +68,6 @@ export type BlurViewProps = {
|
||||
blurMethod?: BlurMethod;
|
||||
} & ViewProps;
|
||||
export type BlurTargetViewProps = {
|
||||
- ref?: RefObject<View | null>;
|
||||
+ ref?: RefObject<ViewInstance | null>;
|
||||
} & ViewProps;
|
||||
export type BlurTint = 'light' | 'dark' | 'default' | 'extraLight' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
||||
diff --git a/src/BlurView.types.ts b/src/BlurView.types.ts
|
||||
index b63ad6b3a9e30bd0f13cff322be79077d0cb5326..bdc3295af94bc17e8a6457b6c9567ff2d57799a7 100644
|
||||
--- a/src/BlurView.types.ts
|
||||
+++ b/src/BlurView.types.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RefObject } from 'react';
|
||||
-import type { ViewProps, View } from 'react-native';
|
||||
+import type { ViewProps, ViewInstance } from 'react-native';
|
||||
|
||||
/**
|
||||
* Blur method to use on Android.
|
||||
@@ -27,7 +27,7 @@ export type BlurViewProps = {
|
||||
*
|
||||
* @platform android
|
||||
*/
|
||||
- blurTarget?: RefObject<View | null>;
|
||||
+ blurTarget?: RefObject<ViewInstance | null>;
|
||||
/**
|
||||
* A tint mode which will be applied to the view.
|
||||
*
|
||||
@@ -74,7 +74,7 @@ export type BlurViewProps = {
|
||||
} & ViewProps;
|
||||
|
||||
export type BlurTargetViewProps = {
|
||||
- ref?: RefObject<View | null>;
|
||||
+ ref?: RefObject<ViewInstance | null>;
|
||||
} & ViewProps;
|
||||
|
||||
export type BlurTint =
|
||||
@@ -0,0 +1,72 @@
|
||||
diff --git a/build/GlassContainer.types.d.ts b/build/GlassContainer.types.d.ts
|
||||
index 502f9b037900d62aa5875dc37f0fcb517dec7a44..cc521dcb7e411cba7dfe99f191bbc42ac979849f 100644
|
||||
--- a/build/GlassContainer.types.d.ts
|
||||
+++ b/build/GlassContainer.types.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from 'react';
|
||||
-import type { View, ViewProps } from 'react-native';
|
||||
+import type { ViewInstance, ViewProps } from 'react-native';
|
||||
export type GlassContainerProps = {
|
||||
/**
|
||||
* The distance at which glass elements start affecting each other.
|
||||
@@ -7,5 +7,5 @@ export type GlassContainerProps = {
|
||||
* @default undefined
|
||||
*/
|
||||
spacing?: number;
|
||||
- ref?: Ref<View>;
|
||||
+ ref?: Ref<ViewInstance>;
|
||||
} & ViewProps;
|
||||
diff --git a/build/GlassView.types.d.ts b/build/GlassView.types.d.ts
|
||||
index a09487b1b3ef2e4d89b19e2bad81f99fc532d94d..eeadfff1dcd891bf581ef6be0493e2a6eda0849a 100644
|
||||
--- a/build/GlassView.types.d.ts
|
||||
+++ b/build/GlassView.types.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from 'react';
|
||||
-import type { ColorValue, View, ViewProps } from 'react-native';
|
||||
+import type { ColorValue, ViewInstance, ViewProps } from 'react-native';
|
||||
export type GlassStyle = 'clear' | 'regular' | 'none';
|
||||
export type GlassEffectStyleConfig = {
|
||||
/**
|
||||
@@ -40,5 +40,5 @@ export type GlassViewProps = {
|
||||
* @default 'auto'
|
||||
*/
|
||||
colorScheme?: GlassColorScheme;
|
||||
- ref?: Ref<View>;
|
||||
+ ref?: Ref<ViewInstance>;
|
||||
} & ViewProps;
|
||||
diff --git a/src/GlassContainer.types.ts b/src/GlassContainer.types.ts
|
||||
index f57a30713a4a2c1769e4f213a43d29fa17d8c411..fa934d45d488dcbc8cb6396e88f0a2996834367b 100644
|
||||
--- a/src/GlassContainer.types.ts
|
||||
+++ b/src/GlassContainer.types.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from 'react';
|
||||
-import type { View, ViewProps } from 'react-native';
|
||||
+import type { ViewInstance, ViewProps } from 'react-native';
|
||||
|
||||
export type GlassContainerProps = {
|
||||
/**
|
||||
@@ -8,5 +8,5 @@ export type GlassContainerProps = {
|
||||
* @default undefined
|
||||
*/
|
||||
spacing?: number;
|
||||
- ref?: Ref<View>;
|
||||
+ ref?: Ref<ViewInstance>;
|
||||
} & ViewProps;
|
||||
diff --git a/src/GlassView.types.ts b/src/GlassView.types.ts
|
||||
index 7fc30003a9337a12ffb12ffb44a050aae99e9b40..413db6b698055dd00d6ec2cf7b71e4370c85054c 100644
|
||||
--- a/src/GlassView.types.ts
|
||||
+++ b/src/GlassView.types.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from 'react';
|
||||
-import type { ColorValue, View, ViewProps } from 'react-native';
|
||||
+import type { ColorValue, ViewInstance, ViewProps } from 'react-native';
|
||||
|
||||
export type GlassStyle = 'clear' | 'regular' | 'none';
|
||||
|
||||
@@ -44,5 +44,5 @@ export type GlassViewProps = {
|
||||
* @default 'auto'
|
||||
*/
|
||||
colorScheme?: GlassColorScheme;
|
||||
- ref?: Ref<View>;
|
||||
+ ref?: Ref<ViewInstance>;
|
||||
} & ViewProps;
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/android/src/main/java/expo/modules/sharing/SharingRecords.kt b/android/src/main/java/expo/modules/sharing/SharingRecords.kt
|
||||
index 0b87b53f632e82f9b4c09c066d5a67e4ab2525a4..65f1c57faef3ba8caac9e137341f2b8312bb5f86 100644
|
||||
index 0b87b53..65f1c57 100644
|
||||
--- a/android/src/main/java/expo/modules/sharing/SharingRecords.kt
|
||||
+++ b/android/src/main/java/expo/modules/sharing/SharingRecords.kt
|
||||
@@ -52,7 +52,8 @@ enum class ContentType(val value: String) : Enumerable {
|
||||
@@ -13,7 +13,7 @@ index 0b87b53f632e82f9b4c09c066d5a67e4ab2525a4..65f1c57faef3ba8caac9e137341f2b83
|
||||
|
||||
@OptimizedRecord
|
||||
diff --git a/android/src/main/java/expo/modules/sharing/dataParsers/SimpleShareIntentDataParser.kt b/android/src/main/java/expo/modules/sharing/dataParsers/SimpleShareIntentDataParser.kt
|
||||
index 8dd50e8f04022d183884a57e4d61a7e1711b9e49..481cdb4bc64ea5ae49919071f686324f6d56d55c 100644
|
||||
index 8dd50e8..481cdb4 100644
|
||||
--- a/android/src/main/java/expo/modules/sharing/dataParsers/SimpleShareIntentDataParser.kt
|
||||
+++ b/android/src/main/java/expo/modules/sharing/dataParsers/SimpleShareIntentDataParser.kt
|
||||
@@ -3,6 +3,7 @@ package expo.modules.sharing
|
||||
@@ -89,10 +89,10 @@ index 8dd50e8f04022d183884a57e4d61a7e1711b9e49..481cdb4bc64ea5ae49919071f686324f
|
||||
}
|
||||
}
|
||||
diff --git a/build/Sharing.types.d.ts b/build/Sharing.types.d.ts
|
||||
index e9820b061bddce91657ab7144fde98d0543a3b8e..364d63273cb3e209c6490de6dd869a01c8728fcc 100644
|
||||
index 74544e0..92bd2f5 100644
|
||||
--- a/build/Sharing.types.d.ts
|
||||
+++ b/build/Sharing.types.d.ts
|
||||
@@ -77,6 +77,11 @@ export type SharePayload = {
|
||||
@@ -100,6 +100,11 @@ export type SharePayload = {
|
||||
* @default 'text/plain'
|
||||
*/
|
||||
mimeType?: string;
|
||||
@@ -105,10 +105,10 @@ index e9820b061bddce91657ab7144fde98d0543a3b8e..364d63273cb3e209c6490de6dd869a01
|
||||
export type BaseResolvedSharePayload = SharePayload & {
|
||||
/**
|
||||
diff --git a/src/Sharing.types.ts b/src/Sharing.types.ts
|
||||
index d9a5ad38f5fe2856b365eb91b71abd640314a5cc..21ea45f04b88cce272e2e02de24c5e4eb8157e82 100644
|
||||
index 18af320..3a52b70 100644
|
||||
--- a/src/Sharing.types.ts
|
||||
+++ b/src/Sharing.types.ts
|
||||
@@ -85,6 +85,12 @@ export type SharePayload = {
|
||||
@@ -108,6 +108,12 @@ export type SharePayload = {
|
||||
* @default 'text/plain'
|
||||
*/
|
||||
mimeType?: string;
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/build/Widgets.types.d.ts b/build/Widgets.types.d.ts
|
||||
index 15e026868625ce20a3e359e5cc8e5c7e937c4650..f5cc83174ede4fb6e01cbce494f61e088eb4eed8 100644
|
||||
index c9f4dfe..dc0792e 100644
|
||||
--- a/build/Widgets.types.d.ts
|
||||
+++ b/build/Widgets.types.d.ts
|
||||
@@ -90,6 +90,10 @@ export type LiveActivityEnvironment = {
|
||||
@@ -93,6 +93,10 @@ export type LiveActivityEnvironment = {
|
||||
* The color scheme of the activity's environment.
|
||||
*/
|
||||
colorScheme: 'light' | 'dark';
|
||||
@@ -14,27 +14,27 @@ index 15e026868625ce20a3e359e5cc8e5c7e937c4650..f5cc83174ede4fb6e01cbce494f61e08
|
||||
* Whether the activity is displayed in a context with reduced luminance.
|
||||
* @platform iOS 16+
|
||||
diff --git a/ios/Widgets/Utils.swift b/ios/Widgets/Utils.swift
|
||||
index 2b4c044b597de7e0fab42dbc47af14d8bb521838..801f0aed65ea2659f221d477dd841787d9146c26 100644
|
||||
index 76b2199..6cb52c3 100644
|
||||
--- a/ios/Widgets/Utils.swift
|
||||
+++ b/ios/Widgets/Utils.swift
|
||||
@@ -91,6 +91,10 @@ func getLiveActivityEnvironment(for environment: EnvironmentValues, in context:
|
||||
"colorScheme": "\(environment.colorScheme)"
|
||||
@@ -125,6 +125,10 @@ func getLiveActivityEnvironment(for environment: EnvironmentValues, in context:
|
||||
"isStale": context.isStale
|
||||
]
|
||||
|
||||
+ if #available(iOS 26.0, *) {
|
||||
+ env["isLiquidGlassAvailable"] = true
|
||||
+ }
|
||||
+ env["widgetRenderingMode"] = environment.widgetRenderingMode.description
|
||||
env["isLuminanceReduced"] = environment.isLuminanceReduced
|
||||
env["isActivityFullscreen"] = environment.isActivityFullscreen
|
||||
if #available(iOS 16.2, *) {
|
||||
if #available(iOS 18.0, *) {
|
||||
env["isActivityUpdateReduced"] = environment.isActivityUpdateReduced
|
||||
env["activityFamily"] = "\(environment.activityFamily)"
|
||||
diff --git a/ios/Widgets/WidgetLiveActivity.swift b/ios/Widgets/WidgetLiveActivity.swift
|
||||
index 24d4571a52d3ebe9d785b5d049d8e134a149d513..7051c23b17ac91552e5b5c54606c57086c0ebbea 100644
|
||||
index 4d135c4..dae4744 100644
|
||||
--- a/ios/Widgets/WidgetLiveActivity.swift
|
||||
+++ b/ios/Widgets/WidgetLiveActivity.swift
|
||||
@@ -20,53 +20,41 @@ struct LiveActivityAttributes: ActivityAttributes {
|
||||
@@ -19,53 +19,41 @@ struct LiveActivityAttributes: ActivityAttributes {
|
||||
}
|
||||
|
||||
@available(iOS 16.1, *)
|
||||
public struct WidgetLiveActivity: Widget {
|
||||
- @Environment(\.self) var env
|
||||
-
|
||||
@@ -94,9 +94,9 @@ index 24d4571a52d3ebe9d785b5d049d8e134a149d513..7051c23b17ac91552e5b5c54606c5708
|
||||
}
|
||||
if let url = context.attributes.url.flatMap(URL.init(string:)) {
|
||||
return island.widgetURL(url)
|
||||
@@ -79,11 +67,16 @@ public struct WidgetLiveActivity: Widget {
|
||||
@@ -77,11 +65,16 @@ public struct WidgetLiveActivity: Widget {
|
||||
}
|
||||
|
||||
@available(iOS 16.1, *)
|
||||
private struct LiveActivitySectionView: View {
|
||||
+ @Environment(\.self) var env
|
||||
let context: ActivityViewContext<LiveActivityAttributes>
|
||||
@@ -112,9 +112,9 @@ index 24d4571a52d3ebe9d785b5d049d8e134a149d513..7051c23b17ac91552e5b5c54606c5708
|
||||
if let node = nodes[sectionName] as? [String: Any] {
|
||||
WidgetsDynamicView(name: context.activityID, kind: .liveActivity, node: node)
|
||||
} else {
|
||||
@@ -94,10 +87,17 @@ private struct LiveActivitySectionView: View {
|
||||
@@ -91,10 +84,17 @@ private struct LiveActivitySectionView: View {
|
||||
}
|
||||
|
||||
@available(iOS 16.1, *)
|
||||
private struct LiveActivityBannerView: View {
|
||||
+ // Read inside the rendered view: Widget-level values do not include the
|
||||
+ // presentation's color scheme, rendering mode, or reduced-luminance state.
|
||||
@@ -131,11 +131,25 @@ index 24d4571a52d3ebe9d785b5d049d8e134a149d513..7051c23b17ac91552e5b5c54606c5708
|
||||
if #available(iOS 18.0, *) {
|
||||
LiveActivityBanner(context: context, nodes: nodes)
|
||||
} else if let node = nodes["banner"] as? [String: Any] {
|
||||
diff --git a/scripts/build-layout-registry.mjs b/scripts/build-layout-registry.mjs
|
||||
index d52a60e..fa9bd77 100644
|
||||
--- a/scripts/build-layout-registry.mjs
|
||||
+++ b/scripts/build-layout-registry.mjs
|
||||
@@ -154,6 +154,8 @@ function createLayoutRegistry(expectedWidgets, capturedLayouts) {
|
||||
return registry;
|
||||
}
|
||||
|
||||
-if (process.argv[1] && path.resolve(process.argv[1]) === __filename) {
|
||||
+// Compare real paths: pnpm exposes the package through a symlink, so the
|
||||
+// invoked path and import.meta.url differ while naming the same file.
|
||||
+if (process.argv[1] && fs.realpathSync(path.resolve(process.argv[1])) === fs.realpathSync(__filename)) {
|
||||
await main();
|
||||
}
|
||||
diff --git a/src/Widgets.types.ts b/src/Widgets.types.ts
|
||||
index fee5c7475b52218fa0e192a1d347dd32cb0fe1f8..1d3a097b45d8eb5d13e5cedd26f0414caa83a5d6 100644
|
||||
index 0770613..924fa00 100644
|
||||
--- a/src/Widgets.types.ts
|
||||
+++ b/src/Widgets.types.ts
|
||||
@@ -104,6 +104,10 @@ export type LiveActivityEnvironment = {
|
||||
@@ -107,6 +107,10 @@ export type LiveActivityEnvironment = {
|
||||
* The color scheme of the activity's environment.
|
||||
*/
|
||||
colorScheme: 'light' | 'dark';
|
||||
@@ -1,237 +0,0 @@
|
||||
diff --git a/apple/Handlers/RNHoverHandler.m b/apple/Handlers/RNHoverHandler.m
|
||||
index 320cb8cb2652bfcfe1ecc65ebd81a8d208e4260f..a88ac5f04a9663fd7a62ee89e42d85ec41dcaf55 100644
|
||||
--- a/apple/Handlers/RNHoverHandler.m
|
||||
+++ b/apple/Handlers/RNHoverHandler.m
|
||||
@@ -132,8 +132,10 @@ - (void)unbindFromView
|
||||
{
|
||||
#if CHECK_TARGET(13_4)
|
||||
if (@available(iOS 13.4, *)) {
|
||||
+ // The superclass detaches the recognizer, clearing recognizer.view. Remove
|
||||
+ // the interaction from its own view before it can be recycled by Fabric.
|
||||
+ [_pointerInteraction.view removeInteraction:_pointerInteraction];
|
||||
[super unbindFromView];
|
||||
- [self.recognizer.view removeInteraction:_pointerInteraction];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
diff --git a/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js b/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
index 551ab92bf58db0b79d428dcd2f2df898ef686493..13db26d88bff975bc5d46bb6432cbf9fda3d489a 100644
|
||||
--- a/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
+++ b/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
@@ -34,11 +34,13 @@ const Swipeable = props => {
|
||||
enableTrackpadTwoFingerGesture = DEFAULT_ENABLE_TRACKING_TWO_FINGER_GESTURE,
|
||||
dragOffsetFromLeftEdge = DEFAULT_DRAG_OFFSET,
|
||||
dragOffsetFromRightEdge = DEFAULT_DRAG_OFFSET,
|
||||
+ failOffsetY,
|
||||
friction = DEFAULT_FRICTION,
|
||||
overshootFriction = DEFAULT_OVERSHOOT_FRICTION,
|
||||
onSwipeableOpenStartDrag,
|
||||
onSwipeableCloseStartDrag,
|
||||
onSwipeableWillOpen,
|
||||
+ onSwipeableRelease,
|
||||
onSwipeableWillClose,
|
||||
onSwipeableOpen,
|
||||
onSwipeableClose,
|
||||
@@ -248,8 +250,13 @@ const Swipeable = props => {
|
||||
toValue = -rightWidth.value;
|
||||
}
|
||||
}
|
||||
+ // Let a UI-thread full-swipe commit take over before the return spring.
|
||||
+ if (onSwipeableRelease?.(appliedTranslation)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
animateRow(toValue, velocityX / friction);
|
||||
- }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
|
||||
+ }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag, onSwipeableRelease, appliedTranslation]);
|
||||
const close = (0, _react.useCallback)(() => {
|
||||
'worklet';
|
||||
|
||||
@@ -285,11 +292,14 @@ const Swipeable = props => {
|
||||
}).onFinalize(() => {
|
||||
dragStarted.value = false;
|
||||
});
|
||||
+ if (failOffsetY !== undefined) {
|
||||
+ pan.failOffsetY(failOffsetY);
|
||||
+ }
|
||||
Object.entries(relationProps).forEach(([relationName, relation]) => {
|
||||
(0, _utils.applyRelationProp)(pan, relationName, relation);
|
||||
});
|
||||
return pan;
|
||||
- }, [enabled, hitSlop, enableTrackpadTwoFingerGesture, dragOffsetFromRightEdge, dragOffsetFromLeftEdge, updateElementWidths, relationProps, userDrag, rowState, dragStarted, updateAnimatedEvent, onSwipeableOpenStartDrag, onSwipeableCloseStartDrag, handleRelease]);
|
||||
+ }, [enabled, hitSlop, enableTrackpadTwoFingerGesture, dragOffsetFromRightEdge, dragOffsetFromLeftEdge, failOffsetY, updateElementWidths, relationProps, userDrag, rowState, dragStarted, updateAnimatedEvent, onSwipeableOpenStartDrag, onSwipeableCloseStartDrag, handleRelease]);
|
||||
(0, _react.useImperativeHandle)(ref, () => swipeableMethods, [swipeableMethods]);
|
||||
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
||||
transform: [{
|
||||
diff --git a/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js b/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
index a2835d5416ffd5cf9a04e98774516b9e6569691e..055afce410d6eb655532e7a09371dfc22eae5e9c 100644
|
||||
--- a/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
+++ b/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
@@ -29,11 +29,13 @@ const Swipeable = props => {
|
||||
enableTrackpadTwoFingerGesture = DEFAULT_ENABLE_TRACKING_TWO_FINGER_GESTURE,
|
||||
dragOffsetFromLeftEdge = DEFAULT_DRAG_OFFSET,
|
||||
dragOffsetFromRightEdge = DEFAULT_DRAG_OFFSET,
|
||||
+ failOffsetY,
|
||||
friction = DEFAULT_FRICTION,
|
||||
overshootFriction = DEFAULT_OVERSHOOT_FRICTION,
|
||||
onSwipeableOpenStartDrag,
|
||||
onSwipeableCloseStartDrag,
|
||||
onSwipeableWillOpen,
|
||||
+ onSwipeableRelease,
|
||||
onSwipeableWillClose,
|
||||
onSwipeableOpen,
|
||||
onSwipeableClose,
|
||||
@@ -243,8 +245,13 @@ const Swipeable = props => {
|
||||
toValue = -rightWidth.value;
|
||||
}
|
||||
}
|
||||
+ // Let a UI-thread full-swipe commit take over before the return spring.
|
||||
+ if (onSwipeableRelease?.(appliedTranslation)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
animateRow(toValue, velocityX / friction);
|
||||
- }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
|
||||
+ }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag, onSwipeableRelease, appliedTranslation]);
|
||||
const close = useCallback(() => {
|
||||
'worklet';
|
||||
|
||||
@@ -280,11 +287,14 @@ const Swipeable = props => {
|
||||
}).onFinalize(() => {
|
||||
dragStarted.value = false;
|
||||
});
|
||||
+ if (failOffsetY !== undefined) {
|
||||
+ pan.failOffsetY(failOffsetY);
|
||||
+ }
|
||||
Object.entries(relationProps).forEach(([relationName, relation]) => {
|
||||
applyRelationProp(pan, relationName, relation);
|
||||
});
|
||||
return pan;
|
||||
- }, [enabled, hitSlop, enableTrackpadTwoFingerGesture, dragOffsetFromRightEdge, dragOffsetFromLeftEdge, updateElementWidths, relationProps, userDrag, rowState, dragStarted, updateAnimatedEvent, onSwipeableOpenStartDrag, onSwipeableCloseStartDrag, handleRelease]);
|
||||
+ }, [enabled, hitSlop, enableTrackpadTwoFingerGesture, dragOffsetFromRightEdge, dragOffsetFromLeftEdge, failOffsetY, updateElementWidths, relationProps, userDrag, rowState, dragStarted, updateAnimatedEvent, onSwipeableOpenStartDrag, onSwipeableCloseStartDrag, handleRelease]);
|
||||
useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);
|
||||
const animatedStyle = useAnimatedStyle(() => ({
|
||||
transform: [{
|
||||
diff --git a/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts b/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
index ac8b76830d468edfbc29052b452a36221323c3de..cac72ebaafaf746af7640783a16e99c93ecad2a4 100644
|
||||
--- a/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
+++ b/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
@@ -64,6 +64,13 @@ export interface SwipeableProps {
|
||||
* a swipe. The default value is 10.
|
||||
*/
|
||||
dragOffsetFromRightEdge?: number;
|
||||
+ /**
|
||||
+ * Range along the Y axis (in points) that, once exceeded before the swipe
|
||||
+ * activates, makes the pan fail. Lets vertically-dominant pans (list
|
||||
+ * scrolling, especially trackpad two-finger pans) skip the swipe entirely.
|
||||
+ * Passed straight to the underlying Pan gesture's `failOffsetY`.
|
||||
+ */
|
||||
+ failOffsetY?: number | [start: number, end: number];
|
||||
/**
|
||||
* Value indicating if the swipeable panel can be pulled further than the left
|
||||
* actions panel's width. It is set to true by default as long as the left
|
||||
@@ -90,6 +97,13 @@ export interface SwipeableProps {
|
||||
* Called when action panel is closed.
|
||||
*/
|
||||
onSwipeableClose?: (direction: SwipeDirection.LEFT | SwipeDirection.RIGHT) => void;
|
||||
+ /**
|
||||
+ * UI-thread worklet called on release before the built-in spring starts.
|
||||
+ * Return true to consume the release and take ownership of translation.
|
||||
+ * The caller must reset or remove the row after its custom animation.
|
||||
+ */
|
||||
+ onSwipeableRelease?: (translation: SharedValue<number>) => boolean;
|
||||
+
|
||||
/**
|
||||
* Called when action panel starts animating on open (either right or left).
|
||||
*/
|
||||
diff --git a/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx b/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
index b6134c908624adc590ebd264e90e558b88e235d5..fa4b1c1749bd0e86cbf5f5546f295d8099e1a481 100644
|
||||
--- a/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
+++ b/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
@@ -58,11 +58,13 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
enableTrackpadTwoFingerGesture = DEFAULT_ENABLE_TRACKING_TWO_FINGER_GESTURE,
|
||||
dragOffsetFromLeftEdge = DEFAULT_DRAG_OFFSET,
|
||||
dragOffsetFromRightEdge = DEFAULT_DRAG_OFFSET,
|
||||
+ failOffsetY,
|
||||
friction = DEFAULT_FRICTION,
|
||||
overshootFriction = DEFAULT_OVERSHOOT_FRICTION,
|
||||
onSwipeableOpenStartDrag,
|
||||
onSwipeableCloseStartDrag,
|
||||
onSwipeableWillOpen,
|
||||
+ onSwipeableRelease,
|
||||
onSwipeableWillClose,
|
||||
onSwipeableOpen,
|
||||
onSwipeableClose,
|
||||
@@ -457,6 +459,11 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Let a UI-thread full-swipe commit take over before the return spring.
|
||||
+ if (onSwipeableRelease?.(appliedTranslation)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
animateRow(toValue, velocityX / friction);
|
||||
},
|
||||
[
|
||||
@@ -468,6 +475,8 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
rightWidth,
|
||||
rowState,
|
||||
userDrag,
|
||||
+ onSwipeableRelease,
|
||||
+ appliedTranslation,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -537,6 +546,10 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
dragStarted.value = false;
|
||||
});
|
||||
|
||||
+ if (failOffsetY !== undefined) {
|
||||
+ pan.failOffsetY(failOffsetY);
|
||||
+ }
|
||||
+
|
||||
Object.entries(relationProps).forEach(([relationName, relation]) => {
|
||||
applyRelationProp(
|
||||
pan,
|
||||
@@ -552,6 +565,7 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
enableTrackpadTwoFingerGesture,
|
||||
dragOffsetFromRightEdge,
|
||||
dragOffsetFromLeftEdge,
|
||||
+ failOffsetY,
|
||||
updateElementWidths,
|
||||
relationProps,
|
||||
userDrag,
|
||||
diff --git a/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts b/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
index 0c0e517e0d340faf50ff78c3d48e7a2bbcf808ec..3ab14d240da346b1927792e480f5b1e902b03bf8 100644
|
||||
--- a/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
+++ b/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
@@ -77,6 +77,14 @@ export interface SwipeableProps {
|
||||
*/
|
||||
dragOffsetFromRightEdge?: number;
|
||||
|
||||
+ /**
|
||||
+ * Range along the Y axis (in points) that, once exceeded before the swipe
|
||||
+ * activates, makes the pan fail. Lets vertically-dominant pans (list
|
||||
+ * scrolling, especially trackpad two-finger pans) skip the swipe entirely.
|
||||
+ * Passed straight to the underlying Pan gesture's `failOffsetY`.
|
||||
+ */
|
||||
+ failOffsetY?: number | [start: number, end: number];
|
||||
+
|
||||
/**
|
||||
* Value indicating if the swipeable panel can be pulled further than the left
|
||||
* actions panel's width. It is set to true by default as long as the left
|
||||
@@ -112,6 +120,13 @@ export interface SwipeableProps {
|
||||
direction: SwipeDirection.LEFT | SwipeDirection.RIGHT
|
||||
) => void;
|
||||
|
||||
+ /**
|
||||
+ * UI-thread worklet called on release before the built-in spring starts.
|
||||
+ * Return true to consume the release and take ownership of translation.
|
||||
+ * The caller must reset or remove the row after its custom animation.
|
||||
+ */
|
||||
+ onSwipeableRelease?: (translation: SharedValue<number>) => boolean;
|
||||
+
|
||||
/**
|
||||
* Called when action panel starts animating on open (either right or left).
|
||||
*/
|
||||
@@ -0,0 +1,151 @@
|
||||
diff --git a/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js b/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
index 4ab38424d1f5fc8b2686dd4a0a8058c454a9874d..0c5e0eaa995af50e5f8c02909dc6825121cc61af 100644
|
||||
--- a/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
+++ b/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js
|
||||
@@ -31,11 +31,13 @@ const Swipeable = props => {
|
||||
enableTrackpadTwoFingerGesture = DEFAULT_ENABLE_TRACKING_TWO_FINGER_GESTURE,
|
||||
dragOffsetFromLeft = DEFAULT_DRAG_OFFSET,
|
||||
dragOffsetFromRight = -DEFAULT_DRAG_OFFSET,
|
||||
+ failOffsetY,
|
||||
friction = DEFAULT_FRICTION,
|
||||
overshootFriction = DEFAULT_OVERSHOOT_FRICTION,
|
||||
onSwipeableOpenStartDrag,
|
||||
onSwipeableCloseStartDrag,
|
||||
onSwipeableWillOpen,
|
||||
+ onSwipeableRelease,
|
||||
onSwipeableWillClose,
|
||||
onSwipeableOpen,
|
||||
onSwipeableClose,
|
||||
@@ -276,8 +278,12 @@ const Swipeable = props => {
|
||||
toValue = -rightWidth.value;
|
||||
}
|
||||
}
|
||||
+ // Let a UI-thread full-swipe commit take over before the return spring.
|
||||
+ if (onSwipeableRelease?.(appliedTranslation)) {
|
||||
+ return;
|
||||
+ }
|
||||
animateRow(toValue, velocityX / friction);
|
||||
- }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
|
||||
+ }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag, onSwipeableRelease, appliedTranslation]);
|
||||
const close = useCallback(() => {
|
||||
'worklet';
|
||||
|
||||
@@ -302,6 +308,7 @@ const Swipeable = props => {
|
||||
enabled: enabled ?? true,
|
||||
enableTrackpadTwoFingerGesture: enableTrackpadTwoFingerGesture,
|
||||
activeOffsetX: [dragOffsetFromRight, dragOffsetFromLeft],
|
||||
+ failOffsetY,
|
||||
simultaneousWith,
|
||||
requireToFail,
|
||||
block,
|
||||
diff --git a/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts b/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
index e97b6dbbced1bcbd359cf35293b7f10cbf13b0e7..de07f26423bee66ecd7d0f9bb33233bcb3215751 100644
|
||||
--- a/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
+++ b/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts
|
||||
@@ -59,6 +59,12 @@ export type SwipeableProps = {
|
||||
* Called when action panel is closed.
|
||||
*/
|
||||
onSwipeableClose?: (direction: SwipeDirection.LEFT | SwipeDirection.RIGHT) => void;
|
||||
+ /**
|
||||
+ * UI-thread worklet called on release before the built-in spring starts.
|
||||
+ * Return true to consume the release and take ownership of translation.
|
||||
+ * The caller must reset or remove the row after its custom animation.
|
||||
+ */
|
||||
+ onSwipeableRelease?: (translation: SharedValue<number>) => boolean;
|
||||
/**
|
||||
* Called when action panel starts animating on open (either right or left).
|
||||
*/
|
||||
@@ -150,6 +156,13 @@ export type SwipeableProps = {
|
||||
* The horizontal offset from the starting point required to trigger a left-swipe gesture. Defaults to -10.
|
||||
*/
|
||||
dragOffsetFromRight?: number;
|
||||
+ /**
|
||||
+ * Range along the Y axis (in points) that, once exceeded before the swipe
|
||||
+ * activates, makes the pan fail. Lets vertically-dominant pans (list
|
||||
+ * scrolling, especially trackpad two-finger pans) skip the swipe entirely.
|
||||
+ * Passed straight to the underlying Pan gesture's `failOffsetY`.
|
||||
+ */
|
||||
+ failOffsetY?: number | [start: number, end: number];
|
||||
}>;
|
||||
export interface SwipeableMethods {
|
||||
close: () => void;
|
||||
diff --git a/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx b/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
index 4881db1dc7575adc6610569035a8990cee414f3e..8431b738a9ffd09df48e1106b2bd5b62251d536c 100644
|
||||
--- a/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
+++ b/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx
|
||||
@@ -61,11 +61,13 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
enableTrackpadTwoFingerGesture = DEFAULT_ENABLE_TRACKING_TWO_FINGER_GESTURE,
|
||||
dragOffsetFromLeft = DEFAULT_DRAG_OFFSET,
|
||||
dragOffsetFromRight = -DEFAULT_DRAG_OFFSET,
|
||||
+ failOffsetY,
|
||||
friction = DEFAULT_FRICTION,
|
||||
overshootFriction = DEFAULT_OVERSHOOT_FRICTION,
|
||||
onSwipeableOpenStartDrag,
|
||||
onSwipeableCloseStartDrag,
|
||||
onSwipeableWillOpen,
|
||||
+ onSwipeableRelease,
|
||||
onSwipeableWillClose,
|
||||
onSwipeableOpen,
|
||||
onSwipeableClose,
|
||||
@@ -491,6 +493,11 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Let a UI-thread full-swipe commit take over before the return spring.
|
||||
+ if (onSwipeableRelease?.(appliedTranslation)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
animateRow(toValue, velocityX / friction);
|
||||
},
|
||||
[
|
||||
@@ -502,6 +509,8 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
rightWidth,
|
||||
rowState,
|
||||
userDrag,
|
||||
+ onSwipeableRelease,
|
||||
+ appliedTranslation,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -530,6 +539,7 @@ const Swipeable = (props: SwipeableProps) => {
|
||||
enabled: enabled ?? true,
|
||||
enableTrackpadTwoFingerGesture: enableTrackpadTwoFingerGesture,
|
||||
activeOffsetX: [dragOffsetFromRight, dragOffsetFromLeft],
|
||||
+ failOffsetY,
|
||||
simultaneousWith,
|
||||
requireToFail,
|
||||
block,
|
||||
diff --git a/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts b/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
index 1e1246f709feb04c01cf3221472cc1219a8fffac..f526d4fe2d2738becbe8d29c59d1105afa11ae60 100644
|
||||
--- a/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
+++ b/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts
|
||||
@@ -77,6 +77,13 @@ export type SwipeableProps = {
|
||||
direction: SwipeDirection.LEFT | SwipeDirection.RIGHT
|
||||
) => void;
|
||||
|
||||
+ /**
|
||||
+ * UI-thread worklet called on release before the built-in spring starts.
|
||||
+ * Return true to consume the release and take ownership of translation.
|
||||
+ * The caller must reset or remove the row after its custom animation.
|
||||
+ */
|
||||
+ onSwipeableRelease?: (translation: SharedValue<number>) => boolean;
|
||||
+
|
||||
/**
|
||||
* Called when action panel starts animating on open (either right or left).
|
||||
*/
|
||||
@@ -196,6 +203,14 @@ export type SwipeableProps = {
|
||||
* The horizontal offset from the starting point required to trigger a left-swipe gesture. Defaults to -10.
|
||||
*/
|
||||
dragOffsetFromRight?: number;
|
||||
+
|
||||
+ /**
|
||||
+ * Range along the Y axis (in points) that, once exceeded before the swipe
|
||||
+ * activates, makes the pan fail. Lets vertically-dominant pans (list
|
||||
+ * scrolling, especially trackpad two-finger pans) skip the swipe entirely.
|
||||
+ * Passed straight to the underlying Pan gesture's `failOffsetY`.
|
||||
+ */
|
||||
+ failOffsetY?: number | [start: number, end: number];
|
||||
}>;
|
||||
|
||||
export interface SwipeableMethods {
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/lib/commonjs/components/KeyboardChatScrollView/index.js b/lib/commonjs/components/KeyboardChatScrollView/index.js
|
||||
index db8cfb1d289f91563f13c4dd842c783c99facc32..64c7e38ad8d9e866b15a53e561509e6b0ad33cb9 100644
|
||||
index 5617394..4f2222a 100644
|
||||
--- a/lib/commonjs/components/KeyboardChatScrollView/index.js
|
||||
+++ b/lib/commonjs/components/KeyboardChatScrollView/index.js
|
||||
@@ -26,9 +26,12 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
@@ -27,9 +27,12 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
offset = 0,
|
||||
extraContentPadding = ZERO_CONTENT_PADDING,
|
||||
blankSpace = ZERO_BLANK_SPACE,
|
||||
@@ -15,7 +15,7 @@ index db8cfb1d289f91563f13c4dd842c783c99facc32..64c7e38ad8d9e866b15a53e561509e6b
|
||||
onEndVisible,
|
||||
...rest
|
||||
}, ref) => {
|
||||
@@ -50,13 +53,17 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
@@ -51,13 +54,17 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
freeze: freezeSV,
|
||||
offset,
|
||||
blankSpace,
|
||||
@@ -34,7 +34,7 @@ index db8cfb1d289f91563f13c4dd842c783c99facc32..64c7e38ad8d9e866b15a53e561509e6b
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -82,10 +89,26 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
@@ -88,10 +95,26 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
|
||||
// a bug for you, please open an issue.
|
||||
const totalPadding = (0, _reactNativeReanimated.useDerivedValue)(() => Math.min(layout.value.height, Math.max(blankSpace.value, padding.value + extraContentPadding.value)));
|
||||
|
||||
@@ -63,7 +63,7 @@ index db8cfb1d289f91563f13c4dd842c783c99facc32..64c7e38ad8d9e866b15a53e561509e6b
|
||||
onLayoutInternal(e);
|
||||
onLayoutProp === null || onLayoutProp === void 0 || onLayoutProp(e);
|
||||
diff --git a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
index 4d33b3fe426070cf312fc493ce902b2c24d853ea..e619708b95865afd8b43dd8f0a6523fcf67b1f53 100644
|
||||
index 4d33b3f..6a787d3 100644
|
||||
--- a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
+++ b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
@@ -206,7 +206,7 @@ const clampedScrollTarget = (offsetBeforeScroll, keyboardHeight, contentHeight,
|
||||
@@ -87,8 +87,9 @@ index 4d33b3fe426070cf312fc493ce902b2c24d853ea..e619708b95865afd8b43dd8f0a6523fc
|
||||
};
|
||||
exports.computeIOSContentOffset = computeIOSContentOffset;
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d9547a27c 100644
|
||||
index cecee07..533a9e9 100644
|
||||
--- a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
+++ b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
@@ -32,7 +32,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -102,7 +103,7 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
} = options;
|
||||
const padding = (0, _reactNativeReanimated.useSharedValue)(0);
|
||||
const currentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
||||
@@ -58,6 +60,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -59,6 +61,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
targetKeyboardHeight.value = e.height;
|
||||
}
|
||||
const effective = (0, _helpers.getEffectiveHeight)(e.height, targetKeyboardHeight.value, offset);
|
||||
@@ -112,16 +113,16 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
const atEnd = (0, _helpers.isScrollAtEnd)(scroll.value, layout.value.height, size.value.height, inverted);
|
||||
|
||||
// Scale minimum padding absorption by how much of it is visible.
|
||||
@@ -66,7 +71,7 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -67,7 +72,7 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const visiblePadding = visibleFraction * blankSpace.value;
|
||||
const minimumPaddingAbsorbed = Math.max(0, visiblePadding - extraContentPadding.value);
|
||||
const scrollEffective = (0, _helpers.getScrollEffective)(effective, minimumPaddingAbsorbed);
|
||||
- const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value);
|
||||
+ const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value) + adjustedInsetCompensation;
|
||||
|
||||
// persistent mode: when keyboard shrinks, clamp to valid range
|
||||
if (keyboardLiftBehavior === "persistent" && effective < padding.value) {
|
||||
@@ -76,8 +81,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
// `onInteractive` owns the native scroll offset. When its final
|
||||
// keyboardWillHide event arrives, consume the marker so this
|
||||
@@ -87,8 +92,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const maxScroll = Math.max(size.value.height - layout.value.height, 0);
|
||||
contentOffsetY.value = Math.max(-actualTotalPadding, Math.min(scroll.value, maxScroll));
|
||||
} else {
|
||||
@@ -132,7 +133,7 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -91,8 +96,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -102,8 +107,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const maxScroll = Math.max(size.value.height - layout.value.height, 0);
|
||||
contentOffsetY.value = Math.max(-actualTotalPadding, Math.min(scroll.value, maxScroll));
|
||||
} else {
|
||||
@@ -143,16 +144,18 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -118,12 +123,23 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -129,17 +134,25 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
contentOffsetY.value = scroll.value;
|
||||
return;
|
||||
}
|
||||
- contentOffsetY.value = (0, _helpers.computeIOSContentOffset)(relativeScroll, scrollEffective, size.value.height, layout.value.height, inverted, actualTotalPadding);
|
||||
+ contentOffsetY.value = (0, _helpers.computeIOSContentOffset)(relativeScroll, scrollEffective, size.value.height, layout.value.height, inverted, actualTotalPadding, adjustedStartInsetCompensation);
|
||||
+ },
|
||||
},
|
||||
- onInteractive: () => {
|
||||
+ onMove: e => {
|
||||
+ "worklet";
|
||||
+
|
||||
"worklet";
|
||||
|
||||
- isInteractiveDismissal.value = true;
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -163,6 +166,8 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
"worklet";
|
||||
|
||||
- // iOS doesn't need per-frame updates (contentOffset handles it)
|
||||
+ isInteractiveDismissal.value = true;
|
||||
+
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -170,7 +175,7 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
},
|
||||
onEnd: e => {
|
||||
"worklet";
|
||||
@@ -132,9 +148,10 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -148,9 +161,10 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
return;
|
||||
}
|
||||
const effective = (0, _helpers.getEffectiveHeight)(e.height, targetKeyboardHeight.value, offset);
|
||||
@@ -183,10 +188,10 @@ index 2073da84b8b2be291aa3181700c2b18a75d0fc56..7ae9bb220ce3cc23c788a79677afdc7d
|
||||
padding,
|
||||
currentHeight,
|
||||
diff --git a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
index 0d50bdfeb7bbc5c14a31ed344f8a690e4fd340b3..e0b73653fd1dd23f0f2e2c85835a3d107e3f666d 100644
|
||||
index 54a1c57..19b44fc 100644
|
||||
--- a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
+++ b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
@@ -29,6 +29,8 @@ function useExtraContentPadding(options) {
|
||||
@@ -31,6 +31,8 @@ function useExtraContentPadding(options) {
|
||||
extraContentPadding,
|
||||
keyboardPadding,
|
||||
blankSpace,
|
||||
@@ -195,7 +200,7 @@ index 0d50bdfeb7bbc5c14a31ed344f8a690e4fd340b3..e0b73653fd1dd23f0f2e2c85835a3d10
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -68,8 +70,8 @@ function useExtraContentPadding(options) {
|
||||
@@ -70,8 +72,8 @@ function useExtraContentPadding(options) {
|
||||
}
|
||||
|
||||
// Compute effective delta considering blankSpace floor
|
||||
@@ -206,7 +211,7 @@ index 0d50bdfeb7bbc5c14a31ed344f8a690e4fd340b3..e0b73653fd1dd23f0f2e2c85835a3d10
|
||||
const effectiveDelta = currentTotal - previousTotal;
|
||||
if (effectiveDelta === 0) {
|
||||
// blankSpace absorbed the change
|
||||
@@ -88,10 +90,11 @@ function useExtraContentPadding(options) {
|
||||
@@ -90,10 +92,11 @@ function useExtraContentPadding(options) {
|
||||
const target = Math.max(scroll.value - effectiveDelta, -currentTotal);
|
||||
scrollToTarget(target);
|
||||
} else {
|
||||
@@ -221,8 +226,9 @@ index 0d50bdfeb7bbc5c14a31ed344f8a690e4fd340b3..e0b73653fd1dd23f0f2e2c85835a3d10
|
||||
+ }, [inverted, keyboardLiftBehavior, adjustedInsetCompensation, adjustedStartInsetCompensation]);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/module/components/KeyboardChatScrollView/index.js b/lib/module/components/KeyboardChatScrollView/index.js
|
||||
index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..76b858a6590ad0592cc663864ea822db55eaeceb 100644
|
||||
index d085394..a57c2f9 100644
|
||||
--- a/lib/module/components/KeyboardChatScrollView/index.js
|
||||
+++ b/lib/module/components/KeyboardChatScrollView/index.js
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -235,7 +241,7 @@ index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..76b858a6590ad0592cc663864ea822db
|
||||
import Reanimated from "react-native-reanimated";
|
||||
import useCombinedRef from "../hooks/useCombinedRef";
|
||||
import ScrollViewWithBottomPadding from "../ScrollViewWithBottomPadding";
|
||||
@@ -19,9 +19,12 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
@@ -20,9 +20,12 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
offset = 0,
|
||||
extraContentPadding = ZERO_CONTENT_PADDING,
|
||||
blankSpace = ZERO_BLANK_SPACE,
|
||||
@@ -248,7 +254,7 @@ index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..76b858a6590ad0592cc663864ea822db
|
||||
onEndVisible,
|
||||
...rest
|
||||
}, ref) => {
|
||||
@@ -43,13 +46,17 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
@@ -44,13 +47,17 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
freeze: freezeSV,
|
||||
offset,
|
||||
blankSpace,
|
||||
@@ -267,7 +273,7 @@ index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..76b858a6590ad0592cc663864ea822db
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -75,10 +82,26 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
@@ -81,10 +88,26 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
|
||||
// a bug for you, please open an issue.
|
||||
const totalPadding = useDerivedValue(() => Math.min(layout.value.height, Math.max(blankSpace.value, padding.value + extraContentPadding.value)));
|
||||
|
||||
@@ -296,7 +302,7 @@ index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..76b858a6590ad0592cc663864ea822db
|
||||
onLayoutInternal(e);
|
||||
onLayoutProp === null || onLayoutProp === void 0 || onLayoutProp(e);
|
||||
diff --git a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
index 295e2219b560519b8d033968b5105d1da3e77315..ff7ee3fe0d880c2287a7b70d5ecf952e99357adf 100644
|
||||
index 295e221..2f7b87e 100644
|
||||
--- a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
+++ b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js
|
||||
@@ -193,7 +193,7 @@ export const clampedScrollTarget = (offsetBeforeScroll, keyboardHeight, contentH
|
||||
@@ -319,8 +325,9 @@ index 295e2219b560519b8d033968b5105d1da3e77315..ff7ee3fe0d880c2287a7b70d5ecf952e
|
||||
+ return Math.min(Math.max(keyboardHeight + relativeScroll, minScroll), maxScroll);
|
||||
};
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b7217098cba2340 100644
|
||||
index 407275d..19427d7 100644
|
||||
--- a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
+++ b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
|
||||
@@ -25,7 +25,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -334,7 +341,7 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
} = options;
|
||||
const padding = useSharedValue(0);
|
||||
const currentHeight = useSharedValue(0);
|
||||
@@ -51,6 +53,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -52,6 +54,9 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
targetKeyboardHeight.value = e.height;
|
||||
}
|
||||
const effective = getEffectiveHeight(e.height, targetKeyboardHeight.value, offset);
|
||||
@@ -344,16 +351,16 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
const atEnd = isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);
|
||||
|
||||
// Scale minimum padding absorption by how much of it is visible.
|
||||
@@ -59,7 +64,7 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -60,7 +65,7 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const visiblePadding = visibleFraction * blankSpace.value;
|
||||
const minimumPaddingAbsorbed = Math.max(0, visiblePadding - extraContentPadding.value);
|
||||
const scrollEffective = getScrollEffective(effective, minimumPaddingAbsorbed);
|
||||
- const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value);
|
||||
+ const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value) + adjustedInsetCompensation;
|
||||
|
||||
// persistent mode: when keyboard shrinks, clamp to valid range
|
||||
if (keyboardLiftBehavior === "persistent" && effective < padding.value) {
|
||||
@@ -69,8 +74,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
// `onInteractive` owns the native scroll offset. When its final
|
||||
// keyboardWillHide event arrives, consume the marker so this
|
||||
@@ -80,8 +85,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const maxScroll = Math.max(size.value.height - layout.value.height, 0);
|
||||
contentOffsetY.value = Math.max(-actualTotalPadding, Math.min(scroll.value, maxScroll));
|
||||
} else {
|
||||
@@ -364,7 +371,7 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -84,8 +89,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -95,8 +100,8 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
const maxScroll = Math.max(size.value.height - layout.value.height, 0);
|
||||
contentOffsetY.value = Math.max(-actualTotalPadding, Math.min(scroll.value, maxScroll));
|
||||
} else {
|
||||
@@ -375,16 +382,18 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -111,12 +116,23 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -122,17 +127,25 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
contentOffsetY.value = scroll.value;
|
||||
return;
|
||||
}
|
||||
- contentOffsetY.value = computeIOSContentOffset(relativeScroll, scrollEffective, size.value.height, layout.value.height, inverted, actualTotalPadding);
|
||||
+ contentOffsetY.value = computeIOSContentOffset(relativeScroll, scrollEffective, size.value.height, layout.value.height, inverted, actualTotalPadding, adjustedStartInsetCompensation);
|
||||
+ },
|
||||
},
|
||||
- onInteractive: () => {
|
||||
+ onMove: e => {
|
||||
+ "worklet";
|
||||
+
|
||||
"worklet";
|
||||
|
||||
- isInteractiveDismissal.value = true;
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -395,6 +404,8 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
"worklet";
|
||||
|
||||
- // iOS doesn't need per-frame updates (contentOffset handles it)
|
||||
+ isInteractiveDismissal.value = true;
|
||||
+
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -402,7 +413,7 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
},
|
||||
onEnd: e => {
|
||||
"worklet";
|
||||
@@ -125,9 +141,10 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
@@ -141,9 +154,10 @@ function useChatKeyboard(scrollViewRef, options) {
|
||||
return;
|
||||
}
|
||||
const effective = getEffectiveHeight(e.height, targetKeyboardHeight.value, offset);
|
||||
@@ -415,10 +426,10 @@ index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..cc4bfae859191aeb848179028b721709
|
||||
padding,
|
||||
currentHeight,
|
||||
diff --git a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
index 1afa50987a8d2a5fe3f36b20945efe804d48a873..7b05d0721c50e118cf78c07913b580a31293db77 100644
|
||||
index 5885415..6e694fa 100644
|
||||
--- a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
+++ b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
||||
@@ -23,6 +23,8 @@ function useExtraContentPadding(options) {
|
||||
@@ -25,6 +25,8 @@ function useExtraContentPadding(options) {
|
||||
extraContentPadding,
|
||||
keyboardPadding,
|
||||
blankSpace,
|
||||
@@ -427,7 +438,7 @@ index 1afa50987a8d2a5fe3f36b20945efe804d48a873..7b05d0721c50e118cf78c07913b580a3
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -62,8 +64,8 @@ function useExtraContentPadding(options) {
|
||||
@@ -64,8 +66,8 @@ function useExtraContentPadding(options) {
|
||||
}
|
||||
|
||||
// Compute effective delta considering blankSpace floor
|
||||
@@ -438,7 +449,7 @@ index 1afa50987a8d2a5fe3f36b20945efe804d48a873..7b05d0721c50e118cf78c07913b580a3
|
||||
const effectiveDelta = currentTotal - previousTotal;
|
||||
if (effectiveDelta === 0) {
|
||||
// blankSpace absorbed the change
|
||||
@@ -82,11 +84,12 @@ function useExtraContentPadding(options) {
|
||||
@@ -84,11 +86,12 @@ function useExtraContentPadding(options) {
|
||||
const target = Math.max(scroll.value - effectiveDelta, -currentTotal);
|
||||
scrollToTarget(target);
|
||||
} else {
|
||||
@@ -454,11 +465,12 @@ index 1afa50987a8d2a5fe3f36b20945efe804d48a873..7b05d0721c50e118cf78c07913b580a3
|
||||
}
|
||||
export { useExtraContentPadding };
|
||||
//# sourceMappingURL=index.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/typescript/components/KeyboardChatScrollView/types.d.ts b/lib/typescript/components/KeyboardChatScrollView/types.d.ts
|
||||
index a036b431f03efb9d5379527c17db6fce62bfee09..5e56bf7edec9161698a745e8e6292bfccd68d3db 100644
|
||||
index eba1514..6597d80 100644
|
||||
--- a/lib/typescript/components/KeyboardChatScrollView/types.d.ts
|
||||
+++ b/lib/typescript/components/KeyboardChatScrollView/types.d.ts
|
||||
@@ -86,6 +86,10 @@ export type KeyboardChatScrollViewProps = {
|
||||
@@ -88,6 +88,10 @@ export type KeyboardChatScrollViewProps = {
|
||||
* Default is `undefined` (equivalent to `0` — no minimum floor).
|
||||
*/
|
||||
blankSpace?: SharedValue<number>;
|
||||
@@ -470,7 +482,7 @@ index a036b431f03efb9d5379527c17db6fce62bfee09..5e56bf7edec9161698a745e8e6292bfc
|
||||
* Fires whenever the effective content inset changes — the static `contentInset`
|
||||
* prop combined with the dynamic keyboard-driven padding.
|
||||
diff --git a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts
|
||||
index 2b51cc4737b4a05b5396da31e67e54177f43c498..3acec1fbddee6227915590a6c8d449757cb4d7b2 100644
|
||||
index 2b51cc4..3acec1f 100644
|
||||
--- a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts
|
||||
+++ b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts
|
||||
@@ -129,4 +129,4 @@ export declare const clampedScrollTarget: (offsetBeforeScroll: number, keyboardH
|
||||
@@ -480,7 +492,7 @@ index 2b51cc4737b4a05b5396da31e67e54177f43c498..3acec1fbddee6227915590a6c8d44975
|
||||
-export declare const computeIOSContentOffset: (relativeScroll: number, keyboardHeight: number, contentHeight: number, layoutHeight: number, inverted: boolean, totalPaddingForMaxScroll?: number) => number;
|
||||
+export declare const computeIOSContentOffset: (relativeScroll: number, keyboardHeight: number, contentHeight: number, layoutHeight: number, inverted: boolean, totalPaddingForMaxScroll?: number, startInsetCompensation?: number) => number;
|
||||
diff --git a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
|
||||
index aff9b5a8dbc2464546396437eaf6c5ae955b9f29..fdd83953271123be6caefaa786c469f0d92cce2b 100644
|
||||
index aff9b5a..fdd8395 100644
|
||||
--- a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
|
||||
+++ b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
|
||||
@@ -9,6 +9,10 @@ type UseChatKeyboardOptions = {
|
||||
@@ -495,7 +507,7 @@ index aff9b5a8dbc2464546396437eaf6c5ae955b9f29..fdd83953271123be6caefaa786c469f0
|
||||
type UseChatKeyboardReturn = {
|
||||
/** Extra scrollable space (= keyboard height). Used as contentInset on iOS, contentInsetBottom/contentInsetTop on Android. */
|
||||
diff --git a/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts b/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
|
||||
index ec73f70544a062fbecfc1d8be92d839d3e0bea6f..45b387446587fd3e611fa02a01534bb5d9fa6bbd 100644
|
||||
index ec73f70..45b3874 100644
|
||||
--- a/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
|
||||
+++ b/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
|
||||
@@ -8,6 +8,10 @@ type UseExtraContentPaddingOptions = {
|
||||
@@ -510,7 +522,7 @@ index ec73f70544a062fbecfc1d8be92d839d3e0bea6f..45b387446587fd3e611fa02a01534bb5
|
||||
scroll: SharedValue<number>;
|
||||
/** Visible viewport dimensions. */
|
||||
diff --git a/src/components/KeyboardChatScrollView/index.tsx b/src/components/KeyboardChatScrollView/index.tsx
|
||||
index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d029c8ecc10 100644
|
||||
index 554b38c..725d546 100644
|
||||
--- a/src/components/KeyboardChatScrollView/index.tsx
|
||||
+++ b/src/components/KeyboardChatScrollView/index.tsx
|
||||
@@ -1,7 +1,9 @@
|
||||
@@ -524,7 +536,7 @@ index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d02
|
||||
useAnimatedRef,
|
||||
useAnimatedStyle,
|
||||
useDerivedValue,
|
||||
@@ -35,9 +37,12 @@ const KeyboardChatScrollView = forwardRef<
|
||||
@@ -39,9 +41,12 @@ const KeyboardChatScrollView: React.ForwardRefExoticComponent<
|
||||
offset = 0,
|
||||
extraContentPadding = ZERO_CONTENT_PADDING,
|
||||
blankSpace = ZERO_BLANK_SPACE,
|
||||
@@ -537,7 +549,7 @@ index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d02
|
||||
onEndVisible,
|
||||
...rest
|
||||
},
|
||||
@@ -64,6 +69,8 @@ const KeyboardChatScrollView = forwardRef<
|
||||
@@ -68,6 +73,8 @@ const KeyboardChatScrollView: React.ForwardRefExoticComponent<
|
||||
offset,
|
||||
blankSpace,
|
||||
extraContentPadding,
|
||||
@@ -546,7 +558,7 @@ index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d02
|
||||
});
|
||||
|
||||
useExtraContentPadding({
|
||||
@@ -71,6 +78,8 @@ const KeyboardChatScrollView = forwardRef<
|
||||
@@ -75,6 +82,8 @@ const KeyboardChatScrollView: React.ForwardRefExoticComponent<
|
||||
extraContentPadding,
|
||||
keyboardPadding: padding,
|
||||
blankSpace,
|
||||
@@ -555,7 +567,7 @@ index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d02
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -102,13 +111,40 @@ const KeyboardChatScrollView = forwardRef<
|
||||
@@ -112,13 +121,40 @@ const KeyboardChatScrollView: React.ForwardRefExoticComponent<
|
||||
),
|
||||
);
|
||||
|
||||
@@ -602,10 +614,10 @@ index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..277a1ecada428ffbae517d6edc720d02
|
||||
(e: LayoutChangeEvent) => {
|
||||
onLayoutInternal(e);
|
||||
diff --git a/src/components/KeyboardChatScrollView/types.ts b/src/components/KeyboardChatScrollView/types.ts
|
||||
index dd222b57bc7a71729524670bad3812f30920bd73..7be71b5460eb143ddf460ce5c87b843c66bfb2cd 100644
|
||||
index b7c98c8..e1012a8 100644
|
||||
--- a/src/components/KeyboardChatScrollView/types.ts
|
||||
+++ b/src/components/KeyboardChatScrollView/types.ts
|
||||
@@ -90,6 +90,17 @@ export type KeyboardChatScrollViewProps = {
|
||||
@@ -93,6 +93,17 @@ export type KeyboardChatScrollViewProps = {
|
||||
* Default is `undefined` (equivalent to `0` — no minimum floor).
|
||||
*/
|
||||
blankSpace?: SharedValue<number>;
|
||||
@@ -624,7 +636,7 @@ index dd222b57bc7a71729524670bad3812f30920bd73..7be71b5460eb143ddf460ce5c87b843c
|
||||
* Fires whenever the effective content inset changes — the static `contentInset`
|
||||
* prop combined with the dynamic keyboard-driven padding.
|
||||
diff --git a/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts b/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts
|
||||
index 37eacd10857cd70c51b3468c4b466e4959d0a415..3d77ab27c614f44b64da8270823942cb670b097b 100644
|
||||
index 37eacd1..3d77ab2 100644
|
||||
--- a/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts
|
||||
+++ b/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts
|
||||
@@ -245,6 +245,7 @@ export const computeIOSContentOffset = (
|
||||
@@ -653,7 +665,7 @@ index 37eacd10857cd70c51b3468c4b466e4959d0a415..3d77ab27c614f44b64da8270823942cb
|
||||
+ );
|
||||
};
|
||||
diff --git a/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts b/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
|
||||
index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605633192ed 100644
|
||||
index 129a74b..168ce1a 100644
|
||||
--- a/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
|
||||
+++ b/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
|
||||
@@ -43,6 +43,8 @@ function useChatKeyboard(
|
||||
@@ -665,7 +677,7 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
} = options;
|
||||
|
||||
const padding = useSharedValue(0);
|
||||
@@ -79,6 +81,10 @@ function useChatKeyboard(
|
||||
@@ -80,6 +82,10 @@ function useChatKeyboard(
|
||||
offset,
|
||||
);
|
||||
|
||||
@@ -676,7 +688,7 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
const atEnd = isScrollAtEnd(
|
||||
scroll.value,
|
||||
layout.value.height,
|
||||
@@ -104,10 +110,12 @@ function useChatKeyboard(
|
||||
@@ -105,10 +111,12 @@ function useChatKeyboard(
|
||||
effective,
|
||||
minimumPaddingAbsorbed,
|
||||
);
|
||||
@@ -691,9 +703,9 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
+ Math.max(blankSpace.value, effective + extraContentPadding.value) +
|
||||
+ adjustedInsetCompensation;
|
||||
|
||||
// persistent mode: when keyboard shrinks, clamp to valid range
|
||||
if (
|
||||
@@ -130,11 +138,11 @@ function useChatKeyboard(
|
||||
// `onInteractive` owns the native scroll offset. When its final
|
||||
// keyboardWillHide event arrives, consume the marker so this
|
||||
@@ -142,11 +150,11 @@ function useChatKeyboard(
|
||||
} else {
|
||||
const maxScroll = Math.max(
|
||||
size.value.height - layout.value.height + actualTotalPadding,
|
||||
@@ -707,7 +719,7 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
Math.min(scroll.value, maxScroll),
|
||||
);
|
||||
}
|
||||
@@ -165,11 +173,11 @@ function useChatKeyboard(
|
||||
@@ -177,11 +185,11 @@ function useChatKeyboard(
|
||||
} else {
|
||||
const maxScroll = Math.max(
|
||||
size.value.height - layout.value.height + actualTotalPadding,
|
||||
@@ -721,18 +733,18 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
Math.min(scroll.value, maxScroll),
|
||||
);
|
||||
}
|
||||
@@ -219,12 +227,34 @@ function useChatKeyboard(
|
||||
@@ -231,17 +239,36 @@ function useChatKeyboard(
|
||||
layout.value.height,
|
||||
inverted,
|
||||
actualTotalPadding,
|
||||
+ adjustedStartInsetCompensation,
|
||||
);
|
||||
},
|
||||
- onMove: () => {
|
||||
- onInteractive: () => {
|
||||
+ onMove: (e) => {
|
||||
"worklet";
|
||||
|
||||
- // iOS doesn't need per-frame updates (contentOffset handles it)
|
||||
- isInteractiveDismissal.value = true;
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -742,9 +754,13 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
+ targetKeyboardHeight.value,
|
||||
+ offset,
|
||||
+ );
|
||||
+ },
|
||||
},
|
||||
- onMove: () => {
|
||||
+ onInteractive: (e) => {
|
||||
+ "worklet";
|
||||
"worklet";
|
||||
|
||||
- // iOS doesn't need per-frame updates (contentOffset handles it)
|
||||
+ isInteractiveDismissal.value = true;
|
||||
+
|
||||
+ if (freeze.value) {
|
||||
+ return;
|
||||
@@ -758,7 +774,7 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
},
|
||||
onEnd: (e) => {
|
||||
"worklet";
|
||||
@@ -239,10 +269,18 @@ function useChatKeyboard(
|
||||
@@ -256,10 +283,18 @@ function useChatKeyboard(
|
||||
offset,
|
||||
);
|
||||
|
||||
@@ -779,7 +795,7 @@ index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..c375a8c4cc889c2fc2c0c1034788c605
|
||||
|
||||
return {
|
||||
diff --git a/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts b/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
|
||||
index 02abf5cd9490900826678175462b234e07e30e92..4ee0ddd65e0b105568ab43b73997af4be8adae00 100644
|
||||
index 02abf5c..4ee0ddd 100644
|
||||
--- a/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
|
||||
+++ b/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
|
||||
@@ -11,6 +11,10 @@ type UseChatKeyboardOptions = {
|
||||
@@ -794,7 +810,7 @@ index 02abf5cd9490900826678175462b234e07e30e92..4ee0ddd65e0b105568ab43b73997af4b
|
||||
|
||||
type UseChatKeyboardReturn = {
|
||||
diff --git a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
|
||||
index 833acbe78f1b1245251ddd3431d6546decdd0ade..8f7c10cb6ab392f10df4ca43549b89c25844f0b8 100644
|
||||
index c9c93f3..76a201d 100644
|
||||
--- a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
|
||||
+++ b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
|
||||
@@ -16,6 +16,10 @@ type UseExtraContentPaddingOptions = {
|
||||
@@ -808,7 +824,7 @@ index 833acbe78f1b1245251ddd3431d6546decdd0ade..8f7c10cb6ab392f10df4ca43549b89c2
|
||||
/** Current vertical scroll offset. */
|
||||
scroll: SharedValue<number>;
|
||||
/** Visible viewport dimensions. */
|
||||
@@ -49,6 +53,8 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
@@ -51,6 +55,8 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
extraContentPadding,
|
||||
keyboardPadding,
|
||||
blankSpace,
|
||||
@@ -817,7 +833,7 @@ index 833acbe78f1b1245251ddd3431d6546decdd0ade..8f7c10cb6ab392f10df4ca43549b89c2
|
||||
scroll,
|
||||
layout,
|
||||
size,
|
||||
@@ -97,14 +103,12 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
@@ -99,14 +105,12 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
}
|
||||
|
||||
// Compute effective delta considering blankSpace floor
|
||||
@@ -838,7 +854,7 @@ index 833acbe78f1b1245251ddd3431d6546decdd0ade..8f7c10cb6ab392f10df4ca43549b89c2
|
||||
const effectiveDelta = currentTotal - previousTotal;
|
||||
|
||||
if (effectiveDelta === 0) {
|
||||
@@ -137,16 +141,25 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
@@ -139,16 +143,25 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
|
||||
|
||||
scrollToTarget(target);
|
||||
} else {
|
||||
@@ -1,3 +1,19 @@
|
||||
diff --git a/ios/turbomodule/NativeNitroModules+NewArch.mm b/ios/turbomodule/NativeNitroModules+NewArch.mm
|
||||
--- a/ios/turbomodule/NativeNitroModules+NewArch.mm
|
||||
+++ b/ios/turbomodule/NativeNitroModules+NewArch.mm
|
||||
@@ -34,6 +34,12 @@
|
||||
}
|
||||
RCT_EXPORT_MODULE(NitroModules)
|
||||
|
||||
+// RN 0.87+ passes the CallInvoker directly when installing JSI bindings.
|
||||
+- (void)installJSIBindingsWithRuntime:(jsi::Runtime&)runtime callInvoker:(const std::shared_ptr<react::CallInvoker>&)callInvoker {
|
||||
+ _callInvoker = callInvoker;
|
||||
+ [self installJSIBindingsWithRuntime:runtime];
|
||||
+}
|
||||
+
|
||||
- (void)installJSIBindingsWithRuntime:(jsi::Runtime&)runtime {
|
||||
// 1. Get CallInvoker we cached statically
|
||||
std::shared_ptr<react::CallInvoker> callInvoker = _callInvoker.lock();
|
||||
diff --git a/package.json b/package.json
|
||||
index 4e4366fb9d05a6c250acfc62e79487475d8ac05b..200e4680d77cbb4f14d22eb986efde1275a0d3e8 100644
|
||||
--- a/package.json
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h
|
||||
index 20d042b00e4655a6647eff1a9a0890fae7e45175..fd08d36fd6c1f79adcfa0dc675420e42a9815d25 100644
|
||||
--- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h
|
||||
+++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h
|
||||
@@ -22,6 +22,7 @@ struct LayoutAnimation {
|
||||
Tag parentTag;
|
||||
std::optional<double> opacity;
|
||||
bool isViewAlreadyMounted = false;
|
||||
+ bool isExitingWhenSettled = false;
|
||||
int count = 1;
|
||||
LayoutAnimation &operator=(const LayoutAnimation &other) = default;
|
||||
|
||||
diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp
|
||||
index 0f08622518910486bb724b664e0a5dd692470b18..9f71dbc301e77656ab0c5dc453ade03eea7649f8 100644
|
||||
--- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp
|
||||
+++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp
|
||||
@@ -353,6 +353,7 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Experimental::endLayoutAnimation(
|
||||
if (--layoutAnimation.count > 0) {
|
||||
return {};
|
||||
}
|
||||
+ layoutAnimation.isExitingWhenSettled = shouldRemove;
|
||||
maybeSettledAnimationTags_.insert(tag);
|
||||
auto surfaceId = layoutAnimation.finalView.surfaceId;
|
||||
|
||||
@@ -478,7 +479,8 @@ void LayoutAnimationsProxy_Experimental::addOngoingAnimations(SurfaceId surfaceI
|
||||
|
||||
const auto layoutAnimationIt = layoutAnimations_.find(tag);
|
||||
|
||||
- if (layoutAnimationIt == layoutAnimations_.end() || layoutAnimationIt->second.isSettled()) {
|
||||
+ if (layoutAnimationIt == layoutAnimations_.end() ||
|
||||
+ (layoutAnimationIt->second.isSettled() && layoutAnimationIt->second.isExitingWhenSettled)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -635,6 +637,8 @@ void LayoutAnimationsProxy_Experimental::maybeCancelAnimation(const int tag) con
|
||||
}
|
||||
if (layoutAnimationIt->second.isSettled()) {
|
||||
// Already settled - cleanupAnimations will erase it together with its updateMap entry.
|
||||
+ // Do not flush a pending Update after the caller queues this view for removal.
|
||||
+ layoutAnimationIt->second.isExitingWhenSettled = true;
|
||||
return;
|
||||
}
|
||||
layoutAnimations_.erase(layoutAnimationIt);
|
||||
diff --git a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp
|
||||
index f9711f4eb6185ea99e08280ff90edd45e4152e12..ca812666ca54ec55d9d4409910b21ae97c721f2f 100644
|
||||
--- a/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp
|
||||
+++ b/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp
|
||||
@@ -228,6 +228,7 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Legacy::endLayoutAnimation(int ta
|
||||
if (--layoutAnimation.count > 0) {
|
||||
return {};
|
||||
}
|
||||
+ layoutAnimation.isExitingWhenSettled = shouldRemove;
|
||||
maybeSettledAnimationTags_.insert(tag);
|
||||
auto surfaceId = layoutAnimation.finalView.surfaceId;
|
||||
|
||||
@@ -531,12 +532,7 @@ void LayoutAnimationsProxy_Legacy::addOngoingAnimations(SurfaceId surfaceId, Sha
|
||||
auto layoutAnimationIt = layoutAnimations_.find(tag);
|
||||
|
||||
if (layoutAnimationIt == layoutAnimations_.end() ||
|
||||
- // A settled animation is normally cleaned up without applying further
|
||||
- // updates. The exception is a flaky entering animation whose opacity was
|
||||
- // never restored (the view wasn't mounted in time) - we still need to
|
||||
- // apply that pending opacity, otherwise the view stays invisible. Only
|
||||
- // entering animations carry an opacity value.
|
||||
- (layoutAnimationIt->second.isSettled() && !layoutAnimationIt->second.opacity.has_value())) {
|
||||
+ (layoutAnimationIt->second.isSettled() && layoutAnimationIt->second.isExitingWhenSettled)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt b/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt
|
||||
index fa1b77317f609983ae2434764174072e51130550..270c81c90971b0ff3038b999973dd4d128a9d140 100644
|
||||
index fa1b773..270c81c 100644
|
||||
--- a/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt
|
||||
+++ b/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt
|
||||
@@ -124,6 +124,34 @@ class ScreenStackHeaderConfigViewManager :
|
||||
@@ -38,7 +38,7 @@ index fa1b77317f609983ae2434764174072e51130550..270c81c90971b0ff3038b999973dd4d1
|
||||
config: ScreenStackHeaderConfig,
|
||||
titleFontFamily: String?,
|
||||
diff --git a/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt b/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt
|
||||
index 64f14f0c5ade16eb9519b8780d4ce013f88fbd3a..6cb1d69f97a95759c662a6006a9626925d9fefd9 100644
|
||||
index 64f14f0..6cb1d69 100644
|
||||
--- a/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt
|
||||
+++ b/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt
|
||||
@@ -47,6 +47,12 @@ class ScreenStackHeaderSubviewManager :
|
||||
@@ -55,7 +55,7 @@ index 64f14f0c5ade16eb9519b8780d4ce013f88fbd3a..6cb1d69f97a95759c662a6006a962692
|
||||
// however we must override their setters
|
||||
override fun setSynchronousShadowStateUpdatesEnabled(
|
||||
diff --git a/ios/RNSBarButtonItem.h b/ios/RNSBarButtonItem.h
|
||||
index a26d1254eafd89268f65d968988cf6a3b8c1e457..62eea42ac26c532801189556c5f51012c3df3a52 100644
|
||||
index a26d125..62eea42 100644
|
||||
--- a/ios/RNSBarButtonItem.h
|
||||
+++ b/ios/RNSBarButtonItem.h
|
||||
@@ -15,6 +15,10 @@ typedef void (^RNSBarButtonMenuItemAction)(NSString *menuId);
|
||||
@@ -70,7 +70,7 @@ index a26d1254eafd89268f65d968988cf6a3b8c1e457..62eea42ac26c532801189556c5f51012
|
||||
|
||||
@end
|
||||
diff --git a/ios/RNSBarButtonItem.mm b/ios/RNSBarButtonItem.mm
|
||||
index 0eb1f09dee82edd99e3e614938233db5cdeaebfe..73298f10807520970f625e166d7f5dd1338206f1 100644
|
||||
index 76a39d4..15bd5a9 100644
|
||||
--- a/ios/RNSBarButtonItem.mm
|
||||
+++ b/ios/RNSBarButtonItem.mm
|
||||
@@ -110,6 +110,58 @@ - (instancetype)initWithConfig:(NSDictionary<NSString *, id> *)dict
|
||||
@@ -132,8 +132,58 @@ index 0eb1f09dee82edd99e3e614938233db5cdeaebfe..73298f10807520970f625e166d7f5dd1
|
||||
|
||||
#if !TARGET_OS_TV || __TV_OS_VERSION_MAX_ALLOWED >= 170000
|
||||
if (@available(tvOS 17.0, *)) {
|
||||
diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm
|
||||
index c233036..0c2db42 100644
|
||||
--- a/ios/RNSScreenStack.mm
|
||||
+++ b/ios/RNSScreenStack.mm
|
||||
@@ -1076,6 +1076,15 @@ - (BOOL)scrollViewHasHorizontalPart:(UIScrollView *)scrollView
|
||||
return scrollView.contentSize.width > scrollView.frame.size.width;
|
||||
}
|
||||
|
||||
+// Whether a horizontally scrollable ScrollView is resting at its leading edge, so a
|
||||
+// pan in the back-gesture direction has nothing left to scroll. Checked in the
|
||||
+// ScrollView's own coordinate space: React Native mirrors the view for RTL layout,
|
||||
+// which keeps the leading edge at the minimum content offset in both directions.
|
||||
+- (BOOL)scrollViewIsAtLeadingEdge:(UIScrollView *)scrollView
|
||||
+{
|
||||
+ return scrollView.contentOffset.x <= -scrollView.adjustedContentInset.left + 1.0;
|
||||
+}
|
||||
+
|
||||
// Custom method for compatibility with iOS < 13.4
|
||||
// RNSScreenStackView is a UIGestureRecognizerDelegate for three types of gesture recognizers:
|
||||
// RNSPanGestureRecognizer, RNSScreenEdgeGestureRecognizer, _UIParallaxTransitionPanGestureRecognizer
|
||||
@@ -1169,9 +1178,11 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
if (gestureRecognizer == _controller.interactiveContentPopGestureRecognizer &&
|
||||
[self isScrollViewPanGestureRecognizer:otherGestureRecognizer]) {
|
||||
// ScrollView should take precedence when scrolling horizontally (it should be required to fail).
|
||||
- // However, if it does not allow for horizontal scrolling, there should be no such restriction,
|
||||
+ // However, if it does not allow for horizontal scrolling, or is already resting at its leading
|
||||
+ // edge so a back swipe has nothing left to scroll, there should be no such restriction,
|
||||
// and swiping horizontally should dismiss the screen.
|
||||
- return [self scrollViewHasHorizontalPart:static_cast<UIScrollView *>(otherGestureRecognizer.view)];
|
||||
+ UIScrollView *scrollView = static_cast<UIScrollView *>(otherGestureRecognizer.view);
|
||||
+ return [self scrollViewHasHorizontalPart:scrollView] && ![self scrollViewIsAtLeadingEdge:scrollView];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1191,6 +1202,15 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
// gestureRecognizer:shouldRequireFailureOfGestureRecognizer
|
||||
isEdgeSwipeGestureRecognizer =
|
||||
isEdgeSwipeGestureRecognizer && gestureRecognizer != _controller.interactiveContentPopGestureRecognizer;
|
||||
+
|
||||
+ // The exception is a horizontal ScrollView resting at its leading edge: its pan recognizer would
|
||||
+ // still begin (and merely bounce) on a back swipe, so it must yield to the pop gesture the same
|
||||
+ // way plain content does.
|
||||
+ if (gestureRecognizer == _controller.interactiveContentPopGestureRecognizer &&
|
||||
+ [self isScrollViewPanGestureRecognizer:otherGestureRecognizer]) {
|
||||
+ UIScrollView *scrollView = static_cast<UIScrollView *>(otherGestureRecognizer.view);
|
||||
+ return [self scrollViewHasHorizontalPart:scrollView] && [self scrollViewIsAtLeadingEdge:scrollView];
|
||||
+ }
|
||||
}
|
||||
#endif // check for iOS >= 26
|
||||
|
||||
diff --git a/ios/RNSScreenStackHeaderConfig.h b/ios/RNSScreenStackHeaderConfig.h
|
||||
index 8a41697223f6c4b5cb2dd6d450fc58cbb3b27536..309ba2f762068dcf452c172f7c7cbf2a55d03cb2 100644
|
||||
index 8a41697..309ba2f 100644
|
||||
--- a/ios/RNSScreenStackHeaderConfig.h
|
||||
+++ b/ios/RNSScreenStackHeaderConfig.h
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -159,7 +209,7 @@ index 8a41697223f6c4b5cb2dd6d450fc58cbb3b27536..309ba2f762068dcf452c172f7c7cbf2a
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
diff --git a/ios/RNSScreenStackHeaderConfig.mm b/ios/RNSScreenStackHeaderConfig.mm
|
||||
index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab60e185033 100644
|
||||
index a54cb63..4ff30b3 100644
|
||||
--- a/ios/RNSScreenStackHeaderConfig.mm
|
||||
+++ b/ios/RNSScreenStackHeaderConfig.mm
|
||||
@@ -24,11 +24,46 @@
|
||||
@@ -760,7 +810,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
+ BOOL reuseToolbarItems = navctr.topViewController == vc &&
|
||||
+ navctr.isToolbarHidden == (toolbarConfigsKey.count == 0) &&
|
||||
+ [objc_getAssociatedObject(navitem, &RNSAppliedToolbarConfigsKey) isEqual:toolbarCacheKey];
|
||||
+ if (!reuseToolbarItems) {
|
||||
+ if (navctr.topViewController == vc && !reuseToolbarItems) {
|
||||
+ NSArray<UIBarButtonItem *> *toolbarItems = [config barButtonItemsFromConfigs:navigationToolbarConfigs
|
||||
+ withCurrentItems:@[]
|
||||
+ navigationItem:navitem
|
||||
@@ -778,7 +828,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
|
||||
// Setting navigation bar visibility is split to mitigate iOS 26 bug with bar button items
|
||||
// (setting nav bar visibility should be done after `navitem.*BarButtonItems`).
|
||||
@@ -784,6 +1289,8 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
@@ -784,6 +1298,8 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
|
||||
- (NSArray<UIBarButtonItem *> *)barButtonItemsFromConfigs:(NSArray<NSDictionary<NSString *, id> *> *)dicts
|
||||
withCurrentItems:(NSArray<UIBarButtonItem *> *)currentItems
|
||||
@@ -787,7 +837,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
{
|
||||
if (dicts.count == 0) {
|
||||
return currentItems;
|
||||
@@ -792,7 +1299,200 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
@@ -792,7 +1308,200 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
[items addObjectsFromArray:currentItems];
|
||||
for (NSUInteger i = 0; i < dicts.count; i++) {
|
||||
NSDictionary *dict = dicts[i];
|
||||
@@ -989,7 +1039,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
RNSBarButtonItem *item = [[RNSBarButtonItem alloc] initWithConfig:dict
|
||||
action:^(NSString *buttonId) {
|
||||
auto eventEmitter = std::static_pointer_cast<const facebook::react::RNSScreenStackHeaderConfigEventEmitter>(
|
||||
@@ -814,19 +1514,23 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
@@ -814,19 +1523,23 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
}
|
||||
imageLoader:_imageLoader];
|
||||
NSNumber *index = dict[@"index"];
|
||||
@@ -1019,7 +1069,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
[items insertObject:item atIndex:index.integerValue];
|
||||
} else {
|
||||
[items addObject:item];
|
||||
@@ -836,6 +1540,47 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
@@ -836,6 +1549,47 @@ - (void)applySemanticContentAttributeIfNeededToNavCtrl:(UINavigationController *
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1117,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
RNS_IGNORE_SUPER_CALL_BEGIN
|
||||
- (void)insertReactSubview:(RNSScreenStackHeaderSubview *)subview atIndex:(NSInteger)atIndex
|
||||
{
|
||||
@@ -1023,6 +1768,8 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
@@ -1025,6 +1779,8 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
}
|
||||
|
||||
_title = RCTNSStringFromStringNilIfEmpty(newScreenProps.title);
|
||||
@@ -1076,7 +1126,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
if (newScreenProps.titleFontFamily != oldScreenProps.titleFontFamily) {
|
||||
_titleFontFamily = RCTNSStringFromStringNilIfEmpty(newScreenProps.titleFontFamily);
|
||||
}
|
||||
@@ -1048,6 +1795,7 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
@@ -1050,6 +1806,7 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
_disableBackButtonMenu = newScreenProps.disableBackButtonMenu;
|
||||
_backButtonDisplayMode =
|
||||
[RNSConvert UINavigationItemBackButtonDisplayModeFromCppEquivalent:newScreenProps.backButtonDisplayMode];
|
||||
@@ -1084,7 +1134,7 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
|
||||
if (newScreenProps.userInterfaceStyle != oldScreenProps.userInterfaceStyle) {
|
||||
_userInterfaceStyle = [RNSConvert UIUserInterfaceStyleFromCppEquivalent:newScreenProps.userInterfaceStyle];
|
||||
@@ -1094,6 +1842,30 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
@@ -1096,6 +1853,30 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
_headerRightBarButtonItems = array;
|
||||
}
|
||||
|
||||
@@ -1115,57 +1165,8 @@ index 1c844846a5c66e31cfa530ca462774d2fb6bbea1..a60b96b44e85d3f4b29dc0d190b95ab6
|
||||
[self updateViewControllerIfNeeded];
|
||||
|
||||
if (needsNavigationControllerLayout) {
|
||||
diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm
|
||||
--- a/ios/RNSScreenStack.mm
|
||||
+++ b/ios/RNSScreenStack.mm
|
||||
@@ -1074,6 +1074,15 @@ RNS_IGNORE_SUPER_CALL_END
|
||||
return scrollView.contentSize.width > scrollView.frame.size.width;
|
||||
}
|
||||
|
||||
+// Whether a horizontally scrollable ScrollView is resting at its leading edge, so a
|
||||
+// pan in the back-gesture direction has nothing left to scroll. Checked in the
|
||||
+// ScrollView's own coordinate space: React Native mirrors the view for RTL layout,
|
||||
+// which keeps the leading edge at the minimum content offset in both directions.
|
||||
+- (BOOL)scrollViewIsAtLeadingEdge:(UIScrollView *)scrollView
|
||||
+{
|
||||
+ return scrollView.contentOffset.x <= -scrollView.adjustedContentInset.left + 1.0;
|
||||
+}
|
||||
+
|
||||
// Custom method for compatibility with iOS < 13.4
|
||||
// RNSScreenStackView is a UIGestureRecognizerDelegate for three types of gesture recognizers:
|
||||
// RNSPanGestureRecognizer, RNSScreenEdgeGestureRecognizer, _UIParallaxTransitionPanGestureRecognizer
|
||||
@@ -1167,9 +1176,11 @@ RNS_IGNORE_SUPER_CALL_END
|
||||
if (gestureRecognizer == _controller.interactiveContentPopGestureRecognizer &&
|
||||
[self isScrollViewPanGestureRecognizer:otherGestureRecognizer]) {
|
||||
// ScrollView should take precedence when scrolling horizontally (it should be required to fail).
|
||||
- // However, if it does not allow for horizontal scrolling, there should be no such restriction,
|
||||
+ // However, if it does not allow for horizontal scrolling, or is already resting at its leading
|
||||
+ // edge so a back swipe has nothing left to scroll, there should be no such restriction,
|
||||
// and swiping horizontally should dismiss the screen.
|
||||
- return [self scrollViewHasHorizontalPart:static_cast<UIScrollView *>(otherGestureRecognizer.view)];
|
||||
+ UIScrollView *scrollView = static_cast<UIScrollView *>(otherGestureRecognizer.view);
|
||||
+ return [self scrollViewHasHorizontalPart:scrollView] && ![self scrollViewIsAtLeadingEdge:scrollView];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1189,6 +1200,15 @@ RNS_IGNORE_SUPER_CALL_END
|
||||
// gestureRecognizer:shouldRequireFailureOfGestureRecognizer
|
||||
isEdgeSwipeGestureRecognizer =
|
||||
isEdgeSwipeGestureRecognizer && gestureRecognizer != _controller.interactiveContentPopGestureRecognizer;
|
||||
+
|
||||
+ // The exception is a horizontal ScrollView resting at its leading edge: its pan recognizer would
|
||||
+ // still begin (and merely bounce) on a back swipe, so it must yield to the pop gesture the same
|
||||
+ // way plain content does.
|
||||
+ if (gestureRecognizer == _controller.interactiveContentPopGestureRecognizer &&
|
||||
+ [self isScrollViewPanGestureRecognizer:otherGestureRecognizer]) {
|
||||
+ UIScrollView *scrollView = static_cast<UIScrollView *>(otherGestureRecognizer.view);
|
||||
+ return [self scrollViewHasHorizontalPart:scrollView] && [self scrollViewIsAtLeadingEdge:scrollView];
|
||||
+ }
|
||||
}
|
||||
#endif // check for iOS >= 26
|
||||
|
||||
diff --git a/ios/RNSScreenStackHeaderSubview.mm b/ios/RNSScreenStackHeaderSubview.mm
|
||||
index add33c4807e038dcd846f6c72b2fc472ded02809..489afa5fa2da09c1ec6986d1832b58bb595396ae 100644
|
||||
index add33c4..489afa5 100644
|
||||
--- a/ios/RNSScreenStackHeaderSubview.mm
|
||||
+++ b/ios/RNSScreenStackHeaderSubview.mm
|
||||
@@ -20,7 +20,9 @@ @implementation RNSScreenStackHeaderSubview {
|
||||
@@ -1178,7 +1179,7 @@ index add33c4807e038dcd846f6c72b2fc472ded02809..489afa5fa2da09c1ec6986d1832b58bb
|
||||
}
|
||||
|
||||
#pragma mark - Common
|
||||
@@ -102,5 +104,24 @@ - (void)updateShadowStateWithFrame:(CGRect)frame
|
||||
@@ -102,6 +104,25 @@ - (void)updateShadowStateWithFrame:(CGRect)frame
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
@@ -1203,6 +1204,7 @@ index add33c4807e038dcd846f6c72b2fc472ded02809..489afa5fa2da09c1ec6986d1832b58bb
|
||||
+#endif
|
||||
[self updateShadowStateInContextOfAncestorView:[self findNavigationBar]];
|
||||
}
|
||||
|
||||
@@ -124,6 +145,7 @@ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::
|
||||
const auto &newHeaderSubviewProps = *std::static_pointer_cast<const react::RNSScreenStackHeaderSubviewProps>(props);
|
||||
|
||||
@@ -1251,10 +1253,10 @@ index add33c4807e038dcd846f6c72b2fc472ded02809..489afa5fa2da09c1ec6986d1832b58bb
|
||||
|
||||
// Needed because of this: https://github.com/facebook/react-native/pull/37274
|
||||
diff --git a/lib/commonjs/components/ScreenStackHeaderConfig.js b/lib/commonjs/components/ScreenStackHeaderConfig.js
|
||||
index 8c509f2657105cfd86448347c1a01fb73651ff9e..e668e089a1788973cb122a150be7846364a2a2cf 100644
|
||||
index 6e68cd1..9e09485 100644
|
||||
--- a/lib/commonjs/components/ScreenStackHeaderConfig.js
|
||||
+++ b/lib/commonjs/components/ScreenStackHeaderConfig.js
|
||||
@@ -26,17 +26,42 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
@@ -31,17 +31,42 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
} = (0, _EdgeInsetApplicationContext.useEdgeInsetApplication)(!props.hidden, props.disableTopInsetApplication ?? false, props.disableLeftInsetApplication ?? false, props.disableRightInsetApplication ?? false, props.disableBottomInsetApplication ?? false);
|
||||
const {
|
||||
headerLeftBarButtonItems,
|
||||
@@ -1300,7 +1302,7 @@ index 8c509f2657105cfd86448347c1a01fb73651ff9e..e668e089a1788973cb122a150be78463
|
||||
}
|
||||
} : undefined;
|
||||
|
||||
@@ -59,7 +84,7 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
@@ -64,7 +89,7 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
};
|
||||
|
||||
// Check each bar-button item with a menu
|
||||
@@ -1309,7 +1311,7 @@ index 8c509f2657105cfd86448347c1a01fb73651ff9e..e668e089a1788973cb122a150be78463
|
||||
for (const item of allItems) {
|
||||
if (item && item.type === 'menu' && item.menu) {
|
||||
const action = findInMenu(item.menu, event.nativeEvent.menuId);
|
||||
@@ -67,6 +92,15 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
@@ -72,6 +97,15 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
action.onPress();
|
||||
return;
|
||||
}
|
||||
@@ -1325,7 +1327,7 @@ index 8c509f2657105cfd86448347c1a01fb73651ff9e..e668e089a1788973cb122a150be78463
|
||||
}
|
||||
}
|
||||
} : undefined;
|
||||
@@ -74,6 +108,8 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
@@ -79,6 +113,8 @@ const ScreenStackHeaderConfig = exports.ScreenStackHeaderConfig = /*#__PURE__*/_
|
||||
userInterfaceStyle: props.experimental_userInterfaceStyle,
|
||||
headerLeftBarButtonItems: preparedHeaderLeftBarButtonItems,
|
||||
headerRightBarButtonItems: preparedHeaderRightBarButtonItems,
|
||||
@@ -1335,19 +1337,19 @@ index 8c509f2657105cfd86448347c1a01fb73651ff9e..e668e089a1788973cb122a150be78463
|
||||
onPressHeaderBarButtonMenuItem: onPressHeaderBarButtonMenuItem,
|
||||
ref: ref,
|
||||
diff --git a/lib/commonjs/components/helpers/prepareHeaderBarButtonItems.js b/lib/commonjs/components/helpers/prepareHeaderBarButtonItems.js
|
||||
index ab93f62e4a7049d63c6681cecbd6cf8b1d07ce10..9dca2ab640e92161eb647b819a989acd0d41d9fe 100644
|
||||
index 589b6cc..b584624 100644
|
||||
--- a/lib/commonjs/components/helpers/prepareHeaderBarButtonItems.js
|
||||
+++ b/lib/commonjs/components/helpers/prepareHeaderBarButtonItems.js
|
||||
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports.prepareHeaderBarButtonItems = void 0;
|
||||
var _reactNative = require("react-native");
|
||||
@@ -8,7 +8,7 @@ var _reactNative = require("react-native");
|
||||
// Local nominal type so declaration emit doesn't resolve the RN alias down to
|
||||
// the non-public `types_generated/.../AssetSourceResolver#ResolvedAssetSource`.
|
||||
|
||||
-const prepareMenu = (menu, index, side, path = '') => {
|
||||
+const prepareMenu = (menu, index, placement, path = '') => {
|
||||
return {
|
||||
...menu,
|
||||
items: menu.items.map((menuItem, menuIndex) => {
|
||||
@@ -26,7 +26,7 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
@@ -29,7 +29,7 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -1356,7 +1358,7 @@ index ab93f62e4a7049d63c6681cecbd6cf8b1d07ce10..9dca2ab640e92161eb647b819a989acd
|
||||
};
|
||||
}
|
||||
return {
|
||||
@@ -35,16 +35,40 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
@@ -38,16 +38,40 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -1400,7 +1402,7 @@ index ab93f62e4a7049d63c6681cecbd6cf8b1d07ce10..9dca2ab640e92161eb647b819a989acd
|
||||
let imageSource, templateSource;
|
||||
if (item.icon?.type === 'imageSource') {
|
||||
imageSource = _reactNative.Image.resolveAssetSource(item.icon.imageSource);
|
||||
@@ -77,17 +101,17 @@ const prepareHeaderBarButtonItems = (barButtonItems, side) => {
|
||||
@@ -80,17 +104,17 @@ const prepareHeaderBarButtonItems = (barButtonItems, side) => {
|
||||
if (item.type === 'button') {
|
||||
return {
|
||||
...processedItem,
|
||||
@@ -1423,10 +1425,10 @@ index ab93f62e4a7049d63c6681cecbd6cf8b1d07ce10..9dca2ab640e92161eb647b819a989acd
|
||||
//# sourceMappingURL=prepareHeaderBarButtonItems.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/module/components/ScreenStackHeaderConfig.js b/lib/module/components/ScreenStackHeaderConfig.js
|
||||
index 68e3ba6a78314aba908d07098bb6982d11e6ee80..db5d17bfdac19ed3e664b55b6a73ce49766ac7c5 100644
|
||||
index 242898c..7cebaa3 100644
|
||||
--- a/lib/module/components/ScreenStackHeaderConfig.js
|
||||
+++ b/lib/module/components/ScreenStackHeaderConfig.js
|
||||
@@ -22,17 +22,42 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
@@ -27,17 +27,42 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
} = useEdgeInsetApplication(!props.hidden, props.disableTopInsetApplication ?? false, props.disableLeftInsetApplication ?? false, props.disableRightInsetApplication ?? false, props.disableBottomInsetApplication ?? false);
|
||||
const {
|
||||
headerLeftBarButtonItems,
|
||||
@@ -1472,7 +1474,7 @@ index 68e3ba6a78314aba908d07098bb6982d11e6ee80..db5d17bfdac19ed3e664b55b6a73ce49
|
||||
}
|
||||
} : undefined;
|
||||
|
||||
@@ -55,7 +80,7 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
@@ -60,7 +85,7 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
};
|
||||
|
||||
// Check each bar-button item with a menu
|
||||
@@ -1481,7 +1483,7 @@ index 68e3ba6a78314aba908d07098bb6982d11e6ee80..db5d17bfdac19ed3e664b55b6a73ce49
|
||||
for (const item of allItems) {
|
||||
if (item && item.type === 'menu' && item.menu) {
|
||||
const action = findInMenu(item.menu, event.nativeEvent.menuId);
|
||||
@@ -63,6 +88,15 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
@@ -68,6 +93,15 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
action.onPress();
|
||||
return;
|
||||
}
|
||||
@@ -1497,7 +1499,7 @@ index 68e3ba6a78314aba908d07098bb6982d11e6ee80..db5d17bfdac19ed3e664b55b6a73ce49
|
||||
}
|
||||
}
|
||||
} : undefined;
|
||||
@@ -70,6 +104,8 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
@@ -75,6 +109,8 @@ export const ScreenStackHeaderConfig = /*#__PURE__*/React.forwardRef((props, ref
|
||||
userInterfaceStyle: props.experimental_userInterfaceStyle,
|
||||
headerLeftBarButtonItems: preparedHeaderLeftBarButtonItems,
|
||||
headerRightBarButtonItems: preparedHeaderRightBarButtonItems,
|
||||
@@ -1507,17 +1509,19 @@ index 68e3ba6a78314aba908d07098bb6982d11e6ee80..db5d17bfdac19ed3e664b55b6a73ce49
|
||||
onPressHeaderBarButtonMenuItem: onPressHeaderBarButtonMenuItem,
|
||||
ref: ref,
|
||||
diff --git a/lib/module/components/helpers/prepareHeaderBarButtonItems.js b/lib/module/components/helpers/prepareHeaderBarButtonItems.js
|
||||
index 8a70ffd78617147418d628c03c580bb7ff9a8a72..bca930372d2a7c3f8e0a35c3dcf28474f899f21c 100644
|
||||
index 24bf271..693cfad 100644
|
||||
--- a/lib/module/components/helpers/prepareHeaderBarButtonItems.js
|
||||
+++ b/lib/module/components/helpers/prepareHeaderBarButtonItems.js
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Image, processColor } from 'react-native';
|
||||
@@ -3,7 +3,7 @@ import { Image, processColor } from 'react-native';
|
||||
// Local nominal type so declaration emit doesn't resolve the RN alias down to
|
||||
// the non-public `types_generated/.../AssetSourceResolver#ResolvedAssetSource`.
|
||||
|
||||
-const prepareMenu = (menu, index, side, path = '') => {
|
||||
+const prepareMenu = (menu, index, placement, path = '') => {
|
||||
return {
|
||||
...menu,
|
||||
items: menu.items.map((menuItem, menuIndex) => {
|
||||
@@ -20,7 +20,7 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
@@ -24,7 +24,7 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -1526,7 +1530,7 @@ index 8a70ffd78617147418d628c03c580bb7ff9a8a72..bca930372d2a7c3f8e0a35c3dcf28474
|
||||
};
|
||||
}
|
||||
return {
|
||||
@@ -29,16 +29,40 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
@@ -33,16 +33,40 @@ const prepareMenu = (menu, index, side, path = '') => {
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -1570,7 +1574,7 @@ index 8a70ffd78617147418d628c03c580bb7ff9a8a72..bca930372d2a7c3f8e0a35c3dcf28474
|
||||
let imageSource, templateSource;
|
||||
if (item.icon?.type === 'imageSource') {
|
||||
imageSource = Image.resolveAssetSource(item.icon.imageSource);
|
||||
@@ -71,16 +95,16 @@ export const prepareHeaderBarButtonItems = (barButtonItems, side) => {
|
||||
@@ -75,16 +99,16 @@ export const prepareHeaderBarButtonItems = (barButtonItems, side) => {
|
||||
if (item.type === 'button') {
|
||||
return {
|
||||
...processedItem,
|
||||
@@ -1592,17 +1596,19 @@ index 8a70ffd78617147418d628c03c580bb7ff9a8a72..bca930372d2a7c3f8e0a35c3dcf28474
|
||||
//# sourceMappingURL=prepareHeaderBarButtonItems.js.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/typescript/components/helpers/prepareHeaderBarButtonItems.d.ts b/lib/typescript/components/helpers/prepareHeaderBarButtonItems.d.ts
|
||||
index c41ef943e554754f599f2fcd157dd0dc61d78b7e..ed02d44f78ee3f1387ba93bf292be2b99bb0e3b3 100644
|
||||
index 4704a14..e2e2b78 100644
|
||||
--- a/lib/typescript/components/helpers/prepareHeaderBarButtonItems.d.ts
|
||||
+++ b/lib/typescript/components/helpers/prepareHeaderBarButtonItems.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import { HeaderBarButtonItem } from 'react-native-screens/types';
|
||||
-export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButtonItem[], side: "left" | "right") => (import("react-native-screens/types").HeaderBarButtonItemSpacing | {
|
||||
+export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButtonItem[], side: "left" | "right" | "center" | "toolbar") => (import("react-native-screens/types").HeaderBarButtonItemSpacing | {
|
||||
@@ -2,7 +2,7 @@ import type { ImageResolvedAssetSource } from 'react-native';
|
||||
import type { HeaderBarButtonItem } from '../../types';
|
||||
export interface ResolvedImageAsset extends ImageResolvedAssetSource {
|
||||
}
|
||||
-export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButtonItem[], side: "left" | "right") => (import("../..").HeaderBarButtonItemSpacing | {
|
||||
+export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButtonItem[], side: "left" | "right" | "center" | "toolbar") => (import("../..").HeaderBarButtonItemSpacing | {
|
||||
buttonId: string;
|
||||
imageSource: import("react-native").ImageResolvedAssetSource | undefined;
|
||||
templateSource: import("react-native").ImageResolvedAssetSource | undefined;
|
||||
@@ -161,5 +161,5 @@ export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButt
|
||||
imageSource: ResolvedImageAsset | undefined;
|
||||
templateSource: ResolvedImageAsset | undefined;
|
||||
@@ -164,5 +164,5 @@ export declare const prepareHeaderBarButtonItems: (barButtonItems: HeaderBarButt
|
||||
identifier?: string | undefined;
|
||||
accessibilityLabel?: string | undefined;
|
||||
accessibilityHint?: string | undefined;
|
||||
@@ -1611,7 +1617,7 @@ index c41ef943e554754f599f2fcd157dd0dc61d78b7e..ed02d44f78ee3f1387ba93bf292be2b9
|
||||
//# sourceMappingURL=prepareHeaderBarButtonItems.d.ts.map
|
||||
\ No newline at end of file
|
||||
diff --git a/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts b/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts
|
||||
index a51d8648567cff29cd2be0d5262bd15c6fc69c61..8b7439aff4d7e6fe8a72bf0bac93c3c19568b1a6 100644
|
||||
index ec39792..434bccf 100644
|
||||
--- a/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts
|
||||
+++ b/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts
|
||||
@@ -9,6 +9,7 @@ type OnPressHeaderBarButtonMenuItemEvent = Readonly<{
|
||||
@@ -1647,7 +1653,7 @@ index a51d8648567cff29cd2be0d5262bd15c6fc69c61..8b7439aff4d7e6fe8a72bf0bac93c3c1
|
||||
onPressHeaderBarButtonMenuItem?: CT.DirectEventHandler<OnPressHeaderBarButtonMenuItemEvent> | undefined;
|
||||
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
|
||||
diff --git a/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts b/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts
|
||||
index 1ca926e6753294861f5f79ab6267dc7999f70639..94e676fdb08ff9d1cf81a1cf06a45e931b5461f1 100644
|
||||
index 2cb1a79..d6ca5a4 100644
|
||||
--- a/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts
|
||||
+++ b/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts
|
||||
@@ -3,6 +3,7 @@ export type HeaderSubviewTypes = 'back' | 'right' | 'left' | 'title' | 'center'
|
||||
@@ -1657,12 +1663,12 @@ index 1ca926e6753294861f5f79ab6267dc7999f70639..94e676fdb08ff9d1cf81a1cf06a45e93
|
||||
+ identifier?: string | undefined;
|
||||
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
|
||||
}
|
||||
declare const _default: import("react-native").HostComponent<NativeProps>;
|
||||
declare const _default: HostComponent<NativeProps>;
|
||||
diff --git a/lib/typescript/types.d.ts b/lib/typescript/types.d.ts
|
||||
index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90b91d826a 100644
|
||||
index ff37881..b487303 100644
|
||||
--- a/lib/typescript/types.d.ts
|
||||
+++ b/lib/typescript/types.d.ts
|
||||
@@ -10,6 +10,7 @@ export type SearchBarCommands = {
|
||||
@@ -19,6 +19,7 @@ export type SearchBarCommands = {
|
||||
cancelSearch: () => void;
|
||||
};
|
||||
export type BackButtonDisplayMode = 'default' | 'generic' | 'minimal';
|
||||
@@ -1670,7 +1676,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
export type StackPresentationTypes = 'push' | 'modal' | 'transparentModal' | 'containedModal' | 'containedTransparentModal' | 'fullScreenModal' | 'formSheet' | 'pageSheet';
|
||||
export type StackAnimationTypes = 'default' | 'fade' | 'fade_from_bottom' | 'flip' | 'none' | 'simple_push' | 'slide_from_bottom' | 'slide_from_right' | 'slide_from_left' | 'ios_from_right' | 'ios_from_left';
|
||||
export type BlurEffectTypes = BlurEffect;
|
||||
@@ -631,6 +632,14 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -650,6 +651,14 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* @platform ios
|
||||
*/
|
||||
backButtonDisplayMode?: BackButtonDisplayMode | undefined;
|
||||
@@ -1685,7 +1691,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
/**
|
||||
* Array of UIBarButtomItems to the left side of the header.
|
||||
*
|
||||
@@ -643,6 +652,26 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -662,6 +671,26 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* @platform ios
|
||||
*/
|
||||
headerRightBarButtonItems?: HeaderBarButtonItem[] | undefined;
|
||||
@@ -1712,7 +1718,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
/**
|
||||
* When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.
|
||||
*/
|
||||
@@ -704,6 +733,20 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -723,6 +752,20 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* String that can be displayed in the header as a fallback for `headerTitle`.
|
||||
*/
|
||||
title?: string | undefined;
|
||||
@@ -1733,7 +1739,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
/**
|
||||
* Allows for setting text color of the title.
|
||||
*/
|
||||
@@ -999,6 +1042,13 @@ export interface SearchBarProps {
|
||||
@@ -1018,6 +1061,13 @@ export interface SearchBarProps {
|
||||
shouldShowHintSearchIcon?: boolean | undefined;
|
||||
}
|
||||
export interface ScreenStackHeaderSubviewProps {
|
||||
@@ -1747,7 +1753,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
/**
|
||||
* A boolean value indicating whether the background this item may share with other items in the bar should be hidden.
|
||||
* Only applicable to type="right" and type="left" subviews.
|
||||
@@ -1037,6 +1087,11 @@ interface SharedHeaderBarButtonItem {
|
||||
@@ -1056,6 +1106,11 @@ interface SharedHeaderBarButtonItem {
|
||||
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
||||
*/
|
||||
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
||||
@@ -1759,7 +1765,7 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
/**
|
||||
* The tint color to apply to the item.
|
||||
*
|
||||
@@ -1181,8 +1236,38 @@ export interface HeaderBarButtonItemWithMenu extends SharedHeaderBarButtonItem {
|
||||
@@ -1201,8 +1256,38 @@ export interface HeaderBarButtonItemWithMenu extends SharedHeaderBarButtonItem {
|
||||
export interface HeaderBarButtonItemSpacing {
|
||||
type: 'spacing';
|
||||
spacing: number;
|
||||
@@ -1800,10 +1806,10 @@ index 10a31341f4eff258a7f8ea6abae3eddf0dd21218..bab5031f5f9b246f15e5396f3f2fee90
|
||||
* Custom Screen Transition
|
||||
*/
|
||||
diff --git a/src/components/ScreenStackHeaderConfig.tsx b/src/components/ScreenStackHeaderConfig.tsx
|
||||
index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e87640767 100644
|
||||
index 509d6cd..761e49b 100644
|
||||
--- a/src/components/ScreenStackHeaderConfig.tsx
|
||||
+++ b/src/components/ScreenStackHeaderConfig.tsx
|
||||
@@ -48,7 +48,12 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -54,7 +54,12 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
props.disableBottomInsetApplication ?? false,
|
||||
);
|
||||
|
||||
@@ -1817,7 +1823,7 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
|
||||
const preparedHeaderLeftBarButtonItems =
|
||||
headerLeftBarButtonItems && isHeaderBarButtonsAvailableForCurrentPlatform
|
||||
@@ -58,22 +63,36 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -64,22 +69,36 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
headerRightBarButtonItems && isHeaderBarButtonsAvailableForCurrentPlatform
|
||||
? prepareHeaderBarButtonItems(headerRightBarButtonItems, 'right')
|
||||
: undefined;
|
||||
@@ -1858,7 +1864,7 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
);
|
||||
if (
|
||||
pressedItem &&
|
||||
@@ -81,6 +100,32 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -87,6 +106,32 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
pressedItem.onPress
|
||||
) {
|
||||
pressedItem.onPress();
|
||||
@@ -1891,7 +1897,7 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
}
|
||||
}
|
||||
: undefined;
|
||||
@@ -111,6 +156,8 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -117,6 +162,8 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
const allItems = [
|
||||
...(preparedHeaderLeftBarButtonItems ?? []),
|
||||
...(preparedHeaderRightBarButtonItems ?? []),
|
||||
@@ -1900,7 +1906,7 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
];
|
||||
for (const item of allItems) {
|
||||
if (item && item.type === 'menu' && item.menu) {
|
||||
@@ -119,6 +166,17 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -125,6 +172,17 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
action.onPress();
|
||||
return;
|
||||
}
|
||||
@@ -1918,7 +1924,7 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,6 +188,8 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
@@ -136,6 +194,8 @@ export const ScreenStackHeaderConfig = React.forwardRef<
|
||||
userInterfaceStyle={props.experimental_userInterfaceStyle}
|
||||
headerLeftBarButtonItems={preparedHeaderLeftBarButtonItems}
|
||||
headerRightBarButtonItems={preparedHeaderRightBarButtonItems}
|
||||
@@ -1928,10 +1934,10 @@ index c3a88b6f6c8362cf717372a35cdc35a6b397bdd0..9e8173da567933fd3f6819fb26bf4a0e
|
||||
onPressHeaderBarButtonMenuItem={onPressHeaderBarButtonMenuItem}
|
||||
ref={ref}
|
||||
diff --git a/src/components/helpers/prepareHeaderBarButtonItems.ts b/src/components/helpers/prepareHeaderBarButtonItems.ts
|
||||
index be2c24dfee77f5883b5ab1d7473be80933b5dc6f..2008a342f13806641909c19a9f4ab6829f239016 100644
|
||||
index 19ab7bc..9fd5ceb 100644
|
||||
--- a/src/components/helpers/prepareHeaderBarButtonItems.ts
|
||||
+++ b/src/components/helpers/prepareHeaderBarButtonItems.ts
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
@@ -12,7 +12,7 @@ export interface ResolvedImageAsset extends ImageResolvedAssetSource {}
|
||||
const prepareMenu = (
|
||||
menu: HeaderBarButtonItemWithMenu['menu'],
|
||||
index: number,
|
||||
@@ -1940,7 +1946,7 @@ index be2c24dfee77f5883b5ab1d7473be80933b5dc6f..2008a342f13806641909c19a9f4ab682
|
||||
path: string = '',
|
||||
): HeaderBarButtonItemWithMenu['menu'] => {
|
||||
return {
|
||||
@@ -34,7 +34,7 @@ const prepareMenu = (
|
||||
@@ -39,7 +39,7 @@ const prepareMenu = (
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -1949,7 +1955,7 @@ index be2c24dfee77f5883b5ab1d7473be80933b5dc6f..2008a342f13806641909c19a9f4ab682
|
||||
};
|
||||
}
|
||||
return {
|
||||
@@ -43,20 +43,53 @@ const prepareMenu = (
|
||||
@@ -48,20 +48,53 @@ const prepareMenu = (
|
||||
xcassetName,
|
||||
imageSource,
|
||||
templateSource,
|
||||
@@ -2004,10 +2010,10 @@ index be2c24dfee77f5883b5ab1d7473be80933b5dc6f..2008a342f13806641909c19a9f4ab682
|
||||
+ composeMenu: item.composeMenu ? prepareMenu(item.composeMenu, index, placement, 'compose') : undefined,
|
||||
+ };
|
||||
+ }
|
||||
let imageSource, templateSource;
|
||||
let imageSource: ResolvedImageAsset | undefined,
|
||||
templateSource: ResolvedImageAsset | undefined;
|
||||
if (item.icon?.type === 'imageSource') {
|
||||
imageSource = Image.resolveAssetSource(item.icon.imageSource);
|
||||
@@ -91,15 +124,15 @@ export const prepareHeaderBarButtonItems = (
|
||||
@@ -97,15 +130,15 @@ export const prepareHeaderBarButtonItems = (
|
||||
if (item.type === 'button') {
|
||||
return {
|
||||
...processedItem,
|
||||
@@ -2027,10 +2033,10 @@ index be2c24dfee77f5883b5ab1d7473be80933b5dc6f..2008a342f13806641909c19a9f4ab682
|
||||
+ }).filter(item => item !== null);
|
||||
};
|
||||
diff --git a/src/fabric/ScreenStackHeaderConfigNativeComponent.ts b/src/fabric/ScreenStackHeaderConfigNativeComponent.ts
|
||||
index a80d9fef0c0ab5ce8221c5e0c7fae65162bc6164..fc16f51425702a418c09de553a54753331f19d15 100644
|
||||
index da28c51..1136622 100644
|
||||
--- a/src/fabric/ScreenStackHeaderConfigNativeComponent.ts
|
||||
+++ b/src/fabric/ScreenStackHeaderConfigNativeComponent.ts
|
||||
@@ -14,6 +14,7 @@ type OnPressHeaderBarButtonItemEvent = Readonly<{ buttonId: string }>;
|
||||
@@ -19,6 +19,7 @@ type OnPressHeaderBarButtonItemEvent = Readonly<{ buttonId: string }>;
|
||||
type OnPressHeaderBarButtonMenuItemEvent = Readonly<{ menuId: string }>;
|
||||
|
||||
type BackButtonDisplayMode = 'minimal' | 'default' | 'generic';
|
||||
@@ -2038,7 +2044,7 @@ index a80d9fef0c0ab5ce8221c5e0c7fae65162bc6164..fc16f51425702a418c09de553a547533
|
||||
|
||||
type BlurEffect =
|
||||
| 'none'
|
||||
@@ -61,12 +62,15 @@ export interface NativeProps extends ViewProps {
|
||||
@@ -66,12 +67,15 @@ export interface NativeProps extends ViewProps {
|
||||
largeTitleColor?: ColorValue | undefined;
|
||||
translucent?: boolean | undefined;
|
||||
title?: string | undefined;
|
||||
@@ -2054,7 +2060,7 @@ index a80d9fef0c0ab5ce8221c5e0c7fae65162bc6164..fc16f51425702a418c09de553a547533
|
||||
hideBackButton?: boolean | undefined;
|
||||
backButtonInCustomView?: boolean | undefined;
|
||||
blurEffect?: CT.WithDefault<BlurEffect, 'none'>;
|
||||
@@ -74,6 +78,8 @@ export interface NativeProps extends ViewProps {
|
||||
@@ -79,6 +83,8 @@ export interface NativeProps extends ViewProps {
|
||||
topInsetEnabled?: boolean | undefined;
|
||||
headerLeftBarButtonItems?: CT.UnsafeMixed[] | undefined;
|
||||
headerRightBarButtonItems?: CT.UnsafeMixed[] | undefined;
|
||||
@@ -2064,10 +2070,10 @@ index a80d9fef0c0ab5ce8221c5e0c7fae65162bc6164..fc16f51425702a418c09de553a547533
|
||||
| CT.DirectEventHandler<OnPressHeaderBarButtonItemEvent>
|
||||
| undefined;
|
||||
diff --git a/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts b/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts
|
||||
index 7d3fbfe08c70461936832a40a1ce8d9c11b22457..1f9caca6271b68d182b70a180f180d6a4ce3988c 100644
|
||||
index 9a6af57..03aa2b2 100644
|
||||
--- a/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts
|
||||
+++ b/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts
|
||||
@@ -14,6 +14,7 @@ export type HeaderSubviewTypes =
|
||||
@@ -18,6 +18,7 @@ export type HeaderSubviewTypes =
|
||||
export interface NativeProps extends ViewProps {
|
||||
type?: CT.WithDefault<HeaderSubviewTypes, 'left'>;
|
||||
hidesSharedBackground?: boolean | undefined;
|
||||
@@ -2076,10 +2082,10 @@ index 7d3fbfe08c70461936832a40a1ce8d9c11b22457..1f9caca6271b68d182b70a180f180d6a
|
||||
}
|
||||
|
||||
diff --git a/src/types.tsx b/src/types.tsx
|
||||
index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47caf2466d 100644
|
||||
index 8594b73..20c6e88 100644
|
||||
--- a/src/types.tsx
|
||||
+++ b/src/types.tsx
|
||||
@@ -26,6 +26,7 @@ export type SearchBarCommands = {
|
||||
@@ -35,6 +35,7 @@ export type SearchBarCommands = {
|
||||
};
|
||||
|
||||
export type BackButtonDisplayMode = 'default' | 'generic' | 'minimal';
|
||||
@@ -2087,7 +2093,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
export type StackPresentationTypes =
|
||||
| 'push'
|
||||
| 'modal'
|
||||
@@ -735,6 +736,14 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -754,6 +755,14 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* @platform ios
|
||||
*/
|
||||
backButtonDisplayMode?: BackButtonDisplayMode | undefined;
|
||||
@@ -2102,7 +2108,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
/**
|
||||
* Array of UIBarButtomItems to the left side of the header.
|
||||
*
|
||||
@@ -747,6 +756,26 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -766,6 +775,26 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* @platform ios
|
||||
*/
|
||||
headerRightBarButtonItems?: HeaderBarButtonItem[] | undefined;
|
||||
@@ -2129,7 +2135,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
/**
|
||||
* When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.
|
||||
*/
|
||||
@@ -808,6 +837,20 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
@@ -827,6 +856,20 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
||||
* String that can be displayed in the header as a fallback for `headerTitle`.
|
||||
*/
|
||||
title?: string | undefined;
|
||||
@@ -2150,7 +2156,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
/**
|
||||
* Allows for setting text color of the title.
|
||||
*/
|
||||
@@ -1120,6 +1163,13 @@ export interface SearchBarProps {
|
||||
@@ -1139,6 +1182,13 @@ export interface SearchBarProps {
|
||||
}
|
||||
|
||||
export interface ScreenStackHeaderSubviewProps {
|
||||
@@ -2164,7 +2170,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
/**
|
||||
* A boolean value indicating whether the background this item may share with other items in the bar should be hidden.
|
||||
* Only applicable to type="right" and type="left" subviews.
|
||||
@@ -1161,6 +1211,11 @@ interface SharedHeaderBarButtonItem {
|
||||
@@ -1180,6 +1230,11 @@ interface SharedHeaderBarButtonItem {
|
||||
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
||||
*/
|
||||
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
||||
@@ -2176,7 +2182,7 @@ index 9c3ab4c3653ee1769addda8a6464cdf49695a601..6f242ad2bbd7152ea9f873ef7754ad47
|
||||
/**
|
||||
* The tint color to apply to the item.
|
||||
*
|
||||
@@ -1315,11 +1370,47 @@ export interface HeaderBarButtonItemWithMenu extends SharedHeaderBarButtonItem {
|
||||
@@ -1335,11 +1390,47 @@ export interface HeaderBarButtonItemWithMenu extends SharedHeaderBarButtonItem {
|
||||
export interface HeaderBarButtonItemSpacing {
|
||||
type: 'spacing';
|
||||
spacing: number;
|
||||
Generated
+1326
-2275
File diff suppressed because it is too large.
Load diff
+77
-30
@@ -54,6 +54,9 @@ catalog:
|
||||
yaml: ^2.9.0
|
||||
|
||||
minimumReleaseAgeExclude:
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- "@clerk/[email protected]"
|
||||
- "@clerk/[email protected]"
|
||||
- "@clerk/[email protected]"
|
||||
@@ -75,15 +78,40 @@ minimumReleaseAgeExclude:
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- "@legendapp/[email protected]"
|
||||
- "@expo/cli@57.0.20"
|
||||
- "@expo/env@2.4.3"
|
||||
- "@expo/[email protected]0.11"
|
||||
- "@expo/metro-config@57.0.12"
|
||||
- expo-constants@57.0.16
|
||||
- expo-font@57.0.2
|
||||
- expo-updates@57.0.19
|
||||
- expo@57.0.18
|
||||
- expo-widgets@57.0.15
|
||||
- "@expo/cli@58.0.9"
|
||||
- "@expo/env@2.5.1"
|
||||
- "@expo/[email protected]1.2"
|
||||
- "@expo/metro-config@58.0.6"
|
||||
- expo-constants@58.0.9
|
||||
- expo-font@58.0.4
|
||||
- expo-updates@58.0.11
|
||||
- expo@58.0.0
|
||||
- expo-widgets@58.0.9
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- [email protected]
|
||||
- "@anthropic-ai/[email protected]"
|
||||
- "@alchemy.run/[email protected]"
|
||||
@@ -96,6 +124,29 @@ minimumReleaseAgeExclude:
|
||||
- "@distilled.cloud/[email protected]"
|
||||
- "@shadcn/[email protected]"
|
||||
- [email protected]
|
||||
- "@expo/[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "[email protected]"
|
||||
- "@expo/[email protected]"
|
||||
|
||||
overrides:
|
||||
# Keep jsdom's optional peer consistent so Vite+ has one test-runner instance.
|
||||
@@ -143,11 +194,12 @@ overrides:
|
||||
"@effect/sql-pg": "catalog:"
|
||||
"@effect/vitest": "catalog:"
|
||||
"@effect/vitest>vitest": "-"
|
||||
"@expo/dom-webview": 57.0.1
|
||||
"@expo/metro-config": 57.0.12
|
||||
expo-constants: 57.0.16
|
||||
# Keep fresh resolution on the version carrying the permissions registry fix.
|
||||
expo-modules-core: 57.0.14
|
||||
"@expo/dom-webview": 58.0.2
|
||||
"@expo/metro-config": 58.0.6
|
||||
expo-constants: 58.0.9
|
||||
expo-router: 58.0.10
|
||||
"expo-sharing>@expo/config-plugins": 58.0.4
|
||||
"expo-sharing>@expo/config-types": 58.0.2
|
||||
"@pierre/diffs>@shikijs/transformers": ^4.2.0
|
||||
# Keep one copy of these native-binary packages. lightningcss ships 11 platform binaries per
|
||||
# version, and the workspaces' tailwindcss ^4 ranges drift into two 4.3.x copies of the family.
|
||||
@@ -156,9 +208,6 @@ overrides:
|
||||
"@tailwindcss/vite": "catalog:"
|
||||
"@types/node": "catalog:"
|
||||
effect: "catalog:"
|
||||
expo-router: 57.0.17
|
||||
"expo-sharing>@expo/config-plugins": 57.0.9
|
||||
"expo-sharing>@expo/config-types": 57.0.2
|
||||
node-abi: 4.33.0
|
||||
lightningcss: "catalog:"
|
||||
tailwindcss: "catalog:"
|
||||
@@ -168,7 +217,7 @@ overrides:
|
||||
packageExtensions:
|
||||
"@clerk/expo@*":
|
||||
dependencies:
|
||||
"@expo/config-plugins": 57.0.9
|
||||
"@expo/config-plugins": 58.0.4
|
||||
"@effect/vitest@*":
|
||||
dependencies:
|
||||
vite-plus: "catalog:"
|
||||
@@ -181,9 +230,14 @@ packageExtensions:
|
||||
|
||||
patchedDependencies:
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
"@clerk/[email protected]": patches/@[email protected]
|
||||
"@effect/[email protected]": patches/@[email protected]
|
||||
"@expo/metro-config@57.0.12": patches/@expo__metro-config@57.0.12.patch
|
||||
"@expo/metro-config@58.0.6": patches/@expo__metro-config@58.0.6.patch
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
"@ff-labs/[email protected]": patches/@[email protected]
|
||||
"@legendapp/[email protected]": patches/@[email protected]
|
||||
"@pierre/[email protected]": patches/@pierre%[email protected]
|
||||
@@ -192,20 +246,13 @@ patchedDependencies:
|
||||
"@react-navigation/[email protected]": patches/@react-navigation%[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
# Link http(s) URLs with a port or a single-label host. md4c otherwise requires a dotted host and stops at ':'.
|
||||
[email protected]: patches/[email protected]
|
||||
# Preserve the final layout frame. Backport of [#10171](https://github.com/software-mansion/react-native-reanimated/pull/10171).
|
||||
react-native-[email protected]: patches/react-native-[email protected].patch
|
||||
react-native-[email protected]: patches/react-native-[email protected].patch
|
||||
react-native-gesture-han[email protected]: patches/[email protected]
|
||||
react-native-[email protected]: patches/react-native-[email protected].patch
|
||||
react-native-[email protected]: patches/react-native-[email protected].patch
|
||||
[email protected]: patches/[email protected]
|
||||
[email protected]: patches/[email protected]
|
||||
|
||||
peerDependencyRules:
|
||||
|
||||
@@ -473,6 +473,87 @@
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2025 opencode"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "noxcturnal",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-linux-x64-gnu",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-darwin-x64",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-linux-arm64-gnu",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-darwin-arm64",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-linux-arm64-musl",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-linux-x64-musl",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-win32-arm64-msvc",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "@noxcturnal/noxcturnal-win32-x64-msvc",
|
||||
"sourceUrl": "https://github.com/expo/noxcturnal",
|
||||
"generatedNotice": {
|
||||
"licenseId": "MIT",
|
||||
"copyrights": ["Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user