peachsim 0.1.663 → 0.1.664
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/commands/control.ts +9 -17
- package/cli/commands/inspect/core.ts +45 -32
- package/cli/commands/inspect/settling.ts +31 -21
- 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 +2 -6
- package/dist-lib/bridge-contract-input.mjs +2 -6
- package/dist-lib/bridge-contract.cjs +6 -1
- package/dist-lib/bridge-contract.mjs +5 -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 +17 -24
- 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 +1 -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 +52 -39
- package/dist-lib/sdk.mjs +50 -39
- package/dist-lib/skills.cjs +38 -34
- 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/fixtures/kotlin-app-variants/Widgets.kt +56 -0
- package/package.json +1 -1
- package/src/bridge-contract-input.ts +1 -5
- package/src/bridge-contract.ts +16 -4
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
package dev.contrast.kotlinapp
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.background
|
|
4
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
5
|
+
import androidx.compose.foundation.layout.Column
|
|
6
|
+
import androidx.compose.foundation.layout.Row
|
|
7
|
+
import androidx.compose.foundation.layout.fillMaxSize
|
|
8
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
9
|
+
import androidx.compose.foundation.layout.padding
|
|
10
|
+
import androidx.compose.foundation.layout.safeDrawingPadding
|
|
11
|
+
import androidx.compose.material3.Button
|
|
12
|
+
import androidx.compose.material3.Card
|
|
13
|
+
import androidx.compose.material3.Checkbox
|
|
14
|
+
import androidx.compose.material3.FilterChip
|
|
15
|
+
import androidx.compose.material3.HorizontalDivider
|
|
16
|
+
import androidx.compose.material3.LinearProgressIndicator
|
|
17
|
+
import androidx.compose.material3.OutlinedButton
|
|
18
|
+
import androidx.compose.material3.RadioButton
|
|
19
|
+
import androidx.compose.material3.Slider
|
|
20
|
+
import androidx.compose.material3.Switch
|
|
21
|
+
import androidx.compose.material3.Text
|
|
22
|
+
import androidx.compose.runtime.Composable
|
|
23
|
+
import androidx.compose.runtime.getValue
|
|
24
|
+
import androidx.compose.runtime.mutableStateOf
|
|
25
|
+
import androidx.compose.runtime.remember
|
|
26
|
+
import androidx.compose.runtime.setValue
|
|
27
|
+
import androidx.compose.ui.Alignment
|
|
28
|
+
import androidx.compose.ui.Modifier
|
|
29
|
+
import androidx.compose.ui.graphics.Color
|
|
30
|
+
import androidx.compose.ui.unit.dp
|
|
31
|
+
|
|
32
|
+
// material controls in both states: the toggle flips every one at once
|
|
33
|
+
@Composable
|
|
34
|
+
fun Widgets() {
|
|
35
|
+
var on by remember { mutableStateOf(false) }
|
|
36
|
+
Column(
|
|
37
|
+
Modifier.fillMaxSize().background(Color(0xFFE8EEF8)).safeDrawingPadding().padding(16.dp),
|
|
38
|
+
verticalArrangement = Arrangement.spacedBy(8.dp),
|
|
39
|
+
) {
|
|
40
|
+
Text("Selection: $on")
|
|
41
|
+
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
|
42
|
+
Switch(checked = on, onCheckedChange = { on = it })
|
|
43
|
+
Checkbox(checked = on, onCheckedChange = { on = it })
|
|
44
|
+
RadioButton(selected = on, onClick = { on = !on })
|
|
45
|
+
FilterChip(selected = on, onClick = { on = !on }, label = { Text("Chip") })
|
|
46
|
+
}
|
|
47
|
+
Slider(value = if (on) 0.8f else 0.3f, onValueChange = {})
|
|
48
|
+
LinearProgressIndicator(progress = { if (on) 0.9f else 0.4f }, Modifier.fillMaxWidth())
|
|
49
|
+
Card(Modifier.fillMaxWidth()) { Text("Card body", Modifier.padding(16.dp)) }
|
|
50
|
+
HorizontalDivider()
|
|
51
|
+
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
|
52
|
+
Button(onClick = { on = !on }) { Text("Toggle") }
|
|
53
|
+
OutlinedButton(onClick = {}, enabled = on) { Text("Outlined") }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -415,12 +415,8 @@ export function parseSemanticWaitOptions(value: unknown): SemanticWaitOptions {
|
|
|
415
415
|
const type = stringValue(condition.type, 'waitFor.condition.type')
|
|
416
416
|
const timeoutMs = semanticWaitTimeout(input, 'waitFor')
|
|
417
417
|
if (type === 'ready') {
|
|
418
|
-
const stableMs = optionalNumber(condition, 'stableMs', 'waitFor.condition')
|
|
419
|
-
if (stableMs !== undefined && stableMs < 0) {
|
|
420
|
-
validationFailure('waitFor.condition.stableMs', 'must be at least 0')
|
|
421
|
-
}
|
|
422
418
|
return {
|
|
423
|
-
condition: { type
|
|
419
|
+
condition: { type },
|
|
424
420
|
...(timeoutMs === undefined ? {} : { timeoutMs }),
|
|
425
421
|
}
|
|
426
422
|
}
|
package/src/bridge-contract.ts
CHANGED
|
@@ -332,10 +332,7 @@ export interface PerformResult {
|
|
|
332
332
|
// something to look at — those are 1x1 and painted under the whole app, so they
|
|
333
333
|
// are permanently occluded and `present` can never match one.
|
|
334
334
|
export type SemanticWaitCondition =
|
|
335
|
-
|
|
336
|
-
// (SEMANTIC_READY_NODE_STABLE_MS by default). a caller that already waited
|
|
337
|
-
// for the app to settle passes 0 to read the settled tree at once.
|
|
338
|
-
| { type: 'ready'; stableMs?: number }
|
|
335
|
+
| { type: 'ready' }
|
|
339
336
|
| { type: 'present'; selector: SimSemanticResolveSelector }
|
|
340
337
|
| { type: 'mounted'; selector: SimSemanticResolveSelector }
|
|
341
338
|
| { type: 'absent'; selector: SimSemanticResolveSelector }
|
|
@@ -392,6 +389,21 @@ export function readyProbeHasTargetContent(
|
|
|
392
389
|
return probe.liveFrameActive || probe.targets > 0
|
|
393
390
|
}
|
|
394
391
|
|
|
392
|
+
// one probe shows a ready app: it has said so with content behind it, or it
|
|
393
|
+
// paints targets without saying so, and it is neither loading nor errored.
|
|
394
|
+
// `wait ready` also requires the node count to hold still; a caller that has
|
|
395
|
+
// already let the app settle judges a single probe with this alone.
|
|
396
|
+
export function readyProbeIsReady(probe: SemanticReadyProbe): boolean {
|
|
397
|
+
return (
|
|
398
|
+
(probe.flag === true
|
|
399
|
+
? readyProbeHasContent(probe)
|
|
400
|
+
: readyProbeHasTargetContent(probe)) &&
|
|
401
|
+
probe.externalReady !== false &&
|
|
402
|
+
!probe.externalError &&
|
|
403
|
+
!probe.loadingText
|
|
404
|
+
)
|
|
405
|
+
}
|
|
406
|
+
|
|
395
407
|
export interface SemanticWaitResult {
|
|
396
408
|
matched: boolean
|
|
397
409
|
elapsedMs: number
|