@hypersoniclabs/helix-sdk 0.1.1 → 0.1.9
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/README.md +954 -2
- package/dist/action-surface.d.ts +182 -0
- package/dist/action-surface.js +1032 -0
- package/dist/action-surface.js.map +1 -0
- package/dist/camera.d.ts +78 -0
- package/dist/camera.js +640 -0
- package/dist/camera.js.map +1 -0
- package/dist/dev-shell/criteria.d.ts +46 -0
- package/dist/dev-shell/criteria.js +98 -0
- package/dist/dev-shell/criteria.js.map +1 -0
- package/dist/dev-shell/index.d.ts +189 -0
- package/dist/dev-shell/index.js +287 -0
- package/dist/dev-shell/index.js.map +1 -0
- package/dist/dev-shell/keys.d.ts +14 -0
- package/dist/dev-shell/keys.js +78 -0
- package/dist/dev-shell/keys.js.map +1 -0
- package/dist/dev-shell/simulator.d.ts +436 -0
- package/dist/dev-shell/simulator.js +1634 -0
- package/dist/dev-shell/simulator.js.map +1 -0
- package/dist/dev-shell/state.d.ts +148 -0
- package/dist/dev-shell/state.js +196 -0
- package/dist/dev-shell/state.js.map +1 -0
- package/dist/device-definition-resolver.d.ts +34 -0
- package/dist/device-definition-resolver.js +172 -0
- package/dist/device-definition-resolver.js.map +1 -0
- package/dist/device-trial.d.ts +3 -0
- package/dist/device-trial.js +132 -0
- package/dist/device-trial.js.map +1 -0
- package/dist/devices.d.ts +228 -0
- package/dist/devices.js +198 -0
- package/dist/devices.js.map +1 -0
- package/dist/dreamerAudio.d.ts +126 -0
- package/dist/dreamerAudio.js +135 -0
- package/dist/dreamerAudio.js.map +1 -0
- package/dist/generated/runtime-contract.d.ts +15529 -0
- package/dist/generated/runtime-contract.js +20470 -0
- package/dist/generated/runtime-contract.js.map +1 -0
- package/dist/index.d.ts +364 -3
- package/dist/index.js +1954 -13
- package/dist/index.js.map +1 -1
- package/dist/interaction-mode.d.ts +172 -0
- package/dist/interaction-mode.js +553 -0
- package/dist/interaction-mode.js.map +1 -0
- package/dist/internal/avatar-pose.d.ts +25 -0
- package/dist/internal/avatar-pose.js +46 -0
- package/dist/internal/avatar-pose.js.map +1 -0
- package/dist/internal/keyed-collection.d.ts +2 -0
- package/dist/internal/keyed-collection.js +12 -0
- package/dist/internal/keyed-collection.js.map +1 -0
- package/dist/internal/vehicle-detach-action.d.ts +2 -0
- package/dist/internal/vehicle-detach-action.js +6 -0
- package/dist/internal/vehicle-detach-action.js.map +1 -0
- package/dist/matchmaking.d.ts +433 -0
- package/dist/matchmaking.js +1487 -0
- package/dist/matchmaking.js.map +1 -0
- package/dist/materials.d.ts +122 -0
- package/dist/materials.js +217 -0
- package/dist/materials.js.map +1 -0
- package/dist/multiplayer-accessors.d.ts +100 -0
- package/dist/multiplayer-accessors.js +200 -0
- package/dist/multiplayer-accessors.js.map +1 -0
- package/dist/multiplayer-contract/avatar-pose.d.ts +112 -0
- package/dist/multiplayer-contract/avatar-pose.js +250 -0
- package/dist/multiplayer-contract/avatar-pose.js.map +1 -0
- package/dist/multiplayer-contract/credential.d.ts +80 -0
- package/dist/multiplayer-contract/credential.js +5 -0
- package/dist/multiplayer-contract/credential.js.map +1 -0
- package/dist/multiplayer-contract/final-rest.d.ts +66 -0
- package/dist/multiplayer-contract/final-rest.js +38 -0
- package/dist/multiplayer-contract/final-rest.js.map +1 -0
- package/dist/multiplayer-contract/index.d.ts +20 -0
- package/dist/multiplayer-contract/index.js +41 -0
- package/dist/multiplayer-contract/index.js.map +1 -0
- package/dist/multiplayer-contract/messages.d.ts +731 -0
- package/dist/multiplayer-contract/messages.js +237 -0
- package/dist/multiplayer-contract/messages.js.map +1 -0
- package/dist/multiplayer-contract/room.d.ts +177 -0
- package/dist/multiplayer-contract/room.js +17 -0
- package/dist/multiplayer-contract/room.js.map +1 -0
- package/dist/multiplayer-contract/state.d.ts +241 -0
- package/dist/multiplayer-contract/state.js +15 -0
- package/dist/multiplayer-contract/state.js.map +1 -0
- package/dist/multiplayer-final-rest.d.ts +32 -0
- package/dist/multiplayer-final-rest.js +217 -0
- package/dist/multiplayer-final-rest.js.map +1 -0
- package/dist/multiplayer.d.ts +624 -0
- package/dist/multiplayer.js +2503 -0
- package/dist/multiplayer.js.map +1 -0
- package/dist/package.json +3 -0
- package/dist/protocol.d.ts +859 -1
- package/dist/protocol.js +117 -5
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-contract/index.d.ts +15 -0
- package/dist/runtime-contract/index.js +12 -0
- package/dist/runtime-contract/index.js.map +1 -0
- package/dist/server-clock.d.ts +25 -0
- package/dist/server-clock.js +88 -0
- package/dist/server-clock.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/universal-vehicles.d.ts +111 -0
- package/dist/universal-vehicles.js +2 -0
- package/dist/universal-vehicles.js.map +1 -0
- package/dist/vault.d.ts +562 -0
- package/dist/vault.js +365 -0
- package/dist/vault.js.map +1 -0
- package/dist/vehicle-specialty-placement.d.ts +28 -0
- package/dist/vehicle-specialty-placement.js +154 -0
- package/dist/vehicle-specialty-placement.js.map +1 -0
- package/dist/vehicle-specialty-transport.d.ts +78 -0
- package/dist/vehicle-specialty-transport.js +183 -0
- package/dist/vehicle-specialty-transport.js.map +1 -0
- package/dist/voice.d.ts +229 -0
- package/dist/voice.js +1348 -0
- package/dist/voice.js.map +1 -0
- package/generated/runtime-contract/helix-runtime-contract.json +13332 -0
- package/generated/runtime-contract/known-answer.json +20471 -0
- package/generated/runtime-contract/known-answer.schema.json +630 -0
- package/generated/runtime-contract/runtime-contract.schema.json +607 -0
- package/generated/runtime-contract/unreal/HelixRuntimeContract.generated.h +908 -0
- package/package.json +44 -5
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { InteractionMode, StandardModeAction, Suppression, VerbEvent } from './interaction-mode.js';
|
|
2
|
+
/** The seven portable interaction forms owned by the universal surface. */
|
|
3
|
+
export type ActionSurfaceKind = 'run' | 'choice' | 'number' | 'text' | 'point' | 'asset' | 'takeover';
|
|
4
|
+
export interface ActionSurfaceOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
reason?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Provenance for authority-resolved options. The presentation surface never
|
|
12
|
+
* executes these queries; it receives their filtered `options` result.
|
|
13
|
+
*/
|
|
14
|
+
export interface ActionSurfaceOptionsFrom {
|
|
15
|
+
query?: {
|
|
16
|
+
has: string;
|
|
17
|
+
scope?: 'room' | 'world';
|
|
18
|
+
};
|
|
19
|
+
inventory?: {
|
|
20
|
+
accepts: string;
|
|
21
|
+
};
|
|
22
|
+
var?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ActionSurfaceAvailability {
|
|
25
|
+
state: 'available' | 'busy' | 'occupied';
|
|
26
|
+
/** Player-readable state such as "In use by Mira". Never render an internal id. */
|
|
27
|
+
label?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A caller-scoped, authority-resolved row.
|
|
31
|
+
*
|
|
32
|
+
* Dynamic labels and enabled/visible expressions are evaluated before this
|
|
33
|
+
* value reaches the SDK. This list is an advisory presentation cache: every
|
|
34
|
+
* invocation must be re-authorized by the authority.
|
|
35
|
+
*/
|
|
36
|
+
export interface ActionSurfaceAction {
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
kind: ActionSurfaceKind;
|
|
40
|
+
call?: string;
|
|
41
|
+
socket?: string;
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
visible?: boolean;
|
|
44
|
+
reason?: string;
|
|
45
|
+
availability?: ActionSurfaceAvailability;
|
|
46
|
+
/** `number` and picker actions: the current authoritative value. */
|
|
47
|
+
value?: number | string | null;
|
|
48
|
+
/** `number`: the authority-backed variable this row writes. */
|
|
49
|
+
var?: string;
|
|
50
|
+
min?: number;
|
|
51
|
+
max?: number;
|
|
52
|
+
step?: number;
|
|
53
|
+
unit?: string;
|
|
54
|
+
/** `text`: native text-entry hints. Authority still validates submitted text. */
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
maxLength?: number;
|
|
57
|
+
inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
58
|
+
/** `choice` or `asset`: caller-filtered concrete choices. */
|
|
59
|
+
options?: readonly ActionSurfaceOption[];
|
|
60
|
+
/** Describes where the authority obtained `options`; never resolved here. */
|
|
61
|
+
optionsFrom?: ActionSurfaceOptionsFrom;
|
|
62
|
+
}
|
|
63
|
+
export interface ActionSurfaceSnapshot {
|
|
64
|
+
instanceId: string;
|
|
65
|
+
title: string;
|
|
66
|
+
actions: readonly ActionSurfaceAction[];
|
|
67
|
+
availability?: ActionSurfaceAvailability;
|
|
68
|
+
}
|
|
69
|
+
export type ActionSurfaceInvocation = {
|
|
70
|
+
action: ActionSurfaceAction;
|
|
71
|
+
kind: 'run' | 'point' | 'takeover';
|
|
72
|
+
} | {
|
|
73
|
+
action: ActionSurfaceAction;
|
|
74
|
+
kind: 'number';
|
|
75
|
+
value: number;
|
|
76
|
+
} | {
|
|
77
|
+
action: ActionSurfaceAction;
|
|
78
|
+
kind: 'choice' | 'asset' | 'text';
|
|
79
|
+
value: string;
|
|
80
|
+
};
|
|
81
|
+
export type ActionSurfaceDevice = 'keyboard' | 'gamepad' | 'touch';
|
|
82
|
+
/** Adapter over the trusted router's active-device and `hint()` surfaces. */
|
|
83
|
+
export interface ActionSurfaceHintSource {
|
|
84
|
+
activeDevice(): ActionSurfaceDevice;
|
|
85
|
+
hint(action: Extract<StandardModeAction, 'move' | 'primary' | 'cancel'>): string;
|
|
86
|
+
/** Optional active-device/rebind subscription. */
|
|
87
|
+
subscribe?(listener: () => void): () => void;
|
|
88
|
+
}
|
|
89
|
+
export interface UniversalActionSurfaceOptions {
|
|
90
|
+
host: HTMLElement;
|
|
91
|
+
hints: ActionSurfaceHintSource;
|
|
92
|
+
onInvoke(invocation: ActionSurfaceInvocation): void;
|
|
93
|
+
onDismiss?(instanceId: string): void;
|
|
94
|
+
onOpenChange?(open: boolean): void;
|
|
95
|
+
document?: Document;
|
|
96
|
+
/** @deprecated Navigation cadence is owned by the trusted mode host. Retained for source compatibility. */
|
|
97
|
+
now?(): number;
|
|
98
|
+
}
|
|
99
|
+
/** Fail-fast validation for the trusted host-to-presentation boundary. */
|
|
100
|
+
export declare function validateActionSurfaceSnapshot(snapshot: ActionSurfaceSnapshot): string[];
|
|
101
|
+
/**
|
|
102
|
+
* Portable DOM component for a proximity/list presentation.
|
|
103
|
+
*
|
|
104
|
+
* It installs no keyboard, pointer-lock, gamepad, or raw touch listeners. A
|
|
105
|
+
* trusted mode host delivers the three semantic actions through `handleVerb`,
|
|
106
|
+
* while ordinary DOM activation keeps the rendered controls accessible.
|
|
107
|
+
*/
|
|
108
|
+
export declare class UniversalActionSurface {
|
|
109
|
+
#private;
|
|
110
|
+
readonly element: HTMLElement;
|
|
111
|
+
constructor(options: UniversalActionSurfaceOptions);
|
|
112
|
+
get isOpen(): boolean;
|
|
113
|
+
get instanceId(): string | null;
|
|
114
|
+
get mode(): 'browse' | 'number' | 'text' | 'picker';
|
|
115
|
+
get selectedAction(): ActionSurfaceAction | null;
|
|
116
|
+
get visibleActions(): readonly ActionSurfaceAction[];
|
|
117
|
+
get liveNumber(): number | null;
|
|
118
|
+
get liveText(): string | null;
|
|
119
|
+
/** Open or refresh the caller-scoped cache. Pass null to withdraw it. */
|
|
120
|
+
setSnapshot(snapshot: ActionSurfaceSnapshot | null): void;
|
|
121
|
+
hide(): void;
|
|
122
|
+
/** Dismiss this proximity offer until the host explicitly rearms it. */
|
|
123
|
+
dismiss(): void;
|
|
124
|
+
rearm(): void;
|
|
125
|
+
/** Refresh active-device/rebind text when the router has no subscription API. */
|
|
126
|
+
refreshHints(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Record pointer input that reaches the host's opener before this surface.
|
|
129
|
+
* This keeps the first rendered hints aligned with the input that opened it.
|
|
130
|
+
*/
|
|
131
|
+
observePointer(pointerType: string): void;
|
|
132
|
+
/** Navigate one row/option or nudge a sustained number. */
|
|
133
|
+
move(delta: -1 | 1): void;
|
|
134
|
+
confirm(): void;
|
|
135
|
+
/** Back out of a sustained control; dismiss the proximity list at root. */
|
|
136
|
+
cancel(): void;
|
|
137
|
+
/** Release modal focus without dismissing the still-valid proximity offer. */
|
|
138
|
+
endEngagement(): void;
|
|
139
|
+
/** Semantic input entry point used by `createActionSurfaceMode`. */
|
|
140
|
+
handleVerb(verb: 'navigate' | 'activate' | 'back', event: VerbEvent): void;
|
|
141
|
+
dispose(): void;
|
|
142
|
+
}
|
|
143
|
+
export interface ActionSurfaceModeOptions {
|
|
144
|
+
surface: UniversalActionSurface;
|
|
145
|
+
id?: string;
|
|
146
|
+
suppression?: Suppression;
|
|
147
|
+
}
|
|
148
|
+
/** Fresh semantic map so hosts may safely decorate it per instance. */
|
|
149
|
+
export declare function createActionSurfaceInputMap(): {
|
|
150
|
+
navigate: {
|
|
151
|
+
action: "move";
|
|
152
|
+
label: string;
|
|
153
|
+
touch: {
|
|
154
|
+
kind: "stick";
|
|
155
|
+
zone: "left";
|
|
156
|
+
};
|
|
157
|
+
continuous: boolean;
|
|
158
|
+
repeatMs: number;
|
|
159
|
+
};
|
|
160
|
+
activate: {
|
|
161
|
+
action: "primary";
|
|
162
|
+
label: string;
|
|
163
|
+
touch: {
|
|
164
|
+
kind: "tap";
|
|
165
|
+
zone: "primary";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
back: {
|
|
169
|
+
action: "cancel";
|
|
170
|
+
label: string;
|
|
171
|
+
touch: {
|
|
172
|
+
kind: "button";
|
|
173
|
+
zone: "secondary";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Opt-in engaged menu mode. Showing a proximity offer alone must not push it:
|
|
179
|
+
* callers engage explicitly, so merely walking near an item never captures the
|
|
180
|
+
* player. The mode uses the same stack/lease as every takeover.
|
|
181
|
+
*/
|
|
182
|
+
export declare function createActionSurfaceMode(options: ActionSurfaceModeOptions): InteractionMode<void>;
|