@shopify/react-native-skia 0.1.187 → 0.1.188

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/android/build.gradle +15 -2
  2. package/cpp/rnskia/dom/base/JsiDependencyManager.h +47 -47
  3. package/cpp/rnskia/dom/base/JsiDomNode.h +6 -7
  4. package/cpp/rnskia/dom/base/NodePropsContainer.h +27 -3
  5. package/cpp/rnskia/dom/props/ColorProp.h +7 -0
  6. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +10 -9
  7. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +7 -3
  8. package/ios/RNSkia-iOS/SkiaManager.mm +3 -27
  9. package/lib/commonjs/animation/functions/interpolateColors.d.ts +1 -1
  10. package/lib/commonjs/animation/functions/interpolateColors.js +3 -2
  11. package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
  12. package/lib/commonjs/skia/types/Color.d.ts +1 -1
  13. package/lib/commonjs/skia/types/Color.js.map +1 -1
  14. package/lib/commonjs/skia/web/JsiSkColor.js +2 -0
  15. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -1
  16. package/lib/module/animation/functions/interpolateColors.d.ts +1 -1
  17. package/lib/module/animation/functions/interpolateColors.js +3 -2
  18. package/lib/module/animation/functions/interpolateColors.js.map +1 -1
  19. package/lib/module/skia/types/Color.d.ts +1 -1
  20. package/lib/module/skia/types/Color.js.map +1 -1
  21. package/lib/module/skia/web/JsiSkColor.js +2 -0
  22. package/lib/module/skia/web/JsiSkColor.js.map +1 -1
  23. package/lib/typescript/src/animation/functions/interpolateColors.d.ts +1 -1
  24. package/lib/typescript/src/skia/types/Color.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/src/animation/functions/interpolateColors.ts +2 -1
  27. package/src/skia/types/Color.ts +1 -1
  28. package/src/skia/web/JsiSkColor.ts +2 -0
@@ -272,11 +272,24 @@ task extractJNIFiles {
272
272
  extractJNIFiles.mustRunAfter extractAARHeaders
273
273
 
274
274
  if (ENABLE_PREFAB) {
275
- // Package everything with the original file structure
275
+ // Package all the cpp code in a flattened directory structure
276
276
  task prepareHeaders(type: Copy) {
277
- from('./cpp')
277
+ from("./cpp")
278
278
  into "${project.buildDir}/headers/rnskia/"
279
279
  includeEmptyDirs = false
280
+ include "**/*.h"
281
+ eachFile {
282
+ String path = it.path
283
+
284
+ // Skip flattening third_party dir
285
+ if (path.contains("api/third_party")) {
286
+ path = path.substring("api/".length())
287
+ } else {
288
+ // flatten anything else
289
+ path = path.substring(path.lastIndexOf("/") + 1)
290
+ }
291
+ it.path = path
292
+ }
280
293
  }
281
294
  preBuild.dependsOn(prepareHeaders)
282
295
  }
@@ -64,53 +64,53 @@ public:
64
64
 
65
65
  // Enumerate registered keys for the given node to only handle known
66
66
  // properties
67
- for (const auto &propMapping :
68
- node->getPropsContainer()->getMappedProperties()) {
69
- auto key = propMapping.first;
70
- auto jsValue = nextProps.getProperty(runtime, key);
71
- JsiValue nativeValue(runtime, jsValue);
72
-
73
- if (isAnimatedValue(nativeValue)) {
74
- // Handle Skia Animation Values
75
- auto animatedValue = getAnimatedValue(nativeValue);
76
- auto unsubscribe = animatedValue->addListener(
77
- [animatedValue, propMapping](jsi::Runtime &runtime) {
78
- // Get value from animation value
79
- auto nextJsValue = animatedValue->getCurrent(runtime);
80
- // Update all props that listens to this animation value
81
- for (auto &prop : propMapping.second) {
82
- prop->updateValue(runtime, nextJsValue);
83
- }
84
- });
85
-
86
- // Save unsubscribe methods
87
- unsubscribers.push_back(std::make_pair(animatedValue, unsubscribe));
88
-
89
- } else if (isSelector(nativeValue)) {
90
- // Handle Skia Animation Value Selectors
91
- auto animatedValue = std::dynamic_pointer_cast<RNSkReadonlyValue>(
92
- nativeValue.getValue(PropNameValue).getAsHostObject());
93
-
94
- auto selector = nativeValue.getValue(PropNameSelector).getAsFunction();
95
- // Add subscription to animated value in selector
96
- auto unsubscribe = animatedValue->addListener(
97
- [nativeValue, propMapping, selector = std::move(selector),
98
- animatedValue](jsi::Runtime &runtime) {
99
- // Get value from animation value
100
- jsi::Value jsValue = animatedValue->getCurrent(runtime);
101
- // Call selector to transform new value
102
- auto selectedJsValue =
103
- selector(runtime, jsi::Value::null(), &jsValue, 1);
104
- // Update all props that listens to this animation value
105
- for (auto &prop : propMapping.second) {
106
- prop->updateValue(runtime, selectedJsValue);
107
- }
108
- });
109
-
110
- // Save unsubscribe methods
111
- unsubscribers.push_back(std::make_pair(animatedValue, unsubscribe));
112
- }
113
- }
67
+ node->getPropsContainer()->enumerateMappedProps(
68
+ [&](const PropId key, const std::vector<NodeProp *> &propMapping) {
69
+ auto jsValue = nextProps.getProperty(runtime, key);
70
+ JsiValue nativeValue(runtime, jsValue);
71
+
72
+ if (isAnimatedValue(nativeValue)) {
73
+ // Handle Skia Animation Values
74
+ auto animatedValue = getAnimatedValue(nativeValue);
75
+ auto unsubscribe = animatedValue->addListener(
76
+ [animatedValue, propMapping](jsi::Runtime &runtime) {
77
+ // Get value from animation value
78
+ auto nextJsValue = animatedValue->getCurrent(runtime);
79
+ // Update all props that listens to this animation value
80
+ for (auto &prop : propMapping) {
81
+ prop->updateValue(runtime, nextJsValue);
82
+ }
83
+ });
84
+
85
+ // Save unsubscribe methods
86
+ unsubscribers.push_back(std::make_pair(animatedValue, unsubscribe));
87
+
88
+ } else if (isSelector(nativeValue)) {
89
+ // Handle Skia Animation Value Selectors
90
+ auto animatedValue = std::dynamic_pointer_cast<RNSkReadonlyValue>(
91
+ nativeValue.getValue(PropNameValue).getAsHostObject());
92
+
93
+ auto selector =
94
+ nativeValue.getValue(PropNameSelector).getAsFunction();
95
+ // Add subscription to animated value in selector
96
+ auto unsubscribe = animatedValue->addListener(
97
+ [nativeValue, propMapping, selector = std::move(selector),
98
+ animatedValue](jsi::Runtime &runtime) {
99
+ // Get value from animation value
100
+ jsi::Value jsValue = animatedValue->getCurrent(runtime);
101
+ // Call selector to transform new value
102
+ auto selectedJsValue =
103
+ selector(runtime, jsi::Value::null(), &jsValue, 1);
104
+ // Update all props that listens to this animation value
105
+ for (auto &prop : propMapping) {
106
+ prop->updateValue(runtime, selectedJsValue);
107
+ }
108
+ });
109
+
110
+ // Save unsubscribe methods
111
+ unsubscribers.push_back(std::make_pair(animatedValue, unsubscribe));
112
+ }
113
+ });
114
114
 
115
115
  // Now let's store the subscription info
116
116
  _subscriptions.emplace(node.get(), unsubscribers);
@@ -98,13 +98,12 @@ public:
98
98
  auto propName = arguments[0].asString(runtime).utf8(runtime);
99
99
  const jsi::Value &propValue = arguments[1];
100
100
 
101
- auto mappedProps = _propsContainer->getMappedProperties();
102
- auto propMapIt = mappedProps.find(JsiPropId::get(propName));
103
- if (propMapIt != mappedProps.end()) {
104
- for (auto &prop : propMapIt->second) {
105
- prop->updateValue(runtime, propValue);
106
- }
107
- }
101
+ // Enumerate all props with this name and update. The
102
+ // enumerateMappedPropsByName function is thread safe and locks props so it
103
+ // can be called from all threads.
104
+ _propsContainer->enumerateMappedPropsByName(propName, [&](NodeProp *prop) {
105
+ prop->updateValue(runtime, propValue);
106
+ });
108
107
 
109
108
  return jsi::Value::undefined();
110
109
  }
