diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerDelegate.java index 40cb51126..9b1276caa 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerInterface.java index e05df2e71..4e6761085 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGCircleManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGCircleManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGCircleManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerDelegate.java index 37a9e95ea..ff17672b1 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerInterface.java index 025666c6d..dcde7e4e3 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGClipPathManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGClipPathManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGClipPathManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerDelegate.java index bfa049a71..f878c2dfa 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerInterface.java index dbe55bb7f..e3335fda0 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGEllipseManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGEllipseManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGEllipseManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerDelegate.java index 6cc785717..70611195e 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerInterface.java index caf8cc2e8..a8aef1412 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGForeignObjectManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGForeignObjectManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGForeignObjectManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerDelegate.java index 4738993d4..fdcf2fc71 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerInterface.java index 489f2a687..79dab3a2b 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGGroupManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGGroupManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGGroupManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerDelegate.java index 884cc7325..d634b1097 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerDelegate.java @@ -65,7 +65,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +74,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerInterface.java index 145b7a511..8e9ee1c3d 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGImageManagerInterface.java @@ -29,10 +29,10 @@ public interface RNSVGImageManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerDelegate.java index c84c17490..99e45ec15 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerInterface.java index 858cce80a..53cedba38 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGLineManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGLineManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGLineManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerDelegate.java index d0ee45ab4..4815e33e6 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerInterface.java index 7b747c9f9..9ff3cd098 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMarkerManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGMarkerManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGMarkerManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerDelegate.java index 47623e4e5..f30e40e93 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerInterface.java index c73d37a8d..3dfc74a2e 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGMaskManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGMaskManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGMaskManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerDelegate.java index dd3c66d55..9065905c3 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerInterface.java index f0be39546..00484fbe9 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPathManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGPathManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGPathManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerDelegate.java index 0fee18560..dcc2f4552 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerInterface.java index 5911d0299..01271d13e 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGPatternManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGPatternManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGPatternManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerDelegate.java index 782a4a395..0a48de14d 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerInterface.java index 53deaff1b..580f1d84e 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGRectManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGRectManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGRectManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerDelegate.java index 25f764b7e..d45e6a7a8 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerInterface.java index b15fa0a7c..d4c5a7c5c 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGSymbolManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGSymbolManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGSymbolManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerDelegate.java index 46c7a23f7..0a7733fab 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerInterface.java index fe0150357..7f23f5a6e 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTSpanManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGTSpanManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGTSpanManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerDelegate.java index 87d7c0a0a..08bfc447d 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerInterface.java index 4d5449593..2b0d3f6f4 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGTextManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGTextManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerDelegate.java index 517bb08c4..727236323 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerInterface.java index bcc97b63d..9479a9fc5 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGTextPathManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGTextPathManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGTextPathManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerDelegate.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerDelegate.java index 4bbbae0fd..a12c384d0 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerDelegate.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerDelegate.java @@ -14,7 +14,6 @@ import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.DynamicFromObject; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.BaseViewManagerDelegate; import com.facebook.react.uimanager.BaseViewManagerInterface; @@ -65,7 +64,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext())); break; case "fill": - mViewManager.setFill(view, (ReadableMap) value); + mViewManager.setFill(view, new DynamicFromObject(value)); break; case "fillOpacity": mViewManager.setFillOpacity(view, value == null ? 1f : ((Double) value).floatValue()); @@ -74,7 +73,7 @@ public void setProperty(T view, String propName, @Nullable Object value) { mViewManager.setFillRule(view, value == null ? 1 : ((Double) value).intValue()); break; case "stroke": - mViewManager.setStroke(view, (ReadableMap) value); + mViewManager.setStroke(view, new DynamicFromObject(value)); break; case "strokeOpacity": mViewManager.setStrokeOpacity(view, value == null ? 1f : ((Double) value).floatValue()); diff --git a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerInterface.java b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerInterface.java index 0f475edaf..0bda3e4d6 100644 --- a/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerInterface.java +++ b/android/src/paper/java/com/facebook/react/viewmanagers/RNSVGUseManagerInterface.java @@ -13,7 +13,6 @@ import androidx.annotation.Nullable; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; public interface RNSVGUseManagerInterface { void setName(T view, @Nullable String value); @@ -29,10 +28,10 @@ public interface RNSVGUseManagerInterface { void setDisplay(T view, @Nullable String value); void setPointerEvents(T view, @Nullable String value); void setColor(T view, @Nullable Integer value); - void setFill(T view, @Nullable ReadableMap value); + void setFill(T view, Dynamic value); void setFillOpacity(T view, float value); void setFillRule(T view, int value); - void setStroke(T view, @Nullable ReadableMap value); + void setStroke(T view, Dynamic value); void setStrokeOpacity(T view, float value); void setStrokeWidth(T view, Dynamic value); void setStrokeLinecap(T view, int value); diff --git a/apple/Utils/RNSVGFabricConversions.h b/apple/Utils/RNSVGFabricConversions.h index f5b6906ae..fb01605c9 100644 --- a/apple/Utils/RNSVGFabricConversions.h +++ b/apple/Utils/RNSVGFabricConversions.h @@ -55,38 +55,6 @@ static id RNSVGConvertFollyDynamicToId(const folly::dynamic &dyn) } } -template -RNSVGBrush *brushFromColorStruct(const T &fillObject) -{ - int type = fillObject.type; - - switch (type) { - case -1: // empty struct - return nil; - case 0: // solid color - { - // These are probably expensive allocations since it's often the same value. - // We should memoize colors but look ups may be just as expensive. - RNSVGColor *color = RCTUIColorFromSharedColor(fillObject.payload) ?: [RNSVGColor clearColor]; - return [[RNSVGSolidColorBrush alloc] initWithColor:color]; - } - case 1: // brush - { - NSArray *arr = @[ @(type), RCTNSStringFromString(fillObject.brushRef) ]; - return [[RNSVGPainterBrush alloc] initWithArray:arr]; - } - case 2: // currentColor - return [[RNSVGBrush alloc] initWithArray:nil]; - case 3: // context-fill - return [[RNSVGContextBrush alloc] initFill]; - case 4: // context-stroke - return [[RNSVGContextBrush alloc] initStroke]; - default: - RCTLogError(@"Unknown brush type: %d", type); - return nil; - } -} - template void setCommonNodeProps(const T &nodeProps, RNSVGNode *node) { @@ -143,10 +111,16 @@ void setCommonRenderableProps(const T &renderableProps, RNSVGRenderable *rendera if (RCTUIColorFromSharedColor(renderableProps.color)) { [renderableNode setColor:RCTUIColorFromSharedColor(renderableProps.color)]; } - renderableNode.fill = brushFromColorStruct(renderableProps.fill); + id fill = RNSVGConvertFollyDynamicToId(renderableProps.fill); + if (fill != nil) { + renderableNode.fill = [RCTConvert RNSVGBrush:fill]; + } renderableNode.fillOpacity = renderableProps.fillOpacity; renderableNode.fillRule = renderableProps.fillRule == 0 ? kRNSVGCGFCRuleEvenodd : kRNSVGCGFCRuleNonzero; - renderableNode.stroke = brushFromColorStruct(renderableProps.stroke); + id stroke = RNSVGConvertFollyDynamicToId(renderableProps.stroke); + if (stroke != nil) { + renderableNode.stroke = [RCTConvert RNSVGBrush:stroke]; + } renderableNode.strokeOpacity = renderableProps.strokeOpacity; id strokeWidth = RNSVGConvertFollyDynamicToId(renderableProps.strokeWidth); if (strokeWidth != nil) { diff --git a/apps/test-examples/index.tsx b/apps/test-examples/index.tsx index 05d853456..06527e5e7 100644 --- a/apps/test-examples/index.tsx +++ b/apps/test-examples/index.tsx @@ -33,6 +33,7 @@ import Test2403 from './src/Test2403'; import Test2407 from './src/Test2407'; import Test2417 from './src/Test2417'; import Test2455 from './src/Test2455'; +import Test2471 from './src/Test2471'; export default function App() { return ; diff --git a/apps/test-examples/src/Test2471.tsx b/apps/test-examples/src/Test2471.tsx new file mode 100644 index 000000000..ab5b5f154 --- /dev/null +++ b/apps/test-examples/src/Test2471.tsx @@ -0,0 +1,108 @@ +import React, {useEffect, useRef} from 'react'; +import {Animated, Text, View} from 'react-native'; +import Reanimated, { + interpolateColor, + useAnimatedProps, + useSharedValue, + withRepeat, + withTiming, +} from 'react-native-reanimated'; +import {Circle, Path, Svg} from 'react-native-svg'; + +const AnimatedPath = Animated.createAnimatedComponent(Path); +const AnimatedCircle = Animated.createAnimatedComponent(Circle); +const AnimatedTest = (): JSX.Element => { + const animColor = useRef(new Animated.Value(0)).current; + useEffect(() => { + Animated.loop( + Animated.sequence([ + Animated.timing(animColor, { + toValue: 1, + duration: 1000, + useNativeDriver: true, + }), + Animated.timing(animColor, { + toValue: 0, + duration: 1000, + useNativeDriver: true, + }), + ]), + ).start(); + }, []); + return ( + + + + + ); +}; + +const ReanimatedPath = Reanimated.createAnimatedComponent(Path); +const ReanimatedCircle = Reanimated.createAnimatedComponent(Circle); +const ReanimatedTest = (): JSX.Element => { + const progress = useSharedValue(0); + useEffect(() => { + progress.value = withRepeat(withTiming(1, {duration: 1000}), -1, true); + }, []); + + const animatedProps = useAnimatedProps(() => ({ + fill: interpolateColor(progress.value, [0, 1], ['red', 'green']), + stroke: interpolateColor(progress.value, [0, 1], ['blue', 'yellow']), + })); + const animatedProps2 = useAnimatedProps(() => ({ + fill: interpolateColor(progress.value, [0, 1], ['blue', 'red']), + color: interpolateColor(progress.value, [0, 1], ['pink', 'black']), + })); + + return ( + + + + + ); +}; + +export default () => { + return ( + + Animated test + + Reanimated test + + + ); +}; diff --git a/src/elements/Shape.tsx b/src/elements/Shape.tsx index 4634503a0..69f6576ad 100644 --- a/src/elements/Shape.tsx +++ b/src/elements/Shape.tsx @@ -9,6 +9,7 @@ import type { TransformProps, } from '../lib/extract/types'; import type { Spec } from '../fabric/NativeSvgRenderableModule'; +import { BrushProperties } from '../lib/extract/colors'; export interface SVGBoundingBoxOptions { fill?: boolean; @@ -268,9 +269,11 @@ export default class Shape

extends Component

{ fill?: ColorValue; } & TransformProps ) => { - if (props.fill) { - // @ts-ignore TODO: native `fill` prop differs from the one passed in props - props.fill = extractBrush(props.fill); + for (const key in props) { + if (BrushProperties.includes(key)) { + // @ts-ignore TypeScript doesn't know that `key` is a key of `props` + props[key] = extractBrush(props[key]); + } } this.root?.setNativeProps(props); }; diff --git a/src/fabric/CircleNativeComponent.ts b/src/fabric/CircleNativeComponent.ts index c4cc5eaf1..05189a56e 100644 --- a/src/fabric/CircleNativeComponent.ts +++ b/src/fabric/CircleNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/ClipPathNativeComponent.ts b/src/fabric/ClipPathNativeComponent.ts index 69daeef13..8dfdc7e32 100644 --- a/src/fabric/ClipPathNativeComponent.ts +++ b/src/fabric/ClipPathNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/EllipseNativeComponent.ts b/src/fabric/EllipseNativeComponent.ts index e5c1a3f49..5b306a500 100644 --- a/src/fabric/EllipseNativeComponent.ts +++ b/src/fabric/EllipseNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/ForeignObjectNativeComponent.ts b/src/fabric/ForeignObjectNativeComponent.ts index 4ed5c8e76..ada2fa89d 100644 --- a/src/fabric/ForeignObjectNativeComponent.ts +++ b/src/fabric/ForeignObjectNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/GroupNativeComponent.ts b/src/fabric/GroupNativeComponent.ts index 71cabd325..db52f1401 100644 --- a/src/fabric/GroupNativeComponent.ts +++ b/src/fabric/GroupNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/ImageNativeComponent.ts b/src/fabric/ImageNativeComponent.ts index acb250770..77226f8c2 100644 --- a/src/fabric/ImageNativeComponent.ts +++ b/src/fabric/ImageNativeComponent.ts @@ -46,10 +46,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/LineNativeComponent.ts b/src/fabric/LineNativeComponent.ts index bf8e828d4..4ee243121 100644 --- a/src/fabric/LineNativeComponent.ts +++ b/src/fabric/LineNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/MarkerNativeComponent.ts b/src/fabric/MarkerNativeComponent.ts index d701491fe..57c004be0 100644 --- a/src/fabric/MarkerNativeComponent.ts +++ b/src/fabric/MarkerNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/MaskNativeComponent.ts b/src/fabric/MaskNativeComponent.ts index cbeabeff7..33c96f640 100644 --- a/src/fabric/MaskNativeComponent.ts +++ b/src/fabric/MaskNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/PathNativeComponent.ts b/src/fabric/PathNativeComponent.ts index acb3e5c85..b42518b74 100644 --- a/src/fabric/PathNativeComponent.ts +++ b/src/fabric/PathNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/PatternNativeComponent.ts b/src/fabric/PatternNativeComponent.ts index 037b67593..be0669347 100644 --- a/src/fabric/PatternNativeComponent.ts +++ b/src/fabric/PatternNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/RectNativeComponent.ts b/src/fabric/RectNativeComponent.ts index bfedcb78b..7a3a091aa 100644 --- a/src/fabric/RectNativeComponent.ts +++ b/src/fabric/RectNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/SymbolNativeComponent.ts b/src/fabric/SymbolNativeComponent.ts index b7918e13f..7a1fceea9 100644 --- a/src/fabric/SymbolNativeComponent.ts +++ b/src/fabric/SymbolNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/TSpanNativeComponent.ts b/src/fabric/TSpanNativeComponent.ts index c4ff0bff3..99e7de993 100644 --- a/src/fabric/TSpanNativeComponent.ts +++ b/src/fabric/TSpanNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/TextNativeComponent.ts b/src/fabric/TextNativeComponent.ts index 58bca7829..62d50c701 100644 --- a/src/fabric/TextNativeComponent.ts +++ b/src/fabric/TextNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/TextPathNativeComponent.ts b/src/fabric/TextPathNativeComponent.ts index b1e8108e7..401b2e898 100644 --- a/src/fabric/TextPathNativeComponent.ts +++ b/src/fabric/TextPathNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/fabric/UseNativeComponent.ts b/src/fabric/UseNativeComponent.ts index 0c1b5d9f9..bb5d79967 100644 --- a/src/fabric/UseNativeComponent.ts +++ b/src/fabric/UseNativeComponent.ts @@ -33,10 +33,10 @@ type ColorStruct = Readonly<{ interface SvgRenderableCommonProps { color?: ColorValue; - fill?: ColorStruct; + fill?: UnsafeMixed; fillOpacity?: WithDefault; fillRule?: WithDefault; - stroke?: ColorStruct; + stroke?: UnsafeMixed; strokeOpacity?: WithDefault; strokeWidth?: UnsafeMixed; strokeLinecap?: WithDefault; diff --git a/src/lib/extract/colors.ts b/src/lib/extract/colors.ts new file mode 100644 index 000000000..4696a1d8a --- /dev/null +++ b/src/lib/extract/colors.ts @@ -0,0 +1,8 @@ +// https://www.w3.org/TR/SVG11/color.html +export const BrushProperties = [ + 'fill', + 'stroke', + 'stopColor', + 'floodColor', + 'lightingColor', +];