peachsim 0.1.2428 → 0.1.2430

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 (163) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +200 -92
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +164 -56
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +182 -74
  31. package/dist-lib/host/fetch-proxy-handler.cjs +7 -6
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +10 -6
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +10 -6
  47. package/dist-lib/native-app-identity-project.cjs +6 -3
  48. package/dist-lib/native-app-identity-project.mjs +6 -3
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +55 -55
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +195 -85
  68. package/dist-lib/swift-compile.cjs +35 -22
  69. package/dist-lib/swift-compile.mjs +35 -22
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +180 -73
  77. package/dist-lib/vite.cjs +7 -6
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  81. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -0
  82. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
  83. package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
  84. package/dist-types/packages/peach-globals/src/locationBridgeContract.d.ts +20 -0
  85. package/package.json +1 -1
  86. package/runtime-companion.json +1 -1
  87. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +3 -0
  88. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityMigrationPolicy.h +17 -0
  89. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +2 -0
  90. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +6 -0
  91. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h +15 -0
  92. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreDescription.h +10 -0
  93. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +1 -1
  94. package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Modules/module.modulemap +5 -0
  95. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSBase.h +28 -0
  96. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSImportExtension.h +21 -0
  97. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h +17 -0
  98. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h +28 -0
  99. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h +77 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h +154 -0
  101. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndexDescription.h +19 -0
  102. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h +86 -0
  103. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h +95 -0
  104. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Categories.h +19 -0
  105. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Documents.h +71 -0
  106. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Events.h +34 -0
  107. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h +138 -0
  108. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Images.h +116 -0
  109. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Media.h +235 -0
  110. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Messaging.h +99 -0
  111. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Places.h +96 -0
  112. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSuggestion.h +37 -0
  113. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSUserQuery.h +73 -0
  114. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes +26 -0
  115. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.h +29 -0
  116. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Modules/module.modulemap +5 -0
  117. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
  118. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +1 -1
  119. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +1 -1
  120. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +1 -1
  121. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +1 -1
  122. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +1 -1
  123. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +1 -1
  124. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +1 -1
  125. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +1 -1
  126. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +1 -1
  127. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +1 -1
  128. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +1 -1
  129. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +1 -1
  130. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +1 -1
  131. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +1 -1
  132. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +1 -1
  133. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +1 -1
  134. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +1 -1
  135. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +1 -1
  136. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +1 -1
  137. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +1 -1
  138. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +1 -1
  139. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +1 -1
  140. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +1 -1
  141. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +1 -1
  142. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +1 -1
  143. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +1 -1
  144. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +1 -1
  145. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +1 -1
  146. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +1 -1
  147. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +1 -1
  148. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +1 -1
  149. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +1 -1
  150. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +1 -1
  151. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +1 -1
  152. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +1 -1
  153. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +2 -2
  154. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +1 -1
  155. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +1 -1
  156. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +1 -1
  157. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +1 -1
  158. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +1 -1
  159. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +3 -3
  160. package/src/core-data-model.ts +112 -5
  161. package/src/swift-compile.ts +34 -11
  162. package/src/swift-objc-import.ts +19 -13
  163. package/src/xcode-project.ts +5 -0
@@ -31,7 +31,7 @@
31
31
 
32
32
  WK_SWIFT_UI_ACTOR
33
33
  WK_EXTERN API_AVAILABLE(macos(10.13), ios(11.0))
34
- @interface WKContentRuleListStore : NSObject
34
+ PEACH_SWIFT_CLASS(WebKit) @interface WKContentRuleListStore : NSObject
35
35
 
36
36
  + (instancetype)defaultStore;
37
37
  + (instancetype)storeWithURL:(NSURL *)url;
@@ -44,7 +44,7 @@ For example:
44
44
  */
45
45
  WK_SWIFT_UI_ACTOR
46
46
  WK_EXTERN API_AVAILABLE(macos(11.0), ios(14.0))
47
- @interface WKContentWorld : NSObject
47
+ PEACH_SWIFT_CLASS(WebKit) @interface WKContentWorld : NSObject
48
48
 
49
49
  + (instancetype)new NS_UNAVAILABLE;
