@typeonce/ritmo-browser 0.10.0 → 0.12.0

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/README.md +6 -1
  3. package/dist/Controls.d.ts +496 -0
  4. package/dist/Controls.d.ts.map +1 -0
  5. package/dist/Controls.js +343 -0
  6. package/dist/Controls.js.map +1 -0
  7. package/dist/Gamepad.d.ts +376 -0
  8. package/dist/Gamepad.d.ts.map +1 -0
  9. package/dist/Gamepad.js +459 -0
  10. package/dist/Gamepad.js.map +1 -0
  11. package/dist/InputCapture.d.ts +46 -16
  12. package/dist/InputCapture.d.ts.map +1 -1
  13. package/dist/InputCapture.js +1 -1
  14. package/dist/InputCapture.js.map +1 -1
  15. package/dist/Keyboard.d.ts +177 -25
  16. package/dist/Keyboard.d.ts.map +1 -1
  17. package/dist/Keyboard.js +257 -91
  18. package/dist/Keyboard.js.map +1 -1
  19. package/dist/Pointer.d.ts +233 -64
  20. package/dist/Pointer.d.ts.map +1 -1
  21. package/dist/Pointer.js +205 -145
  22. package/dist/Pointer.js.map +1 -1
  23. package/dist/Touch.d.ts +75 -33
  24. package/dist/Touch.d.ts.map +1 -1
  25. package/dist/Touch.js +25 -30
  26. package/dist/Touch.js.map +1 -1
  27. package/dist/index.d.ts +10 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +10 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/internal/buttons.d.ts +52 -0
  32. package/dist/internal/buttons.d.ts.map +1 -0
  33. package/dist/internal/buttons.js +211 -0
  34. package/dist/internal/buttons.js.map +1 -0
  35. package/dist/internal/introspect.d.ts +14 -0
  36. package/dist/internal/introspect.d.ts.map +1 -0
  37. package/dist/internal/introspect.js +19 -0
  38. package/dist/internal/introspect.js.map +1 -0
  39. package/dist/internal/state.d.ts +13 -0
  40. package/dist/internal/state.d.ts.map +1 -0
  41. package/dist/internal/state.js +2 -0
  42. package/dist/internal/state.js.map +1 -0
  43. package/dist/internal/used.d.ts +8 -0
  44. package/dist/internal/used.d.ts.map +1 -0
  45. package/dist/internal/used.js +14 -0
  46. package/dist/internal/used.js.map +1 -0
  47. package/dist/internal/vectors.d.ts +29 -0
  48. package/dist/internal/vectors.d.ts.map +1 -0
  49. package/dist/internal/vectors.js +22 -0
  50. package/dist/internal/vectors.js.map +1 -0
  51. package/package.json +4 -3
  52. package/src/Controls.ts +800 -0
  53. package/src/Gamepad.ts +752 -0
  54. package/src/InputCapture.ts +43 -24
  55. package/src/Keyboard.ts +387 -72
  56. package/src/Pointer.ts +392 -166
  57. package/src/Touch.ts +113 -61
  58. package/src/index.ts +10 -1
  59. package/src/internal/buttons.ts +222 -0
  60. package/src/internal/introspect.ts +23 -0
  61. package/src/internal/state.ts +12 -0
  62. package/src/internal/used.ts +14 -0
  63. package/src/internal/vectors.ts +41 -0
@@ -30,12 +30,22 @@
30
30
  *
31
31
  * // Once per update:
32
32
  * const snapshot = input.snapshot()
33
- * if (snapshot.jump.pressed) jump()
33
+ * if (snapshot.actions.jump.pressed) jump()
34
34
  *
35
35
  * // On teardown:
36
36
  * input.dispose()
37
37
  * ```
38
38
  *
39
+ * Movement is one vector action: `move: Keyboard.vector({ up, down, left,
40
+ * right })` reports `vectors.move` with length at most 1 (opposite keys
41
+ * cancel, diagonals are not faster). Timelines name it by direction,
42
+ * `"move.right"`.
43
+ *
44
+ * For a controls settings screen, `presses(...)` reports every key that
45
+ * goes down (bound or not) so the screen can wait for the key to bind,
46
+ * `rebind(...)` swaps the keys of the same actions, and `parseRebinding(...)`
47
+ * validates bindings saved as JSON.
48
+ *
39
49
  * For tests, replays, and headless runs, `scripted(...)` plays a timeline of
40
50
  * presses and releases instead of listening to a host, and `recording(...)`
41
51
  * wraps live actions to capture the timeline a session produced.
@@ -53,7 +63,11 @@
53
63
  * }
54
64
  * ```
