@vitessce/statistical-plots 3.6.18 → 3.7.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-DaFHdnIz.js → deflate-DgQl9TkB.js} +1 -1
- package/dist/{index-C8VlTSXb.js → index-CiYiZlc7.js} +53 -30
- package/dist/index.js +1 -1
- package/dist/{jpeg-DI6r1Qu1.js → jpeg-DEScdVti.js} +1 -1
- package/dist/{lerc-CSlbF9fX.js → lerc-DTqrdnG3.js} +1 -1
- package/dist/{lzw-H16ZlUv0.js → lzw-DD1Tdz8g.js} +1 -1
- package/dist/{packbits-3-1YYdxN.js → packbits-DQKhpi_i.js} +1 -1
- package/dist/{raw-BjsOfrZJ.js → raw-FFiWm3QN.js} +1 -1
- package/dist/{webimage-U9BOPX4n.js → webimage-CsGQM3x-.js} +1 -1
- package/package.json +10 -10
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
2
|
-
import { B as BaseDecoder } from "./index-
|
2
|
+
import { B as BaseDecoder } from "./index-CiYiZlc7.js";
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
4
4
|
decodeBlock(buffer) {
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
@@ -653,6 +653,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
653
653
|
CoordinationType$1.SPATIAL_ROTATION_Y,
|
654
654
|
CoordinationType$1.SPATIAL_ROTATION_Z,
|
655
655
|
CoordinationType$1.SPATIAL_AXIS_FIXED,
|
656
|
+
CoordinationType$1.SPATIAL_ROTATION_ORBIT,
|
656
657
|
CoordinationType$1.SPATIAL_ORBIT_AXIS,
|
657
658
|
CoordinationType$1.SPATIAL_ZOOM,
|
658
659
|
CoordinationType$1.OBS_FILTER,
|
@@ -660,14 +661,11 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
660
661
|
CoordinationType$1.OBS_SET_SELECTION,
|
661
662
|
CoordinationType$1.OBS_SET_FILTER,
|
662
663
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
663
|
-
CoordinationType$1.OBS_SET_COLOR,
|
664
664
|
CoordinationType$1.OBS_TYPE,
|
665
|
-
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
666
665
|
CoordinationType$1.OBS_SET_COLOR,
|
667
666
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
668
|
-
CoordinationType$1.OBS_SET_SELECTION,
|
669
667
|
CoordinationType$1.EMBEDDING_TYPE,
|
670
|
-
CoordinationType$1.
|
668
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
671
669
|
CoordinationType$1.TOOLTIPS_VISIBLE
|
672
670
|
],
|
673
671
|
[ViewType$1.SCATTERPLOT]: [
|
@@ -177645,6 +177643,8 @@ const PIXELATED_TEXTURE_PARAMETERS = {
|
|
177645
177643
|
[GL$1.TEXTURE_WRAP_T]: GL$1.CLAMP_TO_EDGE
|
177646
177644
|
};
|
177647
177645
|
const GLSL_COLORMAPS = [
|
177646
|
+
// NOTE: the ordering of these is important,
|
177647
|
+
// as the shader code in bitmask-layer-beta-shaders hardcodes their indices.
|
177648
177648
|
"plasma",
|
177649
177649
|
"viridis",
|
177650
177650
|
"jet",
|
@@ -178737,22 +178737,22 @@ function addDecoder(cases2, importFn) {
|
|
178737
178737
|
}
|
178738
178738
|
cases2.forEach((c2) => registry$1.set(c2, importFn));
|
178739
178739
|
}
|
178740
|
-
addDecoder([void 0, 1], () => import("./raw-
|
178741
|
-
addDecoder(5, () => import("./lzw-
|
178740
|
+
addDecoder([void 0, 1], () => import("./raw-FFiWm3QN.js").then((m2) => m2.default));
|
178741
|
+
addDecoder(5, () => import("./lzw-DD1Tdz8g.js").then((m2) => m2.default));
|
178742
178742
|
addDecoder(6, () => {
|
178743
178743
|
throw new Error("old style JPEG compression is not supported.");
|
178744
178744
|
});
|
178745
|
-
addDecoder(7, () => import("./jpeg-
|
178746
|
-
addDecoder([8, 32946], () => import("./deflate-
|
178747
|
-
addDecoder(32773, () => import("./packbits-
|
178745
|
+
addDecoder(7, () => import("./jpeg-DEScdVti.js").then((m2) => m2.default));
|
178746
|
+
addDecoder([8, 32946], () => import("./deflate-DgQl9TkB.js").then((m2) => m2.default));
|
178747
|
+
addDecoder(32773, () => import("./packbits-DQKhpi_i.js").then((m2) => m2.default));
|
178748
178748
|
addDecoder(
|
178749
178749
|
34887,
|
178750
|
-
() => import("./lerc-
|
178750
|
+
() => import("./lerc-DTqrdnG3.js").then(async (m2) => {
|
178751
178751
|
await m2.zstd.init();
|
178752
178752
|
return m2;
|
178753
178753
|
}).then((m2) => m2.default)
|
178754
178754
|
);
|
178755
|
-
addDecoder(50001, () => import("./webimage-
|
178755
|
+
addDecoder(50001, () => import("./webimage-CsGQM3x-.js").then((m2) => m2.default));
|
178756
178756
|
function decodeRowAcc(row, stride) {
|
178757
178757
|
let length2 = row.length - stride;
|
178758
178758
|
let offset2 = 0;
|
@@ -188535,7 +188535,7 @@ uniform float channelOpacities[7];
|
|
188535
188535
|
uniform bool channelIsStaticColorMode[7]; // TODO: should this be a single float?
|
188536
188536
|
uniform bool channelIsSetColorMode[7]; // TODO: should this be a single float?
|
188537
188537
|
|
188538
|
-
|
188538
|
+
uniform int channelColormapFuncIndices[7];
|
188539
188539
|
uniform float channelColormapRangeStarts[7];
|
188540
188540
|
uniform float channelColormapRangeEnds[7];
|
188541
188541
|
|
@@ -188601,7 +188601,30 @@ vec3 sampleAndGetData(sampler2D dataTex, vec2 coord, bool isFilled, float stroke
|
|
188601
188601
|
return vec3(clampedSampledData * float(isOn), sampledData, float(isEdge));
|
188602
188602
|
}
|
188603
188603
|
|
188604
|
-
|
188604
|
+
vec3 colormapFunc(float clampedScaledExpressionValue, int colormapIndex) {
|
188605
|
+
// Map indices of GLSL_COLORMAPS array to their function calls.
|
188606
|
+
// GLSL_COLORMAPS is defined in ./constants.js and needs to stay manually synced.
|
188607
|
+
// 0: 'plasma',
|
188608
|
+
// 1: 'viridis',
|
188609
|
+
// 2: 'jet',
|
188610
|
+
// 3: 'greys',
|
188611
|
+
|
188612
|
+
if (colormapIndex <= 0) {
|
188613
|
+
// This should also match -1, to account for a failed Array.indexOf lookup.
|
188614
|
+
return plasma(clampedScaledExpressionValue).rgb;
|
188615
|
+
}
|
188616
|
+
if (colormapIndex == 1) {
|
188617
|
+
return viridis(clampedScaledExpressionValue).rgb;
|
188618
|
+
}
|
188619
|
+
if (colormapIndex == 2) {
|
188620
|
+
return jet(clampedScaledExpressionValue).rgb;
|
188621
|
+
}
|
188622
|
+
if (colormapIndex == 3) {
|
188623
|
+
return greys(clampedScaledExpressionValue).rgb;
|
188624
|
+
}
|
188625
|
+
}
|
188626
|
+
|
188627
|
+
vec4 dataToColor(vec3 sampledDataAndIsEdge, bool isStaticColorMode, vec3 channelColor, float channelOpacity, float valueOffset, int colormapFuncIndex, float rangeStart, float rangeEnd, bool isSetColorMode, float setColorOffset) {
|
188605
188628
|
float clampedSampledDataAndIsOn = sampledDataAndIsEdge.x;
|
188606
188629
|
float sampledData = sampledDataAndIsEdge.y;
|
188607
188630
|
float isEdge = sampledDataAndIsEdge.z;
|
@@ -188645,7 +188668,7 @@ vec4 dataToColor(vec3 sampledDataAndIsEdge, bool isStaticColorMode, vec3 channel
|
|
188645
188668
|
}
|
188646
188669
|
|
188647
188670
|
|
188648
|
-
vec4 sampledColor = (1. - (float(isStaticColorMode) + float(isSetColorMode))) * vec4(
|
188671
|
+
vec4 sampledColor = (1. - (float(isStaticColorMode) + float(isSetColorMode))) * vec4(colormapFunc(clamp(scaledExpressionValue, 0.0, 1.0), colormapFuncIndex).rgb, channelOpacity) + float(isStaticColorMode) * vec4(channelColor.rgb, channelOpacity) + float(isSetColorMode) * vec4(setColor, channelOpacity);
|
188649
188672
|
// Only return a color if the data is non-zero.
|
188650
188673
|
|
188651
188674
|
return clampedSampledDataAndIsOn * isEdge * sampledColor;
|
@@ -188661,15 +188684,15 @@ void main() {
|
|
188661
188684
|
vec3 dat4 = sampleAndGetData(channel4, vTexCoord, channelsFilled[4], channelStrokeWidths[4], channelsVisible[4]);
|
188662
188685
|
vec3 dat5 = sampleAndGetData(channel5, vTexCoord, channelsFilled[5], channelStrokeWidths[5], channelsVisible[5]);
|
188663
188686
|
vec3 dat6 = sampleAndGetData(channel6, vTexCoord, channelsFilled[6], channelStrokeWidths[6], channelsVisible[6]);
|
188664
|
-
|
188665
|
-
vec4 val0 = dataToColor(dat0, channelIsStaticColorMode[0], color0, channelOpacities[0], valueTexOffsets[0], channelColormapRangeStarts[0], channelColormapRangeEnds[0], channelIsSetColorMode[0], colorTexOffsets[0]);
|
188666
|
-
vec4 val1 = dataToColor(dat1, channelIsStaticColorMode[1], color1, channelOpacities[1], valueTexOffsets[1], channelColormapRangeStarts[1], channelColormapRangeEnds[1], channelIsSetColorMode[1], colorTexOffsets[1]);
|
188667
|
-
vec4 val2 = dataToColor(dat2, channelIsStaticColorMode[2], color2, channelOpacities[2], valueTexOffsets[2], channelColormapRangeStarts[2], channelColormapRangeEnds[2], channelIsSetColorMode[2], colorTexOffsets[2]);
|
188668
|
-
vec4 val3 = dataToColor(dat3, channelIsStaticColorMode[3], color3, channelOpacities[3], valueTexOffsets[3], channelColormapRangeStarts[3], channelColormapRangeEnds[3], channelIsSetColorMode[3], colorTexOffsets[3]);
|
188669
|
-
vec4 val4 = dataToColor(dat4, channelIsStaticColorMode[4], color4, channelOpacities[4], valueTexOffsets[4], channelColormapRangeStarts[4], channelColormapRangeEnds[4], channelIsSetColorMode[4], colorTexOffsets[4]);
|
188670
|
-
vec4 val5 = dataToColor(dat5, channelIsStaticColorMode[5], color5, channelOpacities[5], valueTexOffsets[5], channelColormapRangeStarts[5], channelColormapRangeEnds[5], channelIsSetColorMode[5], colorTexOffsets[5]);
|
188671
|
-
vec4 val6 = dataToColor(dat6, channelIsStaticColorMode[6], color6, channelOpacities[6], valueTexOffsets[6], channelColormapRangeStarts[6], channelColormapRangeEnds[6], channelIsSetColorMode[6], colorTexOffsets[6]);
|
188672
|
-
|
188687
|
+
|
188688
|
+
vec4 val0 = dataToColor(dat0, channelIsStaticColorMode[0], color0, channelOpacities[0], valueTexOffsets[0], channelColormapFuncIndices[0], channelColormapRangeStarts[0], channelColormapRangeEnds[0], channelIsSetColorMode[0], colorTexOffsets[0]);
|
188689
|
+
vec4 val1 = dataToColor(dat1, channelIsStaticColorMode[1], color1, channelOpacities[1], valueTexOffsets[1], channelColormapFuncIndices[1], channelColormapRangeStarts[1], channelColormapRangeEnds[1], channelIsSetColorMode[1], colorTexOffsets[1]);
|
188690
|
+
vec4 val2 = dataToColor(dat2, channelIsStaticColorMode[2], color2, channelOpacities[2], valueTexOffsets[2], channelColormapFuncIndices[2], channelColormapRangeStarts[2], channelColormapRangeEnds[2], channelIsSetColorMode[2], colorTexOffsets[2]);
|
188691
|
+
vec4 val3 = dataToColor(dat3, channelIsStaticColorMode[3], color3, channelOpacities[3], valueTexOffsets[3], channelColormapFuncIndices[3], channelColormapRangeStarts[3], channelColormapRangeEnds[3], channelIsSetColorMode[3], colorTexOffsets[3]);
|
188692
|
+
vec4 val4 = dataToColor(dat4, channelIsStaticColorMode[4], color4, channelOpacities[4], valueTexOffsets[4], channelColormapFuncIndices[4], channelColormapRangeStarts[4], channelColormapRangeEnds[4], channelIsSetColorMode[4], colorTexOffsets[4]);
|
188693
|
+
vec4 val5 = dataToColor(dat5, channelIsStaticColorMode[5], color5, channelOpacities[5], valueTexOffsets[5], channelColormapFuncIndices[5], channelColormapRangeStarts[5], channelColormapRangeEnds[5], channelIsSetColorMode[5], colorTexOffsets[5]);
|
188694
|
+
vec4 val6 = dataToColor(dat6, channelIsStaticColorMode[6], color6, channelOpacities[6], valueTexOffsets[6], channelColormapFuncIndices[6], channelColormapRangeStarts[6], channelColormapRangeEnds[6], channelIsSetColorMode[6], colorTexOffsets[6]);
|
188695
|
+
|
188673
188696
|
// If all of the channels are "empty", then discard this pixel so that it is not considered during picking.
|
188674
188697
|
float emptyDat = 0.;
|
188675
188698
|
if(dat0.x == emptyDat && dat1.x == emptyDat && dat2.x == emptyDat && dat3.x == emptyDat && dat4.x == emptyDat && dat5.x == emptyDat && dat6.x == emptyDat) {
|
@@ -189158,14 +189181,10 @@ const defaultProps$1 = {
|
|
189158
189181
|
class BitmaskLayer2 extends XRLayer {
|
189159
189182
|
// eslint-disable-next-line class-methods-use-this
|
189160
189183
|
getShaders() {
|
189161
|
-
const { colormap } = this.props;
|
189162
189184
|
return {
|
189163
189185
|
fs,
|
189164
189186
|
vs,
|
189165
|
-
modules: [project32, picking]
|
189166
|
-
defines: {
|
189167
|
-
[COLORMAP_SHADER_PLACEHOLDER]: GLSL_COLORMAPS.includes(colormap) ? colormap : GLSL_COLORMAP_DEFAULT
|
189168
|
-
}
|
189187
|
+
modules: [project32, picking]
|
189169
189188
|
};
|
189170
189189
|
}
|
189171
189190
|
/**
|
@@ -189224,8 +189243,6 @@ class BitmaskLayer2 extends XRLayer {
|
|
189224
189243
|
channelOpacities,
|
189225
189244
|
channelColors,
|
189226
189245
|
channelsVisible,
|
189227
|
-
// TODO: use `channelFeatureValueColormaps` in shader,
|
189228
|
-
// figure out how to call multiple GLSL colormap functions
|
189229
189246
|
channelFeatureValueColormaps,
|
189230
189247
|
channelFeatureValueColormapRanges,
|
189231
189248
|
channelIsStaticColorMode,
|
@@ -189286,6 +189303,12 @@ class BitmaskLayer2 extends XRLayer {
|
|
189286
189303
|
// There are six texture entries on the shaders
|
189287
189304
|
MAX_CHANNELS - channelStrokeWidths.length
|
189288
189305
|
),
|
189306
|
+
channelColormapFuncIndices: padWithDefault(
|
189307
|
+
channelFeatureValueColormaps.map((d) => GLSL_COLORMAPS.indexOf(d)),
|
189308
|
+
0,
|
189309
|
+
// There are six texture entries on the shaders
|
189310
|
+
MAX_CHANNELS - channelFeatureValueColormaps.length
|
189311
|
+
),
|
189289
189312
|
channelColormapRangeStarts: padWithDefault(
|
189290
189313
|
channelFeatureValueColormapRanges.map((r3) => (r3 == null ? void 0 : r3[0]) || 0),
|
189291
189314
|
0,
|
package/dist/index.js
CHANGED
@@ -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-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-CiYiZlc7.js";
|
3
3
|
const LercParameters = {
|
4
4
|
AddCompression: 1
|
5
5
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.7.1",
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -28,25 +28,25 @@
|
|
28
28
|
"react-aria": "^3.28.0",
|
29
29
|
"internmap": "^2.0.3",
|
30
30
|
"uuid": "^9.0.0",
|
31
|
-
"@vitessce/styles": "3.
|
32
|
-
"@vitessce/constants-internal": "3.
|
33
|
-
"@vitessce/sets-utils": "3.
|
34
|
-
"@vitessce/utils": "3.
|
35
|
-
"@vitessce/vega": "3.
|
36
|
-
"@vitessce/vit-s": "3.
|
37
|
-
"@vitessce/gl": "3.
|
31
|
+
"@vitessce/styles": "3.7.1",
|
32
|
+
"@vitessce/constants-internal": "3.7.1",
|
33
|
+
"@vitessce/sets-utils": "3.7.1",
|
34
|
+
"@vitessce/utils": "3.7.1",
|
35
|
+
"@vitessce/vega": "3.7.1",
|
36
|
+
"@vitessce/vit-s": "3.7.1",
|
37
|
+
"@vitessce/gl": "3.7.1"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"react": "^18.0.0",
|
41
41
|
"react-dom": "^18.0.0",
|
42
|
-
"vite": "^
|
42
|
+
"vite": "^7.0.0",
|
43
43
|
"vitest": "^3.1.4"
|
44
44
|
},
|
45
45
|
"peerDependencies": {
|
46
46
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
47
47
|
},
|
48
48
|
"scripts": {
|
49
|
-
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.
|
49
|
+
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
|
50
50
|
"test": "pnpm exec vitest --run"
|
51
51
|
},
|
52
52
|
"module": "dist/index.js",
|