50
50
  - (instancetype)init NS_UNAVAILABLE;
@@ -39,7 +39,7 @@ WK_SWIFT_UI_ACTOR
39
39
  NS_SWIFT_SENDABLE
40
40
  NS_SWIFT_NAME(WKContentWorld.Configuration)
41
41
  WK_EXTERN API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
42
- @interface WKContentWorldConfiguration : NSObject<NSCopying, NSSecureCoding>
42
+ PEACH_SWIFT_CLASS(WebKit) @interface WKContentWorldConfiguration : NSObject<NSCopying, NSSecureCoding>
43
43
 
44
44
  /*! @abstract A boolean value indicating whether every shadow root should be treated as open mode shadow root or not. */
45
45
  @property (nonatomic) BOOL allowAccessingClosedShadowRoots;
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
33
33
 
34
34
  WK_SWIFT_UI_ACTOR
35
35
  WK_EXTERN API_AVAILABLE(ios(13.0))
36
- @interface WKContextMenuElementInfo : NSObject
36
+ PEACH_SWIFT_CLASS(WebKit) @interface WKContextMenuElementInfo : NSObject
37
37
 
38
38
  - (instancetype)init NS_UNAVAILABLE;
39
39
 
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
47
47
  e.g. In a different frame, or after a navigation.
48
48
  */
49
49
  WK_EXTERN API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
50
- @interface WKDOMNodeSnapshot : NSObject
50
+ PEACH_SWIFT_CLASS(WebKit) @interface WKDOMNodeSnapshot : NSObject
51
51
 
52
52
  + (instancetype)new NS_UNAVAILABLE;
53
53
  - (instancetype)init NS_UNAVAILABLE;
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
35
35
 
36
36
  WK_EXTERN API_AVAILABLE(macos(11.3), ios(14.5))
37
37
  WK_SWIFT_UI_ACTOR
38
- @interface WKDownload : NSObject<NSProgressReporting>
38
+ PEACH_SWIFT_CLASS(WebKit) @interface WKDownload : NSObject<NSProgressReporting>
39
39
 
40
40
  /* @abstract The request used to initiate this download.
41
41
  @discussion If the original request redirected to a different URL, originalRequest
@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
29
29
 
30
30
  WK_SWIFT_UI_ACTOR
31
31
  WK_EXTERN API_AVAILABLE(macos(10.15.4), ios(13.4))
32
- @interface WKFindConfiguration : NSObject <NSCopying>
32
+ PEACH_SWIFT_CLASS(WebKit) @interface WKFindConfiguration : NSObject <NSCopying>
33
33
 
34
34
  /* @abstract The direction to search from the current selection
35
35
  @discussion The search will respect the writing direction of the document.
@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
29
29
 
30
30
  WK_SWIFT_UI_ACTOR
31
31
  WK_EXTERN API_AVAILABLE(macos(10.15.4), ios(13.4))
32
- @interface WKFindResult : NSObject <NSCopying>
32
+ PEACH_SWIFT_CLASS(WebKit) @interface WKFindResult : NSObject <NSCopying>
33
33
 
34
34
  - (instancetype)init NS_UNAVAILABLE;
35
35
 
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
36
36
 
37
37
  NS_SWIFT_UI_ACTOR
38
38
  WK_EXTERN API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
39
- @interface WKFormInfo : NSObject
39
+ PEACH_SWIFT_CLASS(WebKit) @interface WKFormInfo : NSObject
40
40
 
41
41
  /*! @abstract The frame where the form is being submitted will cause a navigation.
42
42
  */
@@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
38
38
 
39
39
  WK_SWIFT_UI_ACTOR
40
40
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
41
- @interface WKFrameInfo : NSObject <NSCopying>
41
+ PEACH_SWIFT_CLASS(WebKit) @interface WKFrameInfo : NSObject <NSCopying>
42
42
 
43
43
  /*! @abstract A Boolean value indicating whether the frame is the main frame
44
44
  or a subframe.
@@ -48,7 +48,7 @@ WK_SWIFT_UI_ACTOR
48
48
  */
49
49
  WK_EXTERN API_AVAILABLE(macos(10.13), ios(11.0))
