peachsim 0.1.1728 → 0.1.1744

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 (374) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +68 -16
  6. package/cli/commands/coverage-swift.ts +112 -4
  7. package/cli/commands/device.ts +3 -1
  8. package/cli/commands/doctor.ts +1 -4
  9. package/cli/commands/inspect/settling.ts +6 -1
  10. package/cli/commands/inspect/wait-ready.ts +22 -2
  11. package/cli/commands/package.ts +33 -21
  12. package/cli/commands/push.ts +56 -0
  13. package/cli/commands/serve.ts +9 -0
  14. package/cli/commands/shell-url.ts +41 -9
  15. package/cli/commands/swift.ts +1 -1
  16. package/cli/current-sim.ts +27 -0
  17. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  18. package/cli/drivers/linux-browser-libs.ts +8 -6
  19. package/cli/drivers/playwright.ts +5 -1
  20. package/cli/internal-child.ts +11 -1
  21. package/cli/main.ts +6 -0
  22. package/cli/native-input.ts +1 -7
  23. package/cli/outbound-endpoints.ts +9 -1
  24. package/cli/packaged-app-launcher.ts +3 -1
  25. package/cli/scene-video.ts +28 -7
  26. package/cli/ws-bridge.ts +3 -1
  27. package/detox/index.ts +18 -5
  28. package/dist-lib/agent-daemon-client.cjs +1 -1
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +5 -2
  31. package/dist-lib/auth/shared-session.cjs +5 -2
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +1 -1
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +1 -1
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +1 -1
  40. package/dist-lib/bundle-channel.cjs +9932 -4561
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +1 -1
  43. package/dist-lib/cloud-contract.cjs +1 -1
  44. package/dist-lib/cloud-contract.mjs +1 -1
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +1 -1
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +1 -1
  49. package/dist-lib/config.cjs +1 -1
  50. package/dist-lib/config.mjs +1 -1
  51. package/dist-lib/detox/index.cjs +30 -8
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/expo-swift-bundle.cjs +6886 -3303
  54. package/dist-lib/expo-swift-metadata.cjs +14 -2
  55. package/dist-lib/expo-swift-metadata.mjs +14 -2
  56. package/dist-lib/home-paths.cjs +7 -2
  57. package/dist-lib/host/bridge-host.cjs +8513 -3085
  58. package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +6 -3
  63. package/dist-lib/index.cjs +175 -80
  64. package/dist-lib/jump-to-source-babel.cjs +1 -1
  65. package/dist-lib/jump-to-source-native.cjs +1 -1
  66. package/dist-lib/kotlin-host.cjs +209 -32
  67. package/dist-lib/menu.cjs +7 -1
  68. package/dist-lib/menu.mjs +7 -1
  69. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  70. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  71. package/dist-lib/metro-production-bundle.cjs +1 -1
  72. package/dist-lib/metro-production-bundle.mjs +1 -1
  73. package/dist-lib/metro.cjs +146 -76
  74. package/dist-lib/native-app-identity-project.cjs +76 -39
  75. package/dist-lib/native-app-identity-project.mjs +76 -39
  76. package/dist-lib/native-app-identity.cjs +10 -3
  77. package/dist-lib/native-app-identity.mjs +10 -3
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +1 -1
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +1 -1
  82. package/dist-lib/profiles.cjs +5 -2
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +25 -23
  85. package/dist-lib/public-origins-lib.json +138 -80
  86. package/dist-lib/react-native-host-modules.cjs +5 -2
  87. package/dist-lib/react-native-host-modules.mjs +5 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +4 -1
  91. package/dist-lib/sdk.mjs +4 -1
  92. package/dist-lib/skills.cjs +41126 -36493
  93. package/dist-lib/swift-compile.cjs +2103 -444
  94. package/dist-lib/swift-compile.mjs +2025 -369
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +1 -1
  97. package/dist-lib/swift-submit.cjs +2 -2
  98. package/dist-lib/swift-submit.mjs +2 -2
  99. package/dist-lib/swift-toolchain.cjs +84 -24
  100. package/dist-lib/swift.cjs +1 -1
  101. package/dist-lib/vite-swift.cjs +6094 -2687
  102. package/dist-lib/vite.cjs +32 -10
  103. package/dist-lib/worklet-executable.cjs +1 -1
  104. package/dist-lib/worklet-executable.mjs +1 -1
  105. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  107. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  108. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  109. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
  110. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  111. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
  112. package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
  113. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  116. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  117. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  118. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
  119. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  121. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  122. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  123. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  124. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
  132. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  135. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  137. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
  138. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  139. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  140. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  141. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  142. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  143. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  144. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  145. package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
  146. package/kotlin/README.md +3 -0
  147. package/kotlin/sdk.tar.gz +0 -0
  148. package/package.json +2 -1
  149. package/runtime-companion.json +1 -1
  150. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  151. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  152. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  153. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  154. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  155. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  156. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  157. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  158. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  159. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  198. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  199. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  200. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
  201. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  218. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  219. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  220. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  221. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  222. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  223. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  224. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  225. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  226. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  227. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  228. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  229. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  230. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  231. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  232. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  233. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  234. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  239. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  240. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  241. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  242. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  243. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  244. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  245. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  246. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  247. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  248. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  249. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  250. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  251. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  252. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  253. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  254. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  255. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  258. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  259. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  260. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  261. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  262. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  263. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  264. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  265. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  266. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  267. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  268. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  269. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  270. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  271. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  272. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  273. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  274. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  275. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  276. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  277. package/sdk/ios/usr/include/module.modulemap +1 -0
  278. package/sdk/ios/usr/include/os/signpost.h +414 -0
  279. package/sdk/ios/usr/include/os.modulemap +5 -0
  280. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  281. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  282. package/sdk/ios/wasm/include/errno.h +4 -20
  283. package/sdk/ios/wasm/include/pthread.h +3 -0
  284. package/sdk/ios/wasm/include/setjmp.h +57 -0
  285. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  286. package/sdk/native-hashes.json +3 -3
  287. package/skills/contrast/SKILL.md +6 -5
  288. package/skills/peach-debug/SKILL.md +68 -265
  289. package/skills/peach-debug/references/accessibility.md +37 -73
  290. package/skills/peach-debug/references/commands.md +2 -2
  291. package/skills/peach-debug/references/events.md +74 -0
  292. package/skills/peach-perf/SKILL.md +64 -402
  293. package/skills/peach-perf/references/presentation.md +46 -0
  294. package/skills/peach-perf/references/profiling.md +93 -0
  295. package/skills/peach-perf/references/render-counters.md +57 -0
  296. package/skills/peach-setup/SKILL.md +66 -217
  297. package/skills/peach-setup/references/native-config.md +35 -0
  298. package/skills/peach-setup/references/reporting.md +28 -0
  299. package/skills/peach-test/SKILL.md +68 -285
  300. package/skills/peach-test/references/detox.md +69 -0
  301. package/skills/peach-test/references/maestro.md +95 -0
  302. package/skills/peach-visual/SKILL.md +53 -106
  303. package/src/android-autolinking.ts +1 -0
  304. package/src/android-bridge-packages.ts +279 -0
  305. package/src/appPackageContract.ts +14 -1
  306. package/src/assetCatalogContract.ts +8 -1
  307. package/src/bridge-contract.ts +6 -0
  308. package/src/bundle-channel.mjs +152 -60
  309. package/src/cli-runtime.ts +3 -0
  310. package/src/configured-bundle-producer.ts +10 -0
  311. package/src/device-catalog.ts +68 -4
  312. package/src/expo-discovery-cache.ts +10 -3
  313. package/src/expo-kotlin-host.ts +97 -26
  314. package/src/expo-native-workspace.ts +211 -52
  315. package/src/expo-swift-host.ts +149 -123
  316. package/src/expo-swift-ready.ts +5 -1
  317. package/src/expo-widget-assets.ts +76 -0
  318. package/src/expoKotlinContract.ts +12 -2
  319. package/src/expoSwiftContract.ts +21 -2
  320. package/src/generated/swift-c-predefines.json +1 -1
  321. package/src/home-paths.ts +6 -1
  322. package/src/host/bridge-host.ts +5 -0
  323. package/src/host/fetch-proxy-handler.ts +10 -0
  324. package/src/host/websocket-proxy.ts +7 -2
  325. package/src/kotlin-host.ts +204 -30
  326. package/src/kotlinSdkContract.ts +2 -1
  327. package/src/menu.ts +7 -0
  328. package/src/native-prebuilt.ts +154 -0
  329. package/src/nitro-adapter.lock.json +261 -261
  330. package/src/nitro-adapter.ts +118 -50
  331. package/src/nitro-bundle.ts +134 -96
  332. package/src/nitro-compile.ts +16 -6
  333. package/src/nitro-dependencies.ts +43 -28
  334. package/src/nitro-source.ts +142 -30
  335. package/src/nitro-superset.lock.json +103 -0
  336. package/src/nitro-superset.ts +137 -0
  337. package/src/nitroAdapterContract.ts +146 -98
  338. package/src/nitroContract.ts +68 -21
  339. package/src/react-bridge-importers.ts +1 -0
  340. package/src/react-native-bridge-modules.ts +2 -0
  341. package/src/react-native-host-modules.ts +4 -1
  342. package/src/settingsContract.ts +37 -1
  343. package/src/storageSnapshotContract.ts +29 -81
  344. package/src/swift-compile.ts +315 -117
  345. package/src/swift-compiler-digest.ts +2 -0
  346. package/src/swift-coverage/indexdump.ts +22 -6
  347. package/src/swift-coverage/indexing.ts +4 -4
  348. package/src/swift-coverage/sdk.ts +104 -20
  349. package/src/swift-coverage/types.ts +34 -0
  350. package/src/swift-coverage/xcode-packages.ts +61 -1
  351. package/src/swift-coverage/xcode.ts +19 -13
  352. package/src/swift-cxx-reachable.ts +1 -1
  353. package/src/swift-distribution.lock.json +18 -13
  354. package/src/swift-distribution.ts +57 -26
  355. package/src/swift-host.ts +51 -35
  356. package/src/swift-link-roots.ts +45 -18
  357. package/src/swift-objc-compile.ts +78 -2
  358. package/src/swift-objc-standin.ts +3 -0
  359. package/src/swift-shared-sdk.ts +85 -1
  360. package/src/swift-standin-emit.ts +6 -1
  361. package/src/swift-standins.ts +403 -19
  362. package/src/swift-submit.ts +17 -1
  363. package/src/swift-toolchain.ts +98 -23
  364. package/src/swift-wasm-prune.ts +1629 -0
  365. package/src/turbo-bundle.ts +82 -0
  366. package/src/turbo-compile.ts +120 -0
  367. package/src/turbo-runtime.lock.json +69 -0
  368. package/src/turbo-source.ts +754 -0
  369. package/src/vite-plugin-one.ts +15 -3
  370. package/src/vite-plugin.ts +82 -23
  371. package/src/wasm-optimize.ts +34 -0
  372. package/src/worker-system-chunks.ts +3 -3
  373. package/src/xcode-project.ts +52 -0
  374. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,260 @@
