@vitessce/neuroglancer 3.9.1 → 3.9.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.
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import React__default from "react";
5
- import { g as getDefaultExportFromCjs, c as commonjsGlobal, d as diffCameraState } from "./index-BNWANKfn.js";
5
+ import { g as getDefaultExportFromCjs, c as commonjsGlobal, d as diffCameraState } from "./index-C5ptEhQz.js";
6
6
  var es6_object_assign = {};
7
7
  var _global = { exports: {} };
8
8
  var hasRequired_global;
@@ -25398,21 +25398,20 @@ Popper.Utils = (typeof window !== "undefined" ? window : global).PopperUtils;
25398
25398
  Popper.placements = placements;
25399
25399
  Popper.Defaults = Defaults;
25400
25400
  function createChainedFunction(...funcs) {
25401
- return funcs.reduce((acc, func) => {
25402
- if (func == null) {
25403
- return acc;
25404
- }
25405
- {
25406
- if (typeof func !== "function") {
25407
- console.error("Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.");
25401
+ return funcs.reduce(
25402
+ (acc, func) => {
25403
+ if (func == null) {
25404
+ return acc;
25408
25405
  }
25406
+ return function chainedFunction(...args) {
25407
+ acc.apply(this, args);
25408
+ func.apply(this, args);
25409
+ };
25410
+ },
25411
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
25412
+ () => {
25409
25413
  }
25410
- return function chainedFunction(...args) {
25411
- acc.apply(this, args);
25412
- func.apply(this, args);
25413
- };
25414
- }, () => {
25415
- });
25414
+ );
25416
25415
  }
25417
25416
  function setRef(ref, value) {
25418
25417
  if (typeof ref === "function") {
@@ -25451,7 +25450,7 @@ function flipPlacement(placement, theme) {
25451
25450
  }
25452
25451
  }
25453
25452
  function getAnchorEl(anchorEl) {
25454
- return typeof anchorEl === "function" ? anchorEl() : anchorEl;
25453
+ return typeof anchorEl === "function" ? anchorEl(document.body) : anchorEl;
25455
25454
  }
25456
25455
  const useEnhancedEffect = typeof window !== "undefined" ? React$1.useLayoutEffect : React$1.useEffect;
25457
25456
  const defaultPopperOptions = {};
@@ -25481,25 +25480,18 @@ React$1.forwardRef((props, ref) => {
25481
25480
  }
25482
25481
  if (popperRef.current) {
25483
25482
  popperRef.current.destroy();
25484
- handlePopperRefRef.current(null);
25483
+ if (handlePopperRefRef.current) {
25484
+ setRef(handlePopperRefRef.current, null);
25485
+ }
25485
25486
  }
25486
25487
  const handlePopperUpdate = (data) => {
25487
25488
  setPlacement(data.placement);
25488
25489
  };
25489
- const resolvedAnchorEl = getAnchorEl(anchorEl);
25490
- {
25491
- if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
25492
- const box = resolvedAnchorEl.getBoundingClientRect();
25493
- if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
25494
- console.warn([
25495
- "Material-UI: The `anchorEl` prop provided to the component is invalid.",
25496
- "The anchor element should be part of the document layout.",
25497
- "Make sure the element is present in the document or that it's not display none."
25498
- ].join("\n"));
25499
- }
25500
- }
25490
+ const anchorElement = getAnchorEl(anchorEl);
25491
+ if (!anchorElement) {
25492
+ return;
25501
25493
  }
25502
- const popper = new Popper(getAnchorEl(anchorEl), tooltipRef.current, {
25494
+ const popper = new Popper(anchorElement, tooltipRef.current, {
25503
25495
  placement: rtlPlacement,
25504
25496
  ...popperOptions,
25505
25497
  modifiers: {
@@ -25517,7 +25509,9 @@ React$1.forwardRef((props, ref) => {
25517
25509
  onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),
25518
25510
  onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)
25519
25511
  });
25520
- handlePopperRefRef.current(popper);
25512
+ if (handlePopperRefRef.current) {
25513
+ setRef(handlePopperRefRef.current, popper);
25514
+ }
25521
25515
  }, [anchorEl, disablePortal, modifiers2, open, rtlPlacement, popperOptions]);
25522
25516
  const handleRef = React$1.useCallback((node2) => {
25523
25517
  setRef(ownRef, node2);
@@ -25531,7 +25525,9 @@ React$1.forwardRef((props, ref) => {
25531
25525
  return;
25532
25526
  }
25533
25527
  popperRef.current.destroy();
25534
- handlePopperRefRef.current(null);
25528
+ if (handlePopperRefRef.current) {
25529
+ setRef(handlePopperRefRef.current, null);
25530
+ }
25535
25531
  };
25536
25532
  const handleExited = () => {
25537
25533
  setExited(true);
@@ -25562,7 +25558,7 @@ React$1.forwardRef((props, ref) => {
25562
25558
  // Fix Popper.js display issue
25563
25559
  top: 0,
25564
25560
  left: 0,
25565
- display: !open && keepMounted && !transition ? "none" : null,
25561
+ display: !open && keepMounted && !transition ? "none" : void 0,
25566
25562
  ...style2
25567
25563
  }, children: typeof children === "function" ? children(childProps) : children }) });
25568
25564
  });
@@ -25577,7 +25573,7 @@ function ScopedGlobalStyles(props) {
25577
25573
  const component = useMemo(() => {
25578
25574
  const computedStyles = prependParentClassName(styles, parentClassName);
25579
25575
  return jsxRuntimeExports.jsx(GlobalStyles, { styles: computedStyles });
25580
- }, [parentClassName]);
25576
+ }, [parentClassName, styles]);
25581
25577
  return component;
25582
25578
  }
