exodeui-react-native 1.0.7 → 1.0.8

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/package.json +1 -1
  2. package/src/engine.ts +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui-react-native",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "React Native runtime for ExodeUI animations",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/engine.ts CHANGED
@@ -2267,9 +2267,11 @@ export class ExodeUIEngine {
2267
2267
  }
2268
2268
  if (style.stroke) {
2269
2269
  const paint = Skia.Paint();
2270
- paint.setColor(Skia.Color(style.stroke.color));
2271
- paint.setStrokeWidth(style.stroke.width);
2272
- paint.setAlphaf((state.opacity ?? 1) * (style.stroke.opacity ?? 1));
2270
+ const strokeCol = style.stroke.color;
2271
+ const strokeColStr = typeof strokeCol === 'string' ? strokeCol.replace(/\s+/g, '') : '#000000';
2272
+ try { paint.setColor(Skia.Color(strokeColStr)); } catch { paint.setColor(Skia.Color('#000000')); }
2273
+ paint.setStrokeWidth(style.stroke.width ?? 1);
2274
+ paint.setAlphaf(Math.max(0, Math.min(1, (state.opacity ?? 1) * (style.stroke.opacity ?? 1))));
2273
2275
  paint.setStyle(PaintStyle.Stroke);
2274
2276
  canvas.drawPath(path, paint);
2275
2277
  }