exodeui 2.5.2 → 2.5.3

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.mjs CHANGED
@@ -157,10 +157,10 @@ class iA {
157
157
  Y[e++] = void 0, Y[e++] = void 0;
158
158
  }
159
159
  }
160
- castShape(A, I, g, C, B, i, D, o, w, h, K, s, k, M, a) {
160
+ castShape(A, I, g, C, B, i, D, o, w, h, K, s, k, M, F) {
161
161
  try {
162
162
  G(A, f), G(I, H), G(g, n), G(C, S), G(B, t), G(i, S), G(D, U);
163
- const y = Q.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, B.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, o, w, h, K, J(s) ? 4294967297 : s >>> 0, !J(k), J(k) ? 0 : k, !J(M), J(M) ? 0 : M, l(a));
163
+ const y = Q.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, B.__wbg_ptr, i.__wbg_ptr, D.__wbg_ptr, o, w, h, K, J(s) ? 4294967297 : s >>> 0, !J(k), J(k) ? 0 : k, !J(M), J(M) ? 0 : M, l(F));
164
164
  return y === 0 ? void 0 : jA.__wrap(y);
165
165
  } finally {
166
166
  Y[e++] = void 0;
@@ -552,10 +552,10 @@ class n {
552
552
  contains(A) {
553
553
  return Q.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
554
554
  }
555
- createCollider(A, I, g, C, B, i, D, o, w, h, K, s, k, M, a, y, F, R, r, p, j, b, z, _) {
555
+ createCollider(A, I, g, C, B, i, D, o, w, h, K, s, k, M, F, y, a, R, r, p, j, b, z, _) {
556
556
  try {
557
557
  const zA = Q.__wbindgen_add_to_stack_pointer(-16);
558
- G(I, U), G(g, S), G(C, t), G(D, S), G(_, H), Q.rawcolliderset_createCollider(zA, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, B, i, D.__wbg_ptr, o, w, h, K, s, k, M, a, y, F, R, r, p, j, b, z, _.__wbg_ptr);
558
+ G(I, U), G(g, S), G(C, t), G(D, S), G(_, H), Q.rawcolliderset_createCollider(zA, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, B, i, D.__wbg_ptr, o, w, h, K, s, k, M, F, y, a, R, r, p, j, b, z, _.__wbg_ptr);
559
559
  var kA = Z().getInt32(zA + 0, !0), Wg = Z().getFloat64(zA + 8, !0);
560
560
  return kA === 0 ? void 0 : Wg;
561
561
  } finally {
@@ -1871,8 +1871,8 @@ class H {
1871
1871
  const A = Q.rawrigidbodyset_new();
1872
1872
  return this.__wbg_ptr = A >>> 0, EI.register(this, this.__wbg_ptr, this), this;
1873
1873
  }
1874
- createRigidBody(A, I, g, C, B, i, D, o, w, h, K, s, k, M, a, y, F, R, r, p, j, b) {
1875
- return G(I, S), G(g, t), G(D, S), G(o, S), Q.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, B, i, D.__wbg_ptr, o.__wbg_ptr, w, h, K, s, k, M, a, y, F, R, r, p, j, b);
1874
+ createRigidBody(A, I, g, C, B, i, D, o, w, h, K, s, k, M, F, y, a, R, r, p, j, b) {
1875
+ return G(I, S), G(g, t), G(D, S), G(o, S), Q.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, B, i, D.__wbg_ptr, o.__wbg_ptr, w, h, K, s, k, M, F, y, a, R, r, p, j, b);
1876
1876
  }
1877
1877
  remove(A, I, g, C, B) {
1878
1878
  G(I, gA), G(g, n), G(C, IA), G(B, CA), Q.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, B.__wbg_ptr);
@@ -3192,11 +3192,11 @@ class eg {
3192
3192
  }
3193
3193
  intersectionsWithRay(A, I, g, C, B, i, D, o, w, h, K, s) {
3194
3194
  let k = N.intoRaw(C.origin), M = N.intoRaw(C.dir);
3195
- this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, k, M, B, i, (a) => D(LA.fromRaw(g, a)), o, w, h, K, s), k.free(), M.free();
3195
+ this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, k, M, B, i, (F) => D(LA.fromRaw(g, F)), o, w, h, K, s), k.free(), M.free();
3196
3196
  }
3197
3197
  intersectionWithShape(A, I, g, C, B, i, D, o, w, h, K) {
3198
- let s = N.intoRaw(C), k = q.intoRaw(B), M = i.intoRaw(), a = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, s, k, M, D, o, w, h, K);
3199
- return s.free(), k.free(), M.free(), a;
3198
+ let s = N.intoRaw(C), k = q.intoRaw(B), M = i.intoRaw(), F = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, s, k, M, D, o, w, h, K);
3199
+ return s.free(), k.free(), M.free(), F;
3200
3200
  }
