peachsim 0.1.1738 → 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 (327) 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 +67 -16
  6. package/cli/commands/device.ts +3 -1
  7. package/cli/commands/doctor.ts +1 -4
  8. package/cli/commands/inspect/settling.ts +6 -1
  9. package/cli/commands/inspect/wait-ready.ts +22 -2
  10. package/cli/commands/package.ts +22 -20
  11. package/cli/commands/push.ts +56 -0
  12. package/cli/commands/serve.ts +9 -0
  13. package/cli/commands/shell-url.ts +37 -9
  14. package/cli/commands/swift.ts +1 -1
  15. package/cli/current-sim.ts +27 -0
  16. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  17. package/cli/drivers/linux-browser-libs.ts +8 -6
  18. package/cli/drivers/playwright.ts +5 -1
  19. package/cli/internal-child.ts +11 -1
  20. package/cli/main.ts +6 -0
  21. package/cli/native-input.ts +1 -7
  22. package/cli/outbound-endpoints.ts +9 -1
  23. package/cli/packaged-app-launcher.ts +3 -1
  24. package/cli/scene-video.ts +4 -0
  25. package/cli/ws-bridge.ts +3 -1
  26. package/detox/index.ts +9 -4
  27. package/dist-lib/agent-daemon-client.cjs +1 -1
  28. package/dist-lib/agent-events.cjs +1 -1
  29. package/dist-lib/attached-projects.cjs +1 -1
  30. package/dist-lib/auth/shared-session.cjs +1 -1
  31. package/dist-lib/backend-origin.cjs +1 -1
  32. package/dist-lib/beta.cjs +1 -1
  33. package/dist-lib/beta.mjs +1 -1
  34. package/dist-lib/bridge-constants.cjs +1 -1
  35. package/dist-lib/bridge-contract-input.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.mjs +1 -1
  37. package/dist-lib/bridge-contract.cjs +1 -1
  38. package/dist-lib/bridge-contract.mjs +1 -1
  39. package/dist-lib/bundle-channel.cjs +7372 -3675
  40. package/dist-lib/capture-contract.cjs +1 -1
  41. package/dist-lib/capture-contract.mjs +1 -1
  42. package/dist-lib/cloud-contract.cjs +1 -1
  43. package/dist-lib/cloud-contract.mjs +1 -1
  44. package/dist-lib/cloud-test-args.cjs +1 -1
  45. package/dist-lib/cloud-test-args.mjs +1 -1
  46. package/dist-lib/cloud.cjs +1 -1
  47. package/dist-lib/cloud.mjs +1 -1
  48. package/dist-lib/config.cjs +1 -1
  49. package/dist-lib/config.mjs +1 -1
  50. package/dist-lib/detox/index.cjs +22 -8
  51. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  52. package/dist-lib/expo-swift-bundle.cjs +6340 -3064
  53. package/dist-lib/expo-swift-metadata.cjs +14 -2
  54. package/dist-lib/expo-swift-metadata.mjs +14 -2
  55. package/dist-lib/home-paths.cjs +1 -1
  56. package/dist-lib/host/bridge-host.cjs +6524 -2720
  57. package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
  58. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  59. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  60. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  61. package/dist-lib/host/websocket-proxy.cjs +6 -3
  62. package/dist-lib/index.cjs +97 -31
  63. package/dist-lib/jump-to-source-babel.cjs +1 -1
  64. package/dist-lib/jump-to-source-native.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +1 -1
  72. package/dist-lib/metro.cjs +71 -29
  73. package/dist-lib/native-app-identity-project.cjs +53 -22
  74. package/dist-lib/native-app-identity-project.mjs +53 -22
  75. package/dist-lib/native-app-identity.cjs +10 -3
  76. package/dist-lib/native-app-identity.mjs +10 -3
  77. package/dist-lib/native-firebase-metadata.cjs +1 -1
  78. package/dist-lib/native-firebase-metadata.mjs +1 -1
  79. package/dist-lib/plist.cjs +1 -1
  80. package/dist-lib/plist.mjs +1 -1
  81. package/dist-lib/profiles.cjs +1 -1
  82. package/dist-lib/public-brand.cjs +1 -1
  83. package/dist-lib/public-origins-lib-esm.json +25 -23
  84. package/dist-lib/public-origins-lib.json +111 -79
  85. package/dist-lib/react-native-host-modules.cjs +1 -1
  86. package/dist-lib/react-native-host-modules.mjs +1 -1
  87. package/dist-lib/reap-browser.cjs +1 -1
  88. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  89. package/dist-lib/sdk.cjs +4 -1
  90. package/dist-lib/sdk.mjs +4 -1
  91. package/dist-lib/skills.cjs +40549 -37613
  92. package/dist-lib/swift-compile.cjs +2054 -388
  93. package/dist-lib/swift-compile.mjs +1976 -312
  94. package/dist-lib/swift-package.cjs +1 -1
  95. package/dist-lib/swift-package.mjs +1 -1
  96. package/dist-lib/swift-submit.cjs +2 -2
  97. package/dist-lib/swift-submit.mjs +2 -2
  98. package/dist-lib/swift-toolchain.cjs +68 -8
  99. package/dist-lib/swift.cjs +1 -1
  100. package/dist-lib/vite-swift.cjs +5867 -2646
  101. package/dist-lib/vite.cjs +18 -8
  102. package/dist-lib/worklet-executable.cjs +1 -1
  103. package/dist-lib/worklet-executable.mjs +1 -1
  104. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  105. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  107. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
  108. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
  109. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  111. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  112. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  113. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  115. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  116. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  117. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  118. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  119. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  124. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  127. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  128. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
  131. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  132. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  133. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  134. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  135. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  136. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  137. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  138. package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
  139. package/package.json +2 -1
  140. package/runtime-companion.json +1 -1
  141. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  142. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  143. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  144. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  145. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  146. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  147. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  148. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  149. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  150. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  151. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  152. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  153. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  154. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  155. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  158. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  159. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  182. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  183. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
  184. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
  185. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  186. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  188. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  189. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  190. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  191. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  192. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  193. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  194. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  195. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  196. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  197. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  198. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  199. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  200. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  201. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  218. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  219. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  220. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  221. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  222. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  223. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  224. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  225. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  226. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  227. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  228. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  229. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  230. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  231. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  232. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  233. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  234. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  238. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  239. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  240. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  241. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  242. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  243. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  244. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  245. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  246. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  247. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  248. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  249. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  250. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  251. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  252. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  253. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  254. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  255. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  258. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  259. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  260. package/sdk/ios/usr/include/module.modulemap +1 -0
  261. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  262. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  263. package/sdk/native-hashes.json +1 -1
  264. package/skills/contrast/SKILL.md +6 -5
  265. package/skills/peach-debug/SKILL.md +68 -264
  266. package/skills/peach-debug/references/accessibility.md +37 -73
  267. package/skills/peach-debug/references/commands.md +2 -2
  268. package/skills/peach-debug/references/events.md +74 -0
  269. package/skills/peach-perf/SKILL.md +64 -401
  270. package/skills/peach-perf/references/presentation.md +46 -0
  271. package/skills/peach-perf/references/profiling.md +93 -0
  272. package/skills/peach-perf/references/render-counters.md +57 -0
  273. package/skills/peach-setup/SKILL.md +66 -216
  274. package/skills/peach-setup/references/native-config.md +35 -0
  275. package/skills/peach-setup/references/reporting.md +28 -0
  276. package/skills/peach-test/SKILL.md +68 -284
  277. package/skills/peach-test/references/detox.md +69 -0
  278. package/skills/peach-test/references/maestro.md +95 -0
  279. package/skills/peach-visual/SKILL.md +53 -105
  280. package/src/appPackageContract.ts +12 -1
  281. package/src/assetCatalogContract.ts +8 -1
  282. package/src/bridge-contract.ts +6 -0
  283. package/src/bundle-channel.mjs +133 -59
  284. package/src/cli-runtime.ts +8 -9
  285. package/src/configured-bundle-producer.ts +10 -0
  286. package/src/device-catalog.ts +68 -4
  287. package/src/expo-discovery-cache.ts +3 -0
  288. package/src/expo-native-workspace.ts +81 -17
  289. package/src/expo-swift-host.ts +57 -104
  290. package/src/expo-widget-assets.ts +76 -0
  291. package/src/expoSwiftContract.ts +13 -1
  292. package/src/host/websocket-proxy.ts +7 -2
  293. package/src/native-prebuilt.ts +3 -3
  294. package/src/nitro-adapter.lock.json +263 -263
  295. package/src/nitro-adapter.ts +69 -7
  296. package/src/nitro-bundle.ts +52 -24
  297. package/src/nitro-compile.ts +6 -1
  298. package/src/nitro-source.ts +82 -4
  299. package/src/nitro-superset.lock.json +103 -0
  300. package/src/nitro-superset.ts +137 -0
  301. package/src/nitroContract.ts +5 -1
  302. package/src/react-bridge-importers.ts +1 -0
  303. package/src/settingsContract.ts +26 -1
  304. package/src/swift-compile.ts +267 -68
  305. package/src/swift-compiler-digest.ts +2 -0
  306. package/src/swift-coverage/xcode-packages.ts +61 -1
  307. package/src/swift-coverage/xcode.ts +10 -12
  308. package/src/swift-cxx-reachable.ts +1 -1
  309. package/src/swift-distribution.lock.json +15 -13
  310. package/src/swift-distribution.ts +57 -26
  311. package/src/swift-host.ts +48 -35
  312. package/src/swift-link-roots.ts +45 -18
  313. package/src/swift-objc-compile.ts +78 -2
  314. package/src/swift-objc-standin.ts +3 -0
  315. package/src/swift-shared-sdk.ts +85 -1
  316. package/src/swift-standins.ts +233 -11
  317. package/src/swift-submit.ts +13 -1
  318. package/src/swift-toolchain.ts +82 -7
  319. package/src/swift-wasm-prune.ts +1629 -0
  320. package/src/turbo-bundle.ts +11 -10
  321. package/src/turbo-runtime.lock.json +16 -16
  322. package/src/vite-plugin-one.ts +12 -1
  323. package/src/vite-plugin.ts +82 -23
  324. package/src/wasm-optimize.ts +34 -0
  325. package/src/worker-system-chunks.ts +3 -3
  326. package/src/xcode-project.ts +52 -0
  327. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,535 @@
