peachsim 0.1.2074 → 0.1.2076
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/outbound-endpoints.ts +1 -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 +1 -1
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1 -1
- 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 +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- 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 +1 -1
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- 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 +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -25
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -7
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/reanimated-css-contract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -627
- package/dist-types/packages/peach-engine/src/render-worker/worklet-serialize.d.ts +186 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-wire.d.ts +447 -0
- package/package.json +1 -1
|
@@ -1,271 +1,17 @@
|
|
|
1
1
|
import '../profiler/animation-recording-loader.d.ts';
|
|
2
|
-
import { NativeDynamicSynchronizableStorage, type SynchronizableArenaKey } from './native-dynamic-synchronizable.d.ts';
|
|
3
2
|
import { type FocusedInputLayout, type KeyboardAnimationFrameSnapshot } from './native-ui-protocol.d.ts';
|
|
4
3
|
import { type CSSShellHost, type NativeCSSEvent } from './reanimated-css-contract.d.ts';
|
|
5
|
-
import { type
|
|
6
|
-
import type { NativeRenderer } from '../../../../../src/config.ts';
|
|
7
|
-
import type { WorkletsStaticFlags } from '../../../../../src/packageVersionsContract.ts';
|
|
8
|
-
import type { DemoBundleMode } from '../demo/demo-bundle-platform.d.ts';
|
|
9
|
-
import type { SyncReplyBuffer } from './nativeSyncReplyContract.d.ts';
|
|
4
|
+
import { type SharedValuePlayback } from './reanimated-readiness.d.ts';
|
|
10
5
|
import type { WorkletThreadIdentity } from './workletThreadIdentityContract.d.ts';
|
|
11
|
-
import type { NativeEvaluationLease } from '../../../peach-compat/src/stubs/native-evaluation-lease.d.ts';
|
|
12
6
|
import type { SootSimAnimationInfo } from '../../../peach-globals/src/index.d.ts';
|
|
13
|
-
import type { ReanimatedAnimationProfile } from '../../../peach-globals/src/profilerContract.d.ts';
|
|
14
7
|
export { CSS_EVENT_MASK, type CSSEventType, type NativeCSSEvent, } from './reanimated-css-contract.d.ts';
|
|
15
8
|
import { WorkletMicrotaskQueue } from './worklet-runtime-kind.d.ts';
|
|
16
|
-
import type { AnimatedDrivenStyleLease, AnimatedDrivenStyleRetirement } from '../engine/animated-driven-style.d.ts';
|
|
17
9
|
import { SAB_COMPOSITOR_TASK_PENDING_INT32_INDEX, SAB_DEMAND_EPOCH_INT32_INDEX, SAB_TENANT_LIVE_FRAMES_INT32_INDEX, SAB_UI_FRAME_DEMAND_INT32_INDEX, SAB_UI_FRAME_DONE_INT32_INDEX, SAB_UI_FRAME_OFFERED_INT32_INDEX, SAB_UI_FRAME_TIME_FLOAT64_INDEX, createSharedValueSAB, createWorkletPeerEpoch, type WorkletPeerEpoch } from './worklet-sab.d.ts';
|
|
10
|
+
import { type SynchronizableHostObject, type WorkletClosure, type WorkletFn } from './worklet-serialize.d.ts';
|
|
11
|
+
import { type ClosureSpec, type ValueSpec, type WorkletChannel, type WorkletHostValueUpdate, type WorkletMessage, type WorkletMessagePayload, type WorkletViewRef } from './worklet-wire.d.ts';
|
|
18
12
|
export { SAB_COMPOSITOR_TASK_PENDING_INT32_INDEX, SAB_DEMAND_EPOCH_INT32_INDEX, SAB_TENANT_LIVE_FRAMES_INT32_INDEX, SAB_UI_FRAME_DEMAND_INT32_INDEX, SAB_UI_FRAME_DONE_INT32_INDEX, SAB_UI_FRAME_OFFERED_INT32_INDEX, SAB_UI_FRAME_TIME_FLOAT64_INDEX, createSharedValueSAB, createWorkletPeerEpoch, type WorkletPeerEpoch, };
|
|
19
|
-
type WorkletBuiltinName = string;
|
|
20
|
-
type WorkletClosure = Record<string, unknown> | unknown[];
|
|
21
|
-
export interface WorkletViewOwner {
|
|
22
|
-
surfaceId: string;
|
|
23
|
-
generation: number;
|
|
24
|
-
}
|
|
25
|
-
export interface WorkletViewRef extends WorkletViewOwner {
|
|
26
|
-
viewTag: number;
|
|
27
|
-
}
|
|
28
|
-
export type ValueSpec = {
|
|
29
|
-
kind: 'sv';
|
|
30
|
-
id: number;
|
|
31
|
-
bool: boolean;
|
|
32
|
-
hostDecorator?: WorkletFunctionSpec;
|
|
33
|
-
} | {
|
|
34
|
-
kind: 'svObject';
|
|
35
|
-
id: number;
|
|
36
|
-
hostDecorator?: WorkletFunctionSpec;
|
|
37
|
-
} | {
|
|
38
|
-
kind: 'svDetached';
|
|
39
|
-
value: unknown;
|
|
40
|
-
} | {
|
|
41
|
-
kind: 'synchronizable';
|
|
42
|
-
id: number;
|
|
43
|
-
lockId: number;
|
|
44
|
-
referenceId?: number;
|
|
45
|
-
boolean?: true;
|
|
46
|
-
} | {
|
|
47
|
-
kind: 'synchronizableDynamic';
|
|
48
|
-
id: number;
|
|
49
|
-
arena: SynchronizableArenaKey;
|
|
50
|
-
offset: number;
|
|
51
|
-
referenceId?: number;
|
|
52
|
-
reanimatedDataHolder?: true;
|
|
53
|
-
} | {
|
|
54
|
-
kind: 'plain';
|
|
55
|
-
value: unknown;
|
|
56
|
-
} | {
|
|
57
|
-
kind: 'nativeValue';
|
|
58
|
-
value: NativeSerializableValueSpec;
|
|
59
|
-
} | {
|
|
60
|
-
kind: 'builtin';
|
|
61
|
-
name: WorkletBuiltinName;
|
|
62
|
-
} | {
|
|
63
|
-
kind: 'hostValue';
|
|
64
|
-
codec: string;
|
|
65
|
-
data: unknown;
|
|
66
|
-
} | {
|
|
67
|
-
kind: 'custom';
|
|
68
|
-
unpack: WorkletFunctionSpec;
|
|
69
|
-
packed: ValueSpec;
|
|
70
|
-
} | {
|
|
71
|
-
kind: 'fn';
|
|
72
|
-
reanimated2?: true;
|
|
73
|
-
code: string;
|
|
74
|
-
closureSpec: ClosureSpec;
|
|
75
|
-
closureIsArray?: boolean;
|
|
76
|
-
hash: number;
|
|
77
|
-
closureId: number;
|
|
78
|
-
animationInitializer?: ReanimatedAnimationKind;
|
|
79
|
-
animationFactory?: ReanimatedAnimationKind;
|
|
80
|
-
animationProfile?: ReanimatedAnimationProfile;
|
|
81
|
-
} | {
|
|
82
|
-
kind: 'initializer';
|
|
83
|
-
init: WorkletFunctionSpec;
|
|
84
|
-
id?: number;
|
|
85
|
-
} | {
|
|
86
|
-
kind: 'animatedRef';
|
|
87
|
-
target: WorkletViewRef;
|
|
88
|
-
} | {
|
|
89
|
-
kind: 'animatedRefSlot';
|
|
90
|
-
slotId: number;
|
|
91
|
-
} | {
|
|
92
|
-
kind: 'jsCallback';
|
|
93
|
-
id: number;
|
|
94
|
-
} | {
|
|
95
|
-
kind: 'hostFunction';
|
|
96
|
-
id: number;
|
|
97
|
-
} | {
|
|
98
|
-
kind: 'remoteFunction';
|
|
99
|
-
id: number;
|
|
100
|
-
name?: string;
|
|
101
|
-
origin?: 'worklets';
|
|
102
|
-
} | {
|
|
103
|
-
kind: 'undef';
|
|
104
|
-
} | {
|
|
105
|
-
kind: 'error';
|
|
106
|
-
name: string;
|
|
107
|
-
message: string;
|
|
108
|
-
stack?: string;
|
|
109
|
-
} | {
|
|
110
|
-
kind: 'array';
|
|
111
|
-
items: ValueSpec[];
|
|
112
|
-
} | {
|
|
113
|
-
kind: 'set';
|
|
114
|
-
items: ValueSpec[];
|
|
115
|
-
} | {
|
|
116
|
-
kind: 'map';
|
|
117
|
-
entries: Array<[ValueSpec, ValueSpec]>;
|
|
118
|
-
} | {
|
|
119
|
-
kind: 'object';
|
|
120
|
-
entries: Array<[string, ValueSpec]>;
|
|
121
|
-
animationProfile?: ReanimatedAnimationProfile;
|
|
122
|
-
} | {
|
|
123
|
-
kind: 'shareableRef';
|
|
124
|
-
id: number;
|
|
125
|
-
snapshot: Array<[string, ValueSpec]>;
|
|
126
|
-
};
|
|
127
|
-
export type ClosureSpec = Record<string, ValueSpec>;
|
|
128
|
-
type NativeSerializableValueSpec = Extract<ValueSpec, {
|
|
129
|
-
kind: 'error';
|
|
130
|
-
}> | {
|
|
131
|
-
kind: 'plain';
|
|
132
|
-
value: boolean;
|
|
133
|
-
} | {
|
|
134
|
-
kind: 'buffer';
|
|
135
|
-
buffer: ArrayBuffer;
|
|
136
|
-
view?: {
|
|
137
|
-
typeName: string;
|
|
138
|
-
byteOffset: number;
|
|
139
|
-
length: number;
|
|
140
|
-
};
|
|
141
|
-
} | {
|
|
142
|
-
kind: 'regexp';
|
|
143
|
-
pattern: string;
|
|
144
|
-
flags: string;
|
|
145
|
-
};
|
|
146
|
-
export declare const nativeSerializableValues: WeakMap<object, NativeSerializableValueSpec>;
|
|
147
|
-
export declare const nativeHostObjectRefs: WeakMap<object, object>;
|
|
148
|
-
export declare const nativeCustomSerializableRefs: WeakMap<object, {
|
|
149
|
-
unpack: WorkletFn;
|
|
150
|
-
packed: unknown;
|
|
151
|
-
}>;
|
|
152
|
-
export declare const nativeRemoteFunctionRefs: WeakMap<object, {
|
|
153
|
-
callable: (...args: unknown[]) => unknown;
|
|
154
|
-
spec: Extract<ValueSpec, {
|
|
155
|
-
kind: 'remoteFunction';
|
|
156
|
-
}>;
|
|
157
|
-
}>;
|
|
158
|
-
export declare const nativeWorkletEvaluationOwners: WeakMap<object, NativeEvaluationLease>;
|
|
159
|
-
export interface SynchronizableStore {
|
|
160
|
-
boolean?: boolean;
|
|
161
|
-
read(): number;
|
|
162
|
-
write(value: number): void;
|
|
163
|
-
getId(): number;
|
|
164
|
-
getLockId(): number;
|
|
165
|
-
getAccess(): Int32Array;
|
|
166
|
-
setBinding(id: number, lockId: number): void;
|
|
167
|
-
}
|
|
168
|
-
export interface SynchronizableHostObject {
|
|
169
|
-
getDirty(): number | boolean;
|
|
170
|
-
getBlocking(): number | boolean;
|
|
171
|
-
setDirty(value: number | boolean): void;
|
|
172
|
-
setBlocking(value: number | boolean): void;
|
|
173
|
-
lock(): void;
|
|
174
|
-
unlock(): void;
|
|
175
|
-
}
|
|
176
|
-
export declare const nativeShareableHostDecorators: WeakMap<object, WorkletFn>;
|
|
177
|
-
export declare const nativeSynchronizableRefs: WeakMap<object, {
|
|
178
|
-
kind: 'fixed';
|
|
179
|
-
operations: SynchronizableHostObject;
|
|
180
|
-
} | {
|
|
181
|
-
kind: 'dynamic';
|
|
182
|
-
reanimatedDataHolder: boolean;
|
|
183
|
-
storage: NativeDynamicSynchronizableStorage;
|
|
184
|
-
id: number;
|
|
185
|
-
share(): SynchronizableArenaKey;
|
|
186
|
-
operations: {
|
|
187
|
-
getDirty(): unknown;
|
|
188
|
-
getBlocking(): unknown;
|
|
189
|
-
setBlocking(value: unknown): void;
|
|
190
|
-
lock(): void;
|
|
191
|
-
unlock(): void;
|
|
192
|
-
};
|
|
193
|
-
}>;
|
|
194
|
-
export declare function createDynamicSynchronizableHostObject(initial: unknown, binding?: {
|
|
195
|
-
id: number;
|
|
196
|
-
storage: NativeDynamicSynchronizableStorage;
|
|
197
|
-
runtime: WorkletRuntime;
|
|
198
|
-
}, reanimatedDataHolder?: boolean): {};
|
|
199
|
-
export declare function unpackDynamicSynchronizable(ref: object): object & {
|
|
200
|
-
__synchronizableRef: boolean;
|
|
201
|
-
getDirty: () => unknown;
|
|
202
|
-
getBlocking: () => unknown;
|
|
203
|
-
setBlocking: (valueOrFunction: unknown) => void;
|
|
204
|
-
lock: () => void;
|
|
205
|
-
unlock: () => void;
|
|
206
|
-
};
|
|
207
13
|
export declare function isSynchronizableLike(value: unknown): value is SynchronizableHostObject;
|
|
208
|
-
export declare function createSynchronizableHostObject(store: SynchronizableStore): SynchronizableHostObject;
|
|
209
|
-
export declare function materializeNativeSerializableValue(spec: NativeSerializableValueSpec): unknown;
|
|
210
|
-
export declare const materializedWorklets: WeakMap<object, number>;
|
|
211
|
-
export declare function getWorkletHash(fn: WorkletFn): number | undefined;
|
|
212
|
-
type WorkletFunctionSpec = Extract<ValueSpec, {
|
|
213
|
-
kind: 'fn';
|
|
214
|
-
}>;
|
|
215
|
-
type ReanimatedTraceEvent = {
|
|
216
|
-
type: string;
|
|
217
|
-
t: number;
|
|
218
|
-
id?: number;
|
|
219
|
-
value?: number | boolean | null;
|
|
220
|
-
skipNotify?: boolean;
|
|
221
|
-
timestamp?: number;
|
|
222
|
-
current?: number | boolean | null;
|
|
223
|
-
toValue?: number | null;
|
|
224
|
-
velocity?: number | null;
|
|
225
|
-
startValue?: number | null;
|
|
226
|
-
finished?: boolean;
|
|
227
|
-
forceUpdate?: boolean;
|
|
228
|
-
replayIndex?: number | null;
|
|
229
|
-
hostTimestamp?: number;
|
|
230
|
-
startTime?: number | null;
|
|
231
|
-
};
|
|
232
|
-
export declare function setReanimatedTraceEnabled(enabled: boolean, reset?: boolean, limit?: number): void;
|
|
233
|
-
export declare function getReanimatedTraceSnapshot(reset?: boolean): ReanimatedTraceEvent[];
|
|
234
14
|
export declare function isRunningPeerWorklet(): boolean;
|
|
235
|
-
export declare function installWorkletFrameFinalizerScheduler(schedule: (callback: () => void) => void): void;
|
|
236
|
-
export declare function claimUIRuntimeHostGlobals(): void;
|
|
237
|
-
export declare function registerStaticWorkletBody(hash: number, body: (...args: never[]) => unknown): void;
|
|
238
|
-
export declare function getStaticWorkletBody(hash: number): ((...args: unknown[]) => unknown) | undefined;
|
|
239
|
-
export declare function markWorkletBuiltin<T extends object>(name: string, value: T): T;
|
|
240
|
-
export declare function markWorkletHostFunction<T extends (...args: never[]) => void>(fn: T): T;
|
|
241
|
-
export declare function isWorkletHostFunction(value: unknown): value is (...args: unknown[]) => void;
|
|
242
|
-
export interface WorkletHostValueCodec<T extends object, D> {
|
|
243
|
-
pack(value: T, carrier?: WorkletRuntime): D;
|
|
244
|
-
unpack(data: D): T;
|
|
245
|
-
receive?(data: D, decode: (value: ValueSpec) => unknown): void;
|
|
246
|
-
disposeRuntime?(runtime: WorkletRuntime): void;
|
|
247
|
-
retirePeer?(runtime: WorkletRuntime): void;
|
|
248
|
-
}
|
|
249
|
-
export interface WorkletHostValueUpdate {
|
|
250
|
-
codec: string;
|
|
251
|
-
data: unknown;
|
|
252
|
-
}
|
|
253
|
-
export declare function registerWorkletHostValueCodec<T extends object, D>(name: string, codec: WorkletHostValueCodec<T, D>): void;
|
|
254
|
-
export declare function markWorkletHostValue<T extends object>(target: T, codec: string): T;
|
|
255
|
-
export interface PackedWorkletHostValue {
|
|
256
|
-
codec: string;
|
|
257
|
-
data: unknown;
|
|
258
|
-
}
|
|
259
|
-
export declare function isWorkletHostValue(value: unknown): value is object;
|
|
260
|
-
export declare function packWorkletHostValue(value: object, carrier?: WorkletRuntime): PackedWorkletHostValue;
|
|
261
|
-
export declare function unpackWorkletHostValue(packed: PackedWorkletHostValue): object;
|
|
262
|
-
export interface CustomSerializableRegistration {
|
|
263
|
-
name: string;
|
|
264
|
-
determine: (value: object) => boolean;
|
|
265
|
-
pack: (value: object) => unknown;
|
|
266
|
-
unpack: WorkletFn;
|
|
267
|
-
}
|
|
268
|
-
export declare function getCustomSerializationRegistry(): CustomSerializableRegistration[];
|
|
269
15
|
export interface WorkletDispatchOptions {
|
|
270
16
|
awaitReply?: boolean;
|
|
271
17
|
callerThread?: WorkletThreadIdentity;
|
|
@@ -292,303 +38,6 @@ export interface NamedWorkletRuntimeDelegate {
|
|
|
292
38
|
destroy(handle: NamedWorkletRuntimeHandle): void;
|
|
293
39
|
dispose(): void;
|
|
294
40
|
}
|
|
295
|
-
export type AnimatedPropsWriteSlots = Record<string, {
|
|
296
|
-
timestamp: number;
|
|
297
|
-
version: number;
|
|
298
|
-
}>;
|
|
299
|
-
export type WorkletMessagePayload = ({
|
|
300
|
-
type: 'runWorklet';
|
|
301
|
-
reanimated2?: true;
|
|
302
|
-
reanimated2Surface?: {
|
|
303
|
-
surfaceId: string;
|
|
304
|
-
generation: number;
|
|
305
|
-
};
|
|
306
|
-
runId: number;
|
|
307
|
-
code: string;
|
|
308
|
-
hash: number;
|
|
309
|
-
closureId: number;
|
|
310
|
-
closureSpec: ClosureSpec;
|
|
311
|
-
closureIsArray?: boolean;
|
|
312
|
-
argsSpec: ValueSpec[];
|
|
313
|
-
awaitReply: boolean;
|
|
314
|
-
eventTimestamp?: number;
|
|
315
|
-
} & ({
|
|
316
|
-
sync: true;
|
|
317
|
-
callerThread: WorkletThreadIdentity;
|
|
318
|
-
syncReply?: SyncReplyBuffer;
|
|
319
|
-
} | {
|
|
320
|
-
sync?: never;
|
|
321
|
-
callerThread?: WorkletThreadIdentity;
|
|
322
|
-
syncReply?: never;
|
|
323
|
-
})) | {
|
|
324
|
-
type: 'workletReply';
|
|
325
|
-
runId: number;
|
|
326
|
-
ok: boolean;
|
|
327
|
-
returnValueSpec?: ValueSpec;
|
|
328
|
-
error?: string;
|
|
329
|
-
hostValueUpdates?: WorkletHostValueUpdate[];
|
|
330
|
-
} | {
|
|
331
|
-
type: 'hostValueUpdates';
|
|
332
|
-
updates: WorkletHostValueUpdate[];
|
|
333
|
-
} | {
|
|
334
|
-
type: 'workletBundleModules';
|
|
335
|
-
key: string;
|
|
336
|
-
modules: WorkletBundleModule[];
|
|
337
|
-
} | {
|
|
338
|
-
type: 'workletDone';
|
|
339
|
-
runId: number;
|
|
340
|
-
ok: boolean;
|
|
341
|
-
error?: string;
|
|
342
|
-
} | {
|
|
343
|
-
type: 'svUpdate';
|
|
344
|
-
svId: number;
|
|
345
|
-
value: number;
|
|
346
|
-
} | {
|
|
347
|
-
type: 'svUpdateBatch';
|
|
348
|
-
updates: Array<{
|
|
349
|
-
svId: number;
|
|
350
|
-
value: number;
|
|
351
|
-
}>;
|
|
352
|
-
objectUpdates?: Array<{
|
|
353
|
-
svId: number;
|
|
354
|
-
value: ValueSpec;
|
|
355
|
-
}>;
|
|
356
|
-
} | {
|
|
357
|
-
type: 'svAlloc';
|
|
358
|
-
svId: number;
|
|
359
|
-
initial: number;
|
|
360
|
-
bool?: boolean;
|
|
361
|
-
} | {
|
|
362
|
-
type: 'svObjectAlloc';
|
|
363
|
-
svId: number;
|
|
364
|
-
initial: ValueSpec;
|
|
365
|
-
} | {
|
|
366
|
-
type: 'svFree';
|
|
367
|
-
svId: number;
|
|
368
|
-
} | {
|
|
369
|
-
type: 'svPlayback';
|
|
370
|
-
svId: number;
|
|
371
|
-
playback: SharedValuePlayback;
|
|
372
|
-
} | {
|
|
373
|
-
type: 'runJSCallback';
|
|
374
|
-
callbackId: number;
|
|
375
|
-
argsSpec: ValueSpec[];
|
|
376
|
-
} | {
|
|
377
|
-
type: 'cacheRelease';
|
|
378
|
-
closures?: Array<{
|
|
379
|
-
hash: number;
|
|
380
|
-
closureId: number;
|
|
381
|
-
}>;
|
|
382
|
-
shareables?: number[];
|
|
383
|
-
jsCallbacks?: number[];
|
|
384
|
-
synchronizables?: number[];
|
|
385
|
-
} | {
|
|
386
|
-
type: 'frameCallbackRegister';
|
|
387
|
-
callbackId: number;
|
|
388
|
-
callback: WorkletFunctionSpec;
|
|
389
|
-
active: boolean;
|
|
390
|
-
} | {
|
|
391
|
-
type: 'frameCallbackSetActive';
|
|
392
|
-
callbackId: number;
|
|
393
|
-
active: boolean;
|
|
394
|
-
} | {
|
|
395
|
-
type: 'frameCallbackUnregister';
|
|
396
|
-
callbackId: number;
|
|
397
|
-
} | {
|
|
398
|
-
type: 'eventHandlerRegister';
|
|
399
|
-
handlerId: number;
|
|
400
|
-
callback: WorkletFunctionSpec;
|
|
401
|
-
eventName: string;
|
|
402
|
-
viewTag: number;
|
|
403
|
-
ownerKey?: string;
|
|
404
|
-
} | {
|
|
405
|
-
type: 'eventHandlerUnregister';
|
|
406
|
-
handlerId: number;
|
|
407
|
-
ownerKey?: string;
|
|
408
|
-
} | {
|
|
409
|
-
type: 'eventHandlerDispatch';
|
|
410
|
-
handlerId: number;
|
|
411
|
-
ownerKey?: string;
|
|
412
|
-
event: Record<string, unknown>;
|
|
413
|
-
} | {
|
|
414
|
-
type: 'keyboardHandlerRegister';
|
|
415
|
-
handlerId: number;
|
|
416
|
-
callback: WorkletFunctionSpec;
|
|
417
|
-
} | {
|
|
418
|
-
type: 'keyboardHandlerUnregister';
|
|
419
|
-
handlerId: number;
|
|
420
|
-
} | {
|
|
421
|
-
type: 'sensorHandlerRegister';
|
|
422
|
-
handlerId: number;
|
|
423
|
-
sensorType: number;
|
|
424
|
-
interval: number;
|
|
425
|
-
callback: WorkletFunctionSpec;
|
|
426
|
-
} | {
|
|
427
|
-
type: 'sensorHandlerUnregister';
|
|
428
|
-
handlerId: number;
|
|
429
|
-
} | {
|
|
430
|
-
type: 'layoutAnimationConfigureBatch';
|
|
431
|
-
items: Array<{
|
|
432
|
-
surfaceId: string;
|
|
433
|
-
generation: number;
|
|
434
|
-
viewTag: number;
|
|
435
|
-
animationType: number;
|
|
436
|
-
config: ValueSpec | null;
|
|
437
|
-
sharedTransitionTag?: string;
|
|
438
|
-
}>;
|
|
439
|
-
} | {
|
|
440
|
-
type: 'layoutAnimationShouldExit';
|
|
441
|
-
surfaceId: string;
|
|
442
|
-
generation: number;
|
|
443
|
-
viewTag: number;
|
|
444
|
-
shouldAnimate: boolean;
|
|
445
|
-
} | {
|
|
446
|
-
type: 'layoutAnimationMarkRemovable';
|
|
447
|
-
surfaceId: string;
|
|
448
|
-
generation: number;
|
|
449
|
-
viewTag: number;
|
|
450
|
-
} | {
|
|
451
|
-
type: 'layoutAnimationUnmarkRemovable';
|
|
452
|
-
surfaceId: string;
|
|
453
|
-
generation: number;
|
|
454
|
-
viewTag: number;
|
|
455
|
-
} | {
|
|
456
|
-
type: 'cssViewStyleSet';
|
|
457
|
-
target: WorkletViewRef;
|
|
458
|
-
style: ValueSpec | null;
|
|
459
|
-
} | {
|
|
460
|
-
type: 'cssKeyframesRegister';
|
|
461
|
-
animationName: string;
|
|
462
|
-
compoundComponentName: string;
|
|
463
|
-
config: ValueSpec;
|
|
464
|
-
} | {
|
|
465
|
-
type: 'cssKeyframesUnregister';
|
|
466
|
-
animationName: string;
|
|
467
|
-
compoundComponentName: string;
|
|
468
|
-
} | {
|
|
469
|
-
type: 'cssAnimationsApply';
|
|
470
|
-
target: WorkletViewRef;
|
|
471
|
-
compoundComponentName: string;
|
|
472
|
-
updates: ValueSpec;
|
|
473
|
-
} | {
|
|
474
|
-
type: 'cssAnimationsUnregister';
|
|
475
|
-
target: WorkletViewRef;
|
|
476
|
-
} | {
|
|
477
|
-
type: 'cssViewRemove';
|
|
478
|
-
target: WorkletViewRef;
|
|
479
|
-
removalId: number;
|
|
480
|
-
} | {
|
|
481
|
-
type: 'cssViewRemoveAck';
|
|
482
|
-
target: WorkletViewRef;
|
|
483
|
-
removalId: number;
|
|
484
|
-
} | {
|
|
485
|
-
type: 'cssTransitionRun';
|
|
486
|
-
target: WorkletViewRef;
|
|
487
|
-
config: ValueSpec;
|
|
488
|
-
eventMask?: number;
|
|
489
|
-
} | {
|
|
490
|
-
type: 'cssTransitionRegister' | 'cssTransitionUpdate';
|
|
491
|
-
target: WorkletViewRef;
|
|
492
|
-
config: ValueSpec;
|
|
493
|
-
} | {
|
|
494
|
-
type: 'cssTransitionUnregister';
|
|
495
|
-
target: WorkletViewRef;
|
|
496
|
-
} | {
|
|
497
|
-
type: 'cssEvents';
|
|
498
|
-
events: NativeCSSEvent[];
|
|
499
|
-
} | {
|
|
500
|
-
type: 'applyAnimatedProps';
|
|
501
|
-
ops: Array<{
|
|
502
|
-
target: WorkletViewRef;
|
|
503
|
-
updates: Record<string, unknown>;
|
|
504
|
-
timestamp: number;
|
|
505
|
-
writeVersion: number;
|
|
506
|
-
lease?: AnimatedDrivenStyleLease;
|
|
507
|
-
}>;
|
|
508
|
-
} | {
|
|
509
|
-
type: 'retireAnimatedDrivenStyle';
|
|
510
|
-
target: WorkletViewRef;
|
|
511
|
-
retirement: AnimatedDrivenStyleRetirement;
|
|
512
|
-
} | {
|
|
513
|
-
type: 'animatedSlotBinding';
|
|
514
|
-
target: WorkletViewRef;
|
|
515
|
-
slotVersion: number;
|
|
516
|
-
writeSlots: AnimatedPropsWriteSlots;
|
|
517
|
-
template: Record<string, unknown>;
|
|
518
|
-
snapshotTemplate: Record<string, unknown>;
|
|
519
|
-
restoreSource?: boolean;
|
|
520
|
-
} | {
|
|
521
|
-
type: 'animatedSlotUnbind';
|
|
522
|
-
target: WorkletViewRef;
|
|
523
|
-
finalUpdates: Record<string, unknown>;
|
|
524
|
-
retirementId?: number;
|
|
525
|
-
} | {
|
|
526
|
-
type: 'animatedSlotUnbound';
|
|
527
|
-
retirementId: number;
|
|
528
|
-
target: WorkletViewRef;
|
|
529
|
-
retirement?: AnimatedDrivenStyleRetirement;
|
|
530
|
-
} | {
|
|
531
|
-
type: 'animatedSlotFence';
|
|
532
|
-
retirementId: number;
|
|
533
|
-
} | {
|
|
534
|
-
type: 'animatedSlotFenced';
|
|
535
|
-
retirementId: number;
|
|
536
|
-
} | {
|
|
537
|
-
type: 'nativeAnimatedDriveEnd';
|
|
538
|
-
sourceSurfaceId: string;
|
|
539
|
-
sourceGeneration: number;
|
|
540
|
-
driveId: number;
|
|
541
|
-
lifecycleId: number;
|
|
542
|
-
finished: boolean;
|
|
543
|
-
finalValue: number;
|
|
544
|
-
} | {
|
|
545
|
-
type: 'nativeAnimGraphDriveEnd';
|
|
546
|
-
sourceSurfaceId: string;
|
|
547
|
-
sourceGeneration: number;
|
|
548
|
-
driveId: number;
|
|
549
|
-
lifecycleId: number;
|
|
550
|
-
finished: boolean;
|
|
551
|
-
values: Array<{
|
|
552
|
-
valueId: number;
|
|
553
|
-
value: number;
|
|
554
|
-
}>;
|
|
555
|
-
} | {
|
|
556
|
-
type: 'nativeAnimGraphDriveSlots';
|
|
557
|
-
sourceSurfaceId: string;
|
|
558
|
-
sourceGeneration: number;
|
|
559
|
-
driveId: number;
|
|
560
|
-
lifecycleId: number;
|
|
561
|
-
values: Array<{
|
|
562
|
-
valueId: number;
|
|
563
|
-
slot: number;
|
|
564
|
-
}>;
|
|
565
|
-
} | {
|
|
566
|
-
type: 'nativeAnimGraphDriveUpdate';
|
|
567
|
-
sourceSurfaceId: string;
|
|
568
|
-
sourceGeneration: number;
|
|
569
|
-
driveId: number;
|
|
570
|
-
lifecycleId: number;
|
|
571
|
-
values: Array<{
|
|
572
|
-
valueId: number;
|
|
573
|
-
value: number;
|
|
574
|
-
}>;
|
|
575
|
-
} | {
|
|
576
|
-
type: 'peerDispose';
|
|
577
|
-
} | {
|
|
578
|
-
type: 'peerHello';
|
|
579
|
-
};
|
|
580
|
-
type WithPeerEpoch<T> = T extends unknown ? T & {
|
|
581
|
-
peerEpoch: WorkletPeerEpoch;
|
|
582
|
-
nativeRenderer?: NativeRenderer;
|
|
583
|
-
tenantBundleMode?: DemoBundleMode;
|
|
584
|
-
workletsStaticFlags?: WorkletsStaticFlags | null;
|
|
585
|
-
} : never;
|
|
586
|
-
export type WorkletMessage = WithPeerEpoch<WorkletMessagePayload>;
|
|
587
|
-
export interface WorkletChannel {
|
|
588
|
-
send(msg: WorkletMessage): void;
|
|
589
|
-
bindReceive(handler: (msg: WorkletMessage) => void): void;
|
|
590
|
-
hasPeer(): boolean;
|
|
591
|
-
}
|
|
592
41
|
export declare class WorkletRuntime {
|
|
593
42
|
private uiSyncReply;
|
|
594
43
|
private namedRuntimeDelegate;
|
|
@@ -962,82 +411,9 @@ export declare class WorkletRuntime {
|
|
|
962
411
|
private serializeAnimatedRefForDispatch;
|
|
963
412
|
private bindRemoteWorklet;
|
|
964
413
|
}
|
|
965
|
-
export declare function freezeReanimated2Records<T>(value: T, seen?: WeakSet<WeakKey>): T;
|
|
966
|
-
export declare function invokeNativeWorklet(body: (...args: unknown[]) => unknown, receiver: unknown, args: unknown[], closure: object, reanimated2?: boolean, surface?: {
|
|
967
|
-
surfaceId: string;
|
|
968
|
-
generation: number;
|
|
969
|
-
}): unknown;
|
|
970
|
-
export interface SharedValueProxy {
|
|
971
|
-
_id: number;
|
|
972
|
-
_isReanimatedSharedValue: true;
|
|
973
|
-
value: number | boolean | null | undefined;
|
|
974
|
-
_value: number | boolean | null | undefined;
|
|
975
|
-
_animation: unknown;
|
|
976
|
-
get(): number | boolean | null | undefined;
|
|
977
|
-
set(v: number | boolean | null | undefined | (() => number | boolean | null | undefined)): void;
|
|
978
|
-
modify(modifier: (value: number | boolean | null | undefined) => number | boolean | null | undefined, forceUpdate?: boolean): void;
|
|
979
|
-
addListener(id: number, fn: (value: number) => void): void;
|
|
980
|
-
removeListener(id: number): void;
|
|
981
|
-
setDirty(dirty: boolean): void;
|
|
982
|
-
}
|
|
983
|
-
export interface ObjectSharedValueProxy {
|
|
984
|
-
_id: number;
|
|
985
|
-
_isReanimatedSharedValue: true;
|
|
986
|
-
value: unknown;
|
|
987
|
-
_value: unknown;
|
|
988
|
-
_animation: unknown;
|
|
989
|
-
get(): unknown;
|
|
990
|
-
set(v: unknown): void;
|
|
991
|
-
modify(modifier: (value: unknown) => unknown, forceUpdate?: boolean): void;
|
|
992
|
-
addListener(id: number, fn: (value: unknown) => void): void;
|
|
993
|
-
removeListener(id: number): void;
|
|
994
|
-
setDirty(dirty: boolean): void;
|
|
995
|
-
}
|
|
996
|
-
export interface WorkletFn {
|
|
997
|
-
__closure?: WorkletClosure;
|
|
998
|
-
_closure?: WorkletClosure;
|
|
999
|
-
asString?: string;
|
|
1000
|
-
__workletHash?: number;
|
|
1001
|
-
__initData?: {
|
|
1002
|
-
code?: string;
|
|
1003
|
-
location?: string;
|
|
1004
|
-
sourceMap?: string;
|
|
1005
|
-
};
|
|
1006
|
-
(...args: unknown[]): unknown;
|
|
1007
|
-
}
|
|
1008
|
-
export declare const SHAREABLE_ID_KEY: unique symbol;
|
|
1009
|
-
export declare function serializeValue(value: unknown): ValueSpec;
|
|
1010
|
-
export declare function serializeValueSnapshot(value: unknown): ValueSpec;
|
|
1011
|
-
export declare function serializeClosure(closure: WorkletClosure): ClosureSpec;
|
|
1012
414
|
export declare function markObjectSV(target: object): void;
|
|
1013
|
-
interface WorkletBundleModule {
|
|
1014
|
-
id: number;
|
|
1015
|
-
source: string;
|
|
1016
|
-
dependencyMap: number[];
|
|
1017
|
-
name: string;
|
|
1018
|
-
}
|
|
1019
|
-
interface SanitizeState {
|
|
1020
|
-
seen: WeakMap<object, unknown>;
|
|
1021
|
-
active: WeakSet<object>;
|
|
1022
|
-
depth: number;
|
|
1023
|
-
}
|
|
1024
|
-
export declare function sanitizeForPeer(value: Record<string, unknown>): Record<string, unknown>;
|
|
1025
|
-
export declare function sanitizeForPeer(value: unknown, state?: SanitizeState): unknown;
|
|
1026
|
-
export declare function evalWorkletCode(code: string): (...args: unknown[]) => unknown;
|
|
1027
415
|
export declare function setActiveWorkletRuntime(rt: WorkletRuntime): void;
|
|
1028
416
|
export declare function postWorkletHostValueUpdate(codec: string, data: unknown): void;
|
|
1029
|
-
export declare function getActiveWorkletRuntime(): WorkletRuntime | null;
|
|
1030
417
|
export declare function isNativeFrameQueueCallback(callback: FrameRequestCallback): boolean;
|
|
1031
|
-
export declare class NativeFrameQueue {
|
|
1032
|
-
private callbacks;
|
|
1033
|
-
private handle;
|
|
1034
|
-
private cancelled;
|
|
1035
|
-
constructor();
|
|
1036
|
-
readonly request: (callback: FrameRequestCallback) => void;
|
|
1037
|
-
private readonly flush;
|
|
1038
|
-
cancel(): void;
|
|
1039
|
-
}
|
|
1040
|
-
export declare function installHeadlessNativeFrames(): void;
|
|
1041
|
-
export declare function retireHeadlessNativeFrames(): void;
|
|
1042
418
|
export declare function gestureSeamPeerEpoch(): WorkletPeerEpoch;
|
|
1043
419
|
export declare const evaluatedLazyShellBootRoots: string[];
|