25583
25579
  const useStyles = makeStyles()(() => ({
@@ -28202,7 +28198,7 @@ function NeuroglancerGlobalStyles(props) {
28202
28198
  }
28203
28199
  ));
28204
28200
  }
28205
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-CfXWCAza.js"));
28201
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-DTI8FUjG.js"));
28206
28202
  function createWorker() {
28207
28203
  return new WorkerFactory();
28208
28204
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { N } from "./index-BNWANKfn.js";
1
+ import { N } from "./index-C5ptEhQz.js";
2
2
  export {
3
3
  N as NeuroglancerSubscriber
4
4
  };
@@ -1,4 +1,4 @@
1
- export function NeuroglancerGlobalStyles(props: any): import(".pnpm/@types+react@19.1.6/node_modules/@types/react").JSX.Element;
1
+ export function NeuroglancerGlobalStyles(props: any): import("react").JSX.Element;
2
2
  export const useStyles: (params: void, muiStyleOverridesParams?: {
3
3
  props: Record<string, unknown>;
4
4
  ownerState?: Record<string, unknown> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAqkFA,gIAcC;AA/kFD;;cAiBe,CAAC;;;kBAIP,eAAsB;gBAChB,WAAU;eAAsB,WACvC;EAlBJ"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAqkFA,kFAcC;AA/kFD;;cAiBe,CAAC;;;kBAIP,eAAsB;gBAChB,WAAU;eAAsB,WACvC;EAlBJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/neuroglancer",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,13 +20,13 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "three": "^0.154.0",
22
22
  "react": "18.3.1",
23
- "@vitessce/neuroglancer-workers": "3.9.1",
24
- "@vitessce/constants-internal": "3.9.1",
25
- "@vitessce/vit-s": "3.9.1",
26
- "@vitessce/sets-utils": "3.9.1",
27
- "@vitessce/utils": "3.9.1",
28
- "@vitessce/styles": "3.9.1",
29
- "@vitessce/tooltip": "3.9.1"
23
+ "@vitessce/neuroglancer-workers": "3.9.2",
24
+ "@vitessce/constants-internal": "3.9.2",
25
+ "@vitessce/styles": "3.9.2",
26
+ "@vitessce/vit-s": "3.9.2",
27
+ "@vitessce/sets-utils": "3.9.2",
28
+ "@vitessce/utils": "3.9.2",
29
+ "@vitessce/tooltip": "3.9.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@testing-library/jest-dom": "^6.6.3",