@vitessce/image-utils 4.0.4 → 4.0.6

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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
2
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -118995,6 +118995,20 @@ function requireDistEs6() {
118995
118995
  var distEs6Exports$2 = requireDistEs6();
118996
118996
  var distEs6Exports$1 = requireDistEs6$1();
118997
118997
  var distEs6Exports = requireDistEs6$2();
118998
+ function runSelectionWithBusySignal(onBusy, work) {
118999
+ if (typeof onBusy !== "function" || typeof requestAnimationFrame !== "function") {
119000
+ work();
119001
+ return;
119002
+ }
119003
+ onBusy(true);
119004
+ requestAnimationFrame(() => setTimeout(() => {
119005
+ try {
119006
+ work();
119007
+ } finally {
119008
+ onBusy(false);
119009
+ }
119010
+ }, 0));
119011
+ }
118998
119012
  const EDIT_TYPE_ADD = "addFeature";
118999
119013
  const EDIT_TYPE_CLEAR = "clearFeatures";
119000
119014
  class ClickableDrawPolygonByDraggingMode extends distEs6Exports.DrawPolygonByDraggingMode {
@@ -119009,7 +119023,8 @@ const MODE_MAP = {
119009
119023
  const defaultProps$f = {
119010
119024
  layerIds: [],
119011
119025
  onSelect: () => {
119012
- }
119026
+ },
119027
+ onSelectionBusy: null
119013
119028
  };
119014
119029
  const EMPTY_DATA = {
119015
119030
  type: "FeatureCollection",
@@ -119101,11 +119116,12 @@ class SelectionLayer extends CompositeLayer {
119101
119116
  selectedFeatureIndexes: [],
119102
119117
  data: EMPTY_DATA,
119103
119118
  onEdit: ({ updatedData, editType }) => {
119119
+ const { onSelectionBusy } = this.props;
119104
119120
  if (editType === EDIT_TYPE_ADD) {
119105
119121
  const { coordinates: coordinates2 } = updatedData.features[0].geometry;
119106
- this._selectPolygonObjects(coordinates2);
119122
+ runSelectionWithBusySignal(onSelectionBusy, () => this._selectPolygonObjects(coordinates2));
119107
119123
  } else if (editType === EDIT_TYPE_CLEAR) {
119108
- this._selectEmpty();
119124
+ runSelectionWithBusySignal(onSelectionBusy, () => this._selectEmpty());
119109
119125
  }
119110
119126
  },
119111
119127
  _subLayerProps: {
@@ -120246,22 +120262,22 @@ function addDecoder(cases, importFn) {
120246
120262
  }
120247
120263
  cases.forEach((c) => registry$1.set(c, importFn));
120248
120264
  }
120249
- addDecoder([void 0, 1], () => import("./raw-KAMcFCKi.js").then((m) => m.default));
120250
- addDecoder(5, () => import("./lzw-_uoNAMOf.js").then((m) => m.default));
120265
+ addDecoder([void 0, 1], () => import("./raw-D5prg-7v.js").then((m) => m.default));
120266
+ addDecoder(5, () => import("./lzw-BzOLEK38.js").then((m) => m.default));
120251
120267
  addDecoder(6, () => {
120252
120268
  throw new Error("old style JPEG compression is not supported.");
120253
120269
  });
120254
- addDecoder(7, () => import("./jpeg-BtyHOrUt.js").then((m) => m.default));
120255
- addDecoder([8, 32946], () => import("./deflate-BAcJ4qAE.js").then((m) => m.default));
120256
- addDecoder(32773, () => import("./packbits-BdvC0Pts.js").then((m) => m.default));
120270
+ addDecoder(7, () => import("./jpeg-BCdw6mfN.js").then((m) => m.default));
120271
+ addDecoder([8, 32946], () => import("./deflate-BQFeaum-.js").then((m) => m.default));
120272
+ addDecoder(32773, () => import("./packbits-DogpBrl6.js").then((m) => m.default));
120257
120273
  addDecoder(
120258
120274
  34887,
120259
- () => import("./lerc-Bi4wseu7.js").then(async (m) => {
120275
+ () => import("./lerc-CN2VddFY.js").then(async (m) => {
120260
120276
  await m.zstd.init();
120261
120277
  return m;
120262
120278
  }).then((m) => m.default)
120263
120279
  );
120264
- addDecoder(50001, () => import("./webimage-uhdWloYS.js").then((m) => m.default));
120280
+ addDecoder(50001, () => import("./webimage-DHzqGhbI.js").then((m) => m.default));
120265
120281
  function decodeRowAcc(row, stride) {
120266
120282
  let length2 = row.length - stride;
120267
120283
  let offset = 0;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I } from "./index-ds1GSXwW.js";
1
+ import { I } from "./index-DHVt4YuW.js";
2
2
  export {
3
3
  I as ImageWrapper
4
4
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
1
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-ds1GSXwW.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DHVt4YuW.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
1
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
1
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
1
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-ds1GSXwW.js";
1
+ import { B as BaseDecoder } from "./index-DHVt4YuW.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/image-utils",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@hms-dbmi/viv": "~0.16.0",
20
- "@vitessce/types": "4.0.4",
21
- "@vitessce/spatial-utils": "4.0.4",
22
- "@vitessce/utils": "4.0.4",
23
- "@vitessce/globals": "4.0.4"
20
+ "@vitessce/types": "4.0.6",
21
+ "@vitessce/spatial-utils": "4.0.6",
22
+ "@vitessce/utils": "4.0.6",
23
+ "@vitessce/globals": "4.0.6"
24
24
  },
25
25
  "devDependencies": {
26
26
  "vite": "^7.0.0",