peachsim 0.1.2075 → 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.
Files changed (92) hide show
  1. package/cli/outbound-endpoints.ts +1 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +1 -1
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +1 -1
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity-project.cjs +1 -1
  49. package/dist-lib/native-app-identity-project.mjs +1 -1
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +1 -1
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +1 -1
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -25
  82. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -7
  83. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -1
  84. package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +4 -1
  85. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +2 -1
  86. package/dist-types/packages/peach-engine/src/render-worker/reanimated-css-contract.d.ts +1 -1
  87. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +1 -1
  88. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +1 -1
  89. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -627
  90. package/dist-types/packages/peach-engine/src/render-worker/worklet-serialize.d.ts +186 -0
  91. package/dist-types/packages/peach-engine/src/render-worker/worklet-wire.d.ts +447 -0
  92. package/package.json +1 -1
@@ -0,0 +1,186 @@
1
+ import { NativeDynamicSynchronizableStorage, type SynchronizableArenaKey } from './native-dynamic-synchronizable.d.ts';
2
+ import { type ReanimatedAnimationKind } from './reanimated-readiness.d.ts';
3
+ import { type ClosureSpec, type NativeSerializableValueSpec, type ValueSpec, type WorkletBundleModule, type WorkletFunctionSpec, type WorkletViewRef } from './worklet-wire.d.ts';
4
+ import type { WorkletRuntime } from './worklet-runtime.d.ts';
5
+ import type { NativeEvaluationLease } from '../../../peach-compat/src/stubs/native-evaluation-lease.d.ts';
6
+ import type { ReanimatedAnimationProfile } from '../../../peach-globals/src/profilerContract.d.ts';
7
+ export declare const OBJECT_ID_BASE = 4294967296;
8
+ export type WorkletClosure = Record<string, unknown> | unknown[];
9
+ export declare const nativeSerializableValues: WeakMap<object, NativeSerializableValueSpec>;
10
+ export declare const nativeHostObjectRefs: WeakMap<object, object>;
11
+ export declare const nativeCustomSerializableRefs: WeakMap<object, {
12
+ unpack: WorkletFn;
13
+ packed: unknown;
14
+ }>;
15
+ export declare const nativeRemoteFunctionRefs: WeakMap<object, {
16
+ callable: (...args: unknown[]) => unknown;
17
+ spec: Extract<ValueSpec, {
18
+ kind: 'remoteFunction';
19
+ }>;
20
+ }>;
21
+ export declare const nativeWorkletEvaluationOwners: WeakMap<object, NativeEvaluationLease>;
22
+ export interface SynchronizableStore {
23
+ boolean?: boolean;
24
+ read(): number;
25
+ write(value: number): void;
26
+ getId(): number;
27
+ getLockId(): number;
28
+ getAccess(): Int32Array;
29
+ setBinding(id: number, lockId: number): void;
30
+ }
31
+ export interface SynchronizableHostObject {
32
+ getDirty(): number | boolean;
33
+ getBlocking(): number | boolean;
34
+ setDirty(value: number | boolean): void;
35
+ setBlocking(value: number | boolean): void;
36
+ lock(): void;
37
+ unlock(): void;
38
+ }
39
+ export declare const nativeShareableHostDecorators: WeakMap<object, WorkletFn>;
40
+ export declare const nativeSynchronizableRefs: WeakMap<object, {
41
+ kind: 'fixed';
42
+ operations: SynchronizableHostObject;
43
+ } | {
44
+ kind: 'dynamic';
45
+ reanimatedDataHolder: boolean;
46
+ storage: NativeDynamicSynchronizableStorage;
47
+ id: number;
48
+ share(): SynchronizableArenaKey;
49
+ operations: {
50
+ getDirty(): unknown;
51
+ getBlocking(): unknown;
52
+ setBlocking(value: unknown): void;
53
+ lock(): void;
54
+ unlock(): void;
55
+ };
56
+ }>;
57
+ export declare const synchronizableStores: WeakMap<object, SynchronizableStore>;
58
+ export declare const synchronizableThreadOwners: WeakMap<ArrayBufferLike, Map<number, number>>;
59
+ export declare function createDynamicSynchronizableHostObject(initial: unknown, binding?: {
60
+ id: number;
61
+ storage: NativeDynamicSynchronizableStorage;
62
+ runtime: WorkletRuntime;
63
+ }, reanimatedDataHolder?: boolean): {};
64
+ export declare function unpackDynamicSynchronizable(ref: object): object & {
65
+ __synchronizableRef: boolean;
66
+ getDirty: () => unknown;
67
+ getBlocking: () => unknown;
68
+ setBlocking: (valueOrFunction: unknown) => void;
69
+ lock: () => void;
70
+ unlock: () => void;
71
+ };
72
+ export declare function createSynchronizableHostObject(store: SynchronizableStore): SynchronizableHostObject;
73
+ export declare function materializeNativeSerializableValue(spec: NativeSerializableValueSpec): unknown;
74
+ export declare const materializedWorklets: WeakMap<object, number>;
75
+ export declare function getWorkletHash(fn: WorkletFn): number | undefined;
76
+ export declare const WORKLET_BUILTIN_NAME: unique symbol;
77
+ export declare const WORKLET_HOST_FUNCTION: unique symbol;
78
+ export declare function isWorkletHostFunction(value: unknown): value is (...args: unknown[]) => void;
79
+ export interface WorkletHostValueCodec<T extends object, D> {
80
+ pack(value: T, carrier?: WorkletRuntime): D;
81
+ unpack(data: D): T;
82
+ receive?(data: D, decode: (value: ValueSpec) => unknown): void;
83
+ disposeRuntime?(runtime: WorkletRuntime): void;
84
+ retirePeer?(runtime: WorkletRuntime): void;
85
+ }
86
+ type AnyWorkletHostValueCodec = WorkletHostValueCodec<object, unknown>;
87
+ export declare function getWorkletHostValueCodecs(): Map<string, AnyWorkletHostValueCodec>;
88
+ export declare function registerWorkletHostValueCodec<T extends object, D>(name: string, codec: WorkletHostValueCodec<T, D>): void;
89
+ export declare function markWorkletHostValue<T extends object>(target: T, codec: string): T;
90
+ export interface PackedWorkletHostValue {
91
+ codec: string;
92
+ data: unknown;
93
+ }
94
+ export declare function isWorkletHostValue(value: unknown): value is object;
95
+ export declare function packWorkletHostValue(value: object, carrier?: WorkletRuntime): PackedWorkletHostValue;
96
+ export declare function unpackWorkletHostValue(packed: PackedWorkletHostValue): object;
97
+ export interface CustomSerializableRegistration {
98
+ name: string;
99
+ determine: (value: object) => boolean;
100
+ pack: (value: object) => unknown;
101
+ unpack: WorkletFn;
102
+ }
103
+ export declare function getCustomSerializationRegistry(): CustomSerializableRegistration[];
104
+ export declare function getWorkletHostValueCodec(name: string): AnyWorkletHostValueCodec;
105
+ export interface WorkletFn {
106
+ __closure?: WorkletClosure;
107
+ _closure?: WorkletClosure;
108
+ asString?: string;
109
+ __workletHash?: number;
110
+ __initData?: {
111
+ code?: string;
112
+ location?: string;
113
+ sourceMap?: string;
114
+ };
115
+ (...args: unknown[]): unknown;
116
+ }
117
+ export declare const SHAREABLE_ID_KEY: unique symbol;
118
+ export declare function serializeValue(value: unknown): ValueSpec;
119
+ export declare function serializeValueSnapshot(value: unknown): ValueSpec;
120
+ interface SerializeOptions {
121
+ snapshotObjects?: boolean;
122
+ registerPlainFunction?: (fn: (...args: unknown[]) => unknown) => Extract<ValueSpec, {
123
+ kind: 'remoteFunction';
124
+ }>;
125
+ registerHostFunction?: (fn: (...args: unknown[]) => void) => Extract<ValueSpec, {
126
+ kind: 'hostFunction';
127
+ }>;
128
+ serializeWorkletFunction?: (fn: WorkletFn) => WorkletFunctionSpec;
129
+ serializeAnimatedRef?: (value: unknown) => ValueSpec | null;
130
+ onShareableRef?: (id: number, source: object) => void;
131
+ shipJSCallback?: (wrapper: (...args: unknown[]) => unknown) => number;
132
+ shipSynchronizable?: (source: object) => number | undefined;
133
+ carrier?: WorkletRuntime;
134
+ }
135
+ export declare function serializeValueInternal(value: unknown, opts?: SerializeOptions, seen?: WeakSet<object>, depth?: number, path?: string): ValueSpec;
136
+ export declare function serializeClosure(closure: WorkletClosure): ClosureSpec;
137
+ export declare const BOOL_SV_BRAND: unique symbol;
138
+ export declare function isSurfaceGeneration(value: unknown): value is number;
139
+ export declare function serializedViewWrapper(target: WorkletViewRef): Record<string, unknown>;
140
+ export interface AnimatedRefLike {
141
+ (...args: unknown[]): unknown;
142
+ current?: unknown;
143
+ getTag?: () => unknown;
144
+ observe?: (observer: (tagOrWrapper: unknown) => unknown) => unknown;
145
+ }
146
+ export declare function isAnimatedRefLike(value: unknown): value is AnimatedRefLike;
147
+ export declare function getAnimatedRefViewRef(value: unknown): WorkletViewRef | null;
148
+ export declare function isValidViewTag(value: unknown): value is number;
149
+ export declare function animationProvenance(fn: object): {
150
+ animationInitializer?: ReanimatedAnimationKind;
151
+ animationFactory?: ReanimatedAnimationKind;
152
+ animationProfile?: ReanimatedAnimationProfile;
153
+ };
154
+ export declare const OBJECT_SV_BRAND: unique symbol;
155
+ export declare function isWorkletFn(v: unknown): v is WorkletFn;
156
+ export declare function getWorkletDispatchCode(fn: WorkletFn, hash: number, bundleModuleGraph?: boolean, shipBundleGraph?: (graph: WorkletBundleGraph) => void): string;
157
+ export interface WorkletBundleGraph {
158
+ key: string;
159
+ entryId: number;
160
+ modules: WorkletBundleModule[];
161
+ }
162
+ interface WorkletBundleTable {
163
+ records: Map<number, WorkletBundleModule>;
164
+ exports: Map<number, {
165
+ exports: unknown;
166
+ }>;
167
+ defaults: Map<number, unknown>;
168
+ namespaces: Map<number, unknown>;
169
+ load: (id: number, name?: string) => unknown;
170
+ }
171
+ export declare function getWorkletBundleTables(): Map<string, WorkletBundleTable>;
172
+ export declare function isEsModule(value: unknown): value is object;
173
+ export declare function registerWorkletBundleModules(key: string, modules: readonly WorkletBundleModule[]): void;
174
+ interface SanitizeState {
175
+ seen: WeakMap<object, unknown>;
176
+ active: WeakSet<object>;
177
+ depth: number;
178
+ }
179
+ export declare function sanitizeForPeer(value: Record<string, unknown>): Record<string, unknown>;
180
+ export declare function sanitizeForPeer(value: unknown, state?: SanitizeState): unknown;
181
+ export declare const GLOBAL_KEY = "__sootsim_worklet_runtime";
182
+ export interface WorkletRuntimeGlobals {
183
+ [GLOBAL_KEY]?: WorkletRuntime;
184
+ }
185
+ export declare function getActiveWorkletRuntime(): WorkletRuntime | null;
186
+ export {};
@@ -0,0 +1,447 @@
1
+ import { type SynchronizableArenaKey } from './native-dynamic-synchronizable.d.ts';
2
+ import { type NativeCSSEvent } from './reanimated-css-contract.d.ts';
3
+ import { type ReanimatedAnimationKind, type SharedValuePlayback } from './reanimated-readiness.d.ts';
4
+ import { type WorkletPeerEpoch } from './worklet-sab.d.ts';
5
+ import type { NativeRenderer } from '../../../../../src/config.ts';
6
+ import type { WorkletsStaticFlags } from '../../../../../src/packageVersionsContract.ts';
7
+ import type { DemoBundleMode } from '../demo/demo-bundle-platform.d.ts';
8
+ import type { AnimatedDrivenStyleLease, AnimatedDrivenStyleRetirement } from '../engine/animated-driven-style.d.ts';
9
+ import type { SyncReplyBuffer } from './nativeSyncReplyContract.d.ts';
10
+ import type { WorkletThreadIdentity } from './workletThreadIdentityContract.d.ts';
11
+ import type { ReanimatedAnimationProfile } from '../../../peach-globals/src/profilerContract.d.ts';
12
+ export type WorkletBuiltinName = string;
13
+ export interface WorkletViewOwner {
14
+ surfaceId: string;
15
+ generation: number;
16
+ }
17
+ export interface WorkletViewRef extends WorkletViewOwner {
18
+ viewTag: number;
19
+ }
20
+ export type ValueSpec = {
21
+ kind: 'sv';
22
+ id: number;
23
+ bool: boolean;
24
+ hostDecorator?: WorkletFunctionSpec;
25
+ } | {
26
+ kind: 'svObject';
27
+ id: number;
28
+ hostDecorator?: WorkletFunctionSpec;
29
+ } | {
30
+ kind: 'svDetached';
31
+ value: unknown;
32
+ } | {
33
+ kind: 'synchronizable';
34
+ id: number;
35
+ lockId: number;
36
+ referenceId?: number;
37
+ boolean?: true;
38
+ } | {
39
+ kind: 'synchronizableDynamic';
40
+ id: number;
41
+ arena: SynchronizableArenaKey;
42
+ offset: number;
43
+ referenceId?: number;
44
+ reanimatedDataHolder?: true;
45
+ } | {
46
+ kind: 'plain';
47
+ value: unknown;
48
+ } | {
49
+ kind: 'nativeValue';
50
+ value: NativeSerializableValueSpec;
51
+ } | {
52
+ kind: 'builtin';
53
+ name: WorkletBuiltinName;
54
+ } | {
55
+ kind: 'hostValue';
56
+ codec: string;
57
+ data: unknown;
58
+ } | {
59
+ kind: 'custom';
60
+ unpack: WorkletFunctionSpec;
61
+ packed: ValueSpec;
62
+ } | {
63
+ kind: 'fn';
64
+ reanimated2?: true;
65
+ code: string;
66
+ closureSpec: ClosureSpec;
67
+ closureIsArray?: boolean;
68
+ hash: number;
69
+ closureId: number;
70
+ animationInitializer?: ReanimatedAnimationKind;
71
+ animationFactory?: ReanimatedAnimationKind;
72
+ animationProfile?: ReanimatedAnimationProfile;
73
+ } | {
74
+ kind: 'initializer';
75
+ init: WorkletFunctionSpec;
76
+ id?: number;
77
+ } | {
78
+ kind: 'animatedRef';
79
+ target: WorkletViewRef;
80
+ } | {
81
+ kind: 'animatedRefSlot';
82
+ slotId: number;
83
+ } | {
84
+ kind: 'jsCallback';
85
+ id: number;
86
+ } | {
87
+ kind: 'hostFunction';
88
+ id: number;
89
+ } | {
90
+ kind: 'remoteFunction';
91
+ id: number;
92
+ name?: string;
93
+ origin?: 'worklets';
94
+ } | {
95
+ kind: 'undef';
96
+ } | {
97
+ kind: 'error';
98
+ name: string;
99
+ message: string;
100
+ stack?: string;
101
+ } | {
102
+ kind: 'array';
103
+ items: ValueSpec[];
104
+ } | {
105
+ kind: 'set';
106
+ items: ValueSpec[];
107
+ } | {
108
+ kind: 'map';
109
+ entries: Array<[ValueSpec, ValueSpec]>;
110
+ } | {
111
+ kind: 'object';
112
+ entries: Array<[string, ValueSpec]>;
113
+ animationProfile?: ReanimatedAnimationProfile;
114
+ } | {
115
+ kind: 'shareableRef';
116
+ id: number;
117
+ snapshot: Array<[string, ValueSpec]>;
118
+ };
119
+ export type ClosureSpec = Record<string, ValueSpec>;
120
+ export type NativeSerializableValueSpec = Extract<ValueSpec, {
121
+ kind: 'error';
122
+ }> | {
123
+ kind: 'plain';
124
+ value: boolean;
125
+ } | {
126
+ kind: 'buffer';
127
+ buffer: ArrayBuffer;
128
+ view?: {
129
+ typeName: string;
130
+ byteOffset: number;
131
+ length: number;
132
+ };
133
+ } | {
134
+ kind: 'regexp';
135
+ pattern: string;
136
+ flags: string;
137
+ };
138
+ export type WorkletFunctionSpec = Extract<ValueSpec, {
139
+ kind: 'fn';
140
+ }>;
141
+ export interface WorkletHostValueUpdate {
142
+ codec: string;
143
+ data: unknown;
144
+ }
145
+ export type AnimatedPropsWriteSlots = Record<string, {
146
+ timestamp: number;
147
+ version: number;
148
+ }>;
149
+ export type WorkletMessagePayload = ({
150
+ type: 'runWorklet';
151
+ reanimated2?: true;
152
+ reanimated2Surface?: {
153
+ surfaceId: string;
154
+ generation: number;
155
+ };
156
+ runId: number;
157
+ code: string;
158
+ hash: number;
159
+ closureId: number;
160
+ closureSpec: ClosureSpec;
161
+ closureIsArray?: boolean;
162
+ argsSpec: ValueSpec[];
163
+ awaitReply: boolean;
164
+ eventTimestamp?: number;
165
+ } & ({
166
+ sync: true;
167
+ callerThread: WorkletThreadIdentity;
168
+ syncReply?: SyncReplyBuffer;
169
+ } | {
170
+ sync?: never;
171
+ callerThread?: WorkletThreadIdentity;
172
+ syncReply?: never;
173
+ })) | {
174
+ type: 'workletReply';
175
+ runId: number;
176
+ ok: boolean;
177
+ returnValueSpec?: ValueSpec;
178
+ error?: string;
179
+ hostValueUpdates?: WorkletHostValueUpdate[];
180
+ } | {
181
+ type: 'hostValueUpdates';
182
+ updates: WorkletHostValueUpdate[];
183
+ } | {
184
+ type: 'workletBundleModules';
185
+ key: string;
186
+ modules: WorkletBundleModule[];
187
+ } | {
188
+ type: 'workletDone';
189
+ runId: number;
190
+ ok: boolean;
191
+ error?: string;
192
+ } | {
193
+ type: 'svUpdate';
194
+ svId: number;
195
+ value: number;
196
+ } | {
197
+ type: 'svUpdateBatch';
198
+ updates: Array<{
199
+ svId: number;
200
+ value: number;
201
+ }>;
202
+ objectUpdates?: Array<{
203
+ svId: number;
204
+ value: ValueSpec;
205
+ }>;
206
+ } | {
207
+ type: 'svAlloc';
208
+ svId: number;
209
+ initial: number;
210
+ bool?: boolean;
211
+ } | {
212
+ type: 'svObjectAlloc';
213
+ svId: number;
214
+ initial: ValueSpec;
215
+ } | {
216
+ type: 'svFree';
217
+ svId: number;
218
+ } | {
219
+ type: 'svPlayback';
220
+ svId: number;
221
+ playback: SharedValuePlayback;
222
+ } | {
223
+ type: 'runJSCallback';
224
+ callbackId: number;
225
+ argsSpec: ValueSpec[];
226
+ } | {
227
+ type: 'cacheRelease';
228
+ closures?: Array<{
229
+ hash: number;
230
+ closureId: number;
231
+ }>;
232
+ shareables?: number[];
233
+ jsCallbacks?: number[];
234
+ synchronizables?: number[];
235
+ } | {
236
+ type: 'frameCallbackRegister';
237
+ callbackId: number;
238
+ callback: WorkletFunctionSpec;
239
+ active: boolean;
240
+ } | {
241
+ type: 'frameCallbackSetActive';
242
+ callbackId: number;
243
+ active: boolean;
244
+ } | {
245
+ type: 'frameCallbackUnregister';
246
+ callbackId: number;
247
+ } | {
248
+ type: 'eventHandlerRegister';
249
+ handlerId: number;
250
+ callback: WorkletFunctionSpec;
251
+ eventName: string;
252
+ viewTag: number;
253
+ ownerKey?: string;
254
+ } | {
255
+ type: 'eventHandlerUnregister';
256
+ handlerId: number;
257
+ ownerKey?: string;
258
+ } | {
259
+ type: 'eventHandlerDispatch';
260
+ handlerId: number;
261
+ ownerKey?: string;
262
+ event: Record<string, unknown>;
263
+ } | {
264
+ type: 'keyboardHandlerRegister';
265
+ handlerId: number;
266
+ callback: WorkletFunctionSpec;
267
+ } | {
268
+ type: 'keyboardHandlerUnregister';
269
+ handlerId: number;
270
+ } | {
271
+ type: 'sensorHandlerRegister';
272
+ handlerId: number;
273
+ sensorType: number;
274
+ interval: number;
275
+ callback: WorkletFunctionSpec;
276
+ } | {
277
+ type: 'sensorHandlerUnregister';
278
+ handlerId: number;
279
+ } | {
280
+ type: 'layoutAnimationConfigureBatch';
281
+ items: Array<{
282
+ surfaceId: string;
283
+ generation: number;
284
+ viewTag: number;
285
+ animationType: number;
286
+ config: ValueSpec | null;
287
+ sharedTransitionTag?: string;
288
+ }>;
289
+ } | {
290
+ type: 'layoutAnimationShouldExit';
291
+ surfaceId: string;
292
+ generation: number;
293
+ viewTag: number;
294
+ shouldAnimate: boolean;
295
+ } | {
296
+ type: 'layoutAnimationMarkRemovable';
297
+ surfaceId: string;
298
+ generation: number;
299
+ viewTag: number;
300
+ } | {
301
+ type: 'layoutAnimationUnmarkRemovable';
302
+ surfaceId: string;
303
+ generation: number;
304
+ viewTag: number;
305
+ } | {
306
+ type: 'cssViewStyleSet';
307
+ target: WorkletViewRef;
308
+ style: ValueSpec | null;
309
+ } | {
310
+ type: 'cssKeyframesRegister';
311
+ animationName: string;
312
+ compoundComponentName: string;
313
+ config: ValueSpec;
314
+ } | {
315
+ type: 'cssKeyframesUnregister';
316
+ animationName: string;
317
+ compoundComponentName: string;
318
+ } | {
319
+ type: 'cssAnimationsApply';
320
+ target: WorkletViewRef;
321
+ compoundComponentName: string;
322
+ updates: ValueSpec;
323
+ } | {
324
+ type: 'cssAnimationsUnregister';
325
+ target: WorkletViewRef;
326
+ } | {
327
+ type: 'cssViewRemove';
328
+ target: WorkletViewRef;
329
+ removalId: number;
330
+ } | {
331
+ type: 'cssViewRemoveAck';
332
+ target: WorkletViewRef;
333
+ removalId: number;
334
+ } | {
335
+ type: 'cssTransitionRun';
336
+ target: WorkletViewRef;
337
+ config: ValueSpec;
338
+ eventMask?: number;
339
+ } | {
340
+ type: 'cssTransitionRegister' | 'cssTransitionUpdate';
341
+ target: WorkletViewRef;
342
+ config: ValueSpec;
343
+ } | {
344
+ type: 'cssTransitionUnregister';
345
+ target: WorkletViewRef;
346
+ } | {
347
+ type: 'cssEvents';
348
+ events: NativeCSSEvent[];
349
+ } | {
350
+ type: 'applyAnimatedProps';
351
+ ops: Array<{
352
+ target: WorkletViewRef;
353
+ updates: Record<string, unknown>;
354
+ timestamp: number;
355
+ writeVersion: number;
356
+ lease?: AnimatedDrivenStyleLease;
357
+ }>;
358
+ } | {
359
+ type: 'retireAnimatedDrivenStyle';
360
+ target: WorkletViewRef;
361
+ retirement: AnimatedDrivenStyleRetirement;
362
+ } | {
363
+ type: 'animatedSlotBinding';
364
+ target: WorkletViewRef;
365
+ slotVersion: number;
366
+ writeSlots: AnimatedPropsWriteSlots;
367
+ template: Record<string, unknown>;
368
+ snapshotTemplate: Record<string, unknown>;
369
+ restoreSource?: boolean;
370
+ } | {
371
+ type: 'animatedSlotUnbind';
372
+ target: WorkletViewRef;
373
+ finalUpdates: Record<string, unknown>;
374
+ retirementId?: number;
375
+ } | {
376
+ type: 'animatedSlotUnbound';
377
+ retirementId: number;
378
+ target: WorkletViewRef;
379
+ retirement?: AnimatedDrivenStyleRetirement;
380
+ } | {
381
+ type: 'animatedSlotFence';
382
+ retirementId: number;
383
+ } | {
384
+ type: 'animatedSlotFenced';
385
+ retirementId: number;
386
+ } | {
387
+ type: 'nativeAnimatedDriveEnd';
388
+ sourceSurfaceId: string;
389
+ sourceGeneration: number;
390
+ driveId: number;
391
+ lifecycleId: number;
392
+ finished: boolean;
393
+ finalValue: number;
394
+ } | {
395
+ type: 'nativeAnimGraphDriveEnd';
396
+ sourceSurfaceId: string;
397
+ sourceGeneration: number;
398
+ driveId: number;
399
+ lifecycleId: number;
400
+ finished: boolean;
401
+ values: Array<{
402
+ valueId: number;
403
+ value: number;
404
+ }>;
405
+ } | {
406
+ type: 'nativeAnimGraphDriveSlots';
407
+ sourceSurfaceId: string;
408
+ sourceGeneration: number;
409
+ driveId: number;
410
+ lifecycleId: number;
411
+ values: Array<{
412
+ valueId: number;
413
+ slot: number;
414
+ }>;
415
+ } | {
416
+ type: 'nativeAnimGraphDriveUpdate';
417
+ sourceSurfaceId: string;
418
+ sourceGeneration: number;
419
+ driveId: number;
420
+ lifecycleId: number;
421
+ values: Array<{
422
+ valueId: number;
423
+ value: number;
424
+ }>;
425
+ } | {
426
+ type: 'peerDispose';
427
+ } | {
428
+ type: 'peerHello';
429
+ };
430
+ export type WithPeerEpoch<T> = T extends unknown ? T & {
431
+ peerEpoch: WorkletPeerEpoch;
432
+ nativeRenderer?: NativeRenderer;
433
+ tenantBundleMode?: DemoBundleMode;
434
+ workletsStaticFlags?: WorkletsStaticFlags | null;
435
+ } : never;
436
+ export type WorkletMessage = WithPeerEpoch<WorkletMessagePayload>;
437
+ export interface WorkletChannel {
438
+ send(msg: WorkletMessage): void;
439
+ bindReceive(handler: (msg: WorkletMessage) => void): void;
440
+ hasPeer(): boolean;
441
+ }
442
+ export interface WorkletBundleModule {
443
+ id: number;
444
+ source: string;
445
+ dependencyMap: number[];
446
+ name: string;
447
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2075",
3
+ "version": "0.1.2076",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",