@niagads/common 0.2.2-alpha.64.sha-e071a3e3 → 0.2.2-alpha.64.sha-298ab6e7
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/colors.js +1 -1
- package/dist/colors.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/colors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const r={PuBlRd:["#601A4A","#EE442F","#63ACBE"],RdBlPu:["#EE442F","#601A4A","#63ACBE"],eight_color:["#332288","#117733","#44AA99","#88CCEE","#DDCC77","#CC6677","#AA4499","#882255"]}
|
|
1
|
+
const r={PuBlRd:["#601A4A","#EE442F","#63ACBE"],RdBlPu:["#EE442F","#601A4A","#63ACBE"],eight_color:["#332288","#117733","#44AA99","#88CCEE","#DDCC77","#CC6677","#AA4499","#882255"]};function o({transform:r,thresholds:o,colors:t}){if(t.length!==o.length+1)throw new Error(`colorscale: colors array must have one more element than thresholds. Got ${o.length} thresholds and ${t.length} colors.`);return e=>{const l=r?r(e):e;for(let r=0;r<o.length;r++)if(l<o[r])return t[r];return t[t.length-1]}}export{r as COLOR_BLIND_FRIENDLY_PALETTES,o as colorscale};
|
|
2
2
|
//# sourceMappingURL=colors.js.map
|
package/dist/colors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sources":["../src/colors.tsx"],"sourcesContent":[null],"names":["COLOR_BLIND_FRIENDLY_PALETTES","PuBlRd","RdBlPu","eight_color","
|
|
1
|
+
{"version":3,"file":"colors.js","sources":["../src/colors.tsx"],"sourcesContent":[null],"names":["COLOR_BLIND_FRIENDLY_PALETTES","PuBlRd","RdBlPu","eight_color","colorscale","transform","thresholds","colors","length","Error","value","transformedValue","i"],"mappings":"AAAO,MAAMA,EAAgC,CACzCC,OAAQ,CAAC,UAAW,UAAW,WAC/BC,OAAQ,CAAC,UAAW,UAAW,WAC/BC,YAAa,CAAC,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,YAmDzF,SAAUC,GAAWC,UACvBA,EAASC,WACTA,EAAUC,OACVA,IAMA,GAAIA,EAAOC,SAAWF,EAAWE,OAAS,EACtC,MAAM,IAAIC,MAEF,4EAAOH,EAAWE,yBAAyBD,EAAOC,kBAI9D,OAAQE,IACJ,MAAMC,EAAmBN,EAAYA,EAAUK,GAASA,EACxD,IAAK,IAAIE,EAAI,EAAGA,EAAIN,EAAWE,OAAQI,IACnC,GAAID,EAAmBL,EAAWM,GAC9B,OAAOL,EAAOK,GAGtB,OAAOL,EAAOA,EAAOC,OAAS,GAEtC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,9 +13,6 @@ type HEX = `#${string}`;
|
|
|
13
13
|
type STANDARD_COLORS = "red" | "blue" | "green" | "gold" | "grey" | "black" | "white";
|
|
14
14
|
type Color = RGB | RGBA | HSL | HEX | STANDARD_COLORS;
|
|
15
15
|
type ColorScale = (value: number) => Color;
|
|
16
|
-
declare const getPvalueStyle: (pvalue: number | string) => {
|
|
17
|
-
backgroundColor: Color;
|
|
18
|
-
};
|
|
19
16
|
declare function colorscale({ transform, thresholds, colors, }: {
|
|
20
17
|
transform?: (value: number) => number;
|
|
21
18
|
thresholds: readonly number[];
|
|
@@ -104,5 +101,5 @@ declare function LoadingProvider({ children }: {
|
|
|
104
101
|
}): React.JSX.Element;
|
|
105
102
|
declare function useLoading(): LoadingContextType;
|
|
106
103
|
|
|
107
|
-
export { APIError, COLOR_BLIND_FRIENDLY_PALETTES, LoadingProvider, _deepCopy, _get, _hasOwnProperty, _isEmpty, _isJSON, _isNA, _isNull, _isObject, backendFetch, backendFetchFromRequest, caseInsensitiveIncludes, colorscale, formatMultiline,
|
|
104
|
+
export { APIError, COLOR_BLIND_FRIENDLY_PALETTES, LoadingProvider, _deepCopy, _get, _hasOwnProperty, _isEmpty, _isJSON, _isNA, _isNull, _isObject, backendFetch, backendFetchFromRequest, caseInsensitiveIncludes, colorscale, formatMultiline, getUrlParam, isAPIError, jsonSyntaxHighlight, linkify, negLog10, safeHtml, toExponential, toFixedWithoutZeros, toTitleCase, useLoading, userAgentIsBrowser };
|
|
108
105
|
export type { APIErrorResponse, APIPagination, APIResponse, APIResult, BasicType, Color, ColorScale, Expand, ExpandRecursively, Modify, NAString, Range, TypeMapper };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{COLOR_BLIND_FRIENDLY_PALETTES,colorscale
|
|
1
|
+
export{COLOR_BLIND_FRIENDLY_PALETTES,colorscale}from"./colors.js";export{APIError,isAPIError}from"./errors.js";export{safeHtml}from"./formatters.js";export{_deepCopy,_get,_hasOwnProperty,_isEmpty,_isJSON,_isNA,_isNull,_isObject,caseInsensitiveIncludes,formatMultiline,getUrlParam,jsonSyntaxHighlight,linkify,negLog10,toExponential,toFixedWithoutZeros,toTitleCase}from"./utils.js";export{backendFetch,backendFetchFromRequest,userAgentIsBrowser}from"./route-handlers.js";export{LoadingProvider,useLoading}from"./components/providers/LoadingProvider.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niagads/common",
|
|
3
|
-
"version": "0.2.2-alpha.64.sha-
|
|
3
|
+
"version": "0.2.2-alpha.64.sha-298ab6e7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/NIAGADS/niagads-viz-monorepo.git"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "298ab6e725b3547361304372eea54d605feb8700"
|
|
48
48
|
}
|