peachsim 0.1.2722 → 0.1.2724
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/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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +40 -22
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-WXT5BN3N.mjs → acorn-EURHASUG.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-2GNOD4OQ.mjs → chunk-4JBJMTW6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7SPRXX7U.mjs → chunk-4JK43CMT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-WBN7IUWQ.mjs → chunk-6DUHHBHL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HMQMHBQL.mjs → chunk-6QOAUFXS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YAMJOL3T.mjs → chunk-75EXFIUY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-B3RWPISY.mjs → chunk-7L46YGKM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QXPI426H.mjs → chunk-CQZUJXUJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IOV6JL2A.mjs → chunk-DUZ423VJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TOYF6UUA.mjs → chunk-EAAWWHM5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BVW6GQ7R.mjs → chunk-ELUCK72T.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-PG5A6PA2.mjs → chunk-H27F6KTB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-A6VMTX6Z.mjs → chunk-HBMYCY5F.mjs} +32 -21
- package/dist-lib/esm-chunks/{chunk-NX24DHF4.mjs → chunk-J7WTMPA2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZIW6KYK2.mjs → chunk-LHYDMCSX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GG5BIIIB.mjs → chunk-N44HIDJI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7PI2KWCZ.mjs → chunk-OZ3AV4BF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JTYCUVI6.mjs → chunk-PBX3L23V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-B5OD7Z5G.mjs → chunk-PSFDJFEP.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-KNWASISV.mjs → chunk-QCMMBFZK.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-PTKBPZT3.mjs → chunk-QRTEE3NG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PMRCLDUL.mjs → chunk-T552XKQW.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZOKB6ZSG.mjs → chunk-TIR2OCFT.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-F5NIHETA.mjs → chunk-U2CXAJOV.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-JNHM4ED3.mjs → chunk-UMMJ3AVM.mjs} +7 -8
- package/dist-lib/esm-chunks/{metro-layout-parser-2NKB2F5L.mjs → metro-layout-parser-KH6NZMEH.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-WYMQ4AQP.mjs → swift-package-prebuilt-5CSXNIFW.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-W4VSM642.mjs → swift-sdk-app-module-HX2YLJ4X.mjs} +33 -24
- package/dist-lib/esm-chunks/{swift-sdk-image-UN5UJ5GR.mjs → swift-sdk-image-32W2IHSJ.mjs} +16 -18
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-4GEOEY7X.mjs → swift-sdk-image-producer-7Z2DBPQQ.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +40 -22
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +237 -34
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +237 -34
- package/dist-lib/swift-compile.cjs +37 -19
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +0 -2
- package/dist-types/packages/peach-engine/src/engine/native-text-measure.d.ts +3 -6
- package/dist-types/packages/peach-engine/src/engine/native-text-metric-policy.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/native-text-runtimeContract.d.ts +0 -5
- package/package.json +1 -1
- package/src/binaryen.lock.json +1 -1
- package/src/one-direct-host-source.ts +194 -10
- package/src/one-native-controls-package.ts +81 -36
- package/src/swift-compile.ts +16 -4
- package/src/swift-sdk-app-module.ts +22 -10
- package/src/swift-sdk-image.ts +1 -1
- package/src/swiftSdkLinkContract.ts +2 -0
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2724 | (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 __create = Object.create;
|
|
@@ -36019,7 +36019,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
36019
36019
|
|
|
36020
36020
|
// src/swift-compiler-digest.ts
|
|
36021
36021
|
function swiftArchiveCompilerDigestValue() {
|
|
36022
|
-
return true ? "
|
|
36022
|
+
return true ? "5d04be03bbba986299329087e4997de62ffb4b4238f9faf31755f5255a1b7094" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
36023
36023
|
}
|
|
36024
36024
|
var import_node_crypto11, import_node_fs27, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
36025
36025
|
var init_swift_compiler_digest = __esm({
|
|
@@ -36170,7 +36170,7 @@ var init_swift_standin_digest = __esm({
|
|
|
36170
36170
|
|
|
36171
36171
|
// src/expo-native-compiler-digest.ts
|
|
36172
36172
|
function expoNativeCompilerDigestValue() {
|
|
36173
|
-
return true ? "
|
|
36173
|
+
return true ? "8e31ec134b59bae40caf8bad45e1e8c852fd51da235ad767ad65b552bba121a6" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
36174
36174
|
}
|
|
36175
36175
|
var import_node_crypto13;
|
|
36176
36176
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -59690,11 +59690,12 @@ var init_swift_sdk_image_map = __esm({
|
|
|
59690
59690
|
});
|
|
59691
59691
|
|
|
59692
59692
|
// src/swiftSdkLinkContract.ts
|
|
59693
|
-
var SWIFT_SDK_FUNCTION_ADDRESS_PREFIX, OBJC_LOAD_FUNCTION;
|
|
59693
|
+
var SWIFT_SDK_FUNCTION_ADDRESS_PREFIX, SWIFT_SDK_APP_TABLE_BASE, OBJC_LOAD_FUNCTION;
|
|
59694
59694
|
var init_swiftSdkLinkContract = __esm({
|
|
59695
59695
|
"src/swiftSdkLinkContract.ts"() {
|
|
59696
59696
|
"use strict";
|
|
59697
59697
|
SWIFT_SDK_FUNCTION_ADDRESS_PREFIX = "__peach_sdk_function_address.";
|
|
59698
|
+
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
59698
59699
|
OBJC_LOAD_FUNCTION = ".objcv2_load_function";
|
|
59699
59700
|
}
|
|
59700
59701
|
});
|
|
@@ -67046,7 +67047,7 @@ var init_binaryen_lock = __esm({
|
|
|
67046
67047
|
"darwin-arm64": {
|
|
67047
67048
|
asset: "arm64-macos",
|
|
67048
67049
|
upstreamSha256: "98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa",
|
|
67049
|
-
sha256: "
|
|
67050
|
+
sha256: "2cadf6373604091be7784a1dde396ccbe67964e9a5ddb40be19bb52d65cb23b7"
|
|
67050
67051
|
}
|
|
67051
67052
|
}
|
|
67052
67053
|
};
|
|
@@ -74341,7 +74342,6 @@ exit "$status"
|
|
|
74341
74342
|
var swift_sdk_image_exports = {};
|
|
74342
74343
|
__export(swift_sdk_image_exports, {
|
|
74343
74344
|
SWIFT_SDK_APP_MEMORY_BASE: () => SWIFT_SDK_APP_MEMORY_BASE,
|
|
74344
|
-
SWIFT_SDK_APP_TABLE_BASE: () => SWIFT_SDK_APP_TABLE_BASE,
|
|
74345
74345
|
SWIFT_SDK_IMAGE_BUNDLE: () => SWIFT_SDK_IMAGE_BUNDLE,
|
|
74346
74346
|
SWIFT_SDK_IMAGE_FILES: () => SWIFT_SDK_IMAGE_FILES,
|
|
74347
74347
|
SWIFT_SDK_MEMORY_BASE: () => SWIFT_SDK_MEMORY_BASE,
|
|
@@ -75013,7 +75013,7 @@ function readSwiftSdkManifest(image) {
|
|
|
75013
75013
|
}));
|
|
75014
75014
|
return setBoundedCache(cachedSdkManifests, cacheKey, { manifest, block: block2, segments });
|
|
75015
75015
|
}
|
|
75016
|
-
var import_node_child_process39, import_node_crypto45, import_node_fs75, import_node_path73, import_node_util10, run5, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE,
|
|
75016
|
+
var import_node_child_process39, import_node_crypto45, import_node_fs75, import_node_path73, import_node_util10, run5, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
|
|
75017
75017
|
var init_swift_sdk_image = __esm({
|
|
75018
75018
|
"src/swift-sdk-image.ts"() {
|
|
75019
75019
|
"use strict";
|
|
@@ -75034,12 +75034,12 @@ var init_swift_sdk_image = __esm({
|
|
|
75034
75034
|
init_swift_sdk_image_wasm();
|
|
75035
75035
|
init_swift_toolchain();
|
|
75036
75036
|
init_swift_wasm_prune();
|
|
75037
|
+
init_swiftSdkLinkContract();
|
|
75037
75038
|
init_swiftTargetContract();
|
|
75038
75039
|
init_wasm_optimize();
|
|
75039
75040
|
run5 = (0, import_node_util10.promisify)(import_node_child_process39.execFile);
|
|
75040
75041
|
SWIFT_SDK_APP_MEMORY_BASE = 8372224;
|
|
75041
75042
|
SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024;
|
|
75042
|
-
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
75043
75043
|
EMPTY_APP = `import SwiftUI
|
|
75044
75044
|
|
|
75045
75045
|
@main
|
|
@@ -75300,7 +75300,6 @@ __export(swift_sdk_app_module_exports, {
|
|
|
75300
75300
|
linkSwiftAppModule: () => linkSwiftAppModule,
|
|
75301
75301
|
readSwiftSdkAppLink: () => readSwiftSdkAppLink,
|
|
75302
75302
|
readSwiftSdkUsage: () => readSwiftSdkUsage,
|
|
75303
|
-
selectSwiftSdkData: () => selectSwiftSdkData,
|
|
75304
75303
|
swiftAppModuleInputs: () => swiftAppModuleInputs,
|
|
75305
75304
|
swiftAppModuleThunkSection: () => swiftAppModuleThunkSection,
|
|
75306
75305
|
swiftSdkProjectionSpans: () => swiftSdkProjectionSpans,
|
|
@@ -76295,12 +76294,11 @@ function readSwiftSdkAppLink(file) {
|
|
|
76295
76294
|
return JSON.parse((0, import_node_zlib5.gunzipSync)((0, import_node_fs76.readFileSync)(file)).toString("utf8"));
|
|
76296
76295
|
}
|
|
76297
76296
|
function createSwiftSdkBinding(linkage, sdk2, usage, projection) {
|
|
76298
|
-
const
|
|
76299
|
-
|
|
76300
|
-
|
|
76301
|
-
]);
|
|
76297
|
+
const binding = bindSwiftAppModule(linkage, sdk2);
|
|
76298
|
+
const { data, liveSlots } = selectSwiftSdkData(sdk2, usage, linkage, projection);
|
|
76299
|
+
const bytes = Buffer.concat([binding, data]);
|
|
76302
76300
|
const sha2565 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto46.createHash)("sha256").update(bytes).digest("hex");
|
|
76303
|
-
return { bytes, sha256: sha2565 };
|
|
76301
|
+
return { bytes, sha256: sha2565, liveSlots };
|
|
76304
76302
|
}
|
|
76305
76303
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
76306
76304
|
const map2 = readWasmLinkMap(mapFile, false);
|
|
@@ -76830,7 +76828,18 @@ function selectSwiftSdkData(sdk2, usage, linkage, projection) {
|
|
|
76830
76828
|
blob.set(run18.bytes, at + 12);
|
|
76831
76829
|
at += 12 + run18.bytes.length;
|
|
76832
76830
|
}
|
|
76833
|
-
|
|
76831
|
+
const selected = new Set(boundSlots);
|
|
76832
|
+
slots.forEach((slot, index) => {
|
|
76833
|
+
if (slot && liveFunctions[index]) selected.add(slot);
|
|
76834
|
+
});
|
|
76835
|
+
const liveSlots = Buffer.alloc((selected.size + 1) * 4);
|
|
76836
|
+
liveSlots.writeUInt32LE(selected.size, 0);
|
|
76837
|
+
let slotOffset = 4;
|
|
76838
|
+
for (const slot of selected) {
|
|
76839
|
+
liveSlots.writeUInt32LE(slot, slotOffset);
|
|
76840
|
+
slotOffset += 4;
|
|
76841
|
+
}
|
|
76842
|
+
return { data: blob, liveSlots };
|
|
76834
76843
|
}
|
|
76835
76844
|
function partitionParent(section2) {
|
|
76836
76845
|
return [
|
|
@@ -82494,14 +82503,17 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
82494
82503
|
return null;
|
|
82495
82504
|
if (!("sdk" in receipt)) return null;
|
|
82496
82505
|
const image = receipt.sdk;
|
|
82497
|
-
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string")
|
|
82506
|
+
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string" || typeof image.liveSlots !== "string")
|
|
82498
82507
|
return null;
|
|
82499
82508
|
const binding = (0, import_node_fs84.readFileSync)(import_node_path84.default.join(directory2, "sdk-binding.bin"));
|
|
82500
82509
|
if ((0, import_node_crypto51.createHash)("sha256").update(binding).digest("hex") !== image.binding) return null;
|
|
82510
|
+
const liveSlots = (0, import_node_fs84.readFileSync)(import_node_path84.default.join(directory2, "sdk-live-slots.bin"));
|
|
82511
|
+
if ((0, import_node_crypto51.createHash)("sha256").update(liveSlots).digest("hex") !== image.liveSlots)
|
|
82512
|
+
return null;
|
|
82501
82513
|
const sdk2 = {
|
|
82502
82514
|
key: image.key,
|
|
82503
82515
|
sha256: image.sha256,
|
|
82504
|
-
binding: { bytes: binding, sha256: image.binding }
|
|
82516
|
+
binding: { bytes: binding, sha256: image.binding, liveSlots }
|
|
82505
82517
|
};
|
|
82506
82518
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 }, sdk: sdk2 };
|
|
82507
82519
|
} catch (error) {
|
|
@@ -82517,8 +82529,13 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
82517
82529
|
try {
|
|
82518
82530
|
(0, import_node_fs84.writeFileSync)(import_node_path84.default.join(pending2, "app.wasm"), artifact.bytes);
|
|
82519
82531
|
(0, import_node_fs84.writeFileSync)(import_node_path84.default.join(pending2, "icu.gz"), artifact.icu.gzip);
|
|
82520
|
-
if (artifact.sdk)
|
|
82532
|
+
if (artifact.sdk) {
|
|
82521
82533
|
(0, import_node_fs84.writeFileSync)(import_node_path84.default.join(pending2, "sdk-binding.bin"), artifact.sdk.binding.bytes);
|
|
82534
|
+
(0, import_node_fs84.writeFileSync)(
|
|
82535
|
+
import_node_path84.default.join(pending2, "sdk-live-slots.bin"),
|
|
82536
|
+
artifact.sdk.binding.liveSlots
|
|
82537
|
+
);
|
|
82538
|
+
}
|
|
82522
82539
|
(0, import_node_fs84.writeFileSync)(
|
|
82523
82540
|
import_node_path84.default.join(pending2, "artifact.json"),
|
|
82524
82541
|
JSON.stringify({
|
|
@@ -82528,12 +82545,13 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
82528
82545
|
sdk: artifact.sdk && {
|
|
82529
82546
|
key: artifact.sdk.key,
|
|
82530
82547
|
sha256: artifact.sdk.sha256,
|
|
82531
|
-
binding: artifact.sdk.binding.sha256
|
|
82548
|
+
binding: artifact.sdk.binding.sha256,
|
|
82549
|
+
liveSlots: (0, import_node_crypto51.createHash)("sha256").update(artifact.sdk.binding.liveSlots).digest("hex")
|
|
82532
82550
|
}
|
|
82533
82551
|
})
|
|
82534
82552
|
);
|
|
82535
82553
|
const outputs = ["app.wasm", "icu.gz"];
|
|
82536
|
-
if (artifact.sdk) outputs.push("sdk-binding.bin");
|
|
82554
|
+
if (artifact.sdk) outputs.push("sdk-binding.bin", "sdk-live-slots.bin");
|
|
82537
82555
|
for (const file of [...outputs, "artifact.json"]) {
|
|
82538
82556
|
(0, import_node_fs84.renameSync)(import_node_path84.default.join(pending2, file), import_node_path84.default.join(directory2, file));
|
|
82539
82557
|
}
|
|
@@ -84597,7 +84615,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
84597
84615
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
84598
84616
|
MULTI_MANIFEST_VERSION = 76;
|
|
84599
84617
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
84600
|
-
compilerSourceDigest = true ? "
|
|
84618
|
+
compilerSourceDigest = true ? "53c1ead5f57a27afe64baf0eb8a4013ee9c70573cf3aeb6ef826b3ec9571da83" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
84601
84619
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
84602
84620
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
84603
84621
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -142781,6 +142799,110 @@ public final class PeachOneDirectStage: NSObject {
|
|
|
142781
142799
|
}
|
|
142782
142800
|
}
|
|
142783
142801
|
|
|
142802
|
+
@MainActor
|
|
142803
|
+
private final class PeachDirectSwipeConfiguration: ObservableObject {
|
|
142804
|
+
struct Action: Identifiable {
|
|
142805
|
+
let id: Int
|
|
142806
|
+
let title: String
|
|
142807
|
+
let symbol: String?
|
|
142808
|
+
let destructive: Bool
|
|
142809
|
+
let tint: UIColor?
|
|
142810
|
+
}
|
|
142811
|
+
|
|
142812
|
+
struct Edge {
|
|
142813
|
+
var actions: [Action] = []
|
|
142814
|
+
var fullSwipe = false
|
|
142815
|
+
|
|
142816
|
+
init(_ items: [[String: Any]] = [], fullSwipe: Bool = false) {
|
|
142817
|
+
self.fullSwipe = fullSwipe
|
|
142818
|
+
actions = items.enumerated().map { index, item in
|
|
142819
|
+
Action(id: index, title: item["title"] as? String ?? "", symbol: item["systemImage"] as? String,
|
|
142820
|
+
destructive: item["destructive"] as? Bool ?? false, tint: item["color"] as? UIColor)
|
|
142821
|
+
}
|
|
142822
|
+
}
|
|
142823
|
+
}
|
|
142824
|
+
|
|
142825
|
+
struct Edges {
|
|
142826
|
+
var leading = Edge()
|
|
142827
|
+
var trailing = Edge()
|
|
142828
|
+
}
|
|
142829
|
+
|
|
142830
|
+
@Published var edges = Edges()
|
|
142831
|
+
var emit: ((String, NSDictionary) -> Void)?
|
|
142832
|
+
}
|
|
142833
|
+
|
|
142834
|
+
@MainActor
|
|
142835
|
+
private struct PeachDirectSwipeRow: View {
|
|
142836
|
+
@ObservedObject var configuration: PeachDirectSwipeConfiguration
|
|
142837
|
+
@ObservedObject var children: OneNativeChildren
|
|
142838
|
+
|
|
142839
|
+
var body: some View {
|
|
142840
|
+
Group {
|
|
142841
|
+
ForEach(children.items) { child in child.content }
|
|
142842
|
+
}
|
|
142843
|
+
.swipeActions(edge: .leading, allowsFullSwipe: configuration.edges.leading.fullSwipe) {
|
|
142844
|
+
buttons(configuration.edges.leading, edge: "leading")
|
|
142845
|
+
}
|
|
142846
|
+
.swipeActions(edge: .trailing, allowsFullSwipe: configuration.edges.trailing.fullSwipe) {
|
|
142847
|
+
buttons(configuration.edges.trailing, edge: "trailing")
|
|
142848
|
+
}
|
|
142849
|
+
}
|
|
142850
|
+
|
|
142851
|
+
@ViewBuilder
|
|
142852
|
+
private func buttons(_ group: PeachDirectSwipeConfiguration.Edge, edge: String) -> some View {
|
|
142853
|
+
ForEach(group.actions) { action in
|
|
142854
|
+
let role: ButtonRole? = action.destructive ? .destructive : nil
|
|
142855
|
+
let activate: () -> Void = { configuration.emit?("action", ["edge": edge, "index": action.id]) }
|
|
142856
|
+
let tint = action.tint.map { Color(uiColor: $0) }
|
|
142857
|
+
if let symbol = action.symbol {
|
|
142858
|
+
Button(action.title, systemImage: symbol, role: role, action: activate).tint(tint)
|
|
142859
|
+
} else {
|
|
142860
|
+
Button(action.title, role: role, action: activate).tint(tint)
|
|
142861
|
+
}
|
|
142862
|
+
}
|
|
142863
|
+
}
|
|
142864
|
+
}
|
|
142865
|
+
|
|
142866
|
+
@MainActor
|
|
142867
|
+
@objc(PeachDirectSwipeActionsView)
|
|
142868
|
+
public final class PeachDirectSwipeActionsView: OneNativeContainerView {
|
|
142869
|
+
private let configuration: PeachDirectSwipeConfiguration
|
|
142870
|
+
private let slot: OneNativeContainerSlotView
|
|
142871
|
+
|
|
142872
|
+
@objc public init() {
|
|
142873
|
+
let configuration = PeachDirectSwipeConfiguration()
|
|
142874
|
+
self.configuration = configuration
|
|
142875
|
+
slot = OneNativeContainerSlotView(frame: .zero)
|
|
142876
|
+
super.init(wrap: { children, _ in
|
|
142877
|
+
AnyView(PeachDirectSwipeRow(configuration: configuration, children: children))
|
|
142878
|
+
})
|
|
142879
|
+
insertChild(slot, at: 0)
|
|
142880
|
+
}
|
|
142881
|
+
|
|
142882
|
+
required init?(coder: NSCoder) { fatalError("init(coder:) is unavailable") }
|
|
142883
|
+
|
|
142884
|
+
@objc(configureLeading:trailing:fullSwipe:emit:)
|
|
142885
|
+
public func configure(leading: [[String: Any]], trailing: [[String: Any]], fullSwipe: [String: Bool],
|
|
142886
|
+
emit: @escaping (String, NSDictionary) -> Void
|
|
142887
|
+
) {
|
|
142888
|
+
configuration.emit = emit
|
|
142889
|
+
configuration.edges = .init(leading: .init(leading, fullSwipe: fullSwipe["leading"] == true),
|
|
142890
|
+
trailing: .init(trailing, fullSwipe: fullSwipe["trailing"] == true))
|
|
142891
|
+
}
|
|
142892
|
+
|
|
142893
|
+
@objc public func setRow(_ view: UIView?) {
|
|
142894
|
+
guard slot.content !== view else { return }
|
|
142895
|
+
slot.content?.removeFromSuperview()
|
|
142896
|
+
slot.content = view
|
|
142897
|
+
refreshRow(for: slot)
|
|
142898
|
+
}
|
|
142899
|
+
|
|
142900
|
+
public override func layoutSubviews() {
|
|
142901
|
+
slot.configure(height: bounds.height, width: 0)
|
|
142902
|
+
super.layoutSubviews()
|
|
142903
|
+
}
|
|
142904
|
+
}
|
|
142905
|
+
|
|
142784
142906
|
@MainActor
|
|
142785
142907
|
private final class PeachDirectTableView: UITableView {
|
|
142786
142908
|
var onLayoutBounds: ((CGSize) -> Void)?
|
|
@@ -143914,26 +144036,28 @@ public struct OneDirectStageView: View {
|
|
|
143914
144036
|
public init() {}
|
|
143915
144037
|
|
|
143916
144038
|
public var body: some View {
|
|
143917
|
-
OneDirectStageRepresentable(tick: tick)
|
|
144039
|
+
OneDirectStageRepresentable(tick: tick, onDirty: { tick &+= 1 })
|
|
143918
144040
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
143919
|
-
.onAppear {
|
|
143920
|
-
PeachOneDirectStage.shared.onStageDirty = {
|
|
143921
|
-
tick &+= 1
|
|
143922
|
-
}
|
|
143923
|
-
}
|
|
143924
144041
|
}
|
|
143925
144042
|
}
|
|
143926
144043
|
|
|
143927
144044
|
private struct OneDirectStageRepresentable: UIViewRepresentable {
|
|
143928
144045
|
let tick: UInt64
|
|
144046
|
+
let onDirty: () -> Void
|
|
143929
144047
|
|
|
143930
144048
|
func makeUIView(context: Context) -> UIView {
|
|
143931
|
-
PeachOneDirectStage.shared
|
|
144049
|
+
let stage = PeachOneDirectStage.shared
|
|
144050
|
+
stage.onStageDirty = onDirty
|
|
144051
|
+
return stage.stageView
|
|
143932
144052
|
}
|
|
143933
144053
|
|
|
143934
144054
|
func updateUIView(_ uiView: UIView, context: Context) {
|
|
143935
144055
|
_ = tick
|
|
143936
144056
|
}
|
|
144057
|
+
|
|
144058
|
+
static func dismantleUIView(_ uiView: UIView, coordinator: ()) {
|
|
144059
|
+
PeachOneDirectStage.shared.onStageDirty = nil
|
|
144060
|
+
}
|
|
143937
144061
|
}
|
|
143938
144062
|
`;
|
|
143939
144063
|
PEACH_ONE_HOST_SHIMS = {
|
|
@@ -144055,6 +144179,9 @@ uint32_t peach_one_node_css_color(uint32_t nodeLo, uint32_t nodeHi, const char*
|
|
|
144055
144179
|
uint32_t sourceLen, double* rgbaOut);
|
|
144056
144180
|
PEACH_ONE_GUEST_IMPORT("node_layout_size")
|
|
144057
144181
|
uint32_t peach_one_node_layout_size(uint32_t nodeLo, uint32_t nodeHi, double* sizeOut);
|
|
144182
|
+
PEACH_ONE_GUEST_IMPORT("slot_content_frame")
|
|
144183
|
+
uint32_t peach_one_slot_content_frame(uint32_t ownerLo, uint32_t ownerHi,
|
|
144184
|
+
uint32_t contentLo, uint32_t contentHi, double x, double y, double width, double height);
|
|
144058
144185
|
PEACH_ONE_GUEST_IMPORT("wake_stage")
|
|
144059
144186
|
void peach_one_wake_stage(void);
|
|
144060
144187
|
}
|
|
@@ -144113,6 +144240,61 @@ UIColor* PeachPlatformColor(NSString* keyword) {
|
|
|
144113
144240
|
return keyword ? colors[keyword.lowercaseString] : nil;
|
|
144114
144241
|
}
|
|
144115
144242
|
|
|
144243
|
+
@interface PeachDirectSwipeActionsContainer : NSObject <PeachContainer>
|
|
144244
|
+
@end
|
|
144245
|
+
|
|
144246
|
+
static NSArray<NSDictionary*>* SwiftSwipeActions(id items) {
|
|
144247
|
+
if (![items isKindOfClass:NSArray.class]) return @[];
|
|
144248
|
+
NSArray* entries = static_cast<NSArray*>(items);
|
|
144249
|
+
NSMutableArray* actions = [NSMutableArray arrayWithCapacity:entries.count];
|
|
144250
|
+
for (NSDictionary* item in entries) {
|
|
144251
|
+
if (![item isKindOfClass:NSDictionary.class]) return @[];
|
|
144252
|
+
NSMutableDictionary* action = [item mutableCopy];
|
|
144253
|
+
action[@"color"] = PeachProcessedColor(item[@"color"]);
|
|
144254
|
+
[actions addObject:action];
|
|
144255
|
+
}
|
|
144256
|
+
return actions;
|
|
144257
|
+
}
|
|
144258
|
+
|
|
144259
|
+
@implementation PeachDirectSwipeActionsContainer {
|
|
144260
|
+
PeachDirectSwipeActionsView* _view;
|
|
144261
|
+
peach_node _child;
|
|
144262
|
+
__weak UIView* _row;
|
|
144263
|
+
}
|
|
144264
|
+
|
|
144265
|
+
- (void)configure:(NSDictionary*)spec emit:(PeachContainerEmit)emit {
|
|
144266
|
+
if (!_view) _view = [PeachDirectSwipeActionsView new];
|
|
144267
|
+
NSDictionary* fullSwipe = [spec[@"fullSwipe"] isKindOfClass:NSDictionary.class] ? spec[@"fullSwipe"] : @{};
|
|
144268
|
+
[_view configureLeading:SwiftSwipeActions(spec[@"leading"])
|
|
144269
|
+
trailing:SwiftSwipeActions(spec[@"trailing"])
|
|
144270
|
+
fullSwipe:fullSwipe
|
|
144271
|
+
emit:emit];
|
|
144272
|
+
}
|
|
144273
|
+
|
|
144274
|
+
- (void)child:(peach_node)node { _child = node; }
|
|
144275
|
+
|
|
144276
|
+
- (void)mountIn:(UIView*)container views:(id<PeachViewLookup>)views {
|
|
144277
|
+
_row = _child ? [views viewForNode:_child] : nil;
|
|
144278
|
+
_child = 0;
|
|
144279
|
+
[_view setRow:_row];
|
|
144280
|
+
if (_view.superview != container) [container addSubview:_view];
|
|
144281
|
+
_view.frame = container.bounds;
|
|
144282
|
+
}
|
|
144283
|
+
|
|
144284
|
+
- (BOOL)ownsView:(UIView*)view { return view && view == _row; }
|
|
144285
|
+
|
|
144286
|
+
- (void)unmount {
|
|
144287
|
+
[_view setRow:nil];
|
|
144288
|
+
[_view removeFromSuperview];
|
|
144289
|
+
_row = nil;
|
|
144290
|
+
}
|
|
144291
|
+
|
|
144292
|
+
- (void)detach {
|
|
144293
|
+
[self unmount];
|
|
144294
|
+
_view = nil;
|
|
144295
|
+
}
|
|
144296
|
+
@end
|
|
144297
|
+
|
|
144116
144298
|
@interface PeachDirectTableListContainer : NSObject <PeachContainer>
|
|
144117
144299
|
- (void)refreshLayoutIn:(UIView*)container views:(id<PeachViewLookup>)views;
|
|
144118
144300
|
@end
|
|
@@ -144264,11 +144446,24 @@ int32_t emitEventToHost(peach_node node, NSString* event, NSDictionary* payload)
|
|
|
144264
144446
|
return peach_one_emit_container_event(nodeLo(node), nodeHi(node), evPtr, evLen, jsPtr, jsLen);
|
|
144265
144447
|
}
|
|
144266
144448
|
|
|
144267
|
-
id<PeachContainer> makeContainer(NSString* kind, peach_node node) {
|
|
144268
|
-
if ([kind isEqualToString:@"swiftUI"])
|
|
144449
|
+
id<PeachContainer> makeContainer(NSString* kind, peach_node node, NSDictionary* spec) {
|
|
144450
|
+
if ([kind isEqualToString:@"swiftUI"]) {
|
|
144451
|
+
PeachSwiftUI* swift = [PeachSwiftUI new];
|
|
144452
|
+
NSString* control = spec[@"control"];
|
|
144453
|
+
if ([control isEqual:@"OneNativeContainerSlot"] || [control isEqual:@"OneNativeTab"]) {
|
|
144454
|
+
swift.slotContentLayout = ^(peach_node content, CGRect frame) {
|
|
144455
|
+
if (peach_one_slot_content_frame(nodeLo(node), nodeHi(node), nodeLo(content),
|
|
144456
|
+
nodeHi(content), frame.origin.x, frame.origin.y, frame.size.width, frame.size.height)) {
|
|
144457
|
+
[PeachOneDirectStage.shared markDirty];
|
|
144458
|
+
}
|
|
144459
|
+
};
|
|
144460
|
+
}
|
|
144461
|
+
return swift;
|
|
144462
|
+
}
|
|
144269
144463
|
if ([kind isEqualToString:@"sheet"]) return [PeachSheet new];
|
|
144270
144464
|
if ([kind isEqualToString:@"menu"]) return [PeachMenu new];
|
|
144271
144465
|
if ([kind isEqualToString:@"contextMenu"]) return [PeachContextMenu new];
|
|
144466
|
+
if ([kind isEqualToString:@"swipeActions"]) return [PeachDirectSwipeActionsContainer new];
|
|
144272
144467
|
if ([kind isEqualToString:@"tableList"]) return [PeachDirectTableListContainer new];
|
|
144273
144468
|
if ([kind isEqualToString:@"popover"]) {
|
|
144274
144469
|
return [[PeachPopover alloc] initWithDismissRequest:^BOOL(NSInteger revision) {
|
|
@@ -144377,7 +144572,7 @@ uint32_t peach_one_container_configure(uint32_t targetLo, uint32_t targetHi, con
|
|
|
144377
144572
|
}
|
|
144378
144573
|
if (!record.container) {
|
|
144379
144574
|
record.kind = kind;
|
|
144380
|
-
record.container = makeContainer(kind, node);
|
|
144575
|
+
record.container = makeContainer(kind, node, spec);
|
|
144381
144576
|
if (!record.container) return 0;
|
|
144382
144577
|
}
|
|
144383
144578
|
PeachContainerEmit emit = ^(NSString* event, NSDictionary* payload) {
|
|
@@ -144580,6 +144775,13 @@ void peach_one_container_command(uint32_t targetLo, uint32_t targetHi, const cha
|
|
|
144580
144775
|
@autoreleasepool {
|
|
144581
144776
|
const peach_node node = joinNode(targetLo, targetHi);
|
|
144582
144777
|
NSString* name = nsStringFromBytes(namePtr, nameLen);
|
|
144778
|
+
NSString* prefix = @"contextMenuInteraction:";
|
|
144779
|
+
if (node && [name hasPrefix:prefix]) {
|
|
144780
|
+
NSString* event = [name substringFromIndex:prefix.length];
|
|
144781
|
+
NSString* action = [event isEqualToString:@"action"] ? nsStringFromBytes(jsonPtr, jsonLen) : nil;
|
|
144782
|
+
emitEventToHost(node, event, action ? @{@"id": action} : @{});
|
|
144783
|
+
return;
|
|
144784
|
+
}
|
|
144583
144785
|
NSDictionary* payload = jsonDictFromBytes(jsonPtr, jsonLen);
|
|
144584
144786
|
if (node == 0) {
|
|
144585
144787
|
if ([name isEqualToString:@"completeAction"]) {
|
|
@@ -145916,7 +146118,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
145916
146118
|
watched.add(sourcePath);
|
|
145917
146119
|
}
|
|
145918
146120
|
files2.set("Sources/ControlsHost/ios/PeachOneDirectHost.mm", PEACH_ONE_DIRECT_HOST_MM);
|
|
145919
|
-
files2.set(
|
|
146121
|
+
files2.set(GUEST_ENTRY, GUEST_MAIN_SWIFT);
|
|
145920
146122
|
if (bindings) {
|
|
145921
146123
|
files2.set("Sources/One/One.swift", oneSDKModule);
|
|
145922
146124
|
for (const relative7 of ONE_SDK_RUNTIME_SOURCES) {
|
|
@@ -146025,7 +146227,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
146025
146227
|
...oneSDKShards.size ? { oneSDKShards } : {}
|
|
146026
146228
|
};
|
|
146027
146229
|
}
|
|
146028
|
-
var import_node_crypto93, import_node_fs155, import_node_module22, import_node_path158, import_node_url8, ONE_SDK_DEFINES, BRIDGE_SWIFT, GUEST_MAIN_SWIFT, ONE_SDK_RUNTIME_SOURCES, ONE_NATIVE_STYLE_SHARDS, ONE_NATIVE_STYLE_SHARD_MIN_BYTES, DIRECT_HOST_SWIFT_SEEDS, DIRECT_HOST_IOS_FILES;
|
|
146230
|
+
var import_node_crypto93, import_node_fs155, import_node_module22, import_node_path158, import_node_url8, ONE_SDK_DEFINES, GUEST_ENTRY, BRIDGE_SWIFT, GUEST_MAIN_SWIFT, ONE_SDK_RUNTIME_SOURCES, ONE_NATIVE_STYLE_SHARDS, ONE_NATIVE_STYLE_SHARD_MIN_BYTES, DIRECT_HOST_SWIFT_SEEDS, DIRECT_HOST_IOS_FILES;
|
|
146029
146231
|
var init_one_native_controls_package = __esm({
|
|
146030
146232
|
"src/one-native-controls-package.ts"() {
|
|
146031
146233
|
"use strict";
|
|
@@ -146048,6 +146250,7 @@ var init_one_native_controls_package = __esm({
|
|
|
146048
146250
|
init_swift_submit();
|
|
146049
146251
|
init_swift_toolchain();
|
|
146050
146252
|
ONE_SDK_DEFINES = ["ONE_IOS_26_SDK", "ONE_IOS_27_SDK", "ONE_IOS_27_1_SDK"];
|
|
146253
|
+
GUEST_ENTRY = "Sources/Controls/OneNativeControlsGuest.swift";
|
|
146051
146254
|
BRIDGE_SWIFT = `@_spi(Peach) import SwiftUI
|
|
146052
146255
|
@_spi(Peach) import UIKit
|
|
146053
146256
|
import PeachJSON
|
|
@@ -152372,7 +152575,7 @@ var init_nitro_superset = __esm({
|
|
|
152372
152575
|
init_nitroContract();
|
|
152373
152576
|
init_swift_standin_digest();
|
|
152374
152577
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
152375
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
152578
|
+
NITRO_COMPILER_DIGEST = true ? "404593a74548737612e2fa09c1e60bfd00e83e9c03c4c7a82bd6b938f70d1ced" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
152376
152579
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
152377
152580
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
152378
152581
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2724 | (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 __create = Object.create;
|
|
@@ -7086,11 +7086,12 @@ var init_swift_sdk_image_map = __esm({
|
|
|
7086
7086
|
});
|
|
7087
7087
|
|
|
7088
7088
|
// src/swiftSdkLinkContract.ts
|
|
7089
|
-
var SWIFT_SDK_FUNCTION_ADDRESS_PREFIX, OBJC_LOAD_FUNCTION;
|
|
7089
|
+
var SWIFT_SDK_FUNCTION_ADDRESS_PREFIX, SWIFT_SDK_APP_TABLE_BASE, OBJC_LOAD_FUNCTION;
|
|
7090
7090
|
var init_swiftSdkLinkContract = __esm({
|
|
7091
7091
|
"src/swiftSdkLinkContract.ts"() {
|
|
7092
7092
|
"use strict";
|
|
7093
7093
|
SWIFT_SDK_FUNCTION_ADDRESS_PREFIX = "__peach_sdk_function_address.";
|
|
7094
|
+
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
7094
7095
|
OBJC_LOAD_FUNCTION = ".objcv2_load_function";
|
|
7095
7096
|
}
|
|
7096
7097
|
});
|
|
@@ -14249,7 +14250,7 @@ var init_binaryen_lock = __esm({
|
|
|
14249
14250
|
"darwin-arm64": {
|
|
14250
14251
|
asset: "arm64-macos",
|
|
14251
14252
|
upstreamSha256: "98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa",
|
|
14252
|
-
sha256: "
|
|
14253
|
+
sha256: "2cadf6373604091be7784a1dde396ccbe67964e9a5ddb40be19bb52d65cb23b7"
|
|
14253
14254
|
}
|
|
14254
14255
|
}
|
|
14255
14256
|
};
|
|
@@ -19356,7 +19357,6 @@ exit "$status"
|
|
|
19356
19357
|
var swift_sdk_image_exports = {};
|
|
19357
19358
|
__export(swift_sdk_image_exports, {
|
|
19358
19359
|
SWIFT_SDK_APP_MEMORY_BASE: () => SWIFT_SDK_APP_MEMORY_BASE,
|
|
19359
|
-
SWIFT_SDK_APP_TABLE_BASE: () => SWIFT_SDK_APP_TABLE_BASE,
|
|
19360
19360
|
SWIFT_SDK_IMAGE_BUNDLE: () => SWIFT_SDK_IMAGE_BUNDLE,
|
|
19361
19361
|
SWIFT_SDK_IMAGE_FILES: () => SWIFT_SDK_IMAGE_FILES,
|
|
19362
19362
|
SWIFT_SDK_MEMORY_BASE: () => SWIFT_SDK_MEMORY_BASE,
|
|
@@ -20028,7 +20028,7 @@ function readSwiftSdkManifest(image) {
|
|
|
20028
20028
|
}));
|
|
20029
20029
|
return setBoundedCache(cachedSdkManifests, cacheKey, { manifest, block, segments });
|
|
20030
20030
|
}
|
|
20031
|
-
var import_node_child_process24, import_node_crypto26, import_node_fs37, import_node_path37, import_node_util7, run2, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE,
|
|
20031
|
+
var import_node_child_process24, import_node_crypto26, import_node_fs37, import_node_path37, import_node_util7, run2, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
|
|
20032
20032
|
var init_swift_sdk_image = __esm({
|
|
20033
20033
|
"src/swift-sdk-image.ts"() {
|
|
20034
20034
|
"use strict";
|
|
@@ -20049,12 +20049,12 @@ var init_swift_sdk_image = __esm({
|
|
|
20049
20049
|
init_swift_sdk_image_wasm();
|
|
20050
20050
|
init_swift_toolchain();
|
|
20051
20051
|
init_swift_wasm_prune();
|
|
20052
|
+
init_swiftSdkLinkContract();
|
|
20052
20053
|
init_swiftTargetContract();
|
|
20053
20054
|
init_wasm_optimize();
|
|
20054
20055
|
run2 = (0, import_node_util7.promisify)(import_node_child_process24.execFile);
|
|
20055
20056
|
SWIFT_SDK_APP_MEMORY_BASE = 8372224;
|
|
20056
20057
|
SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024;
|
|
20057
|
-
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
20058
20058
|
EMPTY_APP = `import SwiftUI
|
|
20059
20059
|
|
|
20060
20060
|
@main
|
|
@@ -20197,7 +20197,6 @@ __export(swift_sdk_app_module_exports, {
|
|
|
20197
20197
|
linkSwiftAppModule: () => linkSwiftAppModule,
|
|
20198
20198
|
readSwiftSdkAppLink: () => readSwiftSdkAppLink,
|
|
20199
20199
|
readSwiftSdkUsage: () => readSwiftSdkUsage,
|
|
20200
|
-
selectSwiftSdkData: () => selectSwiftSdkData,
|
|
20201
20200
|
swiftAppModuleInputs: () => swiftAppModuleInputs,
|
|
20202
20201
|
swiftAppModuleThunkSection: () => swiftAppModuleThunkSection,
|
|
20203
20202
|
swiftSdkProjectionSpans: () => swiftSdkProjectionSpans,
|
|
@@ -21192,12 +21191,11 @@ function readSwiftSdkAppLink(file) {
|
|
|
21192
21191
|
return JSON.parse((0, import_node_zlib4.gunzipSync)((0, import_node_fs38.readFileSync)(file)).toString("utf8"));
|
|
21193
21192
|
}
|
|
21194
21193
|
function createSwiftSdkBinding(linkage, sdk, usage, projection) {
|
|
21195
|
-
const
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
]);
|
|
21194
|
+
const binding = bindSwiftAppModule(linkage, sdk);
|
|
21195
|
+
const { data, liveSlots } = selectSwiftSdkData(sdk, usage, linkage, projection);
|
|
21196
|
+
const bytes = Buffer.concat([binding, data]);
|
|
21199
21197
|
const sha2562 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto27.createHash)("sha256").update(bytes).digest("hex");
|
|
21200
|
-
return { bytes, sha256: sha2562 };
|
|
21198
|
+
return { bytes, sha256: sha2562, liveSlots };
|
|
21201
21199
|
}
|
|
21202
21200
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
21203
21201
|
const map = readWasmLinkMap(mapFile, false);
|
|
@@ -21727,7 +21725,18 @@ function selectSwiftSdkData(sdk, usage, linkage, projection) {
|
|
|
21727
21725
|
blob.set(run5.bytes, at + 12);
|
|
21728
21726
|
at += 12 + run5.bytes.length;
|
|
21729
21727
|
}
|
|
21730
|
-
|
|
21728
|
+
const selected = new Set(boundSlots);
|
|
21729
|
+
slots.forEach((slot, index) => {
|
|
21730
|
+
if (slot && liveFunctions[index]) selected.add(slot);
|
|
21731
|
+
});
|
|
21732
|
+
const liveSlots = Buffer.alloc((selected.size + 1) * 4);
|
|
21733
|
+
liveSlots.writeUInt32LE(selected.size, 0);
|
|
21734
|
+
let slotOffset = 4;
|
|
21735
|
+
for (const slot of selected) {
|
|
21736
|
+
liveSlots.writeUInt32LE(slot, slotOffset);
|
|
21737
|
+
slotOffset += 4;
|
|
21738
|
+
}
|
|
21739
|
+
return { data: blob, liveSlots };
|
|
21731
21740
|
}
|
|
21732
21741
|
function partitionParent(section2) {
|
|
21733
21742
|
return [
|
|
@@ -27588,14 +27597,17 @@ function readCompiledArtifact(directory, hash) {
|
|
|
27588
27597
|
return null;
|
|
27589
27598
|
if (!("sdk" in receipt)) return null;
|
|
27590
27599
|
const image = receipt.sdk;
|
|
27591
|
-
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string")
|
|
27600
|
+
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string" || typeof image.liveSlots !== "string")
|
|
27592
27601
|
return null;
|
|
27593
27602
|
const binding = (0, import_node_fs47.readFileSync)(import_node_path49.default.join(directory, "sdk-binding.bin"));
|
|
27594
27603
|
if ((0, import_node_crypto32.createHash)("sha256").update(binding).digest("hex") !== image.binding) return null;
|
|
27604
|
+
const liveSlots = (0, import_node_fs47.readFileSync)(import_node_path49.default.join(directory, "sdk-live-slots.bin"));
|
|
27605
|
+
if ((0, import_node_crypto32.createHash)("sha256").update(liveSlots).digest("hex") !== image.liveSlots)
|
|
27606
|
+
return null;
|
|
27595
27607
|
const sdk = {
|
|
27596
27608
|
key: image.key,
|
|
27597
27609
|
sha256: image.sha256,
|
|
27598
|
-
binding: { bytes: binding, sha256: image.binding }
|
|
27610
|
+
binding: { bytes: binding, sha256: image.binding, liveSlots }
|
|
27599
27611
|
};
|
|
27600
27612
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 }, sdk };
|
|
27601
27613
|
} catch (error) {
|
|
@@ -27611,8 +27623,13 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
27611
27623
|
try {
|
|
27612
27624
|
(0, import_node_fs47.writeFileSync)(import_node_path49.default.join(pending, "app.wasm"), artifact.bytes);
|
|
27613
27625
|
(0, import_node_fs47.writeFileSync)(import_node_path49.default.join(pending, "icu.gz"), artifact.icu.gzip);
|
|
27614
|
-
if (artifact.sdk)
|
|
27626
|
+
if (artifact.sdk) {
|
|
27615
27627
|
(0, import_node_fs47.writeFileSync)(import_node_path49.default.join(pending, "sdk-binding.bin"), artifact.sdk.binding.bytes);
|
|
27628
|
+
(0, import_node_fs47.writeFileSync)(
|
|
27629
|
+
import_node_path49.default.join(pending, "sdk-live-slots.bin"),
|
|
27630
|
+
artifact.sdk.binding.liveSlots
|
|
27631
|
+
);
|
|
27632
|
+
}
|
|
27616
27633
|
(0, import_node_fs47.writeFileSync)(
|
|
27617
27634
|
import_node_path49.default.join(pending, "artifact.json"),
|
|
27618
27635
|
JSON.stringify({
|
|
@@ -27622,12 +27639,13 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
27622
27639
|
sdk: artifact.sdk && {
|
|
27623
27640
|
key: artifact.sdk.key,
|
|
27624
27641
|
sha256: artifact.sdk.sha256,
|
|
27625
|
-
binding: artifact.sdk.binding.sha256
|
|
27642
|
+
binding: artifact.sdk.binding.sha256,
|
|
27643
|
+
liveSlots: (0, import_node_crypto32.createHash)("sha256").update(artifact.sdk.binding.liveSlots).digest("hex")
|
|
27626
27644
|
}
|
|
27627
27645
|
})
|
|
27628
27646
|
);
|
|
27629
27647
|
const outputs = ["app.wasm", "icu.gz"];
|
|
27630
|
-
if (artifact.sdk) outputs.push("sdk-binding.bin");
|
|
27648
|
+
if (artifact.sdk) outputs.push("sdk-binding.bin", "sdk-live-slots.bin");
|
|
27631
27649
|
for (const file of [...outputs, "artifact.json"]) {
|
|
27632
27650
|
(0, import_node_fs47.renameSync)(import_node_path49.default.join(pending, file), import_node_path49.default.join(directory, file));
|
|
27633
27651
|
}
|
|
@@ -29690,7 +29708,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
29690
29708
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
29691
29709
|
MULTI_MANIFEST_VERSION = 76;
|
|
29692
29710
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
29693
|
-
compilerSourceDigest = true ? "
|
|
29711
|
+
compilerSourceDigest = true ? "53c1ead5f57a27afe64baf0eb8a4013ee9c70573cf3aeb6ef826b3ec9571da83" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
29694
29712
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
29695
29713
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
29696
29714
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|