@vitessce/spatial-utils 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
2
+ import { B as BaseDecoder } from "./index-551fa504.js";
3
3
  import "react";
4
4
  class DeflateDecoder extends BaseDecoder {
5
5
  decodeBlock(buffer) {
@@ -19770,6 +19770,363 @@ var unit = /* @__PURE__ */ createUnitFunction({
19770
19770
  Unit,
19771
19771
  typed
19772
19772
  });
19773
+ function commonjsRequire(path) {
19774
+ 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.');
19775
+ }
19776
+ var pluralize = { exports: {} };
19777
+ (function(module2, exports2) {
19778
+ (function(root2, pluralize2) {
19779
+ if (typeof commonjsRequire === "function" && true && true) {
19780
+ module2.exports = pluralize2();
19781
+ } else {
19782
+ root2.pluralize = pluralize2();
19783
+ }
19784
+ })(commonjsGlobal, function() {
19785
+ var pluralRules = [];
19786
+ var singularRules = [];
19787
+ var uncountables = {};
19788
+ var irregularPlurals = {};
19789
+ var irregularSingles = {};
19790
+ function sanitizeRule(rule) {
19791
+ if (typeof rule === "string") {
19792
+ return new RegExp("^" + rule + "$", "i");
19793
+ }
19794
+ return rule;
19795
+ }
19796
+ function restoreCase(word, token) {
19797
+ if (word === token)
19798
+ return token;
19799
+ if (word === word.toLowerCase())
19800
+ return token.toLowerCase();
19801
+ if (word === word.toUpperCase())
19802
+ return token.toUpperCase();
19803
+ if (word[0] === word[0].toUpperCase()) {
19804
+ return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
19805
+ }
19806
+ return token.toLowerCase();
19807
+ }
19808
+ function interpolate2(str, args) {
19809
+ return str.replace(/\$(\d{1,2})/g, function(match, index2) {
19810
+ return args[index2] || "";
19811
+ });
19812
+ }
19813
+ function replace(word, rule) {
19814
+ return word.replace(rule[0], function(match, index2) {
19815
+ var result = interpolate2(rule[1], arguments);
19816
+ if (match === "") {
19817
+ return restoreCase(word[index2 - 1], result);
19818
+ }
19819
+ return restoreCase(match, result);
19820
+ });
19821
+ }
19822
+ function sanitizeWord(token, word, rules) {
19823
+ if (!token.length || uncountables.hasOwnProperty(token)) {
19824
+ return word;
19825
+ }
19826
+ var len2 = rules.length;
19827
+ while (len2--) {
19828
+ var rule = rules[len2];
19829
+ if (rule[0].test(word))
19830
+ return replace(word, rule);
19831
+ }
19832
+ return word;
19833
+ }
19834
+ function replaceWord(replaceMap, keepMap, rules) {
19835
+ return function(word) {
19836
+ var token = word.toLowerCase();
19837
+ if (keepMap.hasOwnProperty(token)) {
19838
+ return restoreCase(word, token);
19839
+ }
19840
+ if (replaceMap.hasOwnProperty(token)) {
19841
+ return restoreCase(word, replaceMap[token]);
19842
+ }
19843
+ return sanitizeWord(token, word, rules);
19844
+ };
19845
+ }
19846
+ function checkWord(replaceMap, keepMap, rules, bool) {
19847
+ return function(word) {
19848
+ var token = word.toLowerCase();
19849
+ if (keepMap.hasOwnProperty(token))
19850
+ return true;
19851
+ if (replaceMap.hasOwnProperty(token))
19852
+ return false;
19853
+ return sanitizeWord(token, token, rules) === token;
19854
+ };
19855
+ }
19856
+ function pluralize2(word, count2, inclusive) {
19857
+ var pluralized = count2 === 1 ? pluralize2.singular(word) : pluralize2.plural(word);
19858
+ return (inclusive ? count2 + " " : "") + pluralized;
19859
+ }
19860
+ pluralize2.plural = replaceWord(
19861
+ irregularSingles,
19862
+ irregularPlurals,
19863
+ pluralRules
19864
+ );
19865
+ pluralize2.isPlural = checkWord(
19866
+ irregularSingles,
19867
+ irregularPlurals,
19868
+ pluralRules
19869
+ );
19870
+ pluralize2.singular = replaceWord(
19871
+ irregularPlurals,
19872
+ irregularSingles,
19873
+ singularRules
19874
+ );
19875
+ pluralize2.isSingular = checkWord(
19876
+ irregularPlurals,
19877
+ irregularSingles,
19878
+ singularRules
19879
+ );
19880
+ pluralize2.addPluralRule = function(rule, replacement) {
19881
+ pluralRules.push([sanitizeRule(rule), replacement]);
19882
+ };
19883
+ pluralize2.addSingularRule = function(rule, replacement) {
19884
+ singularRules.push([sanitizeRule(rule), replacement]);
19885
+ };
19886
+ pluralize2.addUncountableRule = function(word) {
19887
+ if (typeof word === "string") {
19888
+ uncountables[word.toLowerCase()] = true;
19889
+ return;
19890
+ }
19891
+ pluralize2.addPluralRule(word, "$0");
19892
+ pluralize2.addSingularRule(word, "$0");
19893
+ };
19894
+ pluralize2.addIrregularRule = function(single, plural) {
19895
+ plural = plural.toLowerCase();
19896
+ single = single.toLowerCase();
19897
+ irregularSingles[single] = plural;
19898
+ irregularPlurals[plural] = single;
19899
+ };
19900
+ [
19901
+ // Pronouns.
19902
+ ["I", "we"],
19903
+ ["me", "us"],
19904
+ ["he", "they"],
19905
+ ["she", "they"],
19906
+ ["them", "them"],
19907
+ ["myself", "ourselves"],
19908
+ ["yourself", "yourselves"],
19909
+ ["itself", "themselves"],
19910
+ ["herself", "themselves"],
19911
+ ["himself", "themselves"],
19912
+ ["themself", "themselves"],
19913
+ ["is", "are"],
19914
+ ["was", "were"],
19915
+ ["has", "have"],
19916
+ ["this", "these"],
19917
+ ["that", "those"],
19918
+ // Words ending in with a consonant and `o`.
19919
+ ["echo", "echoes"],
19920
+ ["dingo", "dingoes"],
19921
+ ["volcano", "volcanoes"],
19922
+ ["tornado", "tornadoes"],
19923
+ ["torpedo", "torpedoes"],
19924
+ // Ends with `us`.
19925
+ ["genus", "genera"],
19926
+ ["viscus", "viscera"],
19927
+ // Ends with `ma`.
19928
+ ["stigma", "stigmata"],
19929
+ ["stoma", "stomata"],
19930
+ ["dogma", "dogmata"],
19931
+ ["lemma", "lemmata"],
19932
+ ["schema", "schemata"],
19933
+ ["anathema", "anathemata"],
19934
+ // Other irregular rules.
19935
+ ["ox", "oxen"],
19936
+ ["axe", "axes"],
19937
+ ["die", "dice"],
19938
+ ["yes", "yeses"],
19939
+ ["foot", "feet"],
19940
+ ["eave", "eaves"],
19941
+ ["goose", "geese"],
19942
+ ["tooth", "teeth"],
19943
+ ["quiz", "quizzes"],
19944
+ ["human", "humans"],
19945
+ ["proof", "proofs"],
19946
+ ["carve", "carves"],
19947
+ ["valve", "valves"],
19948
+ ["looey", "looies"],
19949
+ ["thief", "thieves"],
19950
+ ["groove", "grooves"],
19951
+ ["pickaxe", "pickaxes"],
19952
+ ["passerby", "passersby"]
19953
+ ].forEach(function(rule) {
19954
+ return pluralize2.addIrregularRule(rule[0], rule[1]);
19955
+ });
19956
+ [
19957
+ [/s?$/i, "s"],
19958
+ [/[^\u0000-\u007F]$/i, "$0"],
19959
+ [/([^aeiou]ese)$/i, "$1"],
19960
+ [/(ax|test)is$/i, "$1es"],
19961
+ [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
19962
+ [/(e[mn]u)s?$/i, "$1s"],
19963
+ [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
19964
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
19965
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
19966
+ [/(seraph|cherub)(?:im)?$/i, "$1im"],
19967
+ [/(her|at|gr)o$/i, "$1oes"],
19968
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
19969
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
19970
+ [/sis$/i, "ses"],
19971
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
19972
+ [/([^aeiouy]|qu)y$/i, "$1ies"],
19973
+ [/([^ch][ieo][ln])ey$/i, "$1ies"],
19974
+ [/(x|ch|ss|sh|zz)$/i, "$1es"],
19975
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
19976
+ [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
19977
+ [/(pe)(?:rson|ople)$/i, "$1ople"],
19978
+ [/(child)(?:ren)?$/i, "$1ren"],
19979
+ [/eaux$/i, "$0"],
19980
+ [/m[ae]n$/i, "men"],
19981
+ ["thou", "you"]
19982
+ ].forEach(function(rule) {
19983
+ return pluralize2.addPluralRule(rule[0], rule[1]);
19984
+ });
19985
+ [
19986
+ [/s$/i, ""],
19987
+ [/(ss)$/i, "$1"],
19988
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
19989
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
19990
+ [/ies$/i, "y"],
19991
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
19992
+ [/\b(mon|smil)ies$/i, "$1ey"],
19993
+ [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
19994
+ [/(seraph|cherub)im$/i, "$1"],
19995
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
19996
+ [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
19997
+ [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
19998
+ [/(test)(?:is|es)$/i, "$1is"],
19999
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
20000
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
20001
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
20002
+ [/(alumn|alg|vertebr)ae$/i, "$1a"],
20003
+ [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
20004
+ [/(matr|append)ices$/i, "$1ix"],
20005
+ [/(pe)(rson|ople)$/i, "$1rson"],
20006
+ [/(child)ren$/i, "$1"],
20007
+ [/(eau)x?$/i, "$1"],
20008
+ [/men$/i, "man"]
20009
+ ].forEach(function(rule) {
20010
+ return pluralize2.addSingularRule(rule[0], rule[1]);
20011
+ });
20012
+ [
20013
+ // Singular words with no plurals.
20014
+ "adulthood",
20015
+ "advice",
20016
+ "agenda",
20017
+ "aid",
20018
+ "aircraft",
20019
+ "alcohol",
20020
+ "ammo",
20021
+ "analytics",
20022
+ "anime",
20023
+ "athletics",
20024
+ "audio",
20025
+ "bison",
20026
+ "blood",
20027
+ "bream",
20028
+ "buffalo",
20029
+ "butter",
20030
+ "carp",
20031
+ "cash",
20032
+ "chassis",
20033
+ "chess",
20034
+ "clothing",
20035
+ "cod",
20036
+ "commerce",
20037
+ "cooperation",
20038
+ "corps",
20039
+ "debris",
20040
+ "diabetes",
20041
+ "digestion",
20042
+ "elk",
20043
+ "energy",
20044
+ "equipment",
20045
+ "excretion",
20046
+ "expertise",
20047
+ "firmware",
20048
+ "flounder",
20049
+ "fun",
20050
+ "gallows",
20051
+ "garbage",
20052
+ "graffiti",
20053
+ "hardware",
20054
+ "headquarters",
20055
+ "health",
20056
+ "herpes",
20057
+ "highjinks",
20058
+ "homework",
20059
+ "housework",
20060
+ "information",
20061
+ "jeans",
20062
+ "justice",
20063
+ "kudos",
20064
+ "labour",
20065
+ "literature",
20066
+ "machinery",
20067
+ "mackerel",
20068
+ "mail",
20069
+ "media",
20070
+ "mews",
20071
+ "moose",
20072
+ "music",
20073
+ "mud",
20074
+ "manga",
20075
+ "news",
20076
+ "only",
20077
+ "personnel",
20078
+ "pike",
20079
+ "plankton",
20080
+ "pliers",
20081
+ "police",
20082
+ "pollution",
20083
+ "premises",
20084
+ "rain",
20085
+ "research",
20086
+ "rice",
20087
+ "salmon",
20088
+ "scissors",
20089
+ "series",
20090
+ "sewage",
20091
+ "shambles",
20092
+ "shrimp",
20093
+ "software",
20094
+ "species",
20095
+ "staff",
20096
+ "swine",
20097
+ "tennis",
20098
+ "traffic",
20099
+ "transportation",
20100
+ "trout",
20101
+ "tuna",
20102
+ "wealth",
20103
+ "welfare",
20104
+ "whiting",
20105
+ "wildebeest",
20106
+ "wildlife",
20107
+ "you",
20108
+ /pok[eé]mon$/i,
20109
+ // Regexes.
20110
+ /[^aeiou]ese$/i,
20111
+ // "chinese", "japanese"
20112
+ /deer$/i,
20113
+ // "deer", "reindeer"
20114
+ /fish$/i,
20115
+ // "fish", "blowfish", "angelfish"
20116
+ /measles$/i,
20117
+ /o[iu]s$/i,
20118
+ // "carnivorous"
20119
+ /pox$/i,
20120
+ // "chickpox", "smallpox"
20121
+ /sheep$/i
20122
+ ].forEach(pluralize2.addUncountableRule);
20123
+ return pluralize2;
20124
+ });
20125
+ })(pluralize);
20126
+ var pluralizeExports = pluralize.exports;
20127
+ const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
20128
+ plur.addPluralRule("glomerulus", "glomeruli");
20129
+ plur.addPluralRule("interstitium", "interstitia");
19773
20130
  function fromEntries(iterable) {
19774
20131
  return [...iterable].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
19775
20132
  }
@@ -69458,9 +69815,6 @@ class GeoCellLayer extends CompositeLayer {
69458
69815
  }
69459
69816
  _defineProperty$e(GeoCellLayer, "layerName", "GeoCellLayer");
69460
69817
  _defineProperty$e(GeoCellLayer, "defaultProps", defaultProps$t);
69461
- function commonjsRequire(path) {
69462
- 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.');
69463
- }
69464
69818
  var long = { exports: {} };
69465
69819
  (function(module2) {
69466
69820
  /**
@@ -132943,16 +133297,16 @@ function addDecoder(cases, importFn) {
132943
133297
  }
132944
133298
  cases.forEach((c) => registry$1.set(c, importFn));
132945
133299
  }
132946
- addDecoder([void 0, 1], () => import("./raw-51c1d779.js").then((m) => m.default));
132947
- addDecoder(5, () => import("./lzw-183b6431.js").then((m) => m.default));
133300
+ addDecoder([void 0, 1], () => import("./raw-8e22b1c4.js").then((m) => m.default));
133301
+ addDecoder(5, () => import("./lzw-c3783269.js").then((m) => m.default));
132948
133302
  addDecoder(6, () => {
132949
133303
  throw new Error("old style JPEG compression is not supported.");
132950
133304
  });
132951
- addDecoder(7, () => import("./jpeg-c95516fd.js").then((m) => m.default));
132952
- addDecoder([8, 32946], () => import("./deflate-e1882774.js").then((m) => m.default));
132953
- addDecoder(32773, () => import("./packbits-b1c7f20d.js").then((m) => m.default));
132954
- addDecoder(34887, () => import("./lerc-c8eb24c6.js").then((m) => m.default));
132955
- addDecoder(50001, () => import("./webimage-54b36ce2.js").then((m) => m.default));
133305
+ addDecoder(7, () => import("./jpeg-d67d9d82.js").then((m) => m.default));
133306
+ addDecoder([8, 32946], () => import("./deflate-6fd0bca9.js").then((m) => m.default));
133307
+ addDecoder(32773, () => import("./packbits-209c03d7.js").then((m) => m.default));
133308
+ addDecoder(34887, () => import("./lerc-522345a3.js").then((m) => m.default));
133309
+ addDecoder(50001, () => import("./webimage-a5d2769c.js").then((m) => m.default));
132956
133310
  function decodeRowAcc(row, stride) {
132957
133311
  let length2 = row.length - stride;
132958
133312
  let offset = 0;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, e, a, b, c, d, G, n, l, m, h, i, f, j, k, s } from "./index-50f2f2d8.js";
1
+ import { D, e, a, b, c, d, G, n, l, m, h, i, f, j, k, s } from "./index-551fa504.js";
2
2
  import "react";
3
3
  export {
4
4
  D as DEFAULT_CELLS_LAYER,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
1
+ import { B as BaseDecoder } from "./index-551fa504.js";
2
2
  import "react";
3
3
  const dctZigZag = new Int32Array([
4
4
  0,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-50f2f2d8.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-551fa504.js";
3
3
  import "react";
4
4
  const LercParameters = {
5
5
  Version: 0,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
1
+ import { B as BaseDecoder } from "./index-551fa504.js";
2
2
  import "react";
3
3
  const MIN_BITS = 9;
4
4
  const CLEAR_CODE = 256;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
1
+ import { B as BaseDecoder } from "./index-551fa504.js";
2
2
  import "react";
3
3
  class PackbitsDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
1
+ import { B as BaseDecoder } from "./index-551fa504.js";
2
2
  import "react";
3
3
  class RawDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-50f2f2d8.js";
1
+ import { B as BaseDecoder } from "./index-551fa504.js";
2
2
  import "react";
3
3
  class WebImageDecoder extends BaseDecoder {
4
4
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/spatial-utils",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,8 +19,8 @@
19
19
  "lodash-es": "^4.17.21",
20
20
  "math.gl": "^3.5.6",
21
21
  "mathjs": "^9.2.0",
22
- "@vitessce/gl": "3.1.1",
23
- "@vitessce/utils": "3.1.1"
22
+ "@vitessce/gl": "3.1.2",
23
+ "@vitessce/utils": "3.1.2"
24
24
  },
25
25
  "scripts": {
26
26
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",