peachsim 0.1.658 → 0.1.660
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/cli-update.ts +53 -21
- package/cli/commands/compat.ts +6 -2
- package/cli/commands/control.ts +12 -3
- package/cli/commands/inspect.ts +16 -14
- package/cli/commands/upgrade.ts +4 -2
- package/cli/current-sim.ts +4 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +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/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- 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 +5 -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 +11 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.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/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.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 +15 -11
- 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.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/kotlin/AppSources/android/app/Activity.kt +90 -1
- package/kotlin/AppSources/android/app/Application.kt +4 -0
- package/kotlin/AppSources/android/content/res/Configuration.kt +4 -0
- package/kotlin/AppSources/android/content/res/Resources.kt +3 -1
- package/kotlin/AppSources/android/os/Bundle.kt +9 -3
- package/kotlin/AppSources/androidx/activity/BackEventCompat.kt +17 -0
- package/kotlin/AppSources/androidx/activity/Cancellable.kt +5 -0
- package/kotlin/AppSources/androidx/activity/ComponentActivity.kt +58 -6
- package/kotlin/AppSources/androidx/activity/OnBackPressedCallback.kt +28 -0
- package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcher.kt +144 -0
- package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcherOwner.kt +7 -0
- package/kotlin/AppSources/androidx/activity/compose/BackHandler.kt +55 -0
- package/kotlin/AppSources/dev/peach/app/PeachApp.kt +231 -47
- package/kotlin/AppSources/java/lang/Runnable.kt +6 -0
- package/kotlin/ComposeSources/PeachComposeHost.kt +15 -3
- package/kotlin/fork/README.md +1 -0
- package/kotlin/fork/compose-worker-globals.patch +26 -0
- package/kotlin/fork/fork.json +1 -1
- package/kotlin/toolchain.json +3 -3
- package/package.json +1 -1
- package/src/kotlin-app.ts +18 -0
- package/src/kotlin-host.ts +10 -0
package/kotlin/toolchain.json
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
],
|
|
19
19
|
"composeLibraries": [
|
|
20
20
|
{
|
|
21
|
-
"name": "ui-wasm-js-1.13.0-alpha01-peach-
|
|
22
|
-
"url": "https://r2.rnxsim.com/peach-kotlin-fork/
|
|
23
|
-
"sha256": "
|
|
21
|
+
"name": "ui-wasm-js-1.13.0-alpha01-peach-8caddb83ba2f.klib",
|
|
22
|
+
"url": "https://r2.rnxsim.com/peach-kotlin-fork/8caddb83ba2f8dddd4c869eca936f0039d99c39c986f8af162e59eb27dbb92ed/ui-wasm-js-1.13.0-alpha01.klib",
|
|
23
|
+
"sha256": "8caddb83ba2f8dddd4c869eca936f0039d99c39c986f8af162e59eb27dbb92ed"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "foundation-wasm-js-1.13.0-alpha01.klib",
|
package/package.json
CHANGED
package/src/kotlin-app.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface KotlinAppProject {
|
|
|
29
29
|
}
|
|
30
30
|
applicationClass: string | null
|
|
31
31
|
launcher: { name: string; targetClass: string }
|
|
32
|
+
// back reaches the activity through its window's back dispatch rather than
|
|
33
|
+
// the back key's onBackPressed
|
|
34
|
+
predictiveBack: boolean
|
|
35
|
+
// the activity's configChanges includes uiMode: a night mode change reaches
|
|
36
|
+
// onConfigurationChanged instead of relaunching it
|
|
37
|
+
handlesUiMode: boolean
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
export interface ComposeAndroidPins {
|
|
@@ -392,6 +398,16 @@ export function readKotlinApp(
|
|
|
392
398
|
themeOwner?.attributes[`${ANDROID_NS}theme`] ??
|
|
393
399
|
application.attributes[`${ANDROID_NS}theme`]
|
|
394
400
|
const applicationName = application.attributes[`${ANDROID_NS}name`]
|
|
401
|
+
// ParsingPackageUtils: the application's enableOnBackInvokedCallback
|
|
402
|
+
// defaults on above target SDK 35; ParsedActivityUtils: an activity's own
|
|
403
|
+
// value overrides it
|
|
404
|
+
const predictiveBack =
|
|
405
|
+
(themeOwner?.attributes[`${ANDROID_NS}enableOnBackInvokedCallback`] ??
|
|
406
|
+
application.attributes[`${ANDROID_NS}enableOnBackInvokedCallback`] ??
|
|
407
|
+
String(targetSdk > 35)) === 'true'
|
|
408
|
+
const handlesUiMode = (themeOwner?.attributes[`${ANDROID_NS}configChanges`] ?? '')
|
|
409
|
+
.split('|')
|
|
410
|
+
.includes('uiMode')
|
|
395
411
|
|
|
396
412
|
const sources: string[] = []
|
|
397
413
|
for (const set of ['java', 'kotlin']) {
|
|
@@ -421,5 +437,7 @@ export function readKotlinApp(
|
|
|
421
437
|
window: readWindowTheme(moduleDir, theme, targetSdk),
|
|
422
438
|
applicationClass: applicationName ? className(applicationName) : null,
|
|
423
439
|
launcher: { name: launcherName, targetClass },
|
|
440
|
+
predictiveBack,
|
|
441
|
+
handlesUiMode,
|
|
424
442
|
}
|
|
425
443
|
}
|
package/src/kotlin-host.ts
CHANGED
|
@@ -349,10 +349,20 @@ export async function kotlinAppArtifact(
|
|
|
349
349
|
' ),',
|
|
350
350
|
` { ${app.applicationClass ?? 'android.app.Application'}() },`,
|
|
351
351
|
` { ${app.launcher.targetClass}() },`,
|
|
352
|
+
` ${app.handlesUiMode},`,
|
|
352
353
|
' ),',
|
|
353
354
|
' density, fontScale, locale, backend, stencilBits, regular, medium, bold, statusBar, navigationBar, night, invalidate,',
|
|
354
355
|
')',
|
|
355
356
|
'',
|
|
357
|
+
'@JsExport',
|
|
358
|
+
`fun peachAppBack(): Boolean = dev.peach.app.peachAppBack(${app.predictiveBack})`,
|
|
359
|
+
'',
|
|
360
|
+
'@JsExport',
|
|
361
|
+
'fun peachAppTask(foreground: Boolean) = dev.peach.app.peachAppTask(foreground)',
|
|
362
|
+
'',
|
|
363
|
+
'@JsExport',
|
|
364
|
+
'fun peachAppNight(night: Boolean) = dev.peach.app.peachAppNight(night)',
|
|
365
|
+
'',
|
|
356
366
|
].join('\n'),
|
|
357
367
|
}
|
|
358
368
|
const shims = [
|