react-msaview 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/util.ts CHANGED
@@ -1,7 +1,10 @@
1
- import Color from 'color'
2
1
  import { HierarchyNode } from 'd3-hierarchy'
3
2
  import { max } from 'd3-array'
4
3
  import { Theme } from '@mui/material'
4
+ import { colord, extend } from 'colord'
5
+ import namesPlugin from 'colord/plugins/names'
6
+
7
+ extend([namesPlugin])
5
8
 
6
9
  export function transform<T>(
7
10
  obj: Record<string, T>,
@@ -56,7 +59,7 @@ export function colorContrast(
56
59
  ) {
57
60
  return transform(colorScheme, ([letter, color]) => [
58
61
  letter,
59
- theme.palette.getContrastText(Color(color).hex()),
62
+ theme.palette.getContrastText(colord(color).toHex()),
60
63
  ])
61
64
  }
62
65
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.1.0'
1
+ export const version = '2.1.2'