1
+ /* CoreGraphics - CGPDFContext.h
2
+ Copyright (c) 2000-2011 Apple Inc.
3
+ All rights reserved. */
4
+
5
+ #ifndef CGPDFCONTEXT_H_
6
+ #define CGPDFCONTEXT_H_
7
+
8
+ #include <CoreFoundation/CFBase.h>
9
+ #include <CoreFoundation/CFAvailability.h>
10
+ #include <stdint.h>
11
+
12
+ #include <CoreGraphics/CGBase.h>
13
+ #include <CoreGraphics/CGContext.h>
14
+ #include <CoreGraphics/CGDataConsumer.h>
15
+ #include <CoreFoundation/CFDictionary.h>
16
+
17
+ // Forward Declarations
18
+ typedef struct CF_BRIDGED_TYPE(id) CGPDFMarkedContentItem *CGPDFMarkedContentItemRef;
19
+ typedef struct CF_BRIDGED_TYPE(id) CGPDFStructureElement *CGPDFStructureElementRef;
20
+
21
+ CF_IMPLICIT_BRIDGING_ENABLED
22
+
23
+ CF_ASSUME_NONNULL_BEGIN
24
+
25
+
26
+ /* Create a PDF context, using `consumer' for output. `mediaBox' is the
27
+ default page media bounding box; if NULL, then a default page size is
28
+ used. `auxiliaryInfo' specifies additional information used by the PDF
29
+ context when generating the PDF file. The keys and values in
30
+ `auxiliaryInfo' are described below. If `mediaBox' is non-NULL, then its
31
+ value overrides the value of `kCGPDFContextMediaBox' if specified in the
32
+ `auxiliaryInfo' dictionary. */
33
+
34
+ CG_EXTERN CGContextRef __nullable CGPDFContextCreate(CGDataConsumerRef cg_nullable consumer,
35
+ const CGRect *__nullable mediaBox, CFDictionaryRef __nullable auxiliaryInfo)
36
+ API_AVAILABLE(macos(10.0), ios(2.0));
37
+
38
+ /* Create a PDF context for writing to `url'. This function behaves in the
39
+ same manner as the above function, except that the output data will be
40
+ written to `url'. */
41
+
42
+ CG_EXTERN CGContextRef __nullable CGPDFContextCreateWithURL(CFURLRef cg_nullable url,
43
+ const CGRect * __nullable mediaBox, CFDictionaryRef __nullable auxiliaryInfo)
44
+ API_AVAILABLE(macos(10.0), ios(2.0));
45
+
46
+ /* Close a PDF context. After closing the context, all pending data is
47
+ written to the context's destination, and the PDF file is completed. No
48
+ additional data will be written to the context's destionation after
49
+ closing. */
50
+
51
+ CG_EXTERN void CGPDFContextClose(CGContextRef cg_nullable context)
52
+ API_AVAILABLE(macos(10.5), ios(2.0));
53
+
54
+ /* Begin a new page in the PDF context `context'. */
55
+
56
+ CG_EXTERN void CGPDFContextBeginPage(CGContextRef cg_nullable context,
57
+ CFDictionaryRef __nullable pageInfo) API_AVAILABLE(macos(10.4), ios(2.0));
58
+
59
+ /* End the current page in the PDF context `context'. */
60
+
61
+ CG_EXTERN void CGPDFContextEndPage(CGContextRef cg_nullable context)
62
+ API_AVAILABLE(macos(10.4), ios(2.0));
63
+
64
+ /* Add the metadata stream specified by `metadata' to the document catalog
65
+ of `context', as described in Table 3.25, "Entries in the catalog
66
+ dictionary", of the PDF 1.7 specification. The contents of metadata must
67
+ be XML formatted according to the Extensible Metadata Platform, as
68
+ described in section 10.2.2, "Metadata Streams", of the PDF 1.7
69
+ specification. */
70
+
71
+ CG_EXTERN void CGPDFContextAddDocumentMetadata(CGContextRef cg_nullable context,
72
+ CFDataRef __nullable metadata) API_AVAILABLE(macos(10.7), ios(4.0));
73
+
74
+ CG_EXTERN void CGPDFContextSetParentTree(CGContextRef cg_nullable context, CGPDFDictionaryRef parentTreeDictionary);
75
+
76
+ CG_EXTERN void CGPDFContextSetIDTree(CGContextRef cg_nullable context, CGPDFDictionaryRef IDTreeDictionary);
77
+
78
+ CG_EXTERN void CGPDFContextSetPageTagStructureTree(CGContextRef cg_nullable context, CFDictionaryRef pageTagStructureTreeDictionary);
79
+
80
+ /* Set the URL associated with `rect' to `url' in the PDF context
81
+ `context'. */
82
+
83
+ CG_EXTERN void CGPDFContextSetURLForRect(CGContextRef cg_nullable context, CFURLRef url,
84
+ CGRect rect) API_AVAILABLE(macos(10.4), ios(2.0));
85
+
86
+ /* Create a PDF destination named `name' at `point' in the current page of
87
+ the PDF context `context'. */
88
+
89
+ CG_EXTERN void CGPDFContextAddDestinationAtPoint(CGContextRef cg_nullable context,
90
+ CFStringRef name, CGPoint point) API_AVAILABLE(macos(10.4), ios(2.0));
91
+
92
+ /* Specify a destination named `name' to jump to when clicking in `rect' of
93
+ the current page of the PDF context `context'. */
94
+
95
+ CG_EXTERN void CGPDFContextSetDestinationForRect(CGContextRef cg_nullable context,
96
+ CFStringRef name, CGRect rect) API_AVAILABLE(macos(10.4), ios(2.0));
97
+
98
+ /*** Keys for the auxiliary info dictionary or the page info dictionary. ***/
99
+
100
+ /* The media box for the document or for a given page. Optional; if present,
101
+ the value of this key must be a CFData containing a CGRect (stored by
102
+ value, not by reference). */
103
+
104
+ CG_EXTERN const CFStringRef kCGPDFContextMediaBox
105
+ API_AVAILABLE(macos(10.4), ios(2.0));
106
+
107
+ /* The crop box for the document or for a given page. Optional; if present,
108
+ the value of this key must be a CFData containing a CGRect (stored by
109
+ value, not by reference). */
110
+
111
+ CG_EXTERN const CFStringRef kCGPDFContextCropBox API_AVAILABLE(macos(10.4), ios(2.0));
112
+
113
+ /* The bleed box for the document or for a given page. Optional; if present,
114
+ the value of this key must be a CFData containing a CGRect (stored by
115
+ value, not by reference). */
116
+
117
+ CG_EXTERN const CFStringRef kCGPDFContextBleedBox API_AVAILABLE(macos(10.4), ios(2.0));
118
+
119
+ /* The trim box for the document or for a given page. Optional; if present,
120
+ the value of this key must be a CFData containing a CGRect (stored by
121
+ value, not by reference). */
122
+
123
+ CG_EXTERN const CFStringRef kCGPDFContextTrimBox API_AVAILABLE(macos(10.4), ios(2.0));
124
+
125
+ /* The art box for the document or for a given page. Optional; if present,
126
+ the value of this key must be a CFData containing a CGRect (stored by
127
+ value, not by reference). */
128
+
129
+ CG_EXTERN const CFStringRef kCGPDFContextArtBox API_AVAILABLE(macos(10.4), ios(2.0));
130
+
131
+ /*** Keys for auxiliary info dictionary. ***/
132
+
133
+ /* The document's title. Optional; if present, the value of this key must be
134
+ a CFString. */
135
+
136
+ CG_EXTERN const CFStringRef kCGPDFContextTitle API_AVAILABLE(macos(10.4), ios(2.0));
137
+
138
+ /* The name of the person who created this document. Optional; if present,
139
+ the value of this key must be a CFString. */
140
+
141
+ CG_EXTERN const CFStringRef kCGPDFContextAuthor API_AVAILABLE(macos(10.4), ios(2.0));
142
+
143
+ /* The subject of a document. Optional; if present, the value of this key
144
+ must be a CFString. */
145
+
146
+ CG_EXTERN const CFStringRef kCGPDFContextSubject API_AVAILABLE(macos(10.5), ios(2.0));
147
+
148
+ /* The keywords for this document. This key is optional. If the value of
149
+ this key is a CFString, the /Keywords entry will be the specified string.
150
+ If the value of this key is a CFArray, then it must be an array of
151
+ CFStrings. The /Keywords entry will in this case be the concatenation of
152
+ the specified strings separated by commas (","). In addition, an entry
153
+ with the key "/AAPL:Keywords" will be stored in the document information
154
+ dictionary; its value is an array consisting of each of the specified
155
+ strings. The value of this key must be in one of the above forms;
156
+ otherwise, this key is ignored. */
157
+
158
+ CG_EXTERN const CFStringRef kCGPDFContextKeywords API_AVAILABLE(macos(10.5), ios(2.0));
159
+
160
+ /* The name of the application that created the original data used to create
161
+ this document. Optional; if present, the value of this key must be a
162
+ CFString. */
163
+
164
+ CG_EXTERN const CFStringRef kCGPDFContextCreator API_AVAILABLE(macos(10.4), ios(2.0));
165
+
166
+ /* The "owner password" of the PDF document. If this key is specified, the
167
+ document will be encrypted using the value as the owner password;
168
+ otherwise, the document will not be encrypted. The value of this key must
169
+ be a CFStringRef which can be represented in ASCII encoding; only the
170
+ first 32 bytes will be used for the password. There is no default value
171
+ for this key.
172
+
173
+ If the value of this key cannot be represented in ASCII, the document
174
+ will not be created and the creation function will return NULL. */
175
+
176
+ CG_EXTERN const CFStringRef kCGPDFContextOwnerPassword API_AVAILABLE(macos(10.4), ios(2.0));
177
+
178
+ /* The "user password" of the PDF document. If the document is encrypted,
179
+ then the value of this key will be the user password for the document; if
180
+ unspecified, the user password will be the empty string. The value of
181
+ this key must be a CFStringRef which can be represented in ASCII
182
+ encoding; only the first 32 bytes will be used for the password.
183
+
184
+ If the value of this key cannot be represented in ASCII, the document
185
+ will not be created and the creation function will return NULL. */
186
+
187
+ CG_EXTERN const CFStringRef kCGPDFContextUserPassword API_AVAILABLE(macos(10.4), ios(2.0));
188
+
189
+ /* Specifies the encryption key length in bits; see Table 3.18 "Entries
190
+ common to all encryption dictionaries", PDF Reference: Adobe PDF version
191
+ 1.5 (4th ed.) for more info. Optional; if present, the value of this key
192
+ must be a CFNumber with value which is a multiple of 8 between 40 and
193
+ 128, inclusive. If this key is absent or invalid, the encryption key
194
+ length defaults to 40 bits. */
195
+
196
+ CG_EXTERN const CFStringRef kCGPDFContextEncryptionKeyLength API_AVAILABLE(macos(10.5), ios(2.0));
197
+
198
+ /* Used to specify whether the document allows printing when unlocked with
199
+ the user password. The value of this key must be a CFBooleanRef. The
200
+ default value of this key is "kCFBooleanTrue". */
201
+
202
+ CG_EXTERN const CFStringRef kCGPDFContextAllowsPrinting API_AVAILABLE(macos(10.4), ios(2.0));
203
+
204
+ /* Used to specify whether the document allows copying when unlocked with
205
+ the user password. The value of this key must be a CFBooleanRef. The
206
+ default value of this key is "kCFBooleanTrue". */
207
+
208
+ CG_EXTERN const CFStringRef kCGPDFContextAllowsCopying API_AVAILABLE(macos(10.4), ios(2.0));
209
+
210
+ /* The document's PDF/X output intent. Optional; if present, the value of
211
+ this key must be a CFDictionaryRef. The dictionary is added to the
212
+ /OutputIntents entry in the PDF file's document catalog. The keys and
213
+ values contained in the dictionary must match those specified in section
214
+ 9.10.4 of the PDF 1.4 specification, ISO/DIS 15930-3 document published
215
+ by ISO/TC 130, and Adobe Technical Note #5413. */
216
+
217
+ CG_EXTERN const CFStringRef kCGPDFContextOutputIntent API_AVAILABLE(macos(10.4), ios(14.0));
218
+
219
+ /* The following keys are supported in the output intent dictionary:
220
+
221
+ kCGPDFXOutputIntentSubtype ("S"): The output intent subtype. This key is
222
+ required; the value of this key must be a CFString equal to "GTS_PDFX";
223
+ otherwise, the dictionary is ignored. */
224
+
225
+ CG_EXTERN const CFStringRef kCGPDFXOutputIntentSubtype API_AVAILABLE(macos(10.4), ios(14.0));
226
+
227
+ /* kCGPDFXOutputConditionIdentifier ("OutputConditionIdentifier"): A string
228
+ identifying the intended output device or production condition in a
229
+ human- or machine-readable form. This key is required; the value of this
230
+ key must be a CFString. For best results, the string should be
231
+ representable losslessly in ASCII encoding. */
232
+
233
+ CG_EXTERN const CFStringRef kCGPDFXOutputConditionIdentifier API_AVAILABLE(macos(10.4), ios(14.0));
234
+
235
+ /* kCGPDFXOutputCondition ("OutputCondition"): A text string identifying the
236
+ intended output device or production condition in a human-readable form.
237
+ This key is optional; if present, the value of this key must be a
238
+ CFString. */
239
+
240
+ CG_EXTERN const CFStringRef kCGPDFXOutputCondition API_AVAILABLE(macos(10.4), ios(14.0));
241
+
242
+ /* kCGPDFXRegistryName ("RegistryName"): A string identifying the registry
243
+ in which the condition designated by `kCGPDFXOutputConditionIdentifier'
244
+ is defined. This key is optional; if present, the value of this key must
245
+ be a CFString. For best results, the string should be representable
246
+ losslessly in ASCII encoding. */
247
+
248
+ CG_EXTERN const CFStringRef kCGPDFXRegistryName API_AVAILABLE(macos(10.4), ios(14.0));
249
+
250
+ /* kCGPDFXInfo ("Info"): A human-readable text string containing additional
251
+ information about the intended target device or production condition.
252
+ This key is required if the value of `kCGPDFXOutputConditionIdentifier'
253
+ does not specify a standard production condition; it is optional
254
+ otherwise. If present, the value of this key must be a CFString. */
255
+
256
+ CG_EXTERN const CFStringRef kCGPDFXInfo API_AVAILABLE(macos(10.4), ios(14.0));
257
+
258
+ /* kCGPDFXDestinationOutputProfile ("DestOutputProfile"): An ICC profile
259
+ stream defining the transformation from the PDF document's source colors
260
+ to output device colorants. This key is required if the value of
261
+ `kCGPDFXOutputConditionIdentifier' does not specify a standard production
262
+ condition; it is optional otherwise. If present, the value of this key
263
+ must be a ICC-based CGColorSpaceRef. */
264
+
265
+ CG_EXTERN const CFStringRef kCGPDFXDestinationOutputProfile API_AVAILABLE(macos(10.4), ios(14.0));
266
+
267
+ /* The document's output intents. Optional; if present, the value must be a
268
+ CFArrayRef containing one or more CFDictionaryRefs. The array is added to
269
+ the PDF document in the /OutputIntents entry in the PDF file's document
270
+ catalog. Each dictionary in the array must be of form specified above for
271
+ the `kCGPDFContextOutputIntent' key, except that only the first
272
+ dictionary in the array may contain the `kCGPDFXOutputIntentSubtype'
273
+ ("S") key with a value of "GTS_PDFX". If both `kCGPDFContextOutputIntent'
274
+ and `kCGPDFContextOutputIntents' keys are specified, the former is
275
+ ignored. */
276
+
277
+ CG_EXTERN const CFStringRef kCGPDFContextOutputIntents API_AVAILABLE(macos(10.4), ios(14.0));
278
+
279
+ /* The document's access permissions, expressed as a CFNumber. The number is
280
+ defined by ORing together the desired CGPDFAccessPermissions values. */
281
+
282
+ CG_EXTERN const CFStringRef kCGPDFContextAccessPermissions API_AVAILABLE(macos(10.13), ios(11.0));
283
+
284
+ /* Set the outline in the PDF created by a CGPDFContext (no effect in other types of CGContexts). */
285
+
286
+ CG_EXTERN void CGPDFContextSetOutline(CGContextRef context, __nullable CFDictionaryRef outline)
287
+ API_AVAILABLE(macos(10.13), ios(11.0));
288
+
289
+ /* Output a linearized PDF */
290
+
291
+ CG_EXTERN const CFStringRef kCGPDFContextCreateLinearizedPDF
292
+ API_AVAILABLE(macos(11.0), ios(14.0));
293
+
294
+ /* Output a PDF that conforms to PDF/A-2u (ISO 19005-2). The value of this key
295
+ must be a CFBooleanRef. The default value of this key is "kCFBooleanFalse". */
296
+
297
+ CG_EXTERN const CFStringRef kCGPDFContextCreatePDFA API_AVAILABLE(macos(11.0), ios(14.0));
298
+
299
+ /* Tagged PDF Authoring */
300
+
301
+ /* Tagged PDF Authoring is based on the Marked Content and Tagged PDF features defined
302
+ in the Adobe Portable Document Format Version 1.7 November 2006. Link:
303
+ http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
304
+
305
+ These features are described in Chapter 10, "Document Interchange", starting on page 841.
306
+
307
+ - Marked-content operators (Section 10.5) identify portions of a content streams with
308
+ additional properties, typically a tagged structure declaring accessibility information.
309
+
310
+ - Logical structure facilities (Section 10.6) declares a hierarchical organization of the
311
+ tags used by marked-content operators. This reflects the logical structure that tags
312
+ should be read by an application presenting a PDF document.
313
+
314
+ - Tagged PDF (Section 10.7) defines the properties of tags, and focuses on the accessibility
315
+ features they provide. */
316
+
317
+ /* Most CGPDFTagType values reflect official "Role Types" defined in the Adobe Portable
318
+ Document Format Version 1.7 November 2006. The enums below are defined between pages
319
+ 899 to 912. Values at 900 and above are non-structural marked content tags (see
320
+ CGPDFTagTypeArtifact); they are not role types and must not be used with structure
321
+ tree APIs. */
322
+ typedef CF_ENUM (int32_t, CGPDFTagType) {
323
+
324
+ /* Page 899 - 901, TABLE 10.20 Standard structure types for grouping elements */
325
+ CGPDFTagTypeDocument = 100,
326
+ CGPDFTagTypePart,
327
+ CGPDFTagTypeArt,
328
+ CGPDFTagTypeSection,
329
+ CGPDFTagTypeDiv,
330
+ CGPDFTagTypeBlockQuote,
331
+ CGPDFTagTypeCaption,
332
+ CGPDFTagTypeTOC,
333
+ CGPDFTagTypeTOCI,
334
+ CGPDFTagTypeIndex,
335
+ CGPDFTagTypeNonStructure,
336
+ CGPDFTagTypePrivate,
337
+
338
+ /* Page 901, TABLE 10.21 Block-level structure elements. Long form descriptions on page 902 - 903 */
339
+
340
+ /* Paragraph like elements */
341
+ CGPDFTagTypeParagraph = 200,
342
+ CGPDFTagTypeHeader,
343
+ CGPDFTagTypeHeader1,
344
+ CGPDFTagTypeHeader2,
345
+ CGPDFTagTypeHeader3,
346
+ CGPDFTagTypeHeader4,
347
+ CGPDFTagTypeHeader5,
348
+ CGPDFTagTypeHeader6,
349
+
350
+ /* List elements */
351
+ CGPDFTagTypeList = 300,
352
+ CGPDFTagTypeListItem,
353
+ CGPDFTagTypeLabel,
354
+ CGPDFTagTypeListBody,
355
+
356
+ /* Table element */
357
+ CGPDFTagTypeTable = 400,
358
+ CGPDFTagTypeTableRow,
359
+ CGPDFTagTypeTableHeaderCell,
360
+ CGPDFTagTypeTableDataCell,
361
+ CGPDFTagTypeTableHeader,
362
+ CGPDFTagTypeTableBody,
363
+ CGPDFTagTypeTableFooter,
364
+
365
+ /* Page 905, TABLE 10.25 Standard structure types for inline-level structure elements */
366
+ CGPDFTagTypeSpan = 500,
367
+ CGPDFTagTypeQuote,
368
+ CGPDFTagTypeNote,
369
+ CGPDFTagTypeReference,
370
+ CGPDFTagTypeBibliography,
371
+ CGPDFTagTypeCode,
372
+ CGPDFTagTypeLink,
373
+ CGPDFTagTypeAnnotation,
374
+
375
+ /* Page 911, TABLE 10.26 Standard structure types for Ruby and Warichu elements (PDF 1.5) */
376
+ CGPDFTagTypeRuby = 600,
377
+ CGPDFTagTypeRubyBaseText,
378
+ CGPDFTagTypeRubyAnnotationText,
379
+ CGPDFTagTypeRubyPunctuation,
380
+ CGPDFTagTypeWarichu,
381
+ CGPDFTagTypeWarichuText,
382
+ CGPDFTagTypeWarichuPunctiation,
383
+
384
+ /* Page 912, TABLE 10.27 Standard structure types for illustration elements */
385
+ CGPDFTagTypeFigure = 700,
386
+ CGPDFTagTypeFormula,
387
+ CGPDFTagTypeForm,
388
+
389
+ /* Page , TABLE 10.12 Type for object reference*/
390
+ CGPDFTagTypeObject = 800,
391
+
392
+ /* 10.7.1, Real Content and Artifacts
393
+ Non-structural marked content tag. Only valid with
394
+ CGPDFContextBeginNonStructuralMarkedContentSequence(). Tags content (page numbers,
395
+ headers/footers, watermarks, cut marks) that should be excluded from reading order,
396
+ reflow, text extraction, and search. */
397
+ CGPDFTagTypeArtifact API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0)) API_UNAVAILABLE(watchos, tvos) = 900
398
+
399
+ } API_AVAILABLE(macos(10.15), ios(13.0));
400
+
401
+ /* For a given CGPDFTagType, return a C-string matching the PDF name used in the
402
+ content stream. For structure types these match section 10.7.3: Standard Structure
403
+ Types (pages 899 - 912). For non-structural tags the returned name matches the
404
+ corresponding marked content tag (e.g. "/Artifact"). Returns NULL for an unknown value. */
405
+ CG_EXTERN const char* cg_nullable CGPDFTagTypeGetName(CGPDFTagType tagType) API_AVAILABLE(macos(10.15), ios(13.0));
406
+
407
+ #pragma mark --- Legacy Tagged PDF Authoring ---
408
+
409
+ /* The following CGPDFTagProperty keys are to be paired with CFStringRef values in
410
+ CGPDFContextBeginTag(...)'s optional tagProperties dictionary. These key-value pairs
411
+ encode accessibility information for the defined tag. */
412
+
413
+ typedef CFStringRef CGPDFTagProperty CF_TYPED_ENUM;
414
+
415
+ /* Actual text, defined on page 860:
416
+ "Text that is an exact replacement for the structure element and its children..."
417
+ "...useful when extracting the document’s contents in support of accessibility..."
418
+ This can be used to more precisely control what string is extracted by a user when
419
+ they copy and paste from a document. */
420
+ CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyActualText API_AVAILABLE(macos(10.15), ios(13.0));
421
+
422
+ /* Alternative text, defined on page 860:
423
+ "An alternate description of the structure element and its children in human-readable form".
424
+ This is typically used for graphical content, like an image. */
425
+ CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyAlternativeText API_AVAILABLE(macos(10.15), ios(13.0));
426
+
427
+ /* Title, defined on page 859:
428
+ Title of the node in a human-readable form. This should *not* be used for accessibility,
429
+ but can be useful when presenting the structure of a tagged node tree. */
430
+ CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyTitleText API_AVAILABLE(macos(10.15), ios(13.0));
431
+
432
+ /* Language of text content, defined on page 860:
433
+ Typically you should use the document's catalog to get its language, but if a section
434
+ of text is not the same language as the document, this may be set and allow you to
435
+ look at what language it is hinting at. */
436
+ CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyLanguageText API_AVAILABLE(macos(10.15), ios(13.0));
437
+
438
+ /* General usage of CGPDFContextBeginTag(...) and CGPDFContextEndTag(...):
439
+
440
+ - Create a CG PDF context using CGPDFContextCreate(...).
441
+ - Begin and end pages as you normally would, through CGPDFContextBeginPage(...), CGPDFContextEndPage(...).
442
+ - When drawing content for a page, you may tag any series of draw commands with balanced series of push / pops,
443
+ which will mark your content with the given tag type and optional tag properties.
444
+
445
+ - Pushing a tag saves the current tag to a tag-stack, assigning the given tag as the "current tag".
446
+ - Popping removes the top-most element of the tag-stack. The remaining top-most element becomes the "current tag".
447
+ - Any pushed tag is a child of the "current tag". This allows you to push children to parent-tags, and to build
448
+ a tag structure tree.
449
+
450
+ - When saving the context to a file, the file will be authored with marked content sequences in the page's content-
451
+ stream, as well as the implicitly built tagged structure there. */
452
+
453
+ /* Sets the current tag to the given tagType with an associated tagProperties dictionary. The previous tag will be pushed
454
+ to a tag-stack. The previous tag can be restored through CGPDFContextEndTag(...). This new tag will record any future
455
+ drawing commands to the given context as part of itself, unless another tag is pushed or the tag is popped. When the
456
+ PDF context is serialized to a PDF file, these tags will create marked content sequences around the associated draw commands
457
+ around the page's content stream. Note that tagProperties is an optional dictionary that allows you to specificy additional
458
+ properties of the marked content: content may want to re-declare how text should be extracted, any alt text for figures,
459
+ or explicitly declare what language the text is in. All child-tags (tags pushed on top of other tags) will inherit their
460
+ parent tag's properties. */
461
+ CG_EXTERN void CGPDFContextBeginTag(CGContextRef _Nonnull context, CGPDFTagType tagType, CFDictionaryRef cg_nullable tagProperties)
462
+ API_AVAILABLE(macos(10.15), ios(13.0));
463
+
464
+ /* Pop the current tag. Sets the current tag to the previous tag on the tag-stack. If there was no previous tag, then the
465
+ current tag will be set to the root document tag (of type CGPDFTagTypeDocument). */
466
+ CG_EXTERN void CGPDFContextEndTag(CGContextRef _Nonnull context) API_AVAILABLE(macos(10.15), ios(13.0));
467
+
468
+ #pragma mark --- New Tagged PDF Authoring ---
469
+
470
+ /* Begin a structural marked content sequence of the given tag type.
471
+ The tag type must be a structure type (e.g. CGPDFTagTypeParagraph, CGPDFTagTypeSpan).
472
+ For content that should be excluded from the structure tree (artifacts, etc.),
473
+ use `CGPDFContextBeginNonStructuralMarkedContentSequence' instead.
474
+
475
+ Returns NULL if a structural sequence is already open. Otherwise, returns a new
476
+ marked content item. You are responsible for releasing this object using CFRelease.
477
+ The returned item can be added to the logical structure tree using
478
+ `CGPDFStructureElementAddMarkedContentItem'. */
479
+
480
+ CG_EXTERN CF_RETURNS_RETAINED CGPDFMarkedContentItemRef _Nullable CGPDFContextBeginMarkedContentSequence(CGContextRef context, CGPDFTagType tagType)
481
+ CF_SWIFT_NAME(CGContext.beginMarkedContentSequence(self:_:))
482
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
483
+ API_UNAVAILABLE(watchos, tvos);
484
+
485
+ /* Begin a non-structural marked content sequence with the given tag type. The tagged
486
+ content is NOT added to the structure tree; this is for content that should be labeled
487
+ in the content stream but excluded from logical structure (e.g. artifacts such as page
488
+ numbers, headers, watermarks).
489
+
490
+ Valid tag types: CGPDFTagTypeArtifact. Do NOT pass CGPDFTagTypeNonStructure — that is
491
+ a *structure tree grouping element* (/NonStruct), not a non-structural marked content tag.
492
+ The two sound similar but are unrelated PDF concepts; passing a structure type here will
493
+ produce a malformed PDF. */
494
+
495
+ CG_EXTERN void CGPDFContextBeginNonStructuralMarkedContentSequence(CGContextRef context, CGPDFTagType tagType)
496
+ CF_SWIFT_NAME(CGContext.beginNonStructuralMarkedContentSequence(self:_:))
497
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
498
+ API_UNAVAILABLE(watchos, tvos);
499
+
500
+ /* End a marked content sequence (structural or non-structural). */
501
+
502
+ CG_EXTERN void CGPDFContextEndMarkedContentSequence(CGContextRef context)
503
+ CF_SWIFT_NAME(CGContext.endMarkedContentSequence(self:))
504
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
505
+ API_UNAVAILABLE(watchos, tvos);
506
+
507
+ /* Begin an object reference. Exactly one object should be drawn before the End.
508
+ The returned CGPDFMarkedContentItemRef object must be added to a single
509
+ CGPDFStructureElementRef object. */
510
+
511
+ CG_EXTERN CF_RETURNS_RETAINED CGPDFMarkedContentItemRef _Nullable CGPDFContextBeginObjectReference(CGContextRef context)
512
+ CF_SWIFT_NAME(CGContext.beginObjectReference(self:))
513
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
514
+ API_UNAVAILABLE(watchos, tvos);
515
+
516
+ /* End an object reference. Exactly one object should be drawn before this is called. */
517
+
518
+ CG_EXTERN void CGPDFContextEndObjectReference(CGContextRef context)
519
+ CF_SWIFT_NAME(CGContext.endObjectReference(self:))
520
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
521
+ API_UNAVAILABLE(watchos, tvos);
522
+
523
+ /* Add a CGPDFStructureElementRef object to the document structure tree root. */
524
+
525
+ CG_EXTERN OSStatus CGPDFContextAddStructureTreeRootChild(CGContextRef context, CGPDFStructureElementRef structureElement)
526
+ CF_SWIFT_NAME(CGContext.addStructureTreeRootChild(self:_:))
527
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
528
+ API_UNAVAILABLE(watchos, tvos);
529
+
530
+
531
+ CF_ASSUME_NONNULL_END
532
+
533
+ CF_IMPLICIT_BRIDGING_DISABLED
534
+
535
+ #endif /* CGPDFCONTEXT_H_ */
@@ -0,0 +1,133 @@
1
+ /* CoreGraphics - CGPDFDictionary.h
2
+ * Copyright (c) 2002-2008 Apple Inc.
3
+ * All rights reserved. */
4
+
5
+ #ifndef CGPDFDICTIONARY_H_
6
+ #define CGPDFDICTIONARY_H_
7
+
8
+ #include <CoreFoundation/CFBase.h>
9
+ #include <CoreFoundation/CFAvailability.h>
10
+ #include <stdint.h>
11
+
12
+ typedef struct CGPDFDictionary *CGPDFDictionaryRef __attribute__((swift_wrapper(struct)));
13
+
14
+ #include <CoreGraphics/CGPDFArray.h>
15
+ #include <CoreGraphics/CGPDFObject.h>
16
+ #include <CoreGraphics/CGPDFStream.h>
17
+ #include <CoreGraphics/CGPDFString.h>
18
+
19
+ CF_IMPLICIT_BRIDGING_ENABLED
20
+
21
+ CF_ASSUME_NONNULL_BEGIN
22
+
23
+ /* Return the number of entries in `dictionary'. */
24
+
25
+ CG_EXTERN size_t CGPDFDictionaryGetCount(CGPDFDictionaryRef cg_nullable dict)
26
+ API_AVAILABLE(macos(10.3), ios(2.0));
27
+
28
+ /* Look up the object associated with `key' in `dict' and return the result
29
+ in `value'. Return true on success; false otherwise. */
30
+
31
+ CG_EXTERN bool CGPDFDictionaryGetObject(CGPDFDictionaryRef cg_nullable dict,
32
+ const char * key, CGPDFObjectRef __nullable * __nullable value)
33
+ API_AVAILABLE(macos(10.3), ios(2.0));
34
+
35
+ /* Look up the object associated with `key' in `dict' and, if it's a
36
+ boolean, return the result in `value'. Return true on success; false
37
+ otherwise. */
38
+
39
+ CG_EXTERN bool CGPDFDictionaryGetBoolean(CGPDFDictionaryRef cg_nullable dict,
40
+ const char * key, CGPDFBoolean * __nullable value)
41
+ API_AVAILABLE(macos(10.3), ios(2.0));
42
+
43
+ /* Look up the object associated with `key' in `dict' and, if it's an
44
+ integer, return the result in `value'. Return true on success; false
45
+ otherwise. */
46
+
47
+ CG_EXTERN bool CGPDFDictionaryGetInteger(CGPDFDictionaryRef cg_nullable dict,
48
+ const char * key, CGPDFInteger * __nullable value)
49
+ API_AVAILABLE(macos(10.3), ios(2.0));
50
+
51
+ /* Look up the object associated with `key' in `dict' and, if it's a number
52
+ (real or integer), return the result in `value'. Return true on success;
53
+ false otherwise. */
54
+
55
+ CG_EXTERN bool CGPDFDictionaryGetNumber(CGPDFDictionaryRef cg_nullable dict,
56
+ const char * key, CGPDFReal * __nullable value)
57
+ API_AVAILABLE(macos(10.3), ios(2.0));
58
+
59
+ /* Look up the object associated with `key' in `dict' and, if it's a name,
60
+ return the result in `value'. Return true on success; false otherwise. */
61
+
62
+ CG_EXTERN bool CGPDFDictionaryGetName(CGPDFDictionaryRef cg_nullable dict,
63
+ const char * key, const char * __nullable * __nullable value)
64
+ API_AVAILABLE(macos(10.3), ios(2.0));
65
+
66
+ /* Look up the object associated with `key' in `dict' and, if it's a string,
67
+ return the result in `value'. Return true on success; false otherwise. */
68
+
69
+ CG_EXTERN bool CGPDFDictionaryGetString(CGPDFDictionaryRef cg_nullable dict,
70
+ const char * key, CGPDFStringRef __nullable * __nullable value)
71
+ API_AVAILABLE(macos(10.3), ios(2.0));
72
+
73
+ /* Look up the object associated with `key' in `dict' and, if it's an array,
74
+ return the result in `value'. Return true on success; false otherwise. */
75
+
76
+ CG_EXTERN bool CGPDFDictionaryGetArray(CGPDFDictionaryRef cg_nullable dict,
77
+ const char * key, CGPDFArrayRef __nullable * __nullable value)
78
+ API_AVAILABLE(macos(10.3), ios(2.0));
79
+
80
+ /* Look up the object associated with `key' in `dict' and, if it's a
81
+ dictionary, return the result in `value'. Return true on success; false
82
+ otherwise. */
83
+
84
+ CG_EXTERN bool CGPDFDictionaryGetDictionary(CGPDFDictionaryRef cg_nullable dict,
85
+ const char * key, CGPDFDictionaryRef __nullable * __nullable value)
86
+ API_AVAILABLE(macos(10.3), ios(2.0));
87
+
88
+ /* Look up the object associated with `key' in `dict' and, if it's a stream,
89
+ return the result in `value'. Return true on success; false otherwise. */
90
+
91
+ CG_EXTERN bool CGPDFDictionaryGetStream(CGPDFDictionaryRef cg_nullable dict,
92
+ const char * key, CGPDFStreamRef __nullable * __nullable value)
93
+ API_AVAILABLE(macos(10.3), ios(2.0));
94
+
95
+ /* The callback for `CGPDFDictionaryApplyFunction'. `key' is the current
96
+ key, `value' is the value for `key', and `info' is the parameter passed
97
+ to `CGPDFDictionaryApplyFunction'. */
98
+
99
+ typedef void (*CGPDFDictionaryApplierFunction)(const char * key,
100
+ CGPDFObjectRef value, void * __nullable info);
101
+
102
+ /* Enumerate all of the keys in `dict', calling `function' once for each
103
+ key/value pair. Passes the current key, the associated value, and `info'
104
+ to `function'. */
105
+
106
+ CG_EXTERN void CGPDFDictionaryApplyFunction(CGPDFDictionaryRef cg_nullable dict,
107
+ CGPDFDictionaryApplierFunction cg_nullable function, void * __nullable info)
108
+ API_AVAILABLE(macos(10.3), ios(2.0));
109
+
110
+ /* The block function for `CGPDFDictionaryApplyBlock'. `key' is the current
111
+ key, `value' is the value for `key', and `info' is the parameter passed
112
+ to `CGPDFDictionaryApplyBlock'. If the block returns true, the iteration
113
+ of the dictionary will continue, otherwise if the block returns false,
114
+ the iterator will stop and return early. */
115
+
116
+ typedef bool (^CGPDFDictionaryApplierBlock)(const char * key,
117
+ CGPDFObjectRef value, void * __nullable info);
118
+
119
+ /* Enumerate all of the keys in `dict', calling the block-function `block' once
120
+ for each key/value pair. Passes the current key, the associated value, and
121
+ `info' to `block'. If `block' returns true, iteration will continue over all
122
+ key/value pairs. If `block' returns false, iteration will stop and return
123
+ early. */
124
+
125
+ CG_EXTERN void CGPDFDictionaryApplyBlock(CGPDFDictionaryRef cg_nullable dict,
126
+ CF_NOESCAPE CGPDFDictionaryApplierBlock cg_nullable block, void * __nullable info)
127
+ API_AVAILABLE(macos(10.14), ios(12.0));
128
+
129
+ CF_ASSUME_NONNULL_END
130
+
131
+ CF_IMPLICIT_BRIDGING_DISABLED
132
+
133
+ #endif /* CGPDFDICTIONARY_H_ */