@rive-app/canvas-single 2.41.0 → 2.41.1
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.js +62 -8
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +27 -12
- package/semantics/index.d.ts +1 -1
- package/semantics/types.d.ts +15 -2
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -164,12 +164,19 @@ export declare class RendererWrapper {
|
|
|
164
164
|
drawPath(path: RenderPath, paint: RenderPaint): void;
|
|
165
165
|
clipPath(path: RenderPath): void;
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
167
|
+
* Begins a frame. Crucial to call this at the start of the render loop: besides clearing
|
|
168
|
+
* the canvas, it registers the renderer so that its queued draws actually get flushed.
|
|
169
169
|
*
|
|
170
|
-
*
|
|
170
|
+
* Pass clear=false to draw on top of whatever the canvas already holds instead of
|
|
171
|
+
* starting from a blank one.
|
|
172
|
+
*
|
|
173
|
+
* For the underlying clear, check
|
|
171
174
|
* https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clearRect
|
|
172
175
|
*/
|
|
176
|
+
beginFrame(clear?: boolean): void;
|
|
177
|
+
/**
|
|
178
|
+
* @deprecated Use {@link beginFrame} instead. Equivalent to `beginFrame(true)`.
|
|
179
|
+
*/
|
|
173
180
|
clear(): void;
|
|
174
181
|
delete(): void;
|
|
175
182
|
flush(): void;
|
|
@@ -184,7 +191,15 @@ export declare class RendererWrapper {
|
|
|
184
191
|
|
|
185
192
|
export declare class RenderPathWrapper {
|
|
186
193
|
reset(): void;
|
|
187
|
-
addPath(
|
|
194
|
+
addPath(
|
|
195
|
+
path: CommandPath,
|
|
196
|
+
xx: number,
|
|
197
|
+
xy: number,
|
|
198
|
+
yx: number,
|
|
199
|
+
yy: number,
|
|
200
|
+
tx: number,
|
|
201
|
+
ty: number,
|
|
202
|
+
): void;
|
|
188
203
|
fillRule(value: FillRule): void;
|
|
189
204
|
moveTo(x: number, y: number): void;
|
|
190
205
|
lineTo(x: number, y: number): void;
|
|
@@ -233,11 +248,11 @@ export declare class Renderer extends RendererWrapper {
|
|
|
233
248
|
): void;
|
|
234
249
|
}
|
|
235
250
|
|
|
236
|
-
export declare class CommandPath {}
|
|
251
|
+
export declare class CommandPath { }
|
|
237
252
|
|
|
238
|
-
export declare class RenderPath extends RenderPathWrapper {}
|
|
253
|
+
export declare class RenderPath extends RenderPathWrapper { }
|
|
239
254
|
|
|
240
|
-
export declare class RenderPaint extends RenderPaintWrapper {}
|
|
255
|
+
export declare class RenderPaint extends RenderPaintWrapper { }
|
|
241
256
|
|
|
242
257
|
/////////////////////
|
|
243
258
|
// CANVAS RENDERER //
|
|
@@ -287,7 +302,7 @@ export declare class CanvasRenderPaint extends RenderPaint {
|
|
|
287
302
|
): void;
|
|
288
303
|
}
|
|
289
304
|
|
|
290
|
-
export declare class CanvasRenderPath extends RenderPath {}
|
|
305
|
+
export declare class CanvasRenderPath extends RenderPath { }
|
|
291
306
|
|
|
292
307
|
export interface CanvasRenderFactory {
|
|
293
308
|
makeRenderPaint(): CanvasRenderPaint;
|
|
@@ -1202,11 +1217,11 @@ export declare class DataEnum {
|
|
|
1202
1217
|
get values(): string[];
|
|
1203
1218
|
}
|
|
1204
1219
|
|
|
1205
|
-
export declare class SMIBool {}
|
|
1220
|
+
export declare class SMIBool { }
|
|
1206
1221
|
|
|
1207
|
-
export declare class SMINumber {}
|
|
1222
|
+
export declare class SMINumber { }
|
|
1208
1223
|
|
|
1209
|
-
export declare class SMITrigger {}
|
|
1224
|
+
export declare class SMITrigger { }
|
|
1210
1225
|
|
|
1211
1226
|
///////////
|
|
1212
1227
|
// ENUMS //
|
|
@@ -1428,7 +1443,7 @@ export declare class FontAsset extends FileAsset {
|
|
|
1428
1443
|
setFont(font: Font | FontWrapper): void;
|
|
1429
1444
|
}
|
|
1430
1445
|
|
|
1431
|
-
export declare class FileAssetLoader {}
|
|
1446
|
+
export declare class FileAssetLoader { }
|
|
1432
1447
|
|
|
1433
1448
|
export declare class CustomFileAssetLoader extends FileAssetLoader {
|
|
1434
1449
|
constructor({ loadContents }: { loadContents: Function });
|
package/semantics/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SemanticTreeModel } from "./semanticTreeModel";
|
|
2
2
|
export { AccessibilityOverlay } from "./accessibilityOverlay";
|
|
3
3
|
export type { AccessibilityOverlayOptions } from "./accessibilityOverlay";
|
|
4
|
-
export { SemanticRole, SemanticState, SemanticTrait, SemanticActionType, SemanticMode, hasState, hasTrait, roleName, stateNames, traitNames, } from "./types";
|
|
4
|
+
export { SemanticRole, SemanticState, SemanticCheckState, SemanticTrait, SemanticActionType, SemanticMode, CHECK_STATE_OFFSET, CHECK_STATE_MASK, checkStateOf, hasState, hasTrait, roleName, stateNames, traitNames, } from "./types";
|
|
5
5
|
export type { SemanticsDiffNode, SemanticsDiff, SemanticNodeData, RiveSemanticsOptions, } from "./types";
|
package/semantics/types.d.ts
CHANGED
|
@@ -25,8 +25,6 @@ export declare const SemanticState: {
|
|
|
25
25
|
readonly None: 0;
|
|
26
26
|
readonly Expanded: number;
|
|
27
27
|
readonly Selected: number;
|
|
28
|
-
readonly Checked: number;
|
|
29
|
-
readonly Mixed: number;
|
|
30
28
|
readonly Toggled: number;
|
|
31
29
|
readonly Required: number;
|
|
32
30
|
readonly Disabled: number;
|
|
@@ -39,6 +37,21 @@ export declare const SemanticState: {
|
|
|
39
37
|
readonly Multiline: number;
|
|
40
38
|
};
|
|
41
39
|
export declare function hasState(flags: number, state: number): boolean;
|
|
40
|
+
export declare const SemanticCheckState: {
|
|
41
|
+
readonly Unchecked: 0;
|
|
42
|
+
readonly Checked: 1;
|
|
43
|
+
readonly Mixed: 2;
|
|
44
|
+
};
|
|
45
|
+
export type SemanticCheckState = (typeof SemanticCheckState)[keyof typeof SemanticCheckState];
|
|
46
|
+
/** Bit offset of the check field within stateFlags. */
|
|
47
|
+
export declare const CHECK_STATE_OFFSET = 2;
|
|
48
|
+
/** Mask of the check field within stateFlags. */
|
|
49
|
+
export declare const CHECK_STATE_MASK: number;
|
|
50
|
+
/**
|
|
51
|
+
* Decodes the check field out of `flags`. The field is two bits. Returns 0, 1, or 2
|
|
52
|
+
* per the mapping in SemanticCheckState.
|
|
53
|
+
*/
|
|
54
|
+
export declare function checkStateOf(flags: number): SemanticCheckState;
|
|
42
55
|
/**
|
|
43
56
|
* Controls when the instance builds semantic trees and accessibility overlays.
|
|
44
57
|
*
|