50
50
  WK_SWIFT_UI_ACTOR
51
- @interface WKHTTPCookieStore : NSObject
51
+ PEACH_SWIFT_CLASS(WebKit) @interface WKHTTPCookieStore : NSObject
52
52
 
53
53
  - (instancetype)init NS_UNAVAILABLE;
54
54
 
@@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
52
52
  WK_SWIFT_UI_ACTOR
53
53
  NS_SWIFT_SENDABLE
54
54
  WK_EXTERN API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
55
- @interface WKJSHandle : NSObject<NSCopying>
55
+ PEACH_SWIFT_CLASS(WebKit) @interface WKJSHandle : NSObject<NSCopying>
56
56
 
57
57
  + (instancetype)new NS_UNAVAILABLE;
58
58
  - (instancetype)init NS_UNAVAILABLE;
@@ -35,7 +35,7 @@
35
35
  */
36
36
  WK_SWIFT_UI_ACTOR
37
37
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
38
- @interface WKNavigation : NSObject
38
+ PEACH_SWIFT_CLASS(WebKit) @interface WKNavigation : NSObject
39
39
 
40
40
  /*! The content mode used when loading this webpage.
41
41
  @discussion The value is either WKContentModeMobile or WKContentModeDesktop.
@@ -59,7 +59,7 @@ A WKNavigationAction object contains information about an action that may cause
59
59
  */
60
60
  WK_SWIFT_UI_ACTOR
61
61
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
62
- @interface WKNavigationAction : NSObject
62
+ PEACH_SWIFT_CLASS(WebKit) @interface WKNavigationAction : NSObject
63
63
 
64
64
  /*! @abstract The frame requesting the navigation.
65
65
  */
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
36
36
  */
37
37
  WK_SWIFT_UI_ACTOR
38
38
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
39
- @interface WKNavigationResponse : NSObject
39
+ PEACH_SWIFT_CLASS(WebKit) @interface WKNavigationResponse : NSObject
40
40
 
41
41
  /*! @abstract A Boolean value indicating whether the frame being navigated is the main frame.
42
42
  */
@@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
32
32
  */
33
33
  WK_SWIFT_UI_ACTOR
34
34
  WK_EXTERN API_AVAILABLE(macos(10.12), ios(18.4), visionos(2.4))
35
- @interface WKOpenPanelParameters : NSObject
35
+ PEACH_SWIFT_CLASS(WebKit) @interface WKOpenPanelParameters : NSObject
36
36
 
37
37
  /*! @abstract Whether the file upload control supports multiple files.
38
38
  */
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
31
31
 
32
32
  WK_SWIFT_UI_ACTOR
33
33
  WK_EXTERN API_AVAILABLE(macos(10.15.4), ios(13.4))
34
- @interface WKPDFConfiguration : NSObject <NSCopying>
34
+ PEACH_SWIFT_CLASS(WebKit) @interface WKPDFConfiguration : NSObject <NSCopying>
35
35
 
36
36
  /*! @abstract The rect to capture in web page coordinates
37
37
  @discussion If the rect is set to the null rect, the bounds of the currently displayed web page will be used.
@@ -33,7 +33,7 @@
33
33
  */
34
34
  WK_SWIFT_UI_ACTOR
35
35
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
36
- @interface WKPreferences : NSObject <NSSecureCoding>
36
+ PEACH_SWIFT_CLASS(WebKit) @interface WKPreferences : NSObject <NSSecureCoding>
37
37
 
38
38
  /*! @abstract The minimum font size in points.
39
39
  @discussion The default value is 0.
@@ -32,7 +32,7 @@
32
32
  NS_ASSUME_NONNULL_BEGIN
33
33
 
34
34
  WK_EXTERN API_DEPRECATED_WITH_REPLACEMENT("WKContextMenuElementInfo", ios(10.0, 13.0))
35
- @interface WKPreviewElementInfo : NSObject <NSCopying>
35
+ PEACH_SWIFT_CLASS(WebKit) @interface WKPreviewElementInfo : NSObject <NSCopying>
36
36
 
37
37
  @property (nonatomic, readonly, nullable) NSURL *linkURL;
38
38
 
@@ -35,5 +35,5 @@
35
35
  */
