@ikonai/sdk-react-ui-rive 1.0.44 → 1.0.46

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 (2) hide show
  1. package/index.js +236 -238
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import ge, { memo as be, useMemo as K, useRef as ee, useEffect as W, useCallback as H } from "react";
2
- import { Fit as O, Alignment as S, Layout as he, useRive as ve, EventType as te } from "@rive-app/react-canvas";
3
- import { useUiNode as ye } from "@ikonai/sdk-react-ui";
4
- var J = { exports: {} }, q = {};
1
+ import me, { memo as ge, useMemo as q, useRef as Q, useEffect as U, useCallback as K } from "react";
2
+ import { Fit as O, Alignment as S, Layout as be, useRive as ve, EventType as ee } from "@rive-app/react-canvas";
3
+ import { useUiNode as he } from "@ikonai/sdk-react-ui";
4
+ var W = { exports: {} }, B = {};
5
5
  /**
6
6
  * @license React
7
7
  * react-jsx-runtime.production.js
@@ -11,14 +11,14 @@ var J = { exports: {} }, q = {};
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var ce;
15
- function pe() {
16
- if (ce) return q;
17
- ce = 1;
14
+ var ae;
15
+ function ye() {
16
+ if (ae) return B;
17
+ ae = 1;
18
18
  var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
19
19
  function i(s, r, o) {
20
- var f = null;
21
- if (o !== void 0 && (f = "" + o), r.key !== void 0 && (f = "" + r.key), "key" in r) {
20
+ var l = null;
21
+ if (o !== void 0 && (l = "" + o), r.key !== void 0 && (l = "" + r.key), "key" in r) {
22
22
  o = {};
23
23
  for (var y in r)
24
24
  y !== "key" && (o[y] = r[y]);
@@ -26,14 +26,14 @@ function pe() {
26
26
  return r = o.ref, {
27
27
  $$typeof: e,
28
28
  type: s,
29
- key: f,
29
+ key: l,
30
30
  ref: r !== void 0 ? r : null,
31
31
  props: o
32
32
  };
33
33
  }
34
- return q.Fragment = n, q.jsx = i, q.jsxs = i, q;
34
+ return B.Fragment = n, B.jsx = i, B.jsxs = i, B;
35
35
  }
36
- var $ = {};
36
+ var V = {};
37
37
  /**
38
38
  * @license React
39
39
  * react-jsx-runtime.development.js
@@ -43,44 +43,44 @@ var $ = {};
43
43
  * This source code is licensed under the MIT license found in the
44
44
  * LICENSE file in the root directory of this source tree.
45
45
  */
