peachsim 0.1.675 → 0.1.677
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/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 +1 -1
- 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 +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 +33 -19
- package/dist-lib/menu.cjs +43 -1
- package/dist-lib/menu.mjs +40 -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/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 +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 +1 -1
- 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/content/Context.kt +6 -0
- package/kotlin/AppSources/android/content/res/Resources.kt +16 -0
- package/kotlin/AppSources/androidx/compose/ui/platform/AndroidCompositionLocals.kt +10 -2
- package/kotlin/AppSources/androidx/compose/ui/res/ColorResources.kt +16 -0
- package/kotlin/AppSources/androidx/compose/ui/res/StringResources.kt +11 -26
- package/kotlin/fixtures/kotlin-app-variants/Colors.kt +41 -0
- package/package.json +1 -1
- package/src/android-theme.ts +32 -16
- package/src/kotlin-app.ts +69 -31
- package/src/kotlin-host.ts +44 -33
- package/src/menu.ts +48 -0
package/src/menu.ts
CHANGED
|
@@ -29,6 +29,25 @@ export const SOOTSIM_AMBIENT_GLOW_LABELS: Record<SootSimAmbientGlowLevel, string
|
|
|
29
29
|
full: 'Full',
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// the stage behind the device: system follows the mac's appearance (white in
|
|
33
|
+
// light mode, black in dark), or one pinned color. one value per host, like
|
|
34
|
+
// the glow level above.
|
|
35
|
+
export type SootSimStageBackground = 'system' | 'light' | 'dark' | 'gray'
|
|
36
|
+
export const SOOTSIM_STAGE_BACKGROUNDS = ['system', 'light', 'dark', 'gray'] as const
|
|
37
|
+
|
|
38
|
+
export function isSootSimStageBackground(
|
|
39
|
+
value: unknown,
|
|
40
|
+
): value is SootSimStageBackground {
|
|
41
|
+
return value === 'system' || value === 'light' || value === 'dark' || value === 'gray'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const SOOTSIM_STAGE_BACKGROUND_LABELS: Record<SootSimStageBackground, string> = {
|
|
45
|
+
system: 'System',
|
|
46
|
+
light: 'Light',
|
|
47
|
+
dark: 'Dark',
|
|
48
|
+
gray: 'Gray',
|
|
49
|
+
}
|
|
50
|
+
|
|
32
51
|
// render resolution: how many pixels peach renders per iphone point. one
|
|
33
52
|
// setting with three states, carried by every host exactly like the ambient
|
|
34
53
|
// glow level above: the menus, the persisted setting, the ?renderResolution=
|
|
@@ -86,6 +105,8 @@ export interface SootSimMenuState {
|
|
|
86
105
|
showRail: boolean
|
|
87
106
|
solidWindow: boolean
|
|
88
107
|
ambientGlow: SootSimAmbientGlowLevel
|
|
108
|
+
stageBackground: SootSimStageBackground
|
|
109
|
+
stageChecker: boolean
|
|
89
110
|
renderResolution: SootSimRenderResolution
|
|
90
111
|
// presentation: the real rendering, or the clean structural wireframe
|
|
91
112
|
wireframe: boolean
|
|
@@ -134,6 +155,7 @@ export type MenuItemDef = SootSimMenuItemDef
|
|
|
134
155
|
export type MenuDef = SootSimMenuDef
|
|
135
156
|
export type MenuState = SootSimMenuState
|
|
136
157
|
export type AmbientGlowLevel = SootSimAmbientGlowLevel
|
|
158
|
+
export type StageBackground = SootSimStageBackground
|
|
137
159
|
export type RenderResolution = SootSimRenderResolution
|
|
138
160
|
export type ShortcutPlatform = SootSimMenuPlatform
|
|
139
161
|
export type MenuShortcutEntry = SootSimMenuShortcutEntry
|
|
@@ -550,6 +572,32 @@ function windowMenu(state: SootSimMenuState): SootSimMenuDef {
|
|
|
550
572
|
actionPayload: level,
|
|
551
573
|
})),
|
|
552
574
|
},
|
|
575
|
+
{
|
|
576
|
+
// browser only, with the glow: the stage, its dropped wallpaper and
|
|
577
|
+
// the glow all live around the device in the browser shell. the
|
|
578
|
+
// wallpaper actions run in the shell, which owns the image.
|
|
579
|
+
label: 'Background',
|
|
580
|
+
hiddenIn: 'electron',
|
|
581
|
+
items: [
|
|
582
|
+
...SOOTSIM_STAGE_BACKGROUNDS.map((background) => ({
|
|
583
|
+
label: SOOTSIM_STAGE_BACKGROUND_LABELS[background],
|
|
584
|
+
type: 'radio' as const,
|
|
585
|
+
checked: state.stageBackground === background,
|
|
586
|
+
action: 'set-stage-background',
|
|
587
|
+
actionPayload: background,
|
|
588
|
+
})),
|
|
589
|
+
{ type: 'separator' as const },
|
|
590
|
+
{
|
|
591
|
+
label: 'Checker',
|
|
592
|
+
type: 'checkbox' as const,
|
|
593
|
+
checked: state.stageChecker,
|
|
594
|
+
action: 'toggle-stage-checker',
|
|
595
|
+
},
|
|
596
|
+
{ type: 'separator' as const },
|
|
597
|
+
{ label: 'Choose Wallpaper…', action: 'choose-wallpaper' },
|
|
598
|
+
{ label: 'Clear Wallpaper', action: 'clear-wallpaper' },
|
|
599
|
+
],
|
|
600
|
+
},
|
|
553
601
|
{
|
|
554
602
|
// every host: the level only changes backing-store sizes, so the
|
|
555
603
|
// device-shaped electron window shows it the same as the browser.
|