peachsim 0.1.2203 → 0.1.2205
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 +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 +27 -15
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +10 -6
- 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 +27 -15
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +1 -1
- 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 +18 -10
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- 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 +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +47 -23
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- 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 +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/android-drawables.ts +1 -1
- package/src/android-layout-ids.ts +34 -11
- package/src/expo-native-prebuilt.ts +12 -5
- package/src/kotlin-host.ts +20 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2205 | (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;
|
package/kotlin/sdk.tar.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/android-drawables.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface AndroidDrawable {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// the device the oracle measures runs API 37
|
|
78
|
-
const DEVICE_API = 37
|
|
78
|
+
export const DEVICE_API = 37
|
|
79
79
|
// ResTable_config's density values, as the resource table records them
|
|
80
80
|
const BUCKETS: Record<string, number> = {
|
|
81
81
|
ldpi: 120,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import path from 'node:path'
|
|
3
|
+
import { DEVICE_API } from './android-drawables'
|
|
3
4
|
import { parseXml, type XmlElement } from './android-xml'
|
|
4
5
|
|
|
5
6
|
// the layout names and view ids a module's R class declares: every layout
|
|
@@ -8,11 +9,22 @@ import { parseXml, type XmlElement } from './android-xml'
|
|
|
8
9
|
export interface AndroidLayoutIds {
|
|
9
10
|
layouts: string[]
|
|
10
11
|
ids: string[]
|
|
11
|
-
//
|
|
12
|
-
|
|
12
|
+
// each layout's files the device API can load, which Resources chooses
|
|
13
|
+
// between for the configuration
|
|
14
|
+
elements: Map<string, LayoutVariant[]>
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
// a layout directory's qualifiers as ResTable_config values: orientation 1
|
|
18
|
+
// port, 2 land; night 1 notnight, 2 night; 0 leaves either unset
|
|
19
|
+
export interface LayoutVariant {
|
|
20
|
+
orientation: number
|
|
21
|
+
night: number
|
|
22
|
+
version: number
|
|
23
|
+
element: XmlElement
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// the qualifiers Peach resolves for layouts, in aapt2's required order
|
|
27
|
+
const LAYOUT_DIR = /^layout(?:-(port|land))?(?:-(notnight|night))?(?:-v(\d+))?$/
|
|
16
28
|
const ID_REFERENCE = /@\+?id\/([A-Za-z0-9_.]+)/g
|
|
17
29
|
const ID_ITEM = /<item\b[^>]*\btype\s*=\s*"id"[^>]*>/g
|
|
18
30
|
const ITEM_NAME = /\bname\s*=\s*"([^"]+)"/
|
|
@@ -21,19 +33,30 @@ export function readAndroidLayoutIds(moduleDir: string): AndroidLayoutIds {
|
|
|
21
33
|
const res = path.join(moduleDir, 'src/main/res')
|
|
22
34
|
const layouts = new Set<string>()
|
|
23
35
|
const ids = new Set<string>()
|
|
24
|
-
const elements = new Map<string,
|
|
36
|
+
const elements = new Map<string, LayoutVariant[]>()
|
|
25
37
|
for (const dir of fs.existsSync(res) ? fs.readdirSync(res).sort() : []) {
|
|
26
38
|
const directory = path.join(res, dir)
|
|
27
|
-
if (
|
|
39
|
+
if (dir === 'layout' || dir.startsWith('layout-')) {
|
|
40
|
+
const match = LAYOUT_DIR.exec(dir)
|
|
41
|
+
if (!match)
|
|
42
|
+
throw new Error(
|
|
43
|
+
`${res}/${dir}: layouts under this qualifier are not resolved by Peach yet`,
|
|
44
|
+
)
|
|
45
|
+
const orientation = match[1] === 'port' ? 1 : match[1] === 'land' ? 2 : 0
|
|
46
|
+
const night = match[2] === 'notnight' ? 1 : match[2] === 'night' ? 2 : 0
|
|
47
|
+
const version = Number(match[3] ?? 0)
|
|
28
48
|
for (const entry of fs.readdirSync(directory).sort()) {
|
|
29
49
|
if (!entry.endsWith('.xml')) continue
|
|
30
|
-
|
|
50
|
+
const name = entry.slice(0, -'.xml'.length)
|
|
51
|
+
layouts.add(name)
|
|
31
52
|
const xml = fs.readFileSync(path.join(directory, entry), 'utf8')
|
|
32
|
-
for (const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
for (const reference of xml.matchAll(ID_REFERENCE)) ids.add(reference[1])
|
|
54
|
+
const element = parseXml(xml, path.join(directory, entry)).children[0]
|
|
55
|
+
if (!element || version > DEVICE_API) continue
|
|
56
|
+
elements.set(name, [
|
|
57
|
+
...(elements.get(name) ?? []),
|
|
58
|
+
{ orientation, night, version, element },
|
|
59
|
+
])
|
|
37
60
|
}
|
|
38
61
|
} else if (dir.startsWith('values')) {
|
|
39
62
|
for (const entry of fs.readdirSync(directory).sort()) {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
// answered packages, the Swift pin and these compilers' sources. an app whose
|
|
9
9
|
// inputs match fetches one metadata file and loads the published wasm; any
|
|
10
10
|
// other app prepares and compiles as before. identity values stay out of the
|
|
11
|
-
// artifact: an app reads its own from its prebuilt Xcode project
|
|
11
|
+
// artifact: an app reads its own from its prebuilt Xcode project, with the
|
|
12
|
+
// plist values pod install added.
|
|
12
13
|
import { createHash } from 'node:crypto'
|
|
13
14
|
import fs from 'node:fs'
|
|
14
15
|
import { createRequire } from 'node:module'
|
|
@@ -330,13 +331,19 @@ export function servedExpoSwift(
|
|
|
330
331
|
if (!entry.expoSwift) return null
|
|
331
332
|
const rootId = `${createHash('sha256').update(fs.realpathSync(appRoot)).digest('hex')}/Expo`
|
|
332
333
|
if (app.infoPlist === null) throw new Error('the prebuilt app target has no Info.plist')
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
// pod install writes values such as RCTNewArchEnabled into the plist after
|
|
335
|
+
// prebuild. the compile reads identity from that plist, so the hit must too.
|
|
336
|
+
const installed = installedInfoPlist(app.infoPlist, entry.infoPlist)
|
|
337
|
+
const infoPlist = Buffer.from(installed).toString('base64')
|
|
336
338
|
return {
|
|
337
339
|
...entry.expoSwift,
|
|
338
340
|
...(entry.identity
|
|
339
|
-
? {
|
|
341
|
+
? {
|
|
342
|
+
nativeAppIdentity: readNativeAppIdentityFromXcodeTarget({
|
|
343
|
+
...app,
|
|
344
|
+
infoPlist: installed,
|
|
345
|
+
}),
|
|
346
|
+
}
|
|
340
347
|
: {}),
|
|
341
348
|
modules: entry.expoSwift.modules.map((module) => ({
|
|
342
349
|
...module,
|
package/src/kotlin-host.ts
CHANGED
|
@@ -865,7 +865,7 @@ export async function kotlinAppArtifact(
|
|
|
865
865
|
'',
|
|
866
866
|
'@JsExport',
|
|
867
867
|
'fun peachAppMount(density: Float, fontScale: Float, locale: String,',
|
|
868
|
-
' font: String, insets: String, night: Boolean,',
|
|
868
|
+
' font: String, insets: String, night: Boolean, orientation: Int,',
|
|
869
869
|
' invalidate: (Boolean) -> Unit): String = dev.peach.app.peachStartApp(',
|
|
870
870
|
' dev.peach.app.PeachAppSpec(',
|
|
871
871
|
' dev.peach.app.compiledAppResources,',
|
|
@@ -882,7 +882,7 @@ export async function kotlinAppArtifact(
|
|
|
882
882
|
' },',
|
|
883
883
|
` ${app.predictiveBack},`,
|
|
884
884
|
' ),',
|
|
885
|
-
' density, fontScale, locale, font, insets, night, invalidate,',
|
|
885
|
+
' density, fontScale, locale, font, insets, night, orientation, invalidate,',
|
|
886
886
|
')',
|
|
887
887
|
'',
|
|
888
888
|
'@JsExport',
|
|
@@ -1009,15 +1009,21 @@ function appResourceSources(app: KotlinAppProject): Record<string, string> {
|
|
|
1009
1009
|
.join(',\n')}\n)`,
|
|
1010
1010
|
})),
|
|
1011
1011
|
},
|
|
1012
|
-
// a layout is
|
|
1012
|
+
// a layout is the element tree of each file the device API can load, with
|
|
1013
|
+
// its directory's qualifiers
|
|
1013
1014
|
{
|
|
1014
1015
|
type: 'layout',
|
|
1015
1016
|
table: 'peachAppLayouts',
|
|
1016
|
-
value: '
|
|
1017
|
-
entries: app.layoutIds.layouts.map((name) => {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1017
|
+
value: 'List<LayoutVariant>',
|
|
1018
|
+
entries: app.layoutIds.layouts.map((name) => ({
|
|
1019
|
+
name,
|
|
1020
|
+
init: `listOf(${(app.layoutIds.elements.get(name) ?? [])
|
|
1021
|
+
.map(
|
|
1022
|
+
(variant) =>
|
|
1023
|
+
`LayoutVariant(${variant.orientation}, ${variant.night}, ${variant.version}, ${layoutInit(variant.element)})`,
|
|
1024
|
+
)
|
|
1025
|
+
.join(', ')})`,
|
|
1026
|
+
})),
|
|
1021
1027
|
},
|
|
1022
1028
|
// the day and the night ARGB
|
|
1023
1029
|
{
|
|
@@ -1045,7 +1051,11 @@ function appResourceSources(app: KotlinAppProject): Record<string, string> {
|
|
|
1045
1051
|
})),
|
|
1046
1052
|
})
|
|
1047
1053
|
const kinds = tableKinds.map((kind, index) => numbered(kind, index))
|
|
1048
|
-
const viewClasses = layoutViewClasses(
|
|
1054
|
+
const viewClasses = layoutViewClasses(
|
|
1055
|
+
[...app.layoutIds.elements.values()].flatMap((variants) =>
|
|
1056
|
+
variants.map((variant) => variant.element),
|
|
1057
|
+
),
|
|
1058
|
+
)
|
|
1049
1059
|
const rKinds = [
|
|
1050
1060
|
...kinds,
|
|
1051
1061
|
...nameOnly.map((kind, index) =>
|
|
@@ -1084,6 +1094,7 @@ function appResourceSources(app: KotlinAppProject): Record<string, string> {
|
|
|
1084
1094
|
'androidx.compose.ui.unit.Dp',
|
|
1085
1095
|
'android.content.Context',
|
|
1086
1096
|
'android.util.AttributeSet',
|
|
1097
|
+
'android.content.res.LayoutVariant',
|
|
1087
1098
|
'android.view.LayoutNode',
|
|
1088
1099
|
'android.view.View',
|
|
1089
1100
|
].map((name) => `import ${name}`),
|