@rive-app/canvas-single 2.42.1 → 2.43.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/package.json +1 -1
- package/rive.d.ts +50 -10
- package/rive.js +115 -38
- package/rive.js.map +1 -1
- package/utils/registerKeyboardInteractions.d.ts +4 -2
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare class StateMachineInput {
|
|
|
131
131
|
delete(): void;
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* @deprecated Rive Events
|
|
134
|
+
* @deprecated Subscribing to Rive Events at runtime is deprecated and will be removed in a future major
|
|
135
135
|
* version: please use data binding instead. See
|
|
136
136
|
* {@link https://rive.app/docs/runtimes/web/rive-events} for how to migrate.
|
|
137
137
|
*/
|
|
@@ -177,14 +177,15 @@ export declare enum EventType {
|
|
|
177
177
|
Draw = "draw",
|
|
178
178
|
Advance = "advance",
|
|
179
179
|
/**
|
|
180
|
-
* @deprecated
|
|
181
|
-
* future major version
|
|
182
|
-
* state machine actions to react to changes from your
|
|
180
|
+
* @deprecated Subscribing to state change events at runtime is deprecated
|
|
181
|
+
* and will be removed in a future major version: use data binding (view model
|
|
182
|
+
* property observers) or state machine actions to react to changes from your
|
|
183
|
+
* graphic instead. See
|
|
183
184
|
* {@link https://rive.app/docs/editor/state-machine/states#actions} for more details.
|
|
184
185
|
*/
|
|
185
186
|
StateChange = "statechange",
|
|
186
187
|
/**
|
|
187
|
-
* @deprecated Rive Events
|
|
188
|
+
* @deprecated Subscribing to Rive Events at runtime is deprecated and will be removed in a future
|
|
188
189
|
* major version: please use data binding instead. See
|
|
189
190
|
* {@link https://rive.app/docs/runtimes/web/rive-events} for how to migrate.
|
|
190
191
|
*/
|
|
@@ -192,11 +193,36 @@ export declare enum EventType {
|
|
|
192
193
|
AudioStatusChange = "audiostatuschange"
|
|
193
194
|
}
|
|
194
195
|
/**
|
|
195
|
-
* @deprecated Rive Events
|
|
196
|
+
* @deprecated Subscribing to Rive Events at runtime is deprecated and will be removed in a future major
|
|
196
197
|
* version: please use data binding instead. See
|
|
197
198
|
* {@link https://rive.app/docs/runtimes/web/rive-events} for how to migrate.
|
|
198
199
|
*/
|
|
199
200
|
export type RiveEventPayload = rc.RiveEvent | rc.OpenUrlEvent;
|
|
201
|
+
/**
|
|
202
|
+
* The deprecations this runtime warns about. Each warning prints its own id, so
|
|
203
|
+
* the value can be copied straight out of the console into
|
|
204
|
+
* {@link Rive.suppressDeprecationWarnings}.
|
|
205
|
+
*/
|
|
206
|
+
export declare const DeprecationKeys: {
|
|
207
|
+
readonly animationNames: "animation-names";
|
|
208
|
+
readonly animationsParam: "animations-param";
|
|
209
|
+
readonly defaultStateMachine: "default-state-machine";
|
|
210
|
+
readonly legacyConstructors: "legacy-constructors";
|
|
211
|
+
readonly legacyUnsubscribe: "legacy-unsubscribe";
|
|
212
|
+
readonly loopEvents: "loop-events";
|
|
213
|
+
readonly namesArray: "names-array";
|
|
214
|
+
readonly riveEvents: "rive-events";
|
|
215
|
+
readonly scrub: "scrub";
|
|
216
|
+
readonly stateChangeEvents: "state-change-events";
|
|
217
|
+
readonly stateMachineInputs: "state-machine-inputs";
|
|
218
|
+
readonly stateMachinesParam: "state-machines-param";
|
|
219
|
+
readonly textRuns: "text-runs";
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* An id accepted by {@link Rive.suppressDeprecationWarnings}, as either a
|
|
223
|
+
* {@link DeprecationKeys} entry or the string literal it holds.
|
|
224
|
+
*/
|
|
225
|
+
export type DeprecationId = (typeof DeprecationKeys)[keyof typeof DeprecationKeys];
|
|
200
226
|
export interface Event {
|
|
201
227
|
type: EventType;
|
|
202
228
|
data?: string | string[] | LoopEvent | number | RiveEventPayload | RiveFile;
|
|
@@ -358,7 +384,7 @@ export interface RiveParameters {
|
|
|
358
384
|
* This means any special Rive Event will have to be handled manually by subscribing to
|
|
359
385
|
* EventType.RiveEvent
|
|
360
386
|
*
|
|
361
|
-
* @deprecated Rive Events
|
|
387
|
+
* @deprecated Subscribing to Rive Events at runtime is deprecated and will be removed in a future
|
|
362
388
|
* major version: please use data binding instead. See
|
|
363
389
|
* {@link https://rive.app/docs/runtimes/web/rive-events} for how to migrate.
|
|
364
390
|
*/
|
|
@@ -412,9 +438,10 @@ export interface RiveParameters {
|
|
|
412
438
|
*/
|
|
413
439
|
onLoop?: EventCallback;
|
|
414
440
|
/**
|
|
415
|
-
* @deprecated
|
|
416
|
-
* future major version: use
|
|
417
|
-
* state machine actions to react to changes from your
|
|
441
|
+
* @deprecated Subscribing to state change events at runtime is deprecated
|
|
442
|
+
* and will be removed in a future major version: use data binding (view model
|
|
443
|
+
* property observers) or state machine actions to react to changes from your
|
|
444
|
+
* graphic instead. See
|
|
418
445
|
* {@link https://rive.app/docs/editor/state-machine/states#actions} for how
|
|
419
446
|
* to migrate.
|
|
420
447
|
*/
|
|
@@ -666,6 +693,19 @@ export declare class Rive {
|
|
|
666
693
|
private assetLoader;
|
|
667
694
|
private static readonly missingErrorMessage;
|
|
668
695
|
private static readonly cleanupErrorMessage;
|
|
696
|
+
/**
|
|
697
|
+
* Deprecation warnings to silence, by {@link DeprecationId}. Each warning
|
|
698
|
+
* prints the id needed to silence it, so you can copy it out of the console.
|
|
699
|
+
*
|
|
700
|
+
* ```ts
|
|
701
|
+
* Rive.suppressDeprecationWarnings = ["rive-events", "text-runs"];
|
|
702
|
+
* ```
|
|
703
|
+
*
|
|
704
|
+
* Assigning replaces the whole list.
|
|
705
|
+
* There is no option to silence everything
|
|
706
|
+
*/
|
|
707
|
+
static get suppressDeprecationWarnings(): readonly DeprecationId[];
|
|
708
|
+
static set suppressDeprecationWarnings(ids: readonly DeprecationId[]);
|
|
669
709
|
private shouldDisableRiveListeners;
|
|
670
710
|
private automaticallyHandleEvents;
|
|
671
711
|
private dispatchPointerExit;
|