@vitessce/utils 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 +2 -5
- package/dist-tsc/components.d.ts +2 -1
- package/dist-tsc/components.d.ts.map +1 -1
- package/dist-tsc/components.js +5 -1
- package/dist-tsc/index.d.ts +1 -1
- package/dist-tsc/index.d.ts.map +1 -1
- package/dist-tsc/index.js +1 -1
- package/dist-tsc/root.d.ts +0 -3
- package/dist-tsc/root.d.ts.map +1 -1
- package/dist-tsc/root.js +0 -5
- package/package.json +1 -1
- package/src/components.ts +6 -2
- package/src/index.ts +0 -1
- package/src/root.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -365,9 +365,6 @@ var pluralizeExports = pluralize$1.exports;
|
|
|
365
365
|
const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
|
|
366
366
|
plur.addPluralRule("glomerulus", "glomeruli");
|
|
367
367
|
plur.addPluralRule("interstitium", "interstitia");
|
|
368
|
-
function fromEntries(iterable) {
|
|
369
|
-
return [...iterable].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
|
|
370
|
-
}
|
|
371
368
|
function commaNumber(n) {
|
|
372
369
|
const nf = new Intl.NumberFormat("en-US");
|
|
373
370
|
return nf.format(n);
|
|
@@ -441,8 +438,9 @@ function getInitialCoordinationScopeName(datasetUid, dataType, i = null) {
|
|
|
441
438
|
}
|
|
442
439
|
const DEFAULT_DARK_COLOR = [50, 50, 50];
|
|
443
440
|
const DEFAULT_LIGHT_COLOR = [200, 200, 200];
|
|
441
|
+
const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
|
444
442
|
function getDefaultColor(theme) {
|
|
445
|
-
return theme === "dark" ? DEFAULT_DARK_COLOR : DEFAULT_LIGHT_COLOR;
|
|
443
|
+
return theme === "dark" ? DEFAULT_DARK_COLOR : theme === "light" ? DEFAULT_LIGHT_COLOR : DEFAULT_LIGHT2_COLOR;
|
|
446
444
|
}
|
|
447
445
|
const PALETTE = [
|
|
448
446
|
[68, 119, 170],
|
|
@@ -641,7 +639,6 @@ export {
|
|
|
641
639
|
createDefaultUpdateViewInfo,
|
|
642
640
|
createPrefixedGetNextScopeNumeric,
|
|
643
641
|
formatBytes,
|
|
644
|
-
fromEntries,
|
|
645
642
|
getDefaultColor,
|
|
646
643
|
getInitialCoordinationScopeName,
|
|
647
644
|
getInitialCoordinationScopePrefix,
|
package/dist-tsc/components.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const DEFAULT_DARK_COLOR: number[];
|
|
2
2
|
export declare const DEFAULT_LIGHT_COLOR: number[];
|
|
3
|
-
export declare
|
|
3
|
+
export declare const DEFAULT_LIGHT2_COLOR: number[];
|
|
4
|
+
export declare function getDefaultColor(theme: 'dark' | 'light' | 'light2'): number[];
|
|
4
5
|
export declare const PALETTE: number[][];
|
|
5
6
|
export declare const VIEWER_PALETTE: number[][];
|
|
6
7
|
export declare const PATHOLOGY_PALETTE: number[][];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,UAAe,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,UAAe,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAAkB,CAAC;AACnD,eAAO,MAAM,oBAAoB,UAAkB,CAAC;AAEpD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,YAKjE;AAGD,eAAO,MAAM,OAAO,YAUnB,CAAC;AAEF,eAAO,MAAM,cAAc,YAS1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAS7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAiBnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAW5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;CAAmB,CAAC;AAEnD,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,aAC5C,MAAM,UACxB;AAED,wBAAgB,iCAAiC,CAAC,aAAa,EAAE,MAAM,oBAC7C,GAAG,UAC5B;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,eAC9C;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,UACtC;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,eAC9C;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,UACtC;AAED,wBAAgB,8BAA8B,CAAC,aAAa,EAAE,MAAM,eAC/C,GAAG,UACvB;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,cAC7C,GAAG,UACtB;AAED,wBAAgB,4BAA4B,eAG3C;AAGD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,cAK7C;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,GAAG;;;EAKxC;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAI,UAWtD"}
|
package/dist-tsc/components.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// Originally in src/components/utils.js
|
|
2
2
|
export const DEFAULT_DARK_COLOR = [50, 50, 50];
|
|
3
3
|
export const DEFAULT_LIGHT_COLOR = [200, 200, 200];
|
|
4
|
+
export const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
|
4
5
|
export function getDefaultColor(theme) {
|
|
5
|
-
|
|
6
|
+
// eslint-disable-next-line no-nested-ternary
|
|
7
|
+
return theme === 'dark'
|
|
8
|
+
? DEFAULT_DARK_COLOR
|
|
9
|
+
: (theme === 'light' ? DEFAULT_LIGHT_COLOR : DEFAULT_LIGHT2_COLOR);
|
|
6
10
|
}
|
|
7
11
|
// From https://personal.sron.nl/~pault/#sec:qualitative
|
|
8
12
|
export const PALETTE = [
|
package/dist-tsc/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { commaNumber, capitalize, pluralize, getLongestString, getNextScope, getNextScopeNumeric, createPrefixedGetNextScopeNumeric, getInitialCoordinationScopePrefix, getInitialCoordinationScopeName, } from './root.js';
|
|
2
2
|
export { DEFAULT_DARK_COLOR, DEFAULT_LIGHT_COLOR, getDefaultColor, PALETTE, VIEWER_PALETTE, PATHOLOGY_PALETTE, LARGE_PATHOLOGY_PALETTE, COLORMAP_OPTIONS, DEFAULT_GL_OPTIONS, createDefaultUpdateStatus, createDefaultUpdateCellsSelection, createDefaultUpdateCellsHover, createDefaultUpdateGenesHover, createDefaultUpdateTracksHover, createDefaultUpdateViewInfo, createDefaultClearPleaseWait, copyUint8Array, asEsModule, formatBytes, } from './components.js';
|
|
3
3
|
export { getValueTransformFunction, VALUE_TRANSFORM_OPTIONS, } from './gating.js';
|
|
4
4
|
export { default as Pool } from './Pool.js';
|
package/dist-tsc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iCAAiC,EACjC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
package/dist-tsc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line react-refresh/only-export-components
|
|
2
|
-
export {
|
|
2
|
+
export { commaNumber, capitalize, pluralize, getLongestString, getNextScope, getNextScopeNumeric, createPrefixedGetNextScopeNumeric, getInitialCoordinationScopePrefix, getInitialCoordinationScopeName, } from './root.js';
|
|
3
3
|
// eslint-disable-next-line react-refresh/only-export-components
|
|
4
4
|
export { DEFAULT_DARK_COLOR, DEFAULT_LIGHT_COLOR, getDefaultColor, PALETTE, VIEWER_PALETTE, PATHOLOGY_PALETTE, LARGE_PATHOLOGY_PALETTE, COLORMAP_OPTIONS, DEFAULT_GL_OPTIONS, createDefaultUpdateStatus, createDefaultUpdateCellsSelection, createDefaultUpdateCellsHover, createDefaultUpdateGenesHover, createDefaultUpdateTracksHover, createDefaultUpdateViewInfo, createDefaultClearPleaseWait, copyUint8Array, asEsModule, formatBytes, } from './components.js';
|
|
5
5
|
export { getValueTransformFunction, VALUE_TRANSFORM_OPTIONS, } from './gating.js';
|
package/dist-tsc/root.d.ts
CHANGED
package/dist-tsc/root.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.ts"],"names":[],"mappings":"AAOA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAGpC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,UAE7C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,OAElE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAMjD;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAqChD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,UAQvD;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,gBAC1C,MAAM,EAAE,YAS7B;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAGrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,GAAE,MAAM,GAAG,IAAW,UAI9D"}
|
package/dist-tsc/root.js
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
import plur from 'pluralize';
|
|
4
4
|
plur.addPluralRule('glomerulus', 'glomeruli');
|
|
5
5
|
plur.addPluralRule('interstitium', 'interstitia');
|
|
6
|
-
// Adapted from https://github.com/feross/fromentries/blob/29b52a850bb3a47c390937631c2638edf3443942/index.js
|
|
7
|
-
export function fromEntries(iterable) {
|
|
8
|
-
return [...iterable]
|
|
9
|
-
.reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
|
|
10
|
-
}
|
|
11
6
|
export function commaNumber(n) {
|
|
12
7
|
const nf = new Intl.NumberFormat('en-US');
|
|
13
8
|
return nf.format(n);
|
package/package.json
CHANGED
package/src/components.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
// Originally in src/components/utils.js
|
|
2
2
|
export const DEFAULT_DARK_COLOR = [50, 50, 50];
|
|
3
3
|
export const DEFAULT_LIGHT_COLOR = [200, 200, 200];
|
|
4
|
+
export const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
|
|
4
5
|
|
|
5
|
-
export function getDefaultColor(theme: 'dark' | 'light') {
|
|
6
|
-
|
|
6
|
+
export function getDefaultColor(theme: 'dark' | 'light' | 'light2') {
|
|
7
|
+
// eslint-disable-next-line no-nested-ternary
|
|
8
|
+
return theme === 'dark'
|
|
9
|
+
? DEFAULT_DARK_COLOR
|
|
10
|
+
: (theme === 'light' ? DEFAULT_LIGHT_COLOR : DEFAULT_LIGHT2_COLOR);
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
// From https://personal.sron.nl/~pault/#sec:qualitative
|
package/src/index.ts
CHANGED
package/src/root.ts
CHANGED
|
@@ -5,12 +5,6 @@ import plur from 'pluralize';
|
|
|
5
5
|
plur.addPluralRule('glomerulus', 'glomeruli');
|
|
6
6
|
plur.addPluralRule('interstitium', 'interstitia');
|
|
7
7
|
|
|
8
|
-
// Adapted from https://github.com/feross/fromentries/blob/29b52a850bb3a47c390937631c2638edf3443942/index.js
|
|
9
|
-
export function fromEntries(iterable: [string, any][]): { [key: string]: any } {
|
|
10
|
-
return [...iterable]
|
|
11
|
-
.reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
export function commaNumber(n: number) {
|
|
15
9
|
const nf = new Intl.NumberFormat('en-US');
|
|
16
10
|
return nf.format(n);
|