@vitessce/vega 3.5.7 → 3.5.9

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.
Files changed (2) hide show
  1. package/dist/index.js +333 -162
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1188,10 +1188,10 @@ function compare$l(fields, orders, opt) {
1188
1188
  });
1189
1189
  return get3.length === 0 ? null : accessor(gen(get3, ord), Object.keys(fmap));
1190
1190
  }
1191
- const ascending$3 = (u2, v) => (u2 < v || u2 == null) && v != null ? -1 : (u2 > v || v == null) && u2 != null ? 1 : (v = v instanceof Date ? +v : v, u2 = u2 instanceof Date ? +u2 : u2) !== u2 && v === v ? -1 : v !== v && u2 === u2 ? 1 : 0;
1191
+ const ascending$4 = (u2, v) => (u2 < v || u2 == null) && v != null ? -1 : (u2 > v || v == null) && u2 != null ? 1 : (v = v instanceof Date ? +v : v, u2 = u2 instanceof Date ? +u2 : u2) !== u2 && v === v ? -1 : v !== v && u2 === u2 ? 1 : 0;
1192
1192
  const comparator$2 = (fields, orders) => fields.length === 1 ? compare1(fields[0], orders[0]) : compareN(fields, orders, fields.length);
1193
1193
  const compare1 = (field2, order) => function(a2, b2) {
1194
- return ascending$3(field2(a2), field2(b2)) * order;
1194
+ return ascending$4(field2(a2), field2(b2)) * order;
1195
1195
  };
1196
1196
  const compareN = (fields, orders, n) => {
1197
1197
  orders.push(0);
@@ -1199,7 +1199,7 @@ const compareN = (fields, orders, n) => {
1199
1199
  let f, c2 = 0, i = -1;
1200
1200
  while (c2 === 0 && ++i < n) {
1201
1201
  f = fields[i];
1202
- c2 = ascending$3(f(a2), f(b2));
1202
+ c2 = ascending$4(f(a2), f(b2));
1203
1203
  }
1204
1204
  return c2 * orders[i];
1205
1205
  };
@@ -2146,20 +2146,20 @@ function extractArcs(topology, object2, filter2) {
2146
2146
  });
2147
2147
  return arcs;
2148
2148
  }
