Pending feedback
Describe bounded local waiting visuals while an action awaits authority, without predicting its result or changing saved state.
Public exports
Import from @scape-wtf/sdk.
GizmoPendingContext, GizmoPendingFeedback, resolveGizmoPendingFeedback.
Type declarations
Import the public exports listed above from the package entry point.
ts
import { type ObjectAction, type ObjectDefinition } from './api.js';
import { type GizmoFrame } from './presentation.js';
/** Local-only feedback while an action awaits authority. Never predicts saved state or results. */
export interface GizmoPendingFeedback {
/** Stop waiting visually after 1–5000 ms; this does not cancel the request. */
durationMs: number;
/** Repeating visual cycle, 100–2000 ms. Model frames should form a seamless loop. */
cycleMs: number;
/** Optional model poses. Requires a model presentation; no result number is allowed. */
frames?: GizmoFrame[];
/** Optional gentle pulse for any gizmo, including those without a model. */
pulse?: {
scale: number;
rotation: number;
};
}
/** Host time for cosmetic decisions such as avoiding feedback during a known cooldown. */
export interface GizmoPendingContext {
now: number;
}
/** Execute on cloned inputs and validate every recipe, including state-dependent outputs. */
export declare function resolveGizmoPendingFeedback(definition: ObjectDefinition, state: unknown, action: ObjectAction, context: GizmoPendingContext): GizmoPendingFeedback | null;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and Scape behavior.
