@niagads/common 0.2.2-alpha.53.sha-a0f6f786 → 0.2.2-alpha.64.sha-b63f7c25

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.
@@ -25,12 +25,12 @@
25
25
  .content-section-centered,
26
26
  .content-section-narrow {
27
27
  width: 100%;
28
- max-width: 1200px;
28
+ max-width: 1280px;
29
29
  margin: 0 auto;
30
30
  padding: 1.5rem;
31
31
  }
32
32
 
33
- @media (min-width: 1440px) {
33
+ @media (min-width: 1640px) {
34
34
  .content-section-centered {
35
35
  max-width: 1440px;
36
36
  }
@@ -10,19 +10,19 @@
10
10
 
11
11
  .mdx-content :is(h1, h2, h3, h4, h5, h6) {
12
12
  color: var(--gray-900);
13
- font-family: var(--font-inter);
13
+ /* font-family: var(--font-inter); */
14
14
  font-weight: 600;
15
15
  line-height: 1.25;
16
- margin-block: 2rem 0.75rem;
16
+ /* margin-block: 2rem 0.75rem; */
17
17
  }
18
18
 
19
- .mdx-content h1 {
19
+ /* .mdx-content h1 {
20
20
  font-size: 2rem;
21
21
  }
22
22
 
23
23
  .mdx-content h2 {
24
24
  font-size: 1.5rem;
25
- }
25
+ } */
26
26
 
27
27
  .mdx-content #on-this-page {
28
28
  font-size: 1.125rem;
@@ -46,12 +46,12 @@
46
46
  }
47
47
 
48
48
  .mdx-content h3 {
49
- font-size: 1.25rem;
49
+ /* font-size: 1.25rem; */
50
50
  }
51
51
 
52
- .mdx-content :is(h4, h5, h6) {
52
+ /* .mdx-content :is(h4, h5, h6) {
53
53
  font-size: 1.125rem;
54
- }
54
+ } */
55
55
 
56
56
  .mdx-content :is(p, ul, ol, blockquote, pre, table, figure) {
57
57
  margin-block: 1rem;
@@ -74,7 +74,11 @@ body {
74
74
  /* Links */
75
75
  a {
76
76
  color: var(--secondary-blue);
77
- /* text-decoration: none; */
77
+ text-decoration: none;
78
+ }
79
+
80
+ a:hover {
81
+ text-decoration: underline;
78
82
  }
79
83
 
80
84
  /* Focus management */
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"]};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};
1
+ const r={PuBlRd:["#601A4A","#EE442F","#63ACBE"],RdBlPu:["#EE442F","#601A4A","#63ACBE"],eight_color:["#332288","#117733","#44AA99","#88CCEE","#DDCC77","#CC6677","#AA4499","#882255"]},o=r=>{const o=String(r);let e;if(o.includes("e-")){const r=o.split("e-");parseInt(r[1])>50&&(e=50)}e||(e=-Math.log10(Number(r)));return{backgroundColor:t({thresholds:[.3,3,6,7.3,50],colors:["rgba(60,80,100,1)","rgb(254,220,220)","rgb(252,140,140)","rgb(255,200,120)","rgb(150,230,150)","rgb(150,210,255)"]})(e)}};function t({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,t as colorscale,o as getPvalueStyle};
2
2
  //# sourceMappingURL=colors.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.tsx"],"sourcesContent":[null],"names":["COLOR_BLIND_FRIENDLY_PALETTES","PuBlRd","RdBlPu","eight_color","getPvalueStyle","pvalue","strValue","String","neglog10p","includes","parts","split","parseInt","Math","log10","Number","backgroundColor","colorscale","thresholds","colors","scale","transform","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,YAclFC,EAAkBC,IAC3B,MAAMC,EAAWC,OAAOF,GACxB,IAAIG,EACJ,GAAIF,EAASG,SAAS,MAAO,CACzB,MAAMC,EAAQJ,EAASK,MAAM,MACZC,SAASF,EAAM,IACjB,KACXF,EAAY,GAEpB,CACKA,IACDA,GAAaK,KAAKC,MAAMC,OAAOV,KAenC,MAAO,CAAEW,gBAbKC,EAAW,CACrBC,WAAY,CAAC,GAAK,EAAG,EAAG,IAAK,IAC7BC,OAAQ,CACJ,oBACA,mBACA,mBACA,mBACA,mBACA,qBAGeC,CAAMZ,KA2C3B,SAAUS,GAAWI,UACvBA,EAASH,WACTA,EAAUC,OACVA,IAMA,GAAIA,EAAOG,SAAWJ,EAAWI,OAAS,EACtC,MAAM,IAAIC,MAEF,4EAAOL,EAAWI,yBAAyBH,EAAOG,kBAI9D,OAAQE,IACJ,MAAMC,EAAmBJ,EAAYA,EAAUG,GAASA,EACxD,IAAK,IAAIE,EAAI,EAAGA,EAAIR,EAAWI,OAAQI,IACnC,GAAID,EAAmBP,EAAWQ,GAC9B,OAAOP,EAAOO,GAGtB,OAAOP,EAAOA,EAAOG,OAAS,GAEtC"}
package/dist/index.d.ts CHANGED
@@ -13,6 +13,9 @@ 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
+ };
16
19
  declare function colorscale({ transform, thresholds, colors, }: {
17
20
  transform?: (value: number) => number;
18
21
  thresholds: readonly number[];
@@ -101,5 +104,5 @@ declare function LoadingProvider({ children }: {
101
104
  }): React.JSX.Element;
102
105
  declare function useLoading(): LoadingContextType;
103
106
 
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 };
107
+ export { APIError, COLOR_BLIND_FRIENDLY_PALETTES, LoadingProvider, _deepCopy, _get, _hasOwnProperty, _isEmpty, _isJSON, _isNA, _isNull, _isObject, backendFetch, backendFetchFromRequest, caseInsensitiveIncludes, colorscale, formatMultiline, getPvalueStyle, getUrlParam, isAPIError, jsonSyntaxHighlight, linkify, negLog10, safeHtml, toExponential, toFixedWithoutZeros, toTitleCase, useLoading, userAgentIsBrowser };
105
108
  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}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";
1
+ export{COLOR_BLIND_FRIENDLY_PALETTES,colorscale,getPvalueStyle}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.53.sha-a0f6f786",
3
+ "version": "0.2.2-alpha.64.sha-b63f7c25",
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": "a0f6f7860ed1e8d678f19d632a595a33a013c725"
47
+ "gitHead": "b63f7c252fc12b430e30783e784629691b1797ca"
48
48
  }