manim-web 0.31.0 → 0.32.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/integrations/notebook.js +11 -11
- package/dist/integrations/react.js +17 -17
- package/dist/integrations/vue.js +16 -16
- package/dist/interaction/GamepadInput.d.ts +273 -0
- package/dist/interaction/GamepadInput.d.ts.map +1 -0
- package/dist/interaction/index.d.ts +1 -0
- package/dist/interaction/index.d.ts.map +1 -1
- package/dist/manim-web.browser.js +800 -572
- package/dist/{src-DegxZDnn.js → src-CaFgSOIB.js} +785 -557
- package/package.json +1 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { StateMachineInputSink, ValueSink, Unsubscribe, BindValueOptions } from './KeyboardInput';
|
|
2
|
+
/**
|
|
3
|
+
* The subset of a `GamepadButton` the controller reads. A real `GamepadButton`
|
|
4
|
+
* satisfies this, and a test stub implements only these two fields.
|
|
5
|
+
*/
|
|
6
|
+
export interface GamepadButtonLike {
|
|
7
|
+
/** Whether the button is pressed. */
|
|
8
|
+
readonly pressed: boolean;
|
|
9
|
+
/** The analog value in `[0, 1]` (triggers), or `0` / `1` for a plain button. */
|
|
10
|
+
readonly value: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The subset of a `Gamepad` the controller reads. A real `Gamepad` satisfies
|
|
14
|
+
* this shape, so `navigator.getGamepads()` feeds the controller directly, and a
|
|
15
|
+
* test injects a plain object with the same fields.
|
|
16
|
+
*/
|
|
17
|
+
export interface GamepadLike {
|
|
18
|
+
/** The pad's index in the snapshot array. */
|
|
19
|
+
readonly index: number;
|
|
20
|
+
/** The device id, when the pad exposes one. */
|
|
21
|
+
readonly id?: string;
|
|
22
|
+
/** Whether the pad is connected. Absent is treated as connected. */
|
|
23
|
+
readonly connected?: boolean;
|
|
24
|
+
/** The W3C mapping name, typically `'standard'`. */
|
|
25
|
+
readonly mapping?: string;
|
|
26
|
+
/** The button states, indexed by the standard-mapping order. */
|
|
27
|
+
readonly buttons: ReadonlyArray<GamepadButtonLike>;
|
|
28
|
+
/** The axis values in `[-1, 1]`, indexed by the standard-mapping order. */
|
|
29
|
+
readonly axes: ReadonlyArray<number>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The snapshot source. Returns one entry per pad slot; a slot is `null` when no
|
|
33
|
+
* pad is connected there. `navigator.getGamepads()` matches this signature.
|
|
34
|
+
*/
|
|
35
|
+
export type GamepadSource = () => ReadonlyArray<GamepadLike | null>;
|
|
36
|
+
/** A gamepad button callback. `button` is the resolved button index. */
|
|
37
|
+
export type GamepadButtonCallback = (button: number, gamepad: GamepadLike | null) => void;
|
|
38
|
+
/**
|
|
39
|
+
* The W3C standard-gamepad button name → index map. Use a name
|
|
40
|
+
* (`'A'`, `'dpadUp'`, `'LT'`) in any query instead of a raw index.
|
|
41
|
+
* @see https://www.w3.org/TR/gamepad/#remapping
|
|
42
|
+
*/
|
|
43
|
+
export declare const STANDARD_BUTTONS: {
|
|
44
|
+
readonly A: 0;
|
|
45
|
+
readonly B: 1;
|
|
46
|
+
readonly X: 2;
|
|
47
|
+
readonly Y: 3;
|
|
48
|
+
readonly LB: 4;
|
|
49
|
+
readonly RB: 5;
|
|
50
|
+
readonly LT: 6;
|
|
51
|
+
readonly RT: 7;
|
|
52
|
+
readonly select: 8;
|
|
53
|
+
readonly start: 9;
|
|
54
|
+
readonly L3: 10;
|
|
55
|
+
readonly R3: 11;
|
|
56
|
+
readonly dpadUp: 12;
|
|
57
|
+
readonly dpadDown: 13;
|
|
58
|
+
readonly dpadLeft: 14;
|
|
59
|
+
readonly dpadRight: 15;
|
|
60
|
+
readonly guide: 16;
|
|
61
|
+
};
|
|
62
|
+
/** The standard-mapping axis indices for the two sticks. */
|
|
63
|
+
export declare const STANDARD_AXES: {
|
|
64
|
+
readonly leftX: 0;
|
|
65
|
+
readonly leftY: 1;
|
|
66
|
+
readonly rightX: 2;
|
|
67
|
+
readonly rightY: 3;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Resolve a button name or index to a standard-mapping index.
|
|
71
|
+
* @param button - A button index, or a name in any common spelling.
|
|
72
|
+
* @returns The index, or `-1` when the name is unknown.
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveButton(button: number | string): number;
|
|
75
|
+
/** Options for a {@link GamepadInput}. */
|
|
76
|
+
export interface GamepadInputOptions {
|
|
77
|
+
/**
|
|
78
|
+
* Which pad slot to read. By default the first connected pad in the snapshot
|
|
79
|
+
* is used, so a single controller just works.
|
|
80
|
+
*/
|
|
81
|
+
gamepadIndex?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Stick deadzone in `[0, 1]`. An axis whose magnitude is below this reads as
|
|
84
|
+
* `0`, so a resting stick does not drift. Default `0.1`.
|
|
85
|
+
*/
|
|
86
|
+
deadzone?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Attach the connection listeners immediately on construction. Set `false` to
|
|
89
|
+
* attach later with {@link GamepadInput.enable}. Default `true`.
|
|
90
|
+
*/
|
|
91
|
+
autoEnable?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/** Whether the Web Gamepad API is available in this environment. */
|
|
94
|
+
export declare function isGamepadSupported(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Reads live gamepad state for interactive apps and games. Mirrors
|
|
97
|
+
* {@link KeyboardInput}: construct, then
|
|
98
|
+
* {@link enable} / {@link disable} / {@link dispose}, and {@link poll} once a
|
|
99
|
+
* frame.
|
|
100
|
+
*/
|
|
101
|
+
export declare class GamepadInput {
|
|
102
|
+
private readonly _getGamepads;
|
|
103
|
+
private readonly _eventTarget;
|
|
104
|
+
private readonly _gamepadIndex?;
|
|
105
|
+
private readonly _deadzone;
|
|
106
|
+
private readonly _down;
|
|
107
|
+
private readonly _pressed;
|
|
108
|
+
private readonly _released;
|
|
109
|
+
private _axes;
|
|
110
|
+
private _buttonValues;
|
|
111
|
+
private readonly _downCallbacks;
|
|
112
|
+
private readonly _upCallbacks;
|
|
113
|
+
private _enabled;
|
|
114
|
+
private readonly _onConnect;
|
|
115
|
+
private readonly _onDisconnect;
|
|
116
|
+
/**
|
|
117
|
+
* Create a GamepadInput.
|
|
118
|
+
* @param options - Behavior options.
|
|
119
|
+
* @param getGamepads - Snapshot source. Defaults to `navigator.getGamepads`,
|
|
120
|
+
* or `null` when no Gamepad API is present. Tests inject a fake here.
|
|
121
|
+
* @param eventTarget - Target for connection events. Defaults to `window`.
|
|
122
|
+
*/
|
|
123
|
+
constructor(options?: GamepadInputOptions, getGamepads?: GamepadSource | null, eventTarget?: EventTarget | null);
|
|
124
|
+
/** Whether the controller is enabled (connection listeners attached). */
|
|
125
|
+
get isEnabled(): boolean;
|
|
126
|
+
/** Whether a Gamepad API snapshot source is available. */
|
|
127
|
+
get hasSource(): boolean;
|
|
128
|
+
/** Whether a DOM target for connection events is available. */
|
|
129
|
+
get hasTarget(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Attach the `gamepadconnected` / `gamepaddisconnected` listeners. A no-op
|
|
132
|
+
* when already enabled. Polling works even without a DOM target.
|
|
133
|
+
*/
|
|
134
|
+
enable(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Detach the connection listeners and clear all held and edge state, so no
|
|
137
|
+
* button stays stuck. Reads return defaults until {@link enable} is called.
|
|
138
|
+
*/
|
|
139
|
+
disable(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Detach listeners and drop every registered callback. Use when the
|
|
142
|
+
* controller is no longer needed.
|
|
143
|
+
*/
|
|
144
|
+
dispose(): void;
|
|
145
|
+
/** Clear held buttons, both edge sets, and the cached axes and values. */
|
|
146
|
+
clear(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Read the live gamepad snapshot and compute the press / release edges. Call
|
|
149
|
+
* once per frame before reading state. The edges stay readable until the next
|
|
150
|
+
* {@link poll}, so {@link wasButtonPressed} is true for exactly one frame.
|
|
151
|
+
*
|
|
152
|
+
* When no pad is present, any held button is released and the state resets,
|
|
153
|
+
* so a disconnect never leaves a button stuck.
|
|
154
|
+
*/
|
|
155
|
+
poll(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Alias of {@link poll} for render-loop compatibility with
|
|
158
|
+
* {@link KeyboardInput}.
|
|
159
|
+
* @param _dt - Delta time (seconds), accepted but not used.
|
|
160
|
+
*/
|
|
161
|
+
update(_dt?: number): void;
|
|
162
|
+
/**
|
|
163
|
+
* Whether the button is held right now (as of the last {@link poll}).
|
|
164
|
+
* @param button - A button index, or a name (`'A'`, `'dpadUp'`, `'LT'`).
|
|
165
|
+
*/
|
|
166
|
+
isButtonDown(button: number | string): boolean;
|
|
167
|
+
/** Whether any button is held right now. */
|
|
168
|
+
anyButtonDown(): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the button went down on the last {@link poll}. True for exactly one
|
|
171
|
+
* frame after a 0→1 transition.
|
|
172
|
+
* @param button - A button index or name.
|
|
173
|
+
*/
|
|
174
|
+
wasButtonPressed(button: number | string): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Whether the button came up on the last {@link poll}. True for exactly one
|
|
177
|
+
* frame after a 1→0 transition.
|
|
178
|
+
* @param button - A button index or name.
|
|
179
|
+
*/
|
|
180
|
+
wasButtonReleased(button: number | string): boolean;
|
|
181
|
+
/**
|
|
182
|
+
* The analog value `[0, 1]` of a button (triggers vary; plain buttons read
|
|
183
|
+
* `0` or `1`).
|
|
184
|
+
* @param button - A button index or name.
|
|
185
|
+
*/
|
|
186
|
+
getButtonValue(button: number | string): number;
|
|
187
|
+
/**
|
|
188
|
+
* The raw value `[-1, 1]` of an axis, with the deadzone applied so a resting
|
|
189
|
+
* stick reads `0`. The API convention is used verbatim: for the vertical
|
|
190
|
+
* stick axes, up is negative.
|
|
191
|
+
* @param index - The axis index (see {@link STANDARD_AXES}).
|
|
192
|
+
* @param deadzone - Override the instance deadzone for this read.
|
|
193
|
+
*/
|
|
194
|
+
getAxis(index: number, deadzone?: number): number;
|
|
195
|
+
/**
|
|
196
|
+
* The left stick as `[x, y]`, deadzone applied, with up as `+y` (the API's
|
|
197
|
+
* downward vertical axis is flipped to match {@link KeyboardInput}).
|
|
198
|
+
*/
|
|
199
|
+
getLeftStick(): [number, number];
|
|
200
|
+
/** The right stick as `[x, y]`, deadzone applied, with up as `+y`. */
|
|
201
|
+
getRightStick(): [number, number];
|
|
202
|
+
/**
|
|
203
|
+
* A normalized movement direction `[x, y]`, up is `+y`. The d-pad wins when
|
|
204
|
+
* any d-pad button is held; otherwise the left stick is used. A neutral input
|
|
205
|
+
* stays `[0, 0]`.
|
|
206
|
+
*/
|
|
207
|
+
getDirectionVector(): [number, number];
|
|
208
|
+
/** The connected pads in the current snapshot (empty when headless). */
|
|
209
|
+
getConnectedGamepads(): GamepadLike[];
|
|
210
|
+
/**
|
|
211
|
+
* Register a button-down callback, fired by {@link poll} on a 0→1 edge.
|
|
212
|
+
* @param button - A button index or name, or `'any'` for every button.
|
|
213
|
+
* @param callback - Called with the button index and the pad.
|
|
214
|
+
* @returns An unsubscribe function.
|
|
215
|
+
*/
|
|
216
|
+
onButtonDown(button: number | string, callback: GamepadButtonCallback): Unsubscribe;
|
|
217
|
+
/**
|
|
218
|
+
* Register a button-up callback, fired by {@link poll} on a 1→0 edge.
|
|
219
|
+
* @param button - A button index or name, or `'any'` for every button.
|
|
220
|
+
* @param callback - Called with the button index and the pad.
|
|
221
|
+
* @returns An unsubscribe function.
|
|
222
|
+
*/
|
|
223
|
+
onButtonUp(button: number | string, callback: GamepadButtonCallback): Unsubscribe;
|
|
224
|
+
/**
|
|
225
|
+
* Hold a `StateMachine` bool input to match a button: `true` while held,
|
|
226
|
+
* `false` on release.
|
|
227
|
+
* @param machine - The `StateMachine` (or any {@link StateMachineInputSink}).
|
|
228
|
+
* @param inputName - The bool input name.
|
|
229
|
+
* @param button - The button to track.
|
|
230
|
+
* @returns An unsubscribe function.
|
|
231
|
+
*/
|
|
232
|
+
bindBool(machine: StateMachineInputSink, inputName: string, button: number | string): Unsubscribe;
|
|
233
|
+
/**
|
|
234
|
+
* Fire a `StateMachine` trigger input on each button-down.
|
|
235
|
+
* @param machine - The `StateMachine` (or any {@link StateMachineInputSink}).
|
|
236
|
+
* @param triggerName - The trigger input name.
|
|
237
|
+
* @param button - The button to track.
|
|
238
|
+
* @returns An unsubscribe function.
|
|
239
|
+
*/
|
|
240
|
+
bindTrigger(machine: StateMachineInputSink, triggerName: string, button: number | string): Unsubscribe;
|
|
241
|
+
/**
|
|
242
|
+
* Drive a `ValueTracker` from a button: `heldValue` while held,
|
|
243
|
+
* `releasedValue` on release.
|
|
244
|
+
* @param tracker - The `ValueTracker` (or any {@link ValueSink}).
|
|
245
|
+
* @param button - The button to track.
|
|
246
|
+
* @param options - The held and released values.
|
|
247
|
+
* @returns An unsubscribe function.
|
|
248
|
+
*/
|
|
249
|
+
bindValue(tracker: ValueSink, button: number | string, options: BindValueOptions): Unsubscribe;
|
|
250
|
+
/** Read the active pad from the snapshot, honoring the `gamepadIndex` option. */
|
|
251
|
+
private _readActivePad;
|
|
252
|
+
/** Release every held button, emitting up callbacks, on a disconnect. */
|
|
253
|
+
private _releaseAll;
|
|
254
|
+
/** Apply the deadzone: magnitudes below `deadzone` read as `0`. */
|
|
255
|
+
private _applyDeadzone;
|
|
256
|
+
private _addCallback;
|
|
257
|
+
/** Resolve a callback registration key, warning on an unknown button name. */
|
|
258
|
+
private _callbackKey;
|
|
259
|
+
private _emit;
|
|
260
|
+
/** Log a connected pad. The snapshot is still read fresh each {@link poll}. */
|
|
261
|
+
private _handleConnect;
|
|
262
|
+
/** Log a disconnected pad. {@link poll} releases its held buttons. */
|
|
263
|
+
private _handleDisconnect;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Factory for a {@link GamepadInput}.
|
|
267
|
+
* @param options - Behavior options.
|
|
268
|
+
* @param getGamepads - Snapshot source.
|
|
269
|
+
* @param eventTarget - Target for connection events.
|
|
270
|
+
* @returns A new GamepadInput.
|
|
271
|
+
*/
|
|
272
|
+
export declare function makeGamepadInput(options?: GamepadInputOptions, getGamepads?: GamepadSource | null, eventTarget?: EventTarget | null): GamepadInput;
|
|
273
|
+
//# sourceMappingURL=GamepadInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GamepadInput.d.ts","sourceRoot":"","sources":["../../src/interaction/GamepadInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAMzB;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACnD,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;AAEpE,wEAAwE;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OA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GAAG,WAAW;IAInF;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,qBAAqB,GAAG,WAAW;IAQjF;;;;;;;OAOG;IACH,QAAQ,CACN,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,MAAM,GACtB,WAAW;IASd;;;;;;OAMG;IACH,WAAW,CACT,OAAO,EAAE,qBAAqB,EAC9B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,MAAM,GACtB,WAAW;IAId;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,WAAW;IAc9F,iFAAiF;IACjF,OAAO,CAAC,cAAc;IAetB,yEAAyE;IACzE,OAAO,CAAC,WAAW;IASnB,mEAAmE;IACnE,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,YAAY;IAepB,8EAA8E;IAC9E,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,KAAK;IASb,+EAA+E;IAC/E,OAAO,CAAC,cAAc;IAKtB,sEAAsE;IACtE,OAAO,CAAC,iBAAiB;CAI1B;AASD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,mBAAmB,EAC7B,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,EAClC,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAC/B,YAAY,CAEd"}
|
|
@@ -13,6 +13,7 @@ export { MatrixTracker, makeMatrixTracker, applyMatrixLive, type Matrix2x2, type
|
|
|
13
13
|
export { SelectionManager, type SelectionManagerOptions } from './SelectionManager';
|
|
14
14
|
export { StateMachine, GuardBuilder, when, allOf, anyOf, type InputValue, type InputKind, type InputsSnapshot, type Guard, type StateContext, type StateAction, type StateConfig, type TransitionConfig, type StateMachineOptions, } from './StateMachine';
|
|
15
15
|
export { KeyboardInput, makeKeyboardInput, normalizeKey, type KeyboardInputOptions, type KeyCallback, type Unsubscribe, type StateMachineInputSink, type ValueSink, type BindValueOptions, } from './KeyboardInput';
|
|
16
|
+
export { GamepadInput, makeGamepadInput, resolveButton, isGamepadSupported, STANDARD_BUTTONS, STANDARD_AXES, type GamepadInputOptions, type GamepadButtonLike, type GamepadLike, type GamepadSource, type GamepadButtonCallback, } from './GamepadInput';
|
|
16
17
|
export { OrbitControls, type OrbitControlsOptions } from './OrbitControls';
|
|
17
18
|
export { PanZoomControls, makePanZoomControls, type PanZoomControlsOptions, type PanZoomCamera, type PanZoomBounds, } from './PanZoomControls';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interaction/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGpF,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interaction/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB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