3201
3201
  projectPoint(A, I, g, C, B, i, D, o, w, h) {
3202
3202
  let K = N.intoRaw(C), s = qA.fromRaw(g, this.raw.projectPoint(A.raw, I.raw, g.raw, K, B, i, D, o, w, h));
@@ -3210,13 +3210,13 @@ class eg {
3210
3210
  let K = N.intoRaw(C);
3211
3211
  this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, K, B, i, D, o, w, h), K.free();
3212
3212
  }
3213
- castShape(A, I, g, C, B, i, D, o, w, h, K, s, k, M, a) {
3214
- let y = N.intoRaw(C), F = q.intoRaw(B), R = N.intoRaw(i), r = D.intoRaw(), p = HA.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, y, F, R, r, o, w, h, K, s, k, M, a));
3215
- return y.free(), F.free(), R.free(), r.free(), p;
3213
+ castShape(A, I, g, C, B, i, D, o, w, h, K, s, k, M, F) {
3214
+ let y = N.intoRaw(C), a = q.intoRaw(B), R = N.intoRaw(i), r = D.intoRaw(), p = HA.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, y, a, R, r, o, w, h, K, s, k, M, F));
3215
+ return y.free(), a.free(), R.free(), r.free(), p;
3216
3216
  }
3217
3217
  intersectionsWithShape(A, I, g, C, B, i, D, o, w, h, K, s) {
3218
- let k = N.intoRaw(C), M = q.intoRaw(B), a = i.intoRaw();
3219
- this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, k, M, a, D, o, w, h, K, s), k.free(), M.free(), a.free();
3218
+ let k = N.intoRaw(C), M = q.intoRaw(B), F = i.intoRaw();
3219
+ this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, k, M, F, D, o, w, h, K, s), k.free(), M.free(), F.free();
3220
3220
  }
