@vitessce/vit-s 3.3.4 → 3.3.6

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/index.js CHANGED
@@ -3775,19 +3775,19 @@ function _createClass$6(Constructor, protoProps, staticProps) {
3775
3775
  });
3776
3776
  return Constructor;
3777
3777
  }
3778
- function _setPrototypeOf$8(o, p) {
3779
- _setPrototypeOf$8 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
3778
+ function _setPrototypeOf$7(o, p) {
3779
+ _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
3780
3780
  o2.__proto__ = p2;
3781
3781
  return o2;
3782
3782
  };
3783
- return _setPrototypeOf$8(o, p);
3783
+ return _setPrototypeOf$7(o, p);
3784
3784
  }
3785
- function _inheritsLoose$3(subClass, superClass) {
3785
+ function _inheritsLoose$2(subClass, superClass) {
3786
3786
  subClass.prototype = Object.create(superClass.prototype);
3787
3787
  subClass.prototype.constructor = subClass;
3788
- _setPrototypeOf$8(subClass, superClass);
3788
+ _setPrototypeOf$7(subClass, superClass);
3789
3789
  }
3790
- function _assertThisInitialized$6(self2) {
3790
+ function _assertThisInitialized$5(self2) {
3791
3791
  if (self2 === void 0) {
3792
3792
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3793
3793
  }
@@ -3994,7 +3994,7 @@ var BaseStyleRule = /* @__PURE__ */ function() {
3994
3994
  return BaseStyleRule2;
3995
3995
  }();
3996
3996
  var StyleRule = /* @__PURE__ */ function(_BaseStyleRule) {
3997
- _inheritsLoose$3(StyleRule2, _BaseStyleRule);
3997
+ _inheritsLoose$2(StyleRule2, _BaseStyleRule);
3998
3998
  function StyleRule2(key, style, options) {
3999
3999
  var _this;
4000
4000
  _this = _BaseStyleRule.call(this, key, style, options) || this;
@@ -4002,7 +4002,7 @@ var StyleRule = /* @__PURE__ */ function(_BaseStyleRule) {
4002
4002
  if (selector) {
4003
4003
  _this.selectorText = selector;
4004
4004
  } else if (scoped !== false) {
4005
- _this.id = generateId(_assertThisInitialized$6(_assertThisInitialized$6(_this)), sheet);
4005
+ _this.id = generateId(_assertThisInitialized$5(_assertThisInitialized$5(_this)), sheet);
4006
4006
  _this.selectorText = "." + escape(_this.id);
4007
4007
  }
4008
4008
  return _this;
@@ -4232,7 +4232,7 @@ var pluginKeyframesRule = {
4232
4232
  }
4233
4233
  };
4234
4234
  var KeyframeRule = /* @__PURE__ */ function(_BaseStyleRule) {
4235
- _inheritsLoose$3(KeyframeRule2, _BaseStyleRule);
4235
+ _inheritsLoose$2(KeyframeRule2, _BaseStyleRule);
4236
4236
  function KeyframeRule2() {
4237
4237
  return _BaseStyleRule.apply(this, arguments) || this;
4238
4238
  }
@@ -7381,18 +7381,6 @@ function useIsFocusVisible() {
7381
7381
  ref
7382
7382
  };
7383
7383
  }
7384
- function _setPrototypeOf$7(o, p) {
7385
- _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
7386
- o2.__proto__ = p2;
7387
- return o2;
7388
- };
7389
- return _setPrototypeOf$7(o, p);
7390
- }
7391
- function _inheritsLoose$2(subClass, superClass) {
7392
- subClass.prototype = Object.create(superClass.prototype);
7393
- subClass.prototype.constructor = subClass;
7394
- _setPrototypeOf$7(subClass, superClass);
7395
- }
7396
7384
  const config = {
7397
7385
  disabled: false
7398
7386
  };
@@ -7638,7 +7626,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
7638
7626
  _this$props.onExiting;
7639
7627
  _this$props.onExited;
7640
7628
  _this$props.nodeRef;
7641
- var childProps = _objectWithoutPropertiesLoose$5(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
7629
+ var childProps = _objectWithoutPropertiesLoose$4(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
7642
7630
  return (
7643
7631
  // allows for nested Transitions
7644
7632
  /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
@@ -7842,12 +7830,6 @@ Transition.ENTERING = ENTERING;
7842
7830
  Transition.ENTERED = ENTERED;
7843
7831
  Transition.EXITING = EXITING;
7844
7832
  const Transition$1 = Transition;
7845
- function _assertThisInitialized$5(self2) {
7846
- if (self2 === void 0) {
7847
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7848
- }
7849
- return self2;
7850
- }
7851
7833
  function getChildMapping(children2, mapFn) {
7852
7834
  var mapper = function mapper2(child) {
7853
7835
  return mapFn && isValidElement(child) ? mapFn(child) : child;
@@ -7996,7 +7978,7 @@ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
7996
7978
  }
7997
7979
  if (this.mounted) {
7998
7980
  this.setState(function(state) {
7999
- var children2 = _extends$5({}, state.children);
7981
+ var children2 = _extends$6({}, state.children);
8000
7982
  delete children2[child.key];
8001
7983
  return {
8002
7984
  children: children2
@@ -8005,7 +7987,7 @@ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
8005
7987
  }
8006
7988
  };
8007
7989
  _proto.render = function render() {
8008
- var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$5(_this$props, ["component", "childFactory"]);
7990
+ var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$4(_this$props, ["component", "childFactory"]);
8009
7991
  var contextValue = this.state.contextValue;
8010
7992
  var children2 = values(this.state.children).map(childFactory2);
8011
7993
  delete props.appear;
@@ -24493,6 +24475,291 @@ var z = /* @__PURE__ */ Object.freeze({
24493
24475
  quotelessJson,
24494
24476
  ZodError
24495
24477
  });
24478
+ const coordinationTypeName = z.string();
24479
+ const coordinationScopeName = z.string();
24480
+ const stringOrStringArray = z.union([
24481
+ z.string(),
24482
+ z.array(z.string())
24483
+ ]);
24484
+ const oneOrMoreCoordinationScopeNames = stringOrStringArray;
24485
+ const componentCoordinationScopes = z.record(coordinationTypeName, oneOrMoreCoordinationScopeNames);
24486
+ const componentCoordinationScopesBy = z.record(coordinationTypeName, z.record(coordinationTypeName, z.record(coordinationScopeName, oneOrMoreCoordinationScopeNames)));
24487
+ const rgbArray = z.array(z.number()).length(3);
24488
+ const treeNodeBase = z.object({
24489
+ name: z.string(),
24490
+ color: rgbArray.optional()
24491
+ });
24492
+ const treeNodeLeaf = treeNodeBase.extend({
24493
+ set: z.array(z.string())
24494
+ });
24495
+ const treeNodeNonLeaf = treeNodeBase.extend({
24496
+ children: z.lazy(() => z.array(z.union([treeNodeNonLeaf, treeNodeLeaf])))
24497
+ });
24498
+ const cellSets2 = z.object({
24499
+ version: z.literal("0.1.2"),
24500
+ tree: z.array(treeNodeNonLeaf)
24501
+ });
24502
+ const treeNodeLeafProbabilistic = treeNodeBase.extend({
24503
+ set: z.array(z.tuple([z.string(), z.number().nullable()]))
24504
+ });
24505
+ const treeNodeNonLeafProbabilistic = treeNodeBase.extend({
24506
+ children: z.lazy(() => z.array(z.union([treeNodeNonLeafProbabilistic, treeNodeLeafProbabilistic])))
24507
+ });
24508
+ const cellSets3 = z.object({
24509
+ version: z.literal("0.1.3"),
24510
+ tree: z.array(treeNodeNonLeafProbabilistic)
24511
+ });
24512
+ function nodeTransform(node, predicate, transform3, transformedPaths, currPath = null) {
24513
+ let newPath;
24514
+ if (!currPath) {
24515
+ newPath = [node.name];
24516
+ } else {
24517
+ newPath = [...currPath];
24518
+ }
24519
+ if (predicate(node, newPath)) {
24520
+ transformedPaths.push(newPath);
24521
+ return transform3(node, newPath);
24522
+ }
24523
+ if ("children" in node) {
24524
+ return {
24525
+ ...node,
24526
+ children: node.children.map((child) => nodeTransform(child, predicate, transform3, transformedPaths, newPath.concat([child.name])))
24527
+ };
24528
+ }
24529
+ return node;
24530
+ }
24531
+ z.union([cellSets3, cellSets2]).transform((v) => {
24532
+ if (v.version === "0.1.3")
24533
+ return v;
24534
+ return {
24535
+ ...v,
24536
+ version: "0.1.3",
24537
+ tree: v.tree.map((levelZeroNode) => nodeTransform(levelZeroNode, (n) => !("children" in n) && Array.isArray(n.set), (n) => ({ ...n, set: n.set.map((itemId) => [itemId, null]) }), []))
24538
+ };
24539
+ });
24540
+ z.array(z.object({
24541
+ groupName: z.string(),
24542
+ setName: z.string(),
24543
+ setColor: rgbArray.optional(),
24544
+ obsId: z.string(),
24545
+ predictionScore: z.number().nullable().optional()
24546
+ }));
24547
+ z.array(z.string());
24548
+ const requestInit = z.object({
24549
+ method: z.string().optional(),
24550
+ headers: z.record(z.any()).optional(),
24551
+ body: z.string().optional(),
24552
+ mode: z.string().optional(),
24553
+ credentials: z.string().optional(),
24554
+ cache: z.string().optional(),
24555
+ redirect: z.string().optional(),
24556
+ referrer: z.string().optional(),
24557
+ integrity: z.string().optional()
24558
+ });
24559
+ const nameSchema = z.string();
24560
+ const publicFlagSchema = z.boolean().optional();
24561
+ const descriptionSchema = z.string().optional();
24562
+ const configSchema0_1_0 = z.object({
24563
+ version: z.literal("0.1.0"),
24564
+ name: nameSchema,
24565
+ public: publicFlagSchema,
24566
+ description: descriptionSchema,
24567
+ layers: z.array(z.object({
24568
+ name: z.string(),
24569
+ type: z.string(),
24570
+ fileType: z.string(),
24571
+ url: z.string()
24572
+ })),
24573
+ staticLayout: z.array(z.object({
24574
+ component: z.string(),
24575
+ props: z.record(z.any()).optional(),
24576
+ x: z.number().int(),
24577
+ y: z.number().int(),
24578
+ w: z.number().int().optional(),
24579
+ h: z.number().int().optional()
24580
+ }))
24581
+ });
24582
+ const fileOptionsSchema = z.any();
24583
+ const coordinationSpaceSchema = z.object({}).catchall(z.record(coordinationScopeName, z.any()));
24584
+ const initStrategySchema = z.enum(["none", "auto"]);
24585
+ const layoutSchema1_0_0 = z.array(z.object({
24586
+ component: z.string(),
24587
+ props: z.record(z.any()).optional(),
24588
+ x: z.number().int(),
24589
+ y: z.number().int(),
24590
+ w: z.number().int().optional(),
24591
+ h: z.number().int().optional(),
24592
+ coordinationScopes: z.record(z.string()).optional()
24593
+ }));
24594
+ const datasetsSchema1_0_0 = z.array(z.object({
24595
+ uid: z.string(),
24596
+ name: z.string().optional(),
24597
+ description: z.string().optional(),
24598
+ files: z.array(z.object({
24599
+ name: z.string().optional(),
24600
+ fileType: z.string(),
24601
+ url: z.string().optional(),
24602
+ options: fileOptionsSchema.optional(),
24603
+ requestInit: requestInit.optional()
24604
+ }))
24605
+ }));
24606
+ const configSchema1_0_0 = z.object({
24607
+ version: z.literal("1.0.0"),
24608
+ name: nameSchema,
24609
+ public: publicFlagSchema,
24610
+ description: descriptionSchema,
24611
+ datasets: datasetsSchema1_0_0,
24612
+ coordinationSpace: coordinationSpaceSchema.optional(),
24613
+ layout: layoutSchema1_0_0,
24614
+ initStrategy: initStrategySchema
24615
+ });
24616
+ const configSchema1_0_1 = configSchema1_0_0.extend({
24617
+ version: z.literal("1.0.1")
24618
+ });
24619
+ const configSchema1_0_2 = configSchema1_0_0.extend({
24620
+ version: z.literal("1.0.2")
24621
+ });
24622
+ const configSchema1_0_3 = configSchema1_0_0.extend({
24623
+ version: z.literal("1.0.3")
24624
+ });
24625
+ const configSchema1_0_4 = configSchema1_0_0.extend({
24626
+ version: z.literal("1.0.4")
24627
+ });
24628
+ const configSchema1_0_5 = configSchema1_0_0.extend({
24629
+ version: z.literal("1.0.5")
24630
+ });
24631
+ const configSchema1_0_6 = configSchema1_0_0.extend({
24632
+ version: z.literal("1.0.6")
24633
+ });
24634
+ const configSchema1_0_7 = configSchema1_0_0.extend({
24635
+ version: z.literal("1.0.7")
24636
+ });
24637
+ const polyphonyStyleCoordinationScopes = z.record(z.union([
24638
+ z.string(),
24639
+ z.array(z.string()),
24640
+ z.record(z.string())
24641
+ ]));
24642
+ const layoutSchema1_0_8 = z.array(z.object({
24643
+ component: z.string(),
24644
+ props: z.record(z.any()).optional(),
24645
+ x: z.number().int(),
24646
+ y: z.number().int(),
24647
+ w: z.number().int().optional(),
24648
+ h: z.number().int().optional(),
24649
+ // New: can be one of
24650
+ // - coordinationType: string
24651
+ // - dataset: string[]
24652
+ // - coordinationType: { datasetA: string, datasetB: string }
24653
+ coordinationScopes: polyphonyStyleCoordinationScopes.optional()
24654
+ }));
24655
+ const configSchema1_0_8 = configSchema1_0_0.extend({
24656
+ version: z.literal("1.0.8"),
24657
+ layout: layoutSchema1_0_8
24658
+ });
24659
+ const configSchema1_0_9 = configSchema1_0_8.extend({
24660
+ version: z.literal("1.0.9")
24661
+ });
24662
+ const layoutSchema1_0_10 = z.array(z.object({
24663
+ // New: uid property allowed.
24664
+ uid: z.string().optional(),
24665
+ component: z.string(),
24666
+ props: z.record(z.any()).optional(),
24667
+ x: z.number().int(),
24668
+ y: z.number().int(),
24669
+ w: z.number().int().optional(),
24670
+ h: z.number().int().optional(),
24671
+ coordinationScopes: polyphonyStyleCoordinationScopes.optional()
24672
+ }));
24673
+ const configSchema1_0_10 = configSchema1_0_8.extend({
24674
+ version: z.literal("1.0.10"),
24675
+ layout: layoutSchema1_0_10
24676
+ });
24677
+ const configSchema1_0_11 = configSchema1_0_10.extend({
24678
+ version: z.literal("1.0.11")
24679
+ });
24680
+ const configSchema1_0_12 = configSchema1_0_10.extend({
24681
+ version: z.literal("1.0.12")
24682
+ });
24683
+ const latestFileDefSchema = z.object({
24684
+ name: z.string().optional(),
24685
+ fileType: z.string(),
24686
+ url: z.string().optional(),
24687
+ options: fileOptionsSchema.optional(),
24688
+ requestInit: requestInit.optional(),
24689
+ // New: file def can have coordinationValues.
24690
+ coordinationValues: z.record(z.string()).optional()
24691
+ });
24692
+ const datasetsSchema1_0_13 = z.array(z.object({
24693
+ uid: z.string(),
24694
+ name: z.string().optional(),
24695
+ description: z.string().optional(),
24696
+ files: z.array(latestFileDefSchema)
24697
+ }));
24698
+ const configSchema1_0_13 = configSchema1_0_10.extend({
24699
+ version: z.literal("1.0.13"),
24700
+ datasets: datasetsSchema1_0_13
24701
+ });
24702
+ const configSchema1_0_14 = configSchema1_0_13.extend({
24703
+ version: z.literal("1.0.14")
24704
+ });
24705
+ const configSchema1_0_15 = configSchema1_0_13.extend({
24706
+ version: z.literal("1.0.15")
24707
+ });
24708
+ const configSchema1_0_16 = configSchema1_0_13.extend({
24709
+ version: z.literal("1.0.16"),
24710
+ uid: z.string().optional(),
24711
+ layout: z.array(z.object({
24712
+ uid: z.string().optional(),
24713
+ component: z.string(),
24714
+ props: z.record(z.any()).optional(),
24715
+ x: z.number().int(),
24716
+ y: z.number().int(),
24717
+ w: z.number().int().optional(),
24718
+ h: z.number().int().optional(),
24719
+ // Updates coordinationScopes and coordinationScopesBy
24720
+ coordinationScopes: componentCoordinationScopes.optional(),
24721
+ coordinationScopesBy: componentCoordinationScopesBy.optional()
24722
+ }))
24723
+ });
24724
+ let getRandomValues;
24725
+ const rnds8 = new Uint8Array(16);
24726
+ function rng() {
24727
+ if (!getRandomValues) {
24728
+ getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
24729
+ if (!getRandomValues) {
24730
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
24731
+ }
24732
+ }
24733
+ return getRandomValues(rnds8);
24734
+ }
24735
+ const byteToHex = [];
24736
+ for (let i = 0; i < 256; ++i) {
24737
+ byteToHex.push((i + 256).toString(16).slice(1));
24738
+ }
24739
+ function unsafeStringify(arr, offset2 = 0) {
24740
+ return (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();
24741
+ }
24742
+ const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
24743
+ const native = {
24744
+ randomUUID
24745
+ };
24746
+ function v4(options, buf, offset2) {
24747
+ if (native.randomUUID && !buf && !options) {
24748
+ return native.randomUUID();
24749
+ }
24750
+ options = options || {};
24751
+ const rnds = options.random || (options.rng || rng)();
24752
+ rnds[6] = rnds[6] & 15 | 64;
24753
+ rnds[8] = rnds[8] & 63 | 128;
24754
+ if (buf) {
24755
+ offset2 = offset2 || 0;
24756
+ for (let i = 0; i < 16; ++i) {
24757
+ buf[offset2 + i] = rnds[i];
24758
+ }
24759
+ return buf;
24760
+ }
24761
+ return unsafeStringify(rnds);
24762
+ }
24496
24763
  function commonjsRequire(path) {
24497
24764
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
24498
24765
  }
@@ -24850,9 +25117,6 @@ var pluralizeExports = pluralize.exports;
24850
25117
  const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
24851
25118
  plur.addPluralRule("glomerulus", "glomeruli");
24852
25119
  plur.addPluralRule("interstitium", "interstitia");
24853
- function fromEntries(iterable) {
24854
- return [...iterable].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
24855
- }
24856
25120
  function capitalize(word) {
24857
25121
  return word ? word.charAt(0).toUpperCase() + word.slice(1) : "";
24858
25122
  }
@@ -24899,291 +25163,6 @@ function createPrefixedGetNextScopeNumeric(prefix2) {
24899
25163
  function getInitialCoordinationScopePrefix(datasetUid, dataType) {
24900
25164
  return `init_${datasetUid}_${dataType}_`;
24901
25165
  }
24902
- const coordinationTypeName = z.string();
24903
- const coordinationScopeName = z.string();
24904
- const stringOrStringArray = z.union([
24905
- z.string(),
24906
- z.array(z.string())
24907
- ]);
24908
- const oneOrMoreCoordinationScopeNames = stringOrStringArray;
24909
- const componentCoordinationScopes = z.record(coordinationTypeName, oneOrMoreCoordinationScopeNames);
24910
- const componentCoordinationScopesBy = z.record(coordinationTypeName, z.record(coordinationTypeName, z.record(coordinationScopeName, oneOrMoreCoordinationScopeNames)));
24911
- const rgbArray = z.array(z.number()).length(3);
24912
- const treeNodeBase = z.object({
24913
- name: z.string(),
24914
- color: rgbArray.optional()
24915
- });
24916
- const treeNodeLeaf = treeNodeBase.extend({
24917
- set: z.array(z.string())
24918
- });
24919
- const treeNodeNonLeaf = treeNodeBase.extend({
24920
- children: z.lazy(() => z.array(z.union([treeNodeNonLeaf, treeNodeLeaf])))
24921
- });
24922
- const cellSets2 = z.object({
24923
- version: z.literal("0.1.2"),
24924
- tree: z.array(treeNodeNonLeaf)
24925
- });
24926
- const treeNodeLeafProbabilistic = treeNodeBase.extend({
24927
- set: z.array(z.tuple([z.string(), z.number().nullable()]))
24928
- });
24929
- const treeNodeNonLeafProbabilistic = treeNodeBase.extend({
24930
- children: z.lazy(() => z.array(z.union([treeNodeNonLeafProbabilistic, treeNodeLeafProbabilistic])))
24931
- });
24932
- const cellSets3 = z.object({
24933
- version: z.literal("0.1.3"),
24934
- tree: z.array(treeNodeNonLeafProbabilistic)
24935
- });
24936
- function nodeTransform(node, predicate, transform3, transformedPaths, currPath = null) {
24937
- let newPath;
24938
- if (!currPath) {
24939
- newPath = [node.name];
24940
- } else {
24941
- newPath = [...currPath];
24942
- }
24943
- if (predicate(node, newPath)) {
24944
- transformedPaths.push(newPath);
24945
- return transform3(node, newPath);
24946
- }
24947
- if ("children" in node) {
24948
- return {
24949
- ...node,
24950
- children: node.children.map((child) => nodeTransform(child, predicate, transform3, transformedPaths, newPath.concat([child.name])))
24951
- };
24952
- }
24953
- return node;
24954
- }
24955
- z.union([cellSets3, cellSets2]).transform((v) => {
24956
- if (v.version === "0.1.3")
24957
- return v;
24958
- return {
24959
- ...v,
24960
- version: "0.1.3",
24961
- tree: v.tree.map((levelZeroNode) => nodeTransform(levelZeroNode, (n) => !("children" in n) && Array.isArray(n.set), (n) => ({ ...n, set: n.set.map((itemId) => [itemId, null]) }), []))
24962
- };
24963
- });
24964
- z.array(z.object({
24965
- groupName: z.string(),
24966
- setName: z.string(),
24967
- setColor: rgbArray.optional(),
24968
- obsId: z.string(),
24969
- predictionScore: z.number().nullable().optional()
24970
- }));
24971
- z.array(z.string());
24972
- const requestInit = z.object({
24973
- method: z.string().optional(),
24974
- headers: z.record(z.any()).optional(),
24975
- body: z.string().optional(),
24976
- mode: z.string().optional(),
24977
- credentials: z.string().optional(),
24978
- cache: z.string().optional(),
24979
- redirect: z.string().optional(),
24980
- referrer: z.string().optional(),
24981
- integrity: z.string().optional()
24982
- });
24983
- const nameSchema = z.string();
24984
- const publicFlagSchema = z.boolean().optional();
24985
- const descriptionSchema = z.string().optional();
24986
- const configSchema0_1_0 = z.object({
24987
- version: z.literal("0.1.0"),
24988
- name: nameSchema,
24989
- public: publicFlagSchema,
24990
- description: descriptionSchema,
24991
- layers: z.array(z.object({
24992
- name: z.string(),
24993
- type: z.string(),
24994
- fileType: z.string(),
24995
- url: z.string()
24996
- })),
24997
- staticLayout: z.array(z.object({
24998
- component: z.string(),
24999
- props: z.record(z.any()).optional(),
25000
- x: z.number().int(),
25001
- y: z.number().int(),
25002
- w: z.number().int().optional(),
25003
- h: z.number().int().optional()
25004
- }))
25005
- });
25006
- const fileOptionsSchema = z.any();
25007
- const coordinationSpaceSchema = z.object({}).catchall(z.record(coordinationScopeName, z.any()));
25008
- const initStrategySchema = z.enum(["none", "auto"]);
25009
- const layoutSchema1_0_0 = z.array(z.object({
25010
- component: z.string(),
25011
- props: z.record(z.any()).optional(),
25012
- x: z.number().int(),
25013
- y: z.number().int(),
25014
- w: z.number().int().optional(),
25015
- h: z.number().int().optional(),
25016
- coordinationScopes: z.record(z.string()).optional()
25017
- }));
25018
- const datasetsSchema1_0_0 = z.array(z.object({
25019
- uid: z.string(),
25020
- name: z.string().optional(),
25021
- description: z.string().optional(),
25022
- files: z.array(z.object({
25023
- name: z.string().optional(),
25024
- fileType: z.string(),
25025
- url: z.string().optional(),
25026
- options: fileOptionsSchema.optional(),
25027
- requestInit: requestInit.optional()
25028
- }))
25029
- }));
25030
- const configSchema1_0_0 = z.object({
25031
- version: z.literal("1.0.0"),
25032
- name: nameSchema,
25033
- public: publicFlagSchema,
25034
- description: descriptionSchema,
25035
- datasets: datasetsSchema1_0_0,
25036
- coordinationSpace: coordinationSpaceSchema.optional(),
25037
- layout: layoutSchema1_0_0,
25038
- initStrategy: initStrategySchema
25039
- });
25040
- const configSchema1_0_1 = configSchema1_0_0.extend({
25041
- version: z.literal("1.0.1")
25042
- });
25043
- const configSchema1_0_2 = configSchema1_0_0.extend({
25044
- version: z.literal("1.0.2")
25045
- });
25046
- const configSchema1_0_3 = configSchema1_0_0.extend({
25047
- version: z.literal("1.0.3")
25048
- });
25049
- const configSchema1_0_4 = configSchema1_0_0.extend({
25050
- version: z.literal("1.0.4")
25051
- });
25052
- const configSchema1_0_5 = configSchema1_0_0.extend({
25053
- version: z.literal("1.0.5")
25054
- });
25055
- const configSchema1_0_6 = configSchema1_0_0.extend({
25056
- version: z.literal("1.0.6")
25057
- });
25058
- const configSchema1_0_7 = configSchema1_0_0.extend({
25059
- version: z.literal("1.0.7")
25060
- });
25061
- const polyphonyStyleCoordinationScopes = z.record(z.union([
25062
- z.string(),
25063
- z.array(z.string()),
25064
- z.record(z.string())
25065
- ]));
25066
- const layoutSchema1_0_8 = z.array(z.object({
25067
- component: z.string(),
25068
- props: z.record(z.any()).optional(),
25069
- x: z.number().int(),
25070
- y: z.number().int(),
25071
- w: z.number().int().optional(),
25072
- h: z.number().int().optional(),
25073
- // New: can be one of
25074
- // - coordinationType: string
25075
- // - dataset: string[]
25076
- // - coordinationType: { datasetA: string, datasetB: string }
25077
- coordinationScopes: polyphonyStyleCoordinationScopes.optional()
25078
- }));
25079
- const configSchema1_0_8 = configSchema1_0_0.extend({
25080
- version: z.literal("1.0.8"),
25081
- layout: layoutSchema1_0_8
25082
- });
25083
- const configSchema1_0_9 = configSchema1_0_8.extend({
25084
- version: z.literal("1.0.9")
25085
- });
25086
- const layoutSchema1_0_10 = z.array(z.object({
25087
- // New: uid property allowed.
25088
- uid: z.string().optional(),
25089
- component: z.string(),
25090
- props: z.record(z.any()).optional(),
25091
- x: z.number().int(),
25092
- y: z.number().int(),
25093
- w: z.number().int().optional(),
25094
- h: z.number().int().optional(),
25095
- coordinationScopes: polyphonyStyleCoordinationScopes.optional()
25096
- }));
25097
- const configSchema1_0_10 = configSchema1_0_8.extend({
25098
- version: z.literal("1.0.10"),
25099
- layout: layoutSchema1_0_10
25100
- });
25101
- const configSchema1_0_11 = configSchema1_0_10.extend({
25102
- version: z.literal("1.0.11")
25103
- });
25104
- const configSchema1_0_12 = configSchema1_0_10.extend({
25105
- version: z.literal("1.0.12")
25106
- });
25107
- const latestFileDefSchema = z.object({
25108
- name: z.string().optional(),
25109
- fileType: z.string(),
25110
- url: z.string().optional(),
25111
- options: fileOptionsSchema.optional(),
25112
- requestInit: requestInit.optional(),
25113
- // New: file def can have coordinationValues.
25114
- coordinationValues: z.record(z.string()).optional()
25115
- });
25116
- const datasetsSchema1_0_13 = z.array(z.object({
25117
- uid: z.string(),
25118
- name: z.string().optional(),
25119
- description: z.string().optional(),
25120
- files: z.array(latestFileDefSchema)
25121
- }));
25122
- const configSchema1_0_13 = configSchema1_0_10.extend({
25123
- version: z.literal("1.0.13"),
25124
- datasets: datasetsSchema1_0_13
25125
- });
25126
- const configSchema1_0_14 = configSchema1_0_13.extend({
25127
- version: z.literal("1.0.14")
25128
- });
25129
- const configSchema1_0_15 = configSchema1_0_13.extend({
25130
- version: z.literal("1.0.15")
25131
- });
25132
- const configSchema1_0_16 = configSchema1_0_13.extend({
25133
- version: z.literal("1.0.16"),
25134
- uid: z.string().optional(),
25135
- layout: z.array(z.object({
25136
- uid: z.string().optional(),
25137
- component: z.string(),
25138
- props: z.record(z.any()).optional(),
25139
- x: z.number().int(),
25140
- y: z.number().int(),
25141
- w: z.number().int().optional(),
25142
- h: z.number().int().optional(),
25143
- // Updates coordinationScopes and coordinationScopesBy
25144
- coordinationScopes: componentCoordinationScopes.optional(),
25145
- coordinationScopesBy: componentCoordinationScopesBy.optional()
25146
- }))
25147
- });
25148
- let getRandomValues;
25149
- const rnds8 = new Uint8Array(16);
25150
- function rng() {
25151
- if (!getRandomValues) {
25152
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
25153
- if (!getRandomValues) {
25154
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
25155
- }
25156
- }
25157
- return getRandomValues(rnds8);
25158
- }
25159
- const byteToHex = [];
25160
- for (let i = 0; i < 256; ++i) {
25161
- byteToHex.push((i + 256).toString(16).slice(1));
25162
- }
25163
- function unsafeStringify(arr, offset2 = 0) {
25164
- return (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();
25165
- }
25166
- const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
25167
- const native = {
25168
- randomUUID
25169
- };
25170
- function v4(options, buf, offset2) {
25171
- if (native.randomUUID && !buf && !options) {
25172
- return native.randomUUID();
25173
- }
25174
- options = options || {};
25175
- const rnds = options.random || (options.rng || rng)();
25176
- rnds[6] = rnds[6] & 15 | 64;
25177
- rnds[8] = rnds[8] & 63 | 128;
25178
- if (buf) {
25179
- offset2 = offset2 || 0;
25180
- for (let i = 0; i < 16; ++i) {
25181
- buf[offset2 + i] = rnds[i];
25182
- }
25183
- return buf;
25184
- }
25185
- return unsafeStringify(rnds);
25186
- }
25187
25166
  configSchema1_0_0.shape.coordinationSpace.unwrap();
25188
25167
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
25189
25168
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -27831,6 +27810,7 @@ const FileType$1 = {
27831
27810
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
27832
27811
  // AnnData
27833
27812
  OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
27813
+ OBS_FEATURE_COLUMNS_ANNDATA_ZARR: "obsFeatureColumns.anndata.zarr",
27834
27814
  OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
27835
27815
  OBS_EMBEDDING_ANNDATA_ZARR: "obsEmbedding.anndata.zarr",
27836
27816
  OBS_SPOTS_ANNDATA_ZARR: "obsSpots.anndata.zarr",
@@ -28064,10 +28044,10 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
28064
28044
  CoordinationType$1.EMBEDDING_OBS_OPACITY
28065
28045
  ];
28066
28046
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
28067
- const version = "3.3.4";
28068
- const date = "2024-01-28";
28047
+ const version = "3.3.6";
28048
+ const date = "2024-02-25";
28069
28049
  const branch = "changeset-release/main";
28070
- const hash = "3b0bc6a0";
28050
+ const hash = "fcb2a92d";
28071
28051
  const META_VERSION = {
28072
28052
  note,
28073
28053
  version,
@@ -28258,7 +28238,7 @@ function configSchemaToVersion(zodSchema) {
28258
28238
  return zodSchema.shape.version._def.value;
28259
28239
  }
28260
28240
  ({
28261
- ...fromEntries(SCHEMA_HANDLERS.map(([zodSchema]) => {
28241
+ ...Object.fromEntries(SCHEMA_HANDLERS.map(([zodSchema]) => {
28262
28242
  const version2 = configSchemaToVersion(zodSchema);
28263
28243
  return [version2, zodSchema];
28264
28244
  })),
@@ -28311,7 +28291,7 @@ function buildConfigSchema(pluginFileTypes, pluginJointFileTypes, pluginCoordina
28311
28291
  // Merge with coordination type schemas.
28312
28292
  coordinationSpace: z.object(
28313
28293
  // Wrap each value schema in z.record()
28314
- fromEntries(pluginCoordinationTypes.map((ct) => [
28294
+ Object.fromEntries(pluginCoordinationTypes.map((ct) => [
28315
28295
  ct.name,
28316
28296
  z.record(
28317
28297
  // For now, assume the key type is string (though it would be
@@ -28405,6 +28385,9 @@ const annDataObsSets = z.array(z.object({
28405
28385
  ]),
28406
28386
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
28407
28387
  }));
28388
+ z.array(z.object({
28389
+ path: z.string()
28390
+ }));
28408
28391
  const annDataObsSpots = annDataObsm;
28409
28392
  const annDataObsPoints = annDataObsm;
28410
28393
  const annDataObsLocations = annDataObsm;
@@ -28652,6 +28635,31 @@ const sharedThemeOptions = {
28652
28635
  }
28653
28636
  }
28654
28637
  };
28638
+ const lightPalette = {
28639
+ type: "light",
28640
+ primary: grey,
28641
+ secondary: grey,
28642
+ primaryBackground: "#F1F1F1",
28643
+ primaryBackgroundHighlight: "#FFFFFF",
28644
+ primaryBackgroundInput: "#FFFFFF",
28645
+ primaryBackgroundDim: "#8A8A8A",
28646
+ primaryBackgroundLight: "#e0e0e0",
28647
+ primaryForeground: "#333333",
28648
+ primaryForegroundL5: "rgb(64, 64, 64)",
28649
+ // lighten(map-get($theme-colors, "primary-foreground"), 5%);
28650
+ primaryForegroundL10: "rgb(77, 77, 77)",
28651
+ // lighten(map-get($theme-colors, "primary-foreground"), 10%);
28652
+ primaryForegroundD15: "rgb(13, 13, 13)",
28653
+ // darken(map-get($theme-colors, "primary-foreground"), 15%);
28654
+ primaryForegroundDim: "#808080",
28655
+ primaryForegroundActive: "#0074D9",
28656
+ secondaryBackground: "#F1F1F1",
28657
+ secondaryBackgroundDim: "#C0C0C0",
28658
+ secondaryForeground: "#222222",
28659
+ gridLayoutBackground: "#FFFFFF",
28660
+ cardBorder: "rgba(241, 241, 241, 0.125)",
28661
+ tooltipText: "rgba(0, 0, 0, 0.87)"
28662
+ };
28655
28663
  const muiTheme = {
28656
28664
  dark: createTheme({
28657
28665
  palette: {
@@ -28677,36 +28685,30 @@ const muiTheme = {
28677
28685
  tooltipText: "#FFFFFF",
28678
28686
  ...globalColors
28679
28687
  },
28680
- ...sharedThemeOptions
28688
+ ...sharedThemeOptions,
28689
+ cardBorderSize: "1px"
28681
28690
  }),
28682
28691
  light: createTheme({
28683
28692
  palette: {
28684
- type: "light",
28685
- primary: grey,
28686
- secondary: grey,
28687
- primaryBackground: "#F1F1F1",
28688
- primaryBackgroundHighlight: "#FFFFFF",
28689
- primaryBackgroundInput: "#FFFFFF",
28690
- primaryBackgroundDim: "#8A8A8A",
28691
- primaryBackgroundLight: "#e0e0e0",
28692
- primaryForeground: "#333333",
28693
- primaryForegroundL5: "rgb(64, 64, 64)",
28694
- // lighten(map-get($theme-colors, "primary-foreground"), 5%);
28695
- primaryForegroundL10: "rgb(77, 77, 77)",
28696
- // lighten(map-get($theme-colors, "primary-foreground"), 10%);
28697
- primaryForegroundD15: "rgb(13, 13, 13)",
28698
- // darken(map-get($theme-colors, "primary-foreground"), 15%);
28699
- primaryForegroundDim: "#808080",
28700
- primaryForegroundActive: "#0074D9",
28701
- secondaryBackground: "#F1F1F1",
28702
- secondaryBackgroundDim: "#C0C0C0",
28703
- secondaryForeground: "#222222",
28693
+ ...lightPalette,
28694
+ ...globalColors
28695
+ },
28696
+ ...sharedThemeOptions,
28697
+ cardBorderSize: "1px"
28698
+ }),
28699
+ light2: createTheme({
28700
+ palette: {
28701
+ ...lightPalette,
28702
+ primaryBackground: "#FFFFFF",
28703
+ primaryBackgroundHighlight: "#F1F1F1",
28704
+ primaryBackgroundInput: "#F1F1F1",
28705
+ secondaryBackground: "#FFFFFF",
28704
28706
  gridLayoutBackground: "#FFFFFF",
28705
- cardBorder: "rgba(241, 241, 241, 0.125)",
28706
- tooltipText: "rgba(0, 0, 0, 0.87)",
28707
+ cardBorder: "#ccc",
28707
28708
  ...globalColors
28708
28709
  },
28709
- ...sharedThemeOptions
28710
+ ...sharedThemeOptions,
28711
+ cardBorderSize: "2px"
28710
28712
  })
28711
28713
  };
28712
28714
  function createStore(createState) {
@@ -29518,9 +29520,9 @@ class VitessceConfig {
29518
29520
  return {
29519
29521
  ...this.config,
29520
29522
  datasets: this.config.datasets.map((d) => d.toJSON()),
29521
- coordinationSpace: fromEntries(Object.entries(this.config.coordinationSpace).map(([cType, cScopes]) => [
29523
+ coordinationSpace: Object.fromEntries(Object.entries(this.config.coordinationSpace).map(([cType, cScopes]) => [
29522
29524
  cType,
29523
- fromEntries(Object.entries(cScopes).map(([cScopeName, cScope]) => [
29525
+ Object.fromEntries(Object.entries(cScopes).map(([cScopeName, cScope]) => [
29524
29526
  cScopeName,
29525
29527
  cScope.cValue
29526
29528
  ]))
@@ -30103,7 +30105,7 @@ const useGridSizeStore = create2((set2) => ({
30103
30105
  function useInitialCoordination(parameters, coordinationScopes) {
30104
30106
  const values2 = useViewConfigStore((state) => {
30105
30107
  const { coordinationSpace } = state.initialViewConfig;
30106
- return fromEntries(parameters.map((parameter) => {
30108
+ return Object.fromEntries(parameters.map((parameter) => {
30107
30109
  if (coordinationSpace && coordinationSpace[parameter]) {
30108
30110
  const value = coordinationSpace[parameter][coordinationScopes[parameter]];
30109
30111
  return [parameter, value];
@@ -30117,7 +30119,7 @@ function useCoordination(parameters, coordinationScopes) {
30117
30119
  const setCoordinationValue = useViewConfigStore((state) => state.setCoordinationValue);
30118
30120
  const values2 = useViewConfigStore((state) => {
30119
30121
  const { coordinationSpace } = state.viewConfig;
30120
- return fromEntries(parameters.map((parameter) => {
30122
+ return Object.fromEntries(parameters.map((parameter) => {
30121
30123
  if (coordinationSpace) {
30122
30124
  const parameterScope = getParameterScope(parameter, coordinationScopes);
30123
30125
  if (coordinationSpace && coordinationSpace[parameter]) {
@@ -30128,7 +30130,7 @@ function useCoordination(parameters, coordinationScopes) {
30128
30130
  return [parameter, void 0];
30129
30131
  }));
30130
30132
  }, shallow);
30131
- const setters = useMemo(() => fromEntries(parameters.map((parameter) => {
30133
+ const setters = useMemo(() => Object.fromEntries(parameters.map((parameter) => {
30132
30134
  const setterName = `set${capitalize(parameter)}`;
30133
30135
  const setterFunc = (value) => setCoordinationValue({
30134
30136
  parameter,
@@ -30169,7 +30171,7 @@ function useMultiCoordinationScopesSecondary(parameter, byType, coordinationScop
30169
30171
  const scopes = getParameterScope(byType, coordinationScopes);
30170
30172
  if (scopes && ((_a = coordinationScopesBy == null ? void 0 : coordinationScopesBy[byType]) == null ? void 0 : _a[parameter])) {
30171
30173
  const scopesArr = Array.isArray(scopes) ? scopes : [scopes];
30172
- return [scopesArr, fromEntries(scopesArr.map((scope) => {
30174
+ return [scopesArr, Object.fromEntries(scopesArr.map((scope) => {
30173
30175
  const secondaryScopes = coordinationScopesBy[byType][parameter][scope];
30174
30176
  const secondaryScopesArr = Array.isArray(secondaryScopes) ? secondaryScopes : [secondaryScopes];
30175
30177
  return [scope, secondaryScopesArr];
@@ -30177,7 +30179,7 @@ function useMultiCoordinationScopesSecondary(parameter, byType, coordinationScop
30177
30179
  }
30178
30180
  if (scopes && !((_b = coordinationScopesBy == null ? void 0 : coordinationScopesBy[byType]) == null ? void 0 : _b[parameter]) && (coordinationScopes == null ? void 0 : coordinationScopes[parameter])) {
30179
30181
  const scopesArr = Array.isArray(scopes) ? scopes : [scopes];
30180
- return [scopesArr, fromEntries(scopesArr.map((scope) => {
30182
+ return [scopesArr, Object.fromEntries(scopesArr.map((scope) => {
30181
30183
  const secondaryScopes = coordinationScopes == null ? void 0 : coordinationScopes[parameter];
30182
30184
  const secondaryScopesArr = Array.isArray(secondaryScopes) ? secondaryScopes : [secondaryScopes];
30183
30185
  return [scope, secondaryScopesArr];
@@ -30207,7 +30209,7 @@ function useMultiCoordinationScopesSecondaryNonNull(parameter, byType, coordinat
30207
30209
  }
30208
30210
  return false;
30209
30211
  });
30210
- return [scopesNonNull, fromEntries(scopesNonNull.map((scope) => {
30212
+ return [scopesNonNull, Object.fromEntries(scopesNonNull.map((scope) => {
30211
30213
  const secondaryScopes = coordinationScopesBy[byType][parameter][scope];
30212
30214
  const secondaryScopesArr = Array.isArray(secondaryScopes) ? secondaryScopes : [secondaryScopes];
30213
30215
  const secondaryScopesNonNull = secondaryScopesArr.filter((innerScope) => {
@@ -30229,7 +30231,7 @@ function useMultiCoordinationScopesSecondaryNonNull(parameter, byType, coordinat
30229
30231
  }
30230
30232
  return false;
30231
30233
  });
30232
- return [scopesNonNull, fromEntries(scopesNonNull.map((scope) => {
30234
+ return [scopesNonNull, Object.fromEntries(scopesNonNull.map((scope) => {
30233
30235
  const secondaryScopes = coordinationScopes == null ? void 0 : coordinationScopes[parameter];
30234
30236
  const secondaryScopesArr = Array.isArray(secondaryScopes) ? secondaryScopes : [secondaryScopes];
30235
30237
  const secondaryScopesNonNull = secondaryScopesArr.filter((innerScope) => {
@@ -30250,7 +30252,7 @@ function useMultiCoordinationValues(parameter, coordinationScopes) {
30250
30252
  const vals = useViewConfigStore((state) => {
30251
30253
  const { coordinationSpace } = state.viewConfig;
30252
30254
  const scopesArr = Array.isArray(scopes) ? scopes : [scopes];
30253
- return fromEntries(scopesArr.map((scope) => {
30255
+ return Object.fromEntries(scopesArr.map((scope) => {
30254
30256
  if (coordinationSpace && coordinationSpace[parameter]) {
30255
30257
  const value = coordinationSpace[parameter][scope];
30256
30258
  return [scope, value];
@@ -30273,8 +30275,8 @@ function useComplexCoordination(parameters, coordinationScopes, coordinationScop
30273
30275
  const typeScopes = getParameterScope(byType, coordinationScopes);
30274
30276
  if (typeScopes) {
30275
30277
  const typeScopesArr = Array.isArray(typeScopes) ? typeScopes : [typeScopes];
30276
- return fromEntries(typeScopesArr.map((datasetScope) => {
30277
- const datasetValues = fromEntries(parameters.map((parameter, i) => {
30278
+ return Object.fromEntries(typeScopesArr.map((datasetScope) => {
30279
+ const datasetValues = Object.fromEntries(parameters.map((parameter, i) => {
30278
30280
  if (parameterSpaces[i]) {
30279
30281
  const parameterSpace = parameterSpaces[i];
30280
30282
  const parameterScope = getParameterScopeBy(
@@ -30303,8 +30305,8 @@ function useComplexCoordination(parameters, coordinationScopes, coordinationScop
30303
30305
  const typeScopes = getParameterScope(byType, coordinationScopes);
30304
30306
  if (typeScopes) {
30305
30307
  const typeScopesArr = Array.isArray(typeScopes) ? typeScopes : [typeScopes];
30306
- return fromEntries(typeScopesArr.map((datasetScope) => {
30307
- const datasetSetters = fromEntries(parameters.map((parameter) => {
30308
+ return Object.fromEntries(typeScopesArr.map((datasetScope) => {
30309
+ const datasetSetters = Object.fromEntries(parameters.map((parameter) => {
30308
30310
  const setterName = `set${capitalize(parameter)}`;
30309
30311
  const setterFunc = (value) => setCoordinationValue({
30310
30312
  parameter,
@@ -30445,7 +30447,7 @@ function useAuxiliaryCoordination(parameters, coordinationScopes) {
30445
30447
  const mappedParameters = mapParameters(parameters);
30446
30448
  const values2 = useAuxiliaryStore((state) => {
30447
30449
  const { auxiliaryStore } = state;
30448
- return fromEntries(mappedParameters.map((parameter) => {
30450
+ return Object.fromEntries(mappedParameters.map((parameter) => {
30449
30451
  if (auxiliaryStore && auxiliaryStore[parameter]) {
30450
30452
  const value = auxiliaryStore[parameter][mappedCoordinationScopes[parameter]];
30451
30453
  return [parameter, value];
@@ -30453,7 +30455,7 @@ function useAuxiliaryCoordination(parameters, coordinationScopes) {
30453
30455
  return [parameter, void 0];
30454
30456
  }));
30455
30457
  }, shallow);
30456
- const setters = useMemo(() => fromEntries(mappedParameters.map((parameter) => {
30458
+ const setters = useMemo(() => Object.fromEntries(mappedParameters.map((parameter) => {
30457
30459
  const setterName = `set${capitalize(parameter)}`;
30458
30460
  const setterFunc = (value) => setCoordinationValue({
30459
30461
  parameter,
@@ -36720,7 +36722,7 @@ After: ${JSON.stringify(coordinationValuesWithDefaults)}`);
36720
36722
  function createLoaders(datasets, configDescription, fileTypes, coordinationTypes, stores) {
36721
36723
  const result = {};
36722
36724
  const dataSources = new InternMap([], JSON.stringify);
36723
- const defaultCoordinationValues = fromEntries(
36725
+ const defaultCoordinationValues = Object.fromEntries(
36724
36726
  coordinationTypes.map((ct) => [ct.name, ct.defaultValue])
36725
36727
  );
36726
36728
  datasets.forEach((dataset) => {
@@ -36992,22 +36994,26 @@ function useGetObsInfo(obsType, obsLabelsTypes, obsLabelsData, obsSetsMembership
36992
36994
  const obsMembership = (obsSetsMembership == null ? void 0 : obsSetsMembership.get(obsId)) || [];
36993
36995
  return {
36994
36996
  [`${capitalize(obsType)} ID`]: obsId,
36995
- ...fromEntries(obsMembership.flatMap((path) => path.slice(1).map((pathEl, elLevel) => [
36996
- `${path[0]}${path.length > 2 ? ` L${elLevel + 1}` : ""}`,
36997
- pathEl
36998
- ]))),
36999
- ...fromEntries(Object.entries(obsLabelsTypes).map(([scopeKey, obsLabelsType]) => {
37000
- var _a, _b, _c, _d;
37001
- return [
37002
- obsLabelsType,
37003
- (_d = (_a = obsLabelsData == null ? void 0 : obsLabelsData[scopeKey]) == null ? void 0 : _a.obsLabels) == null ? void 0 : _d[
37004
- // TODO: Maybe all loaders that return obsIndex should also return an obsIndexMap
37005
- // with keys: obsId, values: obsIdx
37006
- // which would avoid the indexOf calls.
37007
- (_c = (_b = obsLabelsData == null ? void 0 : obsLabelsData[scopeKey]) == null ? void 0 : _b.obsIndex) == null ? void 0 : _c.indexOf(obsId)
37008
- ]
37009
- ];
37010
- }).filter(([obsLabelsType]) => Boolean(obsLabelsType)))
36997
+ ...Object.fromEntries(
36998
+ obsMembership.flatMap((path) => path.slice(1).map((pathEl, elLevel) => [
36999
+ `${path[0]}${path.length > 2 ? ` L${elLevel + 1}` : ""}`,
37000
+ pathEl
37001
+ ]))
37002
+ ),
37003
+ ...Object.fromEntries(
37004
+ Object.entries(obsLabelsTypes).map(([scopeKey, obsLabelsType]) => {
37005
+ var _a, _b, _c, _d;
37006
+ return [
37007
+ obsLabelsType,
37008
+ (_d = (_a = obsLabelsData == null ? void 0 : obsLabelsData[scopeKey]) == null ? void 0 : _a.obsLabels) == null ? void 0 : _d[
37009
+ // TODO: Maybe all loaders that return obsIndex should also return an obsIndexMap
37010
+ // with keys: obsId, values: obsIdx
37011
+ // which would avoid the indexOf calls.
37012
+ (_c = (_b = obsLabelsData == null ? void 0 : obsLabelsData[scopeKey]) == null ? void 0 : _b.obsIndex) == null ? void 0 : _c.indexOf(obsId)
37013
+ ]
37014
+ ];
37015
+ }).filter(([obsLabelsType]) => Boolean(obsLabelsType))
37016
+ )
37011
37017
  };
37012
37018
  }
37013
37019
  return null;
@@ -37260,7 +37266,7 @@ const useTitleStyles = makeStyles((theme) => ({
37260
37266
  }
37261
37267
  },
37262
37268
  card: {
37263
- border: `1px solid ${theme.palette.cardBorder}`,
37269
+ border: `${theme.cardBorderSize} solid ${theme.palette.cardBorder}`,
37264
37270
  flex: "1 1 auto",
37265
37271
  minHeight: "1px",
37266
37272
  padding: "12px",
@@ -37517,7 +37523,7 @@ function getExistingScopesForCoordinationType(config2, coordinationType) {
37517
37523
  }
37518
37524
  function coordinateComponentsTogether(config2, coordinationType, scopeValue, viewTypes) {
37519
37525
  var _a;
37520
- const componentCoordinationTypes = fromEntries(
37526
+ const componentCoordinationTypes = Object.fromEntries(
37521
37527
  viewTypes.map((vt) => [vt.name, vt.coordinationTypes])
37522
37528
  );
37523
37529
  const scopeName = getNextScope(getExistingScopesForCoordinationType(config2, coordinationType));
@@ -37551,7 +37557,7 @@ function coordinateComponentsTogether(config2, coordinationType, scopeValue, vie
37551
37557
  return newConfig;
37552
37558
  }
37553
37559
  function coordinateComponentsIndependent(config2, coordinationType, scopeValue, viewTypes) {
37554
- const componentCoordinationTypes = fromEntries(
37560
+ const componentCoordinationTypes = Object.fromEntries(
37555
37561
  viewTypes.map((vt) => [vt.name, vt.coordinationTypes])
37556
37562
  );
37557
37563
  const newConfig = {
@@ -37589,10 +37595,10 @@ function coordinateComponentsIndependent(config2, coordinationType, scopeValue,
37589
37595
  function initializeAuto(config2, coordinationTypeObjs, viewTypeObjs) {
37590
37596
  let newConfig = config2;
37591
37597
  const { layout: layout2, datasets } = newConfig;
37592
- const componentCoordinationTypes = fromEntries(
37598
+ const componentCoordinationTypes = Object.fromEntries(
37593
37599
  viewTypeObjs.map((vt) => [vt.name, vt.coordinationTypes])
37594
37600
  );
37595
- const defaultCoordinationValues = fromEntries(
37601
+ const defaultCoordinationValues = Object.fromEntries(
37596
37602
  coordinationTypeObjs.map((ct) => [ct.name, ct.defaultValue])
37597
37603
  );
37598
37604
  const coordinationTypes = coordinationTypeObjs.map((ct) => ct.name);
@@ -37643,7 +37649,7 @@ function assignViewUids(config2) {
37643
37649
  };
37644
37650
  }
37645
37651
  function expandConvenienceFileDefs(config2, jointFileTypes) {
37646
- const convenienceFileTypes = fromEntries(
37652
+ const convenienceFileTypes = Object.fromEntries(
37647
37653
  jointFileTypes.map((ft) => [ft.name, ft.expandFunction])
37648
37654
  );
37649
37655
  const { datasets: currDatasets } = config2;
@@ -37723,6 +37729,7 @@ function VitS(props) {
37723
37729
  validateOnConfigChange = false,
37724
37730
  isBounded = false,
37725
37731
  uid = null,
37732
+ remountOnUidChange = true,
37726
37733
  viewTypes: viewTypesProp,
37727
37734
  fileTypes: fileTypesProp,
37728
37735
  jointFileTypes: jointFileTypesProp,
@@ -37827,34 +37834,41 @@ function VitS(props) {
37827
37834
  }
37828
37835
  return createViewConfigStore(null, null);
37829
37836
  }, [success, configKey]);
37830
- return success ? /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [
37831
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37832
- VitessceGrid,
37833
- {
37834
- success,
37835
- configKey,
37836
- viewTypes,
37837
- fileTypes,
37838
- coordinationTypes,
37839
- config: configOrWarning,
37840
- rowHeight,
37841
- height: height2,
37842
- theme,
37843
- isBounded,
37844
- stores
37845
- }
37846
- ),
37847
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37848
- CallbackPublisher,
37849
- {
37850
- onWarn,
37851
- onConfigChange,
37852
- onLoaderChange,
37853
- validateOnConfigChange,
37854
- pluginSpecificConfigSchema
37855
- }
37856
- )
37857
- ] }) }, configKey) }) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
37837
+ return success ? /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
37838
+ ViewConfigProvider,
37839
+ {
37840
+ createStore: createViewConfigStoreClosure,
37841
+ ...remountOnUidChange ? { key: configKey } : {},
37842
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [
37843
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37844
+ VitessceGrid,
37845
+ {
37846
+ success,
37847
+ configKey,
37848
+ viewTypes,
37849
+ fileTypes,
37850
+ coordinationTypes,
37851
+ config: configOrWarning,
37852
+ rowHeight,
37853
+ height: height2,
37854
+ theme,
37855
+ isBounded,
37856
+ stores
37857
+ }
37858
+ ),
37859
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37860
+ CallbackPublisher,
37861
+ {
37862
+ onWarn,
37863
+ onConfigChange,
37864
+ onLoaderChange,
37865
+ validateOnConfigChange,
37866
+ pluginSpecificConfigSchema
37867
+ }
37868
+ )
37869
+ ] })
37870
+ }
37871
+ ) }) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
37858
37872
  }
37859
37873
  const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
37860
37874
  d: "M7 10l5 5 5-5z"
@@ -38337,7 +38351,7 @@ function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSe
38337
38351
  warn(error, setWarning);
38338
38352
  });
38339
38353
  }, [anyError, setWarning]);
38340
- const data = useMemo(() => fromEntries(
38354
+ const data = useMemo(() => Object.fromEntries(
38341
38355
  matchOnEntries.map(([scopeKey], i) => {
38342
38356
  var _a;
38343
38357
  return [scopeKey, (_a = dataQueries[i].data) == null ? void 0 : _a.data];
@@ -38347,7 +38361,7 @@ function useDataTypeMulti(dataType, loaders, dataset, isRequired, coordinationSe
38347
38361
  // dependency of matchOnObj and the derived primitive value dataStatus.
38348
38362
  // eslint-disable-next-line react-hooks/exhaustive-deps
38349
38363
  ), [matchOnObj, dataStatus]);
38350
- const urls = useMemo(() => fromEntries(
38364
+ const urls = useMemo(() => Object.fromEntries(
38351
38365
  matchOnEntries.map(([scopeKey], i) => {
38352
38366
  var _a;
38353
38367
  return [scopeKey, (_a = dataQueries[i].data) == null ? void 0 : _a.urls];
@@ -38732,7 +38746,7 @@ function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
38732
38746
  CoordinationType$1.OBS_LABELS_TYPE,
38733
38747
  coordinationScopes
38734
38748
  );
38735
- const obsLabelsMatchOnObj = useMemo(() => fromEntries(
38749
+ const obsLabelsMatchOnObj = useMemo(() => Object.fromEntries(
38736
38750
  Object.entries(obsLabelsTypes).map(([scope, obsLabelsType]) => [
38737
38751
  scope,
38738
38752
  { obsLabelsType, obsType }
@@ -39230,12 +39244,14 @@ function useSegmentationMultiFeatureSelection(coordinationScopes, coordinationSc
39230
39244
  );
39231
39245
  const useMemoDependency = Object.values(featureSelectionCoordination[0] || {}).flatMap((layerVal) => Object.values(layerVal).map((cVal) => cVal.featureSelection));
39232
39246
  const selections = useMemo(
39233
- () => fromEntries(Object.entries(featureSelectionCoordination[0]).map(([layerScope, layerVal]) => [
39234
- layerScope,
39235
- fromEntries(
39236
- Object.entries(layerVal).map(([cScope, cVal]) => [cScope, cVal.featureSelection])
39237
- )
39238
- ])),
39247
+ () => Object.fromEntries(
39248
+ Object.entries(featureSelectionCoordination[0]).map(([layerScope, layerVal]) => [
39249
+ layerScope,
39250
+ Object.fromEntries(
39251
+ Object.entries(layerVal).map(([cScope, cVal]) => [cScope, cVal.featureSelection])
39252
+ )
39253
+ ])
39254
+ ),
39239
39255
  // Need to execute this more frequently, whenever the featureSelections update.
39240
39256
  [
39241
39257
  coordinationScopes,
@@ -39288,10 +39304,12 @@ function useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy,
39288
39304
  [coordinationScopes, coordinationScopesBy]
39289
39305
  );
39290
39306
  const selections = useMemo(
39291
- () => fromEntries(Object.entries(featureSelectionCoordination[0]).map(([layerScope, layerVal]) => [
39292
- layerScope,
39293
- layerVal.featureSelection
39294
- ])),
39307
+ () => Object.fromEntries(
39308
+ Object.entries(featureSelectionCoordination[0]).map(([layerScope, layerVal]) => [
39309
+ layerScope,
39310
+ layerVal.featureSelection
39311
+ ])
39312
+ ),
39295
39313
  // Need to execute this more frequently, whenever the featureSelections update.
39296
39314
  [
39297
39315
  coordinationScopes,