World picking & navigation
Choose world destinations and request host-controlled admission with optional departure feedback.
Generated from the reviewed SDK 0.1.0 contract snapshot. Unreviewed workspace changes are not included.
Public exports
Import from @scape/sdk.
GizmoNavigation, GizmoWorldDestination, GizmoWorldEditor, gizmoNavigationError, resolveGizmoNavigation, validGizmoWorldDestination, validGizmoWorldEditor, validGizmoWorldId.
Type declarations
These declarations preserve source comments and related types. Import only the public exports listed above; module-relative paths below describe how the package is organized.
ts
import { type ObjectDefinition } from './api.js';
import { type GizmoFeedback } from './reaction.js';
/** Display metadata, never proof of access. The host checks admission on every visit. */
export interface GizmoWorldDestination {
id: string;
name: string;
}
/** Host-owned world picker. The selected destination or null is submitted to an editor action. */
export interface GizmoWorldEditor {
field: string;
action: string;
label: string;
}
/** Request navigation for the entering local player; no URL, credentials or room authority. */
export interface GizmoNavigation {
world: string;
transition?: {
durationMs: number;
scale: number;
opacity: number;
trail?: {
color: string;
opacity: number;
};
};
feedback?: Pick<GizmoFeedback, 'durationMs' | 'audio' | 'haptic'>;
}
export declare const validGizmoWorldId: (value: unknown) => value is string;
export declare function validGizmoWorldDestination(value: unknown): value is GizmoWorldDestination;
export declare function validGizmoWorldEditor(value: unknown): value is GizmoWorldEditor;
export declare function gizmoNavigationError(value: unknown, definition: ObjectDefinition, state: unknown): string | null;
export declare function resolveGizmoNavigation(definition: ObjectDefinition, state: unknown): GizmoNavigation | null;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and host behavior.
