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.
- package/README.md +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +67 -16
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +22 -20
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +37 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +4 -0
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +9 -4
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +7372 -3675
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +22 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6340 -3064
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +6524 -2720
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +6 -3
- package/dist-lib/index.cjs +97 -31
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +71 -29
- package/dist-lib/native-app-identity-project.cjs +53 -22
- package/dist-lib/native-app-identity-project.mjs +53 -22
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +111 -79
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +40549 -37613
- package/dist-lib/swift-compile.cjs +2054 -388
- package/dist-lib/swift-compile.mjs +1976 -312
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +68 -8
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +5867 -2646
- package/dist-lib/vite.cjs +18 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/native-hashes.json +1 -1
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -264
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -401
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -216
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -284
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -105
- package/src/appPackageContract.ts +12 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +133 -59
- package/src/cli-runtime.ts +8 -9
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +3 -0
- package/src/expo-native-workspace.ts +81 -17
- package/src/expo-swift-host.ts +57 -104
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoSwiftContract.ts +13 -1
- package/src/host/websocket-proxy.ts +7 -2
- package/src/native-prebuilt.ts +3 -3
- package/src/nitro-adapter.lock.json +263 -263
- package/src/nitro-adapter.ts +69 -7
- package/src/nitro-bundle.ts +52 -24
- package/src/nitro-compile.ts +6 -1
- package/src/nitro-source.ts +82 -4
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroContract.ts +5 -1
- package/src/react-bridge-importers.ts +1 -0
- package/src/settingsContract.ts +26 -1
- package/src/swift-compile.ts +267 -68
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +10 -12
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +15 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +48 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standins.ts +233 -11
- package/src/swift-submit.ts +13 -1
- package/src/swift-toolchain.ts +82 -7
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +11 -10
- package/src/turbo-runtime.lock.json +16 -16
- package/src/vite-plugin-one.ts +12 -1
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFDocument.h
|
|
2
|
+
Copyright (c) 2000-2011 Apple Inc.
|
|
3
|
+
All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFDOCUMENT_H_
|
|
6
|
+
#define CGPDFDOCUMENT_H_
|
|
7
|
+
|
|
8
|
+
#include <CoreFoundation/CFBase.h>
|
|
9
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
10
|
+
#include <stdint.h>
|
|
11
|
+
|
|
12
|
+
typedef struct CF_BRIDGED_TYPE(id) CGPDFDocument *CGPDFDocumentRef;
|
|
13
|
+
|
|
14
|
+
#include <CoreGraphics/CGDataProvider.h>
|
|
15
|
+
#include <CoreGraphics/CGGeometry.h>
|
|
16
|
+
#include <CoreGraphics/CGPDFPage.h>
|
|
17
|
+
#include <CoreFoundation/CFURL.h>
|
|
18
|
+
|
|
19
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
20
|
+
|
|
21
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
22
|
+
|
|
23
|
+
// To get access permissions from a CGPDFDocument, call CGPDFDocumentGetAccessPermissions. Setting permissions
|
|
24
|
+
// can only be done using the kCGPDFContextAccessPermissions property in the auxiliary info dictionary passed
|
|
25
|
+
// in to CGPDFContextCreate.
|
|
26
|
+
//
|
|
27
|
+
// Some PDF access permissions are non-strict supersets of other permissions. Granting access to a superset
|
|
28
|
+
// permission also grants access to permission(s) it is a superset of. These permissions are as follows:
|
|
29
|
+
//
|
|
30
|
+
// * Granting kCGPDFAllowsHighQualityPrinting also grants kCGPDFAllowsLowQualityPrinting
|
|
31
|
+
// * Granting kCGPDFAllowsDocumentChanges also grants kCGPDFAllowsCommenting and kCGPDFAllowsFormFieldEntry
|
|
32
|
+
// * Granting kCGPDFAllowsContentCopying also grants kCGPDFAllowsContentAccessibility
|
|
33
|
+
// * Granting kCGPDFAllowsCommenting also grants kCGPDFAllowsFormFieldEntry
|
|
34
|
+
//
|
|
35
|
+
// These relationships don't come from the PDF spec. There is nothing in the spec that says you always get
|
|
36
|
+
// low-quality printing if you've already got high-quality printing. They are just two different bits with
|
|
37
|
+
// no explicit dependencies. However, in practice, the software that most people use to edit PDF permissions
|
|
38
|
+
// only allows creation of PDFs that follow these conventions.
|
|
39
|
+
//
|
|
40
|
+
// In the interest of consistency with how these bits are used in practice, kCGPDFContextAccessPermissions
|
|
41
|
+
// enforces the superset model of PDF permissions. For example, if you try to grant high-quality printing but
|
|
42
|
+
// not low-quality printing, the low-quality bit will get turned on anyway. This does not apply to how permissions
|
|
43
|
+
// are read, however. It's very likely that there exist PDFs that don't follow these conventions. For that reason,
|
|
44
|
+
// when checking permissions, always check for the narrowest one that applies. For example, if you're interested
|
|
45
|
+
// in form field entry, always test for kCGPDFAllowsFormFieldEntry specifically. You can't assume that you have it
|
|
46
|
+
// just because you also have kCGPDFAllowsCommenting or kCGPDFAllowsDocumentChanges.
|
|
47
|
+
|
|
48
|
+
typedef CF_OPTIONS(uint32_t, CGPDFAccessPermissions) {
|
|
49
|
+
kCGPDFAllowsLowQualityPrinting = (1 << 0), // Print at up to 150 DPI
|
|
50
|
+
kCGPDFAllowsHighQualityPrinting = (1 << 1), // Print at any DPI
|
|
51
|
+
kCGPDFAllowsDocumentChanges = (1 << 2), // Modify the document contents except for page management
|
|
52
|
+
kCGPDFAllowsDocumentAssembly = (1 << 3), // Page management: insert, delete, and rotate pages
|
|
53
|
+
kCGPDFAllowsContentCopying = (1 << 4), // Extract content (text, images, etc.)
|
|
54
|
+
kCGPDFAllowsContentAccessibility = (1 << 5), // Extract content, but only for the purpose of accessibility
|
|
55
|
+
kCGPDFAllowsCommenting = (1 << 6), // Create or modify annotations, including form field entries
|
|
56
|
+
kCGPDFAllowsFormFieldEntry = (1 << 7) // Modify form field entries
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/* CFDictionary keys for use with CGPDFDocumentGetOutline and CGPDFContextSetOutline. */
|
|
60
|
+
|
|
61
|
+
// Outlines don't contain a single root node, however we have to represent outlines as trees with a single root.
|
|
62
|
+
// The root CFDictionary will only have one key (kCGPDFOutlineChildren), and it is not considered part of the
|
|
63
|
+
// outline itself. All CFDictionaries below the root must have at least two keys: kCGPDFOutlineTitle and
|
|
64
|
+
// kCGPDFOutlineDestination. If they have any children, they must have kCGPDFOutlineChildren as well. Finally,
|
|
65
|
+
// kCGPDFOutlineDestinationRect can optionally be present to associate an area of the destination page.
|
|
66
|
+
|
|
67
|
+
/* Key: kCGPDFOutlineTitle */
|
|
68
|
+
/* Value: CFString */
|
|
69
|
+
CG_EXTERN const CFStringRef kCGPDFOutlineTitle
|
|
70
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
71
|
+
|
|
72
|
+
/* Key: kCGPDFOutlineChildren */
|
|
73
|
+
/* Value: CFArray of CFDictionaries */
|
|
74
|
+
CG_EXTERN const CFStringRef kCGPDFOutlineChildren
|
|
75
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
76
|
+
|
|
77
|
+
/* Key: kCGPDFOutlineDestination */
|
|
78
|
+
/* Value: CFNumber (for a one-indexed page number) or CFURL */
|
|
79
|
+
CG_EXTERN const CFStringRef kCGPDFOutlineDestination
|
|
80
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
81
|
+
|
|
82
|
+
/* Key: kCGPDFOutlineDestinationRect */
|
|
83
|
+
/* Value: CFDictionary from CGRectCreateDictionaryRepresentation. Only valid when the destination is a page number. */
|
|
84
|
+
CG_EXTERN const CFStringRef kCGPDFOutlineDestinationRect
|
|
85
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
86
|
+
|
|
87
|
+
/* Create a PDF document, using `provider' to obtain the document's data. */
|
|
88
|
+
|
|
89
|
+
CG_EXTERN CGPDFDocumentRef __nullable CGPDFDocumentCreateWithProvider(
|
|
90
|
+
CGDataProviderRef cg_nullable provider)
|
|
91
|
+
API_AVAILABLE(macos(10.0), ios(2.0));
|
|
92
|
+
|
|
93
|
+
/* Create a PDF document from `url'. */
|
|
94
|
+
|
|
95
|
+
CG_EXTERN CGPDFDocumentRef __nullable CGPDFDocumentCreateWithURL(
|
|
96
|
+
CFURLRef cg_nullable url)
|
|
97
|
+
API_AVAILABLE(macos(10.0), ios(2.0));
|
|
98
|
+
|
|
99
|
+
/* Equivalent to `CFRetain(document)', except it doesn't crash (as CFRetain
|
|
100
|
+
does) if `document' is NULL. */
|
|
101
|
+
|
|
102
|
+
CG_EXTERN CGPDFDocumentRef cg_nullable CGPDFDocumentRetain(
|
|
103
|
+
CGPDFDocumentRef cg_nullable document)
|
|
104
|
+
API_AVAILABLE(macos(10.0), ios(2.0));
|
|
105
|
+
|
|
106
|
+
/* Equivalent to `CFRelease(document)', except it doesn't crash (as
|
|
107
|
+
CFRelease does) if `document' is NULL. */
|
|
108
|
+
|
|
109
|
+
CG_EXTERN void CGPDFDocumentRelease(CGPDFDocumentRef cg_nullable document)
|
|
110
|
+
API_AVAILABLE(macos(10.0), ios(2.0));
|
|
111
|
+
|
|
112
|
+
/* Return the major and minor version numbers of `document'. */
|
|
113
|
+
|
|
114
|
+
CG_EXTERN void CGPDFDocumentGetVersion(CGPDFDocumentRef cg_nullable document,
|
|
115
|
+
int * majorVersion, int * minorVersion)
|
|
116
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
117
|
+
|
|
118
|
+
/* Return true if the PDF file associated with `document' is encrypted;
|
|
119
|
+
false otherwise. If the PDF file is encrypted, then a password must be
|
|
120
|
+
supplied before certain operations are enabled; different passwords may
|
|
121
|
+
enable different operations. */
|
|
122
|
+
|
|
123
|
+
CG_EXTERN bool CGPDFDocumentIsEncrypted(CGPDFDocumentRef cg_nullable document)
|
|
124
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
125
|
+
|
|
126
|
+
/* Use `password' to decrypt `document' and grant permission for certain
|
|
127
|
+
operations. Returns true if `password' is a valid password; false
|
|
128
|
+
otherwise. */
|
|
129
|
+
|
|
130
|
+
CG_EXTERN bool CGPDFDocumentUnlockWithPassword(
|
|
131
|
+
CGPDFDocumentRef cg_nullable document, const char * password)
|
|
132
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
133
|
+
|
|
134
|
+
/* Return true if `document' is unlocked; false otherwise. A document is
|
|
135
|
+
unlocked if it isn't encrypted, or if it is encrypted and a valid
|
|
136
|
+
password was specified with `CGPDFDocumentUnlockWithPassword'. */
|
|
137
|
+
|
|
138
|
+
CG_EXTERN bool CGPDFDocumentIsUnlocked(CGPDFDocumentRef cg_nullable document)
|
|
139
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
140
|
+
|
|
141
|
+
/* Return true if `document' allows printing; false otherwise. Typically,
|
|
142
|
+
this function returns false only if the document is encrypted and the
|
|
143
|
+
document's current password doesn't grant permission to perform
|
|
144
|
+
printing. */
|
|
145
|
+
|
|
146
|
+
CG_EXTERN bool CGPDFDocumentAllowsPrinting(CGPDFDocumentRef cg_nullable document)
|
|
147
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
148
|
+
|
|
149
|
+
/* Return true if `document' allows copying; false otherwise. Typically,
|
|
150
|
+
this function returns false only if the document is encrypted and the
|
|
151
|
+
document's current password doesn't grant permission to perform
|
|
152
|
+
copying. */
|
|
153
|
+
|
|
154
|
+
CG_EXTERN bool CGPDFDocumentAllowsCopying(CGPDFDocumentRef cg_nullable document)
|
|
155
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
156
|
+
|
|
157
|
+
/* Return the number of pages in `document'. */
|
|
158
|
+
|
|
159
|
+
CG_EXTERN size_t CGPDFDocumentGetNumberOfPages(
|
|
160
|
+
CGPDFDocumentRef cg_nullable document)
|
|
161
|
+
API_AVAILABLE(macos(10.0), ios(2.0));
|
|
162
|
+
|
|
163
|
+
/* Return the page corresponding to `pageNumber', or NULL if no such page
|
|
164
|
+
exists in the document. Pages are numbered starting at 1. */
|
|
165
|
+
|
|
166
|
+
CG_EXTERN CGPDFPageRef __nullable CGPDFDocumentGetPage(
|
|
167
|
+
CGPDFDocumentRef cg_nullable document, size_t pageNumber)
|
|
168
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
169
|
+
|
|
170
|
+
/* Return the document catalog of `document'. */
|
|
171
|
+
|
|
172
|
+
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFDocumentGetCatalog(
|
|
173
|
+
CGPDFDocumentRef cg_nullable document)
|
|
174
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
175
|
+
|
|
176
|
+
/* Return the info dictionary of `document'. */
|
|
177
|
+
|
|
178
|
+
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFDocumentGetInfo(
|
|
179
|
+
CGPDFDocumentRef cg_nullable document)
|
|
180
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
181
|
+
|
|
182
|
+
/* Return the "file identifier" array of `document'. */
|
|
183
|
+
|
|
184
|
+
CG_EXTERN CGPDFArrayRef __nullable CGPDFDocumentGetID(
|
|
185
|
+
CGPDFDocumentRef cg_nullable document)
|
|
186
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
187
|
+
|
|
188
|
+
/* Return the CFTypeID for CGPDFDocumentRefs. */
|
|
189
|
+
|
|
190
|
+
CG_EXTERN CFTypeID CGPDFDocumentGetTypeID(void)
|
|
191
|
+
API_AVAILABLE(macos(10.2), ios(2.0));
|
|
192
|
+
|
|
193
|
+
/* Return the document outline in the form of a CFDictionary tree containing the kCGPDFOutline keys. */
|
|
194
|
+
|
|
195
|
+
CG_EXTERN __nullable CFDictionaryRef CGPDFDocumentGetOutline(CGPDFDocumentRef document)
|
|
196
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
197
|
+
|
|
198
|
+
/* Return the document access permissions. */
|
|
199
|
+
|
|
200
|
+
CG_EXTERN CGPDFAccessPermissions CGPDFDocumentGetAccessPermissions(CGPDFDocumentRef document)
|
|
201
|
+
API_AVAILABLE(macos(10.13), ios(11.0));
|
|
202
|
+
|
|
203
|
+
/* The following functions are deprecated in favor of the CGPDFPage API. */
|
|
204
|
+
|
|
205
|
+
/* DEPRECATED; return the media box of page number `page' in `document'.
|
|
206
|
+
CGRectNull is returned if cannot find `page' in `document'. */
|
|
207
|
+
|
|
208
|
+
CG_EXTERN CGRect CGPDFDocumentGetMediaBox(CGPDFDocumentRef cg_nullable document,
|
|
209
|
+
int page)
|
|
210
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
211
|
+
|
|
212
|
+
/* DEPRECATED; return the crop box of page number `page' in `document'.
|
|
213
|
+
CGRectNull is returned if cannot find `page' in `document'. */
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
CG_EXTERN CGRect CGPDFDocumentGetCropBox(CGPDFDocumentRef cg_nullable document,
|
|
217
|
+
int page)
|
|
218
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
219
|
+
|
|
220
|
+
/* DEPRECATED; return the bleed box of page number `page' in `document'.
|
|
221
|
+
CGRectNull is returned if cannot find `page' in `document'. */
|
|
222
|
+
|
|
223
|
+
CG_EXTERN CGRect CGPDFDocumentGetBleedBox(CGPDFDocumentRef cg_nullable document,
|
|
224
|
+
int page)
|
|
225
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
226
|
+
|
|
227
|
+
/* DEPRECATED; return the trim box of page number `page' in `document'.
|
|
228
|
+
CGRectNull is returned if cannot find `page' in `document'. */
|
|
229
|
+
|
|
230
|
+
CG_EXTERN CGRect CGPDFDocumentGetTrimBox(CGPDFDocumentRef cg_nullable document,
|
|
231
|
+
int page)
|
|
232
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
233
|
+
|
|
234
|
+
/* DEPRECATED; return the art box of page number `page' in `document'.
|
|
235
|
+
CGRectNull is returned if cannot find `page' in `document'. */
|
|
236
|
+
|
|
237
|
+
CG_EXTERN CGRect CGPDFDocumentGetArtBox(CGPDFDocumentRef cg_nullable document,
|
|
238
|
+
int page)
|
|
239
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
240
|
+
|
|
241
|
+
/* DEPRECATED; return the rotation angle (in degrees) of page number `page'
|
|
242
|
+
in `document'. 0 if if cannot find `page' in `document'.*/
|
|
243
|
+
|
|
244
|
+
CG_EXTERN int CGPDFDocumentGetRotationAngle(CGPDFDocumentRef cg_nullable document,
|
|
245
|
+
int page)
|
|
246
|
+
API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
|
|
247
|
+
|
|
248
|
+
CF_ASSUME_NONNULL_END
|
|
249
|
+
|
|
250
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
251
|
+
|
|
252
|
+
#endif /* CGPDFDOCUMENT_H_ */
|
package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CGPDFMarkedContentItem.h
|
|
3
|
+
// CoreGraphics
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2023 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef CGPDFMarkedContentItem_h
|
|
9
|
+
#define CGPDFMarkedContentItem_h
|
|
10
|
+
|
|
11
|
+
#include <CoreFoundation/CFBase.h>
|
|
12
|
+
|
|
13
|
+
/* CGPDFMarkedContentItemRef represents the link between a piece of drawn content and
|
|
14
|
+
its place in the PDF structure tree. */
|
|
15
|
+
|
|
16
|
+
typedef struct CF_BRIDGED_TYPE(id) CGPDFMarkedContentItem* CGPDFMarkedContentItemRef
|
|
17
|
+
API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
|
|
18
|
+
API_UNAVAILABLE(watchos, tvos);
|
|
19
|
+
|
|
20
|
+
#include <CoreGraphics/CGBase.h>
|
|
21
|
+
|
|
22
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
23
|
+
|
|
24
|
+
CG_EXTERN CGPDFMarkedContentItemRef cg_nullable CGPDFMarkedContentItemRetain(CGPDFMarkedContentItemRef cg_nullable markedContentItem)
|
|
25
|
+
CF_REFINED_FOR_SWIFT
|
|
26
|
+
API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
|
|
27
|
+
API_UNAVAILABLE(watchos, tvos);
|
|
28
|
+
|
|
29
|
+
CG_EXTERN void CGPDFMarkedContentItemRelease(CGPDFMarkedContentItemRef cg_nullable markedContentItem)
|
|
30
|
+
CF_REFINED_FOR_SWIFT
|
|
31
|
+
API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
|
|
32
|
+
API_UNAVAILABLE(watchos, tvos);
|
|
33
|
+
|
|
34
|
+
CF_ASSUME_NONNULL_END
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#endif /* CGPDFMarkedContentItem_h */
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFObject.h
|
|
2
|
+
Copyright (c) 2002-2011 Apple Inc.
|
|
3
|
+
All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFOBJECT_H_
|
|
6
|
+
#define CGPDFOBJECT_H_
|
|
7
|
+
|
|
8
|
+
#include <CoreGraphics/CGBase.h>
|
|
9
|
+
#include <CoreFoundation/CFBase.h>
|
|
10
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
11
|
+
#include <stdint.h>
|
|
12
|
+
|
|
13
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
14
|
+
|
|
15
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
16
|
+
|
|
17
|
+
/* A type for boolean values. */
|
|
18
|
+
|
|
19
|
+
typedef unsigned char CGPDFBoolean;
|
|
20
|
+
|
|
21
|
+
/* A type for integer values. */
|
|
22
|
+
|
|
23
|
+
typedef long int CGPDFInteger;
|
|
24
|
+
|
|
25
|
+
/* A type for real values. */
|
|
26
|
+
|
|
27
|
+
typedef CGFloat CGPDFReal;
|
|
28
|
+
|
|
29
|
+
/* A type to hold any object. */
|
|
30
|
+
|
|
31
|
+
typedef struct CGPDFObject *CGPDFObjectRef __attribute__((swift_wrapper(struct)));
|
|
32
|
+
|
|
33
|
+
/* An identifier to describe an object's type. */
|
|
34
|
+
|
|
35
|
+
typedef CF_ENUM (int32_t, CGPDFObjectType) {
|
|
36
|
+
kCGPDFObjectTypeNull = 1,
|
|
37
|
+
kCGPDFObjectTypeBoolean,
|
|
38
|
+
kCGPDFObjectTypeInteger,
|
|
39
|
+
kCGPDFObjectTypeReal,
|
|
40
|
+
kCGPDFObjectTypeName,
|
|
41
|
+
kCGPDFObjectTypeString,
|
|
42
|
+
kCGPDFObjectTypeArray,
|
|
43
|
+
kCGPDFObjectTypeDictionary,
|
|
44
|
+
kCGPDFObjectTypeStream
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/* Return the type of `object'. */
|
|
48
|
+
|
|
49
|
+
CG_EXTERN CGPDFObjectType CGPDFObjectGetType(CGPDFObjectRef cg_nullable object)
|
|
50
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
51
|
+
|
|
52
|
+
/* Get the value of `object'. If the type of `object' is equal to `type',
|
|
53
|
+
then copy the value of `object' to `value' (if it's non-NULL) and return
|
|
54
|
+
true. Otherwise, if the type of `object' is `kCGPDFObjectTypeInteger' and
|
|
55
|
+
`type' is equal to `kCGPDFObjectTypeReal', then convert the value of
|
|
56
|
+
`object' to floating point and copy the result to `value' (if it's
|
|
57
|
+
non-NULL) and return true. Otherwise, return false. */
|
|
58
|
+
|
|
59
|
+
CG_EXTERN bool CGPDFObjectGetValue(CGPDFObjectRef cg_nullable object,
|
|
60
|
+
CGPDFObjectType type, void * __nullable value)
|
|
61
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
62
|
+
|
|
63
|
+
CF_ASSUME_NONNULL_END
|
|
64
|
+
|
|
65
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
66
|
+
|
|
67
|
+
#endif /* CGPDFOBJECT_H_ */
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFOperatorTable.h
|
|
2
|
+
* Copyright (c) 2004-2008 Apple Inc.
|
|
3
|
+
* All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFOPERATORTABLE_H_
|
|
6
|
+
#define CGPDFOPERATORTABLE_H_
|
|
7
|
+
|
|
8
|
+
#include <CoreFoundation/CFBase.h>
|
|
9
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
10
|
+
#include <stdint.h>
|
|
11
|
+
|
|
12
|
+
typedef struct CGPDFOperatorTable *CGPDFOperatorTableRef;
|
|
13
|
+
|
|
14
|
+
#include <CoreGraphics/CGPDFScanner.h>
|
|
15
|
+
|
|
16
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
17
|
+
|
|
18
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
19
|
+
|
|
20
|
+
typedef void (*CGPDFOperatorCallback)(CGPDFScannerRef scanner,
|
|
21
|
+
void * __nullable info);
|
|
22
|
+
|
|
23
|
+
/* Return an empty operator table. */
|
|
24
|
+
|
|
25
|
+
CG_EXTERN CGPDFOperatorTableRef __nullable CGPDFOperatorTableCreate(void)
|
|
26
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
27
|
+
|
|
28
|
+
/* Increment the retain count of `table'. */
|
|
29
|
+
|
|
30
|
+
CG_EXTERN CGPDFOperatorTableRef cg_nullable CGPDFOperatorTableRetain(
|
|
31
|
+
CGPDFOperatorTableRef cg_nullable table)
|
|
32
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
33
|
+
|
|
34
|
+
/* Decrement the retain count of `table'. */
|
|
35
|
+
|
|
36
|
+
CG_EXTERN void CGPDFOperatorTableRelease(
|
|
37
|
+
CGPDFOperatorTableRef cg_nullable table)
|
|
38
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
39
|
+
|
|
40
|
+
/* Set the callback for the operator named `name' to `callback' */
|
|
41
|
+
|
|
42
|
+
CG_EXTERN void CGPDFOperatorTableSetCallback(
|
|
43
|
+
CGPDFOperatorTableRef cg_nullable table,
|
|
44
|
+
const char * cg_nullable name, CGPDFOperatorCallback cg_nullable callback)
|
|
45
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
46
|
+
|
|
47
|
+
CF_ASSUME_NONNULL_END
|
|
48
|
+
|
|
49
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
50
|
+
|
|
51
|
+
#endif /* CGPDFOPERATORTABLE_H_ */
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFPage.h
|
|
2
|
+
Copyright (c) 2001-2011 Apple Inc.
|
|
3
|
+
All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFPAGE_H_
|
|
6
|
+
#define CGPDFPAGE_H_
|
|
7
|
+
|
|
8
|
+
#include <CoreFoundation/CFBase.h>
|
|
9
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
10
|
+
#include <stdint.h>
|
|
11
|
+
|
|
12
|
+
typedef struct CF_BRIDGED_TYPE(id) CGPDFPage *CGPDFPageRef;
|
|
13
|
+
|
|
14
|
+
#include <CoreGraphics/CGAffineTransform.h>
|
|
15
|
+
#include <CoreGraphics/CGPDFDictionary.h>
|
|
16
|
+
#include <CoreGraphics/CGPDFDocument.h>
|
|
17
|
+
|
|
18
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
19
|
+
|
|
20
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
typedef CF_ENUM (int32_t, CGPDFBox) {
|
|
23
|
+
kCGPDFMediaBox = 0,
|
|
24
|
+
kCGPDFCropBox = 1,
|
|
25
|
+
kCGPDFBleedBox = 2,
|
|
26
|
+
kCGPDFTrimBox = 3,
|
|
27
|
+
kCGPDFArtBox = 4
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/* Equivalent to `CFRetain(page)', except it doesn't crash (as CFRetain
|
|
31
|
+
does) if `page' is NULL. */
|
|
32
|
+
|
|
33
|
+
CG_EXTERN CGPDFPageRef __nullable CGPDFPageRetain(CGPDFPageRef cg_nullable page)
|
|
34
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
35
|
+
|
|
36
|
+
/* Equivalent to `CFRelease(page)', except it doesn't crash (as CFRelease
|
|
37
|
+
does) if `page' is NULL. */
|
|
38
|
+
|
|
39
|
+
CG_EXTERN void CGPDFPageRelease(CGPDFPageRef cg_nullable page)
|
|
40
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
41
|
+
|
|
42
|
+
/* Return the document of `page'. */
|
|
43
|
+
|
|
44
|
+
CG_EXTERN CGPDFDocumentRef __nullable CGPDFPageGetDocument(
|
|
45
|
+
CGPDFPageRef cg_nullable page)
|
|
46
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
47
|
+
|
|
48
|
+
/* Return the page number of `page'. */
|
|
49
|
+
|
|
50
|
+
CG_EXTERN size_t CGPDFPageGetPageNumber(CGPDFPageRef cg_nullable page)
|
|
51
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
52
|
+
|
|
53
|
+
/* Return the rectangle associated with `box' in `page'. This is the value
|
|
54
|
+
of the corresponding entry (such as /MediaBox, /ArtBox, and so on) in the
|
|
55
|
+
page's dictionary. Return CGRectNull if `page' is not a valid CGPDFPageRef
|
|
56
|
+
or `box' is not a valid CGPDFBox. */
|
|
57
|
+
|
|
58
|
+
CG_EXTERN CGRect CGPDFPageGetBoxRect(CGPDFPageRef cg_nullable page, CGPDFBox box)
|
|
59
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
60
|
+
|
|
61
|
+
/* Return the rotation angle (in degrees) of `page'. This is the value of
|
|
62
|
+
the /Rotate entry in the page's dictionary. Return 0 if `page' is not a valid
|
|
63
|
+
CGPDFPageRef. */
|
|
64
|
+
|
|
65
|
+
CG_EXTERN int CGPDFPageGetRotationAngle(CGPDFPageRef cg_nullable page)
|
|
66
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
67
|
+
|
|
68
|
+
/* Return a transform mapping the box specified by `box' to `rect' as
|
|
69
|
+
follows:
|
|
70
|
+
- Compute the effective rect by intersecting the rect associated with
|
|
71
|
+
`box' and the /MediaBox entry of the page.
|
|
72
|
+
- Rotate the effective rect according to the page's /Rotate entry.
|
|
73
|
+
- Center the resulting rect on `rect'. If `rotation' is non-zero, then
|
|
74
|
+
the rect will rotated clockwise by `rotation' degrees. `rotation'
|
|
75
|
+
must be a multiple of 90.
|
|
76
|
+
- Scale the rect down, if necessary, so that it coincides with the
|
|
77
|
+
edges of `rect'. If `preserveAspectRatio' is true, then the final
|
|
78
|
+
rect will coincide with the edges of `rect' only in the more
|
|
79
|
+
restrictive dimension. */
|
|
80
|
+
|
|
81
|
+
CG_EXTERN CGAffineTransform CGPDFPageGetDrawingTransform(
|
|
82
|
+
CGPDFPageRef cg_nullable page, CGPDFBox box, CGRect rect, int rotate,
|
|
83
|
+
bool preserveAspectRatio)
|
|
84
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
85
|
+
|
|
86
|
+
/* Return the dictionary of `page'. */
|
|
87
|
+
|
|
88
|
+
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFPageGetDictionary(
|
|
89
|
+
CGPDFPageRef cg_nullable page)
|
|
90
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
91
|
+
|
|
92
|
+
/* Return the CFTypeID for CGPDFPageRefs. */
|
|
93
|
+
|
|
94
|
+
CG_EXTERN CFTypeID CGPDFPageGetTypeID(void)
|
|
95
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
96
|
+
|
|
97
|
+
CF_ASSUME_NONNULL_END
|
|
98
|
+
|
|
99
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
100
|
+
|
|
101
|
+
#endif /* CGPDFPAGE_H_ */
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFScanner.h
|
|
2
|
+
Copyright (c) 2004-2011 Apple Inc.
|
|
3
|
+
All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFSCANNER_H_
|
|
6
|
+
#define CGPDFSCANNER_H_
|
|
7
|
+
|
|
8
|
+
#include <CoreFoundation/CFBase.h>
|
|
9
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
10
|
+
#include <stdint.h>
|
|
11
|
+
|
|
12
|
+
typedef struct CGPDFScanner *CGPDFScannerRef;
|
|
13
|
+
|
|
14
|
+
#include <CoreGraphics/CGPDFContentStream.h>
|
|
15
|
+
#include <CoreGraphics/CGPDFOperatorTable.h>
|
|
16
|
+
|
|
17
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
18
|
+
|
|
19
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
/* Create a scanner. */
|
|
22
|
+
|
|
23
|
+
CG_EXTERN CGPDFScannerRef CGPDFScannerCreate(
|
|
24
|
+
CGPDFContentStreamRef cs,
|
|
25
|
+
CGPDFOperatorTableRef __nullable table, void * __nullable info)
|
|
26
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
27
|
+
|
|
28
|
+
/* Retain `scanner'. */
|
|
29
|
+
|
|
30
|
+
CG_EXTERN CGPDFScannerRef cg_nullable CGPDFScannerRetain(
|
|
31
|
+
CGPDFScannerRef cg_nullable scanner)
|
|
32
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
33
|
+
|
|
34
|
+
/* Release `scanner'. */
|
|
35
|
+
|
|
36
|
+
CG_EXTERN void CGPDFScannerRelease(CGPDFScannerRef cg_nullable scanner)
|
|
37
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
38
|
+
|
|
39
|
+
/* Scan the content stream of `scanner'. Returns true if the entire stream
|
|
40
|
+
was scanned successfully; false if scanning failed for some reason (for
|
|
41
|
+
example, if the stream's data is corrupted). */
|
|
42
|
+
|
|
43
|
+
CG_EXTERN bool CGPDFScannerScan(CGPDFScannerRef cg_nullable scanner)
|
|
44
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
45
|
+
|
|
46
|
+
/* Return the content stream associated with `scanner'. */
|
|
47
|
+
|
|
48
|
+
CG_EXTERN CGPDFContentStreamRef CGPDFScannerGetContentStream(
|
|
49
|
+
CGPDFScannerRef scanner)
|
|
50
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
51
|
+
|
|
52
|
+
/* Pop an object from the stack of `scanner' and return it in `value'. */
|
|
53
|
+
|
|
54
|
+
CG_EXTERN bool CGPDFScannerPopObject(CGPDFScannerRef scanner,
|
|
55
|
+
CGPDFObjectRef __nullable * __nullable value)
|
|
56
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
57
|
+
|
|
58
|
+
/* Pop an object from the stack of `scanner' and, if it's a boolean, return
|
|
59
|
+
it in `value'. Return false if the top of the stack isn't a boolean. */
|
|
60
|
+
|
|
61
|
+
CG_EXTERN bool CGPDFScannerPopBoolean(CGPDFScannerRef scanner,
|
|
62
|
+
CGPDFBoolean * __nullable value)
|
|
63
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
64
|
+
|
|
65
|
+
/* Pop an object from the stack of `scanner' and, if it's an integer, return
|
|
66
|
+
it in `value'. Return false if the top of the stack isn't an integer. */
|
|
67
|
+
|
|
68
|
+
CG_EXTERN bool CGPDFScannerPopInteger(CGPDFScannerRef scanner,
|
|
69
|
+
CGPDFInteger * __nullable value)
|
|
70
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
71
|
+
|
|
72
|
+
/* Pop an object from the stack of `scanner' and, if it's a number, return
|
|
73
|
+
it in `value'. Return false if the top of the stack isn't a number. */
|
|
74
|
+
|
|
75
|
+
CG_EXTERN bool CGPDFScannerPopNumber(CGPDFScannerRef scanner,
|
|
76
|
+
CGPDFReal * __nullable value)
|
|
77
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
78
|
+
|
|
79
|
+
/* Pop an object from the stack of `scanner' and, if it's a name, return it
|
|
80
|
+
in `value'. Return false if the top of the stack isn't a name. */
|
|
81
|
+
|
|
82
|
+
CG_EXTERN bool CGPDFScannerPopName(CGPDFScannerRef scanner,
|
|
83
|
+
const char * __nullable * __nullable value)
|
|
84
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
85
|
+
|
|
86
|
+
/* Pop an object from the stack of `scanner' and, if it's a string, return
|
|
87
|
+
it in `value'. Return false if the top of the stack isn't a string. */
|
|
88
|
+
|
|
89
|
+
CG_EXTERN bool CGPDFScannerPopString(CGPDFScannerRef scanner,
|
|
90
|
+
CGPDFStringRef __nullable * __nullable value)
|
|
91
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
92
|
+
|
|
93
|
+
/* Pop an object from the stack of `scanner' and, if it's an array, return
|
|
94
|
+
it in `value'. Return false if the top of the stack isn't an array. */
|
|
95
|
+
|
|
96
|
+
CG_EXTERN bool CGPDFScannerPopArray(CGPDFScannerRef scanner,
|
|
97
|
+
CGPDFArrayRef __nullable * __nullable value)
|
|
98
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
99
|
+
|
|
100
|
+
/* Pop an object from the stack of `scanner' and, if it's a dictionary,
|
|
101
|
+
return it in `value'. Return false if the top of the stack isn't a
|
|
102
|
+
dictionary. */
|
|
103
|
+
|
|
104
|
+
CG_EXTERN bool CGPDFScannerPopDictionary(CGPDFScannerRef scanner,
|
|
105
|
+
CGPDFDictionaryRef __nullable * __nullable value)
|
|
106
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
107
|
+
|
|
108
|
+
/* Pop an object from the stack of `scanner' and, if it's a stream, return
|
|
109
|
+
it in `value'. Return false if the top of the stack isn't a stream. */
|
|
110
|
+
|
|
111
|
+
CG_EXTERN bool CGPDFScannerPopStream(CGPDFScannerRef scanner,
|
|
112
|
+
CGPDFStreamRef __nullable * __nullable value)
|
|
113
|
+
API_AVAILABLE(macos(10.4), ios(2.0));
|
|
114
|
+
|
|
115
|
+
/* Cleanly stop the scanner on the current operator, releasing any
|
|
116
|
+
temporary resources. */
|
|
117
|
+
CG_EXTERN void CGPDFScannerStop(CGPDFScannerRef s);
|
|
118
|
+
|
|
119
|
+
CF_ASSUME_NONNULL_END
|
|
120
|
+
|
|
121
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
122
|
+
|
|
123
|
+
#endif /* CGPDFSCANNER_H_ */
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* CoreGraphics - CGPDFStream.h
|
|
2
|
+
* Copyright (c) 2002-2008 Apple Inc.
|
|
3
|
+
* All rights reserved. */
|
|
4
|
+
|
|
5
|
+
#ifndef CGPDFSTREAM_H_
|
|
6
|
+
#define CGPDFSTREAM_H_
|
|
7
|
+
|
|
8
|
+
typedef struct CGPDFStream *CGPDFStreamRef __attribute__((swift_wrapper(struct)));;
|
|
9
|
+
|
|
10
|
+
#include <CoreFoundation/CFBase.h>
|
|
11
|
+
#include <CoreFoundation/CFAvailability.h>
|
|
12
|
+
#include <stdint.h>
|
|
13
|
+
|
|
14
|
+
typedef CF_ENUM (int32_t, CGPDFDataFormat) {
|
|
15
|
+
CGPDFDataFormatRaw, CGPDFDataFormatJPEGEncoded, CGPDFDataFormatJPEG2000
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
#include <CoreGraphics/CGBase.h>
|
|
19
|
+
#include <CoreGraphics/CGPDFDictionary.h>
|
|
20
|
+
#include <CoreGraphics/CGPDFStream.h>
|
|
21
|
+
#include <CoreFoundation/CFData.h>
|
|
22
|
+
|
|
23
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
24
|
+
|
|
25
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
26
|
+
|
|
27
|
+
/* Return the dictionary of `stream'. */
|
|
28
|
+
|
|
29
|
+
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFStreamGetDictionary(
|
|
30
|
+
CGPDFStreamRef cg_nullable stream)
|
|
31
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
32
|
+
|
|
33
|
+
/* Return the data of `stream'. */
|
|
34
|
+
|
|
35
|
+
CG_EXTERN CFDataRef __nullable CGPDFStreamCopyData(
|
|
36
|
+
CGPDFStreamRef cg_nullable stream,
|
|
37
|
+
CGPDFDataFormat * cg_nullable format)
|
|
38
|
+
API_AVAILABLE(macos(10.3), ios(2.0));
|
|
39
|
+
|
|
40
|
+
CF_ASSUME_NONNULL_END
|
|
41
|
+
|
|
42
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
43
|
+
|
|
44
|
+
#endif /* CGPDFSTREAM_H_ */
|