36
36
  WK_SWIFT_UI_ACTOR
37
37
  WK_EXTERN API_DEPRECATED("Creating and using multiple instances of WKProcessPool no longer has any effect.", macos(10.10, 12.0), ios(8.0, 15.0), visionos(1.0, 1.0))
38
- @interface WKProcessPool : NSObject <NSSecureCoding>
38
+ PEACH_SWIFT_CLASS(WebKit) @interface WKProcessPool : NSObject <NSSecureCoding>
39
39
  @end
@@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
38
38
  */
39
39
  WK_SWIFT_UI_ACTOR
40
40
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
41
- @interface WKScriptMessage : NSObject
41
+ PEACH_SWIFT_CLASS(WebKit) @interface WKScriptMessage : NSObject
42
42
 
43
43
  /*! @abstract The body of the message.
44
44
  @discussion Allowed types are NSNumber, NSString, NSDate, NSArray,
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
36
36
 
37
37
  WK_SWIFT_UI_ACTOR
38
38
  WK_EXTERN API_AVAILABLE(macos(10.11), ios(9.0))
39
- @interface WKSecurityOrigin : NSObject
39
+ PEACH_SWIFT_CLASS(WebKit) @interface WKSecurityOrigin : NSObject
40
40
 
41
41
  - (instancetype)init NS_UNAVAILABLE;
42
42
 
@@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
32
32
 
33
33
  WK_SWIFT_UI_ACTOR
34
34
  WK_EXTERN API_AVAILABLE(macos(10.13), ios(11.0))
35
- @interface WKSnapshotConfiguration : NSObject <NSCopying>
35
+ PEACH_SWIFT_CLASS(WebKit) @interface WKSnapshotConfiguration : NSObject <NSCopying>
36
36
 
37
37
  /*! @abstract The rect to snapshot in view coordinates.
38
38
  @discussion This rect should be contained within WKWebView's bounds. If the rect is set to the
@@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
42
42
  */
43
43
  WK_SWIFT_UI_ACTOR
44
44
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
45
- @interface WKUserContentController : NSObject <NSSecureCoding>
45
+ PEACH_SWIFT_CLASS(WebKit) @interface WKUserContentController : NSObject <NSSecureCoding>
46
46
 
47
47
  /*! @abstract The user scripts associated with this user content
48
48
  controller.
@@ -44,7 +44,7 @@ typedef NS_ENUM(NSInteger, WKUserScriptInjectionTime) {
44
44
  */
45
45
  WK_SWIFT_UI_ACTOR
46
46
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
47
- @interface WKUserScript : NSObject <NSCopying>
47
+ PEACH_SWIFT_CLASS(WebKit) @interface WKUserScript : NSObject <NSCopying>
48
48
 
49
49
  /* @abstract The script source code. */
50
50
  @property (nonatomic, readonly, copy) NSString *source;
@@ -70,7 +70,7 @@ typedef NS_ERROR_ENUM(WKWebExtensionErrorDomain, WKWebExtensionError) {
70
70
  @discussion This class handles the reading and parsing of the manifest file along with the supporting resources like icons and localizations.
71
71
  */
72
72
  WK_EXTERN API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4)) WK_SWIFT_UI_ACTOR
73
- @interface WKWebExtension : NSObject
73
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebExtension : NSObject
74
74
 
75
75
  + (instancetype)new NS_UNAVAILABLE;
76
76
  - (instancetype)init NS_UNAVAILABLE;
@@ -142,7 +142,7 @@ WK_EXTERN WKWebExtensionContextNotificationUserInfoKey const WKWebExtensionConte
142
142
  background logic, show popovers, and display other web-based UI to the user.
143
143
  */
144
144
  WK_EXTERN API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4)) WK_SWIFT_UI_ACTOR
145
- @interface WKWebExtensionContext : NSObject
145
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebExtensionContext : NSObject
146
146
 
147
147
  + (instancetype)new NS_UNAVAILABLE;
148
148
  - (instancetype)init NS_UNAVAILABLE;
