@simpludify/core 0.1.3 → 0.1.4
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 +5 -3
- package/dist/foundation/version.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +65 -10
- package/dist/index.js.map +1 -1
- package/dist/interaction/actions.d.ts +5 -0
- package/dist/interaction/input-source.d.ts +3 -0
- package/dist/interaction/input.d.ts +9 -0
- package/package.json +1 -1
|
@@ -42,15 +42,20 @@ export declare class ActionController<A extends ActionSet> implements LifetimeOw
|
|
|
42
42
|
private readonly entries;
|
|
43
43
|
private readonly sources;
|
|
44
44
|
private readonly bus;
|
|
45
|
+
private keyboardAllowed;
|
|
46
|
+
private readonly blockedKeys;
|
|
45
47
|
private pending;
|
|
46
48
|
private transitions;
|
|
47
49
|
constructor(actions: A, options: {
|
|
48
50
|
scene: Scene;
|
|
49
51
|
input: InputSystem;
|
|
50
52
|
bindings?: ActionBindings<A>;
|
|
53
|
+
keyboard?: boolean;
|
|
51
54
|
});
|
|
52
55
|
get disposed(): boolean;
|
|
53
56
|
get active(): boolean;
|
|
57
|
+
get keyboardEnabled(): boolean;
|
|
58
|
+
set keyboardEnabled(value: boolean);
|
|
54
59
|
get sourceCount(): number;
|
|
55
60
|
onDispose(callback: () => void): () => void;
|
|
56
61
|
private entry;
|
|
@@ -2,8 +2,11 @@ import { type LifetimeOwner } from "../foundation/lifetime.js";
|
|
|
2
2
|
/** @internal Shared lifetime for logical and device contributions. */
|
|
3
3
|
export declare abstract class OwnedInputSource {
|
|
4
4
|
private dead;
|
|
5
|
+
private accepting;
|
|
5
6
|
private removeOwner;
|
|
6
7
|
get disposed(): boolean;
|
|
8
|
+
get enabled(): boolean;
|
|
9
|
+
set enabled(value: boolean);
|
|
7
10
|
/** @internal */ own(owner: LifetimeOwner): void;
|
|
8
11
|
protected writable(neutral: boolean): boolean;
|
|
9
12
|
protected abstract release(remove: boolean): void;
|
|
@@ -2,6 +2,12 @@ import { type LifetimeOwner } from "../foundation/lifetime.js";
|
|
|
2
2
|
import type { ActionFrame } from "./action-frame.js";
|
|
3
3
|
import { OwnedInputSource } from "./input-source.js";
|
|
4
4
|
import { type KeyCode } from "./key-code.js";
|
|
5
|
+
/** Host device adapter. Sampled before all Action frames; reset flushes held device state. */
|
|
6
|
+
export interface InputAdapter {
|
|
7
|
+
sample(): void;
|
|
8
|
+
reset(): void;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
}
|
|
5
11
|
/** @internal Engine boundary participant, implemented by ActionController. */
|
|
6
12
|
export interface ActionInputPort {
|
|
7
13
|
readonly active: boolean;
|
|
@@ -24,12 +30,15 @@ export declare class KeyboardSource extends OwnedInputSource {
|
|
|
24
30
|
/** Engine-owned routing and update boundary. No raw game-state/alternate movement API. */
|
|
25
31
|
export declare class InputSystem {
|
|
26
32
|
private readonly actions;
|
|
33
|
+
private readonly adapters;
|
|
27
34
|
private readonly keyboards;
|
|
28
35
|
private dead;
|
|
29
36
|
private playback;
|
|
30
37
|
private frames;
|
|
31
38
|
get sourceCount(): number;
|
|
32
39
|
/** @internal */ registerActions(actions: ActionInputPort): () => void;
|
|
40
|
+
/** Host integration boundary; ordinary game input uses ActionSource instead. */
|
|
41
|
+
addAdapter(adapter: InputAdapter): () => void;
|
|
33
42
|
acceptsKey(code: KeyCode): boolean;
|
|
34
43
|
private notify;
|
|
35
44
|
/** @internal Device state is resolved only through Action bindings. */
|