@vitessce/all 2.0.3 → 3.0.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.
- package/dist/{deflate.8ace1ac4.mjs → deflate-475a23c9.js} +2 -2
- package/dist/hglib-76c1b0ad.js +138925 -0
- package/dist/{index.7dac8670.mjs → index-f48f3f08.js} +66958 -52713
- package/dist/index.js +12 -0
- package/dist/{jpeg.c8011e3a.mjs → jpeg-7f0b1b2c.js} +1 -1
- package/dist/{lerc.ccda5eb2.mjs → lerc-f7557585.js} +76 -5
- package/dist/{lzw.39876143.mjs → lzw-4d26ee71.js} +1 -1
- package/dist/{packbits.9e95d117.mjs → packbits-08efb7ce.js} +1 -1
- package/dist/{pako.esm.4b234125.mjs → pako.esm-68f84e2a.js} +97 -15
- package/dist/{raw.0279d74b.mjs → raw-3c2d82ff.js} +1 -1
- package/dist/{webimage.5ac7ce95.mjs → webimage-a7dde8d2.js} +1 -1
- package/dist-tsc/Vitessce.d.ts +2 -0
- package/dist-tsc/Vitessce.d.ts.map +1 -0
- package/dist-tsc/Vitessce.js +45 -0
- package/dist-tsc/base-plugins.d.ts +854 -0
- package/dist-tsc/base-plugins.d.ts.map +1 -0
- package/dist-tsc/base-plugins.js +191 -0
- package/dist-tsc/index.d.ts +4 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +3 -2
- package/dist-tsc/joint-file-types-legacy.d.ts +226 -0
- package/dist-tsc/joint-file-types-legacy.d.ts.map +1 -0
- package/dist-tsc/joint-file-types-legacy.js +266 -0
- package/dist-tsc/joint-file-types-legacy.test.d.ts +2 -0
- package/dist-tsc/joint-file-types-legacy.test.d.ts.map +1 -0
- package/dist-tsc/joint-file-types-legacy.test.js +401 -0
- package/dist-tsc/joint-file-types.d.ts +4 -0
- package/dist-tsc/joint-file-types.d.ts.map +1 -0
- package/dist-tsc/joint-file-types.js +127 -0
- package/dist-tsc/joint-file-types.test.d.ts +2 -0
- package/dist-tsc/joint-file-types.test.d.ts.map +1 -0
- package/dist-tsc/joint-file-types.test.js +128 -0
- package/dist-tsc/latest-config-schema.test.d.ts +2 -0
- package/dist-tsc/latest-config-schema.test.d.ts.map +1 -0
- package/dist-tsc/latest-config-schema.test.js +19 -0
- package/package.json +37 -21
- package/src/Vitessce.tsx +79 -0
- package/src/base-plugins.ts +362 -0
- package/src/index.ts +8 -0
- package/src/joint-file-types-legacy.test.ts +413 -0
- package/src/joint-file-types-legacy.ts +284 -0
- package/src/joint-file-types.test.ts +132 -0
- package/src/joint-file-types.ts +142 -0
- package/src/latest-config-schema.test.ts +26 -0
- package/src/missing-types.d.ts +1 -0
- package/dist/hglib.1f1ea875.mjs +0 -130303
- package/dist/index.mjs +0 -11
- package/src/index.js +0 -7
- package/src/setup.js +0 -143
package/dist/index.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import { f, P, h, d, V, z } from "./index-f48f3f08.js";
|
2
|
+
import "react";
|
3
|
+
import "@vitessce/vit-s";
|
4
|
+
import "react-dom";
|
5
|
+
export {
|
6
|
+
f as PluginCoordinationType,
|
7
|
+
P as PluginFileType,
|
8
|
+
h as PluginJointFileType,
|
9
|
+
d as PluginViewType,
|
10
|
+
V as Vitessce,
|
11
|
+
z
|
12
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { i as inflate_1 } from "./pako.esm.
|
2
|
-
import { B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index.
|
1
|
+
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-f48f3f08.js";
|
3
3
|
import "react";
|
4
4
|
import "@vitessce/vit-s";
|
5
5
|
import "react-dom";
|
@@ -364,6 +364,8 @@ var LercDecode = { exports: {} };
|
|
364
364
|
}();
|
365
365
|
var Lerc2Decode = function() {
|
366
366
|
var BitStuffer = {
|
367
|
+
//methods ending with 2 are for the new byte order used by Lerc2.3 and above.
|
368
|
+
//originalUnstuff is used to unpack Huffman code table. code is duplicated to unstuffx for performance reasons.
|
367
369
|
unstuff: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {
|
368
370
|
var bitMask = (1 << bitsPerPixel) - 1;
|
369
371
|
var i = 0, o;
|
@@ -574,6 +576,7 @@ var LercDecode = { exports: {} };
|
|
574
576
|
};
|
575
577
|
var Lerc2Helpers = {
|
576
578
|
HUFFMAN_LUT_BITS_MAX: 12,
|
579
|
+
//use 2^12 lut, treat it like constant
|
577
580
|
computeChecksumFletcher32: function(input) {
|
578
581
|
var sum1 = 65535, sum2 = 65535;
|
579
582
|
var len = input.length;
|
@@ -1384,6 +1387,9 @@ var LercDecode = { exports: {} };
|
|
1384
1387
|
data.pixels.resultPixels = Lerc2Helpers.swapDimensionOrder(data.pixels.resultPixels, numPixels, numDims, OutPixelTypeArray);
|
1385
1388
|
}
|
1386
1389
|
},
|
1390
|
+
/*****************
|
1391
|
+
* private methods (helper methods)
|
1392
|
+
*****************/
|
1387
1393
|
formatFileInfo: function(data) {
|
1388
1394
|
return {
|
1389
1395
|
"fileIdentifierString": data.headerInfo.fileIdentifierString,
|
@@ -1403,6 +1409,7 @@ var LercDecode = { exports: {} };
|
|
1403
1409
|
"pixels": {
|
1404
1410
|
"numBlocksX": data.pixels.numBlocksX,
|
1405
1411
|
"numBlocksY": data.pixels.numBlocksY,
|
1412
|
+
//"numBytes": data.pixels.numBytes,
|
1406
1413
|
"maxValue": data.headerInfo.zMax,
|
1407
1414
|
"minValue": data.headerInfo.zMin,
|
1408
1415
|
"noDataValue": data.noDataValue
|
@@ -1690,14 +1697,48 @@ var LercDecode = { exports: {} };
|
|
1690
1697
|
this.right = right;
|
1691
1698
|
};
|
1692
1699
|
var Lerc2Decode2 = {
|
1700
|
+
/*
|
1701
|
+
* ********removed options compared to LERC1. We can bring some of them back if needed.
|
1702
|
+
* removed pixel type. LERC2 is typed and doesn't require user to give pixel type
|
1703
|
+
* changed encodedMaskData to maskData. LERC2 's js version make it faster to use maskData directly.
|
1704
|
+
* removed returnMask. mask is used by LERC2 internally and is cost free. In case of user input mask, it's returned as well and has neglible cost.
|
1705
|
+
* removed nodatavalue. Because LERC2 pixels are typed, nodatavalue will sacrify a useful value for many types (8bit, 16bit) etc,
|
1706
|
+
* user has to be knowledgable enough about raster and their data to avoid usability issues. so nodata value is simply removed now.
|
1707
|
+
* We can add it back later if their's a clear requirement.
|
1708
|
+
* removed encodedMask. This option was not implemented in LercDecode. It can be done after decoding (less efficient)
|
1709
|
+
* removed computeUsedBitDepths.
|
1710
|
+
*
|
1711
|
+
*
|
1712
|
+
* response changes compared to LERC1
|
1713
|
+
* 1. encodedMaskData is not available
|
1714
|
+
* 2. noDataValue is optional (returns only if user's noDataValue is with in the valid data type range)
|
1715
|
+
* 3. maskData is always available
|
1716
|
+
*/
|
1717
|
+
/*****************
|
1718
|
+
* public properties
|
1719
|
+
******************/
|
1720
|
+
//HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, not configurable
|
1721
|
+
/*****************
|
1722
|
+
* public methods
|
1723
|
+
*****************/
|
1724
|
+
/**
|
1725
|
+
* Decode a LERC2 byte stream and return an object containing the pixel data and optional metadata.
|
1726
|
+
*
|
1727
|
+
* @param {ArrayBuffer} input The LERC input byte stream
|
1728
|
+
* @param {object} [options] options Decoding options
|
1729
|
+
* @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid LERC file is expected at that position
|
1730
|
+
* @param {boolean} [options.returnFileInfo] If true, the return value will have a fileInfo property that contains metadata obtained from the LERC headers and the decoding process
|
1731
|
+
* @param {boolean} [options.returnPixelInterleavedDims] If true, returned dimensions are pixel-interleaved, a.k.a [p1_dim0, p1_dim1, p1_dimn, p2_dim0...], default is [p1_dim0, p2_dim0, ..., p1_dim1, p2_dim1...]
|
1732
|
+
*/
|
1693
1733
|
decode: function(input, options) {
|
1694
1734
|
options = options || {};
|
1695
1735
|
var noDataValue = options.noDataValue;
|
1696
1736
|
var i = 0, data = {};
|
1697
1737
|
data.ptr = options.inputOffset || 0;
|
1698
1738
|
data.pixels = {};
|
1699
|
-
if (!Lerc2Helpers.readHeaderInfo(input, data))
|
1700
|
-
;
|
1739
|
+
if (!Lerc2Helpers.readHeaderInfo(input, data)) {
|
1740
|
+
return;
|
1741
|
+
}
|
1701
1742
|
var headerInfo = data.headerInfo;
|
1702
1743
|
var fileVersion = headerInfo.fileVersion;
|
1703
1744
|
var OutPixelTypeArray = Lerc2Helpers.getDataTypeArray(headerInfo.imageType);
|
@@ -1775,6 +1816,7 @@ var LercDecode = { exports: {} };
|
|
1775
1816
|
maxValues: headerInfo.maxValues
|
1776
1817
|
},
|
1777
1818
|
maskData: data.pixels.resultMask
|
1819
|
+
//noDataValue: noDataValue
|
1778
1820
|
};
|
1779
1821
|
if (data.pixels.resultMask && Lerc2Helpers.isValidPixelValue(headerInfo.imageType, noDataValue)) {
|
1780
1822
|
var mask = data.pixels.resultMask;
|
@@ -1816,6 +1858,25 @@ var LercDecode = { exports: {} };
|
|
1816
1858
|
return b[0] === 1;
|
1817
1859
|
}();
|
1818
1860
|
var Lerc2 = {
|
1861
|
+
/************wrapper**********************************************/
|
1862
|
+
/**
|
1863
|
+
* A wrapper for decoding both LERC1 and LERC2 byte streams capable of handling multiband pixel blocks for various pixel types.
|
1864
|
+
*
|
1865
|
+
* @alias module:Lerc
|
1866
|
+
* @param {ArrayBuffer} input The LERC input byte stream
|
1867
|
+
* @param {object} [options] The decoding options below are optional.
|
1868
|
+
* @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position.
|
1869
|
+
* @param {string} [options.pixelType] (LERC1 only) Default value is F32. Valid pixel types for input are U8/S8/S16/U16/S32/U32/F32.
|
1870
|
+
* @param {number} [options.noDataValue] (LERC1 only). It is recommended to use the returned mask instead of setting this value.
|
1871
|
+
* @param {boolean} [options.returnPixelInterleavedDims] (nDim LERC2 only) If true, returned dimensions are pixel-interleaved, a.k.a [p1_dim0, p1_dim1, p1_dimn, p2_dim0...], default is [p1_dim0, p2_dim0, ..., p1_dim1, p2_dim1...]
|
1872
|
+
* @returns {{width, height, pixels, pixelType, mask, statistics}}
|
1873
|
+
* @property {number} width Width of decoded image.
|
1874
|
+
* @property {number} height Height of decoded image.
|
1875
|
+
* @property {array} pixels [band1, band2, …] Each band is a typed array of width*height.
|
1876
|
+
* @property {string} pixelType The type of pixels represented in the output.
|
1877
|
+
* @property {mask} mask Typed array with a size of width*height, or null if all pixels are valid.
|
1878
|
+
* @property {array} statistics [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values
|
1879
|
+
**/
|
1819
1880
|
decode: function(encodedData, options) {
|
1820
1881
|
if (!isPlatformLittleEndian) {
|
1821
1882
|
throw "Big endian system is not supported.";
|
@@ -1847,14 +1908,23 @@ var LercDecode = { exports: {} };
|
|
1847
1908
|
while (inputOffset < eof) {
|
1848
1909
|
var result = lerc.decode(encodedData, {
|
1849
1910
|
inputOffset,
|
1911
|
+
//for both lerc1 and lerc2
|
1850
1912
|
encodedMaskData,
|
1913
|
+
//lerc1 only
|
1851
1914
|
maskData,
|
1915
|
+
//lerc2 only
|
1852
1916
|
returnMask: iPlane === 0 ? true : false,
|
1917
|
+
//lerc1 only
|
1853
1918
|
returnEncodedMask: iPlane === 0 ? true : false,
|
1919
|
+
//lerc1 only
|
1854
1920
|
returnFileInfo: true,
|
1921
|
+
//for both lerc1 and lerc2
|
1855
1922
|
returnPixelInterleavedDims: options.returnPixelInterleavedDims,
|
1923
|
+
//for ndim lerc2 only
|
1856
1924
|
pixelType: options.pixelType || null,
|
1925
|
+
//lerc1 only
|
1857
1926
|
noDataValue: options.noDataValue || null
|
1927
|
+
//lerc1 only
|
1858
1928
|
});
|
1859
1929
|
inputOffset = result.fileInfo.eofOffset;
|
1860
1930
|
maskData = result.maskData;
|
@@ -1907,7 +1977,8 @@ var LercDecode = { exports: {} };
|
|
1907
1977
|
}
|
1908
1978
|
})();
|
1909
1979
|
})(LercDecode);
|
1910
|
-
|
1980
|
+
var LercDecodeExports = LercDecode.exports;
|
1981
|
+
const Lerc = /* @__PURE__ */ getDefaultExportFromCjs(LercDecodeExports);
|
1911
1982
|
class LercDecoder extends BaseDecoder {
|
1912
1983
|
constructor(fileDirectory) {
|
1913
1984
|
super();
|
@@ -27,9 +27,18 @@ const END_BLOCK = 256;
|
|
27
27
|
const REP_3_6 = 16;
|
28
28
|
const REPZ_3_10 = 17;
|
29
29
|
const REPZ_11_138 = 18;
|
30
|
-
const extra_lbits =
|
31
|
-
|
32
|
-
|
30
|
+
const extra_lbits = (
|
31
|
+
/* extra bits for each length code */
|
32
|
+
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
|
33
|
+
);
|
34
|
+
const extra_dbits = (
|
35
|
+
/* extra bits for each distance code */
|
36
|
+
new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
|
37
|
+
);
|
38
|
+
const extra_blbits = (
|
39
|
+
/* extra bits for each bit length code */
|
40
|
+
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
|
41
|
+
);
|
33
42
|
const bl_order = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
34
43
|
const DIST_CODE_LEN = 512;
|
35
44
|
const static_ltree = new Array((L_CODES$1 + 2) * 2);
|
@@ -79,7 +88,12 @@ const send_bits = (s, value, length) => {
|
|
79
88
|
}
|
80
89
|
};
|
81
90
|
const send_code = (s, c, tree) => {
|
82
|
-
send_bits(
|
91
|
+
send_bits(
|
92
|
+
s,
|
93
|
+
tree[c * 2],
|
94
|
+
tree[c * 2 + 1]
|
95
|
+
/*.Len*/
|
96
|
+
);
|
83
97
|
};
|
84
98
|
const bi_reverse = (code, len) => {
|
85
99
|
let res = 0;
|
@@ -368,19 +382,44 @@ const build_tree = (s, desc) => {
|
|
368
382
|
}
|
369
383
|
node = elems;
|
370
384
|
do {
|
371
|
-
n = s.heap[
|
372
|
-
|
373
|
-
|
374
|
-
|
385
|
+
n = s.heap[
|
386
|
+
1
|
387
|
+
/*SMALLEST*/
|
388
|
+
];
|
389
|
+
s.heap[
|
390
|
+
1
|
391
|
+
/*SMALLEST*/
|
392
|
+
] = s.heap[s.heap_len--];
|
393
|
+
pqdownheap(
|
394
|
+
s,
|
395
|
+
tree,
|
396
|
+
1
|
397
|
+
/*SMALLEST*/
|
398
|
+
);
|
399
|
+
m = s.heap[
|
400
|
+
1
|
401
|
+
/*SMALLEST*/
|
402
|
+
];
|
375
403
|
s.heap[--s.heap_max] = n;
|
376
404
|
s.heap[--s.heap_max] = m;
|
377
405
|
tree[node * 2] = tree[n * 2] + tree[m * 2];
|
378
406
|
s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
|
379
407
|
tree[n * 2 + 1] = tree[m * 2 + 1] = node;
|
380
|
-
s.heap[
|
381
|
-
|
408
|
+
s.heap[
|
409
|
+
1
|
410
|
+
/*SMALLEST*/
|
411
|
+
] = node++;
|
412
|
+
pqdownheap(
|
413
|
+
s,
|
414
|
+
tree,
|
415
|
+
1
|
416
|
+
/*SMALLEST*/
|
417
|
+
);
|
382
418
|
} while (s.heap_len >= 2);
|
383
|
-
s.heap[--s.heap_max] = s.heap[
|
419
|
+
s.heap[--s.heap_max] = s.heap[
|
420
|
+
1
|
421
|
+
/*SMALLEST*/
|
422
|
+
];
|
384
423
|
gen_bitlen(s, desc);
|
385
424
|
gen_codes(tree, max_code, s.bl_count);
|
386
425
|
};
|
@@ -640,16 +679,26 @@ const crc32 = (crc, buf, len, pos) => {
|
|
640
679
|
var crc32_1 = crc32;
|
641
680
|
var messages = {
|
642
681
|
2: "need dictionary",
|
682
|
+
/* Z_NEED_DICT 2 */
|
643
683
|
1: "stream end",
|
684
|
+
/* Z_STREAM_END 1 */
|
644
685
|
0: "",
|
686
|
+
/* Z_OK 0 */
|
645
687
|
"-1": "file error",
|
688
|
+
/* Z_ERRNO (-1) */
|
646
689
|
"-2": "stream error",
|
690
|
+
/* Z_STREAM_ERROR (-2) */
|
647
691
|
"-3": "data error",
|
692
|
+
/* Z_DATA_ERROR (-3) */
|
648
693
|
"-4": "insufficient memory",
|
694
|
+
/* Z_MEM_ERROR (-4) */
|
649
695
|
"-5": "buffer error",
|
696
|
+
/* Z_BUF_ERROR (-5) */
|
650
697
|
"-6": "incompatible version"
|
698
|
+
/* Z_VERSION_ERROR (-6) */
|
651
699
|
};
|
652
700
|
var constants$2 = {
|
701
|
+
/* Allowed flush values; see deflate() and inflate() below for details */
|
653
702
|
Z_NO_FLUSH: 0,
|
654
703
|
Z_PARTIAL_FLUSH: 1,
|
655
704
|
Z_SYNC_FLUSH: 2,
|
@@ -657,6 +706,9 @@ var constants$2 = {
|
|
657
706
|
Z_FINISH: 4,
|
658
707
|
Z_BLOCK: 5,
|
659
708
|
Z_TREES: 6,
|
709
|
+
/* Return codes for the compression/decompression functions. Negative values
|
710
|
+
* are errors, positive values are used for special but normal events.
|
711
|
+
*/
|
660
712
|
Z_OK: 0,
|
661
713
|
Z_STREAM_END: 1,
|
662
714
|
Z_NEED_DICT: 2,
|
@@ -665,6 +717,8 @@ var constants$2 = {
|
|
665
717
|
Z_DATA_ERROR: -3,
|
666
718
|
Z_MEM_ERROR: -4,
|
667
719
|
Z_BUF_ERROR: -5,
|
720
|
+
//Z_VERSION_ERROR: -6,
|
721
|
+
/* compression levels */
|
668
722
|
Z_NO_COMPRESSION: 0,
|
669
723
|
Z_BEST_SPEED: 1,
|
670
724
|
Z_BEST_COMPRESSION: 9,
|
@@ -674,10 +728,14 @@ var constants$2 = {
|
|
674
728
|
Z_RLE: 3,
|
675
729
|
Z_FIXED: 4,
|
676
730
|
Z_DEFAULT_STRATEGY: 0,
|
731
|
+
/* Possible values of the data_type field (though see inflate()) */
|
677
732
|
Z_BINARY: 0,
|
678
733
|
Z_TEXT: 1,
|
734
|
+
//Z_ASCII: 1, // = Z_TEXT (deprecated)
|
679
735
|
Z_UNKNOWN: 2,
|
736
|
+
/* The deflate compression method */
|
680
737
|
Z_DEFLATED: 8
|
738
|
+
//Z_NULL: null // Use -1 or null inline, depending on var type
|
681
739
|
};
|
682
740
|
const { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;
|
683
741
|
const {
|
@@ -1195,16 +1253,27 @@ function Config(good_length, max_lazy, nice_length, max_chain, func) {
|
|
1195
1253
|
this.func = func;
|
1196
1254
|
}
|
1197
1255
|
const configuration_table = [
|
1256
|
+
/* good lazy nice chain */
|
1198
1257
|
new Config(0, 0, 0, 0, deflate_stored),
|
1258
|
+
/* 0 store only */
|
1199
1259
|
new Config(4, 4, 8, 4, deflate_fast),
|
1260
|
+
/* 1 max speed, no lazy matches */
|
1200
1261
|
new Config(4, 5, 16, 8, deflate_fast),
|
1262
|
+
/* 2 */
|
1201
1263
|
new Config(4, 6, 32, 32, deflate_fast),
|
1264
|
+
/* 3 */
|
1202
1265
|
new Config(4, 4, 16, 16, deflate_slow),
|
1266
|
+
/* 4 lazy matches */
|
1203
1267
|
new Config(8, 16, 32, 32, deflate_slow),
|
1268
|
+
/* 5 */
|
1204
1269
|
new Config(8, 16, 128, 128, deflate_slow),
|
1270
|
+
/* 6 */
|
1205
1271
|
new Config(8, 32, 128, 256, deflate_slow),
|
1272
|
+
/* 7 */
|
1206
1273
|
new Config(32, 128, 258, 1024, deflate_slow),
|
1274
|
+
/* 8 */
|
1207
1275
|
new Config(32, 258, 258, 4096, deflate_slow)
|
1276
|
+
/* 9 max compression */
|
1208
1277
|
];
|
1209
1278
|
const lm_init = (s) => {
|
1210
1279
|
s.window_size = 2 * s.w_size;
|
@@ -2247,6 +2316,7 @@ const CODES$1 = 0;
|
|
2247
2316
|
const LENS$1 = 1;
|
2248
2317
|
const DISTS$1 = 2;
|
2249
2318
|
const lbase = new Uint16Array([
|
2319
|
+
/* Length codes 257..285 base */
|
2250
2320
|
3,
|
2251
2321
|
4,
|
2252
2322
|
5,
|
@@ -2280,6 +2350,7 @@ const lbase = new Uint16Array([
|
|
2280
2350
|
0
|
2281
2351
|
]);
|
2282
2352
|
const lext = new Uint8Array([
|
2353
|
+
/* Length codes 257..285 extra */
|
2283
2354
|
16,
|
2284
2355
|
16,
|
2285
2356
|
16,
|
@@ -2313,6 +2384,7 @@ const lext = new Uint8Array([
|
|
2313
2384
|
78
|
2314
2385
|
]);
|
2315
2386
|
const dbase = new Uint16Array([
|
2387
|
+
/* Distance codes 0..29 base */
|
2316
2388
|
1,
|
2317
2389
|
2,
|
2318
2390
|
3,
|
@@ -2347,6 +2419,7 @@ const dbase = new Uint16Array([
|
|
2347
2419
|
0
|
2348
2420
|
]);
|
2349
2421
|
const dext = new Uint8Array([
|
2422
|
+
/* Distance codes 0..29 extra */
|
2350
2423
|
16,
|
2351
2424
|
16,
|
2352
2425
|
16,
|
@@ -2799,7 +2872,10 @@ const inflate$2 = (strm, flush) => {
|
|
2799
2872
|
const hbuf = new Uint8Array(4);
|
2800
2873
|
let opts;
|
2801
2874
|
let n;
|
2802
|
-
const order =
|
2875
|
+
const order = (
|
2876
|
+
/* permutation of code lengths */
|
2877
|
+
new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
|
2878
|
+
);
|
2803
2879
|
if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
|
2804
2880
|
return Z_STREAM_ERROR$1;
|
2805
2881
|
}
|
@@ -2848,7 +2924,8 @@ const inflate$2 = (strm, flush) => {
|
|
2848
2924
|
if (state.head) {
|
2849
2925
|
state.head.done = false;
|
2850
2926
|
}
|
2851
|
-
if (!(state.wrap & 1) ||
|
2927
|
+
if (!(state.wrap & 1) || /* check if zlib header allowed */
|
2928
|
+
(((hold & 255) << 8) + (hold >> 8)) % 31) {
|
2852
2929
|
strm.msg = "incorrect header check";
|
2853
2930
|
state.mode = BAD;
|
2854
2931
|
break;
|
@@ -2988,8 +3065,11 @@ const inflate$2 = (strm, flush) => {
|
|
2988
3065
|
state.head.extra.set(
|
2989
3066
|
input.subarray(
|
2990
3067
|
next,
|
3068
|
+
// extra field is limited to 65536 bytes
|
3069
|
+
// - no need for additional size check
|
2991
3070
|
next + copy
|
2992
3071
|
),
|
3072
|
+
/*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
|
2993
3073
|
len
|
2994
3074
|
);
|
2995
3075
|
}
|
@@ -3604,7 +3684,8 @@ const inflate$2 = (strm, flush) => {
|
|
3604
3684
|
strm.total_out += _out;
|
3605
3685
|
state.total += _out;
|
3606
3686
|
if (_out) {
|
3607
|
-
strm.adler = state.check =
|
3687
|
+
strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
|
3688
|
+
state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out);
|
3608
3689
|
}
|
3609
3690
|
_out = left;
|
3610
3691
|
if ((state.flags ? hold : zswap32(hold)) !== state.check) {
|
@@ -3664,7 +3745,8 @@ const inflate$2 = (strm, flush) => {
|
|
3664
3745
|
strm.total_out += _out;
|
3665
3746
|
state.total += _out;
|
3666
3747
|
if (state.wrap && _out) {
|
3667
|
-
strm.adler = state.check =
|
3748
|
+
strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
|
3749
|
+
state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out);
|
3668
3750
|
}
|
3669
3751
|
strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
|
3670
3752
|
if ((_in === 0 && _out === 0 || flush === Z_FINISH$1) && ret === Z_OK$1) {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Vitessce.d.ts","sourceRoot":"","sources":["../src/Vitessce.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,8CA8DlC"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
/* eslint-disable max-len */
|
3
|
+
import { useMemo } from 'react';
|
4
|
+
import { VitS, logConfig, } from '@vitessce/vit-s';
|
5
|
+
import { upgradeAndParse, } from '@vitessce/schemas';
|
6
|
+
import { baseViewTypes, baseFileTypes, baseJointFileTypes, baseCoordinationTypes, } from './base-plugins.js';
|
7
|
+
export function Vitessce(props) {
|
8
|
+
const { config, onConfigUpgrade, pluginViewTypes: pluginViewTypesProp, pluginFileTypes: pluginFileTypesProp, pluginCoordinationTypes: pluginCoordinationTypesProp, pluginJointFileTypes: pluginJointFileTypesProp, } = props;
|
9
|
+
// If config.uid exists, then use it for hook dependencies to detect changes
|
10
|
+
// (controlled component case). If not, then use the config object itself
|
11
|
+
// and assume the un-controlled component case.
|
12
|
+
const configKey = config?.uid || config;
|
13
|
+
const configVersion = config?.version;
|
14
|
+
const [configOrWarning, success] = useMemo(() => {
|
15
|
+
try {
|
16
|
+
logConfig(config, 'pre-upgrade view config');
|
17
|
+
const validConfig = upgradeAndParse(config, onConfigUpgrade);
|
18
|
+
return [validConfig, true];
|
19
|
+
}
|
20
|
+
catch (e) {
|
21
|
+
console.error(e);
|
22
|
+
return [
|
23
|
+
{
|
24
|
+
title: 'Config validation or upgrade failed.',
|
25
|
+
unformatted: e.message,
|
26
|
+
},
|
27
|
+
false,
|
28
|
+
];
|
29
|
+
}
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
31
|
+
}, [configKey, configVersion]);
|
32
|
+
const mergedPluginViewTypes = useMemo(() => ([
|
33
|
+
...baseViewTypes, ...(pluginViewTypesProp || []),
|
34
|
+
]), [pluginViewTypesProp]);
|
35
|
+
const mergedPluginFileTypes = useMemo(() => ([
|
36
|
+
...baseFileTypes, ...(pluginFileTypesProp || []),
|
37
|
+
]), [pluginFileTypesProp]);
|
38
|
+
const mergedPluginJointFileTypes = useMemo(() => ([
|
39
|
+
...baseJointFileTypes, ...(pluginJointFileTypesProp || []),
|
40
|
+
]), [pluginJointFileTypesProp]);
|
41
|
+
const mergedPluginCoordinationTypes = useMemo(() => ([
|
42
|
+
...baseCoordinationTypes, ...(pluginCoordinationTypesProp || []),
|
43
|
+
]), [pluginCoordinationTypesProp]);
|
44
|
+
return (_jsx(VitS, { ...props, config: configOrWarning, viewTypes: mergedPluginViewTypes, fileTypes: mergedPluginFileTypes, jointFileTypes: mergedPluginJointFileTypes, coordinationTypes: mergedPluginCoordinationTypes, warning: (success ? null : configOrWarning) }));
|
45
|
+
}
|