peachsim 0.1.2273 → 0.1.2274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +4 -1
- package/detox/gestures.ts +3 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +70 -13
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +3 -3
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +68 -11
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +70 -13
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -6
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +6 -6
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +6 -6
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -3
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +73 -14
- package/dist-lib/swift-compile.cjs +31 -2
- package/dist-lib/swift-compile.mjs +31 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +30 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +33 -4
- package/dist-lib/vite.cjs +6 -6
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +3 -5
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +86 -37
- package/dist-types/packages/peach-engine/src/engine/scroll-range.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/platform/personality.d.ts +81 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-wire-protocol.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/settings/schema.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/swift-toolchain.ts +37 -0
- package/src/turbo-source.ts +32 -4
|
@@ -10,7 +10,6 @@ export * as engine_app_catalog_wire from './engine/app-catalog-wire.d.ts';
|
|
|
10
10
|
export * as engine_config_plugin_fonts from './engine/config-plugin-fonts.d.ts';
|
|
11
11
|
export * as engine_config_plugin_splash from './engine/config-plugin-splash.d.ts';
|
|
12
12
|
export * as engine_expo_manifest from './engine/expo-manifest.d.ts';
|
|
13
|
-
export * as engine_scroll_platform from './engine/scroll-platform.d.ts';
|
|
14
13
|
export * as guest_import_meta from './guest-import-meta.d.ts';
|
|
15
14
|
export * as guest_module_overrides from './guest-module-overrides.d.ts';
|
|
16
15
|
export * as ios_chrome_metrics from './ios/chrome-metrics.d.ts';
|
|
@@ -19,6 +18,7 @@ export * as ios_frame_svg from './ios/frame-svg.d.ts';
|
|
|
19
18
|
export * as metro_fingerprint from './metro-fingerprint.d.ts';
|
|
20
19
|
export * as metro_fingerprint_registry_client from './metro-fingerprint-registry-client.d.ts';
|
|
21
20
|
export * as peach_warm_manifest from './peach-warm-manifest.d.ts';
|
|
21
|
+
export * as platform_personality from './platform/personality.d.ts';
|
|
22
22
|
export * as preview_bundle_layout from './preview/bundle-layout.d.ts';
|
|
23
23
|
export * as preview_compress from './preview/compress.d.ts';
|
|
24
24
|
export * as preview_compress_node from './preview/compress-node.d.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DeviceSpec } from '../../../../../src/device-catalog.ts';
|
|
2
1
|
import type { ScrollRange } from './scroll-range.d.ts';
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
2
|
+
export declare function iosMomentumFrameDuration(elapsedMs: number): number;
|
|
3
|
+
export declare function androidMomentumFrameDuration(elapsedMs: number): number;
|
|
4
|
+
export declare function iosScrollMomentumReleaseStep(previousUpdateMs: number | null, releaseMs: number): number;
|
|
5
5
|
export declare const IOS_SET_CONTENT_OFFSET_MS = 300;
|
|
6
6
|
export type TimedScrollCurve = 'ios-set-content-offset' | 'ios-status-bar-scroll-to-top';
|
|
7
7
|
export type TimedScrollControl = {
|
|
@@ -126,8 +126,6 @@ export declare function advanceScrollMomentumSpring(state: ScrollMomentumState,
|
|
|
126
126
|
}): ScrollMomentumStep;
|
|
127
127
|
export declare function restingScrollOffset(state: ScrollMomentumState, config: ScrollMomentumConfig): number;
|
|
128
128
|
export declare function roundToIosPixel(value: number, scale: number): number;
|
|
129
|
-
export declare function appliedScrollOffset(value: number, spec: DeviceSpec | undefined): number;
|
|
130
|
-
export declare function nativeScrollEventOffset(value: number, spec: DeviceSpec | undefined): number;
|
|
131
129
|
export declare function advanceScrollMomentum(state: ScrollMomentumState, dtMs: number, config: ScrollMomentumConfig): ScrollMomentumStep;
|
|
132
130
|
export type ScrollRelease = {
|
|
133
131
|
velocityX: number;
|
|
@@ -1,61 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { androidMomentumFrameDuration, iosMomentumFrameDuration, iosScrollMomentumReleaseStep, roundToIosPixel } from './scroll-momentum-math.d.ts';
|
|
2
|
+
import { estimateAndroidScrollReleaseVelocity, estimateIosScrollReleaseVelocity } from './scroll-velocity.d.ts';
|
|
3
|
+
import type { ScrollPersonality } from '../platform/personality.d.ts';
|
|
2
4
|
export declare const IOS_REFRESH_TITLE_FONT_SIZE = 12;
|
|
3
5
|
export declare function getIOSRefreshTitleFontSize(): number;
|
|
4
|
-
export declare function getRefreshHoldOffset(platform: string | undefined, hasTitle: boolean, titleFontSize?: number): number;
|
|
5
6
|
export declare const REFRESH_TRIGGER_THRESHOLD = 60;
|
|
6
|
-
export declare function getRefreshTriggerThreshold(platform: string | undefined, viewportHeight: number, hasTitle: boolean, titleFontSize?: number): number;
|
|
7
7
|
export declare function getRefreshMaximumSnappingHeight(viewportHeight: number, hasTitle: boolean, titleFontSize?: number): number;
|
|
8
8
|
export type ScrollDirectionalLock = 'horizontal' | 'vertical' | null;
|
|
9
9
|
export declare function selectScrollDirectionalLock(dx: number, dy: number, horizontalAvailable: boolean, verticalAvailable: boolean, selected: ScrollDirectionalLock): ScrollDirectionalLock;
|
|
10
|
-
export declare function scrollTouchSlop(platform: string | undefined, primaryDelta: number): number;
|
|
11
10
|
export interface ScrollDragOrigin {
|
|
12
11
|
x: number;
|
|
13
12
|
y: number;
|
|
14
13
|
timestamp?: number;
|
|
15
14
|
}
|
|
16
|
-
export declare function scrollDragAdmission(
|
|
17
|
-
export declare function scrollDragDelta(
|
|
18
|
-
export declare function scrollDragMatchesAxis(platform: string | undefined, primaryDelta: number, crossDelta: number): boolean;
|
|
15
|
+
export declare function scrollDragAdmission(scroll: ScrollPersonality, primaryDelta: number, crossDelta: number): 'pending' | 'reject' | 'begin';
|
|
16
|
+
export declare function scrollDragDelta(scroll: ScrollPersonality, pointerDelta: number, slop: number, beganDrag: boolean): number;
|
|
19
17
|
export declare function bouncesAlongAxis(opts: {
|
|
20
18
|
props: Record<string, unknown> | null | undefined;
|
|
21
19
|
horizontal: boolean;
|
|
22
20
|
contentSize: number;
|
|
23
21
|
viewportSize: number;
|
|
24
22
|
}): boolean;
|
|
25
|
-
export declare function allowsRubberBandScroll(
|
|
26
|
-
|
|
27
|
-
bounces?: unknown;
|
|
28
|
-
}): boolean;
|
|
29
|
-
export declare function shouldTrackAndroidRefreshPull(opts: {
|
|
30
|
-
platform?: string;
|
|
23
|
+
export declare function allowsRubberBandScroll(scroll: ScrollPersonality, bounces: unknown): boolean;
|
|
24
|
+
export declare function tracksHeldRefreshPull(scroll: ScrollPersonality, opts: {
|
|
31
25
|
horizontal?: boolean;
|
|
32
26
|
refreshEnabled?: boolean;
|
|
33
27
|
refreshing?: boolean;
|
|
34
28
|
}): boolean;
|
|
35
|
-
export
|
|
36
|
-
platform?: string;
|
|
37
|
-
overScrollMode?: unknown;
|
|
38
|
-
contentSize: number;
|
|
39
|
-
viewportSize: number;
|
|
40
|
-
}): boolean;
|
|
41
|
-
export declare function resolveScrollDecelerationRate(opts: {
|
|
42
|
-
platform?: string;
|
|
43
|
-
decelerationRate?: unknown;
|
|
44
|
-
}): number;
|
|
45
|
-
export declare function resolveScrollMomentumPhysics(opts: {
|
|
46
|
-
platform?: string;
|
|
47
|
-
decelerationRate?: unknown;
|
|
48
|
-
}): ScrollMomentumPhysics;
|
|
49
|
-
export declare function resolveAndroidFadingEdgeLength(opts: {
|
|
50
|
-
platform?: string;
|
|
51
|
-
fadingEdgeLength?: unknown;
|
|
52
|
-
}): number;
|
|
53
|
-
export declare function resolveScrollIndicatorMetrics(opts: {
|
|
54
|
-
platform?: string;
|
|
55
|
-
persistentScrollbar?: unknown;
|
|
56
|
-
indicatorStyle?: unknown;
|
|
57
|
-
colorScheme?: string;
|
|
58
|
-
}): {
|
|
29
|
+
export interface ScrollIndicatorMetrics {
|
|
59
30
|
width: number;
|
|
60
31
|
minLength: number;
|
|
61
32
|
margin: number;
|
|
@@ -63,5 +34,83 @@ export declare function resolveScrollIndicatorMetrics(opts: {
|
|
|
63
34
|
alpha: number;
|
|
64
35
|
white: boolean;
|
|
65
36
|
idleOpacity: number | null;
|
|
37
|
+
}
|
|
38
|
+
declare function iosDecelerationRate(decelerationRate: unknown): number;
|
|
39
|
+
export declare const IOS_SCROLL: {
|
|
40
|
+
refreshHoldOffset: (hasTitle: boolean, titleFontSize?: number | undefined) => number;
|
|
41
|
+
refreshTriggerThreshold: (viewportHeight: number, hasTitle: boolean, titleFontSize?: number | undefined) => number;
|
|
42
|
+
refreshPullHoldsContent: false;
|
|
43
|
+
touchSlop: (primaryDelta: number) => number;
|
|
44
|
+
beginMoveApplies: true;
|
|
45
|
+
dragMatchesAxis: (primaryDelta: number, crossDelta: number) => boolean;
|
|
46
|
+
rejectedMoveMovesSlopOrigin: true;
|
|
47
|
+
directionalLock: true;
|
|
48
|
+
releaseVelocity: typeof estimateIosScrollReleaseVelocity;
|
|
49
|
+
momentumReleaseStep: typeof iosScrollMomentumReleaseStep;
|
|
50
|
+
momentumFrameDuration: typeof iosMomentumFrameDuration;
|
|
51
|
+
decelerationRate: typeof iosDecelerationRate;
|
|
52
|
+
momentumPhysics: (decelerationRate: unknown) => {
|
|
53
|
+
kind: "ios-exponential";
|
|
54
|
+
decelerationRate: number;
|
|
55
|
+
};
|
|
56
|
+
rubberBand: true;
|
|
57
|
+
appliedOffset: typeof roundToIosPixel;
|
|
58
|
+
nativeEventOffset: typeof roundToIosPixel;
|
|
59
|
+
startOffset: (leadingInset: number) => number;
|
|
60
|
+
edgeEffect: () => false;
|
|
61
|
+
fadingEdgeLength: () => number;
|
|
62
|
+
indicator: (opts: {
|
|
63
|
+
persistentScrollbar?: unknown;
|
|
64
|
+
indicatorStyle?: unknown;
|
|
65
|
+
colorScheme?: string;
|
|
66
|
+
}) => {
|
|
67
|
+
width: number;
|
|
68
|
+
minLength: number;
|
|
69
|
+
margin: number;
|
|
70
|
+
radius: number;
|
|
71
|
+
alpha: number;
|
|
72
|
+
white: boolean;
|
|
73
|
+
idleOpacity: null;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
declare function androidDecelerationRate(decelerationRate: unknown): number;
|
|
77
|
+
declare function androidAppliedOffset(value: number, scale: number): number;
|
|
78
|
+
export declare const ANDROID_SCROLL: {
|
|
79
|
+
refreshHoldOffset: () => number;
|
|
80
|
+
refreshTriggerThreshold: () => number;
|
|
81
|
+
refreshPullHoldsContent: true;
|
|
82
|
+
touchSlop: () => number;
|
|
83
|
+
beginMoveApplies: false;
|
|
84
|
+
dragMatchesAxis: (primaryDelta: number, crossDelta: number) => boolean;
|
|
85
|
+
rejectedMoveMovesSlopOrigin: false;
|
|
86
|
+
directionalLock: false;
|
|
87
|
+
releaseVelocity: typeof estimateAndroidScrollReleaseVelocity;
|
|
88
|
+
momentumReleaseStep: () => number;
|
|
89
|
+
momentumFrameDuration: typeof androidMomentumFrameDuration;
|
|
90
|
+
decelerationRate: typeof androidDecelerationRate;
|
|
91
|
+
momentumPhysics: (decelerationRate: unknown) => {
|
|
92
|
+
kind: "android-over-scroller";
|
|
93
|
+
friction: number;
|
|
94
|
+
};
|
|
95
|
+
rubberBand: false;
|
|
96
|
+
appliedOffset: typeof androidAppliedOffset;
|
|
97
|
+
nativeEventOffset: (value: number, scale: number) => number;
|
|
98
|
+
startOffset: () => number;
|
|
99
|
+
edgeEffect: (overScrollMode: unknown, contentSize: number, viewportSize: number) => boolean;
|
|
100
|
+
fadingEdgeLength: (fadingEdgeLength: unknown) => number;
|
|
101
|
+
indicator: (opts: {
|
|
102
|
+
persistentScrollbar?: unknown;
|
|
103
|
+
indicatorStyle?: unknown;
|
|
104
|
+
colorScheme?: string;
|
|
105
|
+
}) => {
|
|
106
|
+
width: number;
|
|
107
|
+
minLength: number;
|
|
108
|
+
margin: number;
|
|
109
|
+
radius: number;
|
|
110
|
+
alpha: number;
|
|
111
|
+
white: false;
|
|
112
|
+
idleOpacity: number | null;
|
|
113
|
+
};
|
|
66
114
|
};
|
|
67
115
|
export declare function iosConcentricCornerInset(radius: number, dx: number, dy: number): number;
|
|
116
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DeviceSpec, RuntimePlatform } from '../../../../../src/device-catalog.ts';
|
|
1
2
|
export interface ScrollContentInset {
|
|
2
3
|
top: number;
|
|
3
4
|
bottom: number;
|
|
@@ -10,5 +11,7 @@ export interface ScrollRange {
|
|
|
10
11
|
min: number;
|
|
11
12
|
max: number;
|
|
12
13
|
}
|
|
13
|
-
export declare function getScrollStartOffset(leadingInset: number, platform:
|
|
14
|
+
export declare function getScrollStartOffset(leadingInset: number, platform: RuntimePlatform | undefined): number;
|
|
15
|
+
export declare function appliedScrollOffset(value: number, spec: DeviceSpec | undefined): number;
|
|
16
|
+
export declare function nativeScrollEventOffset(value: number, spec: DeviceSpec | undefined): number;
|
|
14
17
|
export declare function getScrollEndOffset(contentSize: number, viewportSize: number, endInset: number, minOffset: number): number;
|
|
@@ -11,5 +11,6 @@ export interface ScrollReleaseVelocity {
|
|
|
11
11
|
velocity: number;
|
|
12
12
|
panVelocity: number;
|
|
13
13
|
}
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function estimateIosScrollReleaseVelocity(samples: readonly ScrollVelocitySample[], releaseTimestamp: number, overscrolled: boolean, sheetPanScale?: number): ScrollReleaseVelocity;
|
|
15
|
+
export declare function estimateAndroidScrollReleaseVelocity(samples: readonly ScrollVelocitySample[], releaseTimestamp: number): ScrollReleaseVelocity;
|
|
15
16
|
export declare function latestIosPanVelocity(samples: readonly ScrollVelocitySample[]): number;
|
|
@@ -231,7 +231,7 @@ export declare class ScrollHandler {
|
|
|
231
231
|
private get refreshHoldOffset();
|
|
232
232
|
private get refreshRubberBandDecoration();
|
|
233
233
|
get hasRefreshControl(): boolean;
|
|
234
|
-
private
|
|
234
|
+
private tracksHeldRefreshPull;
|
|
235
235
|
private shouldTrackRefreshPull;
|
|
236
236
|
private get offset();
|
|
237
237
|
private set offset(value);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ScrollMomentumPhysics } from '../engine/scroll-momentum-math.d.ts';
|
|
2
|
+
import type { ScrollIndicatorMetrics } from '../engine/scroll-platform.d.ts';
|
|
3
|
+
import type { ScrollReleaseVelocity, ScrollVelocitySample } from '../engine/scroll-velocity.d.ts';
|
|
4
|
+
import type { DeviceSpec, RuntimePlatform, SizeClass } from '../settings/index.d.ts';
|
|
5
|
+
export interface PlatformPersonality {
|
|
6
|
+
readonly platform: RuntimePlatform;
|
|
7
|
+
readonly keyboard: KeyboardPersonality;
|
|
8
|
+
readonly navigationBar: NavigationBarPersonality;
|
|
9
|
+
formSheet(device: DeviceSpec): FormSheetTraits;
|
|
10
|
+
readonly scroll: ScrollPersonality;
|
|
11
|
+
}
|
|
12
|
+
export interface ScrollPersonality {
|
|
13
|
+
touchSlop(primaryDelta: number): number;
|
|
14
|
+
dragMatchesAxis(primaryDelta: number, crossDelta: number): boolean;
|
|
15
|
+
readonly rejectedMoveMovesSlopOrigin: boolean;
|
|
16
|
+
readonly directionalLock: boolean;
|
|
17
|
+
readonly beginMoveApplies: boolean;
|
|
18
|
+
releaseVelocity(samples: readonly ScrollVelocitySample[], releaseTimestamp: number, overscrolled: boolean, sheetPanScale?: number): ScrollReleaseVelocity;
|
|
19
|
+
momentumReleaseStep(previousUpdateMs: number | null, releaseMs: number): number;
|
|
20
|
+
momentumFrameDuration(elapsedMs: number): number;
|
|
21
|
+
decelerationRate(decelerationRate: unknown): number;
|
|
22
|
+
momentumPhysics(decelerationRate: unknown): ScrollMomentumPhysics;
|
|
23
|
+
readonly rubberBand: boolean;
|
|
24
|
+
appliedOffset(value: number, scale: number): number;
|
|
25
|
+
nativeEventOffset(value: number, scale: number): number;
|
|
26
|
+
startOffset(leadingInset: number): number;
|
|
27
|
+
edgeEffect(overScrollMode: unknown, contentSize: number, viewportSize: number): boolean;
|
|
28
|
+
fadingEdgeLength(fadingEdgeLength: unknown): number;
|
|
29
|
+
indicator(opts: {
|
|
30
|
+
persistentScrollbar?: unknown;
|
|
31
|
+
indicatorStyle?: unknown;
|
|
32
|
+
colorScheme?: string;
|
|
33
|
+
}): ScrollIndicatorMetrics;
|
|
34
|
+
readonly refreshPullHoldsContent: boolean;
|
|
35
|
+
refreshHoldOffset(hasTitle: boolean, titleFontSize?: number): number;
|
|
36
|
+
refreshTriggerThreshold(viewportHeight: number, hasTitle: boolean, titleFontSize?: number): number;
|
|
37
|
+
}
|
|
38
|
+
export interface FormSheetTraits {
|
|
39
|
+
readonly horizontalSizeClass: SizeClass;
|
|
40
|
+
readonly verticalSizeClass: SizeClass;
|
|
41
|
+
readonly maximumDetentAtStackFrame: boolean;
|
|
42
|
+
readonly insetCardAtCardSize: boolean;
|
|
43
|
+
readonly mixedLargeIsSystemCard: boolean;
|
|
44
|
+
readonly floatsSmallDetents: boolean;
|
|
45
|
+
readonly snapsDetentsToPixel: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface NavigationBarPersonality {
|
|
48
|
+
readonly toolbarHeight: number | null;
|
|
49
|
+
readonly compatibilityDesign: boolean;
|
|
50
|
+
readonly compactHeightBar: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface KeyboardSpring {
|
|
53
|
+
readonly stiffness: number;
|
|
54
|
+
readonly damping: number;
|
|
55
|
+
readonly mass: number;
|
|
56
|
+
readonly restDisplacementThreshold: number;
|
|
57
|
+
readonly restSpeedThreshold: number;
|
|
58
|
+
}
|
|
59
|
+
export type KeyboardAnimationEasing = {
|
|
60
|
+
readonly kind: 'bezier';
|
|
61
|
+
readonly controlPoints: readonly [number, number, number, number];
|
|
62
|
+
} | {
|
|
63
|
+
readonly kind: 'spring';
|
|
64
|
+
readonly spring: KeyboardSpring;
|
|
65
|
+
};
|
|
66
|
+
export interface KeyboardAnimationTiming {
|
|
67
|
+
readonly duration: number;
|
|
68
|
+
readonly easing: KeyboardAnimationEasing;
|
|
69
|
+
}
|
|
70
|
+
export interface KeyboardPersonality {
|
|
71
|
+
readonly animation: KeyboardAnimationTiming;
|
|
72
|
+
readonly eventDuration: number;
|
|
73
|
+
readonly willEvents: boolean;
|
|
74
|
+
readonly frameChangeEvents: boolean;
|
|
75
|
+
readonly inputAccessories: boolean;
|
|
76
|
+
readonly textTraitsLatchAtPresentation: boolean;
|
|
77
|
+
readonly candidateLane: boolean;
|
|
78
|
+
readonly caretMoveUpdatesCapitalization: boolean;
|
|
79
|
+
hiddenBottomInset(device: DeviceSpec): number;
|
|
80
|
+
}
|
|
81
|
+
export declare function platformPersonality(platform: RuntimePlatform): PlatformPersonality;
|
|
@@ -65,5 +65,4 @@ export type WebGpuWireFromRenderer = {
|
|
|
65
65
|
readonly message: string;
|
|
66
66
|
};
|
|
67
67
|
export declare function isWebGpuWireFromRenderer(value: unknown): value is WebGpuWireFromRenderer;
|
|
68
|
-
export declare function webGpuCanvasChannel(contextId: number): string;
|
|
69
68
|
export declare const WEBGPU_WIRE_CANVAS_TEXTURES = 3;
|
|
@@ -2,4 +2,5 @@ import { type LandscapeSide } from '../../../../../src/device-catalog.ts';
|
|
|
2
2
|
import { type SettingsValues } from '../../../../../src/settingsContract.ts';
|
|
3
3
|
export type { LandscapeSide };
|
|
4
4
|
export declare function readUrlSettingOverrides(search?: string): Partial<SettingsValues>;
|
|
5
|
+
export declare function isIsolatedSettingsSearch(search: string): boolean;
|
|
5
6
|
export declare function getDefaults(): SettingsValues;
|
package/package.json
CHANGED
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"495d946b48ebe21480616cc63d9967bc511db950ab59c25e834fcda28eb4a17c","file":"node/cli-495d946b48ebe21480616cc63d9967bc511db950ab59c25e834fcda28eb4a17c.cjs"}
|
package/src/swift-toolchain.ts
CHANGED
|
@@ -896,6 +896,9 @@ function swiftSdkBundle(swift: string, id: string, options: string[]): string {
|
|
|
896
896
|
// stat changes invalidate file hashes; every lookup enumerates the entire bundle,
|
|
897
897
|
// including additions, removals, executable modes and internal symlink targets.
|
|
898
898
|
const sdkFileHashes = new Map<string, { stamp: string; checksum: string }>()
|
|
899
|
+
let sdkFilesHashed = 0
|
|
900
|
+
// the stamped hashes a verification saved, which a later process starts from
|
|
901
|
+
const loadedSdkHashFiles = new Set<string>()
|
|
899
902
|
function swiftSdkPayloadChecksum(bundle: string): string {
|
|
900
903
|
const hash = createHash('sha256')
|
|
901
904
|
function visit(relative: string): void {
|
|
@@ -919,6 +922,7 @@ function swiftSdkPayloadChecksum(bundle: string): string {
|
|
|
919
922
|
if (cached?.stamp !== stamp) {
|
|
920
923
|
cached = { stamp, checksum: swiftFileChecksum(file) }
|
|
921
924
|
sdkFileHashes.set(file, cached)
|
|
925
|
+
sdkFilesHashed++
|
|
922
926
|
}
|
|
923
927
|
hash.update(
|
|
924
928
|
JSON.stringify([relative, 'file', Number(stat.mode & 0o111n), cached.checksum]) +
|
|
@@ -946,6 +950,22 @@ function verifySwiftSdk(swift: string, sdk: SwiftWasmSdk): void {
|
|
|
946
950
|
`Swift SDK ${sdk.wasmSdkId} has no verified archive binding for ${sdk.wasmSdkChecksum}. Hydrate it with installSwiftWasmSdk before compiling.`,
|
|
947
951
|
)
|
|
948
952
|
const receipt: unknown = JSON.parse(fs.readFileSync(file, 'utf8'))
|
|
953
|
+
const stamps = file.replace(/\.json$/, '.files.json')
|
|
954
|
+
if (!loadedSdkHashFiles.has(stamps)) {
|
|
955
|
+
loadedSdkHashFiles.add(stamps)
|
|
956
|
+
const saved: unknown = fs.existsSync(stamps)
|
|
957
|
+
? JSON.parse(fs.readFileSync(stamps, 'utf8'))
|
|
958
|
+
: null
|
|
959
|
+
if (saved && typeof saved === 'object')
|
|
960
|
+
for (const [entry, value] of Object.entries(saved))
|
|
961
|
+
if (
|
|
962
|
+
Array.isArray(value) &&
|
|
963
|
+
typeof value[0] === 'string' &&
|
|
964
|
+
typeof value[1] === 'string'
|
|
965
|
+
)
|
|
966
|
+
sdkFileHashes.set(entry, { stamp: value[0], checksum: value[1] })
|
|
967
|
+
}
|
|
968
|
+
const hashedBefore = sdkFilesHashed
|
|
949
969
|
if (
|
|
950
970
|
!receipt ||
|
|
951
971
|
typeof receipt !== 'object' ||
|
|
@@ -959,6 +979,23 @@ function verifySwiftSdk(swift: string, sdk: SwiftWasmSdk): void {
|
|
|
959
979
|
throw new Error(
|
|
960
980
|
`Swift SDK ${sdk.wasmSdkId} installed payload differs from its verified archive ${sdk.wasmSdkChecksum}`,
|
|
961
981
|
)
|
|
982
|
+
if (sdkFilesHashed === hashedBefore) return
|
|
983
|
+
const temporary = `${stamps}.${process.pid}.tmp`
|
|
984
|
+
try {
|
|
985
|
+
fs.writeFileSync(
|
|
986
|
+
temporary,
|
|
987
|
+
JSON.stringify(
|
|
988
|
+
Object.fromEntries(
|
|
989
|
+
[...sdkFileHashes]
|
|
990
|
+
.filter(([entry]) => entry.startsWith(bundle + path.sep))
|
|
991
|
+
.map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]]),
|
|
992
|
+
),
|
|
993
|
+
),
|
|
994
|
+
)
|
|
995
|
+
fs.renameSync(temporary, stamps)
|
|
996
|
+
} finally {
|
|
997
|
+
fs.rmSync(temporary, { force: true })
|
|
998
|
+
}
|
|
962
999
|
}
|
|
963
1000
|
|
|
964
1001
|
/** install or qualify existing bytes, serializing shared-store mutation without replacement. */
|
package/src/turbo-source.ts
CHANGED
|
@@ -2725,6 +2725,38 @@ void dispatchToJSThread(dispatch_block_t block) {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
} // namespace
|
|
2727
2727
|
|
|
2728
|
+
static CGFloat peachScreenBrightness = 0.5;
|
|
2729
|
+
|
|
2730
|
+
@implementation UIScreen (PeachTurboRuntime)
|
|
2731
|
+
+ (UIScreen *)mainScreen {
|
|
2732
|
+
static UIScreen *screen = nil;
|
|
2733
|
+
if (!screen) screen = [[UIScreen alloc] init];
|
|
2734
|
+
return screen;
|
|
2735
|
+
}
|
|
2736
|
+
- (CGFloat)brightness {
|
|
2737
|
+
return peachScreenBrightness;
|
|
2738
|
+
}
|
|
2739
|
+
- (void)setBrightness:(CGFloat)value {
|
|
2740
|
+
peachScreenBrightness = value;
|
|
2741
|
+
}
|
|
2742
|
+
@end
|
|
2743
|
+
|
|
2744
|
+
static BOOL peachIdleTimerDisabled = NO;
|
|
2745
|
+
|
|
2746
|
+
@implementation UIApplication (PeachTurboRuntime)
|
|
2747
|
+
+ (UIApplication *)sharedApplication {
|
|
2748
|
+
static UIApplication *app = nil;
|
|
2749
|
+
if (!app) app = [[UIApplication alloc] init];
|
|
2750
|
+
return app;
|
|
2751
|
+
}
|
|
2752
|
+
- (BOOL)isIdleTimerDisabled {
|
|
2753
|
+
return peachIdleTimerDisabled;
|
|
2754
|
+
}
|
|
2755
|
+
- (void)setIdleTimerDisabled:(BOOL)disabled {
|
|
2756
|
+
peachIdleTimerDisabled = disabled;
|
|
2757
|
+
}
|
|
2758
|
+
@end
|
|
2759
|
+
|
|
2728
2760
|
// React Native's own modules register before any provider's, and RCTBridge.mm
|
|
2729
2761
|
// creates the registry's queue in the first RCTRegisterModule. the engine
|
|
2730
2762
|
// supplies those modules, so a process whose providers register none (codegen
|
|
@@ -2845,9 +2877,6 @@ ${
|
|
|
2845
2877
|
|
|
2846
2878
|
@end
|
|
2847
2879
|
|
|
2848
|
-
// UIKitCore: the key window and root view controller an app delegate makes at launch
|
|
2849
|
-
extern "C" void PeachLaunchReactNativeWindow(void);
|
|
2850
|
-
|
|
2851
2880
|
extern "C" void peachTurboInitialize() {
|
|
2852
2881
|
objc_create_block_classes_as_subclasses_of([NSObject class]);
|
|
2853
2882
|
if (Class blockClass = NSClassFromString(@"_NSBlock")) {
|
|
@@ -2861,7 +2890,6 @@ extern "C" void peachTurboInitialize() {
|
|
|
2861
2890
|
static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
|
|
2862
2891
|
*reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
|
|
2863
2892
|
}
|
|
2864
|
-
PeachLaunchReactNativeWindow();
|
|
2865
2893
|
auto& runtime = peach::jsi_runtime::create(
|
|
2866
2894
|
[] { invoker->drain(); },
|
|
2867
2895
|
[] {
|