@vitessce/tooltip 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +15 -0
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3671,6 +3671,7 @@ function requireReactJsxRuntime_development() {
3671
3671
  }
3672
3672
  }
3673
3673
  }
3674
+ var didWarnAboutKeySpread = {};
3674
3675
  function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3675
3676
  {
3676
3677
  var validType = isValidElementType(type);
@@ -3721,6 +3722,20 @@ function requireReactJsxRuntime_development() {
3721
3722
  }
3722
3723
  }
3723
3724
  }
3725
+ {
3726
+ if (hasOwnProperty.call(props, "key")) {
3727
+ var componentName = getComponentNameFromType(type);
3728
+ var keys = Object.keys(props).filter(function(k) {
3729
+ return k !== "key";
3730
+ });
3731
+ var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
3732
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3733
+ var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
3734
+ error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3735
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
3736
+ }
3737
+ }
3738
+ }
3724
3739
  if (type === REACT_FRAGMENT_TYPE) {
3725
3740
  validateFragmentProps(element);
3726
3741
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/tooltip",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -16,9 +16,9 @@
16
16
  "dist-tsc"
17
17
  ],
18
18
  "dependencies": {
19
- "@vitessce/styles": "3.6.0",
20
- "@vitessce/vit-s": "3.6.0",
21
- "@vitessce/utils": "3.6.0"
19
+ "@vitessce/styles": "3.6.1",
20
+ "@vitessce/vit-s": "3.6.1",
21
+ "@vitessce/utils": "3.6.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "react": "^18.0.0",