55
65
  */
66
+ import type * as System from "@typeonce/ritmo/System";
56
67
  import * as Result from "@typeonce/ritmo/Result";
68
+ import type { ActionState } from "./internal/state.ts";
69
+ import type { Direction, Vector } from "./internal/vectors.ts";
70
+ export type { Direction };
57
71
  /**
58
72
  * The subset of `KeyboardEvent` the module reads. `code` (the physical key)
59
73
  * is optional so simple test hosts can omit it; browsers always provide it.
@@ -92,11 +106,51 @@ export interface PhysicalKey {
92
106
  * Option held on macOS, W types "∑"; with Shift, 1 types "!").
93
107
  */
94
108
  export type KeyBinding = string | PhysicalKey;
109
+ /** The keys of one action: at least one. */
110
+ export type Keys = readonly [KeyBinding, ...Array<KeyBinding>];
111
+ /**
112
+ * Keys for the four directions of a vector action (movement), built with
113
+ * {@link vector}.
114
+ */
115
+ export interface VectorBinding {
116
+ readonly _tag: "Vector";
117
+ readonly up: Keys;
118
+ readonly down: Keys;
119
+ readonly left: Keys;
120
+ readonly right: Keys;
121
+ }
122
+ /**
123
+ * Action name to the keys that trigger it (at least one), or to a
124
+ * {@link vector} binding for a direction such as movement.
125
+ */
126
+ export type Bindings = Readonly<Record<string, Keys | VectorBinding>>;
127
+ /** The bound button actions: the names bound to keys. */
128
+ export type ButtonNames<B> = {
129
+ [K in keyof B]: B[K] extends VectorBinding ? never : K;
130
+ }[keyof B] & string;
131
+ /** The bound vector actions: the names bound with {@link vector}. */
132
+ export type VectorNames<B> = {
133
+ [K in keyof B]: B[K] extends VectorBinding ? K : never;
134
+ }[keyof B] & string;
95
135
  /**
96
- * Action name to the keys that trigger it. Every action needs at least one
97
- * key.
136
+ * Binds a vector action to keys for its four directions. The snapshot's
137
+ * `vectors` reports it with length at most 1: opposite keys cancel and a
138
+ * diagonal is not faster than a straight line.
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * const bindings = {
143
+ * move: Keyboard.vector({ up: ["w", "ArrowUp"], down: ["s", "ArrowDown"], left: ["a", "ArrowLeft"], right: ["d", "ArrowRight"] }),
144
+ * jump: [" "]
145
+ * } as const
146
+ * ```
98
147
  */
99
- export type Bindings = Readonly<Record<string, readonly [KeyBinding, ...Array<KeyBinding>]>>;
148
+ export declare const vector: (keys: {
149
+ readonly up: Keys;
150
+ readonly down: Keys;
151
+ readonly left: Keys;
152
+ readonly right: Keys;
153
+ }) => VectorBinding;
100
154
  /**
101
155
  * A binding to a physical key by its `KeyboardEvent.code`.
102
156
  *
@@ -112,29 +166,60 @@ export declare const code: <const Code extends string>(code: Code) => PhysicalKe
112
166
  readonly code: Code;
113
167
  };
114
168
  /**
115
- * One action's state in a snapshot.
169
+ * Every action's state, with the same core as the other devices' snapshots
170
+ * (`actions`, `vectors`, and `used`) so `Controls` can merge them.
116
171
  */
