vitessce 3.6.3__py3-none-any.whl → 3.6.4__py3-none-any.whl

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.
vitessce/widget.py CHANGED
@@ -163,7 +163,7 @@ const { createRoot } = await importWithMap("react-dom/client", importMap);
163
163
  const e = React.createElement;
164
164
 
165
165
  function isAbsoluteUrl(s) {
166
- return s.startsWith('http://') || s.startsWith('https://');
166
+ return s?.startsWith('http://') || s?.startsWith('https://');
167
167
  }
168
168
  const WORKSPACES_URL_KEYWORD = 'https://workspaces-pt';
169
169
  const OPTIONS_URL_KEYS = ['offsetsUrl', 'refSpecUrl'];
@@ -201,7 +201,7 @@ function prependBaseUrl(config, proxy, hasHostName) {
201
201
  ...d,
202
202
  files: d.files.map(f => {
203
203
  const updatedFileDef = { ...f };
204
- if (!isAbsoluteUrl(f.url)) {
204
+ if (f.url && !isAbsoluteUrl(f.url) ) {
205
205
  // Update the main file URL if necessary.
206
206
  updatedFileDef.url = `${origin}${baseUrl}${f.url}`;
207
207
  }
@@ -214,6 +214,28 @@ function prependBaseUrl(config, proxy, hasHostName) {
214
214
  updatedOptions[key] = `${origin}${baseUrl}${optionValue}`;
215
215
  }
216
216
  });
217
+
218
+ // Update image URLs if they exist
219
+ if ('images' in f.options && Array.isArray(f.options.images)) {
220
+ const updatedImages = f.options.images.map(image => {
221
+ const updatedImage = { ...image };
222
+
223
+ if (image.url && !isAbsoluteUrl(image.url)) {
224
+ updatedImage.url = `${origin}${baseUrl}${image.url}`;
225
+ }
226
+
227
+ const metadata = { ...image.metadata };
228
+ if (metadata?.omeTiffOffsetsUrl && !isAbsoluteUrl(metadata.omeTiffOffsetsUrl)) {
229
+ metadata.omeTiffOffsetsUrl = `${origin}${baseUrl}${metadata.omeTiffOffsetsUrl}`;
230
+ }
231
+
232
+ updatedImage.metadata = metadata;
233
+
234
+ return updatedImage;
235
+ });
236
+
237
+ updatedOptions.images = updatedImages;
238
+ }
217
239
  updatedFileDef.options = updatedOptions;
218
240
  }
219
241
  return updatedFileDef;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vitessce
3
- Version: 3.6.3
3
+ Version: 3.6.4
4
4
  Summary: Jupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce
5
5
  Project-URL: repository, https://github.com/vitessce/vitessce-python
6
6
  Author-email: Mark Keller <mark_keller@hms.harvard.edu>
@@ -8,7 +8,7 @@ vitessce/repr.py,sha256=qMmefmZ3E-3sRVxeI5q1DTZnfuwbXKiA85eyqk5MCT4,2287
8
8
  vitessce/responses.py,sha256=Z6Wo4AXN-RyzmxMPhSuhpIsHTItHM4GyIgMLGoVEYcU,339
9
9
  vitessce/routes.py,sha256=U8T-L-3QCD_tAbPF8LsUlSMhPWNbyzbLNUnxP9Z9s9o,2140
10
10
  vitessce/utils.py,sha256=obzjj65qsagu60_yuhGc-0jmHO-BW0Y-bDs0FgrBqLY,981
11
- vitessce/widget.py,sha256=OX9L6mnliYh2j5jQo_BcDYRCgccdYpgJqEOQzybZQ9I,33543
11
+ vitessce/widget.py,sha256=gvmfqTy99B7oafSIXM33x46q_5vXENwGd_hxOUA3nRY,34575
12
12
  vitessce/wrappers.py,sha256=garL6KfL5hEqGBQpf3NV_ZsZhaV_-RN1GrCmA1Fc_1I,75557
13
13
  vitessce/data_utils/__init__.py,sha256=3mWi1lMjoj4_dNbhMOvyE-HEJu0qpMzcmkhfz_5T6n8,361
14
14
  vitessce/data_utils/anndata.py,sha256=iLa5-bRezHgBzL_XCHO7w0pc0RQ4urzZbDsqJbBYeCk,10668
@@ -18,7 +18,7 @@ vitessce/data_utils/ome.py,sha256=tJHlSHbZTxpjRgYfTxbYMS9zSnSHQwJVWPZpREAvHtU,55
18
18
  vitessce/widget_plugins/__init__.py,sha256=lto2GXnc7KwjIoT-jvzyRYLj0XTJG3uxoX45Hc9EcWA,82
19
19
  vitessce/widget_plugins/demo_plugin.py,sha256=14S7nOxdlKSxIHw9DUcNCN83NE_U1EMPy2D4k0FDues,1797
20
20
  vitessce/widget_plugins/spatial_query.py,sha256=CYxvmMT1Je_jguikPROQxlegkPgIIzemKGbZSJfZMyI,12314
21
- vitessce-3.6.3.dist-info/METADATA,sha256=P0ImyRQlP8PlT9aJJfVJRMyJG3AvDF7FyYmoR-orMko,9826
22
- vitessce-3.6.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- vitessce-3.6.3.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
- vitessce-3.6.3.dist-info/RECORD,,
21
+ vitessce-3.6.4.dist-info/METADATA,sha256=sRseqTRfGZiMcogKRMZutfIMsMPcYPAIL0SliFhg8UU,9826
22
+ vitessce-3.6.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ vitessce-3.6.4.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
+ vitessce-3.6.4.dist-info/RECORD,,