@@ -44,7 +44,7 @@ WK_HEADER_AUDIT_BEGIN(nullability, sendability)
44
44
  A controller is associated with ``WKWebView`` via the ``webExtensionController`` property on ``WKWebViewConfiguration``.
45
45
  */
46
46
  WK_EXTERN API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4)) WK_SWIFT_UI_ACTOR
47
- @interface WKWebExtensionController : NSObject
47
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebExtensionController : NSObject
48
48
 
49
49
  /*!
50
50
  @abstract Returns a web extension controller initialized with the default configuration.
@@ -38,7 +38,7 @@ WK_HEADER_AUDIT_BEGIN(nullability, sendability)
38
38
  */
39
39
  WK_EXTERN API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4))
40
40
  WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtensionController.Configuration)
41
- @interface WKWebExtensionControllerConfiguration : NSObject <NSSecureCoding, NSCopying>
41
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebExtensionControllerConfiguration : NSObject <NSSecureCoding, NSCopying>
42
42
 
43
43
  + (instancetype)new NS_UNAVAILABLE;
44
44
  - (instancetype)init NS_UNAVAILABLE;
@@ -69,7 +69,7 @@ typedef NS_OPTIONS(NSUInteger, WKWebExtensionMatchPatternOptions) {
69
69
  */
70
70
  WK_EXTERN API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4))
71
71
  WK_SWIFT_UI_ACTOR NS_SWIFT_NAME(WKWebExtension.MatchPattern)
72
- @interface WKWebExtensionMatchPattern : NSObject <NSSecureCoding, NSCopying>
72
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebExtensionMatchPattern : NSObject <NSSecureCoding, NSCopying>
73
73
 
74
74
  + (instancetype)new NS_UNAVAILABLE;
75
75
  - (instancetype)init NS_UNAVAILABLE;
@@ -69,10 +69,10 @@ NS_ASSUME_NONNULL_BEGIN
69
69
  WK_SWIFT_UI_ACTOR
70
70
  #if TARGET_OS_IPHONE
71
71
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
72
- @interface WKWebView : UIView
72
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebView : UIView
73
73
  #else
74
74
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
75
- @interface WKWebView : NSView
75
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebView : NSView
76
76
  #endif
77
77
 