@@ -41,10 +41,30 @@ public:
41
41
  }
42
42
 
43
43
  /**
44
- Returns a list of mappings betwen property names and property objects
44
+ Enumerate all mapped properties
45
45
  */
46
- const std::map<PropId, std::vector<NodeProp *>> &getMappedProperties() {
47
- return _mappedProperties;
46
+ void enumerateMappedProps(
47
+ const std::function<void(const PropId name,
48
+ const std::vector<NodeProp *>)> &callback) {
49
+ std::lock_guard<std::mutex> lock(_mappedPropsLock);
50
+ for (auto &props : _mappedProperties) {
51
+ callback(props.first, props.second);
52
+ }
53
+ }
54
+
55
+ /**
56
+ Enumerates a named property instances from the mapped properties list
57
+ */
58
+ void
59
+ enumerateMappedPropsByName(const std::string &name,
60
+ const std::function<void(NodeProp *)> &callback) {
61
+ std::lock_guard<std::mutex> lock(_mappedPropsLock);
62
+ auto propMapIt = _mappedProperties.find(JsiPropId::get(name));
63
+ if (propMapIt != _mappedProperties.end()) {
64
+ for (auto &prop : propMapIt->second) {
65
+ callback(prop);
66
+ }
67
+ }
48
68
  }
49
69
 
50
70
  /**
@@ -75,6 +95,7 @@ public:
75
95
  Clears all props and data from the container
76
96
  */
77
97
  void dispose() {
98
+ std::lock_guard<std::mutex> lock(_mappedPropsLock);
78
99
  _properties.clear();
79
100
  _mappedProperties.clear();
80
101
  }
@@ -83,6 +104,8 @@ public:
83
104
  Called when the React / JS side sets properties on a node
84
105
  */
85
106
  void setProps(jsi::Runtime &runtime, const jsi::Value &maybePropsObject) {
107
+ std::lock_guard<std::mutex> lock(_mappedPropsLock);
108
+
86
109
  // Clear property mapping
87
110
  _mappedProperties.clear();
88
111
 
@@ -129,6 +152,7 @@ private:
129
152
  std::vector<std::shared_ptr<BaseNodeProp>> _properties;
130
153
  std::map<PropId, std::vector<NodeProp *>> _mappedProperties;
131
154
  PropId _type;
155
+ std::mutex _mappedPropsLock;
132
156
  };
133
157
 
134
158
  } // namespace RNSkia
@@ -42,6 +42,13 @@ public:
42
42
  return SkColorSetARGB(a.getAsNumber() * 255.0f, r.getAsNumber() * 255.0f,
43
43
  g.getAsNumber() * 255.0f, b.getAsNumber() * 255.0f);
44
44
 
