@openremote/or-rive-renderer 1.24.0 → 1.24.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/custom-elements-jsx.d.ts +97 -49
- package/package.json +4 -1
package/custom-elements-jsx.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import type { OrRiveRenderer } from "./lib/index.d.ts";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -27,7 +26,6 @@ export type ScopedElements<
|
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
type BaseProps<T extends HTMLElement> = {
|
|
30
|
-
|
|
31
29
|
/** Content added between the opening and closing tags of the element */
|
|
32
30
|
children?: any;
|
|
33
31
|
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
@@ -50,6 +48,8 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
50
48
|
key?: string | number;
|
|
51
49
|
/** Specifies the language of the element. */
|
|
52
50
|
lang?: string;
|
|
51
|
+
/** Defines the element's semantic role for accessibility APIs. */
|
|
52
|
+
role?: string;
|
|
53
53
|
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
54
54
|
part?: string;
|
|
55
55
|
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
@@ -70,105 +70,153 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
70
70
|
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
71
71
|
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
72
72
|
popovertargetaction?: "show" | "hide" | "toggle";
|
|
73
|
-
|
|
74
|
-
} ;
|
|
75
|
-
|
|
76
|
-
type BaseEvents = {
|
|
77
|
-
|
|
78
|
-
|
|
79
73
|
};
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
type BaseEvents = {};
|
|
82
76
|
|
|
83
77
|
export type OrRiveRendererProps = {
|
|
84
78
|
/** A string representing the URL or path to the public asset .riv file.
|
|
85
79
|
For more details, refer to Rive Parameters on how to properly use this property. */
|
|
86
|
-
|
|
80
|
+
url?: OrRiveRenderer["url"];
|
|
87
81
|
/** The string representing the artboard you want to display.
|
|
88
82
|
When not supplied, the default artboard from the .riv file is selected.
|
|
89
83
|
Docs: https://rive.app/docs/runtimes/web/artboards */
|
|
90
|
-
|
|
84
|
+
artboard?: OrRiveRenderer["artboard"];
|
|
91
85
|
/** A list of strings (`["My State Machine"]`) you wish to display.
|
|
92
86
|
Look up the Rive documentation for more info: https://rive.app/docs/runtimes/web/state-machines.
|
|
93
87
|
By default, the state machine will autoplay. */
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
stateMachines?: OrRiveRenderer["stateMachines"];
|
|
89
|
+
};
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
export type OrRiveRendererSolidJsProps = {
|
|
92
|
+
/** A string representing the URL or path to the public asset .riv file.
|
|
93
|
+
For more details, refer to Rive Parameters on how to properly use this property. */
|
|
94
|
+
"prop:url"?: OrRiveRenderer["url"];
|
|
95
|
+
/** The string representing the artboard you want to display.
|
|
96
|
+
When not supplied, the default artboard from the .riv file is selected.
|
|
97
|
+
Docs: https://rive.app/docs/runtimes/web/artboards */
|
|
98
|
+
"prop:artboard"?: OrRiveRenderer["artboard"];
|
|
99
|
+
/** A list of strings (`["My State Machine"]`) you wish to display.
|
|
100
|
+
Look up the Rive documentation for more info: https://rive.app/docs/runtimes/web/state-machines.
|
|
101
|
+
By default, the state machine will autoplay. */
|
|
102
|
+
"prop:stateMachines"?: OrRiveRenderer["stateMachines"];
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
/** Set the innerHTML of the element */
|
|
105
|
+
innerHTML?: string;
|
|
106
|
+
/** Set the textContent of the element */
|
|
107
|
+
textContent?: string | number;
|
|
108
|
+
};
|
|
100
109
|
|
|
110
|
+
export type CustomElements = {
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
*
|
|
114
|
+
* ## Attributes & Properties
|
|
115
|
+
*
|
|
116
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
117
|
+
*
|
|
118
|
+
* - `url`: A string representing the URL or path to the public asset .riv file.
|
|
119
|
+
* For more details, refer to Rive Parameters on how to properly use this property.
|
|
120
|
+
* - `artboard`: The string representing the artboard you want to display.
|
|
121
|
+
* When not supplied, the default artboard from the .riv file is selected.
|
|
122
|
+
* Docs: https://rive.app/docs/runtimes/web/artboards
|
|
123
|
+
* - `stateMachines`: A list of strings (`["My State Machine"]`) you wish to display.
|
|
124
|
+
* Look up the Rive documentation for more info: https://rive.app/docs/runtimes/web/state-machines.
|
|
125
|
+
* By default, the state machine will autoplay.
|
|
126
|
+
*
|
|
127
|
+
* ## Methods
|
|
128
|
+
*
|
|
129
|
+
* Methods that can be called to access component functionality.
|
|
130
|
+
*
|
|
131
|
+
* - `setValue(name: string, value?: any, type: string = typeof value) => Promise<void>`: Public function for updating data within the animation using "View Models".
|
|
132
|
+
* For example, if the animation has a state property named "myValue", you can use this function to update the value to "100".
|
|
133
|
+
* Full documentation can be found here: https://rive.app/docs/runtimes/web/data-binding
|
|
134
|
+
*/
|
|
135
|
+
"or-rive-renderer": Partial<
|
|
136
|
+
OrRiveRendererProps & BaseProps<OrRiveRenderer> & BaseEvents
|
|
137
|
+
>;
|
|
138
|
+
};
|
|
101
139
|
|
|
140
|
+
export type CustomElementsSolidJs = {
|
|
102
141
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
*
|
|
143
|
+
*
|
|
144
|
+
* ## Attributes & Properties
|
|
145
|
+
*
|
|
146
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
147
|
+
*
|
|
148
|
+
* - `url`: A string representing the URL or path to the public asset .riv file.
|
|
149
|
+
* For more details, refer to Rive Parameters on how to properly use this property.
|
|
150
|
+
* - `artboard`: The string representing the artboard you want to display.
|
|
151
|
+
* When not supplied, the default artboard from the .riv file is selected.
|
|
152
|
+
* Docs: https://rive.app/docs/runtimes/web/artboards
|
|
153
|
+
* - `stateMachines`: A list of strings (`["My State Machine"]`) you wish to display.
|
|
154
|
+
* Look up the Rive documentation for more info: https://rive.app/docs/runtimes/web/state-machines.
|
|
155
|
+
* By default, the state machine will autoplay.
|
|
156
|
+
*
|
|
157
|
+
* ## Methods
|
|
158
|
+
*
|
|
159
|
+
* Methods that can be called to access component functionality.
|
|
160
|
+
*
|
|
161
|
+
* - `setValue(name: string, value?: any, type: string = typeof value) => Promise<void>`: Public function for updating data within the animation using "View Models".
|
|
162
|
+
* For example, if the animation has a state property named "myValue", you can use this function to update the value to "100".
|
|
163
|
+
* Full documentation can be found here: https://rive.app/docs/runtimes/web/data-binding
|
|
164
|
+
*/
|
|
165
|
+
"or-rive-renderer": Partial<
|
|
166
|
+
OrRiveRendererProps &
|
|
167
|
+
OrRiveRendererSolidJsProps &
|
|
168
|
+
BaseProps<OrRiveRenderer> &
|
|
169
|
+
BaseEvents
|
|
170
|
+
>;
|
|
171
|
+
};
|
|
128
172
|
|
|
129
|
-
export type CustomCssProperties = {
|
|
173
|
+
export type CustomCssProperties = {};
|
|
130
174
|
|
|
175
|
+
declare module "react" {
|
|
176
|
+
namespace JSX {
|
|
177
|
+
interface IntrinsicElements extends CustomElements {}
|
|
178
|
+
}
|
|
179
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
131
180
|
}
|
|
132
181
|
|
|
133
|
-
|
|
134
|
-
declare module 'react' {
|
|
182
|
+
declare module "preact" {
|
|
135
183
|
namespace JSX {
|
|
136
184
|
interface IntrinsicElements extends CustomElements {}
|
|
137
185
|
}
|
|
138
186
|
export interface CSSProperties extends CustomCssProperties {}
|
|
139
187
|
}
|
|
140
188
|
|
|
141
|
-
declare module
|
|
189
|
+
declare module "@builder.io/qwik" {
|
|
142
190
|
namespace JSX {
|
|
143
191
|
interface IntrinsicElements extends CustomElements {}
|
|
144
192
|
}
|
|
145
193
|
export interface CSSProperties extends CustomCssProperties {}
|
|
146
194
|
}
|
|
147
195
|
|
|
148
|
-
declare module
|
|
196
|
+
declare module "@stencil/core" {
|
|
149
197
|
namespace JSX {
|
|
150
198
|
interface IntrinsicElements extends CustomElements {}
|
|
151
199
|
}
|
|
152
200
|
export interface CSSProperties extends CustomCssProperties {}
|
|
153
201
|
}
|
|
154
202
|
|
|
155
|
-
declare module
|
|
203
|
+
declare module "hono/jsx" {
|
|
156
204
|
namespace JSX {
|
|
157
205
|
interface IntrinsicElements extends CustomElements {}
|
|
158
206
|
}
|
|
159
207
|
export interface CSSProperties extends CustomCssProperties {}
|
|
160
208
|
}
|
|
161
209
|
|
|
162
|
-
declare module
|
|
210
|
+
declare module "react-native" {
|
|
163
211
|
namespace JSX {
|
|
164
212
|
interface IntrinsicElements extends CustomElements {}
|
|
165
213
|
}
|
|
166
214
|
export interface CSSProperties extends CustomCssProperties {}
|
|
167
215
|
}
|
|
168
216
|
|
|
169
|
-
declare module
|
|
217
|
+
declare module "solid-js" {
|
|
170
218
|
namespace JSX {
|
|
171
|
-
interface IntrinsicElements extends
|
|
219
|
+
interface IntrinsicElements extends CustomElementsSolidJs {}
|
|
172
220
|
}
|
|
173
221
|
export interface CSSProperties extends CustomCssProperties {}
|
|
174
222
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openremote/or-rive-renderer",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.1",
|
|
4
4
|
"description": "A web component for displaying Rive animations using WebGL",
|
|
5
5
|
"customElements": "custom-elements.json",
|
|
6
6
|
"main": "dist/umd/index.bundle.js",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"lit": "^3.3.1",
|
|
26
26
|
"lodash.debounce": "^4.0.8"
|
|
27
27
|
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@openremote/util": "1.24.1"
|
|
30
|
+
},
|
|
28
31
|
"publishConfig": {
|
|
29
32
|
"access": "public"
|
|
30
33
|
}
|