@macrostrat/column-views 2.2.0 → 2.2.1
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 +6 -0
- package/dist/esm/{column-views.0859feb3.js → column-views.0265cf7f.js} +5 -5
- package/dist/esm/{column-views.0859feb3.js.map → column-views.0265cf7f.js.map} +1 -1
- package/dist/esm/{column-views.d261b02d.js → column-views.0ce9b697.js} +3 -3
- package/dist/esm/{column-views.d261b02d.js.map → column-views.0ce9b697.js.map} +1 -1
- package/dist/esm/{column-views.3f528c5c.js → column-views.29a551f6.js} +22 -17
- package/dist/esm/column-views.29a551f6.js.map +1 -0
- package/dist/esm/{column-views.d406665d.js → column-views.2aef5df8.js} +4 -4
- package/dist/esm/{column-views.d406665d.js.map → column-views.2aef5df8.js.map} +1 -1
- package/dist/esm/{column-views.8d24b179.js → column-views.2e854496.js} +3 -3
- package/dist/esm/{column-views.8d24b179.js.map → column-views.2e854496.js.map} +1 -1
- package/dist/esm/{column-views.73b8ff16.js → column-views.2eceafb5.js} +2 -2
- package/dist/esm/{column-views.73b8ff16.js.map → column-views.2eceafb5.js.map} +1 -1
- package/dist/esm/{column-views.c518ef14.js → column-views.382c486d.js} +6 -6
- package/dist/esm/column-views.382c486d.js.map +1 -0
- package/dist/esm/{column-views.86a51ce7.js → column-views.413217dc.js} +2 -2
- package/dist/esm/column-views.413217dc.js.map +1 -0
- package/dist/esm/{column-views.e3bf5384.js → column-views.418f948f.js} +6 -6
- package/dist/esm/{column-views.e3bf5384.js.map → column-views.418f948f.js.map} +1 -1
- package/dist/esm/{column-views.d15d8655.js → column-views.41e5f0dc.js} +2 -2
- package/dist/esm/{column-views.d15d8655.js.map → column-views.41e5f0dc.js.map} +1 -1
- package/dist/esm/{column-views.1b644998.js → column-views.469a4952.js} +3 -3
- package/dist/esm/{column-views.1b644998.js.map → column-views.469a4952.js.map} +1 -1
- package/dist/esm/column-views.4ed90896.js +105 -0
- package/dist/esm/column-views.4ed90896.js.map +1 -0
- package/dist/esm/{column-views.d9c6b527.js → column-views.53722d0a.js} +12 -11
- package/dist/esm/column-views.53722d0a.js.map +1 -0
- package/dist/esm/{column-views.9ddbe7df.js → column-views.60365cdb.js} +2 -2
- package/dist/esm/{column-views.9ddbe7df.js.map → column-views.60365cdb.js.map} +1 -1
- package/dist/esm/{column-views.ae7c0a2b.js → column-views.748dce47.js} +2 -2
- package/dist/esm/{column-views.ae7c0a2b.js.map → column-views.748dce47.js.map} +1 -1
- package/dist/esm/{column-views.5a49cd68.js → column-views.7683bb52.js} +6 -7
- package/dist/esm/column-views.7683bb52.js.map +1 -0
- package/dist/esm/{column-views.83395185.js → column-views.787d7696.js} +3 -3
- package/dist/esm/{column-views.83395185.js.map → column-views.787d7696.js.map} +1 -1
- package/dist/esm/{column-views.5d969bc5.js → column-views.81bddbee.js} +5 -6
- package/dist/esm/column-views.81bddbee.js.map +1 -0
- package/dist/esm/{column-views.77561197.js → column-views.8284c3a9.js} +5 -5
- package/dist/esm/column-views.8284c3a9.js.map +1 -0
- package/dist/esm/{column-views.f46a0b36.js → column-views.8b623b27.js} +2 -2
- package/dist/esm/{column-views.f46a0b36.js.map → column-views.8b623b27.js.map} +1 -1
- package/dist/esm/{column-views.f2fd0e4a.js → column-views.a3fabf0f.js} +29 -29
- package/dist/esm/column-views.a3fabf0f.js.map +1 -0
- package/dist/esm/{column-views.6c644353.js → column-views.abeab9aa.js} +3 -3
- package/dist/esm/{column-views.6c644353.js.map → column-views.abeab9aa.js.map} +1 -1
- package/dist/esm/{column-views.285cbb65.js → column-views.adec2e4c.js} +3 -3
- package/dist/esm/{column-views.285cbb65.js.map → column-views.adec2e4c.js.map} +1 -1
- package/dist/esm/{column-views.0a8a07f4.js → column-views.b08d82e6.js} +2 -2
- package/dist/esm/{column-views.0a8a07f4.js.map → column-views.b08d82e6.js.map} +1 -1
- package/dist/esm/{column-views.53186d53.js → column-views.b29f8718.js} +2 -2
- package/dist/esm/{column-views.53186d53.js.map → column-views.b29f8718.js.map} +1 -1
- package/dist/esm/{column-views.0f7f6ee6.js → column-views.bbc77227.js} +2 -2
- package/dist/esm/{column-views.0f7f6ee6.js.map → column-views.bbc77227.js.map} +1 -1
- package/dist/esm/{column-views.ed05e233.js → column-views.c2fbcba8.js} +6 -4
- package/dist/esm/{column-views.ed05e233.js.map → column-views.c2fbcba8.js.map} +1 -1
- package/dist/esm/{column-views.e4c26185.js → column-views.c3495702.js} +2 -2
- package/dist/esm/{column-views.e4c26185.js.map → column-views.c3495702.js.map} +1 -1
- package/dist/esm/{column-views.63b7e5aa.js → column-views.cae1a6a1.js} +3 -3
- package/dist/esm/{column-views.63b7e5aa.js.map → column-views.cae1a6a1.js.map} +1 -1
- package/dist/esm/{column-views.ba0381cc.js → column-views.d86555b0.js} +2 -2
- package/dist/esm/{column-views.ba0381cc.js.map → column-views.d86555b0.js.map} +1 -1
- package/dist/esm/{column-views.986e7566.js → column-views.df34441c.js} +6 -8
- package/dist/esm/column-views.df34441c.js.map +1 -0
- package/dist/esm/{column-views.2d602a57.js → column-views.e17f00d3.js} +2 -2
- package/dist/esm/{column-views.2d602a57.js.map → column-views.e17f00d3.js.map} +1 -1
- package/dist/esm/{column-views.d69c4a9f.js → column-views.e1bc3cfa.js} +2 -2
- package/dist/esm/{column-views.d69c4a9f.js.map → column-views.e1bc3cfa.js.map} +1 -1
- package/dist/esm/{column-views.3e1b8c7d.js → column-views.f0b0fc56.js} +2 -2
- package/dist/esm/{column-views.3e1b8c7d.js.map → column-views.f0b0fc56.js.map} +1 -1
- package/dist/esm/{column-views.e84bd756.js → column-views.faacfc3c.js} +3 -3
- package/dist/esm/{column-views.e84bd756.js.map → column-views.faacfc3c.js.map} +1 -1
- package/dist/esm/index.d.ts +49 -37
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/node/{column-views.45296250.js → column-views.0201566d.js} +2 -2
- package/dist/node/{column-views.45296250.js.map → column-views.0201566d.js.map} +1 -1
- package/dist/node/{column-views.87b1439e.js → column-views.07c503d3.js} +2 -2
- package/dist/node/column-views.07c503d3.js.map +1 -0
- package/dist/node/{column-views.9e155f20.js → column-views.0e7ac946.js} +2 -2
- package/dist/node/{column-views.9e155f20.js.map → column-views.0e7ac946.js.map} +1 -1
- package/dist/node/column-views.108db52e.js +2 -0
- package/dist/node/{column-views.c29e9eb8.js.map → column-views.108db52e.js.map} +1 -1
- package/dist/node/column-views.18d54bbb.js +2 -0
- package/dist/node/column-views.18d54bbb.js.map +1 -0
- package/dist/node/{column-views.c0be1157.js → column-views.19a84c01.js} +2 -2
- package/dist/node/{column-views.c0be1157.js.map → column-views.19a84c01.js.map} +1 -1
- package/dist/node/column-views.1a3c399e.js +2 -0
- package/dist/node/column-views.1a3c399e.js.map +1 -0
- package/dist/node/{column-views.827a9894.js → column-views.29483479.js} +2 -2
- package/dist/node/{column-views.827a9894.js.map → column-views.29483479.js.map} +1 -1
- package/dist/node/{column-views.b64cd0ea.js → column-views.312db572.js} +2 -2
- package/dist/node/{column-views.b64cd0ea.js.map → column-views.312db572.js.map} +1 -1
- package/dist/node/{column-views.e08f8715.js → column-views.32344397.js} +2 -2
- package/dist/node/{column-views.e08f8715.js.map → column-views.32344397.js.map} +1 -1
- package/dist/node/column-views.44952ae6.js +2 -0
- package/dist/node/column-views.44952ae6.js.map +1 -0
- package/dist/node/{column-views.ac1b58b7.js → column-views.45a03acc.js} +2 -2
- package/dist/node/{column-views.ac1b58b7.js.map → column-views.45a03acc.js.map} +1 -1
- package/dist/node/{column-views.492c2c72.js → column-views.4b4c214a.js} +2 -2
- package/dist/node/{column-views.492c2c72.js.map → column-views.4b4c214a.js.map} +1 -1
- package/dist/node/{column-views.a396d3ac.js → column-views.54363c13.js} +2 -2
- package/dist/node/{column-views.a396d3ac.js.map → column-views.54363c13.js.map} +1 -1
- package/dist/node/{column-views.01debc76.js → column-views.554d44a7.js} +2 -2
- package/dist/node/{column-views.01debc76.js.map → column-views.554d44a7.js.map} +1 -1
- package/dist/node/{column-views.9dda582d.js → column-views.57dd069c.js} +2 -2
- package/dist/node/{column-views.9dda582d.js.map → column-views.57dd069c.js.map} +1 -1
- package/dist/node/{column-views.75582658.js → column-views.588b02a1.js} +2 -2
- package/dist/node/{column-views.75582658.js.map → column-views.588b02a1.js.map} +1 -1
- package/dist/node/{column-views.576e3c5a.js → column-views.5a8bc8e3.js} +2 -2
- package/dist/node/{column-views.576e3c5a.js.map → column-views.5a8bc8e3.js.map} +1 -1
- package/dist/node/{column-views.e065152e.js → column-views.6099a3a9.js} +2 -2
- package/dist/node/{column-views.e065152e.js.map → column-views.6099a3a9.js.map} +1 -1
- package/dist/node/column-views.6919fd2a.js +2 -0
- package/dist/node/column-views.6919fd2a.js.map +1 -0
- package/dist/node/{column-views.13e69859.js → column-views.6b8424fd.js} +2 -2
- package/dist/node/{column-views.13e69859.js.map → column-views.6b8424fd.js.map} +1 -1
- package/dist/node/column-views.92e29010.js +2 -0
- package/dist/node/column-views.92e29010.js.map +1 -0
- package/dist/node/{column-views.dd972321.js → column-views.93febe9b.js} +2 -2
- package/dist/node/{column-views.dd972321.js.map → column-views.93febe9b.js.map} +1 -1
- package/dist/node/{column-views.040499c9.js → column-views.94c84716.js} +2 -2
- package/dist/node/{column-views.040499c9.js.map → column-views.94c84716.js.map} +1 -1
- package/dist/node/{column-views.a34732e7.js → column-views.a1e29a15.js} +2 -2
- package/dist/node/{column-views.a34732e7.js.map → column-views.a1e29a15.js.map} +1 -1
- package/dist/node/{column-views.105f6ad2.js → column-views.abe0a664.js} +2 -2
- package/dist/node/{column-views.105f6ad2.js.map → column-views.abe0a664.js.map} +1 -1
- package/dist/node/{column-views.81294fb7.js → column-views.ae9536b3.js} +2 -2
- package/dist/node/{column-views.81294fb7.js.map → column-views.ae9536b3.js.map} +1 -1
- package/dist/node/{column-views.cd77a1d8.js → column-views.ce5904a6.js} +2 -2
- package/dist/node/{column-views.cd77a1d8.js.map → column-views.ce5904a6.js.map} +1 -1
- package/dist/node/{column-views.6fd5a922.js → column-views.d4545f9f.js} +2 -2
- package/dist/node/{column-views.6fd5a922.js.map → column-views.d4545f9f.js.map} +1 -1
- package/dist/node/{column-views.b6cd4360.js → column-views.db4ccacc.js} +2 -2
- package/dist/node/column-views.db4ccacc.js.map +1 -0
- package/dist/node/{column-views.cf2a78c1.js → column-views.ebe61439.js} +2 -2
- package/dist/node/column-views.ebe61439.js.map +1 -0
- package/dist/node/{column-views.7150ba18.js → column-views.f0f5cefd.js} +2 -2
- package/dist/node/column-views.f0f5cefd.js.map +1 -0
- package/dist/node/{column-views.2bd97c2e.js → column-views.f1ad131a.js} +2 -2
- package/dist/node/{column-views.2bd97c2e.js.map → column-views.f1ad131a.js.map} +1 -1
- package/dist/node/{column-views.1a7f8afd.js → column-views.f7d72702.js} +2 -2
- package/dist/node/{column-views.1a7f8afd.js.map → column-views.f7d72702.js.map} +1 -1
- package/dist/node/{column-views.07ff1fdf.js → column-views.fcdc74c4.js} +2 -2
- package/dist/node/{column-views.07ff1fdf.js.map → column-views.fcdc74c4.js.map} +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +4 -2
- package/src/column.ts +17 -14
- package/src/correlation-chart/main.ts +1 -1
- package/src/data-provider/index.ts +1 -0
- package/src/data-provider/store.ts +67 -12
- package/src/{units/selection.ts → data-provider/unit-selection.ts} +1 -1
- package/src/maps/column-correlation/state.ts +0 -1
- package/src/unit-details/panel.ts +1 -1
- package/src/unit-details/popover.ts +1 -1
- package/src/units/boxes.ts +1 -2
- package/src/units/composite.ts +5 -2
- package/src/units/index.ts +0 -1
- package/dist/esm/column-views.3f528c5c.js.map +0 -1
- package/dist/esm/column-views.4fd4ec92.js +0 -67
- package/dist/esm/column-views.4fd4ec92.js.map +0 -1
- package/dist/esm/column-views.5a49cd68.js.map +0 -1
- package/dist/esm/column-views.5d969bc5.js.map +0 -1
- package/dist/esm/column-views.77561197.js.map +0 -1
- package/dist/esm/column-views.86a51ce7.js.map +0 -1
- package/dist/esm/column-views.986e7566.js.map +0 -1
- package/dist/esm/column-views.c518ef14.js.map +0 -1
- package/dist/esm/column-views.d9c6b527.js.map +0 -1
- package/dist/esm/column-views.f2fd0e4a.js.map +0 -1
- package/dist/node/column-views.3b37363f.js +0 -2
- package/dist/node/column-views.3b37363f.js.map +0 -1
- package/dist/node/column-views.7150ba18.js.map +0 -1
- package/dist/node/column-views.728c8dfc.js +0 -2
- package/dist/node/column-views.728c8dfc.js.map +0 -1
- package/dist/node/column-views.87b1439e.js.map +0 -1
- package/dist/node/column-views.b6cd4360.js.map +0 -1
- package/dist/node/column-views.c29e9eb8.js +0 -2
- package/dist/node/column-views.c8df6435.js +0 -2
- package/dist/node/column-views.c8df6435.js.map +0 -1
- package/dist/node/column-views.cd2a5c85.js +0 -2
- package/dist/node/column-views.cd2a5c85.js.map +0 -1
- package/dist/node/column-views.cf2a78c1.js.map +0 -1
- package/dist/node/column-views.e0d9865e.js +0 -2
- package/dist/node/column-views.e0d9865e.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {PBDBFossilsColumn as $b9286605a04210d4$export$554267114407ef68, PBDBOccurrencesMatrix as $b9286605a04210d4$export$652730986cccff7a, FossilDataType as $a3ff7da576c02df0$export$a990c76b38782f57} from "./column-views.
|
|
2
|
-
import {DetritalColumn as $715dd5fedd79146a$export$f176396e104db8d5, DetritalGroup as $715dd5fedd79146a$export$1b3047373cd1c8c7} from "./column-views.
|
|
3
|
-
import {IsotopesDataset as $d71d096cfe00860f$export$c69bd0285aa5d775, IsotopesColumn as $d71d096cfe00860f$export$5d8aa8022c284748, MeasurementDataContext as $5dbb619f2c7bef60$export$c644ef985ce7a4c4, MeasurementDataProvider as $5dbb619f2c7bef60$export$5f01d5b342a89841, useMeasurementData as $5dbb619f2c7bef60$export$8a0335fd9ff72150} from "./column-views.
|
|
4
|
-
import {SGPMeasurementsColumn as $6ff130029901daab$export$c49cf57576706bab} from "./column-views.
|
|
5
|
-
import {BaseMeasurementsColumn as $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d, TruncatedList as $c6d9d48b3424a44c$export$653e47a7a0da0f0d} from "./column-views.
|
|
1
|
+
import {PBDBFossilsColumn as $b9286605a04210d4$export$554267114407ef68, PBDBOccurrencesMatrix as $b9286605a04210d4$export$652730986cccff7a, FossilDataType as $a3ff7da576c02df0$export$a990c76b38782f57} from "./column-views.abeab9aa.js";
|
|
2
|
+
import {DetritalColumn as $715dd5fedd79146a$export$f176396e104db8d5, DetritalGroup as $715dd5fedd79146a$export$1b3047373cd1c8c7} from "./column-views.748dce47.js";
|
|
3
|
+
import {IsotopesDataset as $d71d096cfe00860f$export$c69bd0285aa5d775, IsotopesColumn as $d71d096cfe00860f$export$5d8aa8022c284748, MeasurementDataContext as $5dbb619f2c7bef60$export$c644ef985ce7a4c4, MeasurementDataProvider as $5dbb619f2c7bef60$export$5f01d5b342a89841, useMeasurementData as $5dbb619f2c7bef60$export$8a0335fd9ff72150} from "./column-views.60365cdb.js";
|
|
4
|
+
import {SGPMeasurementsColumn as $6ff130029901daab$export$c49cf57576706bab} from "./column-views.e17f00d3.js";
|
|
5
|
+
import {BaseMeasurementsColumn as $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d, TruncatedList as $c6d9d48b3424a44c$export$653e47a7a0da0f0d} from "./column-views.faacfc3c.js";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -12,4 +12,4 @@ import {BaseMeasurementsColumn as $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d, Tru
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
export {$b9286605a04210d4$export$554267114407ef68 as PBDBFossilsColumn, $b9286605a04210d4$export$652730986cccff7a as PBDBOccurrencesMatrix, $a3ff7da576c02df0$export$a990c76b38782f57 as FossilDataType, $715dd5fedd79146a$export$f176396e104db8d5 as DetritalColumn, $715dd5fedd79146a$export$1b3047373cd1c8c7 as DetritalGroup, $d71d096cfe00860f$export$c69bd0285aa5d775 as IsotopesDataset, $d71d096cfe00860f$export$5d8aa8022c284748 as IsotopesColumn, $5dbb619f2c7bef60$export$c644ef985ce7a4c4 as MeasurementDataContext, $5dbb619f2c7bef60$export$5f01d5b342a89841 as MeasurementDataProvider, $5dbb619f2c7bef60$export$8a0335fd9ff72150 as useMeasurementData, $6ff130029901daab$export$c49cf57576706bab as SGPMeasurementsColumn, $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d as BaseMeasurementsColumn, $c6d9d48b3424a44c$export$653e47a7a0da0f0d as TruncatedList};
|
|
15
|
-
//# sourceMappingURL=column-views.
|
|
15
|
+
//# sourceMappingURL=column-views.418f948f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"","sources":["packages/column-views/src/facets/index.ts"],"sourcesContent":["export * from \"./fossils\";\nexport * from \"./detrital-zircon\";\nexport * from \"./carbon-isotopes\";\nexport * from \"./measurements\";\nexport * from \"./base-sample-column\";\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":"","sources":["packages/column-views/src/facets/index.ts"],"sourcesContent":["export * from \"./fossils\";\nexport * from \"./detrital-zircon\";\nexport * from \"./carbon-isotopes\";\nexport * from \"./measurements\";\nexport * from \"./base-sample-column\";\n"],"names":[],"version":3,"file":"column-views.418f948f.js.map"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./column-views.e40b8bfb.css";
|
|
2
2
|
import $3vk6I$columnviews3465c8adjs from "./column-views.3465c8ad.js";
|
|
3
|
-
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratUnits as $d5074f164411387e$export$6fb40844db555b2} from "./column-views.
|
|
3
|
+
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratUnits as $d5074f164411387e$export$6fb40844db555b2} from "./column-views.4ed90896.js";
|
|
4
4
|
import {buildColumnSurfaces as $90d6b105908858a7$export$151c207e6887154c} from "./column-views.70164236.js";
|
|
5
5
|
import $3vk6I$macrostrathyper from "@macrostrat/hyper";
|
|
6
6
|
import {useAPIResult as $3vk6I$useAPIResult} from "@macrostrat/ui-components";
|
|
@@ -72,4 +72,4 @@ function $1a65c216af27346a$export$ddca1abd3171ec6f() {
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
export {$1a65c216af27346a$export$1d1ebe9df97e8db as BoundaryAgeModelOverlay, $1a65c216af27346a$export$ddca1abd3171ec6f as ComputedSurfacesOverlay};
|
|
75
|
-
//# sourceMappingURL=column-views.
|
|
75
|
+
//# sourceMappingURL=column-views.41e5f0dc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;AAOH,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAoBrB,SAAS;IACd,MAAM,SAAS,CAAA,GAAA,wCAAiB,KAAK,CAAC,EAAE,EAAE;IAC1C,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,MAAM,WAAW,CAAA,GAAA,mBAAW,EAC1B,+CACA;gBAAE;IAAO,GACT,CAAC,MAAQ,IAAI,OAAO,CAAC,IAAI;IAG3B,IAAI,YAAY,MACd,OAAO;IAGT,OAAO,wBACL,0BACA,SAAS,GAAG,CAAC,CAAC;QACZ,MAAM,SAAS,MAAM,QAAQ,SAAS;QAEtC,OAAO,wBAAE,kCAAkC;YACzC,KAAK,QAAQ,WAAW;YACxB,OAAO;gBAAE,KAAK,GAAG,OAAO,EAAE,CAAC;YAAC;QAC9B;IACF;AAEJ;AAEO,SAAS;IACd;;GAEC,GACD,MAAM,QAAQ,CAAA,GAAA,wCAAiB;IAC/B,MAAM,WAAW,CAAA,GAAA,yCAAkB,EAAE;IACrC,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,OAAO,wBACL,0BACA,SAAS,GAAG,CAAC,CAAC;QACZ,MAAM,SAAS,MAAM,QAAQ,GAAG;QAChC,OAAO,wBAAE,kCAAkC;YACzC,KAAK,QAAQ,KAAK;YAClB,OAAO;gBAAE,KAAK,GAAG,OAAO,EAAE,CAAC;YAAC;QAC9B;IACF;AAEJ","sources":["packages/column-views/src/age-model-overlay.ts"],"sourcesContent":["/** An in-development overlay for a column's age model.\n *\n * Age model info:\n * {\n * \"boundary_id\": 8049,\n * \"col_id\": 432,\n * \"section_id\": 3104,\n * \"interval_id\": 268,\n * \"interval_name\": \"Calymmian\",\n * \"age_bottom\": 1600,\n * \"age_top\": 1400,\n * \"rel_position\": 0.85,\n * \"model_age\": 1430,\n * \"boundary_status\": \"absolute\",\n * \"boundary_type\": \"\",\n * \"boundary_position\": null,\n * \"unit_below\": 11541,\n * \"unit_above\": 0,\n * \"ref_id\": 217\n * },\n *\n * */\n\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./age-model-overlay.module.sass\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport { useCompositeScale, useMacrostratUnits } from \"./data-provider\";\nimport { buildColumnSurfaces } from \"./prepare-units/dynamic-scales\";\nconst h = hyper.styled(styles);\n\ninterface AgeModelSurface {\n boundary_id: number;\n col_id: number;\n section_id: number;\n interval_id: number;\n interval_name: string;\n age_bottom: number;\n age_top: number;\n rel_position: number;\n model_age: number;\n boundary_status: \"absolute\" | \"relative\" | \"modeled\";\n boundary_type: string;\n boundary_position: null | number;\n unit_below: number;\n unit_above: number;\n ref_id: number;\n}\n\nexport function BoundaryAgeModelOverlay() {\n const col_id = useMacrostratUnits()?.[0]?.col_id;\n const scale = useCompositeScale();\n\n const ageModel = useAPIResult(\n \"https://dev.macrostrat.org/api/v2/age_model\",\n { col_id },\n (res) => res.success.data,\n );\n\n if (ageModel == null) {\n return null;\n }\n\n return h(\n \"div.boundary-age-model\",\n ageModel.map((surface) => {\n const height = scale(surface.model_age);\n\n return h(\"div.boundary-age-model-surface\", {\n key: surface.boundary_id,\n style: { top: `${height}px` },\n });\n }),\n );\n}\n\nexport function ComputedSurfacesOverlay() {\n /** Overlay showing age surfaces. This is like the boundary age model overlay but\n * it is computed on the fly from unit tops and bottoms.\n */\n const units = useMacrostratUnits();\n const surfaces = buildColumnSurfaces(units);\n const scale = useCompositeScale();\n\n return h(\n \"div.boundary-age-model\",\n surfaces.map((surface) => {\n const height = scale(surface.age);\n return h(\"div.boundary-age-model-surface\", {\n key: surface.index,\n style: { top: `${height}px` },\n });\n }),\n );\n}\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;AAOH,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAoBrB,SAAS;IACd,MAAM,SAAS,CAAA,GAAA,wCAAiB,KAAK,CAAC,EAAE,EAAE;IAC1C,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,MAAM,WAAW,CAAA,GAAA,mBAAW,EAC1B,+CACA;gBAAE;IAAO,GACT,CAAC,MAAQ,IAAI,OAAO,CAAC,IAAI;IAG3B,IAAI,YAAY,MACd,OAAO;IAGT,OAAO,wBACL,0BACA,SAAS,GAAG,CAAC,CAAC;QACZ,MAAM,SAAS,MAAM,QAAQ,SAAS;QAEtC,OAAO,wBAAE,kCAAkC;YACzC,KAAK,QAAQ,WAAW;YACxB,OAAO;gBAAE,KAAK,GAAG,OAAO,EAAE,CAAC;YAAC;QAC9B;IACF;AAEJ;AAEO,SAAS;IACd;;GAEC,GACD,MAAM,QAAQ,CAAA,GAAA,wCAAiB;IAC/B,MAAM,WAAW,CAAA,GAAA,yCAAkB,EAAE;IACrC,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,OAAO,wBACL,0BACA,SAAS,GAAG,CAAC,CAAC;QACZ,MAAM,SAAS,MAAM,QAAQ,GAAG;QAChC,OAAO,wBAAE,kCAAkC;YACzC,KAAK,QAAQ,KAAK;YAClB,OAAO;gBAAE,KAAK,GAAG,OAAO,EAAE,CAAC;YAAC;QAC9B;IACF;AAEJ","sources":["packages/column-views/src/age-model-overlay.ts"],"sourcesContent":["/** An in-development overlay for a column's age model.\n *\n * Age model info:\n * {\n * \"boundary_id\": 8049,\n * \"col_id\": 432,\n * \"section_id\": 3104,\n * \"interval_id\": 268,\n * \"interval_name\": \"Calymmian\",\n * \"age_bottom\": 1600,\n * \"age_top\": 1400,\n * \"rel_position\": 0.85,\n * \"model_age\": 1430,\n * \"boundary_status\": \"absolute\",\n * \"boundary_type\": \"\",\n * \"boundary_position\": null,\n * \"unit_below\": 11541,\n * \"unit_above\": 0,\n * \"ref_id\": 217\n * },\n *\n * */\n\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./age-model-overlay.module.sass\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport { useCompositeScale, useMacrostratUnits } from \"./data-provider\";\nimport { buildColumnSurfaces } from \"./prepare-units/dynamic-scales\";\nconst h = hyper.styled(styles);\n\ninterface AgeModelSurface {\n boundary_id: number;\n col_id: number;\n section_id: number;\n interval_id: number;\n interval_name: string;\n age_bottom: number;\n age_top: number;\n rel_position: number;\n model_age: number;\n boundary_status: \"absolute\" | \"relative\" | \"modeled\";\n boundary_type: string;\n boundary_position: null | number;\n unit_below: number;\n unit_above: number;\n ref_id: number;\n}\n\nexport function BoundaryAgeModelOverlay() {\n const col_id = useMacrostratUnits()?.[0]?.col_id;\n const scale = useCompositeScale();\n\n const ageModel = useAPIResult(\n \"https://dev.macrostrat.org/api/v2/age_model\",\n { col_id },\n (res) => res.success.data,\n );\n\n if (ageModel == null) {\n return null;\n }\n\n return h(\n \"div.boundary-age-model\",\n ageModel.map((surface) => {\n const height = scale(surface.model_age);\n\n return h(\"div.boundary-age-model-surface\", {\n key: surface.boundary_id,\n style: { top: `${height}px` },\n });\n }),\n );\n}\n\nexport function ComputedSurfacesOverlay() {\n /** Overlay showing age surfaces. This is like the boundary age model overlay but\n * it is computed on the fly from unit tops and bottoms.\n */\n const units = useMacrostratUnits();\n const surfaces = buildColumnSurfaces(units);\n const scale = useCompositeScale();\n\n return h(\n \"div.boundary-age-model\",\n surfaces.map((surface) => {\n const height = scale(surface.age);\n return h(\"div.boundary-age-model-surface\", {\n key: surface.index,\n style: { top: `${height}px` },\n });\n }),\n );\n}\n"],"names":[],"version":3,"file":"column-views.41e5f0dc.js.map"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {ColumnCorrelationMap as $dcd183b733f66144$export$8e7d97509e84cc49} from "./column-views.
|
|
2
|
-
import {ColumnCorrelationProvider as $74e211dc185c20b4$export$72ffe141ebf87ef1, useCorrelationMapStore as $74e211dc185c20b4$export$21398703d3a9bb4d} from "./column-views.
|
|
1
|
+
import {ColumnCorrelationMap as $dcd183b733f66144$export$8e7d97509e84cc49} from "./column-views.f0b0fc56.js";
|
|
2
|
+
import {ColumnCorrelationProvider as $74e211dc185c20b4$export$72ffe141ebf87ef1, useCorrelationMapStore as $74e211dc185c20b4$export$21398703d3a9bb4d} from "./column-views.413217dc.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export {$dcd183b733f66144$export$8e7d97509e84cc49 as ColumnCorrelationMap, $74e211dc185c20b4$export$72ffe141ebf87ef1 as ColumnCorrelationProvider, $74e211dc185c20b4$export$21398703d3a9bb4d as useCorrelationMapStore};
|
|
9
|
-
//# sourceMappingURL=column-views.
|
|
9
|
+
//# sourceMappingURL=column-views.469a4952.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"","sources":["packages/column-views/src/maps/column-correlation/index.ts"],"sourcesContent":["export * from \"./core\";\nexport * from \"./state\";\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":"","sources":["packages/column-views/src/maps/column-correlation/index.ts"],"sourcesContent":["export * from \"./core\";\nexport * from \"./state\";\n"],"names":[],"version":3,"file":"column-views.469a4952.js.map"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {createCompositeScale as $728f6cf6c12cd490$export$3ada7641926a616d} from "./column-views.073c42da.js";
|
|
2
|
+
import {createContext as $a90Ta$createContext, useMemo as $a90Ta$useMemo, useContext as $a90Ta$useContext} from "react";
|
|
3
|
+
import $a90Ta$macrostrathyper from "@macrostrat/hyper";
|
|
4
|
+
import {createIsolation as $a90Ta$createIsolation} from "jotai-scope";
|
|
5
|
+
import {atom as $a90Ta$atom} from "jotai";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const { Provider: $d5074f164411387e$var$Provider, useAtom: $d5074f164411387e$var$useAtom, useAtomValue: $d5074f164411387e$var$useAtomValue, useStore: $d5074f164411387e$var$useStore } = (0, $a90Ta$createIsolation)();
|
|
13
|
+
const $d5074f164411387e$var$columnUnitsAtom = (0, $a90Ta$atom)();
|
|
14
|
+
const $d5074f164411387e$var$columnUnitsMapAtom = (0, $a90Ta$atom)((get)=>{
|
|
15
|
+
const units = get($d5074f164411387e$var$columnUnitsAtom);
|
|
16
|
+
if (!units) return null;
|
|
17
|
+
const unitMap = new Map();
|
|
18
|
+
units.forEach((unit)=>{
|
|
19
|
+
unitMap.set(unit.unit_id, unit);
|
|
20
|
+
});
|
|
21
|
+
return unitMap;
|
|
22
|
+
});
|
|
23
|
+
function $d5074f164411387e$var$ScopedProvider({ children: children, ...rest }) {
|
|
24
|
+
// Always use the same store instance in this tree
|
|
25
|
+
let val = null;
|
|
26
|
+
try {
|
|
27
|
+
val = $d5074f164411387e$var$useStore();
|
|
28
|
+
} catch {
|
|
29
|
+
// No store found, create a new one
|
|
30
|
+
val = null;
|
|
31
|
+
}
|
|
32
|
+
return (0, $a90Ta$macrostrathyper)($d5074f164411387e$var$Provider, {
|
|
33
|
+
store: val,
|
|
34
|
+
...rest
|
|
35
|
+
}, children);
|
|
36
|
+
}
|
|
37
|
+
function $d5074f164411387e$export$ef5395089200109b({ children: children, units: units }) {
|
|
38
|
+
/** Top-level provider for Macrostrat column data.
|
|
39
|
+
* It is either provided by the Column component itself, or
|
|
40
|
+
* can be hoisted higher in the tree to provide a common data context
|
|
41
|
+
*/ return (0, $a90Ta$macrostrathyper)($d5074f164411387e$var$ScopedProvider, {
|
|
42
|
+
initialValues: [
|
|
43
|
+
[
|
|
44
|
+
$d5074f164411387e$var$columnUnitsAtom,
|
|
45
|
+
units
|
|
46
|
+
]
|
|
47
|
+
]
|
|
48
|
+
}, children);
|
|
49
|
+
}
|
|
50
|
+
const $d5074f164411387e$var$MacrostratColumnDataContext = (0, $a90Ta$createContext)(null);
|
|
51
|
+
function $d5074f164411387e$export$7fec7bd80ff9c10e({ children: children, units: units, sections: sections, totalHeight: totalHeight, axisType: axisType }) {
|
|
52
|
+
/** Internal provider for Macrostrat column data.
|
|
53
|
+
* As a general rule, we want to provide data and column-axis
|
|
54
|
+
* height calculations through the context, since these need to
|
|
55
|
+
* be accessed by any component that lays out information on the
|
|
56
|
+
* column.
|
|
57
|
+
*
|
|
58
|
+
* Cross-axis layout and view configuration (e.g., showing and hiding
|
|
59
|
+
* of different components or labels) should be handled through passing
|
|
60
|
+
* props to the components themselves.
|
|
61
|
+
* */ const value = (0, $a90Ta$useMemo)(()=>{
|
|
62
|
+
// For now, change ordinal axis types to age axis types
|
|
63
|
+
return {
|
|
64
|
+
units: units,
|
|
65
|
+
sections: sections,
|
|
66
|
+
totalHeight: totalHeight,
|
|
67
|
+
axisType: axisType
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
units,
|
|
71
|
+
sections,
|
|
72
|
+
totalHeight,
|
|
73
|
+
axisType
|
|
74
|
+
]);
|
|
75
|
+
return (0, $a90Ta$macrostrathyper)($d5074f164411387e$export$ef5395089200109b, {
|
|
76
|
+
units: units
|
|
77
|
+
}, (0, $a90Ta$macrostrathyper)($d5074f164411387e$var$MacrostratColumnDataContext.Provider, {
|
|
78
|
+
value: value
|
|
79
|
+
}, children));
|
|
80
|
+
}
|
|
81
|
+
function $d5074f164411387e$export$f8509b7cce386c7d() {
|
|
82
|
+
const ctx = (0, $a90Ta$useContext)($d5074f164411387e$var$MacrostratColumnDataContext);
|
|
83
|
+
if (!ctx) throw new Error("useMacrostratColumnData must be used within a MacrostratColumnDataProvider");
|
|
84
|
+
return ctx;
|
|
85
|
+
}
|
|
86
|
+
function $d5074f164411387e$export$6fb40844db555b2() {
|
|
87
|
+
return $d5074f164411387e$var$useAtomValue($d5074f164411387e$var$columnUnitsAtom);
|
|
88
|
+
}
|
|
89
|
+
function $d5074f164411387e$export$7513be0cfd10d9cc() {
|
|
90
|
+
try {
|
|
91
|
+
return $d5074f164411387e$var$useAtomValue($d5074f164411387e$var$columnUnitsMapAtom);
|
|
92
|
+
} catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function $d5074f164411387e$export$a7fc62995ec4f76() {
|
|
97
|
+
const ctx = $d5074f164411387e$export$f8509b7cce386c7d();
|
|
98
|
+
return (0, $a90Ta$useMemo)(()=>(0, $728f6cf6c12cd490$export$3ada7641926a616d)(ctx.sections, true), [
|
|
99
|
+
ctx.sections
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
export {$d5074f164411387e$export$ef5395089200109b as MacrostratColumnStateProvider, $d5074f164411387e$export$7fec7bd80ff9c10e as MacrostratColumnDataProvider, $d5074f164411387e$export$f8509b7cce386c7d as useMacrostratColumnData, $d5074f164411387e$export$6fb40844db555b2 as useMacrostratUnits, $d5074f164411387e$export$7513be0cfd10d9cc as useColumnUnitsMap, $d5074f164411387e$export$a7fc62995ec4f76 as useCompositeScale};
|
|
105
|
+
//# sourceMappingURL=column-views.4ed90896.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAaA,MAAM,YAAE,8BAAQ,WAAE,6BAAO,gBAAE,kCAAY,YAAE,8BAAQ,EAAE,GAAG,CA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O;AACT;AAEO,SAAS;IACd,OAAO,mCAAa;AACtB;AAEO,SAAS;IACd,IAAI;QACF,OAAO,mCAAa;IACtB,EAAE,OAAM;QACN,OAAO;IACT;AACF;AAEO,SAAS;IACd,MAAM,MAAM;IACZ,OAAO,CAAA,GAAA,cAAM,EACX,IAAM,CAAA,GAAA,yCAAmB,EAAE,IAAI,QAAQ,EAAE,OACzC;QAAC,IAAI,QAAQ;KAAC;AAElB","sources":["packages/column-views/src/data-provider/store.ts"],"sourcesContent":["import { createContext, ReactNode, useContext, useMemo } from \"react\";\nimport h from \"@macrostrat/hyper\";\nimport {\n CompositeColumnScale,\n createCompositeScale,\n} from \"../prepare-units/composite-scale\";\nimport { ColumnAxisType } from \"@macrostrat/column-components\";\nimport type { ExtUnit, PackageLayoutData } from \"../prepare-units\";\n// An isolated jotai store for Macrostrat column usage\n// TODO: there might be a better way to do this using the MacrostratDataProvider or similar\nimport { createIsolation } from \"jotai-scope\";\nimport { atom, type WritableAtom } from \"jotai\";\n\nconst { Provider, useAtom, useAtomValue, useStore } = createIsolation();\n\ntype ProviderProps = {\n children: ReactNode;\n initialValues?: Iterable<[WritableAtom<any, any, any>, any]>;\n};\n\nconst columnUnitsAtom = atom<ExtUnit[]>();\n\nconst columnUnitsMapAtom = atom<Map<number, ExtUnit> | null>((get) => {\n const units = get(columnUnitsAtom);\n if (!units) return null;\n const unitMap = new Map<number, ExtUnit>();\n units.forEach((unit) => {\n unitMap.set(unit.unit_id, unit);\n });\n return unitMap;\n});\n\nfunction ScopedProvider({ children, ...rest }: ProviderProps) {\n // Always use the same store instance in this tree\n let val = null;\n try {\n val = useStore();\n } catch {\n // No store found, create a new one\n val = null;\n }\n return h(Provider, { store: val, ...rest }, children);\n}\n\nexport function MacrostratColumnStateProvider({\n children,\n units,\n}: {\n children: ReactNode;\n units: ExtUnit[];\n}) {\n /** Top-level provider for Macrostrat column data.\n * It is either provided by the Column component itself, or\n * can be hoisted higher in the tree to provide a common data context\n */\n return h(\n ScopedProvider,\n {\n initialValues: [[columnUnitsAtom, units]],\n },\n children,\n );\n}\n\nexport interface MacrostratColumnDataContext {\n units: ExtUnit[];\n sections: PackageLayoutData[];\n totalHeight?: number;\n axisType?: ColumnAxisType;\n}\n\nconst MacrostratColumnDataContext =\n createContext<MacrostratColumnDataContext>(null);\n\nexport function MacrostratColumnDataProvider({\n children,\n units,\n sections,\n totalHeight,\n axisType,\n}: MacrostratColumnDataContext & { children: ReactNode }) {\n /** Internal provider for Macrostrat column data.\n * As a general rule, we want to provide data and column-axis\n * height calculations through the context, since these need to\n * be accessed by any component that lays out information on the\n * column.\n *\n * Cross-axis layout and view configuration (e.g., showing and hiding\n * of different components or labels) should be handled through passing\n * props to the components themselves.\n * */\n\n const value = useMemo(() => {\n // For now, change ordinal axis types to age axis types\n return {\n units,\n sections,\n totalHeight,\n axisType,\n };\n }, [units, sections, totalHeight, axisType]);\n\n return h(\n MacrostratColumnStateProvider,\n { units },\n h(MacrostratColumnDataContext.Provider, { value }, children),\n );\n}\n\nexport function useMacrostratColumnData() {\n const ctx = useContext(MacrostratColumnDataContext);\n if (!ctx) {\n throw new Error(\n \"useMacrostratColumnData must be used within a MacrostratColumnDataProvider\",\n );\n }\n return ctx;\n}\n\nexport function useMacrostratUnits() {\n return useAtomValue(columnUnitsAtom);\n}\n\nexport function useColumnUnitsMap(): Map<number, ExtUnit> | null {\n try {\n return useAtomValue(columnUnitsMapAtom);\n } catch {\n return null;\n }\n}\n\nexport function useCompositeScale(): CompositeColumnScale {\n const ctx = useMacrostratColumnData();\n return useMemo(\n () => createCompositeScale(ctx.sections, true),\n [ctx.sections],\n );\n}\n"],"names":[],"version":3,"file":"column-views.4ed90896.js.map"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {UnitSelectionPopover as $a9bcb536274d1bf9$export$db1115efab13710d} from "./column-views.c518ef14.js";
|
|
1
|
+
import {UnitKeyboardNavigation as $61771df184788970$export$70f5ee19650fc7d1, UnitSelectionProvider as $61771df184788970$export$f19d75b1d4b676a4, useUnitSelectionStore as $61771df184788970$export$b220b1d3591dc9e5} from "./column-views.a3fabf0f.js";
|
|
2
|
+
import {UnitSelectionPopover as $a9bcb536274d1bf9$export$db1115efab13710d} from "./column-views.382c486d.js";
|
|
4
3
|
import "./column-views.338a7a83.css";
|
|
5
4
|
import $2d5zd$columnviews6a954628js from "./column-views.6a954628.js";
|
|
6
|
-
import {CompositeTimescaleCore as $7d0f52717c0de7e1$export$463f46772c64d403} from "./column-views.
|
|
5
|
+
import {CompositeTimescaleCore as $7d0f52717c0de7e1$export$463f46772c64d403} from "./column-views.0265cf7f.js";
|
|
7
6
|
import {buildCorrelationChartData as $2c6a8e6a98a077ae$export$7f21dc14b8199dc0, findLaterallyExtensiveUnits as $2c6a8e6a98a077ae$export$cc5d9b95e199a6de, splitStratIntoBoxes as $2c6a8e6a98a077ae$export$3e71a3125322d04b} from "./column-views.88d63dd0.js";
|
|
8
|
-
import {CompositeAgeAxisCore as $43794af7643cdf40$export$ac30ca3cf5df959d} from "./column-views.
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import {CompositeAgeAxisCore as $43794af7643cdf40$export$ac30ca3cf5df959d} from "./column-views.adec2e4c.js";
|
|
8
|
+
import {ColoredUnitComponent as $4c8184c4a7317749$export$6012fd1584b5d0c0} from "./column-views.df34441c.js";
|
|
9
|
+
import {UnitBoxes as $d254716a820e9c85$export$5d1cdfabe8dc8085} from "./column-views.81bddbee.js";
|
|
10
|
+
import {ColumnContainer as $2118f0266dc7e955$export$2194471aa3d52446} from "./column-views.29a551f6.js";
|
|
11
11
|
import $2d5zd$macrostrathyper from "@macrostrat/hyper";
|
|
12
12
|
import {useMemo as $2d5zd$useMemo, useRef as $2d5zd$useRef} from "react";
|
|
13
13
|
import {useInDarkMode as $2d5zd$useInDarkMode} from "@macrostrat/ui-components";
|
|
@@ -31,6 +31,7 @@ function $parcel$interopDefault(a) {
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
|
|
34
35
|
const $ed7dc56184962590$var$h = (0, $2d5zd$macrostrathyper).styled((0, ($parcel$interopDefault($2d5zd$columnviews6a954628js))));
|
|
35
36
|
function $ed7dc56184962590$export$9ebf875c09445bec({ data: data, columnSpacing: columnSpacing = 0, columnWidth: columnWidth = 130, unconformityLabels: unconformityLabels = true, showUnitPopover: showUnitPopover = true, selectedUnit: selectedUnit, onUnitSelected: onUnitSelected, unitComponent: unitComponent, ...scaleProps }) {
|
|
36
37
|
const defaultScaleProps = {
|
|
@@ -65,7 +66,7 @@ function $ed7dc56184962590$export$9ebf875c09445bec({ data: data, columnSpacing:
|
|
|
65
66
|
const mainWidth = (columnWidth + columnSpacing) * nColumns;
|
|
66
67
|
return $ed7dc56184962590$var$h((0, $2118f0266dc7e955$export$2194471aa3d52446), {
|
|
67
68
|
className: "correlation-diagram"
|
|
68
|
-
}, $ed7dc56184962590$var$h((0, $
|
|
69
|
+
}, $ed7dc56184962590$var$h((0, $61771df184788970$export$f19d75b1d4b676a4), {
|
|
69
70
|
columnRef: columnRef,
|
|
70
71
|
selectedUnit: selectedUnit,
|
|
71
72
|
onUnitSelected: onUnitSelected,
|
|
@@ -100,7 +101,7 @@ function $ed7dc56184962590$export$9ebf875c09445bec({ data: data, columnSpacing:
|
|
|
100
101
|
})),
|
|
101
102
|
$ed7dc56184962590$var$h.if(showUnitPopover)((0, $a9bcb536274d1bf9$export$db1115efab13710d)),
|
|
102
103
|
// Navigation only works within a column for now...
|
|
103
|
-
$ed7dc56184962590$var$h((0, $
|
|
104
|
+
$ed7dc56184962590$var$h((0, $61771df184788970$export$70f5ee19650fc7d1), {
|
|
104
105
|
units: units
|
|
105
106
|
})
|
|
106
107
|
])
|
|
@@ -202,7 +203,7 @@ function $ed7dc56184962590$var$StratColSpan({ data: data, scale: scale, columnWi
|
|
|
202
203
|
}, strat_name_long);
|
|
203
204
|
}
|
|
204
205
|
function $ed7dc56184962590$var$ChartArea({ children: children }) {
|
|
205
|
-
const setSelectedUnit = (0, $
|
|
206
|
+
const setSelectedUnit = (0, $61771df184788970$export$b220b1d3591dc9e5)((state)=>state.setSelectedUnit);
|
|
206
207
|
return $ed7dc56184962590$var$h("div.correlation-chart-inner", {
|
|
207
208
|
onClick () {
|
|
208
209
|
setSelectedUnit(null);
|
|
@@ -224,4 +225,4 @@ function $ed7dc56184962590$var$TimescaleColumn(props) {
|
|
|
224
225
|
|
|
225
226
|
|
|
226
227
|
export {$ed7dc56184962590$export$9ebf875c09445bec as CorrelationChart};
|
|
227
|
-
//# sourceMappingURL=column-views.
|
|
228
|
+
//# sourceMappingURL=column-views.53722d0a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;;;;;;;;;;;;;;AAqCtB,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAcrB,SAAS,0CAAiB,QAC/B,IAAI,iBACJ,gBAAgB,gBAChB,cAAc,yBACd,qBAAqB,uBACrB,kBAAkB,oBAClB,YAAY,kBACZ,cAAc,iBACd,aAAa,EACb,GAAG,YACmB;IACtB,MAAM,oBAAoB;QACxB,kBAAkB;QAClB,oBAAoB;QACpB,kBAAkB;QAClB,6BAA6B;IAC/B;IAEA,MAAM,YAAY,CAAA,GAAA,cAAM,EAAE;QACxB,IAAI,CAAC,MAAM,OAAO;QAClB,OAAO,CAAA,GAAA,yCAAwB,EAAE,MAAM;YACrC,GAAG,iBAAiB;YACpB,GAAG,UAAU;QACf;IACF,GAAG;QAAC;WAAS,OAAO,MAAM,CAAC;KAAY;IAEvC,MAAM,YAAY,CAAA,GAAA,aAAK,EAAE;IAEzB,iEAAiE;IACjE,MAAM,QAAQ,CAAA,GAAA,cAAM,EAAE;QACpB,OAAO,MAAM,IAAI,CAAC,KAAO,GAAG,KAAK,EAAE,UAAU,EAAE;IACjD,GAAG;Q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E,GAAG,SAAS;QAAC;QACvC,wBAAE,CAAA,GAAA,yCAAqB,GAAG;YAAE,GAAG,SAAS;gCAAE;QAAmB;KAC9D;AACH","sources":["packages/column-views/src/correlation-chart/main.ts"],"sourcesContent":["/** Correlation chart */\nimport {\n UnitSelectionProvider,\n UnitKeyboardNavigation,\n useUnitSelectionStore,\n} from \"../data-provider\";\nimport { UnitSelectionPopover } from \"../unit-details\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useMemo, useRef } from \"react\";\nimport { useInDarkMode } from \"@macrostrat/ui-components\";\nimport { CompositeTimescaleCore } from \"../section\";\nimport classNames from \"classnames\";\nimport {\n findLaterallyExtensiveUnits,\n splitStratIntoBoxes,\n UnitGroupBox,\n CorrelationChartSettings,\n buildCorrelationChartData,\n} from \"./prepare-data\";\nimport {\n CompositeAgeAxisCore,\n CompositeStratigraphicScaleInfo,\n} from \"../age-axis\";\nimport {\n ColumnAxisType,\n ColumnProvider,\n SVG,\n} from \"@macrostrat/column-components\";\nimport { ColoredUnitComponent } from \"../units\";\nimport { UnitBoxes } from \"../units/boxes\";\nimport { ColumnContainer } from \"../column\";\nimport { ColumnData } from \"../data-provider\";\nimport { BaseUnit } from \"@macrostrat/api-types\";\nimport { ScaleContinuousNumeric } from \"d3-scale\";\nimport { ExtUnit } from \"../prepare-units/types\";\n\nconst h = hyper.styled(styles);\n\nexport interface CorrelationChartProps extends CorrelationChartSettings {\n data: ColumnData[];\n columnWidth?: number;\n columnSpacing?: number;\n targetUnitHeight?: number;\n unconformityLabels?: boolean;\n selectedUnit?: number | null;\n showUnitPopover?: boolean;\n unitComponent?: any;\n onUnitSelected?: (unitID: number | null, unit: BaseUnit | null) => void;\n}\n\nexport function CorrelationChart({\n data,\n columnSpacing = 0,\n columnWidth = 130,\n unconformityLabels = true,\n showUnitPopover = true,\n selectedUnit,\n onUnitSelected,\n unitComponent,\n ...scaleProps\n}: CorrelationChartProps) {\n const defaultScaleProps = {\n targetUnitHeight: 10,\n unconformityHeight: 60,\n minSectionHeight: 60,\n collapseSmallUnconformities: true,\n };\n\n const chartData = useMemo(() => {\n if (!data) return null;\n return buildCorrelationChartData(data, {\n ...defaultScaleProps,\n ...scaleProps,\n });\n }, [data, ...Object.values(scaleProps)]);\n\n const columnRef = useRef(null);\n\n // A flattened units array is used to support keyboard navigation\n const units = useMemo(() => {\n return data?.map((d0) => d0.units).flat() ?? [];\n }, [data]);\n\n const inDarkMode = useInDarkMode();\n\n const className = classNames({\n \"dark-mode\": inDarkMode,\n });\n\n if (chartData == null) {\n return null;\n }\n\n const { packages, scaleInfo, nColumns } = chartData;\n\n const mainWidth = (columnWidth + columnSpacing) * nColumns;\n\n return h(\n ColumnContainer,\n { className: \"correlation-diagram\" },\n h(\n UnitSelectionProvider,\n { columnRef, selectedUnit, onUnitSelected, units },\n h(ChartArea, [\n h(TimescaleColumn, {\n key: \"timescale\",\n scaleInfo,\n unconformityLabels,\n }),\n h(\"div.main-chart\", { ref: columnRef }, [\n h(\n SVG,\n {\n className,\n innerWidth: mainWidth,\n height: scaleInfo.totalHeight,\n paddingH: 4,\n },\n packages.map((pkg, i) => {\n const { offset, domain, pixelScale, scale, key } =\n scaleInfo.packages[i];\n return h(Package, {\n columnData: pkg.columnData,\n key,\n columnWidth,\n columnSpacing,\n offset,\n domain,\n pixelScale,\n scale,\n unitComponent,\n });\n }),\n ),\n h.if(showUnitPopover)(UnitSelectionPopover),\n // Navigation only works within a column for now...\n h(UnitKeyboardNavigation, { units }),\n ]),\n ]),\n ),\n );\n}\n\nfunction Package({\n columnData,\n columnSpacing,\n columnWidth,\n unitComponent,\n offset,\n domain,\n pixelScale,\n scale,\n}) {\n return h(\"g.package\", { transform: `translate(0 ${offset})` }, [\n // Disable the SVG overlay for now\n //h(PackageSVGOverlay, { data, columnSpacing }),\n h(\"g.column-units\", [\n columnData.map((data, i) => {\n return h(Column, {\n units: data.units,\n unitComponent,\n width: columnWidth,\n key: i,\n domain,\n pixelScale,\n scale,\n offsetLeft: i * (columnWidth + columnSpacing),\n });\n }),\n ]),\n ]);\n}\n\ninterface ColumnProps {\n units: ExtUnit[];\n unitComponent?: React.FunctionComponent<any>;\n unitComponentProps?: any;\n showLabels?: boolean;\n width?: number;\n columnWidth?: number;\n columnSpacing?: number;\n targetUnitHeight?: number;\n offsetLeft?: number;\n domain: [number, number];\n pixelScale: number;\n scale?: ScaleContinuousNumeric<number, number>;\n}\n\nfunction Column(props: ColumnProps) {\n const {\n units,\n width = 150,\n offsetLeft,\n domain,\n pixelScale,\n scale,\n unitComponent = ColoredUnitComponent,\n } = props;\n\n const columnWidth = width;\n\n if (units.length == 0) {\n return null;\n }\n\n return h(\n \"g.section\",\n {\n transform: `translate(${offsetLeft} 0)`,\n },\n h(\n ColumnProvider,\n {\n // Need to tighten up types here...\n divisions: units as any[],\n range: domain,\n scale,\n pixelsPerMeter: pixelScale, // Actually pixels per myr\n axisType: ColumnAxisType.AGE,\n },\n h(UnitBoxes, {\n unitComponent,\n unitComponentProps: {\n nColumns: 2,\n width: columnWidth,\n showLabel: false,\n },\n }),\n ),\n );\n}\n\nfunction PackageSVGOverlay({ data, columnWidth = 100, columnSpacing = 0 }) {\n const { b_age, t_age, bestPixelScale, columnData } = data;\n\n const width = (columnWidth + columnSpacing) * columnData.length;\n const height = Math.ceil((b_age - t_age) * bestPixelScale) + 2;\n\n const extensiveUnits = findLaterallyExtensiveUnits(data);\n\n const scale = (val: number) => {\n return (val - t_age) * bestPixelScale;\n };\n\n return h(\n \"div.package-overlay\",\n { style: { width, height } },\n extensiveUnits.map((d) => {\n return h(LaterallyExtensiveUnit, {\n data: d,\n scale,\n pixelScale: bestPixelScale,\n columnSpacing,\n });\n }),\n );\n}\n\nfunction LaterallyExtensiveUnit({ data, scale, pixelScale, columnSpacing }) {\n const { b_age, t_age, strat_name_long, units } = data;\n // Build boxes by column groups\n const boxes: UnitGroupBox[] = splitStratIntoBoxes(data);\n\n return h(\n \"div.laterally-extensive-unit\",\n boxes.map((d, i) => {\n return h(StratColSpan, {\n scale,\n data: d,\n pixelScale,\n key: i,\n columnSpacing,\n });\n }),\n );\n}\n\nfunction StratColSpan({\n data,\n scale,\n columnWidth = 100,\n columnSpacing = 0,\n pixelScale = 1,\n}) {\n const { startCol, endCol, strat_name_long, t_age, b_age } = data;\n const top = scale(t_age);\n const left = startCol * (columnWidth + columnSpacing);\n const width = (endCol - startCol + 1) * (columnWidth + columnSpacing);\n const height = (b_age - t_age) * pixelScale;\n return h(\n \"div.strat-col-span\",\n { style: { top, height, width, left } },\n strat_name_long,\n );\n}\n\nfunction ChartArea({ children }) {\n const setSelectedUnit = useUnitSelectionStore(\n (state) => state.setSelectedUnit,\n );\n\n return h(\n \"div.correlation-chart-inner\",\n {\n onClick() {\n setSelectedUnit(null);\n },\n },\n children,\n );\n}\n\ninterface TimescaleColumnProps {\n scaleInfo: CompositeStratigraphicScaleInfo;\n showLabels?: boolean;\n unconformityLabels?: boolean;\n}\n\nfunction TimescaleColumn(props: TimescaleColumnProps) {\n const { scaleInfo, unconformityLabels = true } = props;\n return h(\"div.column-container.age-axis-container\", [\n h(CompositeAgeAxisCore, { ...scaleInfo }),\n h(CompositeTimescaleCore, { ...scaleInfo, unconformityLabels }),\n ]);\n}\n"],"names":[],"version":3,"file":"column-views.53722d0a.js.map"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {IsotopesDataset as $d71d096cfe00860f$export$c69bd0285aa5d775, IsotopesColumn as $d71d096cfe00860f$export$5d8aa8022c284748} from "./column-views.
|
|
1
|
+
import {IsotopesDataset as $d71d096cfe00860f$export$c69bd0285aa5d775, IsotopesColumn as $d71d096cfe00860f$export$5d8aa8022c284748} from "./column-views.0ce9b697.js";
|
|
2
2
|
import {MeasurementDataContext as $5dbb619f2c7bef60$export$c644ef985ce7a4c4, MeasurementDataProvider as $5dbb619f2c7bef60$export$5f01d5b342a89841, useMeasurementData as $5dbb619f2c7bef60$export$8a0335fd9ff72150} from "./column-views.a7c5ae16.js";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ import {MeasurementDataContext as $5dbb619f2c7bef60$export$c644ef985ce7a4c4, Mea
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export {$d71d096cfe00860f$export$c69bd0285aa5d775 as IsotopesDataset, $d71d096cfe00860f$export$5d8aa8022c284748 as IsotopesColumn, $5dbb619f2c7bef60$export$c644ef985ce7a4c4 as MeasurementDataContext, $5dbb619f2c7bef60$export$5f01d5b342a89841 as MeasurementDataProvider, $5dbb619f2c7bef60$export$8a0335fd9ff72150 as useMeasurementData};
|
|
9
|
-
//# sourceMappingURL=column-views.
|
|
9
|
+
//# sourceMappingURL=column-views.60365cdb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"","sources":["packages/column-views/src/facets/carbon-isotopes/index.ts"],"sourcesContent":["export * from \"./isotopes-column\";\nexport * from \"./data-provider\";\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":"","sources":["packages/column-views/src/facets/carbon-isotopes/index.ts"],"sourcesContent":["export * from \"./isotopes-column\";\nexport * from \"./data-provider\";\n"],"names":[],"version":3,"file":"column-views.60365cdb.js.map"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useDetritalMeasurements as $9f310bd6e88a58bc$export$1b0cf9c36f060135} from "./column-views.05586d1f.js";
|
|
2
2
|
import $d4hxx$columnviews2c45a7b5js from "./column-views.2c45a7b5.js";
|
|
3
3
|
import "./column-views.403a7b48.css";
|
|
4
|
-
import {BaseMeasurementsColumn as $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d} from "./column-views.
|
|
4
|
+
import {BaseMeasurementsColumn as $c6d9d48b3424a44c$export$ce5c4f2fdf4e644d} from "./column-views.faacfc3c.js";
|
|
5
5
|
import {usePlotArea as $d4hxx$usePlotArea, DetritalSpectrumPlot as $d4hxx$DetritalSpectrumPlot, DetritalSeries as $d4hxx$DetritalSeries} from "@macrostrat/data-components";
|
|
6
6
|
import $d4hxx$macrostrathyper from "@macrostrat/hyper";
|
|
7
7
|
import {useMemo as $d4hxx$useMemo} from "react";
|
|
@@ -92,4 +92,4 @@ function $715dd5fedd79146a$export$1b3047373cd1c8c7(props) {
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
export {$715dd5fedd79146a$export$f176396e104db8d5 as DetritalColumn, $715dd5fedd79146a$export$1b3047373cd1c8c7 as DetritalGroup};
|
|
95
|
-
//# sourceMappingURL=column-views.
|
|
95
|
+
//# sourceMappingURL=column-views.748dce47.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAgB5B,MAAM,qCAAe,CAAC,KAAO,CAAC,IAAM,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC,OAAO;AAE9D,SAAS,0CAAe,YAAE,QAAQ,SAAE,QAAQ,WAAW;IACrD,MAAM,OAAO,CAAA,GAAA,yCAAsB,EAAE;QAAE,QAAQ;IAAS;IAExD,MAAM,QAAQ;IACd,MAAM,cAAc;IAEpB,MAAM,gBAAgB,QAAQ;IAE9B,MAAM,gBAAgB,CAAA,GAAA,cAAM,EAAE;QAC5B,OAAO,CAAC;YACN,OAAO,wBAAE,2CAAe;gBACtB,OAAO;gBACP,QAAQ;uBACR;gBACA,GAAG,KAAK;YACV;QACF;IACF,GAAG;QAAC;QAAO;KAAM;IAEjB,OAAO,wBAAE,CAAA,GAAA,yCAAqB,GAAG;cAC/B;uBACA;QACA,WAAW,CAAC,IAAM,CAAC,CAAC,EAAE,CAAC,OAAO;sBAC9B;IACF;AACF;AAEA,SAAS,sCAAgB,QAAE,IAAI,EAAE;IAC/B,MAAM,UAAE,MAAM,UAAE,MAAM,EAAE,GAAG,CAAA,GAAA,kBAAU;IAErC,MAAM,SAAE,KAAK,SAAE,KAAK,EAAE,GAAG;IACzB,MAAM,IAAI,OAAO;IACjB,MAAM,KAAK,OAAO;IAElB,OAAO,wBAAE,yBAAyB;WAAE;QAAG,OAAO,KAAK;QAAG,GAAG;gBAAG;IAAO;AACrE;AAEA,SAAS,0CAAc,KAAwB;IAC7C,MAAM,QAAE,IAAI,SAAE,KAAK,UAAE,MAAM,SAAE,KAAK,WAAE,OAAO,EAAE,GAAG;IAChD,MAAM,QAAE,IAAI,QAAE,IAAI,EAAE,GAAG;IAEvB,MAAM,SAAS;IAEf,MAAM,aAAa,SAAS,SAAS;IACrC,MAAM,iBAAiB,aAAa;IAEpC,OAAO,wBACL,sBACA;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE;YAAE,aAAa;QAAe;IAAG,GACzD;QACE,wBACE,CAAA,GAAA,2BAAmB,GACnB;mBAAE;YAAO,aAAa;YAAQ,gBAAgB;YAAM,eAAe;QAAG,GACtE;YACE,wBAAE,EAAE,CAAC,QAAQ,MAAM,uCAAiB;sBAAE;YAAK;YAC3C,KAAK,GAAG,CAAC,CAAC;gBACR,OAAO,wBAAE,CAAA,GAAA,qBAAa,GAAG;oBACvB,WAAW;oBACX,MAAM,EAAE,aAAa;oBACrB,OAAO;gBACT;YACF;SACD;KAEJ;AAEL","sources":["packages/column-views/src/facets/detrital-zircon/index.ts"],"sourcesContent":["import {\n DetritalSpectrumPlot,\n DetritalSeries,\n usePlotArea,\n} from \"@macrostrat/data-components\";\nimport type { IUnit } from \"../../units/types\";\nimport hyper from \"@macrostrat/hyper\";\nimport { useDetritalMeasurements, MeasurementInfo } from \"./provider\";\nimport { useMemo } from \"react\";\nimport styles from \"./index.module.sass\";\nimport classNames from \"classnames\";\nimport { BaseMeasurementsColumn } from \"../base-sample-column\";\n\nconst h = hyper.styled(styles);\n\ninterface DetritalItemProps {\n note: {\n data: MeasurementInfo[];\n unit?: IUnit;\n };\n spacing?: {\n below?: number;\n above?: number;\n };\n width?: number;\n height?: number;\n color?: string;\n}\n\nconst matchingUnit = (dz) => (d) => d.unit_id == dz[0].unit_id;\n\nfunction DetritalColumn({ columnID, color = \"magenta\" }) {\n const data = useDetritalMeasurements({ col_id: columnID });\n\n const width = 400;\n const paddingLeft = 40;\n\n const spectrumWidth = width - paddingLeft;\n\n const noteComponent = useMemo(() => {\n return (props) => {\n return h(DetritalGroup, {\n width: spectrumWidth,\n height: 40,\n color,\n ...props,\n });\n };\n }, [width, color]);\n\n return h(BaseMeasurementsColumn, {\n data,\n noteComponent,\n getUnitID: (d) => d[0].unit_id,\n matchingUnit,\n });\n}\n\nfunction DepositionalAge({ unit }) {\n const { xScale, height } = usePlotArea();\n\n const { t_age, b_age } = unit;\n const x = xScale(t_age);\n const x1 = xScale(b_age);\n\n return h(\"rect.depositional-age\", { x, width: x1 - x, y: 0, height });\n}\n\nfunction DetritalGroup(props: DetritalItemProps) {\n const { note, width, height, color, spacing } = props;\n const { data, unit } = note;\n\n const _color = color;\n\n const spaceBelow = spacing?.below ?? 100;\n const hideAxisLabels = spaceBelow < 60;\n\n return h(\n \"div.detrital-group\",\n { className: classNames({ \"hide-axis\": hideAxisLabels }) },\n [\n h(\n DetritalSpectrumPlot,\n { width, innerHeight: height, showAxisLabels: true, paddingBottom: 40 },\n [\n h.if(unit != null)(DepositionalAge, { unit }),\n data.map((d) => {\n return h(DetritalSeries, {\n bandwidth: 20,\n data: d.measure_value,\n color: _color,\n });\n }),\n ],\n ),\n ],\n );\n}\n\nexport { DetritalColumn, DetritalGroup };\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAgB5B,MAAM,qCAAe,CAAC,KAAO,CAAC,IAAM,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC,OAAO;AAE9D,SAAS,0CAAe,YAAE,QAAQ,SAAE,QAAQ,WAAW;IACrD,MAAM,OAAO,CAAA,GAAA,yC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,GAAA,qBAAa,GAAG;oBACvB,WAAW;oBACX,MAAM,EAAE,aAAa;oBACrB,OAAO;gBACT;YACF;SACD;KAEJ;AAEL","sources":["packages/column-views/src/facets/detrital-zircon/index.ts"],"sourcesContent":["import {\n DetritalSpectrumPlot,\n DetritalSeries,\n usePlotArea,\n} from \"@macrostrat/data-components\";\nimport type { IUnit } from \"../../units/types\";\nimport hyper from \"@macrostrat/hyper\";\nimport { useDetritalMeasurements, MeasurementInfo } from \"./provider\";\nimport { useMemo } from \"react\";\nimport styles from \"./index.module.sass\";\nimport classNames from \"classnames\";\nimport { BaseMeasurementsColumn } from \"../base-sample-column\";\n\nconst h = hyper.styled(styles);\n\ninterface DetritalItemProps {\n note: {\n data: MeasurementInfo[];\n unit?: IUnit;\n };\n spacing?: {\n below?: number;\n above?: number;\n };\n width?: number;\n height?: number;\n color?: string;\n}\n\nconst matchingUnit = (dz) => (d) => d.unit_id == dz[0].unit_id;\n\nfunction DetritalColumn({ columnID, color = \"magenta\" }) {\n const data = useDetritalMeasurements({ col_id: columnID });\n\n const width = 400;\n const paddingLeft = 40;\n\n const spectrumWidth = width - paddingLeft;\n\n const noteComponent = useMemo(() => {\n return (props) => {\n return h(DetritalGroup, {\n width: spectrumWidth,\n height: 40,\n color,\n ...props,\n });\n };\n }, [width, color]);\n\n return h(BaseMeasurementsColumn, {\n data,\n noteComponent,\n getUnitID: (d) => d[0].unit_id,\n matchingUnit,\n });\n}\n\nfunction DepositionalAge({ unit }) {\n const { xScale, height } = usePlotArea();\n\n const { t_age, b_age } = unit;\n const x = xScale(t_age);\n const x1 = xScale(b_age);\n\n return h(\"rect.depositional-age\", { x, width: x1 - x, y: 0, height });\n}\n\nfunction DetritalGroup(props: DetritalItemProps) {\n const { note, width, height, color, spacing } = props;\n const { data, unit } = note;\n\n const _color = color;\n\n const spaceBelow = spacing?.below ?? 100;\n const hideAxisLabels = spaceBelow < 60;\n\n return h(\n \"div.detrital-group\",\n { className: classNames({ \"hide-axis\": hideAxisLabels }) },\n [\n h(\n DetritalSpectrumPlot,\n { width, innerHeight: height, showAxisLabels: true, paddingBottom: 40 },\n [\n h.if(unit != null)(DepositionalAge, { unit }),\n data.map((d) => {\n return h(DetritalSeries, {\n bandwidth: 20,\n data: d.measure_value,\n color: _color,\n });\n }),\n ],\n ),\n ],\n );\n}\n\nexport { DetritalColumn, DetritalGroup };\n"],"names":[],"version":3,"file":"column-views.748dce47.js.map"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {defaultNameFunction as $bc17276da4abb183$export$c9757aeb43a67df0, UnitNamesColumn as $bc17276da4abb183$export$594d19cdd88f8c16} from "./column-views.
|
|
2
|
-
import {LabeledUnit as $d254716a820e9c85$export$b4f0ca233b98f9af, UnitBoxes as $d254716a820e9c85$export$5d1cdfabe8dc8085} from "./column-views.
|
|
1
|
+
import {defaultNameFunction as $bc17276da4abb183$export$c9757aeb43a67df0, UnitNamesColumn as $bc17276da4abb183$export$594d19cdd88f8c16} from "./column-views.e1bc3cfa.js";
|
|
2
|
+
import {LabeledUnit as $d254716a820e9c85$export$b4f0ca233b98f9af, UnitBoxes as $d254716a820e9c85$export$5d1cdfabe8dc8085} from "./column-views.81bddbee.js";
|
|
3
3
|
import "./column-views.3b972a9b.css";
|
|
4
4
|
import $1PjJ0$columnviews40cd59b5js from "./column-views.40cd59b5.js";
|
|
5
|
-
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratColumnData as $d5074f164411387e$export$f8509b7cce386c7d} from "./column-views.
|
|
6
|
-
import {useUnitSelectionDispatch as $
|
|
5
|
+
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratColumnData as $d5074f164411387e$export$f8509b7cce386c7d} from "./column-views.4ed90896.js";
|
|
6
|
+
import {useUnitSelectionDispatch as $61771df184788970$export$77a278d5ca56e309} from "./column-views.a3fabf0f.js";
|
|
7
7
|
import {hyperStyled as $1PjJ0$hyperStyled} from "@macrostrat/hyper";
|
|
8
8
|
import {LithologyColumn as $1PjJ0$LithologyColumn, SVG as $1PjJ0$SVG, ColumnContext as $1PjJ0$ColumnContext} from "@macrostrat/column-components";
|
|
9
9
|
import {createContext as $1PjJ0$createContext, useState as $1PjJ0$useState, useRef as $1PjJ0$useRef, useCallback as $1PjJ0$useCallback, useContext as $1PjJ0$useContext, useEffect as $1PjJ0$useEffect} from "react";
|
|
@@ -19,7 +19,6 @@ function $parcel$interopDefault(a) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
const $8c8238faa5cde49c$var$h = (0, $1PjJ0$hyperStyled)((0, ($parcel$interopDefault($1PjJ0$columnviews40cd59b5js))));
|
|
24
23
|
const $8c8238faa5cde49c$var$LabelTrackerContext = (0, $1PjJ0$createContext)(null);
|
|
25
24
|
const $8c8238faa5cde49c$var$UnlabeledDivisionsContext = (0, $1PjJ0$createContext)(null);
|
|
@@ -92,7 +91,7 @@ function $8c8238faa5cde49c$export$13984e34afdbb040(props) {
|
|
|
92
91
|
const _compositeScale = (0, $d5074f164411387e$export$a7fc62995ec4f76)();
|
|
93
92
|
const unlabeledUnits = (0, $1PjJ0$useContext)($8c8238faa5cde49c$var$UnlabeledDivisionsContext);
|
|
94
93
|
const unitsToLabel = noteMode == "unlabeled" ? unlabeledUnits : undefined;
|
|
95
|
-
const selectUnit = (0, $
|
|
94
|
+
const selectUnit = (0, $61771df184788970$export$77a278d5ca56e309)();
|
|
96
95
|
return $8c8238faa5cde49c$var$h("div.section-labels-column", [
|
|
97
96
|
$8c8238faa5cde49c$var$h($8c8238faa5cde49c$export$6cc7a9df4edde18, {
|
|
98
97
|
units: [],
|
|
@@ -136,4 +135,4 @@ function $8c8238faa5cde49c$export$6cc7a9df4edde18(props) {
|
|
|
136
135
|
|
|
137
136
|
|
|
138
137
|
export {$8c8238faa5cde49c$export$e4e89ab6c86ac513 as LabelTrackerProvider, $8c8238faa5cde49c$export$f613830566442374 as TrackedLabeledUnit, $8c8238faa5cde49c$export$1dfa200d57964eee as CompositeUnitComponent, $8c8238faa5cde49c$export$a6684360fef0406e as CompositeUnitsColumn, $8c8238faa5cde49c$export$d8c3f2fdd653a082 as AnnotatedUnitsColumn, $8c8238faa5cde49c$export$13984e34afdbb040 as SectionLabelsColumn, $8c8238faa5cde49c$export$6cc7a9df4edde18 as ColumnNotesProvider};
|
|
139
|
-
//# sourceMappingURL=column-views.
|
|
138
|
+
//# sourceMappingURL=column-views.7683bb52.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,0BAAI,CAAA,GAAA,kBAAU,EAAE,CAAA,GAAA,uEAAK;AAM3B,MAAM,4CAAsB,CAAA,GAAA,oBAAY,EAAE;AAC1C,MAAM,kDAA4B,CAAA,GAAA,oBAAY,EAAE;AAEhD,MAAM,6CAAuB,CAAC,IAAM,EAAE,OAAO;AAEtC,SAAS,0CAAqB,KAAK;IACxC;;GAEC,GACD,MAAM,YAAE,QAAQ,SAAE,KAAK,cAAE,aAAa,4CAAsB,GAAG;IAC/D,MAAM,CAAC,oBAAoB,sBAAsB,GAAG,CAAA,GAAA,eAAO,EAEzD;IACF,MAAM,kBAAkB,CAAA,GAAA,aAAK,EAAgB,CAAC;IAC9C,MAAM,uBAAuB,CAAA,GAAA,kBAAU,EACrC,CAAC,KAAK;QACJ,MAAM,KAAK,WAAW;QACtB,gBAAgB,OAAO,CAAC,GAAG,GAAG;QAC9B,IAAI,OAAO,IAAI,CAAC,gBAAgB,OAAO,EAAE,MAAM,IAAI,MAAM,MAAM,EAC7D,sBACE,aAAa;QACb,MAAM,MAAM,CAAC,CAAC;YACZ,MAAM,KAAK,WAAW;YACtB,OAAO,gBAAgB,OAAO,CAAC,GAAG,IAAI;QACxC;IAGN,GACA;QAAC;QAAiB;QAAO;KAAW;IAGtC,MAAM,QAAQ;IACd,OAAO,wBACL,0CAAoB,QAAQ,EAC5B;eAAE;IAAM,GACR,wBACE,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BACA;QACF,GACA,wBACE,CAAA,GAAA,UAAE,GACF;YACE,QAAQ;YACR,YAAY,QAAQ;YACpB,UAAU;YACV,aAAa;QACf,GACA,wBAAE,CAAA,GAAA,yCAAc,GAAG;YACjB,WAAW;YACX,aAAa;mBACb;2BACA;8BACA;YACA,OAAO;YACP,aAAY,IAAI;gBACd,WAAW,KAAK,IAAI,EAAE,MAAM;YAC9B;QACF;KAGL;AACH;AAQO,SAAS,yCAAoB,KAAK;IACvC,0DAA0D;IAC1D,MAAM,YAAE,QAAQ,SAAE,KAAK,eAAE,WAAW,cAAE,UAAU,EAAE,GAAG;IAErD,MAAM,YAAE,QAAQ,EAAE,GAAG,CAAA,GAAA,yCAAsB;IAE3C,OAAO,wBACL,CAAA,GAAA,oBAAY,EAAE,QAAQ,EACtB;QACE,OAAO;YACL,WAAW,EAAE;mBACb;YACA,cAAc;YACd,aAAa;YACb,gBAAgB;sBAChB;YACA,MAAM;QACR;IACF,GACA;AAEJ","sources":["packages/column-views/src/units/composite.ts"],"sourcesContent":["import { hyperStyled } from \"@macrostrat/hyper\";\nimport {\n LithologyColumn,\n SVG,\n ColumnContext,\n} from \"@macrostrat/column-components\";\nimport { defaultNameFunction, UnitNamesColumn } from \"./names\";\nimport {\n createContext,\n useContext,\n useState,\n useRef,\n useCallback,\n useEffect,\n} from \"react\";\nimport { BaseUnit } from \"@macrostrat/api-types\";\nimport { LabeledUnit, UnitBoxes } from \"./boxes\";\nimport styles from \"./composite.module.sass\";\nimport {\n useCompositeScale,\n useMacrostratColumnData,\n useUnitSelectionDispatch,\n} from \"../data-provider\";\n\nconst h = hyperStyled(styles);\n\ninterface LabelTracker {\n [key: number]: boolean;\n}\n\nconst LabelTrackerContext = createContext(null);\nconst UnlabeledDivisionsContext = createContext(null);\n\nconst findMacrostratUnitID = (u) => u.unit_id;\n\nexport function LabelTrackerProvider(props) {\n /** Tracker for units to handle state for whether their labels fit inline or not.\n * Designed to work for single or composite columns.\n */\n const { children, units, findUnitID = findMacrostratUnitID } = props;\n const [unlabeledDivisions, setUnlabeledDivisions] = useState<\n BaseUnit[] | null\n >(null);\n const labelTrackerRef = useRef<LabelTracker>({});\n const trackLabelVisibility = useCallback(\n (div, visible) => {\n const id = findUnitID(div);\n labelTrackerRef.current[id] = visible;\n if (Object.keys(labelTrackerRef.current).length == units.length) {\n setUnlabeledDivisions(\n // @ts-ignore\n units.filter((d) => {\n const id = findUnitID(d);\n return labelTrackerRef.current[id] == false;\n }),\n );\n }\n },\n [labelTrackerRef, units, findUnitID],\n );\n\n const value = trackLabelVisibility;\n return h(\n LabelTrackerContext.Provider,\n { value },\n h(\n UnlabeledDivisionsContext.Provider,\n { value: unlabeledDivisions },\n children,\n ),\n );\n}\n\nfunction TrackedLabeledUnit({\n division,\n nameForDivision = defaultNameFunction,\n ...rest\n}) {\n const trackLabelVisibility = useContext(LabelTrackerContext);\n return h(LabeledUnit, {\n division,\n label: nameForDivision(division),\n onLabelUpdated(label, visible) {\n // If there is al LabelTrackerContext, update the label visibility\n trackLabelVisibility?.(division, visible);\n },\n ...rest,\n });\n}\n\nexport const CompositeUnitComponent = TrackedLabeledUnit;\n\ntype BaseUnitProps = {\n width: number;\n showLabels?: boolean;\n columnWidth?: number;\n clipToFrame?: boolean;\n};\n\ntype ICompositeUnitProps = BaseUnitProps & {\n gutterWidth?: number;\n labelOffset?: number;\n paddingLeft?: number;\n nameForDivision?: (division: BaseUnit) => string;\n children?: React.ReactNode;\n unitComponent?: React.FC<any>;\n unitComponentProps?: any;\n noteMode?: \"labeled\" | \"unlabeled\";\n showLabelColumn?: boolean;\n noteComponent?: React.FC<any>;\n shouldRenderNote?: (d: any) => boolean;\n};\n\ninterface CompositeUnitProps {\n unitComponent: React.FC<any>;\n unitComponentProps?: any;\n width: number;\n showLabels?: boolean;\n clipToFrame?: boolean;\n}\n\nexport function CompositeUnitsColumn(props: CompositeUnitProps) {\n /*\n A column with units and names either\n overlapping or offset to the right\n */\n const {\n width,\n unitComponent = TrackedLabeledUnit,\n unitComponentProps,\n clipToFrame,\n ...rest\n } = props;\n\n return h(LithologyColumn, { width, clipToFrame }, [\n h(UnitBoxes, {\n unitComponent,\n unitComponentProps,\n ...rest,\n }),\n ]);\n}\n\nexport function AnnotatedUnitsColumn(props: ICompositeUnitProps) {\n useEffect(() => {\n console.warn(\n \"AnnotatedUnitsColumn is deprecated and currently renders a no-op for transition purposes\",\n );\n }, []);\n return null;\n}\n\nexport function SectionLabelsColumn(props: ICompositeUnitProps) {\n // Section with \"squishy\" time scale\n const {\n width = 300,\n noteMode = \"unlabeled\",\n labelOffset = 30,\n noteComponent,\n shouldRenderNote,\n } = props;\n\n const { totalHeight, axisType } = useMacrostratColumnData();\n const _compositeScale = useCompositeScale();\n\n const unlabeledUnits = useContext(UnlabeledDivisionsContext);\n const unitsToLabel = noteMode == \"unlabeled\" ? unlabeledUnits : undefined;\n\n const selectUnit = useUnitSelectionDispatch();\n\n return h(\"div.section-labels-column\", [\n h(\n ColumnNotesProvider,\n {\n units: [],\n scale: _compositeScale,\n totalHeight,\n axisType,\n },\n h(\n SVG,\n {\n height: totalHeight,\n innerWidth: width - 4,\n paddingH: 1,\n paddingLeft: 3,\n },\n h(UnitNamesColumn, {\n divisions: unitsToLabel,\n paddingLeft: labelOffset,\n width,\n noteComponent,\n shouldRenderNote,\n scale: _compositeScale,\n onClickNote(note) {\n selectUnit(note.data, null, null);\n },\n }),\n ),\n ),\n ]);\n}\n\nexport interface CompositeColumnScale {\n (val: number): number;\n copy(): CompositeColumnScale;\n domain(): number[];\n}\n\nexport function ColumnNotesProvider(props) {\n // A fake column axis provider that allows scales to cross\n const { children, scale, totalHeight, pixelScale } = props;\n\n const { axisType } = useMacrostratColumnData();\n\n return h(\n ColumnContext.Provider,\n {\n value: {\n divisions: [],\n scale,\n scaleClamped: scale,\n pixelHeight: totalHeight,\n pixelsPerMeter: pixelScale,\n axisType,\n zoom: 1,\n },\n },\n children,\n );\n}\n\nexport { TrackedLabeledUnit, ICompositeUnitProps };\n"],"names":[],"version":3,"file":"column-views.7683bb52.js.map"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {ColumnNotesProvider as $8c8238faa5cde49c$export$6cc7a9df4edde18} from "./column-views.
|
|
2
|
-
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratColumnData as $d5074f164411387e$export$f8509b7cce386c7d} from "./column-views.
|
|
1
|
+
import {ColumnNotesProvider as $8c8238faa5cde49c$export$6cc7a9df4edde18} from "./column-views.7683bb52.js";
|
|
2
|
+
import {useCompositeScale as $d5074f164411387e$export$a7fc62995ec4f76, useMacrostratColumnData as $d5074f164411387e$export$f8509b7cce386c7d} from "./column-views.4ed90896.js";
|
|
3
3
|
import $aB7pQ$macrostrathyper from "@macrostrat/hyper";
|
|
4
4
|
import {SVG as $aB7pQ$SVG, StaticNotesColumn as $aB7pQ$StaticNotesColumn} from "@macrostrat/column-components";
|
|
5
5
|
|
|
@@ -34,4 +34,4 @@ function $9e52fe4012c88296$export$fc5babae10f3f77d({ notes: notes, width: width
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
export {$9e52fe4012c88296$export$fc5babae10f3f77d as ColumnNotes};
|
|
37
|
-
//# sourceMappingURL=column-views.
|
|
37
|
+
//# sourceMappingURL=column-views.787d7696.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAiBO,SAAS,0CAAY,SAC1B,KAAK,SACL,QAAQ,oBACR,aAAa,eACb,cAAc,8BACd,wBAAwB,YACxB,QAAQ,EACS;IACjB,MAAM,eAAE,WAAW,EAAE,GAAG,CAAA,GAAA,yCAAsB;IAC9C,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,OAAO,CAAA,GAAA,sBAAA,EACL,CAAA,GAAA,wCAAkB,GAClB;eACE;qBACA;QACA,YAAY;IACd,GACA;QACE,CAAA,GAAA,sBAAA,EAAE,CAAA,GAAA,UAAE,GAAG;mBAAE;YAAO,QAAQ;YAAa,UAAU;QAAE,GAAG;YAClD,CAAA,GAAA,sBAAA,EAAE,CAAA,GAAA,wBAAgB,GAAG;uBACnB;uBACA;+BACA;6BACA;0CACA;YACF;SACD;QACD;KACD;AAEL","sources":["packages/column-views/src/notes.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\n\nimport { ColumnNotesProvider } from \"./units\";\n\nimport { StaticNotesColumn, SVG } from \"@macrostrat/column-components\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport type { ReactNode } from \"react\";\n\ninterface ColumnNotesProps {\n notes: any[];\n width?: number;\n noteComponent?: any;\n paddingLeft?: number;\n deltaConnectorAttachment?: number;\n children?: ReactNode;\n}\n\nexport function ColumnNotes({\n notes,\n width = 200,\n noteComponent,\n paddingLeft = 60,\n deltaConnectorAttachment,\n children,\n}: ColumnNotesProps) {\n const { totalHeight } = useMacrostratColumnData();\n const scale = useCompositeScale();\n\n return h(\n ColumnNotesProvider,\n {\n scale,\n totalHeight,\n pixelScale: -1,\n },\n [\n h(SVG, { width, height: totalHeight, paddingH: 4 }, [\n h(StaticNotesColumn, {\n width,\n notes,\n noteComponent,\n paddingLeft,\n deltaConnectorAttachment,\n }),\n ]),\n children,\n ],\n );\n}\n"],"names":[],"version":3,"file":"column-views.
|
|
1
|
+
{"mappings":";;;;;;;;;AAiBO,SAAS,0CAAY,SAC1B,KAAK,SACL,QAAQ,oBACR,aAAa,eACb,cAAc,8BACd,wBAAwB,YACxB,QAAQ,EACS;IACjB,MAAM,eAAE,WAAW,EAAE,GAAG,CAAA,GAAA,yCAAsB;IAC9C,MAAM,QAAQ,CAAA,GAAA,wCAAgB;IAE9B,OAAO,CAAA,GAAA,sBAAA,EACL,CAAA,GAAA,wCAAkB,GAClB;eACE;qBACA;QACA,YAAY;IACd,GACA;QACE,CAAA,GAAA,sBAAA,EAAE,CAAA,GAAA,UAAE,GAAG;mBAAE;YAAO,QAAQ;YAAa,UAAU;QAAE,GAAG;YAClD,CAAA,GAAA,sBAAA,EAAE,CAAA,GAAA,wBAAgB,GAAG;uBACnB;uBACA;+BACA;6BACA;0CACA;YACF;SACD;QACD;KACD;AAEL","sources":["packages/column-views/src/notes.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\n\nimport { ColumnNotesProvider } from \"./units\";\n\nimport { StaticNotesColumn, SVG } from \"@macrostrat/column-components\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport type { ReactNode } from \"react\";\n\ninterface ColumnNotesProps {\n notes: any[];\n width?: number;\n noteComponent?: any;\n paddingLeft?: number;\n deltaConnectorAttachment?: number;\n children?: ReactNode;\n}\n\nexport function ColumnNotes({\n notes,\n width = 200,\n noteComponent,\n paddingLeft = 60,\n deltaConnectorAttachment,\n children,\n}: ColumnNotesProps) {\n const { totalHeight } = useMacrostratColumnData();\n const scale = useCompositeScale();\n\n return h(\n ColumnNotesProvider,\n {\n scale,\n totalHeight,\n pixelScale: -1,\n },\n [\n h(SVG, { width, height: totalHeight, paddingH: 4 }, [\n h(StaticNotesColumn, {\n width,\n notes,\n noteComponent,\n paddingLeft,\n deltaConnectorAttachment,\n }),\n ]),\n children,\n ],\n );\n}\n"],"names":[],"version":3,"file":"column-views.787d7696.js.map"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {resolveID as $d3e69bd163d41f63$export$7be7d732f3de9464, scalePattern as $d3e69bd163d41f63$export$e8deec7b02ce51eb} from "./column-views.006d5180.js";
|
|
2
|
-
import {
|
|
2
|
+
import {useLithologies as $774a5efa27d1c77b$export$4d18a90c945d129f} from "./column-views.2eceafb5.js";
|
|
3
|
+
import {useUnitSelectionTarget as $61771df184788970$export$cbbec12b1451fe7d} from "./column-views.a3fabf0f.js";
|
|
3
4
|
import "./column-views.6c670c13.css";
|
|
4
5
|
import $lClM8$columnviews4d374a35js from "./column-views.4d374a35.js";
|
|
5
6
|
import {getUnitHeightRange as $b6657fba8924a702$export$70e712e2ac0237a} from "./column-views.54f8b909.js";
|
|
6
|
-
import {useLithologies as $774a5efa27d1c77b$export$4d18a90c945d129f} from "./column-views.73b8ff16.js";
|
|
7
7
|
import {getMixedUnitColor as $6698edd2a743bf07$export$175d3e927f1a9860} from "./column-views.9b77388d.js";
|
|
8
8
|
import {ColumnAxisType as $lClM8$ColumnAxisType, ColumnContext as $lClM8$ColumnContext, ColumnLayoutContext as $lClM8$ColumnLayoutContext, useColumn as $lClM8$useColumn, useGeologicPattern as $lClM8$useGeologicPattern, zigZagBoxPath as $lClM8$zigZagBoxPath, ForeignObject as $lClM8$ForeignObject, PatternDefsProvider as $lClM8$PatternDefsProvider} from "@macrostrat/column-components";
|
|
9
9
|
import {SizeAwareLabel as $lClM8$SizeAwareLabel} from "@macrostrat/ui-components";
|
|
@@ -25,7 +25,6 @@ function $parcel$interopDefault(a) {
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
const $d254716a820e9c85$var$h = (0, $lClM8$macrostrathyper).styled((0, ($parcel$interopDefault($lClM8$columnviews4d374a35js))));
|
|
30
29
|
function $d254716a820e9c85$var$useUnitRect(division, options = {}) {
|
|
31
30
|
const { widthFraction: widthFraction = 1, axisType: axisType = (0, $lClM8$ColumnAxisType).AGE, padding: padding = 0 } = options;
|
|
@@ -53,7 +52,7 @@ function $d254716a820e9c85$export$d54fdbabca27e53(props) {
|
|
|
53
52
|
...baseBounds
|
|
54
53
|
};
|
|
55
54
|
const backgroundColor = (0, $6698edd2a743bf07$export$175d3e927f1a9860)(d, lithMap, null, false);
|
|
56
|
-
const [ref, selected, onClick] = (0, $
|
|
55
|
+
const [ref, selected, onClick] = (0, $61771df184788970$export$cbbec12b1451fe7d)(d);
|
|
57
56
|
return $d254716a820e9c85$var$h("g.unit", {
|
|
58
57
|
className: className,
|
|
59
58
|
style: {
|
|
@@ -92,7 +91,7 @@ function $d254716a820e9c85$export$1d8b9ae22d404866(props) {
|
|
|
92
91
|
const _className = (0, $lClM8$classnames)(className, {
|
|
93
92
|
colored: hasBackgroundColor
|
|
94
93
|
});
|
|
95
|
-
const [ref, selected, onClick] = (0, $
|
|
94
|
+
const [ref, selected, onClick] = (0, $61771df184788970$export$cbbec12b1451fe7d)(d);
|
|
96
95
|
return $d254716a820e9c85$var$h("g.unit", {
|
|
97
96
|
className: _className,
|
|
98
97
|
style: {
|
|
@@ -204,4 +203,4 @@ function $d254716a820e9c85$export$5d1cdfabe8dc8085(props) {
|
|
|
204
203
|
|
|
205
204
|
|
|
206
205
|
export {$d254716a820e9c85$export$d54fdbabca27e53 as MinimalUnit, $d254716a820e9c85$export$1d8b9ae22d404866 as Unit, $d254716a820e9c85$export$b4f0ca233b98f9af as LabeledUnit, $d254716a820e9c85$export$5d1cdfabe8dc8085 as UnitBoxes};
|
|
207
|
-
//# sourceMappingURL=column-views.
|
|
206
|
+
//# sourceMappingURL=column-views.81bddbee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,uEAAK;AAkC5B,SAAS,kCACP,QAAe,EACf,UAA2B,CAAC,CAAC;IAE7B,MAAM,iBACJ,gBAAgB,aAChB,WAAW,CAAA,GAAA,qBAAa,EAAE,GAAG,WAC7B,UAAU,GACX,GAAG;IACJ,MAAM,SAAE,KAAK,EAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,oBAAY;IACzC,MAAM,SAAE,KAAK,EAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0BAAkB;IAE/C,MAAM,CAAC,cAAc,UAAU,GAAG,CAAA,GAAA,wCAAiB,EAAE,UAAU;IAE/D,MAAM,IAAI,MAAM;IAChB,MAAM,SAAS,KAAK,GAAG,CAAC,MAAM,gBAAgB;IAE9C,OAAO;QACL,GAAG,QAAS,CAAA,IAAI,aAAY,IAAK;QACjC,GAAG,IAAI;QACP,QAAQ,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BAAQ;IAC7B,MAAM,SAAS;QACb,GAAG,kCAAY,UAAU;2BAAE;sBAAe;QAAS,EAAE;QACrD,GAAG,UAAU;IACf;IACA,MAAM,SAAE,KAAK,UAAE,MAAM,EAAE,GAAG;IAC1B,OAAO,wBACL,2CACA;QACE,WAAW;kBACX;yBACA;mBACA;QACA,GAAG,MAAM;IACX,GACA;QACE,wBAAE,EAAE,CAAC,WACH,CAAA,GAAA,oBAAY,GACZ;YAAE,GAAG,MAAM;YAAE,WAAW;QAAuB,GAC/C,wBAAE,CAAA,GAAA,qBAAa,GAAG;YAChB,WAAW;YACX,gBAAgB;YAChB,OAAO;uBAAE;wBAAO;YAAO;mBACvB;YACA,qBAAoB,GAAG;gBACrB,eAAe,OAAO;YACxB;QACF;KAEH;AAEL;AAEA,SAAS,0CAAa,KASrB;IACC,MAAM,iBAAE,gBAAgB,+DAAM,qBAAqB,CAAC,GAAG,GAAG;IAC1D,MAAM,aAAE,SAAS,EAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,oBAAY;IAE7C,IAAI,UAAU,MAAM,IAAI,GAAG;QACzB,QAAQ,IAAI,CAAC;QACb,OAAO;IACT;IAEA,MAAM,WAAW,CAAA,GAAA,cAAM,EAAE;QACvB,OAAO,UAAU,GAAG,CAAC,CAAC,UAAe;YACnC,aAAa;YACb,OAAO,wBAAE,eAAe;0BACtB;gBACA,KAAK,SAAS,OAAO;gBACrB,GAAG,kBAAkB;YACvB;QACF;IACF,GAAG;QAAC;QAAW;QAAe;KAAmB;IAEjD,OAAO,wBACL,CAAA,GAAA,0BAAkB,GAClB;mBAAE;sBAAW;IAAa,GAC1B,wBAAE,eAAe;AAErB","sources":["packages/column-views/src/units/boxes.ts"],"sourcesContent":["import {\n ColumnAxisType,\n ColumnContext,\n ColumnLayoutContext,\n ForeignObject,\n PatternDefsProvider,\n useColumn,\n useGeologicPattern,\n zigZagBoxPath,\n} from \"@macrostrat/column-components\";\nimport { SizeAwareLabel, Clickable } from \"@macrostrat/ui-components\";\nimport hyper from \"@macrostrat/hyper\";\nimport { forwardRef, ReactNode, useContext, useMemo } from \"react\";\nimport { resolveID, scalePattern } from \"./resolvers\";\nimport { useUnitSelectionTarget, useLithologies } from \"../data-provider\";\nimport { IUnit } from \"./types\";\nimport styles from \"./boxes.module.sass\";\nimport classNames from \"classnames\";\nimport { getUnitHeightRange } from \"../prepare-units/utils\";\nimport { getMixedUnitColor } from \"./colors\";\nimport type { RectBounds } from \"./types\";\n\nconst h = hyper.styled(styles);\n\ninterface UnitRectOptions {\n widthFraction?: number;\n axisType?: ColumnAxisType;\n // Padding to create overflow for zig-zags or other ornamented edges\n padding?: number;\n}\n\ninterface UnitProps extends Clickable, Partial<RectBounds>, UnitRectOptions {\n division: IUnit;\n resolveID?(IUnit): string;\n UUID?: string;\n defaultFill?: string;\n widthFraction?: number;\n children?: ReactNode;\n className?: string;\n fill?: string;\n backgroundColor?: string;\n patternColor?: string;\n patternID?: string | number;\n}\n\nexport interface LabeledUnitProps\n extends UnitRectOptions, Clickable, Partial<RectBounds> {\n division: IUnit;\n patternID?: string | number;\n label: string;\n onLabelUpdated?(label: string, shown: boolean);\n halfWidth?: boolean;\n showLabel?: boolean;\n backgroundColor?: string;\n}\n\nfunction useUnitRect(\n division: IUnit,\n options: UnitRectOptions = {},\n): RectBounds {\n const {\n widthFraction = 1,\n axisType = ColumnAxisType.AGE,\n padding = 0,\n } = options;\n const { scale } = useContext(ColumnContext);\n const { width } = useContext(ColumnLayoutContext);\n\n const [bottomHeight, topHeight] = getUnitHeightRange(division, axisType);\n\n const y = scale(topHeight);\n const height = Math.abs(scale(bottomHeight) - y);\n\n return {\n x: width * (1 - widthFraction) - padding,\n y: y - padding,\n height: height + padding * 2,\n width: widthFraction * width + padding * 2,\n };\n}\n\nexport function MinimalUnit(props) {\n const {\n division: d,\n children,\n className,\n widthFraction = 1,\n axisType: _, // not sure why this is brought in...\n nColumns: __,\n ...baseBounds\n } = props;\n\n const { axisType } = useColumn();\n const lithMap = useLithologies();\n const bounds = {\n ...useUnitRect(d, { widthFraction, axisType }),\n ...baseBounds,\n };\n\n const backgroundColor = getMixedUnitColor(d, lithMap, null, false);\n\n const [ref, selected, onClick] = useUnitSelectionTarget(d);\n\n return h(\n \"g.unit\",\n {\n className,\n style: {\n \"--column-unit-background-color\": backgroundColor,\n \"--column-stroke-color\": backgroundColor,\n },\n },\n [\n h(\"rect.unit.background\", {\n ref,\n ...bounds,\n fill: backgroundColor,\n fillOpacity: 0.8,\n stroke: backgroundColor,\n onClick,\n }),\n h.if(selected)(\"rect.selection-overlay\", bounds),\n ],\n );\n}\n\nfunction Unit(props: UnitProps) {\n const {\n division: d,\n children,\n fill,\n defaultFill = \"transparent\",\n className,\n widthFraction = 1,\n backgroundColor,\n patternColor,\n patternID,\n axisType: _, // not sure why this is brought in...\n ...baseBounds\n } = props;\n\n const { axisType } = useColumn();\n\n const hasOverflowTop = d.t_clip_pos != null;\n const hasOverflowBottom = d.b_clip_pos != null;\n\n const bounds = {\n ...useUnitRect(d, { widthFraction, axisType }),\n ...baseBounds,\n overflowTop: hasOverflowTop,\n overflowBottom: hasOverflowBottom,\n };\n const _patternID = patternID ?? resolveID(d);\n let _fill = fill ?? useGeologicPattern(_patternID, defaultFill);\n\n const hasBackgroundColor = backgroundColor != null;\n\n const _className = classNames(className, { colored: hasBackgroundColor });\n\n const [ref, selected, onClick] = useUnitSelectionTarget(d);\n\n return h(\n \"g.unit\",\n {\n className: _className,\n style: {\n \"--column-unit-background-color\": backgroundColor,\n },\n },\n [\n h(UnitRect, {\n ...bounds,\n fill: backgroundColor,\n onClick,\n className: \"background\",\n }),\n h(UnitRect, {\n ref,\n ...bounds,\n fill: _fill,\n //mask,\n onClick,\n className: \"unit\",\n }),\n h.if(selected)(UnitRect, { ...bounds, className: \"selection-overlay\" }),\n //defs,\n children,\n ],\n );\n}\n\ninterface UnitRectProps {\n x: number;\n y: number;\n width: number;\n height: number;\n className: string;\n // Used to determine if the rect should have a zig-zag edge on the top or bottom\n overflowTop?: boolean;\n overflowBottom?: boolean;\n [key: string]: any;\n}\n\nconst UnitRect = forwardRef((props: UnitRectProps, ref) => {\n const {\n x,\n y,\n width,\n height,\n overflowTop = false,\n overflowBottom = false,\n ...rest\n } = props;\n\n if (!overflowTop && !overflowBottom) {\n return h(\"rect\", {\n x,\n y,\n width,\n height,\n ref,\n ...rest,\n });\n } else {\n const d = zigZagBoxPath(x, y, width, height, overflowTop, overflowBottom);\n return h(\"path\", {\n d,\n ref,\n ...rest,\n });\n }\n});\n\nfunction LabeledUnit(props: LabeledUnitProps) {\n const {\n division,\n label,\n onLabelUpdated,\n widthFraction,\n showLabel = true,\n backgroundColor,\n patternID,\n axisType: _, // not sure why this is brought in...\n ...baseBounds\n } = props;\n\n const { axisType } = useColumn();\n const bounds = {\n ...useUnitRect(division, { widthFraction, axisType }),\n ...baseBounds,\n };\n const { width, height } = bounds;\n return h(\n Unit,\n {\n className: \"labeled-unit\",\n division,\n backgroundColor,\n patternID,\n ...bounds,\n },\n [\n h.if(showLabel)(\n ForeignObject,\n { ...bounds, className: \"unit-label-container\" },\n h(SizeAwareLabel, {\n className: \"unit-overlay\",\n labelClassName: \"unit-label\",\n style: { width, height },\n label,\n onVisibilityChanged(viz) {\n onLabelUpdated(label, viz);\n },\n }),\n ),\n ],\n );\n}\n\nfunction UnitBoxes<T>(props: {\n unitComponent: React.FunctionComponent<{ division: T }>;\n unitComponentProps?: any;\n transformDivisions?(divisions: T[]): T[];\n transformDivision?: (\n division: any,\n index: number,\n divisions: any[],\n ) => T | null;\n}) {\n const { unitComponent = Unit, unitComponentProps = {} } = props;\n const { divisions } = useContext(ColumnContext);\n\n if (divisions.length == 0) {\n console.warn(\"No divisions found in column context\");\n return null;\n }\n\n const children = useMemo(() => {\n return divisions.map((division: any, i) => {\n // @ts-ignore\n return h(unitComponent, {\n division,\n key: division.unit_id,\n ...unitComponentProps,\n });\n });\n }, [divisions, unitComponent, unitComponentProps]);\n\n return h(\n PatternDefsProvider,\n { resolveID, scalePattern },\n h(\"g.divisions\", children),\n );\n}\n\nexport { LabeledUnit, Unit, UnitBoxes, UnitProps };\n"],"names":[],"version":3,"file":"column-views.81bddbee.js.map"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./column-views.562db43a.css";
|
|
2
2
|
import $01tAX$columnviewsfcf25ec6js from "./column-views.fcf25ec6.js";
|
|
3
|
-
import {useColumnUnitsMap as $d5074f164411387e$export$7513be0cfd10d9cc} from "./column-views.
|
|
4
|
-
import {useMacrostratData as $774a5efa27d1c77b$export$b9c9fc603d74a555, useMacrostratDefs as $774a5efa27d1c77b$export$89dd4e5ae4a82373} from "./column-views.
|
|
5
|
-
import {defaultNameFunction as $bc17276da4abb183$export$c9757aeb43a67df0} from "./column-views.
|
|
3
|
+
import {useColumnUnitsMap as $d5074f164411387e$export$7513be0cfd10d9cc} from "./column-views.4ed90896.js";
|
|
4
|
+
import {useMacrostratData as $774a5efa27d1c77b$export$b9c9fc603d74a555, useMacrostratDefs as $774a5efa27d1c77b$export$89dd4e5ae4a82373} from "./column-views.2eceafb5.js";
|
|
5
|
+
import {defaultNameFunction as $bc17276da4abb183$export$c9757aeb43a67df0} from "./column-views.e1bc3cfa.js";
|
|
6
6
|
import $01tAX$macrostrathyper from "@macrostrat/hyper";
|
|
7
7
|
import {JSONView as $01tAX$JSONView} from "@macrostrat/ui-components";
|
|
8
8
|
import {Button as $01tAX$Button, ButtonGroup as $01tAX$ButtonGroup} from "@blueprintjs/core";
|
|
@@ -428,7 +428,7 @@ function $448b24baeef3b229$var$UnitIDList({ units: units, onSelectUnit: onSelect
|
|
|
428
428
|
const extUnits = (0, $01tAX$useMemo)(()=>{
|
|
429
429
|
const u1 = units.filter((d)=>d != 0);
|
|
430
430
|
if (showNames) return u1.map((unitID)=>{
|
|
431
|
-
const unitData = unitsMap
|
|
431
|
+
const unitData = unitsMap?.get(unitID);
|
|
432
432
|
let name = undefined;
|
|
433
433
|
if (unitData != null) name = (0, $bc17276da4abb183$export$c9757aeb43a67df0)(unitData);
|
|
434
434
|
return {
|
|
@@ -550,4 +550,4 @@ function $448b24baeef3b229$var$formatSignificance(value, precision = null) {
|
|
|
550
550
|
|
|
551
551
|
|
|
552
552
|
export {$448b24baeef3b229$export$fbd245232df17557 as UnitDetailsPanel, $448b24baeef3b229$export$fc503c39cc5cff43 as LegendPanelHeader, $448b24baeef3b229$export$ec297f6f9a6ccad0 as UnitDetailsFeature, $448b24baeef3b229$export$3b11bc38611c5941 as Duration, $448b24baeef3b229$export$895d4931dd696e25 as ReferencesField, $448b24baeef3b229$export$989167234458594d as Identifier, $448b24baeef3b229$export$37ebfd237811b1eb as AgeLabel, $448b24baeef3b229$export$b6867fc5221f9f65 as ClickableText};
|
|
553
|
-
//# sourceMappingURL=column-views.
|
|
553
|
+
//# sourceMappingURL=column-views.8284c3a9.js.map
|