1
+ /* CoreGraphics - CGBitmapContext.h
2
+ Copyright (c) 2000-2025 Apple Inc.
3
+ All rights reserved. */
4
+
5
+ #ifndef CGBITMAPCONTEXT_H_
6
+ #define CGBITMAPCONTEXT_H_
7
+
8
+ #include <CoreGraphics/CGBase.h>
9
+ #include <CoreGraphics/CGContext.h>
10
+ #include <CoreGraphics/CGRenderingBufferProvider.h>
11
+ #include <CoreFoundation/CFBase.h>
12
+ #include <CoreFoundation/CFAvailability.h>
13
+ #include <stdint.h>
14
+
15
+ CF_IMPLICIT_BRIDGING_ENABLED
16
+
17
+ CF_ASSUME_NONNULL_BEGIN
18
+
19
+ /* The callback for releasing the data supplied to
20
+ `CGBitmapContextCreateWithData'. */
21
+
22
+ typedef void (*CGBitmapContextReleaseDataCallback)(void * __nullable releaseInfo,
23
+ void * __nullable data);
24
+
25
+ /* Create a bitmap context. The context draws into a bitmap which is `width'
26
+ pixels wide and `height' pixels high. The number of components for each
27
+ pixel is specified by `space', which may also specify a destination color
28
+ profile. Note that the only legal case when `space' can be NULL is when
29
+ alpha is specified as kCGImageAlphaOnly. The number of bits for each
30
+ component of a pixel is specified by `bitsPerComponent'. The number of bytes
31
+ per pixel is equal to `(bitsPerComponent * number of components + 7)/8'.
32
+ Each row of the bitmap consists of `bytesPerRow' bytes, which must be at
33
+ least `width * bytes per pixel' bytes; in addition, `bytesPerRow' must be
34
+ an integer multiple of the number of bytes per pixel. `data', if non-NULL,
35
+ points to a block of memory at least `bytesPerRow * height' bytes. If `data'
36
+ is NULL, the context will allocate the data itself; this data will be freed
37
+ when the context is deallocated. `bitmapInfo' specifies whether the bitmap
38
+ should contain an alpha channel and how it's to be generated, along with
39
+ whether the components are floating-point or integer. If `releaseCallback' is
40
+ non-NULL, it is called when the context is freed with `releaseInfo' and
41
+ `data' as arguments. */
42
+
43
+ CG_EXTERN CGContextRef __nullable CGBitmapContextCreateWithData(
44
+ void * __nullable data, size_t width, size_t height, size_t bitsPerComponent,
45
+ size_t bytesPerRow, CGColorSpaceRef __nullable space, CGBitmapInfo bitmapInfo,
46
+ CGBitmapContextReleaseDataCallback __nullable releaseCallback,
47
+ void * __nullable releaseInfo)
48
+ API_AVAILABLE(macos(10.6), ios(4.0));
49
+
50
+ #ifdef __swift__
51
+ API_DEPRECATED("update space parameter to CGColorSpace?, bitmapInfo parameter to CGBitmapInfo", macos(10.6, API_TO_BE_DEPRECATED), ios(4.0, API_TO_BE_DEPRECATED))
52
+ CG_INLINE CGContextRef __nullable __CGBitmapContextCreateWithData(
53
+ void * __nullable data, size_t width, size_t height, size_t bitsPerComponent,
54
+ size_t bytesPerRow, CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo,
55
+ CGBitmapContextReleaseDataCallback __nullable releaseCallback,
56
+ void * __nullable releaseInfo) {
57
+ return CGBitmapContextCreateWithData(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback, releaseInfo);
58
+ }
59
+ #endif
60
+
61
+ /* Create a bitmap context. The context draws into a bitmap which is `width'
62
+ pixels wide and `height' pixels high. The number of components for each
63
+ pixel is specified by `space', which may also specify a destination color
64
+ profile. Note that the only legal case when `space' can be NULL is when
65
+ alpha is specified as kCGImageAlphaOnly.The number of bits for each component
66
+ of a pixel is specified by `bitsPerComponent'. The number of bytes per pixel
67
+ is equal to `(bitsPerComponent * number of components + 7)/8'. Each row of
68
+ the bitmap consists of `bytesPerRow' bytes, which must be at least
69
+ `width * bytes per pixel' bytes; in addition, `bytesPerRow' must be an
70
+ integer multiple of the number of bytes per pixel. `data', if non-NULL,
71
+ points to a block of memory at least `bytesPerRow * height' bytes.
72
+ If `data' is NULL, the data for context is allocated automatically and freed
73
+ when the context is deallocated. `bitmapInfo' specifies whether the bitmap
74
+ should contain an alpha channel and how it's to be generated, along with
75
+ whether the components are floating-point or integer. */
76
+
77
+ CG_EXTERN CGContextRef __nullable CGBitmapContextCreate(void * __nullable data,
78
+ size_t width, size_t height, size_t bitsPerComponent, size_t bytesPerRow,
79
+ CGColorSpaceRef __nullable space, CGBitmapInfo bitmapInfo)
80
+ API_AVAILABLE(macos(10.0), ios(2.0));
81
+
82
+ #ifdef __swift__
83
+ API_DEPRECATED("update space parameter to CGColorSpace?, bitmapInfo parameter to CGBitmapInfo", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED))
84
+ CG_INLINE CGContextRef __nullable __CGBitmapContextCreate(void * __nullable data,
85
+ size_t width, size_t height, size_t bitsPerComponent, size_t bytesPerRow,
86
+ CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo) {
87
+ return CGBitmapContextCreate(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo);
88
+ }
89
+ #endif
90
+
91
+ /* Bitmap Context typedefs */
92
+
93
+ typedef CF_OPTIONS (uint32_t, CGColorModel) {
94
+ kCGColorModelNoColorant = 0 << 0,
95
+ kCGColorModelGray = 1 << 0,
96
+ kCGColorModelRGB CF_SWIFT_NAME(rgb) = 1 << 1,
97
+ kCGColorModelCMYK CF_SWIFT_NAME(cmyk) = 1 << 2,
98
+ kCGColorModelLab = 1 << 3,
99
+ kCGColorModelDeviceN = 1 << 4
100
+ };
101
+
102
+ typedef CF_ENUM(uint32_t, CGComponent) {
103
+ kCGComponentUnknown = 0,
104
+ kCGComponentInteger8Bit = 1,
105
+ kCGComponentInteger10Bit = 6,
106
+ kCGComponentInteger16Bit = 2,
107
+ kCGComponentInteger32Bit = 3,
108
+ kCGComponentFloat16Bit = 5,
109
+ kCGComponentFloat32Bit = 4
110
+ };
111
+
112
+ typedef struct {
113
+ CGComponent deepestImageComponent; /* deepest image component */
114
+ CGColorModel contentColorModels; /* sum of all color models drawn */
115
+ bool hasWideGamut; /* there is content in wide gamut color space */
116
+ bool hasTransparency; /* there is transparent content */
117
+ float largestContentHeadroom;
118
+ } CGContentInfo;
119
+
120
+ typedef CF_ENUM (uint32_t, CGBitmapLayout) {
121
+ kCGBitmapLayoutAlphaOnly CF_SWIFT_NAME(alphaOnly),
122
+ kCGBitmapLayoutGray CF_SWIFT_NAME(gray),
123
+ kCGBitmapLayoutGrayAlpha CF_SWIFT_NAME(grayAlpha),
124
+ kCGBitmapLayoutRGBA CF_SWIFT_NAME(rgba),
125
+ kCGBitmapLayoutARGB CF_SWIFT_NAME(argb),
126
+ kCGBitmapLayoutRGBX CF_SWIFT_NAME(rgbx), // alpha skipped
127
+ kCGBitmapLayoutXRGB CF_SWIFT_NAME(xrgb), // alpha skipped; 16-bit float excluded
128
+ kCGBitmapLayoutBGRA CF_SWIFT_NAME(bgra), // 8-bit only
129
+ kCGBitmapLayoutBGRX CF_SWIFT_NAME(bgrx), // alpha skipped; 8-bit only
130
+ kCGBitmapLayoutABGR CF_SWIFT_NAME(abgr), // 8-bit only
131
+ kCGBitmapLayoutXBGR CF_SWIFT_NAME(xbgr), // alpha skipped; 8-bit only
132
+ kCGBitmapLayoutCMYK CF_SWIFT_NAME(cmyk)
133
+ };
134
+
135
+ typedef struct {
136
+ const size_t width;
137
+ const size_t height;
138
+ size_t bytesPerPixel;
139
+ size_t alignedBytesPerRow; /* Rounded up to an appropriate value for bitmap data */
140
+ CGComponent component;
141
+ CGBitmapLayout layout;
142
+ CGImagePixelFormatInfo format;
143
+ CGColorSpaceRef colorSpace;
144
+ bool hasPremultipliedAlpha;
145
+ CFByteOrder byteOrder;
146
+ float edrTargetHeadroom;
147
+ } CGBitmapParameters CF_REFINED_FOR_SWIFT;
148
+
149
+ /* CGBitmapContextCreateAdaptive creates a bitmap context which is designed to choose
150
+ * optimal bit depth, color space and EDR target headroom based on the drawn content.
151
+ * Client has an option to override the calculated settings in 'onResolve' callback,
152
+ * however the image creation from the context will fail if the selected options
153
+ * are not legal options for creating a CG bitmap content.
154
+ * The 'onResolve' callback takes a pointer to CGBitmapParameters so the client can modify CGBitmapParameters.
155
+ * The client returns true from 'onResolve' if CGBitmapParameters object is accepted as is, or false if it's modified.
156
+ * If 'onResolve' is NULL, system will determine CGBitmapParameters based on the content drawn to the context.
157
+ * If 'onAllocate' is NULL, system will allocate memory based on chosen CGBitmapParameters.
158
+ * If 'onFree' is NULL, the allocated memory will be released using C 'free' when the context is released.
159
+ * The 'onError' callback gives the client an option to receive a CFErrorRef describing a reason of failure,
160
+ * should the creation of the bitmap failed.
161
+ */
162
+
163
+ CG_EXTERN CGContextRef __nullable
164
+ CGBitmapContextCreateAdaptive(
165
+ size_t width, size_t height,
166
+ CFDictionaryRef __nullable auxiliaryInfo,
167
+ bool (^__nullable onResolve)(const CGContentInfo* __nonnull, CGBitmapParameters* __nonnull),
168
+ CGRenderingBufferProviderRef __nullable (^__nullable onAllocate)(const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull),
169
+ void (^__nullable onFree)(CGRenderingBufferProviderRef __nonnull, const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull),
170
+ void (^__nullable onError)(CFErrorRef __nonnull, const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull))
171
+ CF_REFINED_FOR_SWIFT
172
+ API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0), visionos(26.0));
173
+
174
+ /* kCGAdaptiveMaximumBitDepth passed in auxiliaryInfo provides a hint about maximum bit depth of the
175
+ * adaptive context which should be considered by the system. The value should be a CFNumberRef of
176
+ * kCFNumberIntType created from CGComponent enum type.
177
+ * Currently kCGAdaptiveMaximumBitDepth is the only valid key to be used in auxiliaryInfo.
178
+ */
179
+
180
+ CG_EXTERN const CFStringRef kCGAdaptiveMaximumBitDepth CF_REFINED_FOR_SWIFT API_AVAILABLE(macos(10.13), ios(11.0));
181
+
182
+ /* Return the data associated with the bitmap context `context', or NULL if
183
+ `context' is not a bitmap context. */
184
+
185
+ CG_EXTERN void * __nullable CGBitmapContextGetData(CGContextRef cg_nullable context)
186
+ API_AVAILABLE(macos(10.2), ios(2.0));
187
+
188
+ /* Return the width of the bitmap context `context', or 0 if `context' is
189
+ not a bitmap context. */
190
+
191
+ CG_EXTERN size_t CGBitmapContextGetWidth(CGContextRef cg_nullable context)
192
+ API_AVAILABLE(macos(10.2), ios(2.0));
193
+
194
+ /* Return the height of the bitmap context `context', or 0 if `context' is
195
+ not a bitmap context. */
196
+
197
+ CG_EXTERN size_t CGBitmapContextGetHeight(CGContextRef cg_nullable context)
198
+ API_AVAILABLE(macos(10.2), ios(2.0));
199
+
200
+ /* Return the bits per component of the bitmap context `context', or 0 if
201
+ `context' is not a bitmap context. */
202
+
203
+ CG_EXTERN size_t CGBitmapContextGetBitsPerComponent(CGContextRef cg_nullable context)
204
+ API_AVAILABLE(macos(10.2), ios(2.0));
205
+
206
+ /* Return the bits per pixel of the bitmap context `context', or 0 if
207
+ `context' is not a bitmap context. */
208
+
209
+ CG_EXTERN size_t CGBitmapContextGetBitsPerPixel(CGContextRef cg_nullable context)
210
+ API_AVAILABLE(macos(10.2), ios(2.0));
211
+
212
+ /* Return the bytes per row of the bitmap context `context', or 0 if
213
+ `context' is not a bitmap context. */
214
+
215
+ CG_EXTERN size_t CGBitmapContextGetBytesPerRow(CGContextRef cg_nullable context)
216
+ API_AVAILABLE(macos(10.2), ios(2.0));
217
+
218
+ /* Return the color space of the bitmap context `context', or NULL if
219
+ `context' is not a bitmap context. */
220
+
221
+ CG_EXTERN CGColorSpaceRef __nullable CGBitmapContextGetColorSpace(
222
+ CGContextRef cg_nullable context)
223
+ API_AVAILABLE(macos(10.2), ios(2.0));
224
+
225
+ /* Return the alpha info of the bitmap context `context', or
226
+ "kCGImageAlphaNone" if `context' is not a bitmap context. */
227
+
228
+ CG_EXTERN CGImageAlphaInfo CGBitmapContextGetAlphaInfo(
229
+ CGContextRef cg_nullable context)
230
+ API_AVAILABLE(macos(10.2), ios(2.0));
231
+
232
+ /* Return the bitmap info of the bitmap context `context', or 0 if `context'
233
+ is not a bitmap context. */
234
+
235
+ CG_EXTERN CGBitmapInfo CGBitmapContextGetBitmapInfo(
236
+ CGContextRef cg_nullable context)
237
+ API_AVAILABLE(macos(10.4), ios(2.0));
238
+
239
+ /* Return an image containing a snapshot of the bitmap context `context'. If
240
+ context is not a bitmap context, or if the image cannot be created for
241
+ any reason, this function returns NULL. This is a "copy" operation ---
242
+ subsequent changes to context will not affect the contents of the
243
+ returned image.
244
+
245
+ Note that in some cases the copy will actually follow "copy-on-write"
246
+ semantics, so that the actual physical copy of the bits will only occur
247
+ if the underlying data in the bitmap context is modified. As a
248
+ consequence, you may wish to use the resulting image and release it
249
+ before performing more drawing into the bitmap context; in this way, the
250
+ actual physical copy of the data may be avoided. */
251
+
252
+ CG_EXTERN CGImageRef __nullable CGBitmapContextCreateImage(
253
+ CGContextRef cg_nullable context)
254
+ API_AVAILABLE(macos(10.4), ios(2.0));
255
+
256
+ CF_ASSUME_NONNULL_END
257
+
258
+ CF_IMPLICIT_BRIDGING_DISABLED
259
+
260
+ #endif /* CGBITMAPCONTEXT_H_ */
@@ -0,0 +1,164 @@
1
+ /* CoreGraphics - CGColor.h
2
+ * Copyright (c) 2003-2008 Apple Inc.
3
+ * All rights reserved. */
4
+
5
+ #ifndef CGCOLOR_H_
6
+ #define CGCOLOR_H_
7
+
8
+ #include <CoreFoundation/CFBase.h>
9
+ #include <CoreFoundation/CFAvailability.h>
10
+ #include <stdint.h>
11
+
12
+ typedef struct CF_BRIDGED_TYPE(id) CGColor *CGColorRef; /* Swift Sendable */
13
+
14
+ #include <CoreGraphics/CGBase.h>
15
+ #include <CoreGraphics/CGColorSpace.h>
16
+ #include <CoreGraphics/CGPattern.h>
17
+
18
+ CF_IMPLICIT_BRIDGING_ENABLED
19
+
20
+ CF_ASSUME_NONNULL_BEGIN
21
+
22
+ /* Create a color in the color space `space' with color components
23
+ (including alpha) specified by `components'. `space' may be any color
24
+ space except a pattern color space. */
25
+
26
+ CG_EXTERN CGColorRef __nullable CGColorCreate(CGColorSpaceRef cg_nullable space,
27
+ const CGFloat * cg_nullable components)
28
+ API_AVAILABLE(macos(10.3), ios(2.0));
29
+
30
+ /* Create a color in the "Generic" gray color space. */
31
+
32
+ CG_EXTERN CGColorRef CGColorCreateGenericGray(CGFloat gray, CGFloat alpha)
33
+ API_AVAILABLE(macos(10.5), ios(13.0));
34
+
35
+ /* Create a color in the "Generic" RGB color space. */
36
+
37
+ CG_EXTERN CGColorRef CGColorCreateGenericRGB(CGFloat red, CGFloat green,
38
+ CGFloat blue, CGFloat alpha) API_AVAILABLE(macos(10.5), ios(13.0));
39
+
40
+ /* Create a color in the "Generic" CMYK color space. */
41
+
42
+ CG_EXTERN CGColorRef CGColorCreateGenericCMYK(CGFloat cyan, CGFloat magenta,
43
+ CGFloat yellow, CGFloat black, CGFloat alpha) API_AVAILABLE(macos(10.5), ios(13.0));
44
+
45
+ /* Create a color in the "Generic Gray Gamma 2.2 color space. */
46
+
47
+ CG_EXTERN CGColorRef CGColorCreateGenericGrayGamma2_2(CGFloat gray, CGFloat alpha) API_AVAILABLE(macos(10.15), ios(13.0));
48
+
49
+ /* Create a color in sRGB color space. */
50
+
51
+ CG_EXTERN CGColorRef CGColorCreateSRGB(CGFloat red, CGFloat green,
52
+ CGFloat blue, CGFloat alpha) API_AVAILABLE(macos(10.15), ios(13.0));
53
+
54
+ /* Create a color with a specified content headroom. Color space is required to be either HDR or extended range RGB.
55
+ The content value of 0.0f means 'unknown headroom'. If the color space is HDR, passing a headroom of 0.0f
56
+ is a request to use a default headroom implied by the color space. */
57
+
58
+ CG_EXTERN CGColorRef __nullable CGColorCreateWithContentHeadroom(float headroom, CGColorSpaceRef cg_nullable space, CGFloat red, CGFloat green,
59
+ CGFloat blue, CGFloat alpha) API_AVAILABLE(macos(26.0), ios(26.0));
60
+
61
+ /* Return content headroom of the color. Returned value is 0.0f if the content headroom of the color is unknown */
62
+
63
+ CG_EXTERN float CGColorGetContentHeadroom(CGColorRef cg_nullable color) API_AVAILABLE(macos(26.0), ios(26.0));
64
+
65
+ /* Return a constant color. As `CGColorGetConstantColor' is not a "Copy" or
66
+ "Create" function, it does not necessarily return a new reference each
67
+ time it's called. As a consequence, you should not release the returned
68
+ value. However, colors returned from `CGColorGetConstantColor' can be
69
+ retained and released in a properly nested fashion, just like any other
70
+ CF type. */
71
+
72
+ CG_EXTERN CGColorRef __nullable CGColorGetConstantColor(CFStringRef cg_nullable colorName)
73
+ API_AVAILABLE(macos(10.5), ios(14.0));
74
+
75
+ /* Create a color in color space `space' with pattern `pattern' and
76
+ components `components'. `space' must be a pattern color space. */
77
+
78
+ CG_EXTERN CGColorRef __nullable CGColorCreateWithPattern(CGColorSpaceRef cg_nullable space,
79
+ CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
80
+ API_AVAILABLE(macos(10.3), ios(2.0));
81
+
82
+ /* Create a copy of `color'. */
83
+
84
+ CG_EXTERN CGColorRef __nullable CGColorCreateCopy(CGColorRef cg_nullable color)
85
+ API_AVAILABLE(macos(10.3), ios(2.0));
86
+
87
+ /* Create a copy of `color' with alpha set to `alpha'. */
88
+
89
+ CG_EXTERN CGColorRef __nullable CGColorCreateCopyWithAlpha(CGColorRef cg_nullable color,
90
+ CGFloat alpha) API_AVAILABLE(macos(10.3), ios(2.0));
91
+
92
+ /* Create a copy of `color' by matching existing color to destination color space. */
93
+
94
+ CG_EXTERN CGColorRef __nullable CGColorCreateCopyByMatchingToColorSpace(cg_nullable CGColorSpaceRef,
95
+ CGColorRenderingIntent intent, CGColorRef cg_nullable color, __nullable CFDictionaryRef options)
96
+ API_AVAILABLE(macos(10.11), ios(9.0));
97
+
98
+ /* Equivalent to `CFRetain(color)', except it doesn't crash (as CFRetain
99
+ does) if `color' is NULL. */
100
+
101
+ CG_EXTERN CGColorRef cg_nullable CGColorRetain(CGColorRef cg_nullable color)
102
+ API_AVAILABLE(macos(10.3), ios(2.0));
103
+
104
+ /* Equivalent to `CFRelease(color)', except it doesn't crash (as CFRelease
105
+ does) if `color' is NULL. */
106
+
107
+ CG_EXTERN void CGColorRelease(CGColorRef cg_nullable color)
108
+ API_AVAILABLE(macos(10.3), ios(2.0));
109
+
110
+ /* Return true if `color1' is equal to `color2'; false otherwise. */
111
+
112
+ CG_EXTERN bool CGColorEqualToColor(CGColorRef cg_nullable color1, CGColorRef cg_nullable color2)
113
+ API_AVAILABLE(macos(10.3), ios(2.0));
114
+
115
+ /* Return the number of color components (including alpha) associated with
116
+ `color'. */
117
+
118
+ CG_EXTERN size_t CGColorGetNumberOfComponents(CGColorRef cg_nullable color)
119
+ API_AVAILABLE(macos(10.3), ios(2.0));
120
+
121
+ /* Return the color components (including alpha) associated with `color'. */
122
+
123
+ CG_EXTERN const CGFloat * __nullable CGColorGetComponents(CGColorRef cg_nullable color)
124
+ API_AVAILABLE(macos(10.3), ios(2.0));
125
+
126
+ /* Return the alpha component associated with `color'. */
127
+
128
+ CG_EXTERN CGFloat CGColorGetAlpha(CGColorRef cg_nullable color)
129
+ API_AVAILABLE(macos(10.3), ios(2.0));
130
+
131
+ /* Return the color space associated with `color'. */
132
+
133
+ CG_EXTERN CGColorSpaceRef __nullable CGColorGetColorSpace(CGColorRef cg_nullable color)
134
+ API_AVAILABLE(macos(10.3), ios(2.0));
135
+
136
+ /* Return the pattern associated with `color', if it's a color in a pattern
137
+ color space; NULL otherwise. */
138
+
139
+ CG_EXTERN CGPatternRef __nullable CGColorGetPattern(CGColorRef cg_nullable color)
140
+ API_AVAILABLE(macos(10.3), ios(2.0));
141
+
142
+ /* Return the CFTypeID for CGColors. */
143
+
144
+ CG_EXTERN CFTypeID CGColorGetTypeID(void)
145
+ API_AVAILABLE(macos(10.3), ios(2.0));
146
+
147
+ /*** Names of colors for use with `CGColorGetConstantColor'. ***/
148
+
149
+ /* Colors in the "Generic" gray color space. */
150
+
151
+ CG_EXTERN const CFStringRef kCGColorWhite
152
+ API_AVAILABLE(macos(10.5), ios(14.0));
153
+
154
+ CG_EXTERN const CFStringRef kCGColorBlack
155
+ API_AVAILABLE(macos(10.5), ios(14.0));
156
+
157
+ CG_EXTERN const CFStringRef kCGColorClear
158
+ API_AVAILABLE(macos(10.5), ios(14.0));
159
+
160
+ CF_ASSUME_NONNULL_END
161
+
162
+ CF_IMPLICIT_BRIDGING_DISABLED
163
+
164
+ #endif /* CGCOLOR_H_ */
@@ -0,0 +1,101 @@
1
+ /* CoreGraphics - CGColorConversionInfo.h
2
+ Copyright (c) 2016 Apple Inc.
3
+ All rights reserved. */
4
+
5
+ #ifndef CGCOLORCONVERSIONINFO_H_
6
+ #define CGCOLORCONVERSIONINFO_H_
7
+
8
+ #include <CoreGraphics/CGBase.h>
9
+ #include <CoreFoundation/CFAvailability.h>
10
+ #include <CoreGraphics/CGColorSpace.h>
11
+ #include <CoreGraphics/CGImage.h>
12
+ #include <CoreGraphics/CGToneMapping.h>
13
+
14
+ typedef const struct CF_BRIDGED_TYPE(id) CGColorConversionInfo* CGColorConversionInfoRef;
15
+
16
+ CF_IMPLICIT_BRIDGING_ENABLED
17
+
18
+ CF_ASSUME_NONNULL_BEGIN
19
+
20
+ CG_EXTERN CFTypeID CGColorConversionInfoGetTypeID(void);
21
+
22
+ typedef CF_ENUM (uint32_t, CGColorConversionInfoTransformType) {
23
+ kCGColorConversionTransformFromSpace = 0,
24
+ kCGColorConversionTransformToSpace,
25
+ kCGColorConversionTransformApplySpace
26
+ };
27
+
28
+ /* Create CGColorConversionInfoRef for converting color from `src' color space to `dst' color space
29
+ * using kCGRenderingIntentDefault rendering intent.
30
+ * Requirements: CG color spaces must be calibrated (no Device{Gray,RGB,CMYK}, Indexed or DeviceN are allowed).
31
+ */
32
+
33
+ CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreate(cg_nullable CGColorSpaceRef src, cg_nullable CGColorSpaceRef dst)
34
+ API_AVAILABLE(macos(10.12), ios(10.0));
35
+
36
+ /* CGColorConversionInfoCreateWithOptions allows to request a specifc behavior of color conversion
37
+ * which is consistent with CGContextDrawImageApplyingToneMapping when applying kCGToneMappingITURecommended.
38
+ * These options include: kCGUse100nitsHLGOOTF, kCGUseBT1886ForCoreVideoGamma, kCGSkipBoostToHDR
39
+ * and kCGUseLegacyHDREcosystem.
40
+ * See CGContext.h and CGToneMapping.h for more details.
41
+ */
42
+ CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateWithOptions(__nonnull CGColorSpaceRef src, __nonnull CGColorSpaceRef dst, CFDictionaryRef __nullable options)
43
+ API_AVAILABLE(macos(10.14.6), ios(13));
44
+
45
+ /* Create CGColorConversionInfoRef from a list of CG color spaces, transform types and rendering intents.
46
+ * ColorSpaces are iterated from first to last. The list of triples:
47
+ * {CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent} must be terminated with NULL
48
+ * Requirements: CG color spaces must be calibrated (no Device{Gray,RGB,CMYK}, Indexed or DeviceN are allowed).
49
+ */
50
+
51
+ CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateFromList
52
+ (CFDictionaryRef __nullable options, cg_nullable CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent, ...)
53
+ API_AVAILABLE(macos(10.12), ios(10.0));
54
+
55
+ CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateFromListWithArguments
56
+ (CFDictionaryRef __nullable options, cg_nullable CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent, va_list)
57
+ API_AVAILABLE(macos(10.13), ios(11.0));
58
+
59
+ /* CGColorConversionInfoCreateForToneMapping allows to request the specifc behavior of a color conversion
60
+ * which is consistent with CGContextDrawImageApplyingToneMapping.
61
+ * See CGContext.h and CGToneMapping.h for more details about CGToneMapping type and options.
62
+ * CGColorConversionInfoCreateWithOptions will return NULL when CGColorConversionInfoRef cannot be created or no conversion is required.
63
+ * Headroom values are ignored when kCGToneMappingITURecommended, kCGToneMappingEXRGamma or kCGToneMappingNone methods are used.
64
+ * The headroom value of 0.0f means that headroom is unknown and is implied by the respective color spaces (source headroom by source color space
65
+ * and target headroom by target color space).
66
+ * Otherwise headroom values must be equal or greater 1.0f to be considered valid.
67
+ * CGColorConversionInfoCreateForToneMapping requires that target headroom is smaller or equal source headroom to succeed, except when converting
68
+ * SDR to HDR.
69
+ * If CGColorConversionInfoRef cannot be created because of incorrect parameters and 'error' is a non-NULL pointer, a CFErrorRef will be returned
70
+ * with the description explaining the reason.
71
+ */
72
+
73
+ CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateForToneMapping(__nonnull CGColorSpaceRef source, float source_headroom, __nonnull CGColorSpaceRef target, float target_headroom, CGToneMapping method, CFDictionaryRef __nullable options, CFErrorRef* __nullable error) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
74
+
75
+ typedef struct {
76
+ uint32_t version; // current version = 0
77
+ CGBitmapInfo bitmapInfo; // see CGImage.h
78
+ size_t bitsPerComponent; // only 8, 10, 16 fixed, 16 bit float and 32 bit float are supported
79
+ size_t bitsPerPixel;
80
+ size_t bytesPerRow;
81
+ } CGColorBufferFormat;
82
+
83
+ /*
84
+ * CGColorConversionInfoConvertData will use CGColorConversionInfoRef 'info' to convert 'src_data' described by 'width' (in pixels),
85
+ * 'height' (in pixels) and 'src_format' to 'dst_data' of the same pixel size ('width', 'height') and 'dst_format'.
86
+ * CFDictionaryRef 'options' is reserved for future use.
87
+ * CGColorConversionInfoConvertData will return 'true' on success and 'false' on failure.
88
+ */
89
+
90
+ CG_EXTERN bool CGColorConversionInfoConvertData(__nonnull CGColorConversionInfoRef info, size_t width, size_t height, void* __nonnull dst_data, CGColorBufferFormat dst_format, const void* __nonnull src_data, CGColorBufferFormat src_format, CFDictionaryRef __nullable options) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
91
+
92
+ /* CFBooleanRef's which can be used as options to create CGColorConversionInfoRef */
93
+ CG_EXTERN const CFStringRef kCGColorConversionBlackPointCompensation API_AVAILABLE(macos(10.12), ios(10.0));
94
+
95
+ CG_EXTERN const CFStringRef kCGColorConversionTRCSize API_AVAILABLE(macos(10.13), ios(11.0));
96
+
97
+ CF_ASSUME_NONNULL_END
98
+
99
+ CF_IMPLICIT_BRIDGING_DISABLED
100
+
101
+ #endif /* CGCOLORCONVERSIONINFO_H_ */