@flighthq/input 0.5.1-edge.3260.9e8325c → 0.5.1-edge.4334.2a5a54c

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 (55) hide show
  1. package/README.md +2 -2
  2. package/dist/contract.d.ts +9 -1
  3. package/dist/contract.d.ts.map +1 -1
  4. package/dist/contract.js +10 -1
  5. package/dist/contract.js.map +1 -1
  6. package/dist/index.d.ts +2 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +3 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/inputBinding.d.ts +70 -0
  11. package/dist/inputBinding.d.ts.map +1 -0
  12. package/dist/inputBinding.js +364 -0
  13. package/dist/inputBinding.js.map +1 -0
  14. package/dist/inputGamepad.d.ts +20 -0
  15. package/dist/inputGamepad.d.ts.map +1 -0
  16. package/dist/inputGamepad.js +83 -0
  17. package/dist/inputGamepad.js.map +1 -0
  18. package/dist/inputSignals.d.ts +18 -0
  19. package/dist/inputSignals.d.ts.map +1 -0
  20. package/dist/inputSignals.js +66 -0
  21. package/dist/inputSignals.js.map +1 -0
  22. package/dist/inputState.d.ts +54 -0
  23. package/dist/inputState.d.ts.map +1 -0
  24. package/dist/inputState.js +321 -0
  25. package/dist/inputState.js.map +1 -0
  26. package/dist/inputTarget.d.ts +11 -0
  27. package/dist/inputTarget.d.ts.map +1 -0
  28. package/dist/inputTarget.js +17 -0
  29. package/dist/inputTarget.js.map +1 -0
  30. package/dist/inputTimer.d.ts +26 -0
  31. package/dist/inputTimer.d.ts.map +1 -0
  32. package/dist/inputTimer.js +92 -0
  33. package/dist/inputTimer.js.map +1 -0
  34. package/dist/keyCode.d.ts +947 -0
  35. package/dist/keyCode.d.ts.map +1 -0
  36. package/dist/keyCode.js +945 -0
  37. package/dist/keyCode.js.map +1 -0
  38. package/dist/types.d.ts +370 -0
  39. package/dist/types.d.ts.map +1 -0
  40. package/dist/types.js +326 -0
  41. package/dist/types.js.map +1 -0
  42. package/package.json +8 -6
  43. package/src/index.test.ts +1 -2
  44. package/src/inputBinding.test.ts +308 -0
  45. package/src/inputGamepad.test.ts +87 -0
  46. package/src/inputSignals.test.ts +77 -0
  47. package/src/inputState.test.ts +335 -0
  48. package/src/inputTarget.test.ts +23 -0
  49. package/src/inputTimer.test.ts +132 -0
  50. package/src/types.test.ts +206 -0
  51. package/dist/inputManager.d.ts +0 -138
  52. package/dist/inputManager.d.ts.map +0 -1
  53. package/dist/inputManager.js +0 -542
  54. package/dist/inputManager.js.map +0 -1
  55. package/src/inputManager.test.ts +0 -815
