peachsim 0.1.2247 → 0.1.2248
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/cli/bin.ts +5 -0
- package/cli/cloud-dispatch.ts +2 -0
- package/cli/commands/control.ts +2 -2
- package/cli/commands/coverage-swift.ts +3 -3
- package/cli/commands/shell-url.ts +6 -0
- package/cli/commands/skills.ts +6 -3
- package/dist-lib/agent-daemon-client.cjs +1 -29
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -10
- 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 +4161 -4502
- 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 +2 -309
- package/dist-lib/dev-bundle-resolution.cjs +1 -12
- package/dist-lib/expo-swift-bundle.cjs +3440 -3835
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +4237 -4653
- package/dist-lib/host/fetch-proxy-handler.cjs +97 -713
- 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 +1 -1
- package/dist-lib/index.cjs +639 -1110
- 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 +3 -24
- 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 -10
- package/dist-lib/metro-production-bundle.mjs +1 -12
- package/dist-lib/metro.cjs +546 -975
- package/dist-lib/native-app-identity-project.cjs +299 -592
- package/dist-lib/native-app-identity-project.mjs +11 -232
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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 +28 -96
- package/dist-lib/public-origins-lib.json +172 -1058
- 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 -34
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +4777 -5307
- package/dist-lib/swift-compile.cjs +1054 -1085
- package/dist-lib/swift-compile.mjs +2 -28
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1425 -1639
- package/dist-lib/vite.cjs +173 -763
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +10 -2
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/kotlin-module.ts +3 -3
- package/src/swift-coverage/provenance.ts +4 -4
- package/src/swift-objc-sdk.ts +34 -21
- package/src/swift-objc-standin.ts +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -7,6 +7,7 @@ export declare const SCENE_I32_STRIDE = 8;
|
|
|
7
7
|
export declare const SCENE_F64_STRIDE = 100;
|
|
8
8
|
export declare const SCENE_F32_STRIDE = 20;
|
|
9
9
|
export declare const SCENE_MAX_TRANSFORM_OPS = 6;
|
|
10
|
+
export declare function transformListBounded(transform: readonly unknown[]): boolean;
|
|
10
11
|
export declare const AUTO_RETAINED_MAX_LAYOUT_AREA = 400000;
|
|
11
12
|
export declare const SCENE_I_FIRST_CHILD = 4;
|
|
12
13
|
export declare const SCENE_I_NEXT_SIBLING = 5;
|
|
@@ -259,6 +260,7 @@ export interface SceneNativeBinding {
|
|
|
259
260
|
_peach_frame_portals(surface: number, count: number, top: number): number;
|
|
260
261
|
_peach_frame_local_roots(surface: number, count: number): number;
|
|
261
262
|
_peach_portal_end(slot: number): void;
|
|
263
|
+
_peach_frame_hoist_host(slot: number, host: number): void;
|
|
262
264
|
_peach_portal_hosted(host: number, count: number): number;
|
|
263
265
|
_peach_portal_over_app(root: number, count: number, top: number): number;
|
|
264
266
|
_peach_frame_classes(entries: number): number;
|
|
@@ -337,6 +339,7 @@ export declare class SceneTable {
|
|
|
337
339
|
}, shape: number, fillShape: number, topWidth: number, rightWidth: number, bottomWidth: number, leftWidth: number, fill: Float32Array, top: Float32Array, right: Float32Array, bottom: Float32Array, left: Float32Array): void;
|
|
338
340
|
writePropFlags(slot: number, propFlags: number): void;
|
|
339
341
|
writeHoistFlag(slot: number, flag: number, on: boolean): void;
|
|
342
|
+
writeHoistHost(slot: number, hostSlot: number): void;
|
|
340
343
|
presentationStyleBacked(slot: number): boolean;
|
|
341
344
|
resizePaintsOwnInkOnly(slot: number): boolean;
|
|
342
345
|
presentsBox(slot: number): boolean;
|
|
@@ -30,10 +30,11 @@ export declare function duoSweepTiming(sweep: {
|
|
|
30
30
|
export declare function duoViewerLeg(leaving: DuoFoldRest, to: DuoFoldRest): boolean;
|
|
31
31
|
export declare function duoSweepHinge(leaving: DuoFoldRest, to: DuoFoldRest, travel: number): number;
|
|
32
32
|
export declare function duoRestLandscapeSide(rest: DuoFoldRest): LandscapeSide | undefined;
|
|
33
|
+
export type DuoFoldFace = HTMLCanvasElement | OffscreenCanvas;
|
|
33
34
|
export type DuoFoldPage = {
|
|
34
35
|
origin: 'closed' | 'open';
|
|
35
|
-
image:
|
|
36
|
-
back:
|
|
36
|
+
image: DuoFoldFace;
|
|
37
|
+
back: DuoFoldFace | null;
|
|
37
38
|
keepsLayout: boolean;
|
|
38
39
|
side: LandscapeSide;
|
|
39
40
|
} | null;
|
|
@@ -62,6 +63,9 @@ type DuoFoldState = {
|
|
|
62
63
|
cloak: DuoFoldCloak;
|
|
63
64
|
};
|
|
64
65
|
export type DuoFoldWireState = Pick<DuoFoldState, 'progress' | 'active' | 'ready' | 'rest'>;
|
|
66
|
+
export type DuoFoldMirrorState = Omit<DuoFoldState, 'page' | 'clock'> & {
|
|
67
|
+
now: number;
|
|
68
|
+
};
|
|
65
69
|
export declare function getDuoFoldProgress(): number;
|
|
66
70
|
export type DeviceHingeStatus = 'closed' | 'partiallyOpen' | 'fullyOpen';
|
|
67
71
|
export declare function readDeviceHinge(): {
|
|
@@ -90,4 +94,8 @@ export declare function duoFoldPosture(progress?: number): DuoFoldPosture;
|
|
|
90
94
|
export declare function duoFrameSampleDifference(first: ArrayLike<number>, second: ArrayLike<number>): number;
|
|
91
95
|
export declare function duoFrameSampleCovered(sample: ArrayLike<number>): boolean;
|
|
92
96
|
export declare function snapshotDuoFoldState(): DuoFoldWireState;
|
|
97
|
+
export declare function snapshotDuoFoldMirror(): {
|
|
98
|
+
state: DuoFoldMirrorState;
|
|
99
|
+
page: DuoFoldPage;
|
|
100
|
+
} | null;
|
|
93
101
|
export {};
|
package/kotlin/sdk.tar.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a","file":"node/cli-0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a.cjs"}
|
package/src/kotlin-module.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { IS_STANDALONE } from '../cli/standalone'
|
|
|
7
7
|
import { rnxHomeDir } from './home-paths'
|
|
8
8
|
import { isRecord } from './is-record'
|
|
9
9
|
|
|
10
|
-
declare const __PEACH_BUNDLED_KOTLIN__:
|
|
10
|
+
declare const __PEACH_BUNDLED_KOTLIN__: string
|
|
11
11
|
|
|
12
12
|
let installedRoot: string | undefined
|
|
13
13
|
|
|
@@ -16,8 +16,8 @@ export function peachKotlinModuleRoot(): string {
|
|
|
16
16
|
return path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'kotlin')
|
|
17
17
|
if (installedRoot) return installedRoot
|
|
18
18
|
|
|
19
|
-
const files = __PEACH_BUNDLED_KOTLIN__
|
|
20
|
-
const digest = createHash('sha256').update(
|
|
19
|
+
const files: Record<string, string> = JSON.parse(__PEACH_BUNDLED_KOTLIN__)
|
|
20
|
+
const digest = createHash('sha256').update(__PEACH_BUNDLED_KOTLIN__).digest('hex')
|
|
21
21
|
const parent = path.join(rnxHomeDir(), 'kotlin', 'modules')
|
|
22
22
|
const root = path.join(parent, digest)
|
|
23
23
|
fs.mkdirSync(parent, { recursive: true })
|
|
@@ -41,8 +41,8 @@ export function swiftCoverageSourceDigests(srcDir: string): Record<string, strin
|
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
declare const __SWIFT_COVERAGE_SOURCE_DIGESTS__:
|
|
45
|
-
export const swiftCoverageProvenance =
|
|
46
|
-
typeof __SWIFT_COVERAGE_SOURCE_DIGESTS__ === '
|
|
47
|
-
? __SWIFT_COVERAGE_SOURCE_DIGESTS__
|
|
44
|
+
declare const __SWIFT_COVERAGE_SOURCE_DIGESTS__: string | undefined
|
|
45
|
+
export const swiftCoverageProvenance: Record<string, string> =
|
|
46
|
+
typeof __SWIFT_COVERAGE_SOURCE_DIGESTS__ === 'string'
|
|
47
|
+
? JSON.parse(__SWIFT_COVERAGE_SOURCE_DIGESTS__)
|
|
48
48
|
: swiftCoverageSourceDigests(join(import.meta.dirname, '..'))
|
package/src/swift-objc-sdk.ts
CHANGED
|
@@ -11,34 +11,47 @@ import path from 'node:path'
|
|
|
11
11
|
import { readIosSdkTree } from './swift-objc-sdk-tree'
|
|
12
12
|
import { peachsimPackageRoot } from './swift-toolchain'
|
|
13
13
|
|
|
14
|
-
declare const __PEACH_BUNDLED_IOS_SDK__:
|
|
14
|
+
declare const __PEACH_BUNDLED_IOS_SDK__: string
|
|
15
15
|
|
|
16
16
|
export const IOS_SDK_TARGET = 'arm64-apple-ios16.0-simulator'
|
|
17
17
|
|
|
18
18
|
const OVERLAY_PATH =
|
|
19
19
|
/^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/** the clang headers and module maps, by path under the sdk root. */
|
|
29
|
-
export const IOS_SDK_HEADERS: Record<string, string> = {}
|
|
21
|
+
export interface IosSdk {
|
|
22
|
+
/** the clang headers and module maps, by path under the sdk root. */
|
|
23
|
+
headers: Record<string, string>
|
|
24
|
+
/** the swift overlays of the clang modules above, by module name. */
|
|
25
|
+
overlays: Record<string, string>
|
|
26
|
+
}
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
export const IOS_SDK_OVERLAYS: Record<string, string> = {}
|
|
28
|
+
let sdk: IosSdk | undefined
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
// the tree is read from the package's sdk directory, which sits beside src and
|
|
31
|
+
// every dist directory; the standalone executable embeds it at build time. it is
|
|
32
|
+
// 34 MB, so only a command that compiles against it reads it.
|
|
33
|
+
export function iosSdk(): IosSdk {
|
|
34
|
+
if (sdk) return sdk
|
|
35
|
+
const bundled: Record<string, string> | null =
|
|
36
|
+
typeof __PEACH_BUNDLED_IOS_SDK__ === 'undefined'
|
|
37
|
+
? null
|
|
38
|
+
: JSON.parse(__PEACH_BUNDLED_IOS_SDK__)
|
|
39
|
+
const tree = bundled
|
|
40
|
+
? Object.entries(bundled).sort(([a], [b]) => (a < b ? -1 : 1))
|
|
41
|
+
: readIosSdkTree(path.join(peachsimPackageRoot(), 'sdk', 'ios'))
|
|
42
|
+
const headers: Record<string, string> = {}
|
|
43
|
+
const overlays: Record<string, string> = {}
|
|
44
|
+
for (const [file, text] of tree) {
|
|
45
|
+
const module = OVERLAY_PATH.exec(file)?.[1]
|
|
46
|
+
if (module === undefined) {
|
|
47
|
+
headers[file] = text
|
|
48
|
+
continue
|
|
49
|
+
}
|
|
50
|
+
const header = `// swift-interface-format-version: 1.0\n// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}\n`
|
|
51
|
+
if (!text.startsWith(header))
|
|
52
|
+
throw new Error(`sdk overlay ${file} has the wrong interface header`)
|
|
53
|
+
overlays[module] = text.slice(header.length)
|
|
39
54
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
throw new Error(`sdk overlay ${file} has the wrong interface header`)
|
|
43
|
-
IOS_SDK_OVERLAYS[module] = text.slice(header.length)
|
|
55
|
+
sdk = { headers, overlays }
|
|
56
|
+
return sdk
|
|
44
57
|
}
|
|
@@ -21,7 +21,7 @@ import path from 'node:path'
|
|
|
21
21
|
import { isRecord } from './is-record'
|
|
22
22
|
import { swiftInterfaceWithoutBodies } from './swift-interface-bodies'
|
|
23
23
|
import { swiftObjCPlatformFlags } from './swift-objc-platform'
|
|
24
|
-
import {
|
|
24
|
+
import { IOS_SDK_TARGET, iosSdk } from './swift-objc-sdk'
|
|
25
25
|
import { clangImportNames, moduleMapTokens } from './swift-package'
|
|
26
26
|
import {
|
|
27
27
|
objcProtocolsInSwiftSignatures,
|
|
@@ -246,14 +246,14 @@ export function stripExternalSourceMarks(text: string): string {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
function iosSdkEntries(): (readonly [string, string])[] {
|
|
249
|
-
const overlays = Object.entries(
|
|
249
|
+
const overlays = Object.entries(iosSdk().overlays).map(
|
|
250
250
|
([module, text]) =>
|
|
251
251
|
[
|
|
252
252
|
`usr/lib/swift/${module}.swiftmodule/arm64-apple-ios-simulator.swiftinterface`,
|
|
253
253
|
`// swift-interface-format-version: 1.0\n// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}\n${text}`,
|
|
254
254
|
] as const,
|
|
255
255
|
)
|
|
256
|
-
const headers = Object.entries(
|
|
256
|
+
const headers = Object.entries(iosSdk().headers).map(
|
|
257
257
|
([file, text]) => [file, stripExternalSourceMarks(text)] as const,
|
|
258
258
|
)
|
|
259
259
|
return [...headers, ...overlays].sort(([a], [b]) => (a < b ? -1 : 1))
|
|
@@ -430,7 +430,7 @@ let sdkDeclarations: Map<string, SdkDeclaration> | null = null
|
|
|
430
430
|
function sdkDeclaration(name: string): SdkDeclaration | null {
|
|
431
431
|
if (sdkDeclarations === null) {
|
|
432
432
|
const umbrellas = new Map<string, string>()
|
|
433
|
-
for (const [file, text] of Object.entries(
|
|
433
|
+
for (const [file, text] of Object.entries(iosSdk().headers)) {
|
|
434
434
|
const modulemap = FRAMEWORK_MODULEMAP.exec(file)
|
|
435
435
|
if (!modulemap) continue
|
|
436
436
|
const header = /umbrella header "([^"]+)"/.exec(text)?.[1]
|
|
@@ -441,7 +441,7 @@ function sdkDeclaration(name: string): SdkDeclaration | null {
|
|
|
441
441
|
if (!found.has(name))
|
|
442
442
|
found.set(name, { module, header: umbrellas.get(module) ?? header })
|
|
443
443
|
}
|
|
444
|
-
for (const [file, text] of Object.entries(
|
|
444
|
+
for (const [file, text] of Object.entries(iosSdk().headers)) {
|
|
445
445
|
const location = FRAMEWORK_HEADER.exec(file)
|
|
446
446
|
if (!location) continue
|
|
447
447
|
const [, module, header] = location
|
|
@@ -693,7 +693,7 @@ export function objcView(
|
|
|
693
693
|
const umbrella = `${name}/${name}.h`
|
|
694
694
|
if (
|
|
695
695
|
Object.hasOwn(
|
|
696
|
-
|
|
696
|
+
iosSdk().headers,
|
|
697
697
|
`System/Library/Frameworks/${name}.framework/Headers/${name}.h`,
|
|
698
698
|
)
|
|
699
699
|
) {
|
|
@@ -729,7 +729,7 @@ export function objcView(
|
|
|
729
729
|
// standard library names, since `Swift.Duration` also searches it.
|
|
730
730
|
const stubModule = (name: string, swift: boolean): boolean => {
|
|
731
731
|
const sdk = Object.hasOwn(
|
|
732
|
-
|
|
732
|
+
iosSdk().headers,
|
|
733
733
|
`System/Library/Frameworks/${name}.framework/Headers/${name}.h`,
|
|
734
734
|
)
|
|
735
735
|
if (!sdk && !swift) return stub(`${name}/${name}.h`, true)
|