78
78
  typedef NS_ENUM(NSInteger, WKMediaPlaybackState) {
@@ -99,7 +99,7 @@ typedef NS_OPTIONS(NSUInteger, WKAudiovisualMediaTypes) {
99
99
  */
100
100
  WK_SWIFT_UI_ACTOR
101
101
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
102
- @interface WKWebViewConfiguration : NSObject <NSSecureCoding, NSCopying>
102
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebViewConfiguration : NSObject <NSSecureCoding, NSCopying>
103
103
 
104
104
  /*! @abstract The process pool from which to obtain the view's web content
105
105
  process.
@@ -77,7 +77,7 @@ typedef NS_ENUM(NSInteger, WKSecurityRestrictionMode) {
77
77
  */
78
78
  WK_SWIFT_UI_ACTOR
79
79
  WK_EXTERN API_AVAILABLE(macos(10.15), ios(13.0))
80
- @interface WKWebpagePreferences : NSObject
80
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebpagePreferences : NSObject
81
81
 
82
82
  /*! @abstract A WKContentMode indicating the content mode to prefer
83
83
  when loading and rendering a webpage.
@@ -77,7 +77,7 @@ WK_EXTERN NSString * const WKWebsiteDataTypeScreenTime API_AVAILABLE(macos(26.0)
77
77
  /*! A WKWebsiteDataRecord represents website data, grouped by domain name using the public suffix list. */
78
78
  WK_SWIFT_UI_ACTOR
79
79
  WK_EXTERN API_AVAILABLE(macos(10.11), ios(9.0))
80
- @interface WKWebsiteDataRecord : NSObject
80
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebsiteDataRecord : NSObject
81
81
 
82
82
  /*! @abstract The display name for the data record. This is usually the domain name. */
83
83
  @property (nonatomic, readonly, copy) NSString *displayName;
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
41
41
  */
42
42
  WK_SWIFT_UI_ACTOR
43
43
  WK_EXTERN API_AVAILABLE(macos(10.11), ios(9.0))
44
- @interface WKWebsiteDataStore : NSObject <NSSecureCoding>
44
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWebsiteDataStore : NSObject <NSSecureCoding>
45
45
 
46
46
  /* @abstract Returns the default data store. */
47
47
  + (WKWebsiteDataStore *)defaultDataStore;
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
33
33
 
34
34
  WK_SWIFT_UI_ACTOR
35
35
  WK_EXTERN API_AVAILABLE(macos(10.10), ios(8.0))
36
- @interface WKWindowFeatures : NSObject
36
+ PEACH_SWIFT_CLASS(WebKit) @interface WKWindowFeatures : NSObject
37
37
 
38
38
  /*! @abstract BOOL. Whether the menu bar should be visible. nil if menu bar visibility was not specified.
39
39
  */
@@ -190,7 +190,7 @@ CLLocationCoordinate2D CLLocationCoordinate2DMake(CLLocationDegrees latitude, CL
190
190
  */
191
191
  CLES_EXPORT
192
192
  API_AVAILABLE(ios(8.0), macos(10.15))
193
- @interface CLFloor : NSObject <NSCopying, NSSecureCoding>
193
+ PEACH_SWIFT_CLASS(CoreLocation) @interface CLFloor : NSObject <NSCopying, NSSecureCoding>
194
194
 
195
195
  /*
196
196
  * level
@@ -215,7 +215,7 @@ API_AVAILABLE(ios(8.0), macos(10.15))
215
215
  */
216
216
  CLES_EXPORT
217
217
  API_AVAILABLE(ios(15.0), watchos(8.0), tvos(15.0), macos(12.0))
218
- @interface CLLocationSourceInformation : NSObject <NSCopying, NSSecureCoding>
218
+ PEACH_SWIFT_CLASS(CoreLocation) @interface CLLocationSourceInformation : NSObject <NSCopying, NSSecureCoding>
219
219
 
220
220
  - (instancetype)initWithSoftwareSimulationState:(BOOL)isSoftware
221
221
  andExternalAccessoryState:(BOOL)isAccessory;
@@ -245,7 +245,7 @@ API_AVAILABLE(ios(15.0), watchos(8.0), tvos(15.0), macos(12.0))
245
245
  */
246
246
  CLES_EXPORT
247
247
  NS_SWIFT_SENDABLE API_AVAILABLE(macos(10.6), ios(2.0))
248
- @interface CLLocation : NSObject <NSCopying, NSSecureCoding>
248
+ PEACH_SWIFT_CLASS(CoreLocation) @interface CLLocation : NSObject <NSCopying, NSSecureCoding>
249
249
  {
250
250
  @private
251
251
  id _internal;
@@ -48,7 +48,11 @@ type Attribute = Common & {
48
48
  transformer: string | null
49
49
  flags: number
50
50
  cloudEncryption: boolean
51
+ range: Bound[]
51
52
  }
53
+ // a numeric validation range bound: momc archives `SELF >= min` then `SELF <= max`
54
+ // with the NSValidationNumberTooSmallError and TooLargeError codes as warnings
55
+ type Bound = { operator: 1 | 3; value: number; warning: 1610 | 1620 }
52
56
  type Relationship = Common & {
53
57
  kind: 'relationship'
54
58
  destination: string
@@ -201,6 +205,25 @@ function defaultValue(model: string, member: Tag, type: string) {
201
205
  refuse(model, `${member.attrs.name} has the ${type} default ${JSON.stringify(text)}`)
202
206
  }
203
207
 
208
+ function range(model: string, member: Tag, type: string): Bound[] {
209
+ const bounds: [string | undefined, 1 | 3, 1610 | 1620][] = [
210
+ [member.attrs.minValueString, 3, 1620],
211
+ [member.attrs.maxValueString, 1, 1610],
212
+ ]
213
+ return bounds.flatMap(([text, operator, warning]): Bound[] => {
214
+ if (text === undefined) return []
215
+ if (
216
+ (type.startsWith('Integer ') && /^-?\d+$/.test(text)) ||
217
+ ((type === 'Double' || type === 'Float') && Number.isFinite(Number(text)))
218
+ )
219
+ return [{ operator, value: Number(text), warning }]
220
+ refuse(
221
+ model,
222
+ `${member.attrs.name} has the ${type} range bound ${JSON.stringify(text)}`,
223
+ )
224
+ })
225
+ }
226
+
204
227
  const common = (source: Source, member: Tag): Common => ({
205
228
  name: member.attrs.name!,
206
229
  optional: yes(member.attrs.optional),
@@ -220,6 +243,8 @@ function attribute(source: Source, member: Tag): Attribute {
220
243
  'usesScalarValueType',
221
244
  'customClassName',
222
245
  'valueTransformerName',
246
+ 'minValueString',
247
+ 'maxValueString',
223
248
  'indexed',
224
249
  'versionHashModifier',
225
250
  'elementID',
@@ -234,21 +259,20 @@ function attribute(source: Source, member: Tag): Attribute {
234
259
  if (!known)
235
260
  refuse(source.model, `${member.attrs.name} has the attribute type ${typeName}`)
236
261
  const [type, className] = known
237
- if (member.attrs.customClassName !== undefined && typeName !== 'Transformable')
238
- refuse(source.model, `${member.attrs.name} names a custom class for a ${typeName}`)
239
262
  return {
240
263
  kind: 'attribute',
241
264
  ...common(source, member),
242
265
  transient: yes(member.attrs.transient),
243
266
  type,
244
- className:
245
- typeName === 'Transformable' ? (member.attrs.customClassName ?? null) : className,
267
+ // momc archives a custom class as the value class of any attribute type
268
+ className: member.attrs.customClassName ?? className,
246
269
  defaultValue: defaultValue(source.model, member, typeName),
247
270
  transformer: member.attrs.valueTransformerName ?? null,
248
271
  flags:
249
272
  (yes(member.attrs.allowsExternalBinaryDataStorage) ? EXTERNAL_BINARY : 0) |
250
273
  (yes(member.attrs.preserveAfterDeletion) ? PRESERVE_AFTER_DELETION : 0),
251
274
  cloudEncryption: yes(member.attrs.allowsCloudEncryption),
275
+ range: range(source.model, member, typeName),
252
276
  }
253
277
  }
254
278
 
@@ -304,6 +328,7 @@ function entity(source: Source, tag: Tag): Entity {
304
328
  'attribute',
305
329
  'relationship',
306
330
  'fetchIndex',
331
+ 'compoundIndexes',
307
332
  'uniquenessConstraints',
308
333
  'userInfo',
309
334
  ])
@@ -350,6 +375,26 @@ function entity(source: Source, tag: Tag): Entity {
350
375
  elements: [{ property, ascending: true }],
351
376
  owned: source.tools >= 9,
352
377
  })
378
+ // then each legacy compound index, numbered after the first in declaration order
379
+ const compound = tag.children
380
+ .filter((child) => child.name === 'compoundIndexes')
381
+ .flatMap((group) => {
382
+ checkChildren(source.model, group, ['compoundIndex'])
383
+ return group.children
384
+ })
385
+ if (compound.length > 0 && source.tools < 9)
386
+ refuse(source.model, `${tag.attrs.name} has compound indexes before xcode 9`)
387
+ compound.forEach((index, at) => {
388
+ checkChildren(source.model, index, ['index'])
389
+ indexes.push({
390
+ name: `compoundIndex${at === 0 ? '' : at}`,
391
+ elements: index.children.map((element) => {
392
+ checkAttributes(source.model, element, ['value'])
393
+ return { property: element.attrs.value!, ascending: true }
394
+ }),
395
+ owned: true,
396
+ })
397
+ })
353
398
  const uniqueness = tag.children
354
399
  .filter((child) => child.name === 'uniquenessConstraints')
355
400
  .flatMap((group) => {
@@ -425,6 +470,14 @@ const classChains: Record<string, string[]> = {
425
470
  NSMutableArray: ['NSMutableArray', 'NSArray', 'NSObject'],
426
471
  NSSet: ['NSSet', 'NSObject'],
427
472
  NSDate: ['NSDate', 'NSObject'],
473
+ NSComparisonPredicate: ['NSComparisonPredicate', 'NSPredicate', 'NSObject'],
474
+ NSComparisonPredicateOperator: [
475
+ 'NSComparisonPredicateOperator',
476
+ 'NSPredicateOperator',
477
+ 'NSObject',
478
+ ],
479
+ NSSelfExpression: ['NSSelfExpression', 'NSExpression', 'NSObject'],
480
+ NSConstantValueExpression: ['NSConstantValueExpression', 'NSExpression', 'NSObject'],
428
481
  NSDecimalNumberPlaceholder: [
429
482
  'NSDecimalNumberPlaceholder',
430
483
  'NSDecimalNumber',
@@ -510,8 +563,17 @@ function archiveModel(model: Model) {
510
563
  for (const property of item.properties)
511
564
  propertyIndex.set(`${item.name}.${property.name}`, archive.reserve())
512
565
  const entityUid = (name: string) => uid(entityIndex.get(name)!)
566
+ const byName = new Map(model.entities.map((item) => [item.name, item]))
567
+ // an entity's relationships, inherited ones included
568
+ const relationships = (item: Entity): string[] => [
569
+ ...(item.parent === null ? [] : relationships(byName.get(item.parent)!)),
570
+ ...item.properties.flatMap((property) =>
571
+ property.kind === 'relationship' ? [property.name] : [],
572
+ ),
573
+ ]
513
574
  for (const item of model.entities) {
514
575
  const self = entityUid(item.name)
576
+ const related = relationships(item)
515
577
  const properties = item.properties.map((property): [string, Uid] => {
516
578
  const index = propertyIndex.get(`${item.name}.${property.name}`)!
517
579
  const shared: BinaryPlistDictionary = {
@@ -538,6 +600,46 @@ function archiveModel(model: Model) {
538
600
  NSValueTransformerName: archive.string(property.transformer),
539
601
  ...(property.transient ? { NSIsTransient: true } : {}),
540
602
  ...(property.cloudEncryption ? { NSAllowsCloudEncryption: true } : {}),
603
+ ...(property.range.length > 0
604
+ ? {
605
+ NSValidationPredicates: archive.array(
606
+ property.range.map((bound) =>
607
+ archive.fill(archive.reserve(), 'NSComparisonPredicate', {
608
+ NSLeftExpression: archive.fill(
609
+ archive.reserve(),
610
+ 'NSSelfExpression',
611
+ {
612
+ NSExpressionType: 1,
613
+ },
614
+ ),
615
+ NSPredicateOperator: archive.fill(
616
+ archive.reserve(),
617
+ 'NSComparisonPredicateOperator',
618
+ {
619
+ NSModifier: 0,
620
+ NSOperatorType: bound.operator,
621
+ NSOptions: 0,
622
+ NSVariant: bound.operator,
623
+ },
624
+ ),
625
+ NSRightExpression: archive.fill(
626
+ archive.reserve(),
627
+ 'NSConstantValueExpression',
628
+ {
629
+ NSConstantValue: archive.add(bound.value),
630
+ NSExpressionType: 0,
631
+ },
632
+ ),
633
+ }),
634
+ ),
635
+ 'NSArray',
636
+ ),
637
+ NSValidationWarnings: archive.array(
638
+ property.range.map((bound) => archive.add(bound.warning)),
639
+ 'NSArray',
640
+ ),
641
+ }
642
+ : {}),
541
643
  }),
542
644
  ]
543
645
  const destination = model.entities.find(
@@ -568,7 +670,12 @@ function archiveModel(model: Model) {
568
670
  : {
569
671
  NSCompoundIndexes: archive.array(
570
672
  item.indexes
571
- .filter((index) => index.elements.length >= 2)
673
+ // momc lists only attribute indexes of two or more elements here
674
+ .filter(
675
+ (index) =>
676
+ index.elements.length >= 2 &&
677
+ !index.elements.some((element) => related.includes(element.property)),
678
+ )
572
679
  .map((index) =>
573
680
  archive.array(
574
681
  index.elements.map((element) => archive.add(element.property)),