@macrostrat/map-interface 2.0.1 → 2.1.0
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/CHANGELOG.md +10 -0
- package/dist/container.js +2 -2
- package/dist/container.js.map +1 -1
- package/dist/context-panel/index.js +2 -2
- package/dist/context-panel/index.js.map +1 -1
- package/dist/context-panel/main.module.sass.cjs +6 -1
- package/dist/context-panel/main.module.sass.cjs.map +1 -1
- package/dist/context-panel/main.module.sass.js +4 -1
- package/dist/context-panel/main.module.sass.js.map +1 -1
- package/dist/controls.js +2 -2
- package/dist/controls.js.map +1 -1
- package/dist/dev/main.module.sass.cjs +6 -1
- package/dist/dev/main.module.sass.cjs.map +1 -1
- package/dist/dev/main.module.sass.js +4 -1
- package/dist/dev/main.module.sass.js.map +1 -1
- package/dist/dev/map-page.js +2 -2
- package/dist/dev/map-page.js.map +1 -1
- package/dist/dev/vector-tile-features.cjs +3 -3
- package/dist/dev/vector-tile-features.cjs.map +1 -1
- package/dist/dev/vector-tile-features.js +3 -3
- package/dist/dev/vector-tile-features.js.map +1 -1
- package/dist/index.cjs +6 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/location-details/fossil-collections/collections.js +2 -2
- package/dist/location-details/fossil-collections/collections.js.map +1 -1
- package/dist/location-details/fossil-collections/main.module.sass.cjs +6 -1
- package/dist/location-details/fossil-collections/main.module.sass.cjs.map +1 -1
- package/dist/location-details/fossil-collections/main.module.sass.js +4 -1
- package/dist/location-details/fossil-collections/main.module.sass.js.map +1 -1
- package/dist/location-details/index.d.ts +0 -1
- package/dist/location-details/info-blocks.cjs +0 -22
- package/dist/location-details/info-blocks.cjs.map +1 -1
- package/dist/location-details/info-blocks.js +2 -24
- package/dist/location-details/info-blocks.js.map +1 -1
- package/dist/location-details/info-blocks.module.sass.cjs +6 -1
- package/dist/location-details/info-blocks.module.sass.cjs.map +1 -1
- package/dist/location-details/info-blocks.module.sass.js +4 -1
- package/dist/location-details/info-blocks.module.sass.js.map +1 -1
- package/dist/location-details/macrostrat-linked.cjs +82 -129
- package/dist/location-details/macrostrat-linked.cjs.map +1 -1
- package/dist/location-details/macrostrat-linked.js +29 -75
- package/dist/location-details/macrostrat-linked.js.map +1 -1
- package/dist/location-details/main.module.sass.cjs +6 -1
- package/dist/location-details/main.module.sass.cjs.map +1 -1
- package/dist/location-details/main.module.sass.js +4 -1
- package/dist/location-details/main.module.sass.js.map +1 -1
- package/dist/location-details/physiography.cjs +2 -2
- package/dist/location-details/physiography.cjs.map +1 -1
- package/dist/location-details/physiography.js +1 -1
- package/dist/location-details/physiography.js.map +1 -1
- package/dist/location-details/reg-strat.cjs +2 -2
- package/dist/location-details/reg-strat.cjs.map +1 -1
- package/dist/location-details/reg-strat.js +1 -1
- package/dist/location-details/reg-strat.js.map +1 -1
- package/dist/location-panel/header.js +2 -2
- package/dist/location-panel/header.js.map +1 -1
- package/dist/location-panel/index.js +2 -2
- package/dist/location-panel/index.js.map +1 -1
- package/dist/location-panel/main.module.sass.cjs +6 -1
- package/dist/location-panel/main.module.sass.cjs.map +1 -1
- package/dist/location-panel/main.module.sass.js +4 -1
- package/dist/location-panel/main.module.sass.js.map +1 -1
- package/dist/main.module.sass.cjs +6 -1
- package/dist/main.module.sass.cjs.map +1 -1
- package/dist/main.module.sass.js +4 -1
- package/dist/main.module.sass.js.map +1 -1
- package/dist/map-interface.css +43 -215
- package/dist/map-view.js +2 -2
- package/dist/map-view.js.map +1 -1
- package/package.json +8 -8
- package/src/dev/vector-tile-features.ts +1 -1
- package/src/index.ts +0 -1
- package/src/location-details/index.ts +0 -1
- package/src/location-details/macrostrat-linked.ts +29 -81
- package/src/location-details/main.module.sass +0 -1
- package/src/location-details/physiography.ts +1 -1
- package/src/location-details/reg-strat.ts +1 -1
- package/dist/expansion-panel/headers.cjs +0 -22
- package/dist/expansion-panel/headers.cjs.map +0 -1
- package/dist/expansion-panel/headers.d.ts +0 -1
- package/dist/expansion-panel/headers.js +0 -20
- package/dist/expansion-panel/headers.js.map +0 -1
- package/dist/expansion-panel/index.cjs +0 -128
- package/dist/expansion-panel/index.cjs.map +0 -1
- package/dist/expansion-panel/index.d.ts +0 -18
- package/dist/expansion-panel/index.js +0 -125
- package/dist/expansion-panel/index.js.map +0 -1
- package/dist/expansion-panel/main.module.sass.cjs +0 -27
- package/dist/expansion-panel/main.module.sass.cjs.map +0 -1
- package/dist/expansion-panel/main.module.sass.js +0 -27
- package/dist/expansion-panel/main.module.sass.js.map +0 -1
- package/dist/location-details/fetch.d.ts +0 -4
- package/dist/location-details/utils/index.cjs +0 -15
- package/dist/location-details/utils/index.cjs.map +0 -1
- package/dist/location-details/utils/index.js +0 -15
- package/dist/location-details/utils/index.js.map +0 -1
- package/dist/location-details/xdd-panel/article.cjs +0 -64
- package/dist/location-details/xdd-panel/article.cjs.map +0 -1
- package/dist/location-details/xdd-panel/article.d.ts +0 -1
- package/dist/location-details/xdd-panel/article.js +0 -62
- package/dist/location-details/xdd-panel/article.js.map +0 -1
- package/dist/location-details/xdd-panel/index.cjs +0 -71
- package/dist/location-details/xdd-panel/index.cjs.map +0 -1
- package/dist/location-details/xdd-panel/index.d.ts +0 -18
- package/dist/location-details/xdd-panel/index.js +0 -69
- package/dist/location-details/xdd-panel/index.js.map +0 -1
- package/dist/location-details/xdd-panel/journal.cjs +0 -27
- package/dist/location-details/xdd-panel/journal.cjs.map +0 -1
- package/dist/location-details/xdd-panel/journal.d.ts +0 -20
- package/dist/location-details/xdd-panel/journal.js +0 -25
- package/dist/location-details/xdd-panel/journal.js.map +0 -1
- package/src/expansion-panel/headers.ts +0 -18
- package/src/expansion-panel/index.ts +0 -135
- package/src/expansion-panel/main.module.sass +0 -157
- package/src/location-details/fetch.ts +0 -57
- package/src/location-details/location-details.stories.ts +0 -88
- package/src/location-details/xdd-panel/article.ts +0 -67
- package/src/location-details/xdd-panel/index.ts +0 -70
- package/src/location-details/xdd-panel/journal.ts +0 -60
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tabs, Tab } from "@blueprintjs/core";
|
|
3
3
|
import h$1 from "@macrostrat/hyper";
|
|
4
|
-
import
|
|
4
|
+
import h$2 from "./main.module.sass.js";
|
|
5
5
|
import { makeOccurrenceTree } from "../utils/fossils.js";
|
|
6
|
-
const h = h$1.styled(
|
|
6
|
+
const h = h$1.styled(h$2);
|
|
7
7
|
function PBDBCollections({ data }) {
|
|
8
8
|
if (data == null) return null;
|
|
9
9
|
return h(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","sources":["../../../src/location-details/fossil-collections/collections.tsx"],"sourcesContent":["import React from \"react\";\nimport { Tabs, Tab } from \"@blueprintjs/core\";\nimport { makeOccurrenceTree } from \"../utils\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nconst h = hyper.styled(styles);\n\nexport default function PBDBCollections({ data }) {\n if (data == null) return null;\n return h(\n \"div.collections\",\n data.map((col, ix) => h(FossilCollection, { key: ix, col })),\n );\n}\n\nfunction FossilCollection({ col }) {\n let occurrenceTree = makeOccurrenceTree(col.occurrences);\n return h(\n \"div.fossil-collection\",\n <>\n <Header col={col} />\n <Tabs>\n <Tab title=\"Info\" panel={<InfoPanel col={col} />} id=\"info\" />\n <Tab\n id=\"occ\"\n title={`Occurrences (${col.occurrences.length})`}\n disabled={col.occurrences.length == 0}\n panel={<OccurencesPanel occurrenceTree={occurrenceTree} />}\n />\n </Tabs>\n </>,\n );\n}\n\nfunction CollectionNumber({ col }) {\n const num = col.oid.replace(\"col:\", \"\");\n return h(\"div.collection-number\", [\n h(\"span.collection-number-prefix\", \"#\"),\n h(\n \"a\",\n {\n href: `https://paleobiodb.org/classic/basicCollectionSearch?collection_no=${num}`,\n target: \"_blank\",\n },\n num,\n ),\n ]);\n}\n\nfunction Header({ col }) {\n return h(\"div.pbdb-panel-header\", [\n h.if(col.nam)(\"h4\", {}, col.nam),\n h.if(col.oid)(CollectionNumber, { col }),\n ]);\n}\n\nfunction InfoPanel(props) {\n const { col } = props;\n\n return (\n <div>\n {col.oei && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Age: </span> {col.oei} ({col.lag} - {col.lag}\n <span className=\"age-chip-ma\">Ma</span>)\n </div>\n )}\n {col.sgr && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Group: </span> {col.sgr}\n </div>\n )}\n {col.sfm && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Formation: </span> {col.sfm}\n </div>\n )}\n {col.lt1 && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Lithology: </span> {col.la1 ? col.la1 : \"\"}{\" \"}\n {col.lf1 ? col.lf1 : \"\"} {col.lt1.replace('\"', \"\")}{\" \"}\n {col.lt2 ? \", \" : \"\"}\n {col.la2 ? col.la2 : \"\"} {col.lf2 ? col.lf2 : \"\"} {col.lt2}\n </div>\n )}\n {col.env && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Environment: </span> {col.env}\n </div>\n )}\n {col.ref && (\n <div className=\"reference map-source-attr\">\n <span className=\"attr\">Reference: </span>{\" \"}\n <span dangerouslySetInnerHTML={{ __html: col.ref }}></span>\n </div>\n )}\n </div>\n );\n}\n\nfunction OccurencesPanel(props) {\n const { occurrenceTree } = props;\n\n return (\n <div>\n <ul className=\"taxon-list phylum-list\">\n {occurrenceTree.phyla.map((phylum, pidx) => {\n return (\n <div key={pidx} className=\"phyla\">\n <li>{phylum.phylum}</li>\n <ul className=\"taxon-list\">\n {phylum.classes.map((cls, clsidx) => {\n return (\n <div key={clsidx} className=\"classes\">\n <li>{cls.nameClass}</li>\n <ul className=\"taxon-list\">\n {cls.families.map((family, familyidx) => {\n return (\n <div key={familyidx} className=\"families\">\n <li>{family.family}</li>\n <ul className=\"taxon-list genera\">\n {family.genera.map((genus, genusidx) => {\n return (\n <li key={genusidx}>\n {genus.old_name\n ? '\"' + genus.old_name + '\" - '\n : \"\"}\n {genus.genusRes ? genus.genusRes : \" \"}\n {genus.display_name1}\n <i>\n {genus.display_name2\n ? genus.display_name2\n : \"\"}\n {genus.display_name3\n ? genus.display_name3\n : \"\"}\n </i>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"names":["hyper"],"mappings":";;;;;AAKA,MAAM,IAAIA,IAAM,
|
|
1
|
+
{"version":3,"file":"collections.js","sources":["../../../src/location-details/fossil-collections/collections.tsx"],"sourcesContent":["import React from \"react\";\nimport { Tabs, Tab } from \"@blueprintjs/core\";\nimport { makeOccurrenceTree } from \"../utils\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nconst h = hyper.styled(styles);\n\nexport default function PBDBCollections({ data }) {\n if (data == null) return null;\n return h(\n \"div.collections\",\n data.map((col, ix) => h(FossilCollection, { key: ix, col })),\n );\n}\n\nfunction FossilCollection({ col }) {\n let occurrenceTree = makeOccurrenceTree(col.occurrences);\n return h(\n \"div.fossil-collection\",\n <>\n <Header col={col} />\n <Tabs>\n <Tab title=\"Info\" panel={<InfoPanel col={col} />} id=\"info\" />\n <Tab\n id=\"occ\"\n title={`Occurrences (${col.occurrences.length})`}\n disabled={col.occurrences.length == 0}\n panel={<OccurencesPanel occurrenceTree={occurrenceTree} />}\n />\n </Tabs>\n </>,\n );\n}\n\nfunction CollectionNumber({ col }) {\n const num = col.oid.replace(\"col:\", \"\");\n return h(\"div.collection-number\", [\n h(\"span.collection-number-prefix\", \"#\"),\n h(\n \"a\",\n {\n href: `https://paleobiodb.org/classic/basicCollectionSearch?collection_no=${num}`,\n target: \"_blank\",\n },\n num,\n ),\n ]);\n}\n\nfunction Header({ col }) {\n return h(\"div.pbdb-panel-header\", [\n h.if(col.nam)(\"h4\", {}, col.nam),\n h.if(col.oid)(CollectionNumber, { col }),\n ]);\n}\n\nfunction InfoPanel(props) {\n const { col } = props;\n\n return (\n <div>\n {col.oei && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Age: </span> {col.oei} ({col.lag} - {col.lag}\n <span className=\"age-chip-ma\">Ma</span>)\n </div>\n )}\n {col.sgr && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Group: </span> {col.sgr}\n </div>\n )}\n {col.sfm && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Formation: </span> {col.sfm}\n </div>\n )}\n {col.lt1 && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Lithology: </span> {col.la1 ? col.la1 : \"\"}{\" \"}\n {col.lf1 ? col.lf1 : \"\"} {col.lt1.replace('\"', \"\")}{\" \"}\n {col.lt2 ? \", \" : \"\"}\n {col.la2 ? col.la2 : \"\"} {col.lf2 ? col.lf2 : \"\"} {col.lt2}\n </div>\n )}\n {col.env && (\n <div className=\"map-source-attr\">\n <span className=\"attr\">Environment: </span> {col.env}\n </div>\n )}\n {col.ref && (\n <div className=\"reference map-source-attr\">\n <span className=\"attr\">Reference: </span>{\" \"}\n <span dangerouslySetInnerHTML={{ __html: col.ref }}></span>\n </div>\n )}\n </div>\n );\n}\n\nfunction OccurencesPanel(props) {\n const { occurrenceTree } = props;\n\n return (\n <div>\n <ul className=\"taxon-list phylum-list\">\n {occurrenceTree.phyla.map((phylum, pidx) => {\n return (\n <div key={pidx} className=\"phyla\">\n <li>{phylum.phylum}</li>\n <ul className=\"taxon-list\">\n {phylum.classes.map((cls, clsidx) => {\n return (\n <div key={clsidx} className=\"classes\">\n <li>{cls.nameClass}</li>\n <ul className=\"taxon-list\">\n {cls.families.map((family, familyidx) => {\n return (\n <div key={familyidx} className=\"families\">\n <li>{family.family}</li>\n <ul className=\"taxon-list genera\">\n {family.genera.map((genus, genusidx) => {\n return (\n <li key={genusidx}>\n {genus.old_name\n ? '\"' + genus.old_name + '\" - '\n : \"\"}\n {genus.genusRes ? genus.genusRes : \" \"}\n {genus.display_name1}\n <i>\n {genus.display_name2\n ? genus.display_name2\n : \"\"}\n {genus.display_name3\n ? genus.display_name3\n : \"\"}\n </i>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"names":["hyper","styles"],"mappings":";;;;;AAKA,MAAM,IAAIA,IAAM,OAAOC,GAAM;AAE7B,SAAwB,gBAAgB,EAAE,QAAQ;AAChD,MAAI,QAAQ,KAAM,QAAO;AACzB,SAAO;AAAA,IACL;AAAA,IACA,KAAK,IAAI,CAAC,KAAK,OAAO,EAAE,kBAAkB,EAAE,KAAK,IAAI,KAAK,CAAC;AAAA,EAAA;AAE/D;AAEA,SAAS,iBAAiB,EAAE,OAAO;AACjC,MAAI,iBAAiB,mBAAmB,IAAI,WAAW;AACvD,SAAO;AAAA,IACL;AAAA,8DAEE,sBAAA,cAAC,QAAA,EAAO,KAAU,GAClB,sBAAA,cAAC,YACC,sBAAA,cAAC,KAAA,EAAI,OAAM,QAAO,OAAO,sBAAA,cAAC,WAAA,EAAU,KAAU,GAAI,IAAG,QAAO,GAC5D,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,OAAO,gBAAgB,IAAI,YAAY,MAAM;AAAA,QAC7C,UAAU,IAAI,YAAY,UAAU;AAAA,QACpC,OAAO,sBAAA,cAAC,iBAAA,EAAgB,eAAA,CAAgC;AAAA,MAAA;AAAA,IAAA,CAE5D,CACF;AAAA,EAAA;AAEJ;AAEA,SAAS,iBAAiB,EAAE,OAAO;AACjC,QAAM,MAAM,IAAI,IAAI,QAAQ,QAAQ,EAAE;AACtC,SAAO,EAAE,yBAAyB;AAAA,IAChC,EAAE,iCAAiC,GAAG;AAAA,IACtC;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM,sEAAsE,GAAG;AAAA,QAC/E,QAAQ;AAAA,MAAA;AAAA,MAEV;AAAA,IAAA;AAAA,EACF,CACD;AACH;AAEA,SAAS,OAAO,EAAE,OAAO;AACvB,SAAO,EAAE,yBAAyB;AAAA,IAChC,EAAE,GAAG,IAAI,GAAG,EAAE,MAAM,CAAA,GAAI,IAAI,GAAG;AAAA,IAC/B,EAAE,GAAG,IAAI,GAAG,EAAE,kBAAkB,EAAE,KAAK;AAAA,EAAA,CACxC;AACH;AAEA,SAAS,UAAU,OAAO;AACxB,QAAM,EAAE,QAAQ;AAEhB,SACE,sBAAA,cAAC,OAAA,MACE,IAAI,2CACF,OAAA,EAAI,WAAU,kBAAA,GACb,sBAAA,cAAC,UAAK,WAAU,OAAA,GAAO,OAAK,GAAO,KAAE,IAAI,KAAI,MAAG,IAAI,KAAI,OAAI,IAAI,KAChE,sBAAA,cAAC,UAAK,WAAU,cAAA,GAAc,IAAE,GAAO,GACzC,GAED,IAAI,OACH,sBAAA,cAAC,SAAI,WAAU,kBAAA,GACb,sBAAA,cAAC,QAAA,EAAK,WAAU,UAAO,SAAO,GAAO,KAAE,IAAI,GAC7C,GAED,IAAI,OACH,sBAAA,cAAC,OAAA,EAAI,WAAU,kBAAA,uCACZ,QAAA,EAAK,WAAU,OAAA,GAAO,aAAW,GAAO,KAAE,IAAI,GACjD,GAED,IAAI,OACH,sBAAA,cAAC,OAAA,EAAI,WAAU,qBACb,sBAAA,cAAC,QAAA,EAAK,WAAU,OAAA,GAAO,aAAW,GAAO,KAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAClE,IAAI,MAAM,IAAI,MAAM,IAAG,KAAE,IAAI,IAAI,QAAQ,KAAK,EAAE,GAAG,KACnD,IAAI,MAAM,OAAO,IACjB,IAAI,MAAM,IAAI,MAAM,IAAG,KAAE,IAAI,MAAM,IAAI,MAAM,IAAG,KAAE,IAAI,GACzD,GAED,IAAI,OACH,sBAAA,cAAC,OAAA,EAAI,WAAU,kBAAA,GACb,sBAAA,cAAC,UAAK,WAAU,OAAA,GAAO,eAAa,GAAO,KAAE,IAAI,GACnD,GAED,IAAI,OACH,sBAAA,cAAC,OAAA,EAAI,WAAU,mEACZ,QAAA,EAAK,WAAU,OAAA,GAAO,aAAW,GAAQ,KAC1C,sBAAA,cAAC,QAAA,EAAK,yBAAyB,EAAE,QAAQ,IAAI,MAAI,CAAG,CACtD,CAEJ;AAEJ;AAEA,SAAS,gBAAgB,OAAO;AAC9B,QAAM,EAAE,mBAAmB;AAE3B,SACE,sBAAA,cAAC,OAAA,MACC,sBAAA,cAAC,MAAA,EAAG,WAAU,yBAAA,GACX,eAAe,MAAM,IAAI,CAAC,QAAQ,SAAS;AAC1C,WACE,sBAAA,cAAC,SAAI,KAAK,MAAM,WAAU,QAAA,GACxB,sBAAA,cAAC,YAAI,OAAO,MAAO,GACnB,sBAAA,cAAC,MAAA,EAAG,WAAU,gBACX,OAAO,QAAQ,IAAI,CAAC,KAAK,WAAW;AACnC,aACE,sBAAA,cAAC,SAAI,KAAK,QAAQ,WAAU,UAAA,GAC1B,sBAAA,cAAC,YAAI,IAAI,SAAU,GACnB,sBAAA,cAAC,MAAA,EAAG,WAAU,gBACX,IAAI,SAAS,IAAI,CAAC,QAAQ,cAAc;AACvC,eACE,sBAAA,cAAC,SAAI,KAAK,WAAW,WAAU,WAAA,GAC7B,sBAAA,cAAC,YAAI,OAAO,MAAO,GACnB,sBAAA,cAAC,MAAA,EAAG,WAAU,uBACX,OAAO,OAAO,IAAI,CAAC,OAAO,aAAa;AACtC,iBACE,sBAAA,cAAC,MAAA,EAAG,KAAK,SAAA,GACN,MAAM,WACH,MAAM,MAAM,WAAW,SACvB,IACH,MAAM,WAAW,MAAM,WAAW,KAClC,MAAM,eACP,sBAAA,cAAC,KAAA,MACE,MAAM,gBACH,MAAM,gBACN,IACH,MAAM,gBACH,MAAM,gBACN,EACN,CACF;AAAA,QAEJ,CAAC,CACH,CACF;AAAA,MAEJ,CAAC,CACH,CACF;AAAA,IAEJ,CAAC,CACH,CACF;AAAA,EAEJ,CAAC,CACH,CACF;AAEJ;"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const h$1 = require("@macrostrat/hyper");
|
|
3
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
4
|
+
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
2
5
|
const styles = {
|
|
3
6
|
"pbdb-panel-header": "_pbdb-panel-header_i4zn4_1",
|
|
4
7
|
"fossil-collection": "_fossil-collection_i4zn4_14"
|
|
5
8
|
};
|
|
6
|
-
|
|
9
|
+
let h = h__default.default.styled(styles);
|
|
10
|
+
Object.assign(h, styles);
|
|
11
|
+
module.exports = h;
|
|
7
12
|
//# sourceMappingURL=main.module.sass.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import h$1 from "@macrostrat/hyper";
|
|
1
2
|
const styles = {
|
|
2
3
|
"pbdb-panel-header": "_pbdb-panel-header_i4zn4_1",
|
|
3
4
|
"fossil-collection": "_fossil-collection_i4zn4_14"
|
|
4
5
|
};
|
|
6
|
+
let h = h$1.styled(styles);
|
|
7
|
+
Object.assign(h, styles);
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
h as default
|
|
7
10
|
};
|
|
8
11
|
//# sourceMappingURL=main.module.sass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.module.sass.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.module.sass.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const h$1 = require("@macrostrat/hyper");
|
|
4
|
-
const index = require("./utils/index.cjs");
|
|
5
4
|
const infoBlocks_module = require("./info-blocks.module.sass.cjs");
|
|
6
5
|
const uiComponents = require("@macrostrat/ui-components");
|
|
7
6
|
const chroma = require("chroma-js");
|
|
@@ -58,27 +57,6 @@ function AgeChip(props) {
|
|
|
58
57
|
})
|
|
59
58
|
]);
|
|
60
59
|
}
|
|
61
|
-
function AttrChip(props) {
|
|
62
|
-
const {
|
|
63
|
-
fill = null,
|
|
64
|
-
color,
|
|
65
|
-
name,
|
|
66
|
-
className,
|
|
67
|
-
emphasized = true,
|
|
68
|
-
style
|
|
69
|
-
} = props;
|
|
70
|
-
return h("div.lith-chip", { style, className }, [
|
|
71
|
-
h(
|
|
72
|
-
"div.lith-chip-inner.chip",
|
|
73
|
-
{
|
|
74
|
-
style: { backgroundColor: index.hexToRgb(color, 0.6) },
|
|
75
|
-
className: emphasized ? "emphasized" : null
|
|
76
|
-
},
|
|
77
|
-
[name]
|
|
78
|
-
)
|
|
79
|
-
]);
|
|
80
|
-
}
|
|
81
60
|
exports.AgeChip = AgeChip;
|
|
82
|
-
exports.AttrChip = AttrChip;
|
|
83
61
|
exports.IntervalChip = IntervalChip;
|
|
84
62
|
//# sourceMappingURL=info-blocks.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-blocks.cjs","sources":["../../src/location-details/info-blocks.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { hexToRgb } from \"./utils\";\nimport styles from \"./info-blocks.module.sass\";\nimport { useDarkMode } from \"@macrostrat/ui-components\";\nimport chroma from \"chroma-js\";\n\nconst h = hyper.styled(styles);\n\nfunction getColor(color, darkenAmount) {\n try {\n return chroma(color).darken(darkenAmount).hex();\n } catch (err) {\n return color;\n }\n}\n\nfunction IntervalChip(props) {\n const { interval, className, intervalURL } = props;\n const darkMode = useDarkMode();\n const darkenAmount = darkMode.isEnabled ? 2 : 0;\n\n return h(\n \"a.chip-link\",\n {\n href: `${intervalURL}/${interval.int_id}`,\n },\n h(\n \"div.chip.age-chip\",\n {\n className,\n style: {\n backgroundColor: getColor(interval.color, darkenAmount),\n },\n },\n [\n h(\"div.age-chip-interval\", interval.int_name),\n h(\"div.age-chip-age\", [\n h(Age, { age: interval.b_age }),\n \" - \",\n h(Age, { age: interval.t_age }),\n ]),\n ],\n ),\n );\n}\n\nfunction Age({ age }) {\n return h(\"span.age\", [age, h(\"span.age-chip-ma\", [\"Ma\"])]);\n}\n\nfunction AgeChip(props) {\n const { t_int, b_int, intervalURL } = props;\n\n return h(\"div.age-chip-container\", [\n h(IntervalChip, { interval: b_int, intervalURL }),\n h.if(b_int.int_id != props.t_int.int_id)(IntervalChip, {\n interval: t_int,\n className: \"age-chip-t-int\",\n intervalURL,\n }),\n ]);\n}\n\nfunction AttrChip(props) {\n const {\n fill = null,\n color,\n name,\n className,\n emphasized = true,\n style,\n } = props;\n\n // Deactivated for now\n // if (fill) {\n // styles[\"backgroundImage\"] = `url('dist/img/geologic-patterns/${fill}.png')`;\n // }\n return h(\"div.lith-chip\", { style, className }, [\n h(\n \"div.lith-chip-inner.chip\",\n {\n style: { backgroundColor: hexToRgb(color, 0.6) },\n className: emphasized ? \"emphasized\" : null,\n },\n [name],\n ),\n ]);\n}\n\nexport { AgeChip, AttrChip, IntervalChip };\n"],"names":["hyper","styles","chroma","useDarkMode"
|
|
1
|
+
{"version":3,"file":"info-blocks.cjs","sources":["../../src/location-details/info-blocks.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { hexToRgb } from \"./utils\";\nimport styles from \"./info-blocks.module.sass\";\nimport { useDarkMode } from \"@macrostrat/ui-components\";\nimport chroma from \"chroma-js\";\n\nconst h = hyper.styled(styles);\n\nfunction getColor(color, darkenAmount) {\n try {\n return chroma(color).darken(darkenAmount).hex();\n } catch (err) {\n return color;\n }\n}\n\nfunction IntervalChip(props) {\n const { interval, className, intervalURL } = props;\n const darkMode = useDarkMode();\n const darkenAmount = darkMode.isEnabled ? 2 : 0;\n\n return h(\n \"a.chip-link\",\n {\n href: `${intervalURL}/${interval.int_id}`,\n },\n h(\n \"div.chip.age-chip\",\n {\n className,\n style: {\n backgroundColor: getColor(interval.color, darkenAmount),\n },\n },\n [\n h(\"div.age-chip-interval\", interval.int_name),\n h(\"div.age-chip-age\", [\n h(Age, { age: interval.b_age }),\n \" - \",\n h(Age, { age: interval.t_age }),\n ]),\n ],\n ),\n );\n}\n\nfunction Age({ age }) {\n return h(\"span.age\", [age, h(\"span.age-chip-ma\", [\"Ma\"])]);\n}\n\nfunction AgeChip(props) {\n const { t_int, b_int, intervalURL } = props;\n\n return h(\"div.age-chip-container\", [\n h(IntervalChip, { interval: b_int, intervalURL }),\n h.if(b_int.int_id != props.t_int.int_id)(IntervalChip, {\n interval: t_int,\n className: \"age-chip-t-int\",\n intervalURL,\n }),\n ]);\n}\n\nfunction AttrChip(props) {\n const {\n fill = null,\n color,\n name,\n className,\n emphasized = true,\n style,\n } = props;\n\n // Deactivated for now\n // if (fill) {\n // styles[\"backgroundImage\"] = `url('dist/img/geologic-patterns/${fill}.png')`;\n // }\n return h(\"div.lith-chip\", { style, className }, [\n h(\n \"div.lith-chip-inner.chip\",\n {\n style: { backgroundColor: hexToRgb(color, 0.6) },\n className: emphasized ? \"emphasized\" : null,\n },\n [name],\n ),\n ]);\n}\n\nexport { AgeChip, AttrChip, IntervalChip };\n"],"names":["hyper","styles","chroma","useDarkMode"],"mappings":";;;;;;;;;AAMA,MAAM,IAAIA,WAAAA,QAAM,OAAOC,yBAAM;AAE7B,SAAS,SAAS,OAAO,cAAc;AACrC,MAAI;AACF,WAAOC,gBAAAA,QAAO,KAAK,EAAE,OAAO,YAAY,EAAE,IAAA;AAAA,EAC5C,SAAS,KAAK;AACZ,WAAO;AAAA,EACT;AACF;AAEA,SAAS,aAAa,OAAO;AAC3B,QAAM,EAAE,UAAU,WAAW,YAAA,IAAgB;AAC7C,QAAM,WAAWC,aAAAA,YAAA;AACjB,QAAM,eAAe,SAAS,YAAY,IAAI;AAE9C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,MAAM,GAAG,WAAW,IAAI,SAAS,MAAM;AAAA,IAAA;AAAA,IAEzC;AAAA,MACE;AAAA,MACA;AAAA,QACE;AAAA,QACA,OAAO;AAAA,UACL,iBAAiB,SAAS,SAAS,OAAO,YAAY;AAAA,QAAA;AAAA,MACxD;AAAA,MAEF;AAAA,QACE,EAAE,yBAAyB,SAAS,QAAQ;AAAA,QAC5C,EAAE,oBAAoB;AAAA,UACpB,EAAE,KAAK,EAAE,KAAK,SAAS,OAAO;AAAA,UAC9B;AAAA,UACA,EAAE,KAAK,EAAE,KAAK,SAAS,OAAO;AAAA,QAAA,CAC/B;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAEJ;AAEA,SAAS,IAAI,EAAE,OAAO;AACpB,SAAO,EAAE,YAAY,CAAC,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3D;AAEA,SAAS,QAAQ,OAAO;AACtB,QAAM,EAAE,OAAO,OAAO,YAAA,IAAgB;AAEtC,SAAO,EAAE,0BAA0B;AAAA,IACjC,EAAE,cAAc,EAAE,UAAU,OAAO,aAAa;AAAA,IAChD,EAAE,GAAG,MAAM,UAAU,MAAM,MAAM,MAAM,EAAE,cAAc;AAAA,MACrD,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,IAAA,CACD;AAAA,EAAA,CACF;AACH;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import h$1 from "@macrostrat/hyper";
|
|
2
|
-
import
|
|
3
|
-
import styles from "./info-blocks.module.sass.js";
|
|
2
|
+
import h$2 from "./info-blocks.module.sass.js";
|
|
4
3
|
import { useDarkMode } from "@macrostrat/ui-components";
|
|
5
4
|
import chroma from "chroma-js";
|
|
6
|
-
const h = h$1.styled(
|
|
5
|
+
const h = h$1.styled(h$2);
|
|
7
6
|
function getColor(color, darkenAmount) {
|
|
8
7
|
try {
|
|
9
8
|
return chroma(color).darken(darkenAmount).hex();
|
|
@@ -53,29 +52,8 @@ function AgeChip(props) {
|
|
|
53
52
|
})
|
|
54
53
|
]);
|
|
55
54
|
}
|
|
56
|
-
function AttrChip(props) {
|
|
57
|
-
const {
|
|
58
|
-
fill = null,
|
|
59
|
-
color,
|
|
60
|
-
name,
|
|
61
|
-
className,
|
|
62
|
-
emphasized = true,
|
|
63
|
-
style
|
|
64
|
-
} = props;
|
|
65
|
-
return h("div.lith-chip", { style, className }, [
|
|
66
|
-
h(
|
|
67
|
-
"div.lith-chip-inner.chip",
|
|
68
|
-
{
|
|
69
|
-
style: { backgroundColor: hexToRgb(color, 0.6) },
|
|
70
|
-
className: emphasized ? "emphasized" : null
|
|
71
|
-
},
|
|
72
|
-
[name]
|
|
73
|
-
)
|
|
74
|
-
]);
|
|
75
|
-
}
|
|
76
55
|
export {
|
|
77
56
|
AgeChip,
|
|
78
|
-
AttrChip,
|
|
79
57
|
IntervalChip
|
|
80
58
|
};
|
|
81
59
|
//# sourceMappingURL=info-blocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-blocks.js","sources":["../../src/location-details/info-blocks.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { hexToRgb } from \"./utils\";\nimport styles from \"./info-blocks.module.sass\";\nimport { useDarkMode } from \"@macrostrat/ui-components\";\nimport chroma from \"chroma-js\";\n\nconst h = hyper.styled(styles);\n\nfunction getColor(color, darkenAmount) {\n try {\n return chroma(color).darken(darkenAmount).hex();\n } catch (err) {\n return color;\n }\n}\n\nfunction IntervalChip(props) {\n const { interval, className, intervalURL } = props;\n const darkMode = useDarkMode();\n const darkenAmount = darkMode.isEnabled ? 2 : 0;\n\n return h(\n \"a.chip-link\",\n {\n href: `${intervalURL}/${interval.int_id}`,\n },\n h(\n \"div.chip.age-chip\",\n {\n className,\n style: {\n backgroundColor: getColor(interval.color, darkenAmount),\n },\n },\n [\n h(\"div.age-chip-interval\", interval.int_name),\n h(\"div.age-chip-age\", [\n h(Age, { age: interval.b_age }),\n \" - \",\n h(Age, { age: interval.t_age }),\n ]),\n ],\n ),\n );\n}\n\nfunction Age({ age }) {\n return h(\"span.age\", [age, h(\"span.age-chip-ma\", [\"Ma\"])]);\n}\n\nfunction AgeChip(props) {\n const { t_int, b_int, intervalURL } = props;\n\n return h(\"div.age-chip-container\", [\n h(IntervalChip, { interval: b_int, intervalURL }),\n h.if(b_int.int_id != props.t_int.int_id)(IntervalChip, {\n interval: t_int,\n className: \"age-chip-t-int\",\n intervalURL,\n }),\n ]);\n}\n\nfunction AttrChip(props) {\n const {\n fill = null,\n color,\n name,\n className,\n emphasized = true,\n style,\n } = props;\n\n // Deactivated for now\n // if (fill) {\n // styles[\"backgroundImage\"] = `url('dist/img/geologic-patterns/${fill}.png')`;\n // }\n return h(\"div.lith-chip\", { style, className }, [\n h(\n \"div.lith-chip-inner.chip\",\n {\n style: { backgroundColor: hexToRgb(color, 0.6) },\n className: emphasized ? \"emphasized\" : null,\n },\n [name],\n ),\n ]);\n}\n\nexport { AgeChip, AttrChip, IntervalChip };\n"],"names":["hyper"],"mappings":"
|
|
1
|
+
{"version":3,"file":"info-blocks.js","sources":["../../src/location-details/info-blocks.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { hexToRgb } from \"./utils\";\nimport styles from \"./info-blocks.module.sass\";\nimport { useDarkMode } from \"@macrostrat/ui-components\";\nimport chroma from \"chroma-js\";\n\nconst h = hyper.styled(styles);\n\nfunction getColor(color, darkenAmount) {\n try {\n return chroma(color).darken(darkenAmount).hex();\n } catch (err) {\n return color;\n }\n}\n\nfunction IntervalChip(props) {\n const { interval, className, intervalURL } = props;\n const darkMode = useDarkMode();\n const darkenAmount = darkMode.isEnabled ? 2 : 0;\n\n return h(\n \"a.chip-link\",\n {\n href: `${intervalURL}/${interval.int_id}`,\n },\n h(\n \"div.chip.age-chip\",\n {\n className,\n style: {\n backgroundColor: getColor(interval.color, darkenAmount),\n },\n },\n [\n h(\"div.age-chip-interval\", interval.int_name),\n h(\"div.age-chip-age\", [\n h(Age, { age: interval.b_age }),\n \" - \",\n h(Age, { age: interval.t_age }),\n ]),\n ],\n ),\n );\n}\n\nfunction Age({ age }) {\n return h(\"span.age\", [age, h(\"span.age-chip-ma\", [\"Ma\"])]);\n}\n\nfunction AgeChip(props) {\n const { t_int, b_int, intervalURL } = props;\n\n return h(\"div.age-chip-container\", [\n h(IntervalChip, { interval: b_int, intervalURL }),\n h.if(b_int.int_id != props.t_int.int_id)(IntervalChip, {\n interval: t_int,\n className: \"age-chip-t-int\",\n intervalURL,\n }),\n ]);\n}\n\nfunction AttrChip(props) {\n const {\n fill = null,\n color,\n name,\n className,\n emphasized = true,\n style,\n } = props;\n\n // Deactivated for now\n // if (fill) {\n // styles[\"backgroundImage\"] = `url('dist/img/geologic-patterns/${fill}.png')`;\n // }\n return h(\"div.lith-chip\", { style, className }, [\n h(\n \"div.lith-chip-inner.chip\",\n {\n style: { backgroundColor: hexToRgb(color, 0.6) },\n className: emphasized ? \"emphasized\" : null,\n },\n [name],\n ),\n ]);\n}\n\nexport { AgeChip, AttrChip, IntervalChip };\n"],"names":["hyper","styles"],"mappings":";;;;AAMA,MAAM,IAAIA,IAAM,OAAOC,GAAM;AAE7B,SAAS,SAAS,OAAO,cAAc;AACrC,MAAI;AACF,WAAO,OAAO,KAAK,EAAE,OAAO,YAAY,EAAE,IAAA;AAAA,EAC5C,SAAS,KAAK;AACZ,WAAO;AAAA,EACT;AACF;AAEA,SAAS,aAAa,OAAO;AAC3B,QAAM,EAAE,UAAU,WAAW,YAAA,IAAgB;AAC7C,QAAM,WAAW,YAAA;AACjB,QAAM,eAAe,SAAS,YAAY,IAAI;AAE9C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,MAAM,GAAG,WAAW,IAAI,SAAS,MAAM;AAAA,IAAA;AAAA,IAEzC;AAAA,MACE;AAAA,MACA;AAAA,QACE;AAAA,QACA,OAAO;AAAA,UACL,iBAAiB,SAAS,SAAS,OAAO,YAAY;AAAA,QAAA;AAAA,MACxD;AAAA,MAEF;AAAA,QACE,EAAE,yBAAyB,SAAS,QAAQ;AAAA,QAC5C,EAAE,oBAAoB;AAAA,UACpB,EAAE,KAAK,EAAE,KAAK,SAAS,OAAO;AAAA,UAC9B;AAAA,UACA,EAAE,KAAK,EAAE,KAAK,SAAS,OAAO;AAAA,QAAA,CAC/B;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAEJ;AAEA,SAAS,IAAI,EAAE,OAAO;AACpB,SAAO,EAAE,YAAY,CAAC,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3D;AAEA,SAAS,QAAQ,OAAO;AACtB,QAAM,EAAE,OAAO,OAAO,YAAA,IAAgB;AAEtC,SAAO,EAAE,0BAA0B;AAAA,IACjC,EAAE,cAAc,EAAE,UAAU,OAAO,aAAa;AAAA,IAChD,EAAE,GAAG,MAAM,UAAU,MAAM,MAAM,MAAM,EAAE,cAAc;AAAA,MACrD,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,IAAA,CACD;AAAA,EAAA,CACF;AACH;"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const h$1 = require("@macrostrat/hyper");
|
|
4
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
|
+
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
3
6
|
const chip = "_chip_13xxi_1";
|
|
4
7
|
const emphasized = "_emphasized_13xxi_7";
|
|
5
8
|
const styles = {
|
|
@@ -12,7 +15,9 @@ const styles = {
|
|
|
12
15
|
"age-ma": "_age-ma_13xxi_34",
|
|
13
16
|
"lith-chip": "_lith-chip_13xxi_38"
|
|
14
17
|
};
|
|
18
|
+
let h = h__default.default.styled(styles);
|
|
19
|
+
Object.assign(h, styles);
|
|
15
20
|
exports.chip = chip;
|
|
16
|
-
exports.default =
|
|
21
|
+
exports.default = h;
|
|
17
22
|
exports.emphasized = emphasized;
|
|
18
23
|
//# sourceMappingURL=info-blocks.module.sass.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-blocks.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"info-blocks.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import h$1 from "@macrostrat/hyper";
|
|
1
2
|
const chip = "_chip_13xxi_1";
|
|
2
3
|
const emphasized = "_emphasized_13xxi_7";
|
|
3
4
|
const styles = {
|
|
@@ -10,9 +11,11 @@ const styles = {
|
|
|
10
11
|
"age-ma": "_age-ma_13xxi_34",
|
|
11
12
|
"lith-chip": "_lith-chip_13xxi_38"
|
|
12
13
|
};
|
|
14
|
+
let h = h$1.styled(styles);
|
|
15
|
+
Object.assign(h, styles);
|
|
13
16
|
export {
|
|
14
17
|
chip,
|
|
15
|
-
|
|
18
|
+
h as default,
|
|
16
19
|
emphasized
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=info-blocks.module.sass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-blocks.module.sass.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"info-blocks.module.sass.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const mapInterface = require("@macrostrat/map-interface");
|
|
5
|
-
const main_module = require("./main.module.sass.cjs");
|
|
3
|
+
const dataComponents = require("@macrostrat/data-components");
|
|
6
4
|
const scale = require("@visx/scale");
|
|
7
5
|
const axis = require("@visx/axis");
|
|
8
6
|
const chroma = require("chroma-js");
|
|
9
|
-
const dataComponents = require("@macrostrat/data-components");
|
|
10
7
|
const infoBlocks = require("./info-blocks.cjs");
|
|
8
|
+
const main_module = require("./main.module.sass.cjs");
|
|
11
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
12
|
-
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
13
10
|
const chroma__default = /* @__PURE__ */ _interopDefault(chroma);
|
|
14
|
-
const h = h__default.default.styled(main_module.default);
|
|
15
11
|
function MacrostratLinkedData(props) {
|
|
16
12
|
const {
|
|
17
13
|
mapInfo,
|
|
@@ -23,8 +19,8 @@ function MacrostratLinkedData(props) {
|
|
|
23
19
|
expanded = true
|
|
24
20
|
} = props;
|
|
25
21
|
if (!mapInfo.mapData[0]) return null;
|
|
26
|
-
return
|
|
27
|
-
|
|
22
|
+
return main_module.default(
|
|
23
|
+
dataComponents.ExpansionPanel,
|
|
28
24
|
{
|
|
29
25
|
className: "regional-panel",
|
|
30
26
|
title: "Macrostrat-linked data",
|
|
@@ -32,15 +28,14 @@ function MacrostratLinkedData(props) {
|
|
|
32
28
|
expanded
|
|
33
29
|
},
|
|
34
30
|
[
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
h(Economy, { source })
|
|
31
|
+
main_module.default("div", { classes: expansionPanelDetailClasses }, [
|
|
32
|
+
main_module.default(MatchBasis, { source, stratNameURL }),
|
|
33
|
+
main_module.default(AgeInformation, { mapInfo, source, intervalURL }),
|
|
34
|
+
main_module.default(Thickness, { source }),
|
|
35
|
+
main_module.default(MinorFossilCollections, { source }),
|
|
36
|
+
main_module.default(FossilOccs, { source }),
|
|
37
|
+
main_module.default(LithsAndClasses, { source, lithologyURL }),
|
|
38
|
+
main_module.default(Environments, { source, environmentURL })
|
|
44
39
|
])
|
|
45
40
|
]
|
|
46
41
|
);
|
|
@@ -51,15 +46,15 @@ const expansionPanelDetailClasses = {
|
|
|
51
46
|
function AgeInformation(props) {
|
|
52
47
|
const { source, mapInfo, intervalURL } = props;
|
|
53
48
|
const { macrostrat } = source;
|
|
54
|
-
if (!macrostrat?.b_age) return
|
|
55
|
-
return
|
|
49
|
+
if (!macrostrat?.b_age) return main_module.default(MapAgeRenderer, { mapInfo, intervalURL });
|
|
50
|
+
return main_module.default(MacrostratAgeInfo, { macrostrat, mapInfo, intervalURL });
|
|
56
51
|
}
|
|
57
52
|
function MapAgeRenderer(props) {
|
|
58
53
|
const { mapInfo, intervalURL, ...rest } = props;
|
|
59
|
-
return
|
|
54
|
+
return main_module.default(
|
|
60
55
|
DescribedAgeInfo,
|
|
61
56
|
{
|
|
62
|
-
ageElement:
|
|
57
|
+
ageElement: main_module.default(infoBlocks.AgeChip, {
|
|
63
58
|
b_int: mapInfo.mapData[0].b_int,
|
|
64
59
|
t_int: mapInfo.mapData[0].t_int,
|
|
65
60
|
intervalURL
|
|
@@ -70,10 +65,10 @@ function MapAgeRenderer(props) {
|
|
|
70
65
|
}
|
|
71
66
|
function DescribedAgeInfo(props) {
|
|
72
67
|
const { ageElement, children, className } = props;
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
return main_module.default("div.described-age.macrostrast-detail", [
|
|
69
|
+
main_module.default("div.expansion-summary-title", "Age"),
|
|
70
|
+
main_module.default("div.age-chips", null, ageElement),
|
|
71
|
+
main_module.default("div.description", children)
|
|
77
72
|
]);
|
|
78
73
|
}
|
|
79
74
|
function AgeRefinementBar({ scale: scale2, data, color, label = null }) {
|
|
@@ -95,7 +90,7 @@ function AgeRefinementBar({ scale: scale2, data, color, label = null }) {
|
|
|
95
90
|
textAlign = "end";
|
|
96
91
|
}
|
|
97
92
|
}
|
|
98
|
-
return
|
|
93
|
+
return main_module.default(
|
|
99
94
|
"div.age-refinement-bar",
|
|
100
95
|
{
|
|
101
96
|
style: {
|
|
@@ -107,7 +102,7 @@ function AgeRefinementBar({ scale: scale2, data, color, label = null }) {
|
|
|
107
102
|
position: "relative"
|
|
108
103
|
}
|
|
109
104
|
},
|
|
110
|
-
|
|
105
|
+
main_module.default(
|
|
111
106
|
"div.age-refinement-bar-label",
|
|
112
107
|
{
|
|
113
108
|
style: {
|
|
@@ -130,20 +125,20 @@ function AgeRefinementPlot({ macrostrat, mapInfo, intervalURL }) {
|
|
|
130
125
|
domain: [1.02 * b_age, t_age * 0.98],
|
|
131
126
|
range: [20, 360]
|
|
132
127
|
});
|
|
133
|
-
return
|
|
134
|
-
|
|
128
|
+
return main_module.default("div.age-refinement-plot", [
|
|
129
|
+
main_module.default(AgeRefinementBar, {
|
|
135
130
|
scale: scale$1,
|
|
136
131
|
data: macrostrat,
|
|
137
132
|
label: "Macrostrat age model"
|
|
138
133
|
}),
|
|
139
|
-
|
|
134
|
+
main_module.default(AgeRefinementBar, {
|
|
140
135
|
scale: scale$1,
|
|
141
136
|
data: mapData,
|
|
142
137
|
label: "Map legend"
|
|
143
138
|
}),
|
|
144
139
|
// Age axis
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
main_module.default("svg", { width: "100%", height: "40px" }, [
|
|
141
|
+
main_module.default(axis.AxisBottom, {
|
|
147
142
|
scale: scale$1,
|
|
148
143
|
numTicks: 5,
|
|
149
144
|
top: 1,
|
|
@@ -160,10 +155,10 @@ function MacrostratAgeInfoCore({ macrostrat, intervalURL }) {
|
|
|
160
155
|
if (b_int.int_id !== t_int.int_id) {
|
|
161
156
|
age += ` - ${t_int.int_name}`;
|
|
162
157
|
}
|
|
163
|
-
return
|
|
158
|
+
return main_module.default(
|
|
164
159
|
DescribedAgeInfo,
|
|
165
160
|
{
|
|
166
|
-
ageElement:
|
|
161
|
+
ageElement: main_module.default(infoBlocks.AgeChip, {
|
|
167
162
|
b_int: { ...b_int, int_name: age, b_age, t_age },
|
|
168
163
|
t_int: { ...b_int, int_name: age, b_age, t_age },
|
|
169
164
|
intervalURL
|
|
@@ -173,50 +168,48 @@ function MacrostratAgeInfoCore({ macrostrat, intervalURL }) {
|
|
|
173
168
|
);
|
|
174
169
|
}
|
|
175
170
|
function MacrostratAgeInfo(props) {
|
|
176
|
-
return
|
|
177
|
-
|
|
178
|
-
{ headerElement:
|
|
179
|
-
|
|
171
|
+
return main_module.default(
|
|
172
|
+
dataComponents.ExpandableDetailsPanel,
|
|
173
|
+
{ headerElement: main_module.default(MacrostratAgeInfoCore, props) },
|
|
174
|
+
main_module.default(AgeRefinementPlot, props)
|
|
180
175
|
);
|
|
181
176
|
}
|
|
182
177
|
function MatchBasis(props) {
|
|
183
178
|
const { source, stratNameURL } = props;
|
|
184
179
|
if (!source.macrostrat?.strat_names) return null;
|
|
185
|
-
return
|
|
186
|
-
|
|
180
|
+
return main_module.default(
|
|
181
|
+
dataComponents.ExpandableDetailsPanel,
|
|
187
182
|
{
|
|
188
183
|
className: "macrostrat-unit",
|
|
189
|
-
headerElement:
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
headerElement: main_module.default([
|
|
185
|
+
main_module.default("h3", source.macrostrat.strat_names[0].rank_name),
|
|
186
|
+
main_module.default("div.description", "Matched stratigraphic unit")
|
|
192
187
|
])
|
|
193
188
|
},
|
|
194
|
-
|
|
195
|
-
source.macrostrat.strat_names
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
})
|
|
209
|
-
])
|
|
189
|
+
source.macrostrat.strat_names?.map((name, i) => {
|
|
190
|
+
let lastElement = i == source.macrostrat.strat_names.length - 1;
|
|
191
|
+
return main_module.default("span", { key: i }, [
|
|
192
|
+
main_module.default(
|
|
193
|
+
"a.externalLink",
|
|
194
|
+
{
|
|
195
|
+
href: stratNameURL + "/" + name.strat_name_id,
|
|
196
|
+
key: i
|
|
197
|
+
},
|
|
198
|
+
[name.rank_name]
|
|
199
|
+
),
|
|
200
|
+
main_module.default.if(!lastElement)([", "])
|
|
201
|
+
]);
|
|
202
|
+
})
|
|
210
203
|
);
|
|
211
204
|
}
|
|
212
205
|
function Thickness(props) {
|
|
213
206
|
const { source } = props;
|
|
214
|
-
if (!source.macrostrat.max_thick) return
|
|
215
|
-
return
|
|
207
|
+
if (!source.macrostrat.max_thick) return main_module.default("div");
|
|
208
|
+
return main_module.default.if(source.macrostrat && source.macrostrat.max_thick)(
|
|
216
209
|
"div.macrostrat-detail",
|
|
217
210
|
[
|
|
218
|
-
|
|
219
|
-
|
|
211
|
+
main_module.default("div.expansion-summary-title", "Thickness"),
|
|
212
|
+
main_module.default("div", [
|
|
220
213
|
source.macrostrat.min_min_thick,
|
|
221
214
|
" - ",
|
|
222
215
|
source.macrostrat.max_thick,
|
|
@@ -228,12 +221,12 @@ function Thickness(props) {
|
|
|
228
221
|
function MinorFossilCollections(props) {
|
|
229
222
|
const { source } = props;
|
|
230
223
|
const { macrostrat } = source;
|
|
231
|
-
if (!macrostrat.pbdb_collections) return
|
|
232
|
-
return
|
|
224
|
+
if (!macrostrat.pbdb_collections) return main_module.default("div");
|
|
225
|
+
return main_module.default.if(macrostrat && macrostrat.pbdb_collections)(
|
|
233
226
|
"div.macrostrat-detail",
|
|
234
227
|
[
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
main_module.default("div.expansion-summary-title", "Fossil collections"),
|
|
229
|
+
main_module.default("div", [macrostrat.pbdb_collections])
|
|
237
230
|
]
|
|
238
231
|
);
|
|
239
232
|
}
|
|
@@ -241,17 +234,17 @@ function FossilOccs(props) {
|
|
|
241
234
|
const { source } = props;
|
|
242
235
|
const { macrostrat } = source;
|
|
243
236
|
if (!macrostrat?.pbdb_occs) return null;
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
|
|
237
|
+
return main_module.default("div.macrostrat-detail", [
|
|
238
|
+
main_module.default("div.expansion-summary-title", "Fossil occurrences"),
|
|
239
|
+
main_module.default("div", [macrostrat.pbdb_occs])
|
|
247
240
|
]);
|
|
248
241
|
}
|
|
249
242
|
function LithTypes(props) {
|
|
250
243
|
const { lith_types } = props;
|
|
251
|
-
return
|
|
244
|
+
return main_module.default.if(lith_types && lith_types.length > 0)(
|
|
252
245
|
"div.lithologies.lithology-types",
|
|
253
246
|
[
|
|
254
|
-
|
|
247
|
+
main_module.default(dataComponents.LithologyList, {
|
|
255
248
|
lithologies: lith_types
|
|
256
249
|
})
|
|
257
250
|
]
|
|
@@ -269,25 +262,24 @@ function LithsAndClasses(props) {
|
|
|
269
262
|
color: lith.color || "#000000"
|
|
270
263
|
};
|
|
271
264
|
});
|
|
272
|
-
return
|
|
273
|
-
|
|
265
|
+
return main_module.default(
|
|
266
|
+
dataComponents.ExpandableDetailsPanel,
|
|
274
267
|
{
|
|
275
268
|
title: "Lithology",
|
|
276
|
-
value:
|
|
269
|
+
value: main_module.default(LithTypes, { lith_types })
|
|
277
270
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
])
|
|
271
|
+
main_module.default(dataComponents.LithologyList, {
|
|
272
|
+
label: "Matched lithologies",
|
|
273
|
+
lithologies,
|
|
274
|
+
onClickItem: (e, lith) => {
|
|
275
|
+
window.open(lithologyURL + "/" + lith.lith_id, "_self");
|
|
276
|
+
}
|
|
277
|
+
})
|
|
286
278
|
);
|
|
287
279
|
}
|
|
288
280
|
function EnvironTypes(props) {
|
|
289
281
|
const { environ_types } = props;
|
|
290
|
-
return
|
|
282
|
+
return main_module.default.if(environ_types && environ_types.length > 0)(dataComponents.LithologyList, {
|
|
291
283
|
lithologies: environ_types?.filter((e) => e.name != "")
|
|
292
284
|
});
|
|
293
285
|
}
|
|
@@ -303,55 +295,16 @@ function Environments(props) {
|
|
|
303
295
|
color: environ.color || "#000000"
|
|
304
296
|
};
|
|
305
297
|
});
|
|
306
|
-
return
|
|
307
|
-
|
|
298
|
+
return main_module.default(
|
|
299
|
+
dataComponents.ExpandableDetailsPanel,
|
|
308
300
|
{
|
|
309
301
|
title: "Environment",
|
|
310
|
-
value:
|
|
302
|
+
value: main_module.default(EnvironTypes, { environ_types })
|
|
311
303
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
onClickItem: (e, environ) => {
|
|
316
|
-
console.log("environ", environmentURL);
|
|
317
|
-
window.open(environmentURL + "/" + environ.environ_id, "_self");
|
|
318
|
-
}
|
|
319
|
-
})
|
|
320
|
-
])
|
|
321
|
-
);
|
|
322
|
-
}
|
|
323
|
-
function EconType(props) {
|
|
324
|
-
const { econ_types } = props;
|
|
325
|
-
return h.if(econ_types && econ_types.length > 0)("div", [
|
|
326
|
-
econ_types?.map((econClass, i) => {
|
|
327
|
-
return h(infoBlocks.AttrChip, {
|
|
328
|
-
key: i,
|
|
329
|
-
name: econClass.name,
|
|
330
|
-
color: econClass.color
|
|
331
|
-
});
|
|
304
|
+
main_module.default(dataComponents.LithologyList, {
|
|
305
|
+
label: "Matched environments",
|
|
306
|
+
lithologies
|
|
332
307
|
})
|
|
333
|
-
]);
|
|
334
|
-
}
|
|
335
|
-
function Economy(props) {
|
|
336
|
-
const { source } = props;
|
|
337
|
-
const { macrostrat } = source;
|
|
338
|
-
const { econs = null, econ_types = null } = macrostrat;
|
|
339
|
-
if (!econs) return h("div");
|
|
340
|
-
return h.if(econs && econs.length > 0)(
|
|
341
|
-
mapInterface.ExpandableDetailsPanel,
|
|
342
|
-
{
|
|
343
|
-
title: "Economy ",
|
|
344
|
-
value: h(EconType, { econ_types })
|
|
345
|
-
},
|
|
346
|
-
h(mapInterface.ExpansionBody, { title: "Matched economic attributes" }, [
|
|
347
|
-
econs?.map((econ, i) => {
|
|
348
|
-
return h(infoBlocks.AttrChip, {
|
|
349
|
-
key: i,
|
|
350
|
-
name: econ.econ,
|
|
351
|
-
color: econ.color
|
|
352
|
-
});
|
|
353
|
-
})
|
|
354
|
-
])
|
|
355
308
|
);
|
|
356
309
|
}
|
|
357
310
|
exports.MacrostratLinkedData = MacrostratLinkedData;
|