3221
3221
  collidersWithAabbIntersectingAabb(A, I, g, C, B, i) {
3222
3222
  let D = N.intoRaw(C), o = N.intoRaw(B);
@@ -3355,8 +3355,8 @@ class W {
3355
3355
  const k = A.coTriMeshFlags(I);
3356
3356
  return new fI(i, D, k);
3357
3357
  case x.HeightField:
3358
- const M = A.coHeightfieldScale(I), a = A.coHeightfieldHeights(I);
3359
- return new bI(a, M);
3358
+ const M = A.coHeightfieldScale(I), F = A.coHeightfieldHeights(I);
3359
+ return new bI(F, M);
3360
3360
  case x.ConvexPolygon:
3361
3361
  return i = A.coVertices(I), new ZA(i, !1);
3362
3362
  case x.RoundConvexPolygon:
@@ -3366,8 +3366,8 @@ class W {
3366
3366
  }
3367
3367
  }
3368
3368
  castShape(A, I, g, C, B, i, D, o, w, h) {
3369
- let K = N.intoRaw(A), s = q.intoRaw(I), k = N.intoRaw(g), M = N.intoRaw(B), a = q.intoRaw(i), y = N.intoRaw(D), F = this.intoRaw(), R = C.intoRaw(), r = sA.fromRaw(null, F.castShape(K, s, k, R, M, a, y, o, w, h));
3370
- return K.free(), s.free(), k.free(), M.free(), a.free(), y.free(), F.free(), R.free(), r;
3369
+ let K = N.intoRaw(A), s = q.intoRaw(I), k = N.intoRaw(g), M = N.intoRaw(B), F = q.intoRaw(i), y = N.intoRaw(D), a = this.intoRaw(), R = C.intoRaw(), r = sA.fromRaw(null, a.castShape(K, s, k, R, M, F, y, o, w, h));
3370
+ return K.free(), s.free(), k.free(), M.free(), F.free(), y.free(), a.free(), R.free(), r;
3371
3371
  }
3372
3372
  intersectsShape(A, I, g, C, B) {
3373
3373
  let i = N.intoRaw(A), D = q.intoRaw(I), o = N.intoRaw(C), w = q.intoRaw(B), h = this.intoRaw(), K = g.intoRaw(), s = h.intersectsShape(i, D, K, o, w);
@@ -4642,7 +4642,7 @@ class KC {
4642
4642
  return this.objectStates.get(A);
4643
4643
  }
4644
4644
  load(A) {
4645
- this.artboard = A, this.reset();
4645
+ this.artboard = A, this.reset(), this.advance(0);
4646
4646
  }
4647
4647
  reset() {
4648
4648
  if (!this.artboard) return;
@@ -5091,8 +5091,8 @@ class KC {
5091
5091
  break;
5092
5092
  }
5093
5093
  const s = g * D, k = C * o;
5094
- let M = 0, a = 0;
5095
- return i.includes("Left") ? M = 0 : i.includes("Right") ? M = A - s : M = (A - s) / 2, i.includes("Top") ? a = 0 : i.includes("Bottom") ? a = I - k : a = (I - k) / 2, { scaleX: D, scaleY: o, tx: M, ty: a };
5094
+ let M = 0, F = 0;
5095
+ return i.includes("Left") ? M = 0 : i.includes("Right") ? M = A - s : M = (A - s) / 2, i.includes("Top") ? F = 0 : i.includes("Bottom") ? F = I - k : F = (I - k) / 2, { scaleX: D, scaleY: o, tx: M, ty: F };
5096
5096
  }
5097
5097
  renderObject(A, I) {
5098
5098
  const g = this.objectStates.get(I.id);
@@ -5106,15 +5106,17 @@ class KC {
5106
5106
  if (C.type === "Text") {
5107
5107
  let h = C.text;
5108
5108
  if (C.textInputId) {
5109
- const y = this.inputs.get(C.textInputId);
5110
- y !== void 0 && (h = String(y), g.geometry && (g.geometry.text = h));
5109
+ const a = this.inputs.get(C.textInputId);
5110
+ a !== void 0 && (h = String(a), g.geometry && (g.geometry.text = h));
5111
5111
  }
5112
5112
  const K = C.align || "center", s = C.width || 0;
5113
5113
  A.textAlign = K, A.textBaseline = "middle";
5114
5114
  let k = 0;
5115
5115
  K === "left" && (k = -s / 2), K === "right" && (k = s / 2);
5116
- const M = C.fontWeight || "normal", a = C.fontStyle || "normal";
5117
- A.font = `${a} ${M} ${C.fontSize}px ${C.fontFamily}`, w.fill && (A.fillStyle = w.fill.color, A.globalAlpha = (g.opacity ?? 1) * (w.fill.opacity ?? 1), A.fillText(h, k, 0)), w.stroke && w.stroke.width > 0 && (A.strokeStyle = w.stroke.color, A.lineWidth = w.stroke.width, A.globalAlpha = (g.opacity ?? 1) * (w.stroke.opacity ?? 1), A.strokeText(h, k, 0));
5116
+ const M = C.fontWeight || "normal", F = C.fontStyle || "normal";
5117
+ A.font = `${F} ${M} ${C.fontSize}px ${C.fontFamily}`;
5118
+ const y = s > 0 ? s : void 0;
5119
+ w.fill && (A.fillStyle = w.fill.color, A.globalAlpha = (g.opacity ?? 1) * (w.fill.opacity ?? 1), A.fillText(h, k, 0, y)), w.stroke && w.stroke.width > 0 && (A.strokeStyle = w.stroke.color, A.lineWidth = w.stroke.width, A.globalAlpha = (g.opacity ?? 1) * (w.stroke.opacity ?? 1), A.strokeText(h, k, 0, y));
5118
5120
  } else if (C.type === "Image") {
5119
5121
  const h = C.src;
5120
5122
  if (h) {
@@ -5129,13 +5131,13 @@ class KC {
5129
5131
  if (!k) {
5130
5132
  k = new Image();
5131
5133
  let M = h;
5132
- C.colors && C.colors.length > 0 && K.length > 0 && C.colors.forEach((F, R) => {
5134
+ C.colors && C.colors.length > 0 && K.length > 0 && C.colors.forEach((a, R) => {
5133
5135
  if (K[R]) {
5134
- const r = F.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(r, "gi");
5136
+ const r = a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(r, "gi");
5135
5137
  M = M.replace(p, K[R]);
5136
5138
  }
5137
5139
  });
5138
- const a = new Blob([M], { type: "image/svg+xml" }), y = URL.createObjectURL(a);
5140
+ const F = new Blob([M], { type: "image/svg+xml" }), y = URL.createObjectURL(F);
5139
5141
  k.src = y, this.imageCache.set(s, k);
5140
5142
  }
5141
5143
  k.complete && k.naturalWidth > 0 && (A.globalAlpha = g.opacity ?? 1, A.drawImage(k, -B / 2, -i / 2, B, i));
@@ -5152,8 +5154,8 @@ class KC {
5152
5154
  else if (C.type === "Star") {
5153
5155
  const h = C.inner_radius, K = C.outer_radius, s = C.points || 5;
5154
5156
  for (let k = 0; k < s * 2; k++) {
5155
- const M = k * Math.PI / s - Math.PI / 2, a = k % 2 === 0 ? K : h, y = a * Math.cos(M), F = a * Math.sin(M);
5156
- k === 0 ? A.moveTo(y, F) : A.lineTo(y, F);
5157
+ const M = k * Math.PI / s - Math.PI / 2, F = k % 2 === 0 ? K : h, y = F * Math.cos(M), a = F * Math.sin(M);
5158
+ k === 0 ? A.moveTo(y, a) : A.lineTo(y, a);
5157
5159
  }
5158
5160
  A.closePath();
5159
5161
  }
@@ -5184,84 +5186,84 @@ class KC {
5184
5186
  pointFill: I.pointFill || "#ffffff",
5185
5187
  pointStrokeColor: I.pointStrokeColor || I.lineColor || "#3b82f6",
5186
5188
  pointStrokeWidth: I.pointStrokeWidth || 2
5187
- }]), !B || B.length === 0 || !B.some((a) => a.data && a.data.length >= 2)) {
5189
+ }]), !B || B.length === 0 || !B.some((F) => F.data && F.data.length >= 2)) {
5188
5190
  A.save(), A.fillStyle = "#6366f1", A.font = "12px Inter, system-ui, sans-serif", A.textAlign = "center", A.textBaseline = "middle", A.fillText("NO DATA", 0, 0), A.restore();
5189
5191
  return;
5190
5192
  }
5191
5193
  let i = 1 / 0, D = -1 / 0, o = 0;
5192
- if (B.forEach((a) => {
5193
- let y = a.data;
5194
- if (a.isVarEnabled && a.inputId) {
5195
- let F = this.inputs.get(a.inputId);
5196
- if (F === void 0) {
5197
- const R = this.inputNameMap.get(a.inputId);
5198
- R && R.length > 0 && (F = this.inputs.get(R[0]));
5194
+ if (B.forEach((F) => {
5195
+ let y = F.data;
5196
+ if (F.isVarEnabled && F.inputId) {
5197
+ let a = this.inputs.get(F.inputId);
5198
+ if (a === void 0) {
5199
+ const R = this.inputNameMap.get(F.inputId);
5200
+ R && R.length > 0 && (a = this.inputs.get(R[0]));
5199
5201
  }
5200
- F && Array.isArray(F) && (y = F);
5202
+ a && Array.isArray(a) && (y = a);
5201
5203
  }
5202
5204
  if (y && y.length > 0) {
5203
- const F = y.filter((R) => typeof R == "number" && !isNaN(R));
5204
- F.length > 0 && (i = Math.min(i, ...F), D = Math.max(D, ...F), o = Math.max(o, y.length));
5205
+ const a = y.filter((R) => typeof R == "number" && !isNaN(R));
5206
+ a.length > 0 && (i = Math.min(i, ...a), D = Math.max(D, ...a), o = Math.max(o, y.length));
5205
5207
  }
5206
- a._resolvedData = y;
5208
+ F._resolvedData = y;
5207
5209
  }), o < 2) return;
5208
- const w = D - i, h = g / (o - 1), K = (a) => {
5209
- const y = w === 0 ? 0.5 : (a - i) / w;
5210
+ const w = D - i, h = g / (o - 1), K = (F) => {
5211
+ const y = w === 0 ? 0.5 : (F - i) / w;
5210
5212
  return C / 2 - y * C;
5211
- }, s = (a) => a * h - g / 2, k = I.axisColor || "#333333";
5213
+ }, s = (F) => F * h - g / 2, k = I.axisColor || "#333333";
5212
5214
  if (I.showXAxis && (A.beginPath(), A.strokeStyle = I.xAxisColor || k, A.lineWidth = 1, A.moveTo(-g / 2, C / 2), A.lineTo(g / 2, C / 2), A.stroke()), I.showYAxis && (A.beginPath(), A.strokeStyle = I.yAxisColor || k, A.lineWidth = 1, A.moveTo(-g / 2, -C / 2), A.lineTo(-g / 2, C / 2), A.stroke()), A.fillStyle = I.axisLabelColor || "#333333", A.font = `${I.axisLabelFontSize || 10}px Inter, sans-serif`, I.showXLabels) {
5213
5215
  A.textAlign = "center", A.textBaseline = "top";
5214
- for (let a = 0; a < o; a++) {
5215
- const y = s(a);
5216
- A.fillText(`${a + 1}`, y, C / 2 + 5);
5216
+ for (let F = 0; F < o; F++) {
5217
+ const y = s(F);
5218
+ A.fillText(`${F + 1}`, y, C / 2 + 5);
5217
5219
  }
5218
5220
  }
5219
5221
  if (I.showYLabels) {
5220
5222
  A.textAlign = "right", A.textBaseline = "middle";
5221
- const a = -g / 2 - 5, y = (D + i) / 2;
5222
- A.fillText(D.toFixed(1), a, K(D)), A.fillText(y.toFixed(1), a, K(y)), A.fillText(i.toFixed(1), a, K(i));
5223
+ const F = -g / 2 - 5, y = (D + i) / 2;
5224
+ A.fillText(D.toFixed(1), F, K(D)), A.fillText(y.toFixed(1), F, K(y)), A.fillText(i.toFixed(1), F, K(i));
5223
5225
  }
5224
5226
  const M = 10;
5225
- if (B.forEach((a) => {
5226
- const y = a._resolvedData;
5227
+ if (B.forEach((F) => {
5228
+ const y = F._resolvedData;
5227
5229
  if (!(!y || y.length < 2)) {
5228
- if (a.showArea) {
5229
- if (A.beginPath(), A.moveTo(s(0), C / 2), A.lineTo(s(0), K(y[0])), a.smoothing && y.length > 2)
5230
- for (let F = 0; F < y.length - 1; F++) {
5231
- const R = y[F === 0 ? F : F - 1], r = y[F], p = y[F + 1], j = y[F + 1 === y.length - 1 ? F + 1 : F + 2];
5230
+ if (F.showArea) {
5231
+ if (A.beginPath(), A.moveTo(s(0), C / 2), A.lineTo(s(0), K(y[0])), F.smoothing && y.length > 2)
5232
+ for (let a = 0; a < y.length - 1; a++) {
5233
+ const R = y[a === 0 ? a : a - 1], r = y[a], p = y[a + 1], j = y[a + 1 === y.length - 1 ? a + 1 : a + 2];
5232
5234
  for (let b = 1; b <= M; b++) {
5233
5235
  const z = b / M, _ = this._catmullRom(R, r, p, j, z);
5234
- A.lineTo(s(F + z), K(_));
5236
+ A.lineTo(s(a + z), K(_));
5235
5237
  }
5236
5238
  }
5237
5239
  else
5238
- for (let F = 1; F < y.length; F++)
5239
- A.lineTo(s(F), K(y[F]));
5240
- A.lineTo(s(y.length - 1), C / 2), A.closePath(), A.globalAlpha = I.areaOpacity ?? 0.3, A.fillStyle = a.areaColor || "rgba(139, 92, 246, 0.2)", A.fill(), A.globalAlpha = 1;
5240
+ for (let a = 1; a < y.length; a++)
5241
+ A.lineTo(s(a), K(y[a]));
5242
+ A.lineTo(s(y.length - 1), C / 2), A.closePath(), A.globalAlpha = I.areaOpacity ?? 0.3, A.fillStyle = F.areaColor || "rgba(139, 92, 246, 0.2)", A.fill(), A.globalAlpha = 1;
5241
5243
  }
5242
- if (A.beginPath(), A.strokeStyle = a.lineColor || "#3b82f6", A.lineWidth = a.lineWidth || 2, A.lineJoin = "round", A.lineCap = "round", A.moveTo(s(0), K(y[0])), a.smoothing && y.length > 2)
5243
- for (let F = 0; F < y.length - 1; F++) {
5244
- const R = y[F === 0 ? F : F - 1], r = y[F], p = y[F + 1], j = y[F + 1 === y.length - 1 ? F + 1 : F + 2];
5244
+ if (A.beginPath(), A.strokeStyle = F.lineColor || "#3b82f6", A.lineWidth = F.lineWidth || 2, A.lineJoin = "round", A.lineCap = "round", A.moveTo(s(0), K(y[0])), F.smoothing && y.length > 2)
5245
+ for (let a = 0; a < y.length - 1; a++) {
5246
+ const R = y[a === 0 ? a : a - 1], r = y[a], p = y[a + 1], j = y[a + 1 === y.length - 1 ? a + 1 : a + 2];
5245
5247
  for (let b = 1; b <= M; b++) {
5246
5248
  const z = b / M, _ = this._catmullRom(R, r, p, j, z);
5247
- A.lineTo(s(F + z), K(_));
5249
+ A.lineTo(s(a + z), K(_));
5248
5250
  }
5249
5251
  }
5250
5252
  else
5251
- for (let F = 1; F < y.length; F++)
5252
- A.lineTo(s(F), K(y[F]));
5253
- A.stroke(), a.showPoints && y.forEach((F, R) => {
5254
- const r = s(R), p = K(F);
5255
- A.beginPath(), A.arc(r, p, (a.pointSize || 6) / 2, 0, Math.PI * 2), A.fillStyle = a.pointFill || "#ffffff", A.fill(), A.strokeStyle = a.pointStrokeColor || a.lineColor || "#3b82f6", A.lineWidth = a.pointStrokeWidth || 1, A.stroke();
5253
+ for (let a = 1; a < y.length; a++)
5254
+ A.lineTo(s(a), K(y[a]));
5255
+ A.stroke(), F.showPoints && y.forEach((a, R) => {
5256
+ const r = s(R), p = K(a);
5257
+ A.beginPath(), A.arc(r, p, (F.pointSize || 6) / 2, 0, Math.PI * 2), A.fillStyle = F.pointFill || "#ffffff", A.fill(), A.strokeStyle = F.pointStrokeColor || F.lineColor || "#3b82f6", A.lineWidth = F.pointStrokeWidth || 1, A.stroke();
5256
5258
  });
5257
5259
  }
5258
5260
  }), I.showLegend && B.length > 0) {
5259
- const a = g / 2 - 10;
5261
+ const F = g / 2 - 10;
5260
5262
  let y = -C / 2 + 15;
5261
- const F = I.legendFontSize || 10, R = F + 5;
5262
- A.font = `${F}px Inter, sans-serif`, A.textAlign = "right", A.textBaseline = "alphabetic", B.forEach((r) => {
5263
+ const a = I.legendFontSize || 10, R = a + 5;
5264
+ A.font = `${a}px Inter, sans-serif`, A.textAlign = "right", A.textBaseline = "alphabetic", B.forEach((r) => {
5263
5265
  const j = r.label || "Series", b = A.measureText(j).width;
5264
- A.beginPath(), A.rect(a - b - 8 - 5, y - (8 / 2 + 2), 8, 8), A.fillStyle = r.lineColor || "#3b82f6", A.fill(), A.fillStyle = I.legendColor || "#333333", A.fillText(j, a, y), y += R;
5266
+ A.beginPath(), A.rect(F - b - 8 - 5, y - (8 / 2 + 2), 8, 8), A.fillStyle = r.lineColor || "#3b82f6", A.fill(), A.fillStyle = I.legendColor || "#333333", A.fillText(j, F, y), y += R;
5265
5267
  });
5266
5268
  }
5267
5269
  }
@@ -5281,7 +5283,7 @@ const kC = mg(
5281
5283
  w && s.current.setInputUpdateCallback(w);
5282
5284
  }, [w]), yA(() => {
5283
5285
  (async () => {
5284
- const F = s.current;
5286
+ const a = s.current;
5285
5287
  let R = E;
5286
5288
  if (!R && A)
5287
5289
  try {
@@ -5290,27 +5292,27 @@ const kC = mg(
5290
5292
  console.error("Failed to load ExodeUI animation:", r);
5291
5293
  return;
5292
5294
  }
5293
- R && (F.load(R), D && D(F));
5295
+ R && (a.load(R), D && D(a));
5294
5296
  })();
5295
5297
  }, [E, A]), yA(() => {
5296
- const y = s.current, F = K.current;
5297
- if (!F) return;
5298
- const R = F.getContext("2d");
5298
+ const y = s.current, a = K.current;
5299
+ if (!a) return;
5300
+ const R = a.getContext("2d");
5299
5301
  if (!R) return;
5300
5302
  const r = (p) => {
5301
5303
  M.current || (M.current = p);
5302
5304
  const j = (p - M.current) / 1e3;
5303
5305
  M.current = p, C && y.advance(j);
5304
- const b = window.devicePixelRatio || 1, z = F.getBoundingClientRect(), _ = Math.floor(z.width * b), kA = Math.floor(z.height * b);
5305
- (F.width !== _ || F.height !== kA) && (F.width = _, F.height = kA), y.render(R, _, kA), k.current = requestAnimationFrame(r);
5306
+ const b = window.devicePixelRatio || 1, z = a.getBoundingClientRect(), _ = Math.floor(z.width * b), kA = Math.floor(z.height * b);
5307
+ (a.width !== _ || a.height !== kA) && (a.width = _, a.height = kA), y.render(R, _, kA), k.current = requestAnimationFrame(r);
5306
5308
  };
5307
5309
  return k.current = requestAnimationFrame(r), () => {
5308
5310
  k.current && cancelAnimationFrame(k.current);
5309
5311
  };
5310
5312
  }, [C]);
5311
- const a = (y, F) => {
5313
+ const F = (y, a) => {
5312
5314
  const R = y.currentTarget.getBoundingClientRect(), r = y.clientX - R.left, p = y.clientY - R.top, j = R.width, b = R.height;
5313
- s.current.handlePointerInput(F, r, p, j, b);
5315
+ s.current.handlePointerInput(a, r, p, j, b);
5314
5316
  };
5315
5317
  return /* @__PURE__ */ Xg(
5316
5318
  "canvas",
@@ -5318,11 +5320,11 @@ const kC = mg(
5318
5320
  ref: K,
5319
5321
  style: { width: "100%", height: "100%", ...g },
5320
5322
  className: I,
5321
- onPointerDown: (y) => a(y, "down"),
5322
- onPointerUp: (y) => a(y, "up"),
5323
- onPointerMove: (y) => a(y, "move"),
5324
- onPointerLeave: (y) => a(y, "blur"),
5325
- onClick: (y) => a(y, "click")
5323
+ onPointerDown: (y) => F(y, "down"),
5324
+ onPointerUp: (y) => F(y, "up"),
5325
+ onPointerMove: (y) => F(y, "move"),
5326
+ onPointerLeave: (y) => F(y, "blur"),
5327
+ onClick: (y) => F(y, "click")
5326
5328
  }
5327
5329
  );
5328
5330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "React Runtime for ExodeUI Animation Engine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",