117
- export interface ActionState {
118
- /** At least one bound key is down now. */
119
- readonly held: boolean;
120
- /** A bound key went down since the previous snapshot, even if already released. */
121
- readonly pressed: boolean;
122
- /** A bound key went up since the previous snapshot and none is held now. */
123
- readonly released: boolean;
172
+ export interface Snapshot<B extends Bindings> {
173
+ readonly actions: {
174
+ readonly [Action in ButtonNames<B>]: ActionState;
175
+ };
176
+ /** Each vector action's direction, length at most 1, `y` growing down. */
177
+ readonly vectors: {
178
+ readonly [Action in VectorNames<B>]: Vector;
179
+ };
180
+ /** Some key bound to an action was pressed in this window or is held: the player is using the keyboard. */
181
+ readonly used: boolean;
124
182
  }
125
- export type Snapshot<B extends Bindings> = {
126
- readonly [Action in keyof B]: ActionState;
183
+ /**
184
+ * New keys for the same actions, for {@link Actions.rebind}: keys for a
185
+ * button action, a {@link vector} for a vector action. Load saved ones with
186
+ * {@link parseRebinding}.
187
+ */
188
+ export type Rebinding<B extends Bindings> = {
189
+ readonly [Action in keyof B]: B[Action] extends VectorBinding ? VectorBinding : Keys;
190
+ };
191
+ /**
192
+ * Rejects actions a rebinding names that the bindings do not have, so
193
+ * {@link Actions.rebind} takes exactly the actions it was made with.
194
+ */
195
+ export type OnlyActionsOf<R, B extends Bindings> = {
196
+ readonly [Name in Exclude<keyof R, keyof B>]: `${Name & string} is not an action of these bindings`;
127
197
  };
128
- export interface Actions<B extends Bindings> {
198
+ /**
199
+ * A keyboard bound to actions, built with {@link actions} (live),
200
+ * {@link scripted}, or {@link recording}. Capture it with
201
+ * `InputCapture.system(...)`, or merge it with `Controls`.
202
+ */
203
+ export interface Actions<B extends Bindings> extends System.Consumes<"snapshot"> {
129
204
  /**
130
205
  * Returns every action's state and starts a new press/release window.
131
206
  */
132
207
  snapshot(): Snapshot<B>;
208
+ /**
209
+ * Binds the same actions to new keys, from the next snapshot, for a
210
+ * settings screen where players remap controls (capture the key to bind
211
+ * with {@link presses}). An action held only through keys it lost reports
212
+ * `released`. A key held across the rebind holds a newly bound action only
213
+ * once it is pressed again, so an action never turns held without a
214
+ * press. It takes exactly the actions the source was made with.
215
+ */
216
+ rebind<const R extends Rebinding<B>>(bindings: R & OnlyActionsOf<R, B>): void;
133
217
  /**
134
218
  * Removes the event listeners.
135
219
  */
136
220
  dispose(): void;
137
221
  }
222
+ /** Options for {@link actions}. */
138
223
  export interface ActionsOptions {
139
224
  /**
140
225
  * Call `preventDefault()` for bound keys, so arrows and space do not scroll
@@ -148,27 +233,69 @@ export interface ActionsOptions {
148
233
  */
149
234
  export declare const idle: <const B extends Bindings>(bindings: B) => Snapshot<B>;
150
235
  /**
151
- * Starts tracking bound keys on `host`.
236
+ * Starts tracking bound keys on `host`, usually `window`, until `dispose()`.
237
+ * When the window loses focus every held action is released. Each call is
238
+ * its own device: build one per source (one `Controls` merge, one player
239
+ * of a pool). Use {@link scripted} for tests and headless runs, and
240
+ * {@link presses} to capture an unbound key on a settings screen.
152
241
  */
153
- export declare const actions: <const B extends Bindings>(host: KeyboardHost, bindings: B, options?: ActionsOptions) => Actions<B>;
242
+ export declare const actions: <const B extends Bindings>(host: KeyboardHost, initial: B, options?: ActionsOptions) => Actions<B>;
243
+ /** One key that went down, in the two forms a {@link KeyBinding} can name it. */
244
+ export interface KeyPress {
245
+ /** The character typed (`KeyboardEvent.key`), for a character binding. */
246
+ readonly key: string;
247
+ /** The physical key (`KeyboardEvent.code`), for `Keyboard.code(...)`; `null` when the host gave none. */
248
+ readonly code: string | null;
249
+ }
250
+ /** Every key press on a host, bound or not; see {@link presses}. */
251
+ export interface Presses extends System.Consumes<"snapshot"> {
252
+ /** The keys that went down since the previous snapshot, in order, without auto-repeats. */
253
+ snapshot(): ReadonlyArray<KeyPress>;
254
+ /** Removes the event listener. */
255
+ dispose(): void;
256
+ }
257
+ /**
258
+ * Starts collecting every key press on `host`, whatever the bindings, for a
259
+ * settings screen that waits for the key to bind. Use {@link actions} for
260
+ * gameplay. It never calls `preventDefault()`.
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * const presses = Keyboard.presses(window)
265
+ *
266
+ * // While the settings screen waits for the new jump key:
267
+ * const press = presses.snapshot()[0]
268
+ * if (press !== undefined) {
269
+ * input.rebind({ ...current, jump: [press.code === null ? press.key : Keyboard.code(press.code)] })
270
+ * }
271
+ * ```
272
+ */
273
+ export declare const presses: (host: KeyboardHost) => Presses;
154
274
  /**
155
- * Input changes applied just before one snapshot: presses first, then
156
- * releases. `frame` is the snapshot's index, counting from 0 at the first
157
- * `snapshot()` call. An action both pressed and released in one frame is a
158
- * tap shorter than a frame.
275
+ * Input changes applied just before one snapshot. `frame` is the snapshot's
276
+ * index, counting from 0 at the first `snapshot()` call. Entries name
277
+ * actions, and a vector action by direction (`"move.right"`). An action in both
278
+ * `press` and `release` changed twice within the frame: a tap shorter than a
279
+ * frame when it was up, a release and a new press when it was held.
159
280
  */
160
281
  export interface TimelineEntry<B extends Bindings> {
161
282
  readonly frame: number;
162
- readonly press?: ReadonlyArray<keyof B & string>;
163
- readonly release?: ReadonlyArray<keyof B & string>;
283
+ readonly press?: ReadonlyArray<TimelineName<B>>;
284
+ readonly release?: ReadonlyArray<TimelineName<B>>;
164
285
  }
286
+ /**
287
+ * What a timeline presses and releases: a button action, or one direction
288
+ * of a vector action (`"move.right"`).
289
+ */
290
+ export type TimelineName<B extends Bindings> = ButtonNames<B> | `${VectorNames<B>}.${Direction}`;
165
291
  /**
166
292
  * Input changes by snapshot index. Plain data, so it round-trips through
167
293
  * JSON; load it back with `parseTimeline`.
168
294
  */
169
295
  export type Timeline<B extends Bindings> = ReadonlyArray<TimelineEntry<B>>;
170
296
  /**
171
- * Actions driven by a timeline instead of a host.
297
+ * Actions driven by a timeline instead of a host. The timeline names
298
+ * actions, not keys, so `rebind` changes nothing.
172
299
  */
173
300
  export interface Scripted<B extends Bindings> extends Actions<B> {
174
301
  /** Number of snapshots taken so far, which is the next frame index. */
@@ -204,7 +331,32 @@ export interface InvalidTimeline {
204
331
  /**
205
332
  * Validates untrusted data, such as a parsed JSON file, as a timeline for
206
333
  * `bindings`: an array of entries with a non-negative integer `frame` and
207
- * optional `press`/`release` arrays of bound action names.
334
+ * optional `press`/`release` arrays of bound action names (a vector action
335
+ * by direction, `"move.right"`).
208
336
  */
209
337
  export declare const parseTimeline: <const B extends Bindings>(bindings: B, data: unknown) => Result.Result<Timeline<B>, InvalidTimeline>;
338
+ /**
339
+ * Why loaded data is not a rebinding for the bindings. `path` points at the
340
+ * offending value, for example `jump[1]`.
341
+ */
342
+ export interface InvalidRebinding {
343
+ readonly _tag: "InvalidRebinding";
344
+ readonly path: string;
345
+ readonly message: string;
346
+ }
347
+ /**
348
+ * Validates untrusted data, such as saved settings parsed from JSON, as new
349
+ * keys for `bindings`: an object with exactly the same action names, each
350
+ * mapped to a non-empty array of characters or `{ code }` physical keys
351
+ * (for a vector action, an object with such keys for `up`, `down`, `left`,
352
+ * and `right`, as `Keyboard.vector` saves).
353
+ * Pass the result to {@link Actions.rebind}; on failure, keep the defaults.
354
+ *
355
+ * @example
356
+ * ```ts
357
+ * const saved = Keyboard.parseRebinding(bindings, JSON.parse(stored))
358
+ * if (saved.ok) input.rebind(saved.value)
359
+ * ```
360
+ */
361
+ export declare const parseRebinding: <const B extends Bindings>(bindings: B, data: unknown) => Result.Result<Rebinding<B>, InvalidRebinding>;
210
362
  //# sourceMappingURL=Keyboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Keybo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