package/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/input`. The `@flight
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/input@0.5.1-edge.3260.9e8325c](https://github.com/flighthq/flight/tree/9e8325c93cc9bd0aeef2924ad047a8eb93020e32/packages/input)
17
- - [License](https://github.com/flighthq/flight/blob/9e8325c93cc9bd0aeef2924ad047a8eb93020e32/LICENSE.md)
16
+ - [Source for @flighthq/input@0.5.1-edge.4334.2a5a54c](https://github.com/flighthq/flight/tree/2a5a54c3b182bc9c1ac247df07e9c0fcf44e668b/packages/input)
17
+ - [License](https://github.com/flighthq/flight/blob/2a5a54c3b182bc9c1ac247df07e9c0fcf44e668b/LICENSE.md)
@@ -1,2 +1,10 @@
1
- export * from './inputManager.ts';
1
+ export { attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, } from './inputBinding.ts';
2
+ export { applyGamepadAxisDeadZone, applyGamepadStickDeadZone, getGamepadAxisName, getGamepadButtonName, } from './inputGamepad.ts';
3
+ export { createInputManager, createInputSignals, initializeInputManager, initializeInputSignals, } from './inputSignals.ts';
4
+ export { connectInputStateToInputManager, createInputState, endInputStateFrame, getInputGamepadAxis, initializeInputState, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from './inputState.ts';
5
+ export { createInputTargetHandle, initializeInputTargetHandle } from './inputTarget.ts';
6
+ export { advanceInputKeyRepeatTimer, createInputKeyRepeatTimer, initializeInputKeyRepeatTimer, startInputKeyRepeatTimer, stopInputKeyRepeatTimer, } from './inputTimer.ts';
7
+ export { KeyCode } from './keyCode.ts';
8
+ export { GamepadAxisKind, GamepadButtonKind, GamepadMapping, getGamepadAxisKindString, getGamepadButtonKindString, getGamepadMappingString, getInputPointerLockExitReasonString, getInputPointerLockRequestReasonString, getMouseWheelModeString, getPointerTypeString, parseGamepadAxisKind, parseGamepadButtonKind, parseGamepadMapping, parseInputPointerLockExitReason, parseInputPointerLockRequestReason, parseMouseWheelMode, parsePointerType, } from './types.ts';
9
+ export type { AttachInputOptions, GamepadStickOutput, HostInputCapabilities, HostInputDropFileCapability, HostInputFocusCapability, HostInputIngressCapability, HostInputPointerLockCapability, HostInputTargetCapability, InputDisposer, InputGamepadAxisData, InputGamepadButtonData, InputGamepadConnectData, InputIngressAttach, InputIngressRelease, InputIngressSink, InputKeyRepeatOptions, InputKeyRepeatTimerRaw, InputKeyboardData, InputManagerRaw, InputPointerData, InputPointerLockExitFuture, InputPointerLockExitOutcome, InputPointerLockExitReason, InputPointerLockRequestFuture, InputPointerLockRequestOutcome, InputPointerLockRequestReason, InputRepeatCallback, InputSignalsRaw, InputStateRaw, InputTargetHandleRaw, InputTextData, MouseWheelMode, PointerType, } from './types.ts';
2
10
  //# sourceMappingURL=contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sour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wB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC"}
package/dist/contract.js CHANGED
@@ -1,2 +1,11 @@
1
- export * from "./inputManager.js";
1
+ // Generated from crates/flight-input/src/lib.rs by flight-compiler.
2
+ // Rust is authoritative; run `npm run generate` after changing it.
3
+ export { attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, } from './inputBinding.js';
4
+ export { applyGamepadAxisDeadZone, applyGamepadStickDeadZone, getGamepadAxisName, getGamepadButtonName, } from './inputGamepad.js';
5
+ export { createInputManager, createInputSignals, initializeInputManager, initializeInputSignals, } from './inputSignals.js';
6
+ export { connectInputStateToInputManager, createInputState, endInputStateFrame, getInputGamepadAxis, initializeInputState, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from './inputState.js';
7
+ export { createInputTargetHandle, initializeInputTargetHandle } from './inputTarget.js';
8
+ export { advanceInputKeyRepeatTimer, createInputKeyRepeatTimer, initializeInputKeyRepeatTimer, startInputKeyRepeatTimer, stopInputKeyRepeatTimer, } from './inputTimer.js';
9
+ export { KeyCode } from './keyCode.js';
10
+ export { GamepadAxisKind, GamepadButtonKind, GamepadMapping, getGamepadAxisKindString, getGamepadButtonKindString, getGamepadMappingString, getInputPointerLockExitReasonString, getInputPointerLockRequestReasonString, getMouseWheelModeString, getPointerTypeString, parseGamepadAxisKind, parseGamepadButtonKind, parseGamepadMapping, parseInputPointerLockExitReason, parseInputPointerLockRequestReason, parseMouseWheelMode, parsePointerType, } from './types.js';
2
11
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,mEAAmE;AAEnE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,+BAA+B,EAC/B,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,EACvB,mCAAmC,EACnC,sCAAsC,EACtC,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,+BAA+B,EAC/B,kCAAkC,EAClC,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { applyGamepadAxisDeadZone, applyGamepadStickDeadZone, attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, connectInputStateToInputManager, createInputKeyRepeatTimer, createInputManager, createInputState, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, endInputStateFrame, getGamepadAxisName, getGamepadButtonName, getInputGamepadAxis, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from './inputManager.ts';
1
+ export { GamepadAxisKind, GamepadButtonKind, GamepadMapping, advanceInputKeyRepeatTimer, applyGamepadAxisDeadZone, applyGamepadStickDeadZone, attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, connectInputStateToInputManager, createInputKeyRepeatTimer, createInputManager, createInputState, createInputTargetHandle, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, endInputStateFrame, getGamepadAxisName, getGamepadButtonName, getInputGamepadAxis, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, startInputKeyRepeatTimer, stopInputKeyRepeatTimer, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from './contract.ts';
2
+ export type { AttachInputOptions, GamepadStickOutput, HostInputCapabilities, HostInputDropFileCapability, HostInputFocusCapability, HostInputIngressCapability, HostInputPointerLockCapability, HostInputTargetCapability, InputDisposer, InputGamepadAxisData, InputGamepadButtonData, InputGamepadConnectData, InputIngressAttach, InputIngressRelease, InputIngressSink, InputKeyRepeatOptions, InputKeyRepeatTimerRaw, InputKeyboardData, InputManagerRaw, InputPointerData, InputPointerLockExitFuture, InputPointerLockExitOutcome, InputPointerLockExitReason, InputPointerLockRequestFuture, InputPointerLockRequestOutcome, InputPointerLockRequestReason, InputRepeatCallback, InputSignalsRaw, InputStateRaw, InputTargetHandleRaw, InputTextData, MouseWheelMode, PointerType, } from './contract.ts';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,4 @@
1
- export { applyGamepadAxisDeadZone, applyGamepadStickDeadZone, attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, connectInputStateToInputManager, createInputKeyRepeatTimer, createInputManager, createInputState, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, endInputStateFrame, getGamepadAxisName, getGamepadButtonName, getInputGamepadAxis, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from "./inputManager.js";
1
+ // Generated from crates/flight-input/src/lib.rs by flight-compiler.
2
+ // Rust is authoritative; run `npm run generate` after changing it.
3
+ export { GamepadAxisKind, GamepadButtonKind, GamepadMapping, advanceInputKeyRepeatTimer, applyGamepadAxisDeadZone, applyGamepadStickDeadZone, attachGamepadInput, attachKeyboardInput, attachPointerInput, attachRelativePointerInput, attachTextInput, attachWheelInput, connectInputStateToInputManager, createInputKeyRepeatTimer, createInputManager, createInputState, createInputTargetHandle, detachGamepadInput, detachKeyboardInput, detachPointerInput, detachRelativePointerInput, detachTextInput, detachWheelInput, endInputStateFrame, getGamepadAxisName, getGamepadButtonName, getInputGamepadAxis, isInputGamepadButtonDown, isInputKeyDown, isInputPointerButtonDown, startInputKeyRepeatTimer, stopInputKeyRepeatTimer, wasInputGamepadButtonPressed, wasInputGamepadButtonReleased, wasInputKeyPressed, wasInputKeyReleased, } from './contract.js';
2
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,mEAAmE;AAEnE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { InputIngressSource } from '@flighthq/host/contract';
2
+ import type { AttachInputOptions, HostInputIngressCapability, InputIngressRelease, InputIngressSink, InputManagerRaw } from './types.ts';
3
+ declare enum InputBindingKind {
4
+ Gamepad = "gamepad",
5
+ Keyboard = "keyboard",
6
+ Pointer = "pointer",
7
+ RelativePointer = "relativePointer",
8
+ Text = "text",
9
+ Wheel = "wheel"
10
+ }
11
+ interface InputBinding {
12
+ source: InputIngressSource;
13
+ kind: InputBindingKind;
14
+ release: InputIngressRelease;
15
+ }
16
+ interface InputManagerRuntime {
17
+ sink?: InputIngressSink;
18
+ bindings: InputBinding[];
19
+ }
20
+ /**
21
+ * Attaches gamepad ingress (TS `attachGamepadInput`). The release is origin-pinned per manager,
22
+ * source identity and input kind.
23
+ */
24
+ export declare function attachGamepadInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
25
+ /**
26
+ * Attaches keyboard ingress (TS `attachKeyboardInput`).
27
+ */
28
+ export declare function attachKeyboardInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
29
+ /**
30
+ * Attaches pointer ingress (TS `attachPointerInput`).
31
+ */
32
+ export declare function attachPointerInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
33
+ /**
34
+ * Attaches relative-pointer ingress (TS `attachRelativePointerInput`).
35
+ */
36
+ export declare function attachRelativePointerInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
37
+ /**
38
+ * Attaches text ingress (TS `attachTextInput`).
39
+ */
40
+ export declare function attachTextInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
41
+ /**
42
+ * Attaches wheel ingress (TS `attachWheelInput`).
43
+ */
44
+ export declare function attachWheelInput(hostInputIngress: Readonly<HostInputIngressCapability>, manager: InputManagerRaw, source: Readonly<InputIngressSource>, options?: Readonly<AttachInputOptions>): void;
45
+ /**
46
+ * Detaches gamepad ingress for exactly that manager/source binding (TS `detachGamepadInput`).
47
+ */
48
+ export declare function detachGamepadInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
49
+ /**
50
+ * Detaches keyboard ingress (TS `detachKeyboardInput`).
51
+ */
52
+ export declare function detachKeyboardInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
53
+ /**
54
+ * Detaches pointer ingress (TS `detachPointerInput`).
55
+ */
56
+ export declare function detachPointerInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
57
+ /**
58
+ * Detaches relative-pointer ingress (TS `detachRelativePointerInput`).
59
+ */
60
+ export declare function detachRelativePointerInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
61
+ /**
62
+ * Detaches text ingress (TS `detachTextInput`).
63
+ */
64
+ export declare function detachTextInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
65
+ /**
66
+ * Detaches wheel ingress (TS `detachWheelInput`).
67
+ */
68
+ export declare function detachWheelInput(manager: InputManagerRaw, source: Readonly<InputIngressSource>): void;
69
+ export type { InputManagerRuntime };
70
+ //# sourceMappingURL=inputBinding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputBinding.d.ts","sourceRoot":"","sources":["../src/inputBinding.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EACV,kBAAkB,EAClB,0BAA0B,EAI1B,mBAAmB,EACnB,gBAAgB,EAEhB,eAAe,EAGhB,MAAM,YAAY,CAAC;AAGpB,aAAK,gBAAgB;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,gBAAgB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,EACtD,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EACpC,OAAO,CAAC,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GACrC,IAAI,CAIN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,EACtD,OAAO,EAAE,eAAe,EACxB,MAA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CAExG;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAEvG;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAE/G;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAEpG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAErG;AA8MD,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,364 @@
1
+ // Generated from crates/flight-input/src/input_binding.rs by flight-compiler.
2
+ // Rust is authoritative; run `npm run generate` after changing it.
3
+ import { emitSignal } from '@flighthq/signals/contract';
4
+ import { inputManagerRegistryStore } from './types.js';
5
+ var InputBindingKind;
6
+ (function (InputBindingKind) {
7
+ InputBindingKind["Gamepad"] = "gamepad";
8
+ InputBindingKind["Keyboard"] = "keyboard";
9
+ InputBindingKind["Pointer"] = "pointer";
10
+ InputBindingKind["RelativePointer"] = "relativePointer";
11
+ InputBindingKind["Text"] = "text";
12
+ InputBindingKind["Wheel"] = "wheel";
13
+ })(InputBindingKind || (InputBindingKind = {}));
14
+ /**
15
+ * Attaches gamepad ingress (TS `attachGamepadInput`). The release is origin-pinned per manager,
16
+ * source identity and input kind.
17
+ */
18
+ export function attachGamepadInput(hostInputIngress, manager, source, options) {
19
+ const sink = getOrCreateSink(manager);
20
+ const release = hostInputIngress.attachGamepad(source, sink, options);
21
+ setInputBinding(manager, source, InputBindingKind.Gamepad, release);
22
+ }
23
+ /**
24
+ * Attaches keyboard ingress (TS `attachKeyboardInput`).
25
+ */
26
+ export function attachKeyboardInput(hostInputIngress, manager, source, options) {
27
+ const sink = getOrCreateSink(manager);
28
+ const release = hostInputIngress.attachKeyboard(source, sink, options);
29
+ setInputBinding(manager, source, InputBindingKind.Keyboard, release);
30
+ }
31
+ /**
32
+ * Attaches pointer ingress (TS `attachPointerInput`).
33
+ */
34
+ export function attachPointerInput(hostInputIngress, manager, source, options) {
35
+ const sink = getOrCreateSink(manager);
36
+ const release = hostInputIngress.attachPointer(source, sink, options);
37
+ setInputBinding(manager, source, InputBindingKind.Pointer, release);
38
+ }
39
+ /**
40
+ * Attaches relative-pointer ingress (TS `attachRelativePointerInput`).
41
+ */
42
+ export function attachRelativePointerInput(hostInputIngress, manager, source, options) {
43
+ const sink = getOrCreateSink(manager);
44
+ const release = hostInputIngress.attachRelativePointer(source, sink, options);
45
+ setInputBinding(manager, source, InputBindingKind.RelativePointer, release);
46
+ }
47
+ /**
48
+ * Attaches text ingress (TS `attachTextInput`).
49
+ */
50
+ export function attachTextInput(hostInputIngress, manager, source, options) {
51
+ const sink = getOrCreateSink(manager);
52
+ const release = hostInputIngress.attachText(source, sink, options);
53
+ setInputBinding(manager, source, InputBindingKind.Text, release);
54
+ }
55
+ /**
56
+ * Attaches wheel ingress (TS `attachWheelInput`).
57
+ */
58
+ export function attachWheelInput(hostInputIngress, manager, source, options) {
59
+ const sink = getOrCreateSink(manager);
60
+ const release = hostInputIngress.attachWheel(source, sink, options);
61
+ setInputBinding(manager, source, InputBindingKind.Wheel, release);
62
+ }
63
+ function buildInputIngressSink(manager) {
64
+ const captured = manager;
65
+ const gamepadAxisMove = (() => {
66
+ const manager = captured;
67
+ return (data) => emitGamepadAxisMove(manager, data);
68
+ })();
69
+ const gamepadButtonDown = (() => {
70
+ const manager = captured;
71
+ return (data) => emitGamepadButtonDown(manager, data);
72
+ })();
73
+ const gamepadButtonUp = (() => {
74
+ const manager = captured;
75
+ return (data) => emitGamepadButtonUp(manager, data);
76
+ })();
77
+ const gamepadConnect = (() => {
78
+ const manager = captured;
79
+ return (data) => emitGamepadConnect(manager, data);
80
+ })();
81
+ const gamepadDisconnect = (() => {
82
+ const manager = captured;
83
+ return (data) => emitGamepadDisconnect(manager, data);
84
+ })();
85
+ const keyDown = (() => {
86
+ const manager = captured;
87
+ return (data) => emitKeyDown(manager, data);
88
+ })();
89
+ const keyUp = (() => {
90
+ const manager = captured;
91
+ return (data) => emitKeyUp(manager, data);
92
+ })();
93
+ const pointerCancel = (() => {
94
+ const manager = captured;
95
+ return (data) => emitPointerCancel(manager, data);
96
+ })();
97
+ const pointerDown = (() => {
98
+ const manager = captured;
99
+ return (data) => emitPointerDown(manager, data);
100
+ })();
101
+ const pointerMove = (() => {
102
+ const manager = captured;
103
+ return (data) => emitPointerMove(manager, data);
104
+ })();
105
+ const pointerMoveRelative = (() => {
106
+ const manager = captured;
107
+ return (data) => emitPointerMoveRelative(manager, data);
108
+ })();
109
+ const pointerUp = (() => {
110
+ const manager = captured;
111
+ return (data) => emitPointerUp(manager, data);
112
+ })();
113
+ const textEdit = (() => {
114
+ const manager = captured;
115
+ return (data) => emitTextEdit(manager, data);
116
+ })();
117
+ const textInput = (() => {
118
+ const manager = captured;
119
+ return (data) => emitTextInput(manager, data);
120
+ })();
121
+ const wheel = (() => {
122
+ const manager = captured;
123
+ return (data) => emitWheel(manager, data);
124
+ })();
125
+ const isEnabled = (() => {
126
+ const manager = captured;
127
+ return () => isManagerEnabled(manager);
128
+ })();
129
+ return {
130
+ gamepadAxisMove: gamepadAxisMove,
131
+ gamepadButtonDown: gamepadButtonDown,
132
+ gamepadButtonUp: gamepadButtonUp,
133
+ gamepadConnect: gamepadConnect,
134
+ gamepadDisconnect: gamepadDisconnect,
135
+ isEnabled: isEnabled,
136
+ keyDown: keyDown,
137
+ keyUp: keyUp,
138
+ pointerCancel: pointerCancel,
139
+ pointerDown: pointerDown,
140
+ pointerMove: pointerMove,
141
+ pointerMoveRelative: pointerMoveRelative,
142
+ pointerUp: pointerUp,
143
+ textEdit: textEdit,
144
+ textInput: textInput,
145
+ wheel: wheel,
146
+ };
147
+ }
148
+ function clearInputBinding(manager, source, kind) {
149
+ {
150
+ const $release = takeInputBindingRelease(manager, source, kind);
151
+ if ($release !== undefined) {
152
+ const release = $release;
153
+ release();
154
+ }
155
+ }
156
+ }
157
+ /**
158
+ * Detaches gamepad ingress for exactly that manager/source binding (TS `detachGamepadInput`).
159
+ */
160
+ export function detachGamepadInput(manager, source) {
161
+ clearInputBinding(manager, source, InputBindingKind.Gamepad);
162
+ }
163
+ /**
164
+ * Detaches keyboard ingress (TS `detachKeyboardInput`).
165
+ */
166
+ export function detachKeyboardInput(manager, source) {
167
+ clearInputBinding(manager, source, InputBindingKind.Keyboard);
168
+ }
169
+ /**
170
+ * Detaches pointer ingress (TS `detachPointerInput`).
171
+ */
172
+ export function detachPointerInput(manager, source) {
173
+ clearInputBinding(manager, source, InputBindingKind.Pointer);
174
+ }
175
+ /**
176
+ * Detaches relative-pointer ingress (TS `detachRelativePointerInput`).
177
+ */
178
+ export function detachRelativePointerInput(manager, source) {
179
+ clearInputBinding(manager, source, InputBindingKind.RelativePointer);
180
+ }
181
+ /**
182
+ * Detaches text ingress (TS `detachTextInput`).
183
+ */
184
+ export function detachTextInput(manager, source) {
185
+ clearInputBinding(manager, source, InputBindingKind.Text);
186
+ }
187
+ /**
188
+ * Detaches wheel ingress (TS `detachWheelInput`).
189
+ */
190
+ export function detachWheelInput(manager, source) {
191
+ clearInputBinding(manager, source, InputBindingKind.Wheel);
192
+ }
193
+ function emitGamepadAxisMove(manager, data) {
194
+ if (!isManagerEnabled(manager)) {
195
+ return;
196
+ }
197
+ const signal = manager.onGamepadAxisMove;
198
+ emitSignal(signal, data);
199
+ }
200
+ function emitGamepadButtonDown(manager, data) {
201
+ if (!isManagerEnabled(manager)) {
202
+ return;
203
+ }
204
+ const signal = manager.onGamepadButtonDown;
205
+ emitSignal(signal, data);
206
+ }
207
+ function emitGamepadButtonUp(manager, data) {
208
+ if (!isManagerEnabled(manager)) {
209
+ return;
210
+ }
211
+ const signal = manager.onGamepadButtonUp;
212
+ emitSignal(signal, data);
213
+ }
214
+ function emitGamepadConnect(manager, data) {
215
+ if (!isManagerEnabled(manager)) {
216
+ return;
217
+ }
218
+ const signal = manager.onGamepadConnect;
219
+ emitSignal(signal, data);
220
+ }
221
+ function emitGamepadDisconnect(manager, data) {
222
+ if (!isManagerEnabled(manager)) {
223
+ return;
224
+ }
225
+ const signal = manager.onGamepadDisconnect;
226
+ emitSignal(signal, data);
227
+ }
228
+ function emitKeyDown(manager, data) {
229
+ if (!isManagerEnabled(manager)) {
230
+ return;
231
+ }
232
+ const signal = manager.onKeyDown;
233
+ emitSignal(signal, data);
234
+ }
235
+ function emitKeyUp(manager, data) {
236
+ if (!isManagerEnabled(manager)) {
237
+ return;
238
+ }
239
+ const signal = manager.onKeyUp;
240
+ emitSignal(signal, data);
241
+ }
242
+ function emitPointerCancel(manager, data) {
243
+ if (!isManagerEnabled(manager)) {
244
+ return;
245
+ }
246
+ const signal = manager.onPointerCancel;
247
+ emitSignal(signal, data);
248
+ }
249
+ function emitPointerDown(manager, data) {
250
+ if (!isManagerEnabled(manager)) {
251
+ return;
252
+ }
253
+ const signal = manager.onPointerDown;
254
+ emitSignal(signal, data);
255
+ }
256
+ function emitPointerMove(manager, data) {
257
+ if (!isManagerEnabled(manager)) {
258
+ return;
259
+ }
260
+ const signal = manager.onPointerMove;
261
+ emitSignal(signal, data);
262
+ }
263
+ function emitPointerMoveRelative(manager, data) {
264
+ if (!isManagerEnabled(manager)) {
265
+ return;
266
+ }
267
+ const signal = manager.onPointerMoveRelative;
268
+ emitSignal(signal, data);
269
+ }
270
+ function emitPointerUp(manager, data) {
271
+ if (!isManagerEnabled(manager)) {
272
+ return;
273
+ }
274
+ const signal = manager.onPointerUp;
275
+ emitSignal(signal, data);
276
+ }
277
+ function emitTextEdit(manager, data) {
278
+ if (!isManagerEnabled(manager)) {
279
+ return;
280
+ }
281
+ const signal = manager.onTextEdit;
282
+ emitSignal(signal, data);
283
+ }
284
+ function emitTextInput(manager, data) {
285
+ if (!isManagerEnabled(manager)) {
286
+ return;
287
+ }
288
+ const signal = manager.onTextInput;
289
+ emitSignal(signal, data);
290
+ }
291
+ function emitWheel(manager, data) {
292
+ if (!isManagerEnabled(manager)) {
293
+ return;
294
+ }
295
+ const signal = manager.onWheel;
296
+ emitSignal(signal, data);
297
+ }
298
+ function getInputManagerRegistry(manager) {
299
+ return inputManagerRegistryStore.get(manager);
300
+ }
301
+ function getOrCreateSink(manager) {
302
+ const candidate = buildInputIngressSink(manager);
303
+ let locked = manager;
304
+ const registry = getInputManagerRegistry(locked);
305
+ if (registry.sink !== undefined) {
306
+ const sink = registry.sink;
307
+ return sink;
308
+ }
309
+ registry.sink = candidate;
310
+ return candidate;
311
+ }
312
+ function isInputBindingFor(binding, source, kind) {
313
+ return binding.kind === kind && binding.source.handle === source.handle;
314
+ }
315
+ function isManagerEnabled(manager) {
316
+ return manager.enabled;
317
+ }
318
+ function setInputBinding(manager, source, kind, release) {
319
+ {
320
+ const $previous = takeInputBindingRelease(manager, source, kind);
321
+ if ($previous !== undefined) {
322
+ const previous = $previous;
323
+ previous();
324
+ }
325
+ }
326
+ let locked = manager;
327
+ const registry = getInputManagerRegistry(locked);
328
+ registry.bindings.push({ source: source, kind: kind, release: release });
329
+ }
330
+ function takeInputBindingRelease(manager, source, kind) {
331
+ let locked = manager;
332
+ const registry = getInputManagerRegistry(locked);
333
+ let release = undefined;
334
+ for (const binding of registry.bindings) {
335
+ if (isInputBindingFor(binding, source, kind)) {
336
+ release = binding.release;
337
+ break;
338
+ }
339
+ }
340
+ ((items, keep) => {
341
+ let kept = 0;
342
+ let index = 0;
343
+ try {
344
+ for (; index < items.length; index += 1) {
345
+ const item = items[index];
346
+ if (keep(item)) {
347
+ items[kept] = item;
348
+ kept += 1;
349
+ }
350
+ }
351
+ }
352
+ finally {
353
+ const length = items.length;
354
+ for (let rest = index; rest < length; rest += 1) {
355
+ items[kept + rest - index] = items[rest];
356
+ }
357
+ items.length = kept + length - index;
358
+ }
359
+ })(registry.bindings, (binding) => {
360
+ return !isInputBindingFor(binding, source, kind);
361
+ });
362
+ return release;
363
+ }
364
+ //# sourceMappingURL=inputBinding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputBinding.js","sourceRoot":"","sources":["../src/inputBinding.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,mEAAmE;AAGnE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAexD,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,IAAK,gBAOJ;AAPD,WAAK,gBAAgB;IACnB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,uCAAmB,CAAA;IACnB,uDAAmC,CAAA;IACnC,iCAAa,CAAA;IACb,mCAAe,CAAA;AACjB,CAAC,EAPI,gBAAgB,KAAhB,gBAAgB,QAOpB;AAaD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,gBAAsD,EACtD,OAAwB,EACxB,MAAoC,EACpC,OAAsC;IAEtC,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,gBAAgB,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,gBAAsD,EACtD,OAAwB,EACxB,MAAoC,EACpC,OAAsC;IAEtC,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,gBAAgB,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACvE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,QAAQ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Q,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE;QAChC,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { GamepadAxisKind, GamepadButtonKind, GamepadMapping, GamepadStickOutput } from './types.ts';
2
+ /**
3
+ * Filters one gamepad axis through a simple dead zone (TS `applyGamepadAxisDeadZone`).
4
+ */
5
+ export declare function applyGamepadAxisDeadZone(value: number, deadZone: number): number;
6
+ /**
7
+ * Filters a two-dimensional stick through a radial dead zone (TS
8
+ * `applyGamepadStickDeadZone`). Direction is preserved and the magnitude is rescaled to [0, 1].
9
+ * Alias-safe: the coordinates are captured before `out` is written.
10
+ */
11
+ export declare function applyGamepadStickDeadZone(out: GamepadStickOutput, x: number, y: number, deadZone: number): void;
12
+ /**
13
+ * Returns the semantic axis name for a standard-mapping index (TS `getGamepadAxisName`).
14
+ */
15
+ export declare function getGamepadAxisName(mapping: GamepadMapping, index: number): GamepadAxisKind | undefined;
16
+ /**
17
+ * Returns the semantic button name for a standard-mapping index (TS `getGamepadButtonName`).
18
+ */
19
+ export declare function getGamepadButtonName(mapping: GamepadMapping, index: number): GamepadButtonKind | undefined;
20
+ //# sourceMappingURL=inputGamepad.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputGamepad.d.ts","sourceRoot":"","sources":["../src/inputGamepad.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAyBzG;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUhF;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAe/G;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAQtG;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAQ1G"}