45
+ } else if (color.getType() == PropType::Array) {
46
+ auto r = color.getAsArray().at(0);
47
+ auto g = color.getAsArray().at(1);
48
+ auto b = color.getAsArray().at(2);
49
+ auto a = color.getAsArray().at(3);
50
+ return SkColorSetARGB(a.getAsNumber() * 255.0f, r.getAsNumber() * 255.0f,
51
+ g.getAsNumber() * 255.0f, b.getAsNumber() * 255.0f);
45
52
  } else if (color.getType() == PropType::Number) {
46
53
  return static_cast<SkColor>(color.getAsNumber());
47
54
  } else {
@@ -1,6 +1,8 @@
1
1
  #pragma once
2
2
 
3
+ #import <React/RCTBridge+Private.h>
3
4
  #import <React/RCTBridge.h>
5
+ #import <ReactCommon/RCTTurboModule.h>
4
6
 
5
7
  #include <functional>
6
8
  #include <memory>
@@ -8,6 +10,7 @@
8
10
 
9
11
  #include "DisplayLink.h"
10
12
  #include "RNSkPlatformContext.h"
13
+ #include "ViewScreenshotService.h"
11
14
 
12
15
  #include <jsi/jsi.h>
13
16
 
@@ -27,13 +30,8 @@ static void handleNotification(CFNotificationCenterRef center, void *observer,
27
30
 
28
31
  class RNSkiOSPlatformContext : public RNSkPlatformContext {
29
32
  public:
30
- RNSkiOSPlatformContext(
31
- jsi::Runtime *runtime, std::shared_ptr<react::CallInvoker> callInvoker,
32
- std::function<void(std::function<void()>)> dispatchMainThread,
33
- std::function<sk_sp<SkImage>(size_t viewTag)> takeViewScreenshot)
34
- : _dispatchMainThread(dispatchMainThread),
35
- _takeViewScreenshot(takeViewScreenshot),
36
- RNSkPlatformContext(runtime, callInvoker,
33
+ RNSkiOSPlatformContext(jsi::Runtime *runtime, RCTBridge *bridge)
34
+ : RNSkPlatformContext(runtime, bridge.jsCallInvoker,
37
35
  [[UIScreen mainScreen] scale]) {
38
36
 
39
37
  // We need to make sure we invalidate when modules are freed
@@ -41,6 +39,10 @@ public:
41
39
  CFNotificationCenterGetLocalCenter(), this, &handleNotification,
42
40
  (__bridge CFStringRef)RCTBridgeWillInvalidateModulesNotification, NULL,
43
41
  CFNotificationSuspensionBehaviorDeliverImmediately);
42
+
43
+ // Create screenshot manager
44
+ _screenshotService =
45
+ [[ViewScreenshotService alloc] initWithUiManager:bridge.uiManager];
44
46
  }
45
47
 
46
48
  ~RNSkiOSPlatformContext() {
@@ -70,8 +72,7 @@ public:
70
72
 
71
73
  private:
72
74
  DisplayLink *_displayLink;
73
- std::function<void(std::function<void()>)> _dispatchMainThread;
74
- std::function<sk_sp<SkImage>(size_t viewTag)> _takeViewScreenshot;
75
+ ViewScreenshotService *_screenshotService;
75
76
  };
76
77
 
77
78
  static void handleNotification(CFNotificationCenterRef center, void *observer,
@@ -63,11 +63,15 @@ sk_sp<SkSurface> RNSkiOSPlatformContext::makeOffscreenSurface(int width,
63
63
  }
64
64
 
65
65
  void RNSkiOSPlatformContext::runOnMainThread(std::function<void()> func) {
66
- _dispatchMainThread(func);
66
+ dispatch_async(dispatch_get_main_queue(), ^{
67
+ func();
68
+ });
67
69
  }
68
70
 
69
- sk_sp<SkImage> RNSkiOSPlatformContext::takeScreenshotFromViewTag(size_t tag) {
70
- return _takeViewScreenshot(tag);
71
+ sk_sp<SkImage>
72
+ RNSkiOSPlatformContext::takeScreenshotFromViewTag(size_t viewTag) {
73
+ return [_screenshotService
74
+ screenshotOfViewWithTag:[NSNumber numberWithLong:viewTag]];
71
75
  }
72
76
 
73
77
  void RNSkiOSPlatformContext::startDrawLoop() {
@@ -9,12 +9,9 @@
9
9
  #import <ReactCommon/RCTTurboModule.h>
10
10
 
11
11
  #import "RNSkiOSPlatformContext.h"
12
- #import "ViewScreenshotService.h"
13
12
 
14
13
  @implementation SkiaManager {
15
14
  std::shared_ptr<RNSkia::RNSkManager> _skManager;
16
- std::shared_ptr<RNSkia::RNSkiOSPlatformContext> _platformContext;
17
- ViewScreenshotService *_screenshot;
18
15
  __weak RCTBridge *weakBridge;
19
16
  }
20
17
 
@@ -27,7 +24,6 @@
27
24
  _skManager->invalidate();
28
25
  }
29
26
  _skManager = nullptr;
30
- _platformContext = nullptr;
31
27
  }
32
28
 
33
29
  - (instancetype)initWithBridge:(RCTBridge *)bridge {
@@ -36,33 +32,13 @@
36
32
  RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge;
37
33
  if (cxxBridge.runtime) {
38
34
 
39
- auto callInvoker = bridge.jsCallInvoker;
40
35
  facebook::jsi::Runtime *jsRuntime =
41
36
  (facebook::jsi::Runtime *)cxxBridge.runtime;
42
37
 
43
- // Create screenshot manager
44
- _screenshot =
45
- [[ViewScreenshotService alloc] initWithUiManager:bridge.uiManager];
46
-
47
- auto takeScreenshot = [self](size_t viewTag) {
48
- return [_screenshot
49
- screenshotOfViewWithTag:[NSNumber numberWithLong:viewTag]];
50
- };
51
-
52
- auto dispatchOnMainThread = [self](std::function<void()> fp) {
53
- dispatch_async(dispatch_get_main_queue(), ^{
54
- fp();
55
- });
56
- };
57
-
58
- // Create platform context
59
- _platformContext = std::make_shared<RNSkia::RNSkiOSPlatformContext>(
60
- jsRuntime, callInvoker, std::move(dispatchOnMainThread),
61
- std::move(takeScreenshot));
62
-
63
38
  // Create the RNSkiaManager (cross platform)
64
- _skManager = std::make_shared<RNSkia::RNSkManager>(jsRuntime, callInvoker,
65
- _platformContext);
39
+ _skManager = std::make_shared<RNSkia::RNSkManager>(
40
+ jsRuntime, bridge.jsCallInvoker,
41
+ std::make_shared<RNSkia::RNSkiOSPlatformContext>(jsRuntime, bridge));
66
42
  }
67
43
  }
68
44
  return self;
@@ -1,3 +1,3 @@
1
1
  import type { Color } from "../../skia";
2
- export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => Float32Array;
2
+ export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => number[];
3
3
  export declare const mixColors: (value: number, x: Color, y: Color) => Float32Array;
@@ -17,8 +17,9 @@ const interpolateColorsRGB = (value, inputRange, outputRange) => {
17
17
  const r = (0, _interpolate.interpolate)(value, inputRange, outputRange.map(c => c[0]), "clamp");
18
18
  const g = (0, _interpolate.interpolate)(value, inputRange, outputRange.map(c => c[1]), "clamp");
19
19
  const b = (0, _interpolate.interpolate)(value, inputRange, outputRange.map(c => c[2]), "clamp");
20
- const a = (0, _interpolate.interpolate)(value, inputRange, outputRange.map(c => c[3]), "clamp");
21
- return new Float32Array([r, g, b, a]);
20
+ const a = (0, _interpolate.interpolate)(value, inputRange, outputRange.map(c => c[3]), "clamp"); // TODO: once Float32Array are supported in the reanimated integration we can switch there
21
+
22
+ return [r, g, b, a];
22
23
  };
23
24
 
24
25
  const interpolateColors = (value, inputRange, _outputRange) => {
@@ -1 +1 @@
1
- {"version":3,"names":["interpolateColorsRGB","value","inputRange","outputRange","r","interpolate","map","c","g","b","a","Float32Array","interpolateColors","_outputRange","cl","Skia","Color","mixColors","x","y","c1","c2","mix"],"sources":["interpolateColors.ts"],"sourcesContent":["import { mix } from \"../../renderer/processors/math\";\nimport type { Color, SkColor } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n \"worklet\";\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n return new Float32Array([r, g, b, a]);\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n \"worklet\";\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n \"worklet\";\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAEA,MAAMA,oBAAoB,GAAG,CAC3BC,KAD2B,EAE3BC,UAF2B,EAG3BC,WAH2B,KAIxB;EACH;;EACA,MAAMC,CAAC,GAAG,IAAAC,wBAAA,EACRJ,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACG,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;EAMA,MAAMC,CAAC,GAAG,IAAAH,wBAAA,EACRJ,KADQ,EAERC,UAFQ,EAGRC,WAAW,CAACG,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHQ,EAIR,OAJQ,CAAV;EAMA,MAAME,C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AAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAHsB,EAItB,IAAAC,SAAA,EAAIrB,KAAJ,EAAWmB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAJsB,CAAjB,CAAP;AAMD,CAVM"}
1
+ {"version":3,"names":["interpolateColorsRGB","value","inputRange","outputRange","r","interpolate","map","c","g","b","a","interpolateColors","_outputRange","cl","Skia","Color","mixColors","x","y","c1","c2","Float32Array","mix"],"sources":["interpolateColors.ts"],"sourcesContent":["import { mix } from \"../../renderer/processors/math\";\nimport type { Color, SkColor } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n \"worklet\";\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n // TODO: once Float32Array are supported in the reanimated integration we can switch there\n return [r, g, b, a];\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n \"worklet\";\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n \"worklet\";\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAEA,MAAMA,oBAAoB,GAAG,CAC3BC,KAD2B,EAE3BC,UA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AMG,EAAE,GAAGN,UAAA,CAAKC,KAAL,CAAWG,CAAX,CAAX;;EACA,OAAO,IAAIG,YAAJ,CAAiB,CACtB,IAAAC,SAAA,EAAIrB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CADsB,EAEtB,IAAAE,SAAA,EAAIrB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAFsB,EAGtB,IAAAE,SAAA,EAAIrB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAHsB,EAItB,IAAAE,SAAA,EAAIrB,KAAJ,EAAWkB,EAAE,CAAC,CAAD,CAAb,EAAkBC,EAAE,CAAC,CAAD,CAApB,CAJsB,CAAjB,CAAP;AAMD,CAVM"}
@@ -1,2 +1,2 @@
1
1
  export declare type SkColor = Float32Array;
2
- export declare type Color = string | Float32Array | number;
2
+ export declare type Color = string | Float32Array | number | number[];
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Color.ts"],"sourcesContent":["// This is the JSI color\nexport type SkColor = Float32Array;\n// Input colors can be string, number or Float32Array\nexport type Color = string | Float32Array | number;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["Color.ts"],"sourcesContent":["// This is the JSI color\nexport type SkColor = Float32Array;\n// Input colors can be string, number or Float32Array\nexport type Color = string | Float32Array | number | number[];\n"],"mappings":""}
@@ -334,6 +334,8 @@ const parseCSSColor = cssStr => {
334
334
  const Color = color => {
335
335
  if (color instanceof Float32Array) {
336
336
  return color;
337
+ } else if (Array.isArray(color)) {
338
+ return new Float32Array(color);
337
339
  } else if (typeof color === "string") {
338
340
  const r = parseCSSColor(color);
339
341
  const rgba = r === null ? CSSColorTable.black : r;
@@ -1 +1 @@
1
- {"version":3,"names":["alphaf","c","red","green","blue","CSSColorTable","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clampCSSByte","j","i","Math","round","clampCSSFloat","f","parseCSSInt","str","length","parseFloat","parseInt","parseCSSFloat","undefined","CSSHueToRGB","m1","m2","h","parseCSSColor","cssStr","replace","toLowerCase","cl","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","Color","color","r","rgba"],"sources":["JsiSkColor.ts"],"sourcesContent":["import type { SkColor, Color as InputColor } from \"../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\n// From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js\nconst CSSColorTable = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nconst clampCSSByte = (j: number) => {\n // Clamp to integer 0 .. 255.\n const i = Math.round(j); // Seems to be what Chrome does (vs truncation).\n // eslint-disable-next-line no-nested-ternary\n return i < 0 ? 0 : i > 255 ? 255 : i;\n};\n\nconst clampCSSFloat = (f: number) => {\n // eslint-disable-next-line no-nested-ternary\n return f < 0 ? 0 : f > 1 ? 1 : f;\n};\n\nconst parseCSSInt = (str: string) => {\n // int or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSByte((parseFloat(str) / 100) * 255);\n }\n // eslint-disable-next-line radix\n return clampCSSByte(parseInt(str));\n};\n\nconst parseCSSFloat = (str: string | undefined) => {\n if (str === undefined) {\n return 1;\n }\n // float or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSFloat(parseFloat(str) / 100);\n }\n return clampCSSFloat(parseFloat(str));\n};\n\nconst CSSHueToRGB = (m1: number, m2: number, h: number) => {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n};\n\nconst parseCSSColor = (cssStr: string) => {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = cssStr.replace(/ /g, \"\").toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in CSSColorTable) {\n const cl = CSSColorTable[str as keyof typeof CSSColorTable];\n if (cl) {\n return Float32Array.of(...cl);\n }\n return null;\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === \"#\") {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1,\n ];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n } else if (str.length === 9) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffffff)) {\n return null; // Covers NaN.\n }\n return [\n ((iv & 0xff000000) >> 24) & 0xff,\n (iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n (iv & 0xff) / 255,\n ];\n }\n\n return null;\n }\n\n var op = str.indexOf(\"(\"),\n ep = str.indexOf(\")\");\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(\",\");\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"rgba\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"rgb\":\n if (params.length !== 3) {\n return null;\n }\n return [\n parseCSSInt(params[0]),\n parseCSSInt(params[1]),\n parseCSSInt(params[2]),\n alpha,\n ];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"hsla\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"hsl\":\n if (params.length !== 3) {\n return null;\n }\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCSSFloat(params[1]);\n var l = parseCSSFloat(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [\n clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255),\n alpha,\n ];\n default:\n return null;\n }\n }\n\n return null;\n};\n\nexport const Color = (color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (typeof color === \"string\") {\n const r = parseCSSColor(color);\n const rgba = r === null ? CSSColorTable.black : r;\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else {\n return Float32Array.of(\n red(color) / 255,\n green(color) / 255,\n blue(color) / 255,\n alphaf(color)\n );\n }\n};\n"],"mappings":";;;;;;;AAEA,MAAMA,MAAM,GAAIC,CAAD,IAAe,CAAEA,CAAC,IAAI,EAAN,GAAY,GAAb,IAAoB,GAAlD;;AACA,MAAMC,GAAG,GAAID,CAAD,IAAgBA,CAAC,IAAI,EAAN,GAAY,GAAvC;;AACA,MAAME,KAAK,GAAIF,CAAD,IAAgBA,CAAC,IAAI,CAAN,GAAW,GAAxC;;AACA,MAAMG,IAAI,GAAIH,CAAD,IAAeA,CAAC,GAAG,GAAhC,C,CAEA;;;AACA,MAAMI,aAAa,GAAG;EACpBC,WAAW,EAAEC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CADO;EAEpBC,SAAS,EAAEF,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAFS;EAGpBE,YAAY,EAAEH,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAHM;EAIpBG,IAAI,EAAEJ,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,GAAnB,EAAwB,GAAxB,EAA6B,CAA7B,CAJc;EAKpBI,UAAU,EAAEL,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CALQ;EAMpBK,KAAK,EAAEN,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAAr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I,CAAjB,CAAX,GAAiC,GAAlC,CAHP,EAILc,KAJK,CAAP;;MAMF;QACE,OAAO,IAAP;IA7CJ;EA+CD;;EAED,OAAO,IAAP;AACD,CAxGD;;AA0GO,MAAMI,KAAK,GAAIC,KAAD,IAAgC;EACnD,IAAIA,KAAK,YAAYvL,YAArB,EAAmC;IACjC,OAAOuL,KAAP;EACD,CAFD,MAEO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;IACpC,MAAMC,CAAC,GAAGnB,aAAa,CAACkB,KAAD,CAAvB;IACA,MAAME,IAAI,GAAGD,CAAC,KAAK,IAAN,GAAa1L,aAAa,CAACW,KAA3B,GAAmC+K,CAAhD;IACA,OAAOxL,YAAY,CAACC,EAAb,CACLwL,IAAI,CAAC,CAAD,CAAJ,GAAU,GADL,EAELA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAFL,EAGLA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAHL,EAILA,IAAI,CAAC,CAAD,CAJC,CAAP;EAMD,CATM,MASA;IACL,OAAOzL,YAAY,CAACC,EAAb,CACLN,GAAG,CAAC4L,KAAD,CAAH,GAAa,GADR,EAEL3L,KAAK,CAAC2L,KAAD,CAAL,GAAe,GAFV,EAGL1L,IAAI,CAAC0L,KAAD,CAAJ,GAAc,GAHT,EAIL9L,MAAM,CAAC8L,KAAD,CAJD,CAAP;EAMD;AACF,CApBM"}
1
+ {"version":3,"names":["alphaf","c","red","green","blue","CSSColorTable","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clampCSSByte","j","i","Math","round","clampCSSFloat","f","parseCSSInt","str","length","parseFloat","parseInt","parseCSSFloat","undefined","CSSHueToRGB","m1","m2","h","parseCSSColor","cssStr","replace","toLowerCase","cl","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","Color","color","Array","isArray","r","rgba"],"sources":["JsiSkColor.ts"],"sourcesContent":["import type { SkColor, Color as InputColor } from \"../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\n// From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js\nconst CSSColorTable = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nconst clampCSSByte = (j: number) => {\n // Clamp to integer 0 .. 255.\n const i = Math.round(j); // Seems to be what Chrome does (vs truncation).\n // eslint-disable-next-line no-nested-ternary\n return i < 0 ? 0 : i > 255 ? 255 : i;\n};\n\nconst clampCSSFloat = (f: number) => {\n // eslint-disable-next-line no-nested-ternary\n return f < 0 ? 0 : f > 1 ? 1 : f;\n};\n\nconst parseCSSInt = (str: string) => {\n // int or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSByte((parseFloat(str) / 100) * 255);\n }\n // eslint-disable-next-line radix\n return clampCSSByte(parseInt(str));\n};\n\nconst parseCSSFloat = (str: string | undefined) => {\n if (str === undefined) {\n return 1;\n }\n // float or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSFloat(parseFloat(str) / 100);\n }\n return clampCSSFloat(parseFloat(str));\n};\n\nconst CSSHueToRGB = (m1: number, m2: number, h: number) => {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n};\n\nconst parseCSSColor = (cssStr: string) => {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = cssStr.replace(/ /g, \"\").toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in CSSColorTable) {\n const cl = CSSColorTable[str as keyof typeof CSSColorTable];\n if (cl) {\n return Float32Array.of(...cl);\n }\n return null;\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === \"#\") {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1,\n ];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n } else if (str.length === 9) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffffff)) {\n return null; // Covers NaN.\n }\n return [\n ((iv & 0xff000000) >> 24) & 0xff,\n (iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n (iv & 0xff) / 255,\n ];\n }\n\n return null;\n }\n\n var op = str.indexOf(\"(\"),\n ep = str.indexOf(\")\");\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(\",\");\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"rgba\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"rgb\":\n if (params.length !== 3) {\n return null;\n }\n return [\n parseCSSInt(params[0]),\n parseCSSInt(params[1]),\n parseCSSInt(params[2]),\n alpha,\n ];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"hsla\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"hsl\":\n if (params.length !== 3) {\n return null;\n }\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCSSFloat(params[1]);\n var l = parseCSSFloat(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [\n clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255),\n alpha,\n ];\n default:\n return null;\n }\n }\n\n return null;\n};\n\nexport const Color = (color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (Array.isArray(color)) {\n return new Float32Array(color);\n } else if (typeof color === \"string\") {\n const r = parseCSSColor(color);\n const rgba = r === null ? CSSColorTable.black : r;\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else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D,MAEO,IAAIC,KAAK,CAACC,OAAN,CAAcF,KAAd,CAAJ,EAA0B;IAC/B,OAAO,IAAIvL,YAAJ,CAAiBuL,KAAjB,CAAP;EACD,CAFM,MAEA,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;IACpC,MAAMG,CAAC,GAAGrB,aAAa,CAACkB,KAAD,CAAvB;IACA,MAAMI,IAAI,GAAGD,CAAC,KAAK,IAAN,GAAa5L,aAAa,CAACW,KAA3B,GAAmCiL,CAAhD;IACA,OAAO1L,YAAY,CAACC,EAAb,CACL0L,IAAI,CAAC,CAAD,CAAJ,GAAU,GADL,EAELA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAFL,EAGLA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAHL,EAILA,IAAI,CAAC,CAAD,CAJC,CAAP;EAMD,CATM,MASA;IACL,OAAO3L,YAAY,CAACC,EAAb,CACLN,GAAG,CAAC4L,KAAD,CAAH,GAAa,GADR,EAEL3L,KAAK,CAAC2L,KAAD,CAAL,GAAe,GAFV,EAGL1L,IAAI,CAAC0L,KAAD,CAAJ,GAAc,GAHT,EAIL9L,MAAM,CAAC8L,KAAD,CAJD,CAAP;EAMD;AACF,CAtBM"}
@@ -1,3 +1,3 @@
1
1
  import type { Color } from "../../skia";
2
- export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => Float32Array;
2
+ export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => number[];
3
3
  export declare const mixColors: (value: number, x: Color, y: Color) => Float32Array;
@@ -8,8 +8,9 @@ const interpolateColorsRGB = (value, inputRange, outputRange) => {
8
8
  const r = interpolate(value, inputRange, outputRange.map(c => c[0]), "clamp");
9
9
  const g = interpolate(value, inputRange, outputRange.map(c => c[1]), "clamp");
10
10
  const b = interpolate(value, inputRange, outputRange.map(c => c[2]), "clamp");
11
- const a = interpolate(value, inputRange, outputRange.map(c => c[3]), "clamp");
12
- return new Float32Array([r, g, b, a]);
11
+ const a = interpolate(value, inputRange, outputRange.map(c => c[3]), "clamp"); // TODO: once Float32Array are supported in the reanimated integration we can switch there
12
+
13
+ return [r, g, b, a];
13
14
  };
14
15
 
15
16
  export const interpolateColors = (value, inputRange, _outputRange) => {
@@ -1 +1 @@
1
- {"version":3,"names":["mix","Skia","interpolate","interpolateColorsRGB","value","inputRange","outputRange","r","map","c","g","b","a","Float32Array","interpolateColors","_outputRange","cl","Color","mixColors","x","y","c1","c2"],"sources":["interpolateColors.ts"],"sourcesContent":["import { mix } from \"../../renderer/processors/math\";\nimport type { Color, SkColor } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n \"worklet\";\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n return new Float32Array([r, g, b, a]);\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n \"worklet\";\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n \"worklet\";\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gCAApB;AAEA,SAASC,IAAT,QAAqB,YAArB;AAEA,SAASC,WAAT,QAA4B,eAA5B;;AAEA,MAAMC,oBAAoB,GAAG,CAC3BC,KAD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E,CAAX,CAAX;EACA,MAAMG,EAAE,GAAGrB,IAAI,CAACgB,KAAL,CAAWG,CAAX,CAAX;EACA,OAAO,IAAIP,YAAJ,CAAiB,CACtBb,GAAG,CAACI,KAAD,EAAQiB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CADmB,EAEtBtB,GAAG,CAACI,KAAD,EAAQiB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAFmB,EAGtBtB,GAAG,CAACI,KAAD,EAAQiB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAHmB,EAItBtB,GAAG,CAACI,KAAD,EAAQiB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAJmB,CAAjB,CAAP;AAMD,CAVM"}
1
+ {"version":3,"names":["mix","Skia","interpolate","interpolateColorsRGB","value","inputRange","outputRange","r","map","c","g","b","a","interpolateColors","_outputRange","cl","Color","mixColors","x","y","c1","c2","Float32Array"],"sources":["interpolateColors.ts"],"sourcesContent":["import { mix } from \"../../renderer/processors/math\";\nimport type { Color, SkColor } from \"../../skia\";\nimport { Skia } from \"../../skia\";\n\nimport { interpolate } from \"./interpolate\";\n\nconst interpolateColorsRGB = (\n value: number,\n inputRange: number[],\n outputRange: SkColor[]\n) => {\n \"worklet\";\n const r = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[0]),\n \"clamp\"\n );\n const g = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[1]),\n \"clamp\"\n );\n const b = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[2]),\n \"clamp\"\n );\n const a = interpolate(\n value,\n inputRange,\n outputRange.map((c) => c[3]),\n \"clamp\"\n );\n // TODO: once Float32Array are supported in the reanimated integration we can switch there\n return [r, g, b, a];\n};\n\nexport const interpolateColors = (\n value: number,\n inputRange: number[],\n _outputRange: Color[]\n) => {\n \"worklet\";\n const outputRange = _outputRange.map((cl) => Skia.Color(cl));\n return interpolateColorsRGB(value, inputRange, outputRange);\n};\n\nexport const mixColors = (value: number, x: Color, y: Color) => {\n \"worklet\";\n const c1 = Skia.Color(x);\n const c2 = Skia.Color(y);\n return new Float32Array([\n mix(value, c1[0], c2[0]),\n mix(value, c1[1], c2[1]),\n mix(value, c1[2], c2[2]),\n mix(value, c1[3], c2[3]),\n ]);\n};\n"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gCAApB;AAEA,SAASC,IAAT,QAAqB,YAArB;AAEA,SAASC,WAAT,QAA4B,eAA5B;;AAEA,MAAMC,oBAAoB,GAAG,CAC3BC,KAD2B,EAE3BC,UAF2B,EAG3BC,WAH2B,KAIxB;EACH;;EACA,MAAMC,CAAC,GAAGL,WAAW,CACnBE,KADmB,EAEnBC,UAFmB,EAGnBC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHmB,EAInB,OAJmB,CAArB;EAMA,MAAMC,CAAC,GAAGR,WAAW,CACnBE,KADmB,EAEnBC,UAFmB,EAGnBC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHmB,EAInB,OAJmB,CAArB;EAMA,MAAME,CAAC,GAAGT,WAAW,CACnBE,KADmB,EAEnBC,UAFmB,EAGnBC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHmB,EAInB,OAJmB,CAArB;EAMA,MAAMG,CAAC,GAAGV,WAAW,CACnBE,KADmB,EAEnBC,UAFmB,EAGnBC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAAC,CAAD,CAAxB,CAHmB,EAInB,OAJmB,CAArB,CApBG,CA0BH;;EACA,OAAO,CAACF,CAAD,EAAIG,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAP;AACD,CAhCD;;AAkCA,OAAO,MAAMC,iBAAiB,GAAG,CAC/BT,KAD+B,EAE/BC,UAF+B,EAG/BS,YAH+B,KAI5B;EACH;;EACA,MAAMR,WAAW,GAAGQ,YAAY,CAACN,GAAb,CAAkBO,EAAD,IAAQd,IAAI,CAACe,KAAL,CAAWD,EAAX,CAAzB,CAApB;;EACA,OAAOZ,oBAAoB,CAACC,KAAD,EAAQC,UAAR,EAAoBC,WAApB,CAA3B;AACD,CARM;AAUP,OAAO,MAAMW,SAAS,GAAG,CAACb,KAAD,EAAgBc,CAAhB,EAA0BC,CAA1B,KAAuC;EAC9D;;EACA,MAAMC,EAAE,GAAGnB,IAAI,CAACe,KAAL,CAAWE,CAAX,CAAX;EACA,MAAMG,EAAE,GAAGpB,IAAI,CAACe,KAAL,CAAWG,CAAX,CAAX;EACA,OAAO,IAAIG,YAAJ,CAAiB,CACtBtB,GAAG,CAACI,KAAD,EAAQgB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CADmB,EAEtBrB,GAAG,CAACI,KAAD,EAAQgB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAFmB,EAGtBrB,GAAG,CAACI,KAAD,EAAQgB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAHmB,EAItBrB,GAAG,CAACI,KAAD,EAAQgB,EAAE,CAAC,CAAD,CAAV,EAAeC,EAAE,CAAC,CAAD,CAAjB,CAJmB,CAAjB,CAAP;AAMD,CAVM"}
@@ -1,2 +1,2 @@
1
1
  export declare type SkColor = Float32Array;
2
- export declare type Color = string | Float32Array | number;
2
+ export declare type Color = string | Float32Array | number | number[];
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Color.ts"],"sourcesContent":["// This is the JSI color\nexport type SkColor = Float32Array;\n// Input colors can be string, number or Float32Array\nexport type Color = string | Float32Array | number;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["Color.ts"],"sourcesContent":["// This is the JSI color\nexport type SkColor = Float32Array;\n// Input colors can be string, number or Float32Array\nexport type Color = string | Float32Array | number | number[];\n"],"mappings":""}
@@ -327,6 +327,8 @@ const parseCSSColor = cssStr => {
327
327
  export const Color = color => {
328
328
  if (color instanceof Float32Array) {
329
329
  return color;
330
+ } else if (Array.isArray(color)) {
331
+ return new Float32Array(color);
330
332
  } else if (typeof color === "string") {
331
333
  const r = parseCSSColor(color);
332
334
  const rgba = r === null ? CSSColorTable.black : r;
@@ -1 +1 @@
1
- {"version":3,"names":["alphaf","c","red","green","blue","CSSColorTable","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clampCSSByte","j","i","Math","round","clampCSSFloat","f","parseCSSInt","str","length","parseFloat","parseInt","parseCSSFloat","undefined","CSSHueToRGB","m1","m2","h","parseCSSColor","cssStr","replace","toLowerCase","cl","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","Color","color","r","rgba"],"sources":["JsiSkColor.ts"],"sourcesContent":["import type { SkColor, Color as InputColor } from \"../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\n// From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js\nconst CSSColorTable = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nconst clampCSSByte = (j: number) => {\n // Clamp to integer 0 .. 255.\n const i = Math.round(j); // Seems to be what Chrome does (vs truncation).\n // eslint-disable-next-line no-nested-ternary\n return i < 0 ? 0 : i > 255 ? 255 : i;\n};\n\nconst clampCSSFloat = (f: number) => {\n // eslint-disable-next-line no-nested-ternary\n return f < 0 ? 0 : f > 1 ? 1 : f;\n};\n\nconst parseCSSInt = (str: string) => {\n // int or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSByte((parseFloat(str) / 100) * 255);\n }\n // eslint-disable-next-line radix\n return clampCSSByte(parseInt(str));\n};\n\nconst parseCSSFloat = (str: string | undefined) => {\n if (str === undefined) {\n return 1;\n }\n // float or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSFloat(parseFloat(str) / 100);\n }\n return clampCSSFloat(parseFloat(str));\n};\n\nconst CSSHueToRGB = (m1: number, m2: number, h: number) => {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n};\n\nconst parseCSSColor = (cssStr: string) => {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = cssStr.replace(/ /g, \"\").toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in CSSColorTable) {\n const cl = CSSColorTable[str as keyof typeof CSSColorTable];\n if (cl) {\n return Float32Array.of(...cl);\n }\n return null;\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === \"#\") {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1,\n ];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n } else if (str.length === 9) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffffff)) {\n return null; // Covers NaN.\n }\n return [\n ((iv & 0xff000000) >> 24) & 0xff,\n (iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n (iv & 0xff) / 255,\n ];\n }\n\n return null;\n }\n\n var op = str.indexOf(\"(\"),\n ep = str.indexOf(\")\");\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(\",\");\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"rgba\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"rgb\":\n if (params.length !== 3) {\n return null;\n }\n return [\n parseCSSInt(params[0]),\n parseCSSInt(params[1]),\n parseCSSInt(params[2]),\n alpha,\n ];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"hsla\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"hsl\":\n if (params.length !== 3) {\n return null;\n }\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCSSFloat(params[1]);\n var l = parseCSSFloat(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [\n clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255),\n alpha,\n ];\n default:\n return null;\n }\n }\n\n return null;\n};\n\nexport const Color = (color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (typeof color === \"string\") {\n const r = parseCSSColor(color);\n const rgba = r === null ? CSSColorTable.black : r;\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else {\n return Float32Array.of(\n red(color) / 255,\n green(color) / 255,\n blue(color) / 255,\n alphaf(color)\n );\n }\n};\n"],"mappings":"AAEA,MAAMA,MAAM,GAAIC,CAAD,IAAe,CAAEA,CAAC,IAAI,EAAN,GAAY,GAAb,IAAoB,GAAlD;;AACA,MAAMC,GAAG,GAAID,CAAD,IAAgBA,CAAC,IAAI,EAAN,GAAY,GAAvC;;AACA,MAAME,KAAK,GAAIF,CAAD,IAAgBA,CAAC,IAAI,CAAN,GAAW,GAAxC;;AACA,MAAMG,IAAI,GAAIH,CAAD,IAAeA,CAAC,GAAG,GAAhC,C,CAEA;;;AACA,MAAMI,aAAa,GAAG;EACpBC,WAAW,EAAEC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CADO;EAEpBC,SAAS,EAAEF,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAFS;EAGp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ACF,CApBM"}
1
+ {"version":3,"names":["alphaf","c","red","green","blue","CSSColorTable","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clampCSSByte","j","i","Math","round","clampCSSFloat","f","parseCSSInt","str","length","parseFloat","parseInt","parseCSSFloat","undefined","CSSHueToRGB","m1","m2","h","parseCSSColor","cssStr","replace","toLowerCase","cl","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","Color","color","Array","isArray","r","rgba"],"sources":["JsiSkColor.ts"],"sourcesContent":["import type { SkColor, Color as InputColor } from \"../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\n// From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js\nconst CSSColorTable = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nconst clampCSSByte = (j: number) => {\n // Clamp to integer 0 .. 255.\n const i = Math.round(j); // Seems to be what Chrome does (vs truncation).\n // eslint-disable-next-line no-nested-ternary\n return i < 0 ? 0 : i > 255 ? 255 : i;\n};\n\nconst clampCSSFloat = (f: number) => {\n // eslint-disable-next-line no-nested-ternary\n return f < 0 ? 0 : f > 1 ? 1 : f;\n};\n\nconst parseCSSInt = (str: string) => {\n // int or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSByte((parseFloat(str) / 100) * 255);\n }\n // eslint-disable-next-line radix\n return clampCSSByte(parseInt(str));\n};\n\nconst parseCSSFloat = (str: string | undefined) => {\n if (str === undefined) {\n return 1;\n }\n // float or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSFloat(parseFloat(str) / 100);\n }\n return clampCSSFloat(parseFloat(str));\n};\n\nconst CSSHueToRGB = (m1: number, m2: number, h: number) => {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n};\n\nconst parseCSSColor = (cssStr: string) => {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = cssStr.replace(/ /g, \"\").toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in CSSColorTable) {\n const cl = CSSColorTable[str as keyof typeof CSSColorTable];\n if (cl) {\n return Float32Array.of(...cl);\n }\n return null;\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === \"#\") {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1,\n ];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n } else if (str.length === 9) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffffff)) {\n return null; // Covers NaN.\n }\n return [\n ((iv & 0xff000000) >> 24) & 0xff,\n (iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n (iv & 0xff) / 255,\n ];\n }\n\n return null;\n }\n\n var op = str.indexOf(\"(\"),\n ep = str.indexOf(\")\");\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(\",\");\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"rgba\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"rgb\":\n if (params.length !== 3) {\n return null;\n }\n return [\n parseCSSInt(params[0]),\n parseCSSInt(params[1]),\n parseCSSInt(params[2]),\n alpha,\n ];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"hsla\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"hsl\":\n if (params.length !== 3) {\n return null;\n }\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCSSFloat(params[1]);\n var l = parseCSSFloat(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [\n clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255),\n alpha,\n ];\n default:\n return null;\n }\n }\n\n return null;\n};\n\nexport const Color = (color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (Array.isArray(color)) {\n return new Float32Array(color);\n } else if (typeof color === \"string\") {\n const r = parseCSSColor(color);\n const rgba = r === null ? CSSColorTable.black : r;\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else {\n return Float32Array.of(\n red(color) / 255,\n green(color) / 255,\n blue(color) / 255,\n alphaf(color)\n );\n }\n};\n"],"mappings":"AAEA,MAAMA,MAAM,GAAIC,CAAD,IAAe,CAAEA,CAAC,IAAI,EAAN,GAAY,GAAb,IAAoB,GAAlD;;AACA,MAAMC,GAAG,GAAID,CAAD,IAAgBA,CAAC,IAAI,EAAN,GAAY,GAAvC;;AACA,MAAME,KAAK,GAAIF,CAAD,IAAgBA,CAAC,IAAI,CAAN,GAAW,GAAxC;;AACA,MAAMG,IAAI,GAAIH,CAAD,IAAeA,CAAC,GAAG,GAAhC,C,CAEA;;;AACA,MAAMI,aAAa,GAAG;EACpBC,WAAW,EAAEC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CADO;EAEpBC,SAAS,EAAEF,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAFS;EAGpBE,YAAY,EAAEH,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAHM;EAIpBG,IAAI,EAAEJ,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,GAAnB,EAAwB,GAAxB,EAA6B,CAA7B,CAJc;EAKpBI,UAAU,EAAEL,YAAY,CAACC,E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,EAAD,EAAKC,EAAL,EAASC,CAAT,CAAX,GAAyB,GAA1B,CAFP,EAGLjB,YAAY,CAACc,WAAW,CAACC,EAAD,EAAKC,EAAL,EAASC,CAAC,GAAG,IAAI,CAAjB,CAAX,GAAiC,GAAlC,CAHP,EAILc,KAJK,CAAP;;MAMF;QACE,OAAO,IAAP;IA7CJ;EA+CD;;EAED,OAAO,IAAP;AACD,CAxGD;;AA0GA,OAAO,MAAMI,KAAK,GAAIC,KAAD,IAAgC;EACnD,IAAIA,KAAK,YAAYvL,YAArB,EAAmC;IACjC,OAAOuL,KAAP;EACD,CAFD,MAEO,IAAIC,KAAK,CAACC,OAAN,CAAcF,KAAd,CAAJ,EAA0B;IAC/B,OAAO,IAAIvL,YAAJ,CAAiBuL,KAAjB,CAAP;EACD,CAFM,MAEA,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;IACpC,MAAMG,CAAC,GAAGrB,aAAa,CAACkB,KAAD,CAAvB;IACA,MAAMI,IAAI,GAAGD,CAAC,KAAK,IAAN,GAAa5L,aAAa,CAACW,KAA3B,GAAmCiL,CAAhD;IACA,OAAO1L,YAAY,CAACC,EAAb,CACL0L,IAAI,CAAC,CAAD,CAAJ,GAAU,GADL,EAELA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAFL,EAGLA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAHL,EAILA,IAAI,CAAC,CAAD,CAJC,CAAP;EAMD,CATM,MASA;IACL,OAAO3L,YAAY,CAACC,EAAb,CACLN,GAAG,CAAC4L,KAAD,CAAH,GAAa,GADR,EAEL3L,KAAK,CAAC2L,KAAD,CAAL,GAAe,GAFV,EAGL1L,IAAI,CAAC0L,KAAD,CAAJ,GAAc,GAHT,EAIL9L,MAAM,CAAC8L,KAAD,CAJD,CAAP;EAMD;AACF,CAtBM"}
@@ -1,3 +1,3 @@
1
1
  import type { Color } from "../../skia";
2
- export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => Float32Array;
2
+ export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => number[];
3
3
  export declare const mixColors: (value: number, x: Color, y: Color) => Float32Array;
@@ -1,2 +1,2 @@
1
1
  export declare type SkColor = Float32Array;
2
- export declare type Color = string | Float32Array | number;
2
+ export declare type Color = string | Float32Array | number | number[];
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "setup-skia-web": "./scripts/setup-canvaskit.js"
8
8
  },
9
9
  "title": "React Native Skia",
10
- "version": "0.1.187",
10
+ "version": "0.1.188",
11
11
  "description": "High-performance React Native Graphics using Skia",
12
12
  "main": "lib/module/index.js",
13
13
  "files": [
@@ -34,7 +34,8 @@ const interpolateColorsRGB = (
34
34
  outputRange.map((c) => c[3]),
35
35
  "clamp"
36
36
  );
37
- return new Float32Array([r, g, b, a]);
37
+ // TODO: once Float32Array are supported in the reanimated integration we can switch there
38
+ return [r, g, b, a];
38
39
  };
39
40
 
40
41
  export const interpolateColors = (
@@ -1,4 +1,4 @@
1
1
  // This is the JSI color
2
2
  export type SkColor = Float32Array;
3
3
  // Input colors can be string, number or Float32Array
4
- export type Color = string | Float32Array | number;
4
+ export type Color = string | Float32Array | number | number[];
@@ -318,6 +318,8 @@ const parseCSSColor = (cssStr: string) => {
318
318
  export const Color = (color: InputColor): SkColor => {
319
319
  if (color instanceof Float32Array) {
320
320
  return color;
321
+ } else if (Array.isArray(color)) {
322
+ return new Float32Array(color);
321
323
  } else if (typeof color === "string") {
322
324
  const r = parseCSSColor(color);
323
325
  const rgba = r === null ? CSSColorTable.black : r;