peachsim 0.1.2400 → 0.1.2402
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/README.md +2 -2
- package/cli/bin.ts +1 -1
- package/cli/bridge-flow-runner.ts +1 -1
- package/cli/catalog/content.ts +520 -0
- package/cli/catalog/index.ts +4 -0
- package/cli/catalog/meta.ts +3881 -0
- package/cli/catalog/renderers.ts +659 -0
- package/cli/catalog/routes.ts +237 -0
- package/cli/catalog/types.ts +96 -0
- package/cli/cloud-client.ts +4 -1
- package/cli/commands/box.ts +6 -0
- package/cli/commands/inspect.ts +3 -3
- package/cli/commands/map.ts +1 -0
- package/cli/commands/platform.ts +2 -0
- package/cli/commands/record.ts +1 -1
- package/cli/commands/stream.ts +2 -0
- package/cli/dev-build-freshness.ts +1 -0
- package/cli/help-core.ts +6 -6
- package/cli/hidden-runtime-alias.ts +1 -1
- package/cli/outbound-endpoints.ts +3 -3
- package/cli/parse-args.ts +1 -1
- package/cli/run-registry.ts +25 -27
- 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 +50 -44
- 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 +31 -31
- 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 +75 -44
- package/dist-lib/host/fetch-proxy-handler.cjs +43 -40
- 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 +47 -44
- 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 +15 -9
- 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 +52 -49
- package/dist-lib/native-app-identity-project.cjs +22 -19
- package/dist-lib/native-app-identity-project.mjs +4 -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 +65 -62
- 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 +156 -120
- package/dist-lib/swift-compile.cjs +28 -30
- package/dist-lib/swift-compile.mjs +24 -26
- 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 +29 -31
- package/dist-lib/vite.cjs +38 -35
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +13 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +6 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/kotlin/toolchain.json +2 -2
- package/package.json +1 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSValueTransformer.h +2 -2
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKState.h +78 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKStateMachine.h +69 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.apinotes +269 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.h +15 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKitBase.h +38 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +8 -4
- package/src/android-gradle-sources.ts +14 -8
- package/src/androidGradleContract.ts +2 -0
- package/src/nitro-adapter.lock.json +232 -232
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-distribution.lock.json +8 -8
- package/src/turbo-runtime.lock.json +19 -19
- package/src/wasm-optimize.ts +23 -24
- package/src/worklets-babel.ts +2 -6
- package/cli/registry.ts +0 -2
|
@@ -82,6 +82,7 @@ export type CanvasMapScreenshotContent = {
|
|
|
82
82
|
export type CanvasMapAppContent = {
|
|
83
83
|
kind: 'app';
|
|
84
84
|
appId: string;
|
|
85
|
+
instanceId?: string;
|
|
85
86
|
bundleUrl?: string;
|
|
86
87
|
launchMetadata?: string;
|
|
87
88
|
url?: string;
|
|
@@ -101,6 +102,8 @@ export type CanvasMapScreen = {
|
|
|
101
102
|
width: number;
|
|
102
103
|
height: number;
|
|
103
104
|
status: CanvasMapScreenStatus;
|
|
105
|
+
playable?: boolean;
|
|
106
|
+
capture?: Blob;
|
|
104
107
|
note?: string;
|
|
105
108
|
bg?: string;
|
|
106
109
|
deviceModel?: string;
|
|
@@ -196,6 +199,7 @@ export type CanvasMapTransform = {
|
|
|
196
199
|
};
|
|
197
200
|
export type CanvasMapInspectTarget = {
|
|
198
201
|
screenId: string;
|
|
202
|
+
instanceId: string;
|
|
199
203
|
query: import('../../render-worker/canvas-item-inspection.d.ts').CanvasItemInspectQuery;
|
|
200
204
|
};
|
|
201
205
|
export type CanvasMapInspection = import('../../render-worker/canvas-item-inspection.d.ts').CanvasItemInspection & {
|
|
@@ -254,6 +258,15 @@ export declare function reportCanvasMapDataApplied(rev: CanvasMapData['rev']): v
|
|
|
254
258
|
export declare function reportCanvasMapInspectTarget(requestId: number, target: CanvasMapInspectTarget | null): void;
|
|
255
259
|
export declare function reportCanvasMapTransform(transform: CanvasMapTransform, limits?: CanvasMapPanLimits): void;
|
|
256
260
|
export declare function reportCanvasMapTap(tap: CanvasMapTap): void;
|
|
261
|
+
export type CanvasMapPlaybackEvent = {
|
|
262
|
+
action: 'canvas-map-play';
|
|
263
|
+
screenId: string;
|
|
264
|
+
} | {
|
|
265
|
+
action: 'canvas-map-app-route';
|
|
266
|
+
runId: string;
|
|
267
|
+
path: string;
|
|
268
|
+
};
|
|
269
|
+
export declare function reportCanvasMapPlayback(event: CanvasMapPlaybackEvent): void;
|
|
257
270
|
export declare function reportCanvasMapSelection(screenId: string | null): void;
|
|
258
271
|
export type CanvasMapMove = {
|
|
259
272
|
positions: {
|
|
@@ -526,7 +526,7 @@ export type NativeUIRequest = NativeUIRequestBody & {
|
|
|
526
526
|
remoteSurfaceId?: AuxAppSurfaceId;
|
|
527
527
|
};
|
|
528
528
|
export type HostNativeUIRequest = Extract<NativeUIRequest, {
|
|
529
|
-
kind: `webview.${string}` |
|
|
529
|
+
kind: `webview.${string}` | `systemBars.${string}`;
|
|
530
530
|
}>;
|
|
531
531
|
export declare function isHostNativeUIRequest(request: NativeUIRequest): request is HostNativeUIRequest;
|
|
532
532
|
export type NativeWidgetServiceRequest = Extract<NativeUIRequest, {
|
|
@@ -809,6 +809,11 @@ type NativeUIRequestBody = import('../capture/nativeScreenCaptureContract.d.ts')
|
|
|
809
809
|
kind: 'systemBars.update';
|
|
810
810
|
appId: string | null;
|
|
811
811
|
patch: AndroidSystemBarsPatch;
|
|
812
|
+
} | {
|
|
813
|
+
kind: 'systemBars.dialog';
|
|
814
|
+
appId: string | null;
|
|
815
|
+
order: number;
|
|
816
|
+
attached: boolean;
|
|
812
817
|
} | {
|
|
813
818
|
kind: 'burnt.toast';
|
|
814
819
|
spec: BurntToastSpec;
|
|
@@ -49,6 +49,7 @@ export interface NativeAppItemMount extends NativeWidgetIdentity {
|
|
|
49
49
|
bundleUrl?: string;
|
|
50
50
|
launchMetadata?: string;
|
|
51
51
|
url?: string;
|
|
52
|
+
observeRoute?: boolean;
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
export declare function isNativeAppItemMount(mount: NativeWidgetMount): mount is NativeAppItemMount;
|
|
@@ -127,6 +128,11 @@ export type NativeWidgetHomeReply = NativeWidgetHomeResult | {
|
|
|
127
128
|
type: 'nativeWidgetHomeLaunch';
|
|
128
129
|
requestId: number;
|
|
129
130
|
identity: NativeWidgetIdentity;
|
|
131
|
+
} | {
|
|
132
|
+
type: 'nativeWidgetHomeRoute';
|
|
133
|
+
requestId: number;
|
|
134
|
+
identity: NativeWidgetIdentity;
|
|
135
|
+
path: string;
|
|
130
136
|
} | {
|
|
131
137
|
type: 'nativeWidgetHomeStatusBar';
|
|
132
138
|
requestId: number;
|
|
@@ -604,6 +604,9 @@ export type HostEngineStats = EngineStats & {
|
|
|
604
604
|
hostVsyncScheduled?: boolean;
|
|
605
605
|
};
|
|
606
606
|
export type WorkerToHost = {
|
|
607
|
+
type: 'nativeAppItemRoute';
|
|
608
|
+
path: string;
|
|
609
|
+
} | {
|
|
607
610
|
type: 'canvasItemInspected';
|
|
608
611
|
requestId: number;
|
|
609
612
|
inspection: import('./canvas-item-inspection.d.ts').CanvasItemInspection | null;
|
|
@@ -633,6 +636,9 @@ export type WorkerToHost = {
|
|
|
633
636
|
presentation: import('../engine/image-loader.d.ts').ImageLoaderStats['liveFramePresentation'];
|
|
634
637
|
perf: import('../engine/image-loader.d.ts').ImageLoaderStats['liveFramePerf'];
|
|
635
638
|
renderDensity: number;
|
|
639
|
+
} | {
|
|
640
|
+
type: 'canvasMapPlayback';
|
|
641
|
+
event: import('../ios/apps/canvas-map-data.d.ts').CanvasMapPlaybackEvent;
|
|
636
642
|
} | {
|
|
637
643
|
type: 'canvasMapSelect';
|
|
638
644
|
screenId: string | null;
|
package/kotlin/sdk.tar.gz
CHANGED
|
Binary file
|
package/kotlin/toolchain.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/JetBrains/kotlin/releases/download/v2.4.20/kotlin-compiler-2.4.20.zip",
|
|
5
5
|
"sha256": "59e9ca74c7904ef2c122b12114937673ccce68de820a663f0ed66ccf8799e0b7",
|
|
6
6
|
"jar": {
|
|
7
|
-
"url": "https://r2.rnxsim.com/peach-kotlin-fork/
|
|
8
|
-
"sha256": "
|
|
7
|
+
"url": "https://r2.rnxsim.com/peach-kotlin-fork/2328ddf16943f8a656f87bc3339983583887df352083b98445fa72327f9bad7d/kotlin-compiler.jar",
|
|
8
|
+
"sha256": "2328ddf16943f8a656f87bc3339983583887df352083b98445fa72327f9bad7d"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"libraries": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peachsim",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2402",
|
|
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",
|
|
@@ -370,7 +370,6 @@
|
|
|
370
370
|
"sucrase": "3.35.1",
|
|
371
371
|
"svgpath": "2.6.0",
|
|
372
372
|
"terser": "^5.49.0",
|
|
373
|
-
"wasm-opt": "2.0.1",
|
|
374
373
|
"valibot": "^1.3.1",
|
|
375
374
|
"ws": "^8.18.0",
|
|
376
375
|
"zod": "4.6.7"
|
|
@@ -388,7 +387,6 @@
|
|
|
388
387
|
"@peach/box": "workspace:*",
|
|
389
388
|
"@peach/compat": "workspace:*",
|
|
390
389
|
"@peach/globals": "workspace:*",
|
|
391
|
-
"@peach/skills": "workspace:*",
|
|
392
390
|
"@types/plist": "3.0.5",
|
|
393
391
|
"@types/ws": "^8.5.13",
|
|
394
392
|
"json5": "^2.2.3",
|
|
@@ -31,7 +31,7 @@ FOUNDATION_EXPORT NSValueTransformerName const NSSecureUnarchiveFromDataTransfor
|
|
|
31
31
|
|
|
32
32
|
/// An abstract class used to transform values from one representation to another.
|
|
33
33
|
API_AVAILABLE(macos(10.3), ios(3.0), watchos(2.0), tvos(9.0))
|
|
34
|
-
@interface NSValueTransformer : NSObject {
|
|
34
|
+
PEACH_SWIFT_CLASS(PeachFoundation) @interface NSValueTransformer : NSObject {
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/// Registers the provided value transformer with a given identifier.
|
|
@@ -67,7 +67,7 @@ API_AVAILABLE(macos(10.3), ios(3.0), watchos(2.0), tvos(9.0))
|
|
|
67
67
|
///
|
|
68
68
|
/// For an example of subclassing ``NSSecureUnarchiveFromDataTransformer``, see <doc://com.apple.documentation/documentation/coredata/handling-different-data-types-in-core-data>, which has a `ColorToDataTransformer` class that transforms <doc://com.apple.documentation/documentation/uikit/uicolor> to ``NSData`` and the reverse, to support archiving instances of <doc://com.apple.documentation/documentation/uikit/uicolor>.
|
|
69
69
|
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
70
|
-
@interface NSSecureUnarchiveFromDataTransformer : NSValueTransformer
|
|
70
|
+
PEACH_SWIFT_CLASS(PeachFoundation) @interface NSSecureUnarchiveFromDataTransformer : NSValueTransformer
|
|
71
71
|
|
|
72
72
|
/// The list of allowable classes which the top-level object in the archive must conform to on encoding and decoding.
|
|
73
73
|
///
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GKState.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <GameplayKit/GameplayKit.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@class GKStateMachine;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single state in a state machine.
|
|
16
|
+
* By default, states allow transitions freely to and from the states in the machine.
|
|
17
|
+
*
|
|
18
|
+
* If a more restricted set of valid transitions are needed in the state machine, you may override isValidNextState: where applicable.
|
|
19
|
+
*
|
|
20
|
+
* @see GKStateMachine
|
|
21
|
+
* @see isValidNextState:
|
|
22
|
+
*/
|
|
23
|
+
GK_BASE_AVAILABILITY @interface GKState : NSObject
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The state machine that this state is associated with.
|
|
27
|
+
* This is nil if this state hasn't been added to a state machine yet.
|
|
28
|
+
*/
|
|
29
|
+
@property (nullable, nonatomic, readonly, weak) GKStateMachine *stateMachine;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new state to be used in a state machine.
|
|
33
|
+
*
|
|
34
|
+
* @see GKStateMachine
|
|
35
|
+
*/
|
|
36
|
+
+ (instancetype)state;
|
|
37
|
+
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns YES if the given class is a valid next state to enter.
|
|
41
|
+
*
|
|
42
|
+
* By default GKState will return YES for any class that is subclass of GKState.
|
|
43
|
+
* Override this in a subclass to enforce limited edge traversals in the state machine.
|
|
44
|
+
*
|
|
45
|
+
* @see GKStateMachine.canEnterState:
|
|
46
|
+
* @see GKStateMachine.enterState:
|
|
47
|
+
*
|
|
48
|
+
* @param stateClass the class to be checked
|
|
49
|
+
* @return YES if the class is kind of GKState and the state transition is valid, else NO.
|
|
50
|
+
*/
|
|
51
|
+
- (BOOL)isValidNextState:(Class)stateClass;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Called by GKStateMachine when this state is entered.
|
|
55
|
+
*
|
|
56
|
+
* @param previousState the state that was exited to enter this state. This is nil if this is the state machine's first entered state.
|
|
57
|
+
* @see stateMachineWithStates:initialStateClass:
|
|
58
|
+
*/
|
|
59
|
+
- (void)didEnterWithPreviousState:(nullable GKState *)previousState;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Called by GKStateMachine when it is updated
|
|
63
|
+
*
|
|
64
|
+
* @param seconds the time in seconds since the last update
|
|
65
|
+
*/
|
|
66
|
+
- (void)updateWithDeltaTime:(NSTimeInterval)seconds;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Called by GKStateMachine when this state is exited
|
|
70
|
+
*
|
|
71
|
+
* @param nextState the state that is being entered next
|
|
72
|
+
*/
|
|
73
|
+
- (void)willExitWithNextState:(GKState *)nextState;
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@end
|
|
77
|
+
|
|
78
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GKStateMachine.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <GameplayKit/GameplayKit.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@class GKState;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Models a finite state machine that has a single current state.
|
|
16
|
+
*/
|
|
17
|
+
GK_BASE_AVAILABILITY @interface GKStateMachine : NSObject
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The current state that the state machine is in.
|
|
21
|
+
* Prior to the first called to enterState this is equal to nil.
|
|
22
|
+
*/
|
|
23
|
+
@property (nullable, nonatomic, readonly) GKState* currentState;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Creates a state machine with an array of possible states and an initial state.
|
|
27
|
+
*
|
|
28
|
+
* @param states a list of possible states for this state machine.
|
|
29
|
+
*/
|
|
30
|
+
+ (instancetype)stateMachineWithStates:(NSArray<GKState *> *)states;
|
|
31
|
+
- (instancetype)initWithStates:(NSArray<GKState *> *)states NS_DESIGNATED_INITIALIZER;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Updates the current state machine.
|
|
35
|
+
*
|
|
36
|
+
* @param sec the time, in seconds, since the last frame
|
|
37
|
+
*/
|
|
38
|
+
- (void)updateWithDeltaTime:(NSTimeInterval)sec;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets the instance of the indicated state class from this state machine.
|
|
42
|
+
* Returns nil if the state does not exist
|
|
43
|
+
*
|
|
44
|
+
* @param stateClass the class of the state to be retrieved
|
|
45
|
+
*/
|
|
46
|
+
- (nullable GKState*)stateForClass:(Class)stateClass NS_SWIFT_UNAVAILABLE("Exposed in Swift as stateForClass<StateType: GKState>(stateClass: StateType.Type) -> StateType?");
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Returns YES if the indicated class is a a valid next state or if currentState is nil
|
|
50
|
+
*
|
|
51
|
+
* @param stateClass the class of the state to be tested
|
|
52
|
+
*/
|
|
53
|
+
- (BOOL)canEnterState:(Class)stateClass;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Calls canEnterState to check if we can enter the given state and then enters that state if so.
|
|
57
|
+
* [GKState willExitWithNextState:] is called on the old current state.
|
|
58
|
+
* [GKState didEnterWithPreviousState:] is called on the new state.
|
|
59
|
+
*
|
|
60
|
+
* @param stateClass the class of the state to switch to
|
|
61
|
+
* @return YES if state was entered. NO otherwise.
|
|
62
|
+
*/
|
|
63
|
+
- (BOOL)enterState:(Class)stateClass;
|
|
64
|
+
|
|
65
|
+
@end
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
NS_ASSUME_NONNULL_END
|
|
69
|
+
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
---
|
|
2
|
+
Name: GameplayKit
|
|
3
|
+
Classes:
|
|
4
|
+
- Name: GKComponent
|
|
5
|
+
Methods:
|
|
6
|
+
- Selector: 'updateWithDeltaTime:'
|
|
7
|
+
SwiftName: update(deltaTime:)
|
|
8
|
+
MethodKind: Instance
|
|
9
|
+
- Name: GKComponentSystem
|
|
10
|
+
Methods:
|
|
11
|
+
- Selector: 'addComponentWithEntity:'
|
|
12
|
+
SwiftName: addComponent(foundIn:)
|
|
13
|
+
MethodKind: Instance
|
|
14
|
+
- Selector: 'removeComponentWithEntity:'
|
|
15
|
+
SwiftName: removeComponent(foundIn:)
|
|
16
|
+
MethodKind: Instance
|
|
17
|
+
- Selector: 'updateWithDeltaTime:'
|
|
18
|
+
SwiftName: update(deltaTime:)
|
|
19
|
+
MethodKind: Instance
|
|
20
|
+
- Name: GKCompositeBehavior
|
|
21
|
+
Methods:
|
|
22
|
+
- Selector: 'behaviorWithBehaviors:andWeights:'
|
|
23
|
+
SwiftName: init(behaviors:weights:)
|
|
24
|
+
MethodKind: Instance
|
|
25
|
+
- Name: GKDecisionNode
|
|
26
|
+
Methods:
|
|
27
|
+
- Selector: 'createBranchWithValue:attribute:'
|
|
28
|
+
SwiftName: createBranch(value:attribute:)
|
|
29
|
+
MethodKind: Instance
|
|
30
|
+
- Selector: 'createBranchWithPredicate:attribute:'
|
|
31
|
+
SwiftName: createBranch(predicate:attribute:)
|
|
32
|
+
MethodKind: Instance
|
|
33
|
+
- Selector: 'createBranchWithWeight:attribute:'
|
|
34
|
+
SwiftName: createBranch(weight:attribute:)
|
|
35
|
+
MethodKind: Instance
|
|
36
|
+
- Name: GKEntity
|
|
37
|
+
Methods:
|
|
38
|
+
- Selector: 'updateWithDeltaTime:'
|
|
39
|
+
SwiftName: update(deltaTime:)
|
|
40
|
+
MethodKind: Instance
|
|
41
|
+
- Name: GKGameModel
|
|
42
|
+
Methods:
|
|
43
|
+
- Selector: 'unapplyGameModelUpdate:'
|
|
44
|
+
SwiftName: unapply(_:)
|
|
45
|
+
MethodKind: Instance
|
|
46
|
+
- Name: GKGoal
|
|
47
|
+
Methods:
|
|
48
|
+
- Selector: 'goalToSeekAgent:'
|
|
49
|
+
SwiftName: init(toSeek:)
|
|
50
|
+
MethodKind: Instance
|
|
51
|
+
- Selector: 'goalToFleeAgent:'
|
|
52
|
+
SwiftName: init(toFlee:)
|
|
53
|
+
MethodKind: Instance
|
|
54
|
+
- Selector: 'goalToInterceptAgent:maxPredictionTime:'
|
|
55
|
+
SwiftName: init(toIntercept:maxPredictionTime:)
|
|
56
|
+
MethodKind: Instance
|
|
57
|
+
- Name: GKGraph
|
|
58
|
+
Methods:
|
|
59
|
+
- Selector: 'initWithNodes:'
|
|
60
|
+
SwiftName: init(_:)
|
|
61
|
+
MethodKind: Instance
|
|
62
|
+
- Selector: 'connectNodeToLowestCostNode:bidirectional:'
|
|
63
|
+
SwiftName: connectToLowestCostNode(node:bidirectional:)
|
|
64
|
+
MethodKind: Instance
|
|
65
|
+
- Selector: 'removeNodes:'
|
|
66
|
+
SwiftName: remove(_:)
|
|
67
|
+
MethodKind: Instance
|
|
68
|
+
- Selector: 'addNodes:'
|
|
69
|
+
SwiftName: add(_:)
|
|
70
|
+
MethodKind: Instance
|
|
71
|
+
- Name: GKGridGraph
|
|
72
|
+
Methods:
|
|
73
|
+
- Selector: 'nodeAtGridPosition:'
|
|
74
|
+
SwiftName: node(atGridPosition:)
|
|
75
|
+
MethodKind: Instance
|
|
76
|
+
- Selector: 'connectNodeToAdjacentNodes:'
|
|
77
|
+
SwiftName: connectToAdjacentNodes(node:)
|
|
78
|
+
MethodKind: Instance
|
|
79
|
+
- Selector: 'initWithNodes:'
|
|
80
|
+
SwiftName: init(_:)
|
|
81
|
+
MethodKind: Instance
|
|
82
|
+
- Name: GKMeshGraph
|
|
83
|
+
Methods:
|
|
84
|
+
- Selector: 'connectNodeUsingObstacles:'
|
|
85
|
+
SwiftName: connectUsingObstacles(node:)
|
|
86
|
+
MethodKind: Instance
|
|
87
|
+
- Selector: 'initWithNodes:'
|
|
88
|
+
SwiftName: init(_:)
|
|
89
|
+
MethodKind: Instance
|
|
90
|
+
- Name: GKNoise
|
|
91
|
+
Methods:
|
|
92
|
+
- Selector: 'initWithNoiseSource:'
|
|
93
|
+
SwiftName: init(_:)
|
|
94
|
+
MethodKind: Instance
|
|
95
|
+
- Selector: 'initWithNoiseSource:gradientColors:'
|
|
96
|
+
SwiftName: init(_:gradientColors:)
|
|
97
|
+
MethodKind: Instance
|
|
98
|
+
- Selector: 'clampWithLowerBound:upperBound:'
|
|
99
|
+
SwiftName: clamp(lowerBound:upperBound:)
|
|
100
|
+
MethodKind: Instance
|
|
101
|
+
- Selector: 'raiseToPower:'
|
|
102
|
+
SwiftName: raiseToPower(_:)
|
|
103
|
+
MethodKind: Instance
|
|
104
|
+
- Selector: 'applyTurbulenceWithFrequency:power:roughness:seed:'
|
|
105
|
+
SwiftName: applyTurbulence(frequency:power:roughness:seed:)
|
|
106
|
+
MethodKind: Instance
|
|
107
|
+
- Selector: 'remapValuesToCurveWithControlPoints:'
|
|
108
|
+
SwiftName: remapValues(toCurveWithControlPoints:)
|
|
109
|
+
MethodKind: Instance
|
|
110
|
+
- Selector: 'remapValuesToTerracesWithPeaks:terracesInverted:'
|
|
111
|
+
SwiftName: remapValues(toTerracesWithPeaks:terracesInverted:)
|
|
112
|
+
MethodKind: Instance
|
|
113
|
+
- Selector: 'addWithNoise:'
|
|
114
|
+
SwiftName: add(_:)
|
|
115
|
+
MethodKind: Instance
|
|
116
|
+
- Selector: 'multiplyWithNoise:'
|
|
117
|
+
SwiftName: multiply(_:)
|
|
118
|
+
MethodKind: Instance
|
|
119
|
+
- Selector: 'minimumWithNoise:'
|
|
120
|
+
SwiftName: minimum(_:)
|
|
121
|
+
MethodKind: Instance
|
|
122
|
+
- Selector: 'maximumWithNoise:'
|
|
123
|
+
SwiftName: maximum(_:)
|
|
124
|
+
MethodKind: Instance
|
|
125
|
+
- Selector: 'raiseToPowerWithNoise:'
|
|
126
|
+
SwiftName: raiseToPower(_:)
|
|
127
|
+
MethodKind: Instance
|
|
128
|
+
- Selector: 'displaceXWithNoise:yWithNoise:zWithNoise:'
|
|
129
|
+
SwiftName: displaceWithNoises(x:y:z:)
|
|
130
|
+
MethodKind: Instance
|
|
131
|
+
- Name: GKNoiseMap
|
|
132
|
+
Methods:
|
|
133
|
+
- Selector: 'initWithNoise:'
|
|
134
|
+
SwiftName: init(_:)
|
|
135
|
+
MethodKind: Instance
|
|
136
|
+
- Selector: 'initWithNoise:size:origin:sampleCount:seamless:'
|
|
137
|
+
SwiftName: init(_:size:origin:sampleCount:seamless:)
|
|
138
|
+
MethodKind: Instance
|
|
139
|
+
- Selector: 'valueAtPosition:'
|
|
140
|
+
SwiftName: value(at:)
|
|
141
|
+
MethodKind: Instance
|
|
142
|
+
- Selector: 'interpolatedValueAtPosition:'
|
|
143
|
+
SwiftName: interpolatedValue(at:)
|
|
144
|
+
MethodKind: Instance
|
|
145
|
+
- Selector: 'setValue:atPosition:'
|
|
146
|
+
SwiftName: setValue(_:at:)
|
|
147
|
+
MethodKind: Instance
|
|
148
|
+
- Name: GKObstacleGraph
|
|
149
|
+
Methods:
|
|
150
|
+
- Selector: 'connectNodeUsingObstacles:'
|
|
151
|
+
SwiftName: connectUsingObstacles(node:)
|
|
152
|
+
MethodKind: Instance
|
|
153
|
+
- Selector: 'connectNodeUsingObstacles:ignoringObstacles:'
|
|
154
|
+
SwiftName: connectUsingObstacles(node:ignoring:)
|
|
155
|
+
MethodKind: Instance
|
|
156
|
+
- Selector: 'connectNodeUsingObstacles:ignoringBufferRadiusOfObstacles:'
|
|
157
|
+
SwiftName: connectUsingObstacles(node:ignoringBufferRadiusOf:)
|
|
158
|
+
MethodKind: Instance
|
|
159
|
+
- Selector: 'initWithNodes:'
|
|
160
|
+
SwiftName: init(_:)
|
|
161
|
+
MethodKind: Instance
|
|
162
|
+
- Name: GKOctree
|
|
163
|
+
Methods:
|
|
164
|
+
- Selector: 'addElement:withPoint:'
|
|
165
|
+
SwiftName: add(_:at:)
|
|
166
|
+
MethodKind: Instance
|
|
167
|
+
- Selector: 'addElement:withBox:'
|
|
168
|
+
SwiftName: add(_:in:)
|
|
169
|
+
MethodKind: Instance
|
|
170
|
+
- Selector: 'elementsAtPoint:'
|
|
171
|
+
SwiftName: elements(at:)
|
|
172
|
+
MethodKind: Instance
|
|
173
|
+
- Selector: 'removeElement:'
|
|
174
|
+
SwiftName: remove(_:)
|
|
175
|
+
MethodKind: Instance
|
|
176
|
+
- Selector: 'removeElement:withNode:'
|
|
177
|
+
SwiftName: remove(_:using:)
|
|
178
|
+
MethodKind: Instance
|
|
179
|
+
- Name: GKQuadtree
|
|
180
|
+
Methods:
|
|
181
|
+
- Selector: 'addElement:withPoint:'
|
|
182
|
+
SwiftName: add(_:at:)
|
|
183
|
+
MethodKind: Instance
|
|
184
|
+
- Selector: 'addElement:withQuad:'
|
|
185
|
+
SwiftName: add(_:in:)
|
|
186
|
+
MethodKind: Instance
|
|
187
|
+
- Selector: 'elementsAtPoint:'
|
|
188
|
+
SwiftName: elements(at:)
|
|
189
|
+
MethodKind: Instance
|
|
190
|
+
- Selector: 'removeElement:'
|
|
191
|
+
SwiftName: remove(_:)
|
|
192
|
+
MethodKind: Instance
|
|
193
|
+
- Selector: 'removeElement:withNode:'
|
|
194
|
+
SwiftName: remove(_:using:)
|
|
195
|
+
MethodKind: Instance
|
|
196
|
+
- Name: GKRtree
|
|
197
|
+
Methods:
|
|
198
|
+
- Selector: 'addElement:boundingRectMin:boundingRectMax:splitStrategy:'
|
|
199
|
+
SwiftName: add(_:boundingRectMin:boundingRectMax:splitStrategy:)
|
|
200
|
+
MethodKind: Instance
|
|
201
|
+
- Selector: 'removeElement:boundingRectMin:boundingRectMax:'
|
|
202
|
+
SwiftName: remove(_:boundingRectMin:boundingRectMax:)
|
|
203
|
+
MethodKind: Instance
|
|
204
|
+
- Name: NSArray
|
|
205
|
+
Methods:
|
|
206
|
+
- Selector: 'shuffledArrayWithRandomSource:'
|
|
207
|
+
SwiftName: shuffled(using:)
|
|
208
|
+
MethodKind: Instance
|
|
209
|
+
- Name: GKARC4RandomSource
|
|
210
|
+
Methods:
|
|
211
|
+
- Selector: 'dropValuesWithCount:'
|
|
212
|
+
SwiftName: dropValues(_:)
|
|
213
|
+
MethodKind: Instance
|
|
214
|
+
- Name: GKRuleSystem
|
|
215
|
+
Methods:
|
|
216
|
+
- Selector: 'addRule:'
|
|
217
|
+
SwiftName: add(_:)
|
|
218
|
+
MethodKind: Instance
|
|
219
|
+
- Selector: 'addRulesFromArray:'
|
|
220
|
+
SwiftName: add(_:)
|
|
221
|
+
MethodKind: Instance
|
|
222
|
+
- Name: GKRule
|
|
223
|
+
Methods:
|
|
224
|
+
- Selector: 'evaluatePredicateWithSystem:'
|
|
225
|
+
SwiftName: evaluatePredicate(in:)
|
|
226
|
+
MethodKind: Instance
|
|
227
|
+
- Selector: 'performActionWithSystem:'
|
|
228
|
+
SwiftName: performAction(in:)
|
|
229
|
+
MethodKind: Instance
|
|
230
|
+
- Selector: 'ruleWithBlockPredicate:action:'
|
|
231
|
+
SwiftName: init(evaluator:action:)
|
|
232
|
+
MethodKind: Instance
|
|
233
|
+
- Name: GKState
|
|
234
|
+
Methods:
|
|
235
|
+
- Selector: 'didEnterWithPreviousState:'
|
|
236
|
+
SwiftName: didEnter(from:)
|
|
237
|
+
MethodKind: Instance
|
|
238
|
+
- Selector: 'updateWithDeltaTime:'
|
|
239
|
+
SwiftName: update(deltaTime:)
|
|
240
|
+
MethodKind: Instance
|
|
241
|
+
- Selector: 'willExitWithNextState:'
|
|
242
|
+
SwiftName: willExit(to:)
|
|
243
|
+
MethodKind: Instance
|
|
244
|
+
- Name: GKStateMachine
|
|
245
|
+
Methods:
|
|
246
|
+
- Selector: 'updateWithDeltaTime:'
|
|
247
|
+
SwiftName: update(deltaTime:)
|
|
248
|
+
MethodKind: Instance
|
|
249
|
+
- Selector: 'canEnterState:'
|
|
250
|
+
SwiftName: canEnter(:_)
|
|
251
|
+
MethodKind: Instance
|
|
252
|
+
- Selector: 'enterState:'
|
|
253
|
+
SwiftName: enter(_:)
|
|
254
|
+
MethodKind: Instance
|
|
255
|
+
- Selector: 'stateForClass:'
|
|
256
|
+
MethodKind: Instance
|
|
257
|
+
SwiftPrivate: true
|
|
258
|
+
- Name: SKTileMapNode
|
|
259
|
+
Methods:
|
|
260
|
+
- Selector: 'tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:'
|
|
261
|
+
SwiftName: tileMapNodes(tileSet:columns:rows:tileSize:from:tileTypeNoiseMapThresholds:)
|
|
262
|
+
MethodKind: Class
|
|
263
|
+
|
|
264
|
+
Protocols:
|
|
265
|
+
- Name: GKRandom
|
|
266
|
+
Methods:
|
|
267
|
+
- Selector: 'nextIntWithUpperBound:'
|
|
268
|
+
SwiftName: nextInt(upperBound:)
|
|
269
|
+
MethodKind: Instance
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GameplayKit.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// the swift module declares every other gameplaykit class; these headers are
|
|
11
|
+
// the state machine classes it implements as objective-c classes.
|
|
12
|
+
#import <GameplayKit/GameplayKitBase.h>
|
|
13
|
+
|
|
14
|
+
#import <GameplayKit/GKState.h>
|
|
15
|
+
#import <GameplayKit/GKStateMachine.h>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GameplayKitBase.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <simd/simd.h>
|
|
10
|
+
#import <Availability.h>
|
|
11
|
+
#import <TargetConditionals.h>
|
|
12
|
+
|
|
13
|
+
//Exporting
|
|
14
|
+
#ifdef __cplusplus
|
|
15
|
+
#define GK_EXPORT extern "C" __attribute__((visibility ("default")))
|
|
16
|
+
#else
|
|
17
|
+
#define GK_EXPORT extern __attribute__((visibility ("default")))
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
//Visibility
|
|
21
|
+
#define GK_DEFAULT __attribute__((visibility ("default")))
|
|
22
|
+
|
|
23
|
+
//Availability
|
|
24
|
+
#define GK_BASE_AVAILABILITY NS_CLASS_AVAILABLE(10_11, 9_0)
|
|
25
|
+
#define GK_BASE_AVAILABILITY_2 NS_CLASS_AVAILABLE(10_12, 10_0)
|
|
26
|
+
#define GK_BASE_AVAILABILITY_3 NS_CLASS_AVAILABLE(10_13, 11_0)
|
|
27
|
+
|
|
28
|
+
#define GK_AVAILABLE __OSX_AVAILABLE_STARTING
|
|
29
|
+
|
|
30
|
+
//Inlining
|
|
31
|
+
#define GK_FORCE_INLINE __inline__ __attribute__((always_inline))
|
|
32
|
+
|
|
33
|
+
//Branch prediction
|
|
34
|
+
#define GK_LIKELY(x) __builtin_expect(!!(x), 1)
|
|
35
|
+
#define GK_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
|
36
|
+
|
|
37
|
+
// Attribute annotation to parse properties from GKComponent derived component classes
|
|
38
|
+
#define GKInspectable __attribute__((annotate("gk_inspectable")))
|
|
@@ -1987,11 +1987,13 @@ Typedefs:
|
|
|
1987
1987
|
SwiftName: UIAccessibilityCustomRotor.Search
|
|
1988
1988
|
# Swift 4.2 New
|
|
1989
1989
|
- Name: UIApplicationOpenExternalURLOptionsKey
|
|
1990
|
-
SwiftName:
|
|
1990
|
+
SwiftName: UIApplicationOpenExternalURLOptionsKey
|
|
1991
|
+
SwiftWrapper: struct
|
|
1991
1992
|
- Name: UINibOptionsKey
|
|
1992
1993
|
SwiftName: UINib.OptionsKey
|
|
1993
1994
|
- Name: UIPageViewControllerOptionsKey
|
|
1994
|
-
SwiftName:
|
|
1995
|
+
SwiftName: UIPageViewControllerOptionsKey
|
|
1996
|
+
SwiftWrapper: struct
|
|
1995
1997
|
- Name: UIImagePickerControllerInfoKey
|
|
1996
1998
|
SwiftName: UIImagePickerController.InfoKey
|
|
1997
1999
|
- Name: UIScrollViewDecelerationRate
|
|
@@ -3391,11 +3393,13 @@ SwiftVersions:
|
|
|
3391
3393
|
SwiftName: UIWindowLevel
|
|
3392
3394
|
SwiftWrapper: none
|
|
3393
3395
|
- Name: UIApplicationOpenExternalURLOptionsKey
|
|
3394
|
-
|
|
3396
|
+
SwiftName: UIApplicationOpenExternalURLOptionsKey
|
|
3397
|
+
SwiftWrapper: struct
|
|
3395
3398
|
- Name: UINibOptionsKey
|
|
3396
3399
|
SwiftWrapper: none
|
|
3397
3400
|
- Name: UIPageViewControllerOptionsKey
|
|
3398
|
-
|
|
3401
|
+
SwiftName: UIPageViewControllerOptionsKey
|
|
3402
|
+
SwiftWrapper: struct
|
|
3399
3403
|
- Name: UIImagePickerControllerInfoKey
|
|
3400
3404
|
SwiftWrapper: none
|
|
3401
3405
|
- Name: UIAccessibilityAssistiveTechnologyIdentifier
|