@@ -244,6 +244,15 @@ def get_uid_str(uid):
244244 signal: AbortSignal.timeout(invokeTimeout),
245245 });
246246 if (!data.success) return undefined;
247+
248+ if (key.includes("spatialdata_attrs") && key.endsWith("0") && !ArrayBuffer.isView(buffers[0].buffer)) {
249+ // For some reason, the Zarrita.js UnicodeStringArray does not seem to work with
250+ // ArrayBuffers (throws a TypeError), so here we convert to Uint8Array if needed.
251+ // This error is occurring specifically for the arr.getChunk call within the AnnDataSource._loadString function.
252+ // TODO: figure out a more long-term solution.
253+ return new Uint8Array(buffers[0].buffer);
254+ }
255+
247256 return buffers[0].buffer;
248257 },
249258 }
@@ -454,7 +463,7 @@ class VitessceWidget(anywidget.AnyWidget):
454463
455464 next_port = DEFAULT_PORT
456465
457- js_package_version = Unicode ('3.4.14 ' ).tag (sync = True )
466+ js_package_version = Unicode ('3.5.4 ' ).tag (sync = True )
458467 js_dev_mode = Bool (False ).tag (sync = True )
459468 custom_js_url = Unicode ('' ).tag (sync = True )
460469 plugin_esm = List (trait = Unicode ('' ), default_value = []).tag (sync = True )
@@ -463,7 +472,7 @@ class VitessceWidget(anywidget.AnyWidget):
463472
464473 store_urls = List (trait = Unicode ('' ), default_value = []).tag (sync = True )
465474
466- def __init__ (self , config , height = 600 , theme = 'auto' , uid = None , port = None , proxy = False , js_package_version = '3.4.14 ' , js_dev_mode = False , custom_js_url = '' , plugins = None , remount_on_uid_change = True , invoke_timeout = 30000 ):
475+ def __init__ (self , config , height = 600 , theme = 'auto' , uid = None , port = None , proxy = False , js_package_version = '3.5.4 ' , js_dev_mode = False , custom_js_url = '' , plugins = None , remount_on_uid_change = True , invoke_timeout = 30000 ):
467476 """
468477 Construct a new Vitessce widget.
469478
@@ -576,7 +585,7 @@ def _plugin_command(self, params, buffers):
576585# Launch Vitessce using plain HTML representation (no ipywidgets)
577586
578587
579- def ipython_display (config , height = 600 , theme = 'auto' , base_url = None , host_name = None , uid = None , port = None , proxy = False , js_package_version = '3.4.14 ' , js_dev_mode = False , custom_js_url = '' , plugin_esm = DEFAULT_PLUGIN_ESM , remount_on_uid_change = True ):
588+ def ipython_display (config , height = 600 , theme = 'auto' , base_url = None , host_name = None , uid = None , port = None , proxy = False , js_package_version = '3.5.4 ' , js_dev_mode = False , custom_js_url = '' , plugin_esm = DEFAULT_PLUGIN_ESM , remount_on_uid_change = True ):
580589 from IPython .display import display , HTML
581590 uid_str = "vitessce" + get_uid_str (uid )
582591
0 commit comments