@tissuumaps/render 0.1.0-beta.1 → 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 CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 0.1.0-beta.1
4
12
 
5
13
  ### 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
- const tileSource = await Promise.resolve(tiledImageOptions.tileSource);
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tissuumaps/render",
3
- "version": "0.1.0-beta.1",
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
- "openseadragon": "^6.1.1",
32
- "@tissuumaps/core": "^0.1.0-beta.1"
31
+ "@tissuumaps/core": "^0.1.0-beta.2",
32
+ "openseadragon": "^6.1.1"
33
33
  },
34
34
  "peerDependencies": {
35
- "openseadragon": "^6.1.1",
36
- "@tissuumaps/core": "^0.1.0-beta.1"
35
+ "@tissuumaps/core": "^0.1.0-beta.2",
36
+ "openseadragon": "^6.1.1"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"