peachsim 0.1.1728 → 0.1.1744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +68 -16
- package/cli/commands/coverage-swift.ts +112 -4
- 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 +33 -21
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +41 -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 +28 -7
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +18 -5
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- 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 +9932 -4561
- 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 +30 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6886 -3303
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +8513 -3085
- package/dist-lib/host/fetch-proxy-handler.cjs +19 -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 +175 -80
- 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 +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -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 +146 -76
- package/dist-lib/native-app-identity-project.cjs +76 -39
- package/dist-lib/native-app-identity-project.mjs +76 -39
- 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 +5 -2
- 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 +138 -80
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- 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 +41126 -36493
- package/dist-lib/swift-compile.cjs +2103 -444
- package/dist-lib/swift-compile.mjs +2025 -369
- 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 +84 -24
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6094 -2687
- package/dist-lib/vite.cjs +32 -10
- 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/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- 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 +6 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.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/native-preview-bundle.d.ts +2 -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 +15 -2
- 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 +6 -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 +14 -1
- 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 +8 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- 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 +58 -9
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
- 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/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -265
- 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 -402
- 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 -217
- 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 -285
- 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 -106
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +14 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +152 -60
- package/src/cli-runtime.ts +3 -0
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +10 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +211 -52
- package/src/expo-swift-host.ts +149 -123
- package/src/expo-swift-ready.ts +5 -1
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +21 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/host/websocket-proxy.ts +7 -2
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +261 -261
- package/src/nitro-adapter.ts +118 -50
- package/src/nitro-bundle.ts +134 -96
- package/src/nitro-compile.ts +16 -6
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +142 -30
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +68 -21
- package/src/react-bridge-importers.ts +1 -0
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +37 -1
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +315 -117
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +19 -13
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +18 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +51 -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-standin-emit.ts +6 -1
- package/src/swift-standins.ts +403 -19
- package/src/swift-submit.ts +17 -1
- package/src/swift-toolchain.ts +98 -23
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +82 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +15 -3
- 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
|
@@ -1,127 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peach-visual
|
|
3
|
-
|
|
4
|
-
description: Pixel-level rendering comparison between Peach and native iOS — fonts, gradients, shadows, image fidelity
|
|
3
|
+
description: Compare static rendering in Peach with native iOS or an app baseline using lossless screenshots and pixel diffs. Use for font metrics, gradients, shadows, blur, colors, or image fidelity; use peach-debug for tree/props and peach-perf for motion or frame timing.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Peach visual fidelity
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
CLI gives you two primitives — **canvas capture** (`peach screenshot`)
|
|
12
|
-
and **structural diff** (`peach debug snapshot`/`diff`). pixel
|
|
13
|
-
comparison itself is "capture both sides, diff the PNGs with a standard
|
|
14
|
-
image tool" — there is no single oracle-diff command, and that's fine:
|
|
15
|
-
the capture step is the hard part and it's fully reproducible.
|
|
8
|
+
Use this for visible pixel differences. Start with a connected, pinned sim;
|
|
9
|
+
use `peach-setup` if `peach describe` cannot reach the intended app.
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
> load `/peach-setup` first.
|
|
11
|
+
## Establish comparable captures
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
1. Check structure with `peach debug snapshot` and `peach debug diff` when a
|
|
14
|
+
changed node or prop could explain the result. Use `peach-debug` for that
|
|
15
|
+
investigation.
|
|
16
|
+
2. Match device, appearance, orientation, app state, loaded fonts/images,
|
|
17
|
+
logical crop, and pixel dimensions between captures. For native parity,
|
|
18
|
+
open Peach with `--render-resolution high` so it uses native device scale.
|
|
19
|
+
3. Wait for the relevant state and `peach wait idle`. Perpetual animation needs
|
|
20
|
+
a controlled matching state; an arbitrary frame is not a stable baseline.
|
|
21
|
+
4. Capture lossless PNGs and inspect both source images and the diff.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
`/peach-debug`, debugging branch — `debug snapshot` + `debug
|
|
24
|
-
diff` is faster, deterministic, and tells you *why*.
|
|
25
|
-
- visual change (color, gradient, shadow, font metric, blur, image)? →
|
|
26
|
-
continue here.
|
|
27
|
-
- comparing Peach to your iOS simulator for fidelity? → continue.
|
|
28
|
-
- regressing your own app against itself across commits? → continue.
|
|
29
|
-
|
|
30
|
-
## anti-patterns (read first)
|
|
31
|
-
|
|
32
|
-
- **run structural diff before pixel work.** `peach debug snapshot` /
|
|
33
|
-
`debug diff` (in `/peach-debug`) is cheaper, deterministic, and
|
|
34
|
-
points at the responsible nodes. only when it's empty (or the change is
|
|
35
|
-
pure rendering) does a pixel comparison add information.
|
|
36
|
-
- **don't single-screenshot animated surfaces.** a gradient
|
|
37
|
-
mid-animation never matches. gate the capture behind `peach wait
|
|
38
|
-
idle` first.
|
|
39
|
-
- **a > 5% pixel threshold hides regressions.** ~1% is the right
|
|
40
|
-
ballpark for catching real font / shadow / gradient drift without
|
|
41
|
-
flagging anti-alias noise. go higher only with a written reason.
|
|
42
|
-
- **pin device and theme.** capture both sides on the same simulated
|
|
43
|
-
device and appearance. capture each appearance separately with
|
|
44
|
-
`peach screenshot` after setting it on both simulators.
|
|
45
|
-
- **commit baselines alongside the code change that produced them.**
|
|
46
|
-
baseline churn without code churn means someone captured noise.
|
|
47
|
-
|
|
48
|
-
## capturing — `peach screenshot`
|
|
49
|
-
|
|
50
|
-
fast, no extra setup, works on any loaded app:
|
|
23
|
+
## Capture Peach
|
|
51
24
|
|
|
52
25
|
```sh
|
|
53
|
-
peach screenshot --output app.png
|
|
54
|
-
peach screenshot --area 0,200,393,400
|
|
55
|
-
peach screenshot --id loginButton -o
|
|
56
|
-
peach screenshot --text "Sign in"
|
|
57
|
-
peach screenshot --no-shell -o tenant.png
|
|
58
|
-
peach screenshot --shell-only
|
|
26
|
+
peach screenshot --output app.png
|
|
27
|
+
peach screenshot --area 0,200,393,400 -o region.png
|
|
28
|
+
peach screenshot --id loginButton -o button.png
|
|
29
|
+
peach screenshot --text "Sign in" -o sign-in.png
|
|
30
|
+
peach screenshot --no-shell -o tenant.png
|
|
31
|
+
peach screenshot --shell-only -o shell.png
|
|
59
32
|
```
|
|
60
33
|
|
|
61
|
-
|
|
62
|
-
|
|
34
|
+
Coordinates are logical points. `--id` crops by testID; prefer it to text when
|
|
35
|
+
copy repeats. Capture each affected screen with a distinct filename. Crop the
|
|
36
|
+
same region on both sides so unrelated chrome does not hide a small text or
|
|
37
|
+
shadow regression.
|
|
63
38
|
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
capture both sides to PNGs, then diff with any standard image tool.
|
|
67
|
-
|
|
68
|
-
**Peach vs Peach (regression across your own commits):**
|
|
69
|
-
|
|
70
|
-
```sh
|
|
71
|
-
peach screenshot -o before.png # baseline, before your change
|
|
72
|
-
# … make the rendering change, let the sim hot-reload …
|
|
73
|
-
peach screenshot -o after.png # after your change
|
|
74
|
-
npx pixelmatch before.png after.png diff.png 0.1 # writes diff.png
|
|
75
|
-
# or: magick compare before.png after.png diff.png
|
|
76
|
-
```
|
|
39
|
+
## Compare
|
|
77
40
|
|
|
78
|
-
|
|
41
|
+
For your app across revisions, capture before the change, apply it and wait
|
|
42
|
+
for readiness, then capture after. For native iOS, name the exact simulator:
|
|
79
43
|
|
|
80
44
|
```sh
|
|
81
|
-
# native side: lifecycle and UI use xcodebuildmcp with one claimed simulator
|
|
82
|
-
# lossless capture names that simulator explicitly; never use the booted alias
|
|
83
45
|
xcrun simctl io <udid> screenshot --type=png native.png
|
|
84
|
-
# peach side: same screen, same appearance
|
|
85
46
|
peach screenshot -o peach.png
|
|
86
|
-
|
|
47
|
+
magick compare native.png peach.png diff.png
|
|
87
48
|
```
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
## recovery — common failure modes
|
|
116
|
-
|
|
117
|
-
- **a single icon/glyph diffs** — font-load race or image not yet
|
|
118
|
-
cached. recapture after `peach wait idle`, or navigate away and back
|
|
119
|
-
to seed the cache.
|
|
120
|
-
- **everything diffs by a constant offset** — you captured the two sides
|
|
121
|
-
on different devices or appearances. pin both, recapture.
|
|
122
|
-
- **baselines churn without a code change** — someone captured noise (a
|
|
123
|
-
lingering badge, half-open keyboard, a drifting clock). revert and
|
|
124
|
-
recapture from a clean, idle state.
|
|
125
|
-
- **persistent delta on the same font / shadow / gradient across
|
|
126
|
-
unrelated screens** — that's an engine-level rendering fidelity issue,
|
|
127
|
-
not your app. report it with the affected captures attached.
|
|
50
|
+
Use an installed standard image-diff tool. ImageMagick `compare` returns a
|
|
51
|
+
nonzero status when images differ; inspect its output rather than treating that
|
|
52
|
+
alone as a tool failure. Verify decoded PNG dimensions before comparing and
|
|
53
|
+
preserve the originals. Optimized JPEG captures introduce compression noise
|
|
54
|
+
and are unsuitable for lossless parity comparisons.
|
|
55
|
+
|
|
56
|
+
Keep the image tool's per-pixel sensitivity distinct from the percentage of
|
|
57
|
+
changed pixels. Choose an acceptance threshold for the actual surface before
|
|
58
|
+
evaluating results; a large full-screen allowance can conceal a local defect.
|
|
59
|
+
Inspect the changed region even when the aggregate score passes.
|
|
60
|
+
|
|
61
|
+
## Diagnose differences
|
|
62
|
+
|
|
63
|
+
| Pattern | First check |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| One glyph or icon differs | Font or image readiness |
|
|
66
|
+
| Constant offset across the image | Device geometry, safe area, crop, scale |
|
|
67
|
+
| Baseline changes without code changes | Keyboard, clock, badges, animation or unstable data |
|
|
68
|
+
| Same font/shadow/gradient defect on unrelated screens | Possible renderer issue; preserve minimal captures |
|
|
69
|
+
|
|
70
|
+
Iterate until the affected cases meet their agreed target, or the remaining
|
|
71
|
+
differences are explicitly accepted. Store baselines with the app's existing
|
|
72
|
+
artifact policy and update them alongside the code that justifies the change.
|
|
73
|
+
Do not bless unexplained baseline churn. For visible motion or latency claims,
|
|
74
|
+
use `peach-perf`; a static screenshot cannot prove frame progression.
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// an Android app's own legacy React Native modules: the ReactPackage classes
|
|
2
|
+
// its application registers, the module classes they create, and the app
|
|
3
|
+
// sources each package needs, found the way gradle's main source set would
|
|
4
|
+
// compile them. the Kotlin parser reads each file (kotlin-host's bridge scan);
|
|
5
|
+
// this selects what it reports.
|
|
6
|
+
import fs from 'node:fs'
|
|
7
|
+
import path from 'node:path'
|
|
8
|
+
import { isRecord } from './is-record'
|
|
9
|
+
|
|
10
|
+
export interface BridgeMethod {
|
|
11
|
+
name: string
|
|
12
|
+
blocking: boolean
|
|
13
|
+
// null for a method that returns nothing
|
|
14
|
+
returns: string | null
|
|
15
|
+
params: { name: string; type: string }[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BridgeFile {
|
|
19
|
+
file: string
|
|
20
|
+
package: string
|
|
21
|
+
imports: string[]
|
|
22
|
+
declared: string[]
|
|
23
|
+
references: string[]
|
|
24
|
+
packages: { name: string; noArg: boolean }[]
|
|
25
|
+
modules: { name: string; methods: BridgeMethod[] }[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface BridgeModule {
|
|
29
|
+
// fully qualified class
|
|
30
|
+
className: string
|
|
31
|
+
// the name getName() returns when it is a string literal
|
|
32
|
+
name: string
|
|
33
|
+
methods: BridgeMethod[]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface BridgePackage {
|
|
37
|
+
className: string
|
|
38
|
+
modules: BridgeModule[]
|
|
39
|
+
// the app sources the package's classes need, its own first
|
|
40
|
+
sources: string[]
|
|
41
|
+
// why the package cannot be hosted
|
|
42
|
+
unsupported: string | null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface BridgeSelection {
|
|
46
|
+
applicationId: string
|
|
47
|
+
packages: BridgePackage[]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const qualified = (file: { package: string }, name: string) =>
|
|
51
|
+
file.package ? `${file.package}.${name}` : name
|
|
52
|
+
|
|
53
|
+
function readMethod(value: unknown): BridgeMethod {
|
|
54
|
+
if (
|
|
55
|
+
!isRecord(value) ||
|
|
56
|
+
typeof value.name !== 'string' ||
|
|
57
|
+
typeof value.blocking !== 'boolean' ||
|
|
58
|
+
(value.returns !== null && typeof value.returns !== 'string') ||
|
|
59
|
+
!Array.isArray(value.params)
|
|
60
|
+
)
|
|
61
|
+
throw new Error('bridge-modules printed an invalid method')
|
|
62
|
+
return {
|
|
63
|
+
name: value.name,
|
|
64
|
+
blocking: value.blocking,
|
|
65
|
+
returns: value.returns,
|
|
66
|
+
params: value.params.map((param: unknown) => {
|
|
67
|
+
if (
|
|
68
|
+
!isRecord(param) ||
|
|
69
|
+
typeof param.name !== 'string' ||
|
|
70
|
+
typeof param.type !== 'string'
|
|
71
|
+
)
|
|
72
|
+
throw new Error('bridge-modules printed an invalid parameter')
|
|
73
|
+
return { name: param.name, type: param.type }
|
|
74
|
+
}),
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function strings(value: unknown): string[] {
|
|
79
|
+
if (!Array.isArray(value) || !value.every((item) => typeof item === 'string'))
|
|
80
|
+
throw new Error('bridge-modules printed an invalid list')
|
|
81
|
+
return value.map(String)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function readBridgeFiles(output: string): BridgeFile[] {
|
|
85
|
+
return output
|
|
86
|
+
.split('\n')
|
|
87
|
+
.filter((line) => line.startsWith('{'))
|
|
88
|
+
.map((line) => {
|
|
89
|
+
const row: unknown = JSON.parse(line)
|
|
90
|
+
if (
|
|
91
|
+
!isRecord(row) ||
|
|
92
|
+
typeof row.file !== 'string' ||
|
|
93
|
+
typeof row.package !== 'string' ||
|
|
94
|
+
!Array.isArray(row.packages) ||
|
|
95
|
+
!Array.isArray(row.modules)
|
|
96
|
+
)
|
|
97
|
+
throw new Error('bridge-modules printed an invalid file')
|
|
98
|
+
return {
|
|
99
|
+
file: row.file,
|
|
100
|
+
package: row.package,
|
|
101
|
+
imports: strings(row.imports),
|
|
102
|
+
declared: strings(row.declared),
|
|
103
|
+
references: strings(row.references),
|
|
104
|
+
packages: row.packages.map((entry: unknown) => {
|
|
105
|
+
if (
|
|
106
|
+
!isRecord(entry) ||
|
|
107
|
+
typeof entry.name !== 'string' ||
|
|
108
|
+
typeof entry.noArg !== 'boolean'
|
|
109
|
+
)
|
|
110
|
+
throw new Error('bridge-modules printed an invalid package')
|
|
111
|
+
return { name: entry.name, noArg: entry.noArg }
|
|
112
|
+
}),
|
|
113
|
+
modules: row.modules.map((entry: unknown) => {
|
|
114
|
+
if (
|
|
115
|
+
!isRecord(entry) ||
|
|
116
|
+
typeof entry.name !== 'string' ||
|
|
117
|
+
!Array.isArray(entry.methods)
|
|
118
|
+
)
|
|
119
|
+
throw new Error('bridge-modules printed an invalid module')
|
|
120
|
+
return { name: entry.name, methods: entry.methods.map(readMethod) }
|
|
121
|
+
}),
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// the app module's main source set: the gradle android plugin's defaults
|
|
127
|
+
export function androidAppSources(appRoot: string): {
|
|
128
|
+
applicationId: string
|
|
129
|
+
kotlin: string[]
|
|
130
|
+
java: string[]
|
|
131
|
+
} | null {
|
|
132
|
+
const moduleDir = path.join(appRoot, 'android', 'app')
|
|
133
|
+
const gradle = ['build.gradle', 'build.gradle.kts']
|
|
134
|
+
.map((name) => path.join(moduleDir, name))
|
|
135
|
+
.find((file) => fs.existsSync(file))
|
|
136
|
+
if (!gradle) return null
|
|
137
|
+
const id = /\bapplicationId\s*=?\s*["']([^"']+)["']/.exec(
|
|
138
|
+
fs.readFileSync(gradle, 'utf8'),
|
|
139
|
+
)
|
|
140
|
+
if (!id) throw new Error(`${gradle}: no applicationId`)
|
|
141
|
+
const kotlin: string[] = []
|
|
142
|
+
const java: string[] = []
|
|
143
|
+
const walk = (dir: string) => {
|
|
144
|
+
if (!fs.existsSync(dir)) return
|
|
145
|
+
for (const child of fs
|
|
146
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
147
|
+
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
148
|
+
const file = path.join(dir, child.name)
|
|
149
|
+
if (child.isSymbolicLink()) throw new Error(`Android source is a symlink: ${file}`)
|
|
150
|
+
if (child.isDirectory()) walk(file)
|
|
151
|
+
else if (child.name.endsWith('.kt')) kotlin.push(file)
|
|
152
|
+
else if (child.name.endsWith('.java')) java.push(file)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
walk(path.join(moduleDir, 'src', 'main', 'java'))
|
|
156
|
+
walk(path.join(moduleDir, 'src', 'main', 'kotlin'))
|
|
157
|
+
return { applicationId: id[1], kotlin, java }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// a name a source refers to resolves to a file declaring it when the file's
|
|
161
|
+
// package is the source's own, one it imports, or one it writes in full
|
|
162
|
+
function declares(
|
|
163
|
+
source: { package: string; imports: string[]; text: string },
|
|
164
|
+
owner: { package: string },
|
|
165
|
+
name: string,
|
|
166
|
+
): boolean {
|
|
167
|
+
const full = qualified(owner, name)
|
|
168
|
+
return (
|
|
169
|
+
source.package === owner.package ||
|
|
170
|
+
source.imports.includes(full) ||
|
|
171
|
+
source.imports.includes(`${owner.package}.*`) ||
|
|
172
|
+
source.text.includes(full)
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function selectBridgePackages(
|
|
177
|
+
applicationId: string,
|
|
178
|
+
files: BridgeFile[],
|
|
179
|
+
javaFiles: string[],
|
|
180
|
+
): BridgeSelection {
|
|
181
|
+
const texts = new Map(
|
|
182
|
+
files.map((file) => [file.file, fs.readFileSync(file.file, 'utf8')]),
|
|
183
|
+
)
|
|
184
|
+
const owners = new Map<string, BridgeFile[]>()
|
|
185
|
+
for (const file of files)
|
|
186
|
+
for (const name of file.declared)
|
|
187
|
+
owners.set(name, [...(owners.get(name) ?? []), file])
|
|
188
|
+
const javaDeclarations = javaFiles.map((file) => ({
|
|
189
|
+
file,
|
|
190
|
+
package: /^\s*package\s+([\w.]+)\s*;/m.exec(fs.readFileSync(file, 'utf8'))?.[1] ?? '',
|
|
191
|
+
name: path.basename(file, '.java'),
|
|
192
|
+
}))
|
|
193
|
+
|
|
194
|
+
const closure = (root: BridgeFile) => {
|
|
195
|
+
const seen = new Set([root])
|
|
196
|
+
let unsupported: string | null = null
|
|
197
|
+
for (const file of seen) {
|
|
198
|
+
const source = {
|
|
199
|
+
package: file.package,
|
|
200
|
+
imports: file.imports,
|
|
201
|
+
text: texts.get(file.file)!,
|
|
202
|
+
}
|
|
203
|
+
for (const name of file.references) {
|
|
204
|
+
for (const owner of owners.get(name) ?? [])
|
|
205
|
+
if (!seen.has(owner) && declares(source, owner, name)) seen.add(owner)
|
|
206
|
+
for (const java of javaDeclarations)
|
|
207
|
+
if (java.name === name && declares(source, java, name))
|
|
208
|
+
unsupported ??= `${java.file}: Java sources in bridge modules are not supported yet`
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return { files: [...seen], unsupported }
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// an application registers a package by constructing it
|
|
215
|
+
const registered = (file: BridgeFile, name: string) => {
|
|
216
|
+
const registrars = files.filter(
|
|
217
|
+
(other) =>
|
|
218
|
+
other !== file &&
|
|
219
|
+
other.references.includes(name) &&
|
|
220
|
+
declares(
|
|
221
|
+
{
|
|
222
|
+
package: other.package,
|
|
223
|
+
imports: other.imports,
|
|
224
|
+
text: texts.get(other.file)!,
|
|
225
|
+
},
|
|
226
|
+
file,
|
|
227
|
+
name,
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
return registrars.length === 0 ? null : registrars
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const found: { order: string; position: number; result: BridgePackage }[] = []
|
|
234
|
+
for (const file of files) {
|
|
235
|
+
for (const entry of file.packages) {
|
|
236
|
+
const registrars = registered(file, entry.name)
|
|
237
|
+
if (!registrars) continue
|
|
238
|
+
const needed = closure(file)
|
|
239
|
+
const result: BridgePackage = {
|
|
240
|
+
className: qualified(file, entry.name),
|
|
241
|
+
modules: needed.files.flatMap((owner) =>
|
|
242
|
+
owner.modules.map((module) => ({
|
|
243
|
+
className: qualified(owner, module.name),
|
|
244
|
+
name:
|
|
245
|
+
moduleName(texts.get(owner.file)!, module.name) ??
|
|
246
|
+
module.name.split('.').pop()!,
|
|
247
|
+
methods: module.methods,
|
|
248
|
+
})),
|
|
249
|
+
),
|
|
250
|
+
sources: needed.files.map((owner) => owner.file),
|
|
251
|
+
unsupported:
|
|
252
|
+
needed.unsupported ??
|
|
253
|
+
(entry.noArg
|
|
254
|
+
? null
|
|
255
|
+
: `${file.file}: ${entry.name} has no constructor without arguments`),
|
|
256
|
+
}
|
|
257
|
+
const text = texts.get(registrars[0].file)!
|
|
258
|
+
found.push({
|
|
259
|
+
order: registrars[0].file,
|
|
260
|
+
position: text.search(new RegExp(`\\b${entry.name}\\s*\\(`)),
|
|
261
|
+
result,
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
found.sort((a, b) => a.order.localeCompare(b.order) || a.position - b.position)
|
|
266
|
+
return { applicationId, packages: found.map((entry) => entry.result) }
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// the string literal a module's getName returns
|
|
270
|
+
function moduleName(text: string, className: string): string | null {
|
|
271
|
+
const klass = text.slice(
|
|
272
|
+
text.search(new RegExp(`\\bclass\\s+${className.split('.').pop()}\\b`)),
|
|
273
|
+
)
|
|
274
|
+
const match =
|
|
275
|
+
/\bfun\s+getName\s*\(\s*\)\s*(?::\s*String)?\s*(?:=\s*|\{\s*return\s+)"([^"$]*)"/.exec(
|
|
276
|
+
klass,
|
|
277
|
+
)
|
|
278
|
+
return match ? match[1] : null
|
|
279
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DESKTOP_RENDER_RESOLUTION } from './menu'
|
|
1
2
|
import {
|
|
2
3
|
isSettingKey,
|
|
3
4
|
isValidSettingValue,
|
|
@@ -30,6 +31,14 @@ export interface AppPackageManifest {
|
|
|
30
31
|
routes: Record<string, { file: string; contentType: string }>
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
function parseJsonSetting(raw: string, assignment: string): unknown {
|
|
35
|
+
try {
|
|
36
|
+
return JSON.parse(raw)
|
|
37
|
+
} catch {
|
|
38
|
+
throw new Error(`invalid package setting ${assignment}; expected a JSON array`)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
export function packageSettingDefaults(
|
|
34
43
|
assignments: readonly string[],
|
|
35
44
|
): Partial<SettingsValues> {
|
|
@@ -42,9 +51,13 @@ export function packageSettingDefaults(
|
|
|
42
51
|
),
|
|
43
52
|
// a packaged app is a desktop app: it keeps the computer pointer and
|
|
44
53
|
// shows only the app, without the device frame or simulator rail.
|
|
54
|
+
// and types on the computer keyboard, so no software keyboard presents.
|
|
55
|
+
// it renders at the desktop host's density, the pixels its window shows.
|
|
45
56
|
systemCursor: true,
|
|
57
|
+
hardwareKeyboard: true,
|
|
46
58
|
showFrame: false,
|
|
47
59
|
showRail: false,
|
|
60
|
+
renderResolution: DESKTOP_RENDER_RESOLUTION,
|
|
48
61
|
}
|
|
49
62
|
for (const assignment of assignments) {
|
|
50
63
|
const equals = assignment.indexOf('=')
|
|
@@ -65,7 +78,7 @@ export function packageSettingDefaults(
|
|
|
65
78
|
? NaN
|
|
66
79
|
: Number(raw)
|
|
67
80
|
: definition.type === 'string-array'
|
|
68
|
-
?
|
|
81
|
+
? parseJsonSetting(raw, assignment)
|
|
69
82
|
: raw
|
|
70
83
|
if (
|
|
71
84
|
(typeof value === 'number' && !Number.isFinite(value)) ||
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export interface SwiftImageSource {
|
|
3
3
|
uri: string
|
|
4
4
|
scale: number
|
|
5
|
+
renderingMode?: 'template' | 'original'
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
// the scale variants stay available until the runtime knows its device.
|
|
@@ -18,7 +19,10 @@ export function isSwiftImageVariants(value: unknown): value is SwiftImageVariant
|
|
|
18
19
|
typeof image.uri === 'string' &&
|
|
19
20
|
typeof image.scale === 'number' &&
|
|
20
21
|
Number.isFinite(image.scale) &&
|
|
21
|
-
image.scale > 0
|
|
22
|
+
image.scale > 0 &&
|
|
23
|
+
(image.renderingMode === undefined ||
|
|
24
|
+
image.renderingMode === 'template' ||
|
|
25
|
+
image.renderingMode === 'original'),
|
|
22
26
|
)
|
|
23
27
|
)
|
|
24
28
|
}
|
|
@@ -70,6 +74,9 @@ export interface SfSymbolImageDrawing {
|
|
|
70
74
|
// automatic variable mode draws the value along the paths rather than
|
|
71
75
|
// turning layers off by threshold
|
|
72
76
|
variableDraw?: boolean
|
|
77
|
+
// automatic rendering draws the symbol hierarchically: coreui's preferred
|
|
78
|
+
// rendering mode (desktopcomputer's tertiary screen in a tab bar)
|
|
79
|
+
hierarchical?: boolean
|
|
73
80
|
// coreui's own right to left rendition, which replaces the drawing there
|
|
74
81
|
rightToLeft?: SfSymbolImageDrawing
|
|
75
82
|
}
|
package/src/bridge-contract.ts
CHANGED
|
@@ -53,6 +53,12 @@ export type BridgeCommandType =
|
|
|
53
53
|
// them, so they stay out of BridgeCommandType and out of its cloud scope table.
|
|
54
54
|
export type BridgeHostCommandType = 'bridge:list-sims' | 'bridge:claim'
|
|
55
55
|
|
|
56
|
+
export interface PushNotificationReceipt {
|
|
57
|
+
appId: string
|
|
58
|
+
id: string
|
|
59
|
+
presented: boolean
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
// what a caller hands a bridge's `send`: the command minus the correlation id,
|
|
57
63
|
// which the transport assigns. every send seam names this type rather than an
|
|
58
64
|
// index-signature bag, because an index signature erases excess-property
|