2149
- function ascending$2(a2, b2) {
2149
+ function ascending$3(a2, b2) {
2150
2150
  return a2 == null || b2 == null ? NaN : a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
2151
2151
  }
2152
2152
  function descending$1(a2, b2) {
2153
2153
  return a2 == null || b2 == null ? NaN : b2 < a2 ? -1 : b2 > a2 ? 1 : b2 >= a2 ? 0 : NaN;
2154
2154
  }
2155
- function bisector$1(f) {
2155
+ function bisector$2(f) {
2156
2156
  let compare12, compare2, delta;
2157
2157
  if (f.length !== 2) {
2158
- compare12 = ascending$2;
2159
- compare2 = (d, x2) => ascending$2(f(d), x2);
2158
+ compare12 = ascending$3;
2159
+ compare2 = (d, x2) => ascending$3(f(d), x2);
2160
2160
  delta = (d, x2) => f(d) - x2;
2161
2161
  } else {
2162
- compare12 = f === ascending$2 || f === descending$1 ? f : zero$4;
2162
+ compare12 = f === ascending$3 || f === descending$1 ? f : zero$4;
2163
2163
  compare2 = f;
2164
2164
  delta = f;
2165
2165
  }
@@ -2200,7 +2200,7 @@ function bisector$1(f) {
2200
2200
  function zero$4() {
2201
2201
  return 0;
2202
2202
  }
2203
- function number$7(x2) {
2203
+ function number$8(x2) {
2204
2204
  return x2 === null ? NaN : +x2;
2205
2205
  }
2206
2206
  function* numbers$2(values2, valueof) {
@@ -2219,11 +2219,11 @@ function* numbers$2(values2, valueof) {
2219
2219
  }
2220
2220
  }
2221
2221
  }
2222
- const ascendingBisect = bisector$1(ascending$2);
2223
- const bisectRight$1 = ascendingBisect.right;
2224
- const bisectLeft$1 = ascendingBisect.left;
2225
- bisector$1(number$7).center;
2226
- const bisect$1 = bisectRight$1;
2222
+ const ascendingBisect$1 = bisector$2(ascending$3);
2223
+ const bisectRight$2 = ascendingBisect$1.right;
2224
+ const bisectLeft$1 = ascendingBisect$1.left;
2225
+ bisector$2(number$8).center;
2226
+ const bisect$2 = bisectRight$2;
2227
2227
  function variance(values2, valueof) {
2228
2228
  let count2 = 0;
2229
2229
  let delta;
@@ -2254,70 +2254,8 @@ function deviation(values2, valueof) {
2254
2254
  const v = variance(values2, valueof);
2255
2255
  return v ? Math.sqrt(v) : v;
2256
2256
  }
2257
- class Adder {
2258
- constructor() {
2259
- this._partials = new Float64Array(32);
2260
- this._n = 0;
2261
- }
2262
- add(x2) {
2263
- const p = this._partials;
2264
- let i = 0;
2265
- for (let j = 0; j < this._n && j < 32; j++) {
2266
- const y2 = p[j], hi = x2 + y2, lo = Math.abs(x2) < Math.abs(y2) ? x2 - (hi - y2) : y2 - (hi - x2);
2267
- if (lo)
2268
- p[i++] = lo;
2269
- x2 = hi;
2270
- }
2271
- p[i] = x2;
2272
- this._n = i + 1;
2273
- return this;
2274
- }
2275
- valueOf() {
2276
- const p = this._partials;
2277
- let n = this._n, x2, y2, lo, hi = 0;
2278
- if (n > 0) {
2279
- hi = p[--n];
2280
- while (n > 0) {
2281
- x2 = hi;
2282
- y2 = p[--n];
2283
- hi = x2 + y2;
2284
- lo = y2 - (hi - x2);
2285
- if (lo)
2286
- break;
2287
- }
2288
- if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) {
2289
- y2 = lo * 2;
2290
- x2 = hi + y2;
2291
- if (y2 == x2 - hi)
2292
- hi = x2;
2293
- }
2294
- }
2295
- return hi;
2296
- }
2297
- }
2298
- class InternMap extends Map {
2299
- constructor(entries2, key = keyof) {
2300
- super();
2301
- Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
2302
- if (entries2 != null)
2303
- for (const [key2, value2] of entries2)
2304
- this.set(key2, value2);
2305
- }
2306
- get(key) {
2307
- return super.get(intern_get(this, key));
2308
- }
2309
- has(key) {
2310
- return super.has(intern_get(this, key));
2311
- }
2312
- set(key, value2) {
2313
- return super.set(intern_set(this, key), value2);
2314
- }
2315
- delete(key) {
2316
- return super.delete(intern_delete(this, key));
2317
- }
2318
- }
2319
2257
  class InternSet extends Set {
2320
- constructor(values2, key = keyof) {
2258
+ constructor(values2, key = keyof$1) {
2321
2259
  super();
2322
2260
  Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
2323
2261
  if (values2 != null)
@@ -2325,27 +2263,27 @@ class InternSet extends Set {
2325
2263
  this.add(value2);
2326
2264
  }
2327
2265
  has(value2) {
2328
- return super.has(intern_get(this, value2));
2266
+ return super.has(intern_get$1(this, value2));
2329
2267
  }
2330
2268
  add(value2) {
2331
- return super.add(intern_set(this, value2));
2269
+ return super.add(intern_set$1(this, value2));
2332
2270
  }
2333
2271
  delete(value2) {
2334
- return super.delete(intern_delete(this, value2));
2272
+ return super.delete(intern_delete$1(this, value2));
2335
2273
  }
2336
2274
  }
2337
- function intern_get({ _intern, _key }, value2) {
2275
+ function intern_get$1({ _intern, _key }, value2) {
2338
2276
  const key = _key(value2);
2339
2277
  return _intern.has(key) ? _intern.get(key) : value2;
2340
2278
  }
2341
- function intern_set({ _intern, _key }, value2) {
2279
+ function intern_set$1({ _intern, _key }, value2) {
2342
2280
  const key = _key(value2);
2343
2281
  if (_intern.has(key))
2344
2282
  return _intern.get(key);
2345
2283
  _intern.set(key, value2);
2346
2284
  return value2;
2347
2285
  }
2348
- function intern_delete({ _intern, _key }, value2) {
2286
+ function intern_delete$1({ _intern, _key }, value2) {
2349
2287
  const key = _key(value2);
2350
2288
  if (_intern.has(key)) {
2351
2289
  value2 = _intern.get(key);
@@ -2353,14 +2291,14 @@ function intern_delete({ _intern, _key }, value2) {
2353
2291
  }
2354
2292
  return value2;
2355
2293
  }
2356
- function keyof(value2) {
2294
+ function keyof$1(value2) {
2357
2295
  return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
2358
2296
  }
2359
2297
  function permute(source2, keys2) {
2360
2298
  return Array.from(keys2, (key) => source2[key]);
2361
2299
  }
2362
- function compareDefined(compare2 = ascending$2) {
2363
- if (compare2 === ascending$2)
2300
+ function compareDefined(compare2 = ascending$3) {
2301
+ if (compare2 === ascending$3)
2364
2302
  return ascendingDefined;
2365
2303
  if (typeof compare2 !== "function")
2366
2304
  throw new TypeError("compare is not a function");
@@ -2374,51 +2312,14 @@ function compareDefined(compare2 = ascending$2) {
2374
2312
  function ascendingDefined(a2, b2) {
2375
2313
  return (a2 == null || !(a2 >= a2)) - (b2 == null || !(b2 >= b2)) || (a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
2376
2314
  }
2377
- var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
2378
- function ticks(start, stop3, count2) {
2379
- var reverse2, i = -1, n, ticks2, step;
2380
- stop3 = +stop3, start = +start, count2 = +count2;
2381
- if (start === stop3 && count2 > 0)
2382
- return [start];
2383
- if (reverse2 = stop3 < start)
2384
- n = start, start = stop3, stop3 = n;
2385
- if ((step = tickIncrement(start, stop3, count2)) === 0 || !isFinite(step))
2386
- return [];
2387
- if (step > 0) {
2388
- let r0 = Math.round(start / step), r1 = Math.round(stop3 / step);
2389
- if (r0 * step < start)
2390
- ++r0;
2391
- if (r1 * step > stop3)
2392
- --r1;
2393
- ticks2 = new Array(n = r1 - r0 + 1);
2394
- while (++i < n)
2395
- ticks2[i] = (r0 + i) * step;
2396
- } else {
2397
- step = -step;
2398
- let r0 = Math.round(start * step), r1 = Math.round(stop3 * step);
2399
- if (r0 / step < start)
2400
- ++r0;
2401
- if (r1 / step > stop3)
2402
- --r1;
2403
- ticks2 = new Array(n = r1 - r0 + 1);
2404
- while (++i < n)
2405
- ticks2[i] = (r0 + i) / step;
2406
- }
2407
- if (reverse2)
2408
- ticks2.reverse();
2409
- return ticks2;
2410
- }
2411
- function tickIncrement(start, stop3, count2) {
2412
- var step = (stop3 - start) / Math.max(0, count2), power = Math.floor(Math.log(step) / Math.LN10), error2 = step / Math.pow(10, power);
2413
- return power >= 0 ? (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1);
2414
- }
2415
- function tickStep(start, stop3, count2) {
2315
+ var e10$1 = Math.sqrt(50), e5$1 = Math.sqrt(10), e2$1 = Math.sqrt(2);
2316
+ function tickStep$1(start, stop3, count2) {
2416
2317
  var step0 = Math.abs(stop3 - start) / Math.max(0, count2), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error2 = step0 / step1;
2417
- if (error2 >= e10)
2318
+ if (error2 >= e10$1)
2418
2319
  step1 *= 10;
2419
- else if (error2 >= e5)
2320
+ else if (error2 >= e5$1)
2420
2321
  step1 *= 5;
2421
- else if (error2 >= e2)
2322
+ else if (error2 >= e2$1)
2422
2323
  step1 *= 2;
2423
2324
  return stop3 < start ? -step1 : step1;
2424
2325
  }
@@ -2511,7 +2412,7 @@ function quantile$1(values2, p, valueof) {
2511
2412
  var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = max$2(quickselect(values2, i0).subarray(0, i0 + 1)), value1 = min$2(values2.subarray(i0 + 1));
2512
2413
  return value0 + (value1 - value0) * (i - i0);
2513
2414
  }
2514
- function quantileSorted(values2, p, valueof = number$7) {
2415
+ function quantileSorted$1(values2, p, valueof = number$8) {
2515
2416
  if (!(n = values2.length))
2516
2417
  return;
2517
2418
  if ((p = +p) <= 0 || n < 2)
@@ -2544,15 +2445,7 @@ function mean(values2, valueof) {
2544
2445
  function median(values2, valueof) {
2545
2446
  return quantile$1(values2, 0.5, valueof);
2546
2447
  }
2547
- function* flatten(arrays) {
2548
- for (const array2 of arrays) {
2549
- yield* array2;
2550
- }
2551
- }
2552
- function merge$2(arrays) {
2553
- return Array.from(flatten(arrays));
2554
- }
2555
- function range$5(start, stop3, step) {
2448
+ function range$6(start, stop3, step) {
2556
2449
  start = +start, stop3 = +stop3, step = (n = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n < 3 ? 1 : +step;
2557
2450
  var i = -1, n = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n);
2558
2451
  while (++i < n) {
@@ -3088,6 +2981,222 @@ utcYear.every = function(k) {
3088
2981
  };
3089
2982
  const utcYear$1 = utcYear;
3090
2983
  utcYear.range;
2984
+ function ascending$2(a2, b2) {
2985
+ return a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
2986
+ }
2987
+ function bisector$1(f) {
2988
+ let delta = f;
2989
+ let compare2 = f;
2990
+ if (f.length === 1) {
2991
+ delta = (d, x2) => f(d) - x2;
2992
+ compare2 = ascendingComparator(f);
2993
+ }
2994
+ function left(a2, x2, lo, hi) {
2995
+ if (lo == null)
2996
+ lo = 0;
2997
+ if (hi == null)
2998
+ hi = a2.length;
2999
+ while (lo < hi) {
3000
+ const mid = lo + hi >>> 1;
3001
+ if (compare2(a2[mid], x2) < 0)
3002
+ lo = mid + 1;
3003
+ else
3004
+ hi = mid;
3005
+ }
3006
+ return lo;
3007
+ }
3008
+ function right(a2, x2, lo, hi) {
3009
+ if (lo == null)
3010
+ lo = 0;
3011
+ if (hi == null)
3012
+ hi = a2.length;
3013
+ while (lo < hi) {
3014
+ const mid = lo + hi >>> 1;
3015
+ if (compare2(a2[mid], x2) > 0)
3016
+ hi = mid;
3017
+ else
3018
+ lo = mid + 1;
3019
+ }
3020
+ return lo;
3021
+ }
3022
+ function center(a2, x2, lo, hi) {
3023
+ if (lo == null)
3024
+ lo = 0;
3025
+ if (hi == null)
3026
+ hi = a2.length;
3027
+ const i = left(a2, x2, lo, hi - 1);
3028
+ return i > lo && delta(a2[i - 1], x2) > -delta(a2[i], x2) ? i - 1 : i;
3029
+ }
3030
+ return { left, center, right };
3031
+ }
3032
+ function ascendingComparator(f) {
3033
+ return (d, x2) => ascending$2(f(d), x2);
3034
+ }
3035
+ function number$7(x2) {
3036
+ return x2 === null ? NaN : +x2;
3037
+ }
3038
+ const ascendingBisect = bisector$1(ascending$2);
3039
+ const bisectRight$1 = ascendingBisect.right;
3040
+ bisector$1(number$7).center;
3041
+ const bisect$1 = bisectRight$1;
3042
+ class Adder {
3043
+ constructor() {
3044
+ this._partials = new Float64Array(32);
3045
+ this._n = 0;
3046
+ }
3047
+ add(x2) {
3048
+ const p = this._partials;
3049
+ let i = 0;
3050
+ for (let j = 0; j < this._n && j < 32; j++) {
3051
+ const y2 = p[j], hi = x2 + y2, lo = Math.abs(x2) < Math.abs(y2) ? x2 - (hi - y2) : y2 - (hi - x2);
3052
+ if (lo)
3053
+ p[i++] = lo;
3054
+ x2 = hi;
3055
+ }
3056
+ p[i] = x2;
3057
+ this._n = i + 1;
3058
+ return this;
3059
+ }
3060
+ valueOf() {
3061
+ const p = this._partials;
3062
+ let n = this._n, x2, y2, lo, hi = 0;
3063
+ if (n > 0) {
3064
+ hi = p[--n];
3065
+ while (n > 0) {
3066
+ x2 = hi;
3067
+ y2 = p[--n];
3068
+ hi = x2 + y2;
3069
+ lo = y2 - (hi - x2);
3070
+ if (lo)
3071
+ break;
3072
+ }
3073
+ if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) {
3074
+ y2 = lo * 2;
3075
+ x2 = hi + y2;
3076
+ if (y2 == x2 - hi)
3077
+ hi = x2;
3078
+ }
3079
+ }
3080
+ return hi;
3081
+ }
3082
+ }
3083
+ class InternMap extends Map {
3084
+ constructor(entries2, key = keyof) {
3085
+ super();
3086
+ Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
3087
+ if (entries2 != null)
3088
+ for (const [key2, value2] of entries2)
3089
+ this.set(key2, value2);
3090
+ }
3091
+ get(key) {
3092
+ return super.get(intern_get(this, key));
3093
+ }
3094
+ has(key) {
3095
+ return super.has(intern_get(this, key));
3096
+ }
3097
+ set(key, value2) {
3098
+ return super.set(intern_set(this, key), value2);
3099
+ }
3100
+ delete(key) {
3101
+ return super.delete(intern_delete(this, key));
3102
+ }
3103
+ }
3104
+ function intern_get({ _intern, _key }, value2) {
3105
+ const key = _key(value2);
3106
+ return _intern.has(key) ? _intern.get(key) : value2;
3107
+ }
3108
+ function intern_set({ _intern, _key }, value2) {
3109
+ const key = _key(value2);
3110
+ if (_intern.has(key))
3111
+ return _intern.get(key);
3112
+ _intern.set(key, value2);
3113
+ return value2;
3114
+ }
3115
+ function intern_delete({ _intern, _key }, value2) {
3116
+ const key = _key(value2);
3117
+ if (_intern.has(key)) {
3118
+ value2 = _intern.get(value2);
3119
+ _intern.delete(key);
3120
+ }
3121
+ return value2;
3122
+ }
3123
+ function keyof(value2) {
3124
+ return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
3125
+ }
3126
+ var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
3127
+ function ticks(start, stop3, count2) {
3128
+ var reverse2, i = -1, n, ticks2, step;
3129
+ stop3 = +stop3, start = +start, count2 = +count2;
3130
+ if (start === stop3 && count2 > 0)
3131
+ return [start];
3132
+ if (reverse2 = stop3 < start)
3133
+ n = start, start = stop3, stop3 = n;
3134
+ if ((step = tickIncrement(start, stop3, count2)) === 0 || !isFinite(step))
3135
+ return [];
3136
+ if (step > 0) {
3137
+ let r0 = Math.round(start / step), r1 = Math.round(stop3 / step);
3138
+ if (r0 * step < start)
3139
+ ++r0;
3140
+ if (r1 * step > stop3)
3141
+ --r1;
3142
+ ticks2 = new Array(n = r1 - r0 + 1);
3143
+ while (++i < n)
3144
+ ticks2[i] = (r0 + i) * step;
3145
+ } else {
3146
+ step = -step;
3147
+ let r0 = Math.round(start * step), r1 = Math.round(stop3 * step);
3148
+ if (r0 / step < start)
3149
+ ++r0;
3150
+ if (r1 / step > stop3)
3151
+ --r1;
3152
+ ticks2 = new Array(n = r1 - r0 + 1);
3153
+ while (++i < n)
3154
+ ticks2[i] = (r0 + i) / step;
3155
+ }
3156
+ if (reverse2)
3157
+ ticks2.reverse();
3158
+ return ticks2;
3159
+ }
3160
+ function tickIncrement(start, stop3, count2) {
3161
+ var step = (stop3 - start) / Math.max(0, count2), power = Math.floor(Math.log(step) / Math.LN10), error2 = step / Math.pow(10, power);
3162
+ return power >= 0 ? (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1);
3163
+ }
3164
+ function tickStep(start, stop3, count2) {
3165
+ var step0 = Math.abs(stop3 - start) / Math.max(0, count2), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error2 = step0 / step1;
3166
+ if (error2 >= e10)
3167
+ step1 *= 10;
3168
+ else if (error2 >= e5)
3169
+ step1 *= 5;
3170
+ else if (error2 >= e2)
3171
+ step1 *= 2;
3172
+ return stop3 < start ? -step1 : step1;
3173
+ }
3174
+ function quantileSorted(values2, p, valueof = number$7) {
3175
+ if (!(n = values2.length))
3176
+ return;
3177
+ if ((p = +p) <= 0 || n < 2)
3178
+ return +valueof(values2[0], 0, values2);
3179
+ if (p >= 1)
3180
+ return +valueof(values2[n - 1], n - 1, values2);
3181
+ var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = +valueof(values2[i0], i0, values2), value1 = +valueof(values2[i0 + 1], i0 + 1, values2);
3182
+ return value0 + (value1 - value0) * (i - i0);
3183
+ }
3184
+ function* flatten(arrays) {
3185
+ for (const array2 of arrays) {
3186
+ yield* array2;
3187
+ }
3188
+ }
3189
+ function merge$2(arrays) {
3190
+ return Array.from(flatten(arrays));
3191
+ }
3192
+ function range$5(start, stop3, step) {
3193
+ start = +start, stop3 = +stop3, step = (n = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n < 3 ? 1 : +step;
3194
+ var i = -1, n = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n);
3195
+ while (++i < n) {
3196
+ range2[i] = start + i * step;
3197
+ }
3198
+ return range2;
3199
+ }
3091
3200
  function ticker(year2, month2, week2, day2, hour2, minute2) {
3092
3201
  const tickIntervals = [
3093
3202
  [utcSecond, 1, durationSecond$1],
@@ -3366,16 +3475,16 @@ const Milli = [YEAR, MONTH, DATE, HOURS, MINUTES, SECONDS, MILLISECONDS], Second
3366
3475
  const intervals = [[Seconds, 1, durationSecond], [Seconds, 5, 5 * durationSecond], [Seconds, 15, 15 * durationSecond], [Seconds, 30, 30 * durationSecond], [Minutes, 1, durationMinute], [Minutes, 5, 5 * durationMinute], [Minutes, 15, 15 * durationMinute], [Minutes, 30, 30 * durationMinute], [Hours, 1, durationHour], [Hours, 3, 3 * durationHour], [Hours, 6, 6 * durationHour], [Hours, 12, 12 * durationHour], [Day, 1, durationDay], [Week, 1, durationWeek], [Month, 1, durationMonth], [Month, 3, 3 * durationMonth], [Year, 1, durationYear]];
3367
3476
  function bin$2(opt) {
3368
3477
  const ext = opt.extent, max2 = opt.maxbins || 40, target2 = Math.abs(span(ext)) / max2;
3369
- let i = bisector$1((i2) => i2[2]).right(intervals, target2), units2, step;
3478
+ let i = bisector$2((i2) => i2[2]).right(intervals, target2), units2, step;
3370
3479
  if (i === intervals.length) {
3371
- units2 = Year, step = tickStep(ext[0] / durationYear, ext[1] / durationYear, max2);
3480
+ units2 = Year, step = tickStep$1(ext[0] / durationYear, ext[1] / durationYear, max2);
3372
3481
  } else if (i) {
3373
3482
  i = intervals[target2 / intervals[i - 1][2] < intervals[i][2] / target2 ? i - 1 : i];
3374
3483
  units2 = i[0];
3375
3484
  step = i[1];
3376
3485
  } else {
3377
3486
  units2 = Milli;
3378
- step = Math.max(tickStep(ext[0], ext[1], max2), 1);
3487
+ step = Math.max(tickStep$1(ext[0], ext[1], max2), 1);
3379
3488
  }
3380
3489
  return {
3381
3490
  units: units2,
@@ -4014,7 +4123,7 @@ function numberLocale(locale2) {
4014
4123
  },
4015
4124
  formatSpan(start, stop3, count2, specifier) {
4016
4125
  specifier = formatSpecifier(specifier == null ? ",f" : specifier);
4017
- const step = tickStep(start, stop3, count2), value2 = Math.max(Math.abs(start), Math.abs(stop3));
4126
+ const step = tickStep$1(start, stop3, count2), value2 = Math.max(Math.abs(start), Math.abs(stop3));
4018
4127
  let precision;
4019
4128
  if (specifier.precision == null) {
4020
4129
  switch (specifier.type) {
@@ -5946,8 +6055,8 @@ function* numbers$1(values2, valueof) {
5946
6055
  }
5947
6056
  function quantiles(array2, p, f) {
5948
6057
  const values2 = Float64Array.from(numbers$1(array2, f));
5949
- values2.sort(ascending$2);
5950
- return p.map((_) => quantileSorted(values2, _));
6058
+ values2.sort(ascending$3);
6059
+ return p.map((_) => quantileSorted$1(values2, _));
5951
6060
  }
5952
6061
  function quartiles(array2, f) {
5953
6062
  return quantiles(array2, [0.25, 0.5, 0.75], f);
@@ -6008,7 +6117,7 @@ function bootstrapCI(array2, samples, alpha, f) {
6008
6117
  }
6009
6118
  mu[j] = a2 / n;
6010
6119
  }
6011
- mu.sort(ascending$2);
6120
+ mu.sort(ascending$3);
6012
6121
  return [quantile$1(mu, alpha / 2), quantile$1(mu, 1 - alpha / 2)];
6013
6122
  }
6014
6123
  function dotbin(array2, step, smooth, f) {
@@ -8916,7 +9025,7 @@ function pivotKeys(key, limit, pulse2) {
8916
9025
  list.push(k);
8917
9026
  }
8918
9027
  });
8919
- list.sort(ascending$3);
9028
+ list.sort(ascending$4);
8920
9029
  return limit ? list.slice(0, limit) : list;
8921
9030
  }
8922
9031
  function PreFacet$1(params2) {
@@ -9054,7 +9163,7 @@ inherits(Quantile$1, Transform, {
9054
9163
  out.source = this.value;
9055
9164
  return out;
9056
9165
  }
9057
- const source2 = pulse2.materialize(pulse2.SOURCE).source, groups = partition$1$1(source2, _.groupby, _.field), names = (_.groupby || []).map(accessorName), values2 = [], step = _.step || 0.01, p = _.probs || range$5(step / 2, 1 - EPSILON$2, step), n = p.length;
9166
+ const source2 = pulse2.materialize(pulse2.SOURCE).source, groups = partition$1$1(source2, _.groupby, _.field), names = (_.groupby || []).map(accessorName), values2 = [], step = _.step || 0.01, p = _.probs || range$6(step / 2, 1 - EPSILON$2, step), n = p.length;
9058
9167
  groups.forEach((g) => {
9059
9168
  const q = quantiles(g, p);
9060
9169
  for (let i = 0; i < n; ++i) {
@@ -9218,7 +9327,7 @@ inherits(Sequence, Transform, {
9218
9327
  return;
9219
9328
  const out = pulse2.materialize().fork(pulse2.MOD), as = _.as || "data";
9220
9329
  out.rem = this.value ? pulse2.rem.concat(this.value) : pulse2.rem;
9221
- this.value = range$5(_.start, _.stop, _.step || 1).map((v) => {
9330
+ this.value = range$6(_.start, _.stop, _.step || 1).map((v) => {
9222
9331
  const t4 = {};
9223
9332
  t4[as] = v;
9224
9333
  return ingest$1(t4);
@@ -9702,7 +9811,7 @@ inherits(Window, Transform, {
9702
9811
  }
9703
9812
  });
9704
9813
  function processPartition(list, state, cmp2, _) {
9705
- const sort2 = _.sort, range2 = sort2 && !_.ignorePeers, frame2 = _.frame || [null, 0], data2 = list.data(cmp2), n = data2.length, b2 = range2 ? bisector$1(sort2) : null, w2 = {
9814
+ const sort2 = _.sort, range2 = sort2 && !_.ignorePeers, frame2 = _.frame || [null, 0], data2 = list.data(cmp2), n = data2.length, b2 = range2 ? bisector$2(sort2) : null, w2 = {
9706
9815
  i0: 0,
9707
9816
  i1: 0,
9708
9817
  p0: 0,
@@ -12812,7 +12921,7 @@ function band() {
12812
12921
  start = Math.round(start);
12813
12922
  bandwidth2 = Math.round(bandwidth2);
12814
12923
  }
12815
- const values2 = range$5(n).map((i) => start + step * i);
12924
+ const values2 = range$6(n).map((i) => start + step * i);
12816
12925
  return ordinalRange(reverse2 ? values2.reverse() : values2);
12817
12926
  }
12818
12927
  scale2.domain = function(_) {
@@ -12897,8 +13006,8 @@ function band() {
12897
13006
  }
12898
13007
  if (hi < values2[0] || lo > range$12[1 - reverse2])
12899
13008
  return;
12900
- a2 = Math.max(0, bisectRight$1(values2, lo) - 1);
12901
- b2 = lo === hi ? a2 : bisectRight$1(values2, hi) - 1;
13009
+ a2 = Math.max(0, bisectRight$2(values2, lo) - 1);
13010
+ b2 = lo === hi ? a2 : bisectRight$2(values2, hi) - 1;
12902
13011
  if (lo - values2[a2] > bandwidth2 + 1e-10)
12903
13012
  ++a2;
12904
13013
  if (reverse2) {
@@ -12937,7 +13046,7 @@ const slice$2 = Array.prototype.slice;
12937
13046
  function scaleBinOrdinal() {
12938
13047
  let domain2 = [], range2 = [];
12939
13048
  function scale2(x2) {
12940
- return x2 == null || x2 !== x2 ? void 0 : range2[(bisect$1(domain2, x2) - 1) % range2.length];
13049
+ return x2 == null || x2 !== x2 ? void 0 : range2[(bisect$2(domain2, x2) - 1) % range2.length];
12941
13050
  }
12942
13051
  scale2.domain = function(_) {
12943
13052
  if (arguments.length) {
@@ -18846,7 +18955,7 @@ Pie.Definition = {
18846
18955
  };
18847
18956
  inherits(Pie, Transform, {
18848
18957
  transform(_, pulse2) {
18849
- var as = _.as || ["startAngle", "endAngle"], startAngle = as[0], endAngle = as[1], field2 = _.field || one$3, start = _.startAngle || 0, stop3 = _.endAngle != null ? _.endAngle : 2 * Math.PI, data2 = pulse2.source, values2 = data2.map(field2), n = values2.length, a2 = start, k = (stop3 - start) / sum$1(values2), index2 = range$5(n), i, t4, v;
18958
+ var as = _.as || ["startAngle", "endAngle"], startAngle = as[0], endAngle = as[1], field2 = _.field || one$3, start = _.startAngle || 0, stop3 = _.endAngle != null ? _.endAngle : 2 * Math.PI, data2 = pulse2.source, values2 = data2.map(field2), n = values2.length, a2 = start, k = (stop3 - start) / sum$1(values2), index2 = range$6(n), i, t4, v;
18850
18959
  if (_.sort) {
18851
18960
  index2.sort((a3, b2) => values2[a3] - values2[b2]);
18852
18961
  }
@@ -18977,7 +19086,7 @@ function configureBins(scale2, _, count2) {
18977
19086
  start = step * Math.ceil(lo / step);
18978
19087
  if (stop3 > hi)
18979
19088
  stop3 = step * Math.floor(hi / step);
18980
- bins2 = range$5(start, stop3 + step / 2, step);
19089
+ bins2 = range$6(start, stop3 + step / 2, step);
18981
19090
  }
18982
19091
  if (bins2) {
18983
19092
  scale2.bins = bins2;
@@ -21655,8 +21764,8 @@ function within(p, q, r3) {
21655
21764
  }
21656
21765
  function quantize(k, nice2, zero2) {
21657
21766
  return function(values2) {
21658
- var ex = extent(values2), start = zero2 ? Math.min(ex[0], 0) : ex[0], stop3 = ex[1], span2 = stop3 - start, step = nice2 ? tickStep(start, stop3, k) : span2 / (k + 1);
21659
- return range$5(start + step, stop3, step);
21767
+ var ex = extent(values2), start = zero2 ? Math.min(ex[0], 0) : ex[0], stop3 = ex[1], span2 = stop3 - start, step = nice2 ? tickStep$1(start, stop3, k) : span2 / (k + 1);
21768
+ return range$6(start + step, stop3, step);
21660
21769
  };
21661
21770
  }
21662
21771
  function Isocontour(params2) {
@@ -27954,7 +28063,7 @@ function SortedIndex() {
27954
28063
  array2 = value2;
27955
28064
  n = size;
27956
28065
  }
27957
- return [bisectLeft$1(array2, range2[0], 0, n), bisectRight$1(array2, range2[1], 0, n)];
28066
+ return [bisectLeft$1(array2, range2[0], 0, n), bisectRight$2(array2, range2[1], 0, n)];
27958
28067
  }
27959
28068
  return {
27960
28069
  insert: insert2,
@@ -30362,7 +30471,7 @@ const functionContext = {
30362
30471
  hsl: hsl$3,
30363
30472
  luminance,
30364
30473
  contrast,
30365
- sequence: range$5,
30474
+ sequence: range$6,
30366
30475
  format,
30367
30476
  utcFormat,
30368
30477
  utcParse,
@@ -31398,7 +31507,7 @@ function radio(bind2, el2, param2, value2) {
31398
31507
  }
31399
31508
  function range$2(bind2, el2, param2, value2) {
31400
31509
  value2 = value2 !== void 0 ? value2 : (+param2.max + +param2.min) / 2;
31401
- const max2 = param2.max != null ? param2.max : Math.max(100, +value2) || 100, min2 = param2.min || Math.min(0, max2, +value2) || 0, step = param2.step || tickStep(min2, max2, 100);
31510
+ const max2 = param2.max != null ? param2.max : Math.max(100, +value2) || 100, min2 = param2.min || Math.min(0, max2, +value2) || 0, step = param2.step || tickStep$1(min2, max2, 100);
31402
31511
  const node = element("input", {
31403
31512
  type: "range",
31404
31513
  name: param2.signal,
@@ -35412,7 +35521,7 @@ const vegaImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
35412
35521
  accessorFields,
35413
35522
  accessorName,
35414
35523
  array: array$5,
35415
- ascending: ascending$3,
35524
+ ascending: ascending$4,
35416
35525
  bandwidthNRD: estimateBandwidth,
35417
35526
  bin: bin$1,
35418
35527
  bootstrapCI,
@@ -49886,8 +49995,13 @@ const ViewType$1 = {
49886
49995
  FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
49887
49996
  DOT_PLOT: "dotPlot",
49888
49997
  FEATURE_BAR_PLOT: "featureBarPlot",
49998
+ VOLCANO_PLOT: "volcanoPlot",
49999
+ OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
50000
+ FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
49889
50001
  BIOMARKER_SELECT: "biomarkerSelect",
50002
+ COMPARATIVE_HEADING: "comparativeHeading",
49890
50003
  LINK_CONTROLLER: "linkController",
50004
+ NEUROGLANCER: "neuroglancer",
49891
50005
  DUAL_SCATTERPLOT: "dualScatterplot",
49892
50006
  TREEMAP: "treemap"
49893
50007
  };
@@ -49905,7 +50019,11 @@ const DataType$1 = {
49905
50019
  OBS_POINTS: "obsPoints",
49906
50020
  OBS_LOCATIONS: "obsLocations",
49907
50021
  SAMPLE_SETS: "sampleSets",
49908
- SAMPLE_EDGES: "sampleEdges"
50022
+ SAMPLE_EDGES: "sampleEdges",
50023
+ COMPARISON_METADATA: "comparisonMetadata",
50024
+ FEATURE_STATS: "featureStats",
50025
+ FEATURE_SET_STATS: "featureSetStats",
50026
+ OBS_SET_STATS: "obsSetStats"
49909
50027
  };
49910
50028
  const FileType$1 = {
49911
50029
  // Joint file types
@@ -49944,6 +50062,10 @@ const FileType$1 = {
49944
50062
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
49945
50063
  SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
49946
50064
  SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
50065
+ COMPARISON_METADATA_ANNDATA_ZARR: "comparisonMetadata.anndata.zarr",
50066
+ COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR: "comparativeFeatureStats.anndata.zarr",
50067
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR: "comparativeFeatureSetStats.anndata.zarr",
50068
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR: "comparativeObsSetStats.anndata.zarr",
49947
50069
  // AnnData - zipped
49948
50070
  OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
49949
50071
  OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
@@ -49957,6 +50079,10 @@ const FileType$1 = {
49957
50079
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
49958
50080
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
49959
50081
  SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
50082
+ COMPARISON_METADATA_ANNDATA_ZARR_ZIP: "comparisonMetadata.anndata.zarr.zip",
50083
+ COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureStats.anndata.zarr.zip",
50084
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureSetStats.anndata.zarr.zip",
50085
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeObsSetStats.anndata.zarr.zip",
49960
50086
  // AnnData - h5ad via reference spec
49961
50087
  OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
49962
50088
  OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
@@ -49970,6 +50096,10 @@ const FileType$1 = {
49970
50096
  FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
49971
50097
  SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
49972
50098
  SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
50099
+ COMPARISON_METADATA_ANNDATA_H5AD: "comparisonMetadata.anndata.h5ad",
50100
+ COMPARATIVE_FEATURE_STATS_ANNDATA_H5AD: "comparativeFeatureStats.anndata.h5ad",
50101
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_H5AD: "comparativeFeatureSetStats.anndata.h5ad",
50102
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_H5AD: "comparativeObsSetStats.anndata.h5ad",
49973
50103
  // SpatialData
49974
50104
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
49975
50105
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -50168,6 +50298,11 @@ const CoordinationType$1 = {
50168
50298
  EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
50169
50299
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
50170
50300
  CONTOUR_COLOR: "contourColor",
50301
+ // For volcano plot:
50302
+ FEATURE_POINT_SIGNIFICANCE_THRESHOLD: "featurePointSignificanceThreshold",
50303
+ FEATURE_LABEL_SIGNIFICANCE_THRESHOLD: "featureLabelSignificanceThreshold",
50304
+ FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
50305
+ FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
50171
50306
  // Treemap
50172
50307
  HIERARCHY_LEVELS: "hierarchyLevels"
50173
50308
  };
@@ -50416,6 +50551,42 @@ const annDataConvenienceObsEmbeddingItem = z.object({
50416
50551
  dims: z.array(z.number()).optional(),
50417
50552
  embeddingType: z.string()
50418
50553
  });
50554
+ z.object({
50555
+ path: z.string().describe("Path to the comparison metadata, such as /uns/comparison_metadata")
50556
+ });
50557
+ z.object({
50558
+ // TODO: implement a featureStats.anndata.zarr loader
50559
+ // which does not depend on comparisonMetadata
50560
+ // (instead, would point directly to the root of
50561
+ // the dataframe containing a set of diff exp results)
50562
+ // path: z.string().describe('Path to the dataframe containing the results.'),
50563
+ metadataPath: z.string().describe("Path to the comparison metadata."),
50564
+ indexColumn: z.string().optional().describe("Provide a column to use for the feature index, if different than the default dataframe index."),
50565
+ pValueColumn: z.string(),
50566
+ foldChangeColumn: z.string(),
50567
+ pValueTransformation: z.enum(["minuslog10"]).optional(),
50568
+ pValueAdjusted: z.boolean().optional(),
50569
+ foldChangeTransformation: z.enum(["log2"]).optional()
50570
+ });
50571
+ z.object({
50572
+ metadataPath: z.string().describe("Path to the comparison metadata."),
50573
+ indexColumn: z.string().optional().describe("Provide a column to use for the feature set index, if different than the default dataframe index."),
50574
+ termColumn: z.string().optional(),
50575
+ pValueColumn: z.string(),
50576
+ pValueAdjusted: z.boolean().optional(),
50577
+ analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, pertpy_hypergeometric.")
50578
+ });
50579
+ z.object({
50580
+ metadataPath: z.string().describe("Path to the comparison metadata."),
50581
+ indexColumn: z.string().optional().describe("Provide a column to use for the obs set index, if different than the default dataframe index."),
50582
+ interceptExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
50583
+ effectExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
50584
+ foldChangeColumn: z.string().describe("The log-fold change is then calculated between this expected sample and the expected sample with no active covariates from the intercept section."),
50585
+ foldChangeTransformation: z.enum(["log2"]).optional(),
50586
+ isCredibleEffectColumn: z.string().describe("Column which annotates effects as being credible or not (boolean)."),
50587
+ covariateColumn: z.string().describe("Column which defines the covariate used in the analysis."),
50588
+ analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, sccoda_df.")
50589
+ });
50419
50590
  const annDataObsLabels = annDataObs;
50420
50591
  const annDataFeatureLabels = annDataObs;
50421
50592
  const annDataSampleEdges = annDataObs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/vega",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "vega": "^5.21.0",
23
23
  "vega-lite": "^5.1.1",
24
24
  "vega-tooltip": "^0.27.0",
25
- "@vitessce/tooltip": "3.5.7",
26
- "@vitessce/legend": "3.5.7"
25
+ "@vitessce/tooltip": "3.5.9",
26
+ "@vitessce/legend": "3.5.9"
27
27
  },
28
28
  "devDependencies": {
29
29
  "react": "^18.0.0",