@tissuumaps/render 0.1.0-beta.0 → 0.1.0-beta.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.
- package/CHANGELOG.md +20 -0
- package/dist/index.js +10 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @tissuumaps/render
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#295](https://github.com/TissUUmaps/TissUUmaps/pull/295) [`67b9236`](https://github.com/TissUUmaps/TissUUmaps/commit/67b92362506385171c41b0b9356a23c463303d29) Thanks [@jwindhager](https://github.com/jwindhager)! - Plain images can be opened from a URL or path ([#274](https://github.com/TissUUmaps/TissUUmaps/issues/274)): an image data source's `source` with a PNG, JPEG or WebP file extension, or a `data:image/` URL, is opened as a plain image, also from the workspace; any other `source` is handed to OpenSeadragon as a tile source descriptor, which cannot be opened from the workspace. The data source `type` becomes `image` (was `openseadragon`) and its `tileSourceConfig` field becomes `tileSource`, which takes the URL of a descriptor or an inline tile source configuration and takes precedence over `source`. Inline tile source configurations taken from a project no longer fail to open because OpenSeadragon writes into them. Projects using `openseadragon` data sources have to be updated.
|
|
8
|
+
- Updated dependencies [[`15a214a`](https://github.com/TissUUmaps/TissUUmaps/commit/15a214a7950a1e9aa605ca5445cc4273b826ca2d)]:
|
|
9
|
+
- @tissuumaps/core@0.1.0-beta.2
|
|
10
|
+
|
|
11
|
+
## 0.1.0-beta.1
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#253](https://github.com/TissUUmaps/TissUUmaps/pull/253) [`8acd194`](https://github.com/TissUUmaps/TissUUmaps/commit/8acd1946245c89c961af2857e13ae373bc256d62) Thanks [@jwindhager](https://github.com/jwindhager)! - Group-by palettes (colors and markers without a map) now assign their values by group position, in the order the groups first appear in the table column, instead of by hashing the group names; random colors are still hashed. Projects that group by a palette show different colors or markers than before. `ConfigUtils.createGroupValueGetter` takes the ordered groups alongside the palette, and the new `TableUtils.loadGroupCounts` lists them.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#253](https://github.com/TissUUmaps/TissUUmaps/pull/253) [`8acd194`](https://github.com/TissUUmaps/TissUUmaps/commit/8acd1946245c89c961af2857e13ae373bc256d62) Thanks [@jwindhager](https://github.com/jwindhager)! - `TableData.loadUniqueValueCounts` and `TableData.loadValueRange` are now optional: table data only implements them if it can determine the counts or the range more cheaply than by loading the column (e.g. from file metadata). Callers use the new `TableUtils.loadUniqueValueCounts` and `TableUtils.loadValueRange`, which fall back to the loaded column values (see `TableUtils.computeValueRange`). CSV tables no longer implement either method, and Parquet and hierarchical (AnnData) tables no longer implement `loadUniqueValueCounts`. Unless the table data determines them itself, the app now computes unique value counts and value ranges from the column values it has already loaded, instead of loading the column again.
|
|
20
|
+
- Updated dependencies [[`62b79c2`](https://github.com/TissUUmaps/TissUUmaps/commit/62b79c2218ea5419972553b43cc217084d9a9d23), [`8acd194`](https://github.com/TissUUmaps/TissUUmaps/commit/8acd1946245c89c961af2857e13ae373bc256d62), [`8acd194`](https://github.com/TissUUmaps/TissUUmaps/commit/8acd1946245c89c961af2857e13ae373bc256d62), [`cb49f75`](https://github.com/TissUUmaps/TissUUmaps/commit/cb49f75bb87c17d06198562d53e4ab17cd89aaf5)]:
|
|
21
|
+
- @tissuumaps/core@0.1.0-beta.1
|
|
22
|
+
|
|
3
23
|
## 0.1.0-beta.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -1011,8 +1011,12 @@ var OpenSeadragonContext = class OpenSeadragonContext {
|
|
|
1011
1011
|
*/
|
|
1012
1012
|
async _openTileSource(tiledImageOptions, options) {
|
|
1013
1013
|
const { signal } = options ?? {};
|
|
1014
|
-
|
|
1014
|
+
let tileSource = await Promise.resolve(tiledImageOptions.tileSource);
|
|
1015
1015
|
signal?.throwIfAborted();
|
|
1016
|
+
if (typeof tileSource === "object" && tileSource !== null) {
|
|
1017
|
+
const prototype = Object.getPrototypeOf(tileSource);
|
|
1018
|
+
if (prototype === Object.prototype || prototype === null) tileSource = { ...tileSource };
|
|
1019
|
+
}
|
|
1016
1020
|
try {
|
|
1017
1021
|
const { source: openedTileSource } = await this.viewer.instantiateTileSourceClass({
|
|
1018
1022
|
...tiledImageOptions,
|
|
@@ -2478,7 +2482,7 @@ var ColorResolver = class ColorResolver {
|
|
|
2478
2482
|
return ColorResolver.createUniformColors(ids.length, defaultColor, { align });
|
|
2479
2483
|
}
|
|
2480
2484
|
const data = await loadTable(config.from.table, { signal });
|
|
2481
|
-
const valueRange = config.from.range ?? await
|
|
2485
|
+
const valueRange = config.from.range ?? await TableUtils.loadValueRange(data, config.from.column, { signal });
|
|
2482
2486
|
const packedColors = ColorResolver.createColorBuffer(ids.length, { align });
|
|
2483
2487
|
await TableUtils.fillFromTableValues(packedColors, data, ids, config.from.column, defaultColor, (value) => ColorResolver.parseColor(value, valueRange, colorPalette), (color) => ColorResolver.packColor(color), { signal });
|
|
2484
2488
|
return packedColors;
|
|
@@ -2509,8 +2513,9 @@ var ColorResolver = class ColorResolver {
|
|
|
2509
2513
|
return ColorResolver.createUniformColors(ids.length, defaultColor, { align });
|
|
2510
2514
|
}
|
|
2511
2515
|
const data = await loadTable(config.groupBy.table, { signal });
|
|
2516
|
+
const groupCounts = colorMap === void 0 ? await TableUtils.loadGroupCounts(data, config.groupBy.column, { signal }) : void 0;
|
|
2512
2517
|
const packedColors = ColorResolver.createColorBuffer(ids.length, { align });
|
|
2513
|
-
await TableUtils.fillFromTableGroups(packedColors, data, ids, config.groupBy.column, colorMap?.default ?? defaultColor, ConfigUtils.createGroupValueGetter(config, colorMap, defaultColor, colorPalette?.colors), (color) => ColorResolver.packColor(color), { signal });
|
|
2518
|
+
await TableUtils.fillFromTableGroups(packedColors, data, ids, config.groupBy.column, colorMap?.default ?? defaultColor, ConfigUtils.createGroupValueGetter(config, colorMap, defaultColor, colorPalette?.colors, groupCounts?.keys()), (color) => ColorResolver.packColor(color), { signal });
|
|
2514
2519
|
return packedColors;
|
|
2515
2520
|
}
|
|
2516
2521
|
/**
|
|
@@ -3632,8 +3637,9 @@ var MarkerResolver = class MarkerResolver {
|
|
|
3632
3637
|
return MarkerResolver.createUniformMarkers(ids.length, defaultMarker, { align });
|
|
3633
3638
|
}
|
|
3634
3639
|
const data = await loadTable(config.groupBy.table, { signal });
|
|
3640
|
+
const groupCounts = markerMap === void 0 ? await TableUtils.loadGroupCounts(data, config.groupBy.column, { signal }) : void 0;
|
|
3635
3641
|
const packedMarkers = MarkerResolver.createMarkerBuffer(ids.length, { align });
|
|
3636
|
-
await TableUtils.fillFromTableGroups(packedMarkers, data, ids, config.groupBy.column, markerMap?.default ?? defaultMarker, ConfigUtils.createGroupValueGetter(config, markerMap, defaultMarker, markerPalette), (marker) => MarkerResolver.packMarker(marker), { signal });
|
|
3642
|
+
await TableUtils.fillFromTableGroups(packedMarkers, data, ids, config.groupBy.column, markerMap?.default ?? defaultMarker, ConfigUtils.createGroupValueGetter(config, markerMap, defaultMarker, markerPalette, groupCounts?.keys()), (marker) => MarkerResolver.packMarker(marker), { signal });
|
|
3637
3643
|
return packedMarkers;
|
|
3638
3644
|
}
|
|
3639
3645
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tissuumaps/render",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
4
|
"description": "Rendering backends for TissUUmaps images, labels, points and shapes",
|
|
5
5
|
"homepage": "https://tissuumaps.github.io/TissUUmaps/",
|
|
6
6
|
"bugs": "https://github.com/TissUUmaps/TissUUmaps/issues",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"gl-matrix": "^3.4.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"@tissuumaps/core": "^0.1.0-beta.2",
|
|
32
|
+
"openseadragon": "^6.1.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"@tissuumaps/core": "^0.1.0-beta.2",
|
|
36
|
+
"openseadragon": "^6.1.1"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|