46
- var ue;
47
- function Re() {
48
- return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
46
+ var ce;
47
+ function pe() {
48
+ return ce || (ce = 1, process.env.NODE_ENV !== "production" && (function() {
49
49
  function e(t) {
50
50
  if (t == null) return null;
51
51
  if (typeof t == "function")
52
- return t.$$typeof === p ? null : t.displayName || t.name || null;
52
+ return t.$$typeof === H ? null : t.displayName || t.name || null;
53
53
  if (typeof t == "string") return t;
54
54
  switch (t) {
55
- case F:
55
+ case M:
56
56
  return "Fragment";
57
- case j:
57
+ case a:
58
58
  return "Profiler";
59
- case x:
59
+ case j:
60
60
  return "StrictMode";
61
- case m:
62
- return "Suspense";
63
61
  case b:
62
+ return "Suspense";
63
+ case v:
64
64
  return "SuspenseList";
65
- case R:
65
+ case p:
66
66
  return "Activity";
67
67
  }
68
68
  if (typeof t == "object")
69
69
  switch (typeof t.tag == "number" && console.error(
70
70
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
71
71
  ), t.$$typeof) {
72
- case B:
72
+ case D:
73
73
  return "Portal";
74
- case l:
75
- return (t.displayName || "Context") + ".Provider";
76
- case a:
77
- return (t._context.displayName || "Context") + ".Consumer";
78
74
  case d:
75
+ return t.displayName || "Context";
76
+ case f:
77
+ return (t._context.displayName || "Context") + ".Consumer";
78
+ case m:
79
79
  var u = t.render;
80
80
  return t = t.displayName, t || (t = u.displayName || u.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
81
- case h:
82
- return u = t.displayName || null, u !== null ? u : e(t.type) || "Memo";
83
81
  case g:
82
+ return u = t.displayName || null, u !== null ? u : e(t.type) || "Memo";
83
+ case R:
84
84
  u = t._payload, t = t._init;
85
85
  try {
86
86
  return e(t(u));
@@ -101,8 +101,8 @@ function Re() {
101
101
  }
102
102
  if (u) {
103
103
  u = console;
104
- var v = u.error, w = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
105
- return v.call(
104
+ var h = u.error, w = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
105
+ return h.call(
106
106
  u,
107
107
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
108
  w
@@ -110,8 +110,8 @@ function Re() {
110
110
  }
111
111
  }
112
112
  function s(t) {
113
- if (t === F) return "<>";
114
- if (typeof t == "object" && t !== null && t.$$typeof === g)
113
+ if (t === M) return "<>";
114
+ if (typeof t == "object" && t !== null && t.$$typeof === R)
115
115
  return "<...>";
116
116
  try {
117
117
  var u = e(t);
@@ -121,45 +121,46 @@ function Re() {
121
121
  }
122
122
  }
123
123
  function r() {
124
- var t = V.A;
124
+ var t = z.A;
125
125
  return t === null ? null : t.getOwner();
126
126
  }
127
127
  function o() {
128
128
  return Error("react-stack-top-frame");
129
129
  }
130
- function f(t) {
131
- if (U.call(t, "key")) {
130
+ function l(t) {
131
+ if (Y.call(t, "key")) {
132
132
  var u = Object.getOwnPropertyDescriptor(t, "key").get;
133
133
  if (u && u.isReactWarning) return !1;
134
134
  }
135
135
  return t.key !== void 0;
136
136
  }
137
137
  function y(t, u) {
138
- function v() {
139
- re || (re = !0, console.error(
138
+ function h() {
139
+ ne || (ne = !0, console.error(
140
140
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
141
141
  u
142
142
  ));
143
143
  }
144
- v.isReactWarning = !0, Object.defineProperty(t, "key", {
145
- get: v,
144
+ h.isReactWarning = !0, Object.defineProperty(t, "key", {
145
+ get: h,
146
146
  configurable: !0
147
147
  });
148
148
  }
149
149
  function k() {
150
150
  var t = e(this.type);
151
- return oe[t] || (oe[t] = !0, console.error(
151
+ return re[t] || (re[t] = !0, console.error(
152
152
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
153
153
  )), t = this.props.ref, t !== void 0 ? t : null;
154
154
  }
155
- function A(t, u, v, w, N, M, X, Z) {
156
- return v = M.ref, t = {
157
- $$typeof: D,
155
+ function A(t, u, h, w, $, X) {
156
+ var E = h.ref;
157
+ return t = {
158
+ $$typeof: F,
158
159
  type: t,
159
160
  key: u,
160
- props: M,
161
- _owner: N
162
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(t, "ref", {
161
+ props: h,
162
+ _owner: w
163
+ }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(t, "ref", {
163
164
  enumerable: !1,
164
165
  get: k
165
166
  }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
@@ -176,33 +177,33 @@ function Re() {
176
177
  configurable: !1,
177
178
  enumerable: !1,
178
179
  writable: !0,
179
- value: X
180
+ value: $
180
181
  }), Object.defineProperty(t, "_debugTask", {
181
182
  configurable: !1,
182
183
  enumerable: !1,
183
184
  writable: !0,
184
- value: Z
185
+ value: X
185
186
  }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
186
187
  }
187
- function c(t, u, v, w, N, M, X, Z) {
188
+ function c(t, u, h, w, $, X) {
188
189
  var E = u.children;
189
190
  if (E !== void 0)
190
191
  if (w)
191
- if (G(E)) {
192
+ if (J(E)) {
192
193
  for (w = 0; w < E.length; w++)
193
- T(E[w]);
194
+ _(E[w]);
194
195
  Object.freeze && Object.freeze(E);
195
196
  } else
196
197
  console.error(
197
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
199
  );
199
- else T(E);
200
- if (U.call(u, "key")) {
200
+ else _(E);
201
+ if (Y.call(u, "key")) {
201
202
  E = e(t);
202
- var z = Object.keys(u).filter(function(me) {
203
- return me !== "key";
203
+ var L = Object.keys(u).filter(function(de) {
204
+ return de !== "key";
204
205
  });
205
- w = 0 < z.length ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}", ae[E + w] || (z = 0 < z.length ? "{" + z.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ w = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", se[E + w] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
206
207
  `A props object containing a "key" prop is being spread into JSX:
207
208
  let props = %s;
208
209
  <%s {...props} />
@@ -211,86 +212,83 @@ React keys must be passed directly to JSX without using spread:
211
212
  <%s key={someKey} {...props} />`,
212
213
  w,
213
214
  E,
214
- z,
215
+ L,
215
216
  E
216
- ), ae[E + w] = !0);
217
+ ), se[E + w] = !0);
217
218
  }
218
- if (E = null, v !== void 0 && (i(v), E = "" + v), f(u) && (i(u.key), E = "" + u.key), "key" in u) {
219
- v = {};
220
- for (var Q in u)
221
- Q !== "key" && (v[Q] = u[Q]);
222
- } else v = u;
219
+ if (E = null, h !== void 0 && (i(h), E = "" + h), l(u) && (i(u.key), E = "" + u.key), "key" in u) {
220
+ h = {};
221
+ for (var Z in u)
222
+ Z !== "key" && (h[Z] = u[Z]);
223
+ } else h = u;
223
224
  return E && y(
224
- v,
225
+ h,
225
226
  typeof t == "function" ? t.displayName || t.name || "Unknown" : t
226
227
  ), A(
227
228
  t,
228
229
  E,
229
- M,
230
- N,
230
+ h,
231
231
  r(),
232
- v,
233
- X,
234
- Z
232
+ $,
233
+ X
235
234
  );
236
235
  }
237
- function T(t) {
238
- typeof t == "object" && t !== null && t.$$typeof === D && t._store && (t._store.validated = 1);
236
+ function _(t) {
237
+ I(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === R && (t._payload.status === "fulfilled" ? I(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
239
238
  }
240
- var P = ge, D = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), F = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), p = Symbol.for("react.client.reference"), V = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, G = Array.isArray, Y = console.createTask ? console.createTask : function() {
239
+ function I(t) {
240
+ return typeof t == "object" && t !== null && t.$$typeof === F;
241
+ }
242
+ var P = me, F = Symbol.for("react.transitional.element"), D = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), f = Symbol.for("react.consumer"), d = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), p = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), z = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, J = Array.isArray, G = console.createTask ? console.createTask : function() {
241
243
  return null;
242
244
  };
243
245
  P = {
244
- "react-stack-bottom-frame": function(t) {
246
+ react_stack_bottom_frame: function(t) {
245
247
  return t();
246
248
  }
247
249
  };
248
- var re, oe = {}, ie = P["react-stack-bottom-frame"].bind(
250
+ var ne, re = {}, oe = P.react_stack_bottom_frame.bind(
249
251
  P,
250
252
  o
251
- )(), se = Y(s(o)), ae = {};
252
- $.Fragment = F, $.jsx = function(t, u, v, w, N) {
253
- var M = 1e4 > V.recentlyCreatedOwnerStacks++;
253
+ )(), ie = G(s(o)), se = {};
254
+ V.Fragment = M, V.jsx = function(t, u, h) {
255
+ var w = 1e4 > z.recentlyCreatedOwnerStacks++;
254
256
  return c(
255
257
  t,
256
258
  u,
257
- v,
259
+ h,
258
260
  !1,
259
- w,
260
- N,
261
- M ? Error("react-stack-top-frame") : ie,
262
- M ? Y(s(t)) : se
261
+ w ? Error("react-stack-top-frame") : oe,
262
+ w ? G(s(t)) : ie
263
263
  );
264
- }, $.jsxs = function(t, u, v, w, N) {
265
- var M = 1e4 > V.recentlyCreatedOwnerStacks++;
264
+ }, V.jsxs = function(t, u, h) {
265
+ var w = 1e4 > z.recentlyCreatedOwnerStacks++;
266
266
  return c(
267
267
  t,
268
268
  u,
269
- v,
269
+ h,
270
270
  !0,
271
- w,
272
- N,
273
- M ? Error("react-stack-top-frame") : ie,
274
- M ? Y(s(t)) : se
271
+ w ? Error("react-stack-top-frame") : oe,
272
+ w ? G(s(t)) : ie
275
273
  );
276
274
  };
277
- }()), $;
275
+ })()), V;
278
276
  }
279
- var fe;
280
- function we() {
281
- return fe || (fe = 1, process.env.NODE_ENV === "production" ? J.exports = pe() : J.exports = Re()), J.exports;
277
+ var ue;
278
+ function Re() {
279
+ return ue || (ue = 1, process.env.NODE_ENV === "production" ? W.exports = ye() : W.exports = pe()), W.exports;
282
280
  }
283
- var ne = we();
281
+ var te = Re();
284
282
  function C(e) {
285
283
  return typeof e == "object" && e !== null && !Array.isArray(e);
286
284
  }
287
- function _(e) {
285
+ function T(e) {
288
286
  if (typeof e == "string") {
289
287
  const n = e.trim();
290
288
  return n.length > 0 ? n : void 0;
291
289
  }
292
290
  }
293
- function I(e) {
291
+ function x(e) {
294
292
  if (typeof e == "boolean")
295
293
  return e;
296
294
  if (typeof e == "string") {
@@ -300,7 +298,7 @@ function I(e) {
300
298
  return !1;
301
299
  }
302
300
  }
303
- function L(e) {
301
+ function N(e) {
304
302
  if (typeof e == "number" && Number.isFinite(e))
305
303
  return e;
306
304
  if (typeof e == "string") {
@@ -316,7 +314,7 @@ function le(e) {
316
314
  return n.length > 0 ? n : void 0;
317
315
  }
318
316
  }
319
- function Ee(e, n, i) {
317
+ function we(e, n, i) {
320
318
  const s = [];
321
319
  for (const r of e)
322
320
  if (typeof r == "string") {
@@ -333,7 +331,7 @@ function Ee(e, n, i) {
333
331
  }
334
332
  return s.length > 0 ? s.join(" ") : void 0;
335
333
  }
336
- function ke(e) {
334
+ function Ee(e) {
337
335
  if (typeof e == "string") {
338
336
  const n = e.trim();
339
337
  return n.length > 0 ? [n] : void 0;
@@ -343,7 +341,7 @@ function ke(e) {
343
341
  return n.length > 0 ? Array.from(new Set(n)) : void 0;
344
342
  }
345
343
  }
346
- const Te = {
344
+ const ke = {
347
345
  contain: O.Contain,
348
346
  cover: O.Cover,
349
347
  fill: O.Fill,
@@ -360,9 +358,9 @@ function _e(e) {
360
358
  if (typeof e != "string")
361
359
  return;
362
360
  const n = e.replace(/[-_\s]/g, "").toLowerCase();
363
- return Te[n];
361
+ return ke[n];
364
362
  }
365
- const Ae = {
363
+ const Te = {
366
364
  center: S.Center,
367
365
  topleft: S.TopLeft,
368
366
  topcenter: S.TopCenter,
@@ -373,13 +371,13 @@ const Ae = {
373
371
  bottomcenter: S.BottomCenter,
374
372
  bottomright: S.BottomRight
375
373
  };
376
- function Oe(e) {
374
+ function Ae(e) {
377
375
  if (typeof e != "string")
378
376
  return;
379
377
  const n = e.replace(/[-_\s]/g, "").toLowerCase();
380
- return Ae[n];
378
+ return Te[n];
381
379
  }
382
- function Ce(e) {
380
+ function Oe(e) {
383
381
  if (!C(e))
384
382
  return;
385
383
  const n = {};
@@ -388,12 +386,12 @@ function Ce(e) {
388
386
  const o = s.trim();
389
387
  if (!o)
390
388
  continue;
391
- const f = I(r);
392
- f !== void 0 && (n[o] = f, i = !0);
389
+ const l = x(r);
390
+ l !== void 0 && (n[o] = l, i = !0);
393
391
  }
394
392
  return i ? n : void 0;
395
393
  }
396
- function de(e) {
394
+ function fe(e) {
397
395
  if (!C(e))
398
396
  return;
399
397
  const n = {};
@@ -402,12 +400,12 @@ function de(e) {
402
400
  const o = s.trim();
403
401
  if (!o)
404
402
  continue;
405
- const f = L(r);
406
- f !== void 0 && (n[o] = f, i = !0);
403
+ const l = N(r);
404
+ l !== void 0 && (n[o] = l, i = !0);
407
405
  }
408
406
  return i ? n : void 0;
409
407
  }
410
- function Me(e) {
408
+ function Ce(e) {
411
409
  if (!C(e))
412
410
  return;
413
411
  const n = {};
@@ -416,12 +414,12 @@ function Me(e) {
416
414
  const o = s.trim();
417
415
  if (!o)
418
416
  continue;
419
- const f = _(r);
420
- f && (n[o] = f, i = !0);
417
+ const l = T(r);
418
+ l && (n[o] = l, i = !0);
421
419
  }
422
420
  return i ? n : void 0;
423
421
  }
424
- function Se(e) {
422
+ function Me(e) {
425
423
  if (!C(e))
426
424
  return;
427
425
  const n = {};
@@ -430,32 +428,32 @@ function Se(e) {
430
428
  const o = s.trim();
431
429
  if (!o || !C(r))
432
430
  continue;
433
- const f = L(r.r), y = L(r.g), k = L(r.b);
434
- f === void 0 || y === void 0 || k === void 0 || (n[o] = { r: Math.round(f), g: Math.round(y), b: Math.round(k) }, i = !0);
431
+ const l = N(r.r), y = N(r.g), k = N(r.b);
432
+ l === void 0 || y === void 0 || k === void 0 || (n[o] = { r: Math.round(l), g: Math.round(y), b: Math.round(k) }, i = !0);
435
433
  }
436
434
  return i ? n : void 0;
437
435
  }
438
- function je(e) {
436
+ function Se(e) {
439
437
  if (!C(e))
440
438
  return;
441
- const n = Ce(e.booleans), i = de(e.numbers), s = Me(e.strings), r = Se(e.colors), o = de(e.enums);
439
+ const n = Oe(e.booleans), i = fe(e.numbers), s = Ce(e.strings), r = Me(e.colors), o = fe(e.enums);
442
440
  if (!(!n && !i && !s && !r && !o))
443
441
  return { booleans: n, numbers: i, strings: s, colors: r, enums: o };
444
442
  }
445
- function Pe(e) {
443
+ function je(e) {
446
444
  if (!Array.isArray(e))
447
445
  return;
448
446
  const n = [];
449
447
  for (const i of e) {
450
448
  if (!C(i))
451
449
  continue;
452
- const s = _(i.name), r = L(i.sequence);
450
+ const s = T(i.name), r = N(i.sequence);
453
451
  !s || r === void 0 || n.push({ name: s, sequence: r });
454
452
  }
455
453
  if (n.length !== 0)
456
454
  return n;
457
455
  }
458
- function xe(e) {
456
+ function Pe(e) {
459
457
  if (!C(e))
460
458
  return;
461
459
  const n = {};
@@ -472,32 +470,32 @@ function xe(e) {
472
470
  continue;
473
471
  }
474
472
  if (typeof r == "string") {
475
- const f = r.trim();
476
- if (!f)
473
+ const l = r.trim();
474
+ if (!l)
477
475
  continue;
478
- n[o] = f, i = !0;
476
+ n[o] = l, i = !0;
479
477
  }
480
478
  }
481
479
  }
482
480
  return i ? n : void 0;
483
481
  }
484
- function Ne(e) {
482
+ function xe(e) {
485
483
  if (!C(e))
486
484
  return;
487
- const n = _(e.name);
485
+ const n = T(e.name);
488
486
  if (!n)
489
487
  return;
490
- const i = L(e.type), s = L(e.delay), r = _(e.url), o = _(e.target), f = xe(e.properties);
488
+ const i = N(e.type), s = N(e.delay), r = T(e.url), o = T(e.target), l = Pe(e.properties);
491
489
  return {
492
490
  name: n,
493
491
  type: i === void 0 ? void 0 : Math.trunc(i),
494
492
  delay: s,
495
493
  url: r,
496
494
  target: o,
497
- properties: f
495
+ properties: l
498
496
  };
499
497
  }
500
- function Ie(e) {
498
+ function Ne(e) {
501
499
  if (!C(e))
502
500
  return;
503
501
  const n = {};
@@ -506,24 +504,24 @@ function Ie(e) {
506
504
  const o = s.trim();
507
505
  if (!o)
508
506
  continue;
509
- const f = _(r);
510
- f && (n[o] = f, i = !0);
507
+ const l = T(r);
508
+ l && (n[o] = l, i = !0);
511
509
  }
512
510
  return i ? n : void 0;
513
511
  }
514
- function Fe(e) {
512
+ function Ie(e) {
515
513
  if (!Array.isArray(e))
516
514
  return;
517
515
  const n = [];
518
516
  for (const i of e) {
519
517
  if (!C(i))
520
518
  continue;
521
- const s = _(i.key), r = _(i.input), o = _(i.kind);
519
+ const s = T(i.key), r = T(i.input), o = T(i.kind);
522
520
  if (!s || !r || !o)
523
521
  continue;
524
- const f = s.replace(/[-_\s]+/g, "").toLowerCase();
522
+ const l = s.replace(/[-_\s]+/g, "").toLowerCase();
525
523
  let y;
526
- switch (f) {
524
+ switch (l) {
527
525
  case "arrowup":
528
526
  case "up":
529
527
  y = "ArrowUp";
@@ -549,23 +547,23 @@ function Fe(e) {
549
547
  }
550
548
  return n.length > 0 ? n : void 0;
551
549
  }
552
- function Le(e, n) {
550
+ function Fe(e, n) {
553
551
  return n.byteLength > 0 ? (e.decode(n), !0) : !1;
554
552
  }
555
- function De() {
553
+ function Le() {
556
554
  if (typeof globalThis > "u")
557
555
  return !1;
558
556
  const e = globalThis, n = typeof e.OffscreenCanvas < "u", i = typeof e.crossOriginIsolated == "boolean" ? e.crossOriginIsolated : !1;
559
557
  return n && i;
560
558
  }
561
- function ze(e) {
562
- const n = K(
563
- () => new he({
559
+ function De(e) {
560
+ const n = q(
561
+ () => new be({
564
562
  fit: e.layoutFit ?? O.Contain,
565
563
  alignment: e.layoutAlignment ?? S.Center
566
564
  }),
567
565
  [e.layoutFit, e.layoutAlignment]
568
- ), i = K(() => De(), []), s = (e.useOffscreenRenderer ?? !0) && i, r = ee(null);
566
+ ), i = q(() => Le(), []), s = (e.useOffscreenRenderer ?? !0) && i, r = Q(null);
569
567
  r.current === null && (r.current = {
570
568
  src: e.src,
571
569
  stateMachines: e.stateMachines,
@@ -577,42 +575,42 @@ function ze(e) {
577
575
  isTouchScrollEnabled: e.isTouchScrollEnabled,
578
576
  shouldDisableRiveListeners: e.shouldDisableRiveListeners,
579
577
  layout: n,
580
- assetLoader: Le
578
+ assetLoader: Fe
581
579
  });
582
- const { rive: o, RiveComponent: f } = ve(r.current), y = ee(/* @__PURE__ */ new Map()), { dispatchAction: k } = e, A = K(() => {
580
+ const { rive: o, RiveComponent: l } = ve(r.current), y = Q(/* @__PURE__ */ new Map()), { dispatchAction: k } = e, A = q(() => {
583
581
  if (!e.eventHandlers)
584
582
  return;
585
583
  const a = Object.entries(e.eventHandlers);
586
584
  if (a.length === 0)
587
585
  return;
588
- const l = /* @__PURE__ */ new Map();
586
+ const f = /* @__PURE__ */ new Map();
589
587
  for (const [d, m] of a) {
590
588
  const b = d.trim();
591
589
  if (!b)
592
590
  continue;
593
- const h = m.trim();
594
- h && l.set(b, h);
591
+ const v = m.trim();
592
+ v && f.set(b, v);
595
593
  }
596
- return l.size > 0 ? l : void 0;
597
- }, [e.eventHandlers]), c = K(() => {
594
+ return f.size > 0 ? f : void 0;
595
+ }, [e.eventHandlers]), c = q(() => {
598
596
  if (!e.keyboardBindings || e.keyboardBindings.length === 0)
599
597
  return;
600
598
  const a = /* @__PURE__ */ new Map();
601
- for (const l of e.keyboardBindings) {
602
- const d = a.get(l.key);
603
- d ? d.push(l) : a.set(l.key, [l]);
599
+ for (const f of e.keyboardBindings) {
600
+ const d = a.get(f.key);
601
+ d ? d.push(f) : a.set(f.key, [f]);
604
602
  }
605
603
  return a;
606
- }, [e.keyboardBindings]), T = ee(/* @__PURE__ */ new Set());
607
- W(() => {
608
- T.current.clear();
609
- }, [c]), W(() => {
604
+ }, [e.keyboardBindings]), _ = Q(/* @__PURE__ */ new Set());
605
+ U(() => {
606
+ _.current.clear();
607
+ }, [c]), U(() => {
610
608
  const a = o?.viewModelInstance;
611
609
  if (!a)
612
610
  return;
613
- const l = e.viewModel?.booleans;
614
- if (l)
615
- for (const [g, R] of Object.entries(l)) {
611
+ const f = e.viewModel?.booleans;
612
+ if (f)
613
+ for (const [g, R] of Object.entries(f)) {
616
614
  const p = a.boolean(g);
617
615
  p && (p.value = R);
618
616
  }
@@ -634,17 +632,17 @@ function ze(e) {
634
632
  const p = a.color(g);
635
633
  p && "rgb" in p && p.rgb(R.r, R.g, R.b);
636
634
  }
637
- const h = e.viewModel?.enums;
638
- if (h)
639
- for (const [g, R] of Object.entries(h)) {
635
+ const v = e.viewModel?.enums;
636
+ if (v)
637
+ for (const [g, R] of Object.entries(v)) {
640
638
  const p = a.enum(g);
641
639
  p && "valueIndex" in p && (p.valueIndex = R);
642
640
  }
643
- }, [e.viewModel, o]), W(() => {
641
+ }, [e.viewModel, o]), U(() => {
644
642
  if (!(!o || !e.triggerRequests))
645
643
  for (const a of e.triggerRequests) {
646
- const l = y.current.get(a.name);
647
- if (l !== void 0 && a.sequence <= l)
644
+ const f = y.current.get(a.name);
645
+ if (f !== void 0 && a.sequence <= f)
648
646
  continue;
649
647
  y.current.set(a.name, a.sequence);
650
648
  let d = !1;
@@ -655,45 +653,45 @@ function ze(e) {
655
653
  }
656
654
  if (!d && e.stateMachines)
657
655
  for (const b of e.stateMachines) {
658
- const h = o.stateMachineInputs(b);
659
- if (!h)
656
+ const v = o.stateMachineInputs(b);
657
+ if (!v)
660
658
  continue;
661
- const g = h.find((R) => R.name === a.name);
659
+ const g = v.find((R) => R.name === a.name);
662
660
  if (g && "fire" in g) {
663
661
  g.fire();
664
662
  break;
665
663
  }
666
664
  }
667
665
  }
668
- }, [e.triggerRequests, e.stateMachines, o]), W(() => {
666
+ }, [e.triggerRequests, e.stateMachines, o]), U(() => {
669
667
  if (!o || !A || !k)
670
668
  return;
671
- const a = (l) => {
672
- if (l.type !== te.RiveEvent)
669
+ const a = (f) => {
670
+ if (f.type !== ee.RiveEvent)
673
671
  return;
674
- const d = Ne(l.data);
672
+ const d = xe(f.data);
675
673
  if (!d)
676
674
  return;
677
675
  let m = A.get(d.name);
678
676
  m || (m = A.get("*")), m && k(m, d);
679
677
  };
680
- return o.on?.(te.RiveEvent, a), () => {
681
- o.off?.(te.RiveEvent, a);
678
+ return o.on?.(ee.RiveEvent, a), () => {
679
+ o.off?.(ee.RiveEvent, a);
682
680
  };
683
681
  }, [o, A, k]);
684
- const P = H(
682
+ const I = K(
685
683
  (a) => {
686
684
  c && a.currentTarget.focus();
687
685
  },
688
686
  [c]
689
- ), D = H(
687
+ ), P = K(
690
688
  (a) => {
691
689
  if (!c)
692
690
  return;
693
- const l = a.key, d = c.get(l);
691
+ const f = a.key, d = c.get(f);
694
692
  if (!d || d.length === 0)
695
693
  return;
696
- if (T.current.has(l)) {
694
+ if (_.current.has(f)) {
697
695
  a.preventDefault();
698
696
  return;
699
697
  }
@@ -701,131 +699,131 @@ function ze(e) {
701
699
  if (!m)
702
700
  return;
703
701
  let b = !1;
704
- for (const h of d)
705
- if (h.kind === "boolean") {
706
- const g = m.boolean(h.input);
702
+ for (const v of d)
703
+ if (v.kind === "boolean") {
704
+ const g = m.boolean(v.input);
707
705
  g && (g.value = !0, b = !0);
708
- } else if (h.kind === "trigger") {
709
- const g = m.trigger(h.input);
706
+ } else if (v.kind === "trigger") {
707
+ const g = m.trigger(v.input);
710
708
  g && (g.trigger(), b = !0);
711
709
  }
712
- b && (T.current.add(l), a.preventDefault());
710
+ b && (_.current.add(f), a.preventDefault());
713
711
  },
714
712
  [c, o]
715
- ), B = H(
713
+ ), F = K(
716
714
  (a) => {
717
715
  if (!c)
718
716
  return;
719
- const l = a.key, d = c.get(l);
717
+ const f = a.key, d = c.get(f);
720
718
  if (!d || d.length === 0)
721
719
  return;
722
720
  const m = o?.viewModelInstance;
723
721
  if (!m) {
724
- T.current.delete(l);
722
+ _.current.delete(f);
725
723
  return;
726
724
  }
727
- T.current.delete(l);
725
+ _.current.delete(f);
728
726
  let b = !1;
729
- for (const h of d) {
730
- if (h.kind !== "boolean")
727
+ for (const v of d) {
728
+ if (v.kind !== "boolean")
731
729
  continue;
732
- const g = m.boolean(h.input);
730
+ const g = m.boolean(v.input);
733
731
  g && (g.value = !1, b = !0);
734
732
  }
735
733
  b && a.preventDefault();
736
734
  },
737
735
  [c, o]
738
- ), F = H(() => {
736
+ ), D = K(() => {
739
737
  if (!c || c.size === 0) {
740
- T.current.clear();
738
+ _.current.clear();
741
739
  return;
742
740
  }
743
- const a = o?.viewModelInstance, l = Array.from(T.current);
744
- if (T.current.clear(), !!a)
745
- for (const d of l) {
741
+ const a = o?.viewModelInstance, f = Array.from(_.current);
742
+ if (_.current.clear(), !!a)
743
+ for (const d of f) {
746
744
  const m = c.get(d);
747
745
  if (m)
748
746
  for (const b of m) {
749
747
  if (b.kind !== "boolean")
750
748
  continue;
751
- const h = a.boolean(b.input);
752
- h && (h.value = !1);
749
+ const v = a.boolean(b.input);
750
+ v && (v.value = !1);
753
751
  }
754
752
  }
755
- }, [c, o]), x = {};
756
- e.backgroundColor && (x.backgroundColor = e.backgroundColor), e.width && (x.width = e.width), e.height && (x.height = e.height);
753
+ }, [c, o]), M = {};
754
+ e.backgroundColor && (M.backgroundColor = e.backgroundColor), e.width && (M.width = e.width), e.height && (M.height = e.height);
757
755
  const j = !!c;
758
- return /* @__PURE__ */ ne.jsx("div", { className: e.className, style: x, children: /* @__PURE__ */ ne.jsx(
759
- f,
756
+ return /* @__PURE__ */ te.jsx("div", { className: e.className, style: M, children: /* @__PURE__ */ te.jsx(
757
+ l,
760
758
  {
761
759
  style: { width: "100%", height: "100%", backgroundColor: "transparent" },
762
760
  tabIndex: j ? 0 : void 0,
763
- onPointerDown: j ? P : void 0,
764
- onKeyDown: j ? D : void 0,
765
- onKeyUp: j ? B : void 0,
766
- onBlur: j ? F : void 0
761
+ onPointerDown: j ? I : void 0,
762
+ onKeyDown: j ? P : void 0,
763
+ onKeyUp: j ? F : void 0,
764
+ onBlur: j ? D : void 0
767
765
  }
768
766
  ) });
769
767
  }
770
- function Be() {
768
+ function ze() {
771
769
  const e = /* @__PURE__ */ new Map();
772
770
  return (n) => {
773
771
  if (n.type !== "rive-canvas")
774
772
  return;
775
- const i = _(n.props.src);
773
+ const i = T(n.props.src);
776
774
  if (!i)
777
775
  return;
778
776
  const s = e.get(n.id);
779
777
  if (s)
780
778
  return s;
781
- const r = be(function({ nodeId: f, context: y, className: k }) {
782
- const c = ye(y.store, f) ?? n, T = _(c.props.src) ?? i, P = ke(c.props.stateMachines), D = I(c.props.autoplay), B = I(c.props.autoBind), F = I(c.props.useOffscreenRenderer), x = I(c.props.enableMultiTouch), j = I(c.props.dispatchPointerExit), a = I(c.props.isTouchScrollEnabled), l = I(c.props.shouldDisableRiveListeners), d = Fe(c.props.keyboardBindings), m = _e(c.props.layoutFit), b = Oe(c.props.layoutAlignment), h = _(c.props.backgroundColor), g = le(c.props.width), R = le(c.props.height), p = je(c.props.viewModel), V = Pe(c.props.triggerRequests), U = Ie(c.props.eventHandlers), G = Ee(
779
+ const r = ge(function({ nodeId: l, context: y, className: k }) {
780
+ const c = he(y.store, l) ?? n, _ = T(c.props.src) ?? i, I = Ee(c.props.stateMachines), P = x(c.props.autoplay), F = x(c.props.autoBind), D = x(c.props.useOffscreenRenderer), M = x(c.props.enableMultiTouch), j = x(c.props.dispatchPointerExit), a = x(c.props.isTouchScrollEnabled), f = x(c.props.shouldDisableRiveListeners), d = Ie(c.props.keyboardBindings), m = _e(c.props.layoutFit), b = Ae(c.props.layoutAlignment), v = T(c.props.backgroundColor), g = le(c.props.width), R = le(c.props.height), p = Se(c.props.viewModel), H = je(c.props.triggerRequests), z = Ne(c.props.eventHandlers), Y = we(
783
781
  c.styleIds,
784
782
  k,
785
- _(c.props.style)
786
- ), Y = `${m ?? "contain"}-${b ?? "center"}`;
787
- return /* @__PURE__ */ ne.jsx(
788
- ze,
783
+ T(c.props.style)
784
+ ), J = `${m ?? "contain"}-${b ?? "center"}`;
785
+ return /* @__PURE__ */ te.jsx(
786
+ De,
789
787
  {
790
- src: T,
791
- stateMachines: P,
792
- autoplay: D,
793
- autoBind: B,
794
- useOffscreenRenderer: F,
795
- enableMultiTouch: x,
788
+ src: _,
789
+ stateMachines: I,
790
+ autoplay: P,
791
+ autoBind: F,
792
+ useOffscreenRenderer: D,
793
+ enableMultiTouch: M,
796
794
  dispatchPointerExit: j,
797
795
  isTouchScrollEnabled: a,
798
- shouldDisableRiveListeners: l,
796
+ shouldDisableRiveListeners: f,
799
797
  keyboardBindings: d,
800
798
  layoutFit: m,
801
799
  layoutAlignment: b,
802
- backgroundColor: h,
800
+ backgroundColor: v,
803
801
  width: g,
804
802
  height: R,
805
803
  viewModel: p,
806
- triggerRequests: V,
807
- eventHandlers: U,
804
+ triggerRequests: H,
805
+ eventHandlers: z,
808
806
  dispatchAction: y.dispatchAction,
809
- className: G
807
+ className: Y
810
808
  },
811
- Y
809
+ J
812
810
  );
813
811
  });
814
812
  return e.set(n.id, r), r;
815
813
  };
816
814
  }
817
- const Ve = "rive";
818
- function Ye() {
819
- return [Be()];
815
+ const Be = "rive";
816
+ function Ve() {
817
+ return [ze()];
820
818
  }
821
- const qe = () => Ye();
822
- function We(e) {
823
- e.registerModule(Ve, qe);
819
+ const Ye = () => Ve();
820
+ function Ke(e) {
821
+ e.registerModule(Be, Ye);
824
822
  }
825
823
  export {
826
- Ve as IKON_UI_RIVE_MODULE,
827
- Be as createRiveCanvasResolver,
828
- Ye as createRiveResolvers,
829
- qe as loadRiveModule,
830
- We as registerRiveModule
824
+ Be as IKON_UI_RIVE_MODULE,
825
+ ze as createRiveCanvasResolver,
826
+ Ve as createRiveResolvers,
827
+ Ye as loadRiveModule,
828
+ Ke as registerRiveModule
831
829
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonai/sdk-react-ui-rive",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",