@macrostrat/column-views 2.2.0 → 2.2.2
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 +14 -0
- package/dist/esm/{column-views.986e7566.js → column-views.058c0083.js} +6 -8
- package/dist/esm/column-views.058c0083.js.map +1 -0
- package/dist/esm/{column-views.8d24b179.js → column-views.11ae78f7.js} +3 -3
- package/dist/esm/{column-views.8d24b179.js.map → column-views.11ae78f7.js.map} +1 -1
- package/dist/esm/{column-views.e84bd756.js → column-views.1e579112.js} +3 -3
- package/dist/esm/{column-views.e84bd756.js.map → column-views.1e579112.js.map} +1 -1
- package/dist/esm/{column-views.77561197.js → column-views.218e8f5d.js} +6 -6
- package/dist/esm/column-views.218e8f5d.js.map +1 -0
- package/dist/esm/{column-views.0f7f6ee6.js → column-views.30950997.js} +2 -2
- package/dist/esm/{column-views.0f7f6ee6.js.map → column-views.30950997.js.map} +1 -1
- package/dist/esm/{column-views.3e1b8c7d.js → column-views.35efe006.js} +2 -2
- package/dist/esm/{column-views.3e1b8c7d.js.map → column-views.35efe006.js.map} +1 -1
- package/dist/esm/{column-views.e3bf5384.js → column-views.43beafa3.js} +6 -6
- package/dist/esm/{column-views.e3bf5384.js.map → column-views.43beafa3.js.map} +1 -1
- package/dist/esm/{column-views.53186d53.js → column-views.44d3797a.js} +2 -2
- package/dist/esm/{column-views.53186d53.js.map → column-views.44d3797a.js.map} +1 -1
- package/dist/esm/{column-views.3f528c5c.js → column-views.52ad973a.js} +35 -24
- package/dist/esm/column-views.52ad973a.js.map +1 -0
- package/dist/esm/{column-views.9ddbe7df.js → column-views.5456a1ee.js} +2 -2
- package/dist/esm/{column-views.9ddbe7df.js.map → column-views.5456a1ee.js.map} +1 -1
- package/dist/esm/{column-views.5d969bc5.js → column-views.66ccfc44.js} +5 -6
- package/dist/esm/column-views.66ccfc44.js.map +1 -0
- package/dist/esm/{column-views.1b644998.js → column-views.6ce8cb61.js} +3 -3
- package/dist/esm/{column-views.1b644998.js.map → column-views.6ce8cb61.js.map} +1 -1
- package/dist/esm/{column-views.86a51ce7.js → column-views.6d63971b.js} +2 -2
- package/dist/esm/column-views.6d63971b.js.map +1 -0
- package/dist/esm/{column-views.2d602a57.js → column-views.7243e77d.js} +2 -2
- package/dist/esm/{column-views.2d602a57.js.map → column-views.7243e77d.js.map} +1 -1
- package/dist/esm/{column-views.c518ef14.js → column-views.729a6728.js} +6 -6
- package/dist/esm/column-views.729a6728.js.map +1 -0
- package/dist/esm/{column-views.5a49cd68.js → column-views.75e5aebe.js} +6 -7
- package/dist/esm/column-views.75e5aebe.js.map +1 -0
- package/dist/esm/{column-views.ae7c0a2b.js → column-views.76a220c4.js} +2 -2
- package/dist/esm/{column-views.ae7c0a2b.js.map → column-views.76a220c4.js.map} +1 -1
- package/dist/esm/{column-views.0a8a07f4.js → column-views.77e22590.js} +2 -2
- package/dist/esm/{column-views.0a8a07f4.js.map → column-views.77e22590.js.map} +1 -1
- package/dist/esm/{column-views.0859feb3.js → column-views.7b4a1f15.js} +15 -10
- package/dist/esm/column-views.7b4a1f15.js.map +1 -0
- package/dist/esm/{column-views.ba0381cc.js → column-views.7c95c3d7.js} +2 -2
- package/dist/esm/{column-views.ba0381cc.js.map → column-views.7c95c3d7.js.map} +1 -1
- package/dist/esm/{column-views.d69c4a9f.js → column-views.7d69838d.js} +2 -2
- package/dist/esm/{column-views.d69c4a9f.js.map → column-views.7d69838d.js.map} +1 -1
- package/dist/esm/{column-views.63b7e5aa.js → column-views.7faf00ed.js} +3 -3
- package/dist/esm/{column-views.63b7e5aa.js.map → column-views.7faf00ed.js.map} +1 -1
- package/dist/esm/{column-views.d261b02d.js → column-views.817752b6.js} +3 -3
- package/dist/esm/{column-views.d261b02d.js.map → column-views.817752b6.js.map} +1 -1
- package/dist/esm/{column-views.d15d8655.js → column-views.833c2b74.js} +2 -2
- package/dist/esm/{column-views.d15d8655.js.map → column-views.833c2b74.js.map} +1 -1
- package/dist/esm/{column-views.285cbb65.js → column-views.9dd25b5b.js} +3 -3
- package/dist/esm/{column-views.285cbb65.js.map → column-views.9dd25b5b.js.map} +1 -1
- package/dist/esm/column-views.abf6aedd.js +136 -0
- package/dist/esm/column-views.abf6aedd.js.map +1 -0
- package/dist/esm/{column-views.f46a0b36.js → column-views.ad080c0e.js} +2 -2
- package/dist/esm/{column-views.f46a0b36.js.map → column-views.ad080c0e.js.map} +1 -1
- package/dist/esm/{column-views.e4c26185.js → column-views.aeb61926.js} +2 -2
- package/dist/esm/{column-views.e4c26185.js.map → column-views.aeb61926.js.map} +1 -1
- package/dist/esm/{column-views.ed05e233.js → column-views.b0e6c0b3.js} +6 -4
- package/dist/esm/{column-views.ed05e233.js.map → column-views.b0e6c0b3.js.map} +1 -1
- package/dist/esm/{column-views.f2fd0e4a.js → column-views.c44febd0.js} +37 -34
- package/dist/esm/column-views.c44febd0.js.map +1 -0
- package/dist/esm/column-views.cc733361.js.map +1 -1
- package/dist/esm/{column-views.83395185.js → column-views.d2214a99.js} +3 -3
- package/dist/esm/{column-views.83395185.js.map → column-views.d2214a99.js.map} +1 -1
- package/dist/esm/{column-views.6c644353.js → column-views.d6d6df77.js} +3 -3
- package/dist/esm/{column-views.6c644353.js.map → column-views.d6d6df77.js.map} +1 -1
- package/dist/esm/{column-views.e33ac5c9.css → column-views.e93478c3.css} +7 -2
- package/dist/esm/column-views.e93478c3.css.map +1 -0
- package/dist/esm/{column-views.d9c6b527.js → column-views.ee525e88.js} +12 -11
- package/dist/esm/column-views.ee525e88.js.map +1 -0
- package/dist/esm/{column-views.73b8ff16.js → column-views.ef88c46c.js} +2 -2
- package/dist/esm/{column-views.73b8ff16.js.map → column-views.ef88c46c.js.map} +1 -1
- package/dist/esm/{column-views.d406665d.js → column-views.faa4e06d.js} +4 -4
- package/dist/esm/{column-views.d406665d.js.map → column-views.faa4e06d.js.map} +1 -1
- package/dist/esm/index.d.ts +53 -38
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/node/column-views.003348f6.js +2 -0
- package/dist/node/column-views.003348f6.js.map +1 -0
- package/dist/node/{column-views.a34732e7.js → column-views.05cfc627.js} +2 -2
- package/dist/node/{column-views.a34732e7.js.map → column-views.05cfc627.js.map} +1 -1
- package/dist/node/column-views.0beae29d.js +2 -0
- package/dist/node/column-views.0beae29d.js.map +1 -0
- package/dist/node/{column-views.a396d3ac.js → column-views.105c28fa.js} +2 -2
- package/dist/node/{column-views.a396d3ac.js.map → column-views.105c28fa.js.map} +1 -1
- package/dist/node/{column-views.ac1b58b7.js → column-views.1ac9e2ed.js} +2 -2
- package/dist/node/{column-views.ac1b58b7.js.map → column-views.1ac9e2ed.js.map} +1 -1
- package/dist/node/{column-views.105f6ad2.js → column-views.1c567bfd.js} +2 -2
- package/dist/node/{column-views.105f6ad2.js.map → column-views.1c567bfd.js.map} +1 -1
- package/dist/node/{column-views.dd972321.js → column-views.21a73236.js} +2 -2
- package/dist/node/{column-views.dd972321.js.map → column-views.21a73236.js.map} +1 -1
- package/dist/node/{column-views.e065152e.js → column-views.22c2d45b.js} +2 -2
- package/dist/node/{column-views.e065152e.js.map → column-views.22c2d45b.js.map} +1 -1
- package/dist/node/{column-views.9e155f20.js → column-views.2901b649.js} +2 -2
- package/dist/node/{column-views.9e155f20.js.map → column-views.2901b649.js.map} +1 -1
- package/dist/node/{column-views.827a9894.js → column-views.2d00d842.js} +2 -2
- package/dist/node/{column-views.827a9894.js.map → column-views.2d00d842.js.map} +1 -1
- package/dist/node/{column-views.7150ba18.js → column-views.38835c99.js} +2 -2
- package/dist/node/column-views.38835c99.js.map +1 -0
- package/dist/node/{column-views.9dda582d.js → column-views.3913cd0f.js} +2 -2
- package/dist/node/{column-views.9dda582d.js.map → column-views.3913cd0f.js.map} +1 -1
- package/dist/node/{column-views.1a7f8afd.js → column-views.39c21f22.js} +2 -2
- package/dist/node/{column-views.1a7f8afd.js.map → column-views.39c21f22.js.map} +1 -1
- package/dist/node/{column-views.75582658.js → column-views.420b60d2.js} +2 -2
- package/dist/node/{column-views.75582658.js.map → column-views.420b60d2.js.map} +1 -1
- package/dist/node/{column-views.81294fb7.js → column-views.4ce5f5e4.js} +2 -2
- package/dist/node/{column-views.81294fb7.js.map → column-views.4ce5f5e4.js.map} +1 -1
- package/dist/node/column-views.52cc4dd0.js +2 -0
- package/dist/node/column-views.52cc4dd0.js.map +1 -0
- package/dist/node/column-views.60b5663d.js +2 -0
- package/dist/node/column-views.60b5663d.js.map +1 -0
- package/dist/node/{column-views.01debc76.js → column-views.61dc64bc.js} +2 -2
- package/dist/node/{column-views.01debc76.js.map → column-views.61dc64bc.js.map} +1 -1
- package/dist/node/{column-views.492c2c72.js → column-views.67fed1f5.js} +2 -2
- package/dist/node/{column-views.492c2c72.js.map → column-views.67fed1f5.js.map} +1 -1
- package/dist/node/{column-views.07ff1fdf.js → column-views.7faaf6c8.js} +2 -2
- package/dist/node/{column-views.07ff1fdf.js.map → column-views.7faaf6c8.js.map} +1 -1
- package/dist/node/{column-views.87b1439e.js → column-views.a08b0c9f.js} +2 -2
- package/dist/node/column-views.a08b0c9f.js.map +1 -0
- package/dist/node/{column-views.2bd97c2e.js → column-views.a19be00f.js} +2 -2
- package/dist/node/{column-views.2bd97c2e.js.map → column-views.a19be00f.js.map} +1 -1
- package/dist/node/{column-views.cf2a78c1.js → column-views.a281d5bb.js} +2 -2
- package/dist/node/column-views.a281d5bb.js.map +1 -0
- package/dist/node/{column-views.c0be1157.js → column-views.a9576bac.js} +2 -2
- package/dist/node/{column-views.c0be1157.js.map → column-views.a9576bac.js.map} +1 -1
- package/dist/node/{column-views.13e69859.js → column-views.ae22e8b1.js} +2 -2
- package/dist/node/{column-views.13e69859.js.map → column-views.ae22e8b1.js.map} +1 -1
- package/dist/node/{column-views.cd77a1d8.js → column-views.ae54d3e1.js} +2 -2
- package/dist/node/{column-views.cd77a1d8.js.map → column-views.ae54d3e1.js.map} +1 -1
- package/dist/node/column-views.b12f8c81.js +2 -0
- package/dist/node/column-views.b12f8c81.js.map +1 -0
- package/dist/node/{column-views.b6cd4360.js → column-views.b6943236.js} +2 -2
- package/dist/node/column-views.b6943236.js.map +1 -0
- package/dist/node/{column-views.e08f8715.js → column-views.bde2dfa8.js} +2 -2
- package/dist/node/{column-views.e08f8715.js.map → column-views.bde2dfa8.js.map} +1 -1
- package/dist/node/{column-views.6fd5a922.js → column-views.c3c15cc2.js} +2 -2
- package/dist/node/{column-views.6fd5a922.js.map → column-views.c3c15cc2.js.map} +1 -1
- package/dist/node/column-views.d08e4328.js +2 -0
- package/dist/node/{column-views.c29e9eb8.js.map → column-views.d08e4328.js.map} +1 -1
- package/dist/node/{column-views.45296250.js → column-views.db47fe3c.js} +2 -2
- package/dist/node/{column-views.45296250.js.map → column-views.db47fe3c.js.map} +1 -1
- package/dist/node/{column-views.e803e4ae.css → column-views.ddc6184e.css} +2 -2
- package/dist/node/column-views.ddc6184e.css.map +1 -0
- package/dist/node/column-views.e1813308.js +2 -0
- package/dist/node/column-views.e1813308.js.map +1 -0
- package/dist/node/{column-views.040499c9.js → column-views.f2ee436e.js} +2 -2
- package/dist/node/{column-views.040499c9.js.map → column-views.f2ee436e.js.map} +1 -1
- package/dist/node/{column-views.576e3c5a.js → column-views.f6ac1161.js} +2 -2
- package/dist/node/{column-views.576e3c5a.js.map → column-views.f6ac1161.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.module.sass +7 -5
- package/src/column.ts +42 -20
- package/src/correlation-chart/main.ts +1 -1
- package/src/data-provider/index.ts +1 -0
- package/src/data-provider/store.ts +111 -13
- package/src/{units/selection.ts → data-provider/unit-selection.ts} +2 -1
- package/src/maps/column-correlation/state.ts +0 -1
- package/src/section.ts +9 -4
- package/src/unit-details/panel.ts +3 -2
- 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.0859feb3.js.map +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.e33ac5c9.css.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.b64cd0ea.js +0 -2
- package/dist/node/column-views.b64cd0ea.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
- package/dist/node/column-views.e803e4ae.css.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.a9576bac.js";import e from"@macrostrat/hyper";import{useAPIResult as r}from"@macrostrat/ui-components";var t=globalThis,n={},a={},o=t.parcelRequirea149;null==o&&((o=function(e){if(e in n)return n[e].exports;if(e in a){var r=a[e];delete a[e];var t={id:e,exports:{}};return n[e]=t,r.call(t.exports,t,t.exports),t.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,r){a[e]=r},t.parcelRequirea149=o),o.register,Object.defineProperty({},"SGPMeasurementsColumn",{get:()=>l,set:void 0,enumerable:!0,configurable:!0});var s=o("fIqIn");function l({columnID:t,color:n="magenta"}){let a=function({col_id:e}){return r("https://dev.macrostrat.org/api/pg/sgp_unit_matches",{col_id:`eq.${e}`},e=>e)}({col_id:t});return null==a?null:e(s.BaseMeasurementsColumn,{data:a,noteComponent:u})}function u(r){let{note:t}=r,n=t?.data?.sgp_samples;return null==n||0===n.length?null:e(s.TruncatedList,{className:"sgp-samples",data:n,itemRenderer:r=>e("span",r.data.name)})}export{l as SGPMeasurementsColumn};
|
|
2
|
+
//# sourceMappingURL=column-views.2901b649.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,Q,M,mB,A,Q,gB,C,K,2B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,O,c,C,C,E,wB,C,I,I,E,I,K,E,W,C,E,a,C,C,G,I,E,E,SCeO,SAAS,EAAsB,CAAA,SAAE,CAAQ,CAAA,MAAE,EAAQ,SAAA,CAAW,EACnE,IAAM,EAAO,AAZf,SAAoB,CAAA,OAAE,CAAM,CAAE,EAQ5B,OAPY,AAAA,EACV,qDACA,CACE,OAAQ,CAAC,GAAG,EAAE,EAAA,CAAQ,AACxB,EACA,AAAC,GAAM,EAGX,EAG0B,C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ACjB,EACF,CAEA,SAAS,EAAe,CAAK,EAC3B,GAAM,CAAA,KAAE,CAAI,CAAE,CAAG,EACX,EAAc,GAAM,MAAM,mBAEhC,AAAI,AAAe,MAAf,GAAuB,AAAuB,IAAvB,EAAY,MAAM,CAAe,KAErD,AAAA,EAAE,EAAA,aAAY,CAAG,CACtB,UAAW,cACX,KAAM,EACN,aAAc,AAAC,GAAM,AAAA,EAAE,OAAQ,EAAE,IAAI,CAAC,IAAI,CAC5C,EACF,Q,K,qB","sources":["<anon>","packages/column-views/src/facets/measurements/index.ts"],"sourcesContent":["import \"./column-views.a9576bac.js\";\nimport $d6zmK$macrostrathyper from \"@macrostrat/hyper\";\nimport {useAPIResult as $d6zmK$useAPIResult} from \"@macrostrat/ui-components\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $30f674067bcc490b$exports = {};\n\n$parcel$export($30f674067bcc490b$exports, \"SGPMeasurementsColumn\", () => $30f674067bcc490b$export$c49cf57576706bab);\n\n\n\nvar $fIqIn = parcelRequire(\"fIqIn\");\nfunction $30f674067bcc490b$var$useSGPData({ col_id: col_id }) {\n const res = (0, $d6zmK$useAPIResult)(\"https://dev.macrostrat.org/api/pg/sgp_unit_matches\", {\n col_id: `eq.${col_id}`\n }, (d)=>d);\n return res;\n}\nfunction $30f674067bcc490b$export$c49cf57576706bab({ columnID: columnID, color: color = \"magenta\" }) {\n const data = $30f674067bcc490b$var$useSGPData({\n col_id: columnID\n });\n if (data == null) return null;\n return (0, $d6zmK$macrostrathyper)((0, $fIqIn.BaseMeasurementsColumn), {\n data: data,\n noteComponent: $30f674067bcc490b$var$SGPSamplesNote\n });\n}\nfunction $30f674067bcc490b$var$SGPSamplesNote(props) {\n const { note: note } = props;\n const sgp_samples = note?.data?.sgp_samples;\n if (sgp_samples == null || sgp_samples.length === 0) return null;\n return (0, $d6zmK$macrostrathyper)((0, $fIqIn.TruncatedList), {\n className: \"sgp-samples\",\n data: sgp_samples,\n itemRenderer: (p)=>(0, $d6zmK$macrostrathyper)(\"span\", p.data.name)\n });\n}\n\n\nexport {$30f674067bcc490b$export$c49cf57576706bab as SGPMeasurementsColumn};\n//# sourceMappingURL=column-views.2901b649.js.map\n","import h from \"@macrostrat/hyper\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport { BaseMeasurementsColumn, TruncatedList } from \"../base-sample-column\";\n\nfunction useSGPData({ col_id }) {\n const res = useAPIResult(\n \"https://dev.macrostrat.org/api/pg/sgp_unit_matches\",\n {\n col_id: `eq.${col_id}`,\n },\n (d) => d,\n );\n return res;\n}\n\nexport function SGPMeasurementsColumn({ columnID, color = \"magenta\" }) {\n const data = useSGPData({ col_id: columnID });\n\n if (data == null) return null;\n\n return h(BaseMeasurementsColumn, {\n data,\n noteComponent: SGPSamplesNote,\n });\n}\n\nfunction SGPSamplesNote(props) {\n const { note } = props;\n const sgp_samples = note?.data?.sgp_samples;\n\n if (sgp_samples == null || sgp_samples.length === 0) return null;\n\n return h(TruncatedList, {\n className: \"sgp-samples\",\n data: sgp_samples,\n itemRenderer: (p) => h(\"span\", p.data.name),\n });\n}\n"],"names":["$d6zmK$macrostrathyper","useAPIResult","$d6zmK$useAPIResult","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","Object","defineProperty","get","$30f674067bcc490b$export$c49cf57576706bab","set","s","enumerable","configurable","$fIqIn","columnID","color","data","$30f674067bcc490b$var$useSGPData","col_id","d","BaseMeasurementsColumn","noteComponent","$30f674067bcc490b$var$SGPSamplesNote","props","note","sgp_samples","length","TruncatedList","className","itemRenderer","p","name","SGPMeasurementsColumn"],"version":3,"file":"column-views.2901b649.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.a08b0c9f.js";import"./column-views.d08e4328.js";import"./column-views.05cfc627.js";function e(e,a){return Object.keys(a).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),e}var a=globalThis,t={},r={},c=a.parcelRequirea149;null==c&&((c=function(e){if(e in t)return t[e].exports;if(e in r){var a=r[e];delete r[e];var c={id:e,exports:{}};return t[e]=c,a.call(c.exports,c,c.exports),c.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,a){r[e]=a},a.parcelRequirea149=c),c.register;var o={},i=c("iYfAq"),f=c("2KV3o"),n=c("2tdcx");e(o,i),e(o,f),e(o,n);export{$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel,$4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader,$4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature,$4a89f93cd5289383$export$3b11bc38611c5941 as Duration,$4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField,$4a89f93cd5289383$export$989167234458594d as Identifier,$4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel,$4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText,$1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover,$1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover,$a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};
|
|
2
|
+
//# sourceMappingURL=column-views.2d00d842.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,U,6C,gB,C,6C,iB,C,6C,kB,C,6C,Q,C,6C,e,C,6C,U,C,6C,Q,C,6C,a,C,6C,kB,C,6C,oB,C,6C,8B","sources":["<anon>","packages/column-views/src/unit-details/index.ts"],"sourcesContent":["import \"./column-views.
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,U,6C,gB,C,6C,iB,C,6C,kB,C,6C,Q,C,6C,e,C,6C,U,C,6C,Q,C,6C,a,C,6C,kB,C,6C,oB,C,6C,8B","sources":["<anon>","packages/column-views/src/unit-details/index.ts"],"sourcesContent":["import \"./column-views.a08b0c9f.js\";\nimport \"./column-views.d08e4328.js\";\nimport \"./column-views.05cfc627.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $af300f8688b62310$exports = {};\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\n\nvar $2KV3o = parcelRequire(\"2KV3o\");\n\nvar $2tdcx = parcelRequire(\"2tdcx\");\n$parcel$exportWildcard($af300f8688b62310$exports, $iYfAq);\n$parcel$exportWildcard($af300f8688b62310$exports, $2KV3o);\n$parcel$exportWildcard($af300f8688b62310$exports, $2tdcx);\n\n\nexport {$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel, $4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader, $4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature, $4a89f93cd5289383$export$3b11bc38611c5941 as Duration, $4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField, $4a89f93cd5289383$export$989167234458594d as Identifier, $4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel, $4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText, $1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover, $1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover, $a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};\n//# sourceMappingURL=column-views.2d00d842.js.map\n","export * from \"./panel\";\nexport * from \"./popover\";\nexport * from \"./modal-panel\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$af300f8688b62310$exports","$iYfAq","$2KV3o","$2tdcx","$4a89f93cd5289383$export$fbd245232df17557","UnitDetailsPanel","$4a89f93cd5289383$export$fc503c39cc5cff43","LegendPanelHeader","$4a89f93cd5289383$export$ec297f6f9a6ccad0","UnitDetailsFeature","$4a89f93cd5289383$export$3b11bc38611c5941","Duration","$4a89f93cd5289383$export$895d4931dd696e25","ReferencesField","$4a89f93cd5289383$export$989167234458594d","Identifier","$4a89f93cd5289383$export$37ebfd237811b1eb","AgeLabel","$4a89f93cd5289383$export$b6867fc5221f9f65","ClickableText","$1c6e0a5d10814cef$export$6716aecc2c9afbe2","UnitDetailsPopover","$1c6e0a5d10814cef$export$db1115efab13710d","UnitSelectionPopover","$a8b0b0b16d1f0073$export$cfdbe8496aa51962","UnitDetailsPanelWithNavigation"],"version":3,"file":"column-views.2d00d842.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.420b60d2.js";import"./column-views.b6943236.js";import"./column-views.6a0a35e7.js";import"./column-views.e1813308.js";import"./column-views.0beae29d.js";import{hyperStyled as e}from"@macrostrat/hyper";import{LithologyColumn as t,SVG as n,ColumnContext as o}from"@macrostrat/column-components";import{createContext as a,useState as i,useRef as r,useCallback as l,useContext as s,useEffect as u}from"react";function d(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}var c=globalThis,p={},m={},f=c.parcelRequirea149;null==f&&((f=function(e){if(e in p)return p[e].exports;if(e in m){var t=m[e];delete m[e];var n={id:e,exports:{}};return p[e]=n,t.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){m[e]=t},c.parcelRequirea149=f),f.register;var b={};d(b,"LabelTrackerProvider",()=>S),d(b,"TrackedLabeledUnit",()=>w),d(b,"CompositeUnitComponent",()=>L),d(b,"CompositeUnitsColumn",()=>P),d(b,"AnnotatedUnitsColumn",()=>T),d(b,"SectionLabelsColumn",()=>y),d(b,"ColumnNotesProvider",()=>F);var C=f("jiUaC"),v=f("1n4Pb"),x=f("45u6B"),h=f("wtIgl"),$=f("5SO8b");let U=e(x&&x.__esModule?x.default:x),g=a(null),H=a(null),_=e=>e.unit_id;function S(e){let{children:t,units:n,findUnitID:o=_}=e,[a,s]=i(null),u=r({}),d=l((e,t)=>{let a=o(e);u.current[a]=t,Object.keys(u.current).length==n.length&&s(n.filter(e=>{let t=o(e);return!1==u.current[t]}))},[u,n,o]);return U(g.Provider,{value:d},U(H.Provider,{value:a},t))}function w({division:e,nameForDivision:t=C.defaultNameFunction,...n}){let o=s(g);return U(v.LabeledUnit,{division:e,label:t(e),onLabelUpdated(t,n){o?.(e,n)},...n})}let L=w;function P(e){let{width:n,unitComponent:o=w,unitComponentProps:a,clipToFrame:i,...r}=e;return U(t,{width:n,clipToFrame:i},[U(v.UnitBoxes,{unitComponent:o,unitComponentProps:a,...r})])}function T(e){return u(()=>{console.warn("AnnotatedUnitsColumn is deprecated and currently renders a no-op for transition purposes")},[]),null}function y(e){let{width:t=300,noteMode:o="unlabeled",labelOffset:a=30,noteComponent:i,shouldRenderNote:r}=e,{totalHeight:l,axisType:u}=(0,h.useMacrostratColumnData)(),d=(0,h.useCompositeScale)(),c=s(H),p=(0,$.useUnitSelectionDispatch)();return U("div.section-labels-column",[U(F,{units:[],scale:d,totalHeight:l,axisType:u},U(n,{height:l,innerWidth:t-4,paddingH:1,paddingLeft:3},U(C.UnitNamesColumn,{divisions:"unlabeled"==o?c:void 0,paddingLeft:a,width:t,noteComponent:i,shouldRenderNote:r,scale:d,onClickNote(e){p(e.data,null,null)}})))])}function F(e){let{children:t,scale:n,totalHeight:a,pixelScale:i}=e,{axisType:r}=(0,h.useMacrostratColumnData)();return U(o.Provider,{value:{divisions:[],scale:n,scaleClamped:n,pixelHeight:a,pixelsPerMeter:i,axisType:r,zoom:1}},t)}export{S as LabelTrackerProvider,w as TrackedLabeledUnit,L as CompositeUnitComponent,P as CompositeUnitsColumn,T as AnnotatedUnitsColumn,y as SectionLabelsColumn,F as ColumnNotesProvider};
|
|
2
|
+
//# sourceMappingURL=column-views.38835c99.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,Q,e,C,K,mB,A,Q,mB,C,C,O,C,C,iB,C,K,+B,A,Q,iB,C,C,Y,C,C,U,C,C,e,C,C,c,C,C,a,C,K,O,C,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,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AAZ,EAA0B,EAAiB,KAAA,EAuBxD,YAAa,EACb,MAAA,EACA,cAAA,EACA,iBAAA,EACA,MAAO,EACP,YAAY,CAAI,EACd,EAAW,EAAK,IAAI,CAAE,KAAM,KAC9B,CACF,KAGL,CACH,CAQO,SAAS,EAAoB,CAAK,EAEvC,GAAM,CAAA,SAAE,CAAQ,CAAA,MAAE,CAAK,CAAA,YAAE,CAAW,CAAA,WAAE,CAAU,CAAE,CAAG,EAE/C,CAAA,SAAE,CAAQ,CAAE,CAAG,AAAA,CAAA,EAAA,EAAA,uBAAsB,AAAtB,IAErB,OAAO,EACL,AAAA,EAAc,QAAQ,CACtB,CACE,MAAO,CACL,UAAW,EAAE,CACb,MAAA,EACA,aAAc,EACd,YAAa,EACb,eAAgB,EAChB,SAAA,EACA,KAAM,CACR,CACF,EACA,EAEJ,Q,K,oB,C,K,kB,C,K,sB,C,K,oB,C,K,oB,C,K,mB,C,K,mB","sources":["<anon>","packages/column-views/src/units/composite.ts"],"sourcesContent":["import \"./column-views.420b60d2.js\";\nimport \"./column-views.b6943236.js\";\nimport \"./column-views.6a0a35e7.js\";\nimport \"./column-views.e1813308.js\";\nimport \"./column-views.0beae29d.js\";\nimport {hyperStyled as $hj0lx$hyperStyled} from \"@macrostrat/hyper\";\nimport {LithologyColumn as $hj0lx$LithologyColumn, SVG as $hj0lx$SVG, ColumnContext as $hj0lx$ColumnContext} from \"@macrostrat/column-components\";\nimport {createContext as $hj0lx$createContext, useState as $hj0lx$useState, useRef as $hj0lx$useRef, useCallback as $hj0lx$useCallback, useContext as $hj0lx$useContext, useEffect as $hj0lx$useEffect} from \"react\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $6b7af672ec278734$exports = {};\n\n$parcel$export($6b7af672ec278734$exports, \"LabelTrackerProvider\", () => $6b7af672ec278734$export$e4e89ab6c86ac513);\n$parcel$export($6b7af672ec278734$exports, \"TrackedLabeledUnit\", () => $6b7af672ec278734$export$f613830566442374);\n$parcel$export($6b7af672ec278734$exports, \"CompositeUnitComponent\", () => $6b7af672ec278734$export$1dfa200d57964eee);\n$parcel$export($6b7af672ec278734$exports, \"CompositeUnitsColumn\", () => $6b7af672ec278734$export$a6684360fef0406e);\n$parcel$export($6b7af672ec278734$exports, \"AnnotatedUnitsColumn\", () => $6b7af672ec278734$export$d8c3f2fdd653a082);\n$parcel$export($6b7af672ec278734$exports, \"SectionLabelsColumn\", () => $6b7af672ec278734$export$13984e34afdbb040);\n$parcel$export($6b7af672ec278734$exports, \"ColumnNotesProvider\", () => $6b7af672ec278734$export$6cc7a9df4edde18);\n\n\n\nvar $jiUaC = parcelRequire(\"jiUaC\");\n\n\nvar $1n4Pb = parcelRequire(\"1n4Pb\");\n\nvar $45u6B = parcelRequire(\"45u6B\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nvar $5SO8b = parcelRequire(\"5SO8b\");\nconst $6b7af672ec278734$var$h = (0, $hj0lx$hyperStyled)((0, (/*@__PURE__*/$parcel$interopDefault($45u6B))));\nconst $6b7af672ec278734$var$LabelTrackerContext = (0, $hj0lx$createContext)(null);\nconst $6b7af672ec278734$var$UnlabeledDivisionsContext = (0, $hj0lx$createContext)(null);\nconst $6b7af672ec278734$var$findMacrostratUnitID = (u)=>u.unit_id;\nfunction $6b7af672ec278734$export$e4e89ab6c86ac513(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 */ const { children: children, units: units, findUnitID: findUnitID = $6b7af672ec278734$var$findMacrostratUnitID } = props;\n const [unlabeledDivisions, setUnlabeledDivisions] = (0, $hj0lx$useState)(null);\n const labelTrackerRef = (0, $hj0lx$useRef)({});\n const trackLabelVisibility = (0, $hj0lx$useCallback)((div, visible)=>{\n const id = findUnitID(div);\n labelTrackerRef.current[id] = visible;\n if (Object.keys(labelTrackerRef.current).length == units.length) setUnlabeledDivisions(// @ts-ignore\n units.filter((d)=>{\n const id = findUnitID(d);\n return labelTrackerRef.current[id] == false;\n }));\n }, [\n labelTrackerRef,\n units,\n findUnitID\n ]);\n const value = trackLabelVisibility;\n return $6b7af672ec278734$var$h($6b7af672ec278734$var$LabelTrackerContext.Provider, {\n value: value\n }, $6b7af672ec278734$var$h($6b7af672ec278734$var$UnlabeledDivisionsContext.Provider, {\n value: unlabeledDivisions\n }, children));\n}\nfunction $6b7af672ec278734$export$f613830566442374({ division: division, nameForDivision: nameForDivision = (0, $jiUaC.defaultNameFunction), ...rest }) {\n const trackLabelVisibility = (0, $hj0lx$useContext)($6b7af672ec278734$var$LabelTrackerContext);\n return $6b7af672ec278734$var$h((0, $1n4Pb.LabeledUnit), {\n division: 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}\nconst $6b7af672ec278734$export$1dfa200d57964eee = $6b7af672ec278734$export$f613830566442374;\nfunction $6b7af672ec278734$export$a6684360fef0406e(props) {\n /*\n A column with units and names either\n overlapping or offset to the right\n */ const { width: width, unitComponent: unitComponent = $6b7af672ec278734$export$f613830566442374, unitComponentProps: unitComponentProps, clipToFrame: clipToFrame, ...rest } = props;\n return $6b7af672ec278734$var$h((0, $hj0lx$LithologyColumn), {\n width: width,\n clipToFrame: clipToFrame\n }, [\n $6b7af672ec278734$var$h((0, $1n4Pb.UnitBoxes), {\n unitComponent: unitComponent,\n unitComponentProps: unitComponentProps,\n ...rest\n })\n ]);\n}\nfunction $6b7af672ec278734$export$d8c3f2fdd653a082(props) {\n (0, $hj0lx$useEffect)(()=>{\n console.warn(\"AnnotatedUnitsColumn is deprecated and currently renders a no-op for transition purposes\");\n }, []);\n return null;\n}\nfunction $6b7af672ec278734$export$13984e34afdbb040(props) {\n // Section with \"squishy\" time scale\n const { width: width = 300, noteMode: noteMode = \"unlabeled\", labelOffset: labelOffset = 30, noteComponent: noteComponent, shouldRenderNote: shouldRenderNote } = props;\n const { totalHeight: totalHeight, axisType: axisType } = (0, $wtIgl.useMacrostratColumnData)();\n const _compositeScale = (0, $wtIgl.useCompositeScale)();\n const unlabeledUnits = (0, $hj0lx$useContext)($6b7af672ec278734$var$UnlabeledDivisionsContext);\n const unitsToLabel = noteMode == \"unlabeled\" ? unlabeledUnits : undefined;\n const selectUnit = (0, $5SO8b.useUnitSelectionDispatch)();\n return $6b7af672ec278734$var$h(\"div.section-labels-column\", [\n $6b7af672ec278734$var$h($6b7af672ec278734$export$6cc7a9df4edde18, {\n units: [],\n scale: _compositeScale,\n totalHeight: totalHeight,\n axisType: axisType\n }, $6b7af672ec278734$var$h((0, $hj0lx$SVG), {\n height: totalHeight,\n innerWidth: width - 4,\n paddingH: 1,\n paddingLeft: 3\n }, $6b7af672ec278734$var$h((0, $jiUaC.UnitNamesColumn), {\n divisions: unitsToLabel,\n paddingLeft: labelOffset,\n width: width,\n noteComponent: noteComponent,\n shouldRenderNote: shouldRenderNote,\n scale: _compositeScale,\n onClickNote (note) {\n selectUnit(note.data, null, null);\n }\n })))\n ]);\n}\nfunction $6b7af672ec278734$export$6cc7a9df4edde18(props) {\n // A fake column axis provider that allows scales to cross\n const { children: children, scale: scale, totalHeight: totalHeight, pixelScale: pixelScale } = props;\n const { axisType: axisType } = (0, $wtIgl.useMacrostratColumnData)();\n return $6b7af672ec278734$var$h((0, $hj0lx$ColumnContext).Provider, {\n value: {\n divisions: [],\n scale: scale,\n scaleClamped: scale,\n pixelHeight: totalHeight,\n pixelsPerMeter: pixelScale,\n axisType: axisType,\n zoom: 1\n }\n }, children);\n}\n\n\nexport {$6b7af672ec278734$export$e4e89ab6c86ac513 as LabelTrackerProvider, $6b7af672ec278734$export$f613830566442374 as TrackedLabeledUnit, $6b7af672ec278734$export$1dfa200d57964eee as CompositeUnitComponent, $6b7af672ec278734$export$a6684360fef0406e as CompositeUnitsColumn, $6b7af672ec278734$export$d8c3f2fdd653a082 as AnnotatedUnitsColumn, $6b7af672ec278734$export$13984e34afdbb040 as SectionLabelsColumn, $6b7af672ec278734$export$6cc7a9df4edde18 as ColumnNotesProvider};\n//# sourceMappingURL=column-views.38835c99.js.map\n","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":["hyperStyled","$hj0lx$hyperStyled","LithologyColumn","$hj0lx$LithologyColumn","SVG","$hj0lx$SVG","ColumnContext","$hj0lx$ColumnContext","createContext","$hj0lx$createContext","useState","$hj0lx$useState","useRef","$hj0lx$useRef","useCallback","$hj0lx$useCallback","useContext","$hj0lx$useContext","useEffect","$hj0lx$useEffect","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$6b7af672ec278734$exports","$6b7af672ec278734$export$e4e89ab6c86ac513","$6b7af672ec278734$export$f613830566442374","$6b7af672ec278734$export$1dfa200d57964eee","$6b7af672ec278734$export$a6684360fef0406e","$6b7af672ec278734$export$d8c3f2fdd653a082","$6b7af672ec278734$export$13984e34afdbb040","$6b7af672ec278734$export$6cc7a9df4edde18","$jiUaC","$1n4Pb","$45u6B","$wtIgl","$5SO8b","$6b7af672ec278734$var$h","a","__esModule","default","$6b7af672ec278734$var$LabelTrackerContext","$6b7af672ec278734$var$UnlabeledDivisionsContext","$6b7af672ec278734$var$findMacrostratUnitID","u","unit_id","props","children","units","findUnitID","unlabeledDivisions","setUnlabeledDivisions","labelTrackerRef","trackLabelVisibility","div","visible","current","keys","length","filter","d","Provider","value","division","nameForDivision","defaultNameFunction","rest","LabeledUnit","label","onLabelUpdated","width","unitComponent","unitComponentProps","clipToFrame","UnitBoxes","console","warn","noteMode","labelOffset","noteComponent","shouldRenderNote","totalHeight","axisType","useMacrostratColumnData","_compositeScale","useCompositeScale","unlabeledUnits","selectUnit","useUnitSelectionDispatch","scale","height","innerWidth","paddingH","paddingLeft","UnitNamesColumn","divisions","undefined","onClickNote","note","data","pixelScale","scaleClamped","pixelHeight","pixelsPerMeter","zoom","LabelTrackerProvider","TrackedLabeledUnit","CompositeUnitComponent","CompositeUnitsColumn","AnnotatedUnitsColumn","SectionLabelsColumn","ColumnNotesProvider"],"version":3,"file":"column-views.38835c99.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.a281d5bb.js";import"./column-views.ebb44b7d.js";function e(e,r){return Object.keys(r).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),e}var r=globalThis,t={},o={},n=r.parcelRequirea149;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in o){var r=o[e];delete o[e];var n={id:e,exports:{}};return t[e]=n,r.call(n.exports,n,n.exports),n.exports}var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,r){o[e]=r},r.parcelRequirea149=n),n.register;var a={},c=n("ccQ40"),i=n("dd0Et");e(a,c),e(a,i);export{$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart,$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString,$7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};
|
|
2
|
+
//# sourceMappingURL=column-views.3913cd0f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,G,E,E,U,6C,gB,C,6C,mB,C,6C,a","sources":["<anon>","packages/column-views/src/correlation-chart/index.ts"],"sourcesContent":["import \"./column-views.
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,G,E,E,U,6C,gB,C,6C,mB,C,6C,a","sources":["<anon>","packages/column-views/src/correlation-chart/index.ts"],"sourcesContent":["import \"./column-views.a281d5bb.js\";\nimport \"./column-views.ebb44b7d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $53af365ed50b7b69$exports = {};\n\nvar $ccQ40 = parcelRequire(\"ccQ40\");\n\nvar $dd0Et = parcelRequire(\"dd0Et\");\n$parcel$exportWildcard($53af365ed50b7b69$exports, $ccQ40);\n$parcel$exportWildcard($53af365ed50b7b69$exports, $dd0Et);\n\n\nexport {$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart, $7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString, $7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};\n//# sourceMappingURL=column-views.3913cd0f.js.map\n","export * from \"./main\";\nexport * from \"./hash-string\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$53af365ed50b7b69$exports","$ccQ40","$dd0Et","$25f1fcddbe40b91f$export$9ebf875c09445bec","CorrelationChart","$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f","parseLineFromString","$7e37f2a9ef0a1013$export$8c53992169ff5301","stringifyLine"],"version":3,"file":"column-views.3913cd0f.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.38835c99.js";import"./column-views.e1813308.js";import e from"@macrostrat/hyper";import{SVG as t,StaticNotesColumn as o}from"@macrostrat/column-components";var r=globalThis,n={},a={},i=r.parcelRequirea149;null==i&&((i=function(e){if(e in n)return n[e].exports;if(e in a){var t=a[e];delete a[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var r=Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,t){a[e]=t},r.parcelRequirea149=i),i.register,Object.defineProperty({},"ColumnNotes",{get:()=>s,set:void 0,enumerable:!0,configurable:!0});var c=i("4Abge"),l=i("wtIgl");function s({notes:r,width:n=200,noteComponent:a,paddingLeft:i=60,deltaConnectorAttachment:s,children:d}){let{totalHeight:m}=(0,l.useMacrostratColumnData)(),p=(0,l.useCompositeScale)();return e(c.ColumnNotesProvider,{scale:p,totalHeight:m,pixelScale:-1},[e(t,{width:n,height:m,paddingH:4},[e(o,{width:n,notes:r,noteComponent:a,paddingLeft:i,deltaConnectorAttachment:s})]),d])}export{s as ColumnNotes};
|
|
2
|
+
//# sourceMappingURL=column-views.39c21f22.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,O,6C,A,Q,M,mB,A,Q,O,C,C,qB,C,K,+B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,O,c,C,C,E,c,C,I,I,E,I,K,E,W,C,E,a,C,C,G,I,E,E,S,E,E,SCiBO,SAAS,EAAY,CAAA,MAC1B,CAAK,CAAA,MACL,EAAQ,GAAA,CAAA,cACR,CAAa,CAAA,YACb,EAAc,EAAA,CAAA,yBACd,CAAwB,CAAA,SACxB,CAAQ,CACS,EACjB,GAAM,CAAA,YAAE,CAAW,CAAE,CAAG,AAAA,CAAA,EAAA,EAAA,uBAAsB,AAAtB,IAClB,EAAQ,AAAA,CAAA,EAAA,EAAA,iBAAgB,AAAhB,IAEd,OAAO,AAAA,EACL,EAAA,mBAAkB,CAClB,CACE,MAAA,EACA,YAAA,EACA,WAAY,EACd,EACA,CACE,AAAA,EAAE,EAAK,CAAE,MAAA,EAAO,OAAQ,EAAa,SAAU,CAAE,EAAG,CAClD,AAAA,EAAE,EAAmB,CACnB,MAAA,EACA,MAAA,EACA,cAAA,EACA,YAAA,EACA,yBAAA,CACF,GACD,EACD,EACD,CAEL,Q,K,W","sources":["<anon>","packages/column-views/src/notes.ts"],"sourcesContent":["import \"./column-views.
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,Q,M,mB,A,Q,O,C,C,qB,C,K,+B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,O,c,C,C,E,c,C,I,I,E,I,K,E,W,C,E,a,C,C,G,I,E,E,S,E,E,SCiBO,SAAS,EAAY,CAAA,MAC1B,CAAK,CAAA,MACL,EAAQ,GAAA,CAAA,cACR,CAAa,CAAA,YACb,EAAc,EAAA,CAAA,yBACd,CAAwB,CAAA,SACxB,CAAQ,CACS,EACjB,GAAM,CAAA,YAAE,CAAW,CAAE,CAAG,AAAA,CAAA,EAAA,EAAA,uBAAsB,AAAtB,IAClB,EAAQ,AAAA,CAAA,EAAA,EAAA,iBAAgB,AAAhB,IAEd,OAAO,AAAA,EACL,EAAA,mBAAkB,CAClB,CACE,MAAA,EACA,YAAA,EACA,WAAY,EACd,EACA,CACE,AAAA,EAAE,EAAK,CAAE,MAAA,EAAO,OAAQ,EAAa,SAAU,CAAE,EAAG,CAClD,AAAA,EAAE,EAAmB,CACnB,MAAA,EACA,MAAA,EACA,cAAA,EACA,YAAA,EACA,yBAAA,CACF,GACD,EACD,EACD,CAEL,Q,K,W","sources":["<anon>","packages/column-views/src/notes.ts"],"sourcesContent":["import \"./column-views.38835c99.js\";\nimport \"./column-views.e1813308.js\";\nimport $joNTi$macrostrathyper from \"@macrostrat/hyper\";\nimport {SVG as $joNTi$SVG, StaticNotesColumn as $joNTi$StaticNotesColumn} from \"@macrostrat/column-components\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $d63334d9b5597481$exports = {};\n\n$parcel$export($d63334d9b5597481$exports, \"ColumnNotes\", () => $d63334d9b5597481$export$fc5babae10f3f77d);\n\n\nvar $4Abge = parcelRequire(\"4Abge\");\n\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nfunction $d63334d9b5597481$export$fc5babae10f3f77d({ notes: notes, width: width = 200, noteComponent: noteComponent, paddingLeft: paddingLeft = 60, deltaConnectorAttachment: deltaConnectorAttachment, children: children }) {\n const { totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const scale = (0, $wtIgl.useCompositeScale)();\n return (0, $joNTi$macrostrathyper)((0, $4Abge.ColumnNotesProvider), {\n scale: scale,\n totalHeight: totalHeight,\n pixelScale: -1\n }, [\n (0, $joNTi$macrostrathyper)((0, $joNTi$SVG), {\n width: width,\n height: totalHeight,\n paddingH: 4\n }, [\n (0, $joNTi$macrostrathyper)((0, $joNTi$StaticNotesColumn), {\n width: width,\n notes: notes,\n noteComponent: noteComponent,\n paddingLeft: paddingLeft,\n deltaConnectorAttachment: deltaConnectorAttachment\n })\n ]),\n children\n ]);\n}\n\n\nexport {$d63334d9b5597481$export$fc5babae10f3f77d as ColumnNotes};\n//# sourceMappingURL=column-views.39c21f22.js.map\n","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":["$joNTi$macrostrathyper","SVG","$joNTi$SVG","StaticNotesColumn","$joNTi$StaticNotesColumn","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","Object","defineProperty","get","$d63334d9b5597481$export$fc5babae10f3f77d","set","s","enumerable","configurable","$4Abge","$wtIgl","notes","width","noteComponent","paddingLeft","deltaConnectorAttachment","children","totalHeight","useMacrostratColumnData","scale","useCompositeScale","ColumnNotesProvider","pixelScale","height","paddingH","ColumnNotes"],"version":3,"file":"column-views.39c21f22.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.5f3b0b04.js";import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.5f3b0b04.js";import"./column-views.e1813308.js";import e from"@macrostrat/hyper";import t,{useCallback as o,useMemo as n}from"react";import{NotesColumn as r}from"@macrostrat/column-components";var a=globalThis,i={},s={},l=a.parcelRequirea149;null==l&&((l=function(e){if(e in i)return i[e].exports;if(e in s){var t=s[e];delete s[e];var o={id:e,exports:{}};return i[e]=o,t.call(o.exports,o,o.exports),o.exports}var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,t){s[e]=t},a.parcelRequirea149=l),l.register;var c=l("iWhRv"),m=l("wtIgl");function p(e,t){let{axisType:o}=t,[n,r]=(0,c.getUnitHeightRange)(e,o);return{height:n,top_height:r,data:e,id:e.unit_id}}let u=e=>e.unit_name.replace("Mbr","Member").replace("Fm","Formation").replace("Gp","Group"),f=t.memo(function(t){let{axisType:n,units:a}=(0,m.useMacrostratColumnData)(),i=(0,m.useCompositeScale)(),{left:s=0,noteComponent:l,shouldRenderNote:c=(e,t)=>!0,minimumHeight:u=0,divisions:f=a,...d}=t,h=o(e=>0==u||Math.abs(i(e.top_height)-i(e.height))>u,[i,u]);return null==f?null:e(r,{transform:`translate(${s})`,editable:!1,noteComponent:l,notes:f.filter(c).map(e=>p(e,{axisType:n})).filter(h),forceOptions:{nodeSpacing:1},...d})});function d(t){let{nameForDivision:o=u,noteComponent:r,...a}=t,i=n(()=>t=>{let{note:n}=t;return e("p.col-note-label",o(n.data))},[o]);return e(f,{noteComponent:r??i,...a})}export{p as noteForDivision,u as defaultNameFunction,f as UnitDataColumn,d as UnitNamesColumn};
|
|
2
|
+
//# sourceMappingURL=column-views.420b60d2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,O,6C,A,Q,M,mB,A,Q,G,e,C,C,W,C,K,O,A,Q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,AAAA,EAAE,EAAa,CACpB,UAAW,CAAC,UAAU,EAAE,EAAK,CAAC,CAAC,CAC/B,SAAU,CAAA,EACV,cAAA,EACA,MATwB,EACvB,MAAM,CAAC,GACP,GAAG,CAAC,AAAC,GAAa,EAAgB,EAAG,CAAE,SAAA,CAAS,IAChD,MAAM,CAAC,GAOR,aAAc,CACZ,YAAa,CACf,EACA,GAAG,CAAI,AACT,EACF,GAWO,SAAS,EAAgB,CAAqB,EACnD,GAAM,CAAA,gBACJ,EAAkB,CAAA,CAAA,cAClB,CAAa,CACb,GAAG,EACJ,CAAG,EAEE,EAAuB,AAAA,EAC3B,IAAM,AAAC,IACL,GAAM,CAAA,KAAE,CAAI,CAAE,CAAG,EACjB,OAAO,AAAA,EAAE,mBAAoB,EAAgB,EAAK,IAAI,EACxD,EACA,CAAC,EAAgB,EAGnB,OAAO,AAAA,EAAE,EAAgB,CACvB,cAAe,GAAiB,EAChC,GAAG,CAAI,AACT,EACF,Q,K,e,C,K,mB,C,K,c,C,K,e","sources":["<anon>","packages/column-views/src/units/names.ts"],"sourcesContent":["import \"./column-views.5f3b0b04.js\";\nimport \"./column-views.cd2a5c85.js\";\nimport $eWQbS$macrostrathyper from \"@macrostrat/hyper\";\nimport $eWQbS$react, {useCallback as $eWQbS$useCallback, useMemo as $eWQbS$useMemo} from \"react\";\nimport {NotesColumn as $eWQbS$NotesColumn} from \"@macrostrat/column-components\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\nvar $iWhRv = parcelRequire(\"iWhRv\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nfunction $e80be54614c93c14$export$2f2e65a797f8fc1e(div, opts) {\n const { axisType: axisType } = opts;\n const [height, top_height] = (0, $iWhRv.getUnitHeightRange)(div, axisType);\n return {\n height: height,\n top_height: top_height,\n data: div,\n id: div.unit_id\n };\n}\nconst $e80be54614c93c14$export$c9757aeb43a67df0 = (div)=>{\n return div.unit_name.replace(\"Mbr\", \"Member\").replace(\"Fm\", \"Formation\").replace(\"Gp\", \"Group\");\n};\nfunction $e80be54614c93c14$var$UnitDataColumn_(props) {\n const { axisType: axisType, units: units } = (0, $wtIgl.useMacrostratColumnData)();\n const scale = (0, $wtIgl.useCompositeScale)();\n const { left: left = 0, noteComponent: noteComponent, shouldRenderNote: shouldRenderNote = (note, i)=>true, minimumHeight: minimumHeight = 0, divisions: divisions = units, ...rest } = props;\n const minimumHeightFilter = (0, $eWQbS$useCallback)((d)=>{\n if (minimumHeight == 0) return true;\n const dy = Math.abs(scale(d.top_height) - scale(d.height));\n return dy > minimumHeight;\n }, [\n scale,\n minimumHeight\n ]);\n if (divisions == null) return null;\n const notes = divisions.filter(shouldRenderNote).map((d)=>$e80be54614c93c14$export$2f2e65a797f8fc1e(d, {\n axisType: axisType\n })).filter(minimumHeightFilter);\n return (0, $eWQbS$macrostrathyper)((0, $eWQbS$NotesColumn), {\n transform: `translate(${left})`,\n editable: false,\n noteComponent: noteComponent,\n notes: notes,\n forceOptions: {\n nodeSpacing: 1\n },\n ...rest\n });\n}\nconst $e80be54614c93c14$export$6316e673796ccb55 = (0, $eWQbS$react).memo($e80be54614c93c14$var$UnitDataColumn_);\nfunction $e80be54614c93c14$export$594d19cdd88f8c16(props) {\n const { nameForDivision: nameForDivision = $e80be54614c93c14$export$c9757aeb43a67df0, noteComponent: noteComponent, ...rest } = props;\n const defaultNoteComponent = (0, $eWQbS$useMemo)(()=>(props)=>{\n const { note: note } = props;\n return (0, $eWQbS$macrostrathyper)(\"p.col-note-label\", nameForDivision(note.data));\n }, [\n nameForDivision\n ]);\n return (0, $eWQbS$macrostrathyper)($e80be54614c93c14$export$6316e673796ccb55, {\n noteComponent: noteComponent ?? defaultNoteComponent,\n ...rest\n });\n}\n\n\nexport {$e80be54614c93c14$export$2f2e65a797f8fc1e as noteForDivision, $e80be54614c93c14$export$c9757aeb43a67df0 as defaultNameFunction, $e80be54614c93c14$export$6316e673796ccb55 as UnitDataColumn, $e80be54614c93c14$export$594d19cdd88f8c16 as UnitNamesColumn};\n//# sourceMappingURL=column-views.75582658.js.map\n","import h from \"@macrostrat/hyper\";\nimport { useCallback, useMemo } from \"react\";\nimport {\n ColumnAxisType,\n NotesColumn,\n NotesColumnProps,\n} from \"@macrostrat/column-components\";\nimport type { ColumnDivision } from \"@macrostrat/column-components\";\nimport { IUnit } from \"./types\";\nimport React from \"react\";\nimport { getUnitHeightRange } from \"../prepare-units/utils\";\nimport { CompositeColumnScale } from \"./composite\";\nimport { useCompositeScale, useMacrostratColumnData } from \"../data-provider\";\n\ninterface UnitDataProps extends NotesColumnProps {\n left?: number;\n transform?: string;\n noteComponent?: React.ComponentType<any>;\n shouldRenderNote?(div: ColumnDivision | IUnit, index: number): boolean;\n divisions?: IUnit[];\n minimumHeight?: number;\n scale?: CompositeColumnScale;\n}\n\ntype UnitNote = {\n height: number;\n top_height: number;\n data: IUnit;\n id: number;\n};\n\nfunction noteForDivision(\n div: IUnit,\n opts: { axisType: ColumnAxisType },\n): UnitNote {\n const { axisType } = opts;\n\n const [height, top_height] = getUnitHeightRange(div, axisType);\n\n return {\n height,\n top_height,\n data: div,\n id: div.unit_id,\n };\n}\n\nconst defaultNameFunction = (div) => {\n return div.unit_name\n .replace(\"Mbr\", \"Member\")\n .replace(\"Fm\", \"Formation\")\n .replace(\"Gp\", \"Group\");\n};\n\nfunction UnitDataColumn_(props: UnitDataProps) {\n const { axisType, units } = useMacrostratColumnData();\n const scale = useCompositeScale();\n const {\n left = 0,\n noteComponent,\n shouldRenderNote = (note: ColumnDivision | IUnit, i: number) => true,\n minimumHeight = 0,\n divisions = units,\n ...rest\n } = props;\n\n const minimumHeightFilter = useCallback(\n (d) => {\n if (minimumHeight == 0) return true;\n const dy = Math.abs(scale(d.top_height) - scale(d.height));\n return dy > minimumHeight;\n },\n [scale, minimumHeight],\n );\n\n if (divisions == null) return null;\n const notes: UnitNote[] = divisions\n .filter(shouldRenderNote)\n .map((d: IUnit) => noteForDivision(d, { axisType }))\n .filter(minimumHeightFilter);\n\n return h(NotesColumn, {\n transform: `translate(${left})`,\n editable: false,\n noteComponent,\n notes,\n forceOptions: {\n nodeSpacing: 1,\n },\n ...rest,\n });\n}\n\nconst UnitDataColumn = React.memo(UnitDataColumn_);\n\ninterface UnitNamesProps extends UnitDataProps {\n nameForDivision?(obj: IUnit): string;\n paddingLeft?: number;\n width: number;\n onClickNote?: (note: any) => void;\n}\n\nexport function UnitNamesColumn(props: UnitNamesProps) {\n const {\n nameForDivision = defaultNameFunction,\n noteComponent,\n ...rest\n } = props;\n\n const defaultNoteComponent = useMemo(\n () => (props) => {\n const { note } = props;\n return h(\"p.col-note-label\", nameForDivision(note.data));\n },\n [nameForDivision],\n );\n\n return h(UnitDataColumn, {\n noteComponent: noteComponent ?? defaultNoteComponent,\n ...rest,\n });\n}\n\nexport type { UnitNamesProps };\nexport { defaultNameFunction, noteForDivision, UnitDataColumn };\n"],"names":["$eWQbS$macrostrathyper","$eWQbS$react","useCallback","$eWQbS$useCallback","useMemo","$eWQbS$useMemo","NotesColumn","$eWQbS$NotesColumn","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$iWhRv","$wtIgl","$e80be54614c93c14$export$2f2e65a797f8fc1e","div","opts","axisType","height","top_height","getUnitHeightRange","data","unit_id","$e80be54614c93c14$export$c9757aeb43a67df0","unit_name","replace","$e80be54614c93c14$export$6316e673796ccb55","memo","props","units","useMacrostratColumnData","scale","useCompositeScale","left","noteComponent","shouldRenderNote","note","i","minimumHeight","divisions","rest","minimumHeightFilter","d","dy","Math","abs","transform","editable","notes","filter","map","forceOptions","nodeSpacing","$e80be54614c93c14$export$594d19cdd88f8c16","nameForDivision","defaultNoteComponent","noteForDivision","defaultNameFunction","UnitDataColumn","UnitNamesColumn"],"version":3,"file":"column-views.75582658.js.map","sourceRoot":"../../../../"}
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,Q,M,mB,A,Q,G,e,C,C,W,C,K,O,A,Q,e,C,K,+B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,E,SC+BA,SAAS,EACP,CAAU,CACV,CAAkC,EAElC,GAAM,CAAA,SAAE,CAAQ,CAAE,CAAG,EAEf,CAAC,EAAQ,EAAW,CAAG,AAAA,CAAA,EAAA,EAAA,kBAAiB,AAAjB,EAAmB,EAAK,GAErD,MAAO,CACL,OAAA,EACA,WAAA,EACA,KAAM,EACN,GAAI,EAAI,OAAO,AACjB,CACF,CAEA,IAAM,EAAsB,AAAC,GACpB,EAAI,SAAS,CACjB,OAAO,CAAC,MAAO,UACf,OAAO,CAAC,KAAM,aACd,OAAO,CAAC,KAAM,SA0Cb,EAAiB,AAAA,EAAM,IAAI,CAvCjC,SAAyB,CAAoB,EAC3C,GAAM,CAAA,SAAE,CAAQ,CAAA,MAAE,CAAK,CAAE,CAAG,AAAA,CAAA,EAAA,EAAA,uBAAsB,AAAtB,IACtB,EAAQ,AAAA,CAAA,EAAA,EAAA,iBAAgB,AAAhB,IACR,CAAA,KACJ,EAAO,CAAA,CAAA,cACP,CAAa,CAAA,iBACb,EAAmB,CAAC,EAA8B,IAAc,CAAA,CAAA,CAAA,cAChE,EAAgB,CAAA,CAAA,UAChB,EAAY,CAAA,CACZ,GAAG,EACJ,CAAG,EAEE,EAAsB,AAAA,EAC1B,AAAC,GACC,AAAqB,GAAjB,GAEG,AADI,KAAK,GAAG,CAAC,EAAM,EAAE,UAAU,EAAI,EAAM,EAAE,MAAM,GAC5C,EAEd,CAAC,EAAO,EAAc,SAGxB,AAAI,AAAa,MAAb,EAA0B,KAMvB,AAAA,EAAE,EAAa,CACpB,UAAW,CAAC,UAAU,EAAE,EAAK,CAAC,CAAC,CAC/B,SAAU,CAAA,EACV,cAAA,EACA,MATwB,EACvB,MAAM,CAAC,GACP,GAAG,CAAC,AAAC,GAAa,EAAgB,EAAG,CAAE,SAAA,CAAS,IAChD,MAAM,CAAC,GAOR,aAAc,CACZ,YAAa,CACf,EACA,GAAG,CAAI,AACT,EACF,GAWO,SAAS,EAAgB,CAAqB,EACnD,GAAM,CAAA,gBACJ,EAAkB,CAAA,CAAA,cAClB,CAAa,CACb,GAAG,EACJ,CAAG,EAEE,EAAuB,AAAA,EAC3B,IAAM,AAAC,IACL,GAAM,CAAA,KAAE,CAAI,CAAE,CAAG,EACjB,OAAO,AAAA,EAAE,mBAAoB,EAAgB,EAAK,IAAI,EACxD,EACA,CAAC,EAAgB,EAGnB,OAAO,AAAA,EAAE,EAAgB,CACvB,cAAe,GAAiB,EAChC,GAAG,CAAI,AACT,EACF,Q,K,e,C,K,mB,C,K,c,C,K,e","sources":["<anon>","packages/column-views/src/units/names.ts"],"sourcesContent":["import \"./column-views.5f3b0b04.js\";\nimport \"./column-views.e1813308.js\";\nimport $eWQbS$macrostrathyper from \"@macrostrat/hyper\";\nimport $eWQbS$react, {useCallback as $eWQbS$useCallback, useMemo as $eWQbS$useMemo} from \"react\";\nimport {NotesColumn as $eWQbS$NotesColumn} from \"@macrostrat/column-components\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\nvar $iWhRv = parcelRequire(\"iWhRv\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nfunction $e80be54614c93c14$export$2f2e65a797f8fc1e(div, opts) {\n const { axisType: axisType } = opts;\n const [height, top_height] = (0, $iWhRv.getUnitHeightRange)(div, axisType);\n return {\n height: height,\n top_height: top_height,\n data: div,\n id: div.unit_id\n };\n}\nconst $e80be54614c93c14$export$c9757aeb43a67df0 = (div)=>{\n return div.unit_name.replace(\"Mbr\", \"Member\").replace(\"Fm\", \"Formation\").replace(\"Gp\", \"Group\");\n};\nfunction $e80be54614c93c14$var$UnitDataColumn_(props) {\n const { axisType: axisType, units: units } = (0, $wtIgl.useMacrostratColumnData)();\n const scale = (0, $wtIgl.useCompositeScale)();\n const { left: left = 0, noteComponent: noteComponent, shouldRenderNote: shouldRenderNote = (note, i)=>true, minimumHeight: minimumHeight = 0, divisions: divisions = units, ...rest } = props;\n const minimumHeightFilter = (0, $eWQbS$useCallback)((d)=>{\n if (minimumHeight == 0) return true;\n const dy = Math.abs(scale(d.top_height) - scale(d.height));\n return dy > minimumHeight;\n }, [\n scale,\n minimumHeight\n ]);\n if (divisions == null) return null;\n const notes = divisions.filter(shouldRenderNote).map((d)=>$e80be54614c93c14$export$2f2e65a797f8fc1e(d, {\n axisType: axisType\n })).filter(minimumHeightFilter);\n return (0, $eWQbS$macrostrathyper)((0, $eWQbS$NotesColumn), {\n transform: `translate(${left})`,\n editable: false,\n noteComponent: noteComponent,\n notes: notes,\n forceOptions: {\n nodeSpacing: 1\n },\n ...rest\n });\n}\nconst $e80be54614c93c14$export$6316e673796ccb55 = (0, $eWQbS$react).memo($e80be54614c93c14$var$UnitDataColumn_);\nfunction $e80be54614c93c14$export$594d19cdd88f8c16(props) {\n const { nameForDivision: nameForDivision = $e80be54614c93c14$export$c9757aeb43a67df0, noteComponent: noteComponent, ...rest } = props;\n const defaultNoteComponent = (0, $eWQbS$useMemo)(()=>(props)=>{\n const { note: note } = props;\n return (0, $eWQbS$macrostrathyper)(\"p.col-note-label\", nameForDivision(note.data));\n }, [\n nameForDivision\n ]);\n return (0, $eWQbS$macrostrathyper)($e80be54614c93c14$export$6316e673796ccb55, {\n noteComponent: noteComponent ?? defaultNoteComponent,\n ...rest\n });\n}\n\n\nexport {$e80be54614c93c14$export$2f2e65a797f8fc1e as noteForDivision, $e80be54614c93c14$export$c9757aeb43a67df0 as defaultNameFunction, $e80be54614c93c14$export$6316e673796ccb55 as UnitDataColumn, $e80be54614c93c14$export$594d19cdd88f8c16 as UnitNamesColumn};\n//# sourceMappingURL=column-views.420b60d2.js.map\n","import h from \"@macrostrat/hyper\";\nimport { useCallback, useMemo } from \"react\";\nimport {\n ColumnAxisType,\n NotesColumn,\n NotesColumnProps,\n} from \"@macrostrat/column-components\";\nimport type { ColumnDivision } from \"@macrostrat/column-components\";\nimport { IUnit } from \"./types\";\nimport React from \"react\";\nimport { getUnitHeightRange } from \"../prepare-units/utils\";\nimport { CompositeColumnScale } from \"./composite\";\nimport { useCompositeScale, useMacrostratColumnData } from \"../data-provider\";\n\ninterface UnitDataProps extends NotesColumnProps {\n left?: number;\n transform?: string;\n noteComponent?: React.ComponentType<any>;\n shouldRenderNote?(div: ColumnDivision | IUnit, index: number): boolean;\n divisions?: IUnit[];\n minimumHeight?: number;\n scale?: CompositeColumnScale;\n}\n\ntype UnitNote = {\n height: number;\n top_height: number;\n data: IUnit;\n id: number;\n};\n\nfunction noteForDivision(\n div: IUnit,\n opts: { axisType: ColumnAxisType },\n): UnitNote {\n const { axisType } = opts;\n\n const [height, top_height] = getUnitHeightRange(div, axisType);\n\n return {\n height,\n top_height,\n data: div,\n id: div.unit_id,\n };\n}\n\nconst defaultNameFunction = (div) => {\n return div.unit_name\n .replace(\"Mbr\", \"Member\")\n .replace(\"Fm\", \"Formation\")\n .replace(\"Gp\", \"Group\");\n};\n\nfunction UnitDataColumn_(props: UnitDataProps) {\n const { axisType, units } = useMacrostratColumnData();\n const scale = useCompositeScale();\n const {\n left = 0,\n noteComponent,\n shouldRenderNote = (note: ColumnDivision | IUnit, i: number) => true,\n minimumHeight = 0,\n divisions = units,\n ...rest\n } = props;\n\n const minimumHeightFilter = useCallback(\n (d) => {\n if (minimumHeight == 0) return true;\n const dy = Math.abs(scale(d.top_height) - scale(d.height));\n return dy > minimumHeight;\n },\n [scale, minimumHeight],\n );\n\n if (divisions == null) return null;\n const notes: UnitNote[] = divisions\n .filter(shouldRenderNote)\n .map((d: IUnit) => noteForDivision(d, { axisType }))\n .filter(minimumHeightFilter);\n\n return h(NotesColumn, {\n transform: `translate(${left})`,\n editable: false,\n noteComponent,\n notes,\n forceOptions: {\n nodeSpacing: 1,\n },\n ...rest,\n });\n}\n\nconst UnitDataColumn = React.memo(UnitDataColumn_);\n\ninterface UnitNamesProps extends UnitDataProps {\n nameForDivision?(obj: IUnit): string;\n paddingLeft?: number;\n width: number;\n onClickNote?: (note: any) => void;\n}\n\nexport function UnitNamesColumn(props: UnitNamesProps) {\n const {\n nameForDivision = defaultNameFunction,\n noteComponent,\n ...rest\n } = props;\n\n const defaultNoteComponent = useMemo(\n () => (props) => {\n const { note } = props;\n return h(\"p.col-note-label\", nameForDivision(note.data));\n },\n [nameForDivision],\n );\n\n return h(UnitDataColumn, {\n noteComponent: noteComponent ?? defaultNoteComponent,\n ...rest,\n });\n}\n\nexport type { UnitNamesProps };\nexport { defaultNameFunction, noteForDivision, UnitDataColumn };\n"],"names":["$eWQbS$macrostrathyper","$eWQbS$react","useCallback","$eWQbS$useCallback","useMemo","$eWQbS$useMemo","NotesColumn","$eWQbS$NotesColumn","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$iWhRv","$wtIgl","$e80be54614c93c14$export$2f2e65a797f8fc1e","div","opts","axisType","height","top_height","getUnitHeightRange","data","unit_id","$e80be54614c93c14$export$c9757aeb43a67df0","unit_name","replace","$e80be54614c93c14$export$6316e673796ccb55","memo","props","units","useMacrostratColumnData","scale","useCompositeScale","left","noteComponent","shouldRenderNote","note","i","minimumHeight","divisions","rest","minimumHeightFilter","d","dy","Math","abs","transform","editable","notes","filter","map","forceOptions","nodeSpacing","$e80be54614c93c14$export$594d19cdd88f8c16","nameForDivision","defaultNoteComponent","noteForDivision","defaultNameFunction","UnitDataColumn","UnitNamesColumn"],"version":3,"file":"column-views.420b60d2.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.e1813308.js";import{line as e}from"d3-shape";import{createContext as t,useContext as r}from"react";import o from"@macrostrat/hyper";import{ColumnLayoutContext as a}from"@macrostrat/column-components";var n=globalThis,l={},c={},i=n.parcelRequirea149;null==i&&((i=function(e){if(e in l)return l[e].exports;if(e in c){var t=c[e];delete c[e];var r={id:e,exports:{}};return l[e]=r,t.call(r.exports,r,r.exports),r.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){c[e]=t},n.parcelRequirea149=i),i.register;var s=i("wtIgl");let u=function(e){let{xScale:t,scale:r,getHeight:o,...a}=e;return function(e,a=0){let n=o(e);return((e,t)=>{let r=e.domain();return r[0]<t<r[1]})(r,n)?[t(e.value),r(n)]:null}},p=t(null),d=function(t){let n=r(a)?.xScale,l=(0,s.useCompositeScale)(),{corrected:c,system:i,children:d,getHeight:m,clipY:f=!1}=t;null==m&&(m=function(e){return null==e.height&&console.log(e),e.height});let b=u({xScale:n,scale:l,corrected:c,system:i,getHeight:m}),x="avg_"+i;c&&(x+="_corr");let g=e().x(e=>n(e[x])).y(e=>l(e.height));return o(p.Provider,{value:{pointLocator:b,lineLocator:g,corrected:c,system:i,clipY:f}},o("g.data",d))},m=function(e){let{pointLocator:t}=r(p),{datum:a,strokeWidth:n,...l}=e,c=t(a);if(null==c)return null;let[i,s]=c;return o("circle",{key:a.sample_id,cx:i,cy:s,r:2,...l})},f=function(e){let{values:t,...a}=e,{lineLocator:n}=r(p);return o("path",{d:n(t),fill:"transparent",...a})},b=()=>r(p);export{d as IsotopesDataArea,m as IsotopeDataPoint,f as IsotopeDataLine,b as useDataLocator};
|
|
2
|
+
//# sourceMappingURL=column-views.4ce5f5e4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A,M,6C,A,Q,Q,C,K,U,A,Q,iB,C,C,c,C,K,O,A,Q,M,mB,A,Q,uB,C,K,+B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SCWA,IAAM,EAAqB,SAAU,CAAI,EACvC,GAAM,CAAA,OAAE,CAAM,CAAA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CAAE,CAAG,AAAA,EAAW,GAC9B,CAAA,MAAE,CAAK,CAAA,YAAE,CAAW,CAAE,GAAG,EAAM,CAAG,EAClC,EAAM,EAAa,GACzB,GAAI,AAAO,MAAP,EAAa,OAAO,KACxB,GAAM,CAAC,EAAI,EAAG,CAAG,EAEjB,OAAO,AAAA,EAAE,SAAU,CACjB,IAAK,EAAM,SAAS,CACpB,GAAA,EACA,GAAA,EACA,EAAG,EACH,GAAG,CAAI,AACT,EACF,EAEM,EAAkB,SAAU,CAAK,EACrC,GAAM,CAAE,OAAQ,CAAU,CAAE,GAAG,EAAM,CAAG,EAClC,CAAA,YAAE,CAAW,CAAE,CAAG,AAAA,EAAW,GACnC,OAAO,AAAA,EAAE,OAAQ,CACf,EAAG,EAAY,GACf,KAAM,cACN,GAAG,CAAI,AACT,EACF,EAEM,EAAiB,IAAM,AAAA,EAAW,U,K,gB,C,K,gB,C,K,e,C,K,c","sources":["<anon>","packages/column-views/src/facets/carbon-isotopes/data-area.ts"],"sourcesContent":["import \"./column-views.cd2a5c85.js\";\nimport {line as $5eSmp$line} from \"d3-shape\";\nimport {createContext as $5eSmp$createContext, useContext as $5eSmp$useContext} from \"react\";\nimport $5eSmp$macrostrathyper from \"@macrostrat/hyper\";\nimport {ColumnLayoutContext as $5eSmp$ColumnLayoutContext} from \"@macrostrat/column-components\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nconst $561e9bb965350dc6$var$inDomain = (scale, num)=>{\n const domain = scale.domain();\n return domain[0] < num < domain[1];\n};\nconst $561e9bb965350dc6$var$createPointLocator = function(opts) {\n const { xScale: xScale, scale: scale, getHeight: getHeight, ...rest } = opts;\n return function(d, s = 0) {\n const height = getHeight(d);\n if (!$561e9bb965350dc6$var$inDomain(scale, height)) return null;\n return [\n xScale(d.value),\n scale(height)\n ];\n };\n};\nconst $561e9bb965350dc6$var$IsotopesDataContext = (0, $5eSmp$createContext)(null);\nconst $561e9bb965350dc6$export$309ef8546e07d921 = function(props) {\n const xScale = (0, $5eSmp$useContext)((0, $5eSmp$ColumnLayoutContext))?.xScale;\n const scale = (0, $wtIgl.useCompositeScale)();\n let { corrected: corrected, system: system, children: children, getHeight: getHeight, clipY: clipY = false } = props;\n if (getHeight == null) getHeight = function(d) {\n if (d.height == null) console.log(d);\n return d.height;\n };\n // Handlers for creating points and lines\n const pointLocator = $561e9bb965350dc6$var$createPointLocator({\n xScale: xScale,\n scale: scale,\n corrected: corrected,\n system: system,\n getHeight: getHeight\n });\n let column = \"avg_\" + system;\n if (corrected) column += \"_corr\";\n const lineLocator = (0, $5eSmp$line)().x((d)=>xScale(d[column]))// @ts-ignore\n .y((d)=>scale(d.height));\n const value = {\n pointLocator: pointLocator,\n lineLocator: lineLocator,\n corrected: corrected,\n system: system,\n clipY: clipY\n };\n return (0, $5eSmp$macrostrathyper)($561e9bb965350dc6$var$IsotopesDataContext.Provider, {\n value: value\n }, (0, $5eSmp$macrostrathyper)(\"g.data\", children));\n};\nconst $561e9bb965350dc6$export$4cb5d059db4e2bd = function(props) {\n const { pointLocator: pointLocator } = (0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n const { datum: datum, strokeWidth: strokeWidth, ...rest } = props;\n const loc = pointLocator(datum);\n if (loc == null) return null;\n const [cx, cy] = loc;\n return (0, $5eSmp$macrostrathyper)(\"circle\", {\n key: datum.sample_id,\n cx: cx,\n cy: cy,\n r: 2,\n ...rest\n });\n};\nconst $561e9bb965350dc6$export$628a3ef6eb9c3a89 = function(props) {\n const { values: lineValues, ...rest } = props;\n const { lineLocator: lineLocator } = (0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n return (0, $5eSmp$macrostrathyper)(\"path\", {\n d: lineLocator(lineValues),\n fill: \"transparent\",\n ...rest\n });\n};\nconst $561e9bb965350dc6$export$919dbb10b6b5b75 = ()=>(0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n\n\nexport {$561e9bb965350dc6$export$309ef8546e07d921 as IsotopesDataArea, $561e9bb965350dc6$export$4cb5d059db4e2bd as IsotopeDataPoint, $561e9bb965350dc6$export$628a3ef6eb9c3a89 as IsotopeDataLine, $561e9bb965350dc6$export$919dbb10b6b5b75 as useDataLocator};\n//# sourceMappingURL=column-views.81294fb7.js.map\n","import { line } from \"d3-shape\";\nimport { createContext, useContext } from \"react\";\nimport h from \"@macrostrat/hyper\";\nimport { ColumnLayoutContext } from \"@macrostrat/column-components\";\nimport { useCompositeScale } from \"../../data-provider\";\n\nconst inDomain = (scale, num) => {\n const domain = scale.domain();\n return domain[0] < num < domain[1];\n};\n\nconst createPointLocator = function (opts) {\n const { xScale, scale, getHeight, ...rest } = opts;\n return function (d, s = 0) {\n const height = getHeight(d);\n if (!inDomain(scale, height)) return null;\n return [xScale(d.value), scale(height)];\n };\n};\n\nconst IsotopesDataContext = createContext(null);\n\nexport interface DataAreaProps {\n clipY: boolean;\n parameter: string;\n corrected: boolean;\n system: string;\n children: React.ReactNode;\n getHeight?: Function;\n}\n\nconst IsotopesDataArea = function (props: DataAreaProps) {\n const xScale = useContext(ColumnLayoutContext)?.xScale;\n\n const scale = useCompositeScale();\n\n let { corrected, system, children, getHeight, clipY = false } = props;\n if (getHeight == null) {\n getHeight = function (d) {\n if (d.height == null) {\n console.log(d);\n }\n return d.height;\n };\n }\n\n // Handlers for creating points and lines\n const pointLocator = createPointLocator({\n xScale,\n scale,\n corrected,\n system,\n getHeight,\n });\n\n let column = \"avg_\" + system;\n if (corrected) {\n column += \"_corr\";\n }\n const lineLocator = line()\n .x((d) => xScale(d[column]))\n // @ts-ignore\n .y((d) => scale(d.height));\n\n const value = { pointLocator, lineLocator, corrected, system, clipY };\n return h(IsotopesDataContext.Provider, { value }, h(\"g.data\", children));\n};\n\nconst IsotopeDataPoint = function (props) {\n const { pointLocator } = useContext(IsotopesDataContext);\n const { datum, strokeWidth, ...rest } = props;\n const loc = pointLocator(datum);\n if (loc == null) return null;\n const [cx, cy] = loc;\n\n return h(\"circle\", {\n key: datum.sample_id,\n cx,\n cy,\n r: 2,\n ...rest,\n });\n};\n\nconst IsotopeDataLine = function (props) {\n const { values: lineValues, ...rest } = props;\n const { lineLocator } = useContext(IsotopesDataContext);\n return h(\"path\", {\n d: lineLocator(lineValues),\n fill: \"transparent\",\n ...rest,\n });\n};\n\nconst useDataLocator = () => useContext(IsotopesDataContext);\n\nexport { IsotopesDataArea, IsotopeDataPoint, IsotopeDataLine, useDataLocator };\n"],"names":["line","$5eSmp$line","createContext","$5eSmp$createContext","useContext","$5eSmp$useContext","$5eSmp$macrostrathyper","ColumnLayoutContext","$5eSmp$ColumnLayoutContext","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$wtIgl","$561e9bb965350dc6$var$createPointLocator","opts","xScale","scale","getHeight","rest","d","s","height","$561e9bb965350dc6$var$inDomain","num","domain","value","$561e9bb965350dc6$var$IsotopesDataContext","$561e9bb965350dc6$export$309ef8546e07d921","props","useCompositeScale","corrected","system","children","clipY","console","log","pointLocator","column","lineLocator","x","y","Provider","$561e9bb965350dc6$export$4cb5d059db4e2bd","datum","strokeWidth","loc","cx","cy","key","sample_id","r","$561e9bb965350dc6$export$628a3ef6eb9c3a89","values","lineValues","fill","$561e9bb965350dc6$export$919dbb10b6b5b75","IsotopesDataArea","IsotopeDataPoint","IsotopeDataLine","useDataLocator"],"version":3,"file":"column-views.81294fb7.js.map","sourceRoot":"../../../../"}
|
|
1
|
+
{"mappings":"A,M,6C,A,Q,Q,C,K,U,A,Q,iB,C,C,c,C,K,O,A,Q,M,mB,A,Q,uB,C,K,+B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SCWA,IAAM,EAAqB,SAAU,CAAI,EACvC,GAAM,CAAA,OAAE,CAAM,CAAA,MAAE,CAAK,CAAA,UAAE,CAAS,CAAE,GAAG,EAAM,CAAG,EAC9C,OAAO,SAAU,CAAC,CAAE,EAAI,CAAC,EACvB,IAAM,EAAS,EAAU,SACzB,AAAK,AATQ,CAAA,CAAC,EAAO,KACvB,IAAM,EAAS,EAAM,MAAM,GAC3B,OAAO,CAAM,CAAC,EAAE,CAAG,EAAM,CAAM,CAAC,EAAE,AACpC,CAAA,EAMkB,EAAO,GACd,CAAC,EAAO,EAAE,KAAK,EAAG,EAAM,GAAQ,CADF,IAEvC,CACF,EAEM,EAAsB,AAAA,EAAc,MAWpC,EAAmB,SAAU,CAAoB,EACrD,IAAM,EAAS,AAAA,EAAW,IAAsB,OAE1C,EAAQ,AAAA,CAAA,EAAA,EAAA,iBAAgB,AAAhB,IAEV,CAAA,UAAE,CAAS,CAAA,OAAE,CAAM,CAAA,SAAE,CAAQ,CAAA,UAAE,CAAS,CAAA,MAAE,EAAQ,CAAA,CAAA,CAAO,CAAG,CAC5D,A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ts"],"sourcesContent":["import \"./column-views.e1813308.js\";\nimport {line as $5eSmp$line} from \"d3-shape\";\nimport {createContext as $5eSmp$createContext, useContext as $5eSmp$useContext} from \"react\";\nimport $5eSmp$macrostrathyper from \"@macrostrat/hyper\";\nimport {ColumnLayoutContext as $5eSmp$ColumnLayoutContext} from \"@macrostrat/column-components\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nconst $561e9bb965350dc6$var$inDomain = (scale, num)=>{\n const domain = scale.domain();\n return domain[0] < num < domain[1];\n};\nconst $561e9bb965350dc6$var$createPointLocator = function(opts) {\n const { xScale: xScale, scale: scale, getHeight: getHeight, ...rest } = opts;\n return function(d, s = 0) {\n const height = getHeight(d);\n if (!$561e9bb965350dc6$var$inDomain(scale, height)) return null;\n return [\n xScale(d.value),\n scale(height)\n ];\n };\n};\nconst $561e9bb965350dc6$var$IsotopesDataContext = (0, $5eSmp$createContext)(null);\nconst $561e9bb965350dc6$export$309ef8546e07d921 = function(props) {\n const xScale = (0, $5eSmp$useContext)((0, $5eSmp$ColumnLayoutContext))?.xScale;\n const scale = (0, $wtIgl.useCompositeScale)();\n let { corrected: corrected, system: system, children: children, getHeight: getHeight, clipY: clipY = false } = props;\n if (getHeight == null) getHeight = function(d) {\n if (d.height == null) console.log(d);\n return d.height;\n };\n // Handlers for creating points and lines\n const pointLocator = $561e9bb965350dc6$var$createPointLocator({\n xScale: xScale,\n scale: scale,\n corrected: corrected,\n system: system,\n getHeight: getHeight\n });\n let column = \"avg_\" + system;\n if (corrected) column += \"_corr\";\n const lineLocator = (0, $5eSmp$line)().x((d)=>xScale(d[column]))// @ts-ignore\n .y((d)=>scale(d.height));\n const value = {\n pointLocator: pointLocator,\n lineLocator: lineLocator,\n corrected: corrected,\n system: system,\n clipY: clipY\n };\n return (0, $5eSmp$macrostrathyper)($561e9bb965350dc6$var$IsotopesDataContext.Provider, {\n value: value\n }, (0, $5eSmp$macrostrathyper)(\"g.data\", children));\n};\nconst $561e9bb965350dc6$export$4cb5d059db4e2bd = function(props) {\n const { pointLocator: pointLocator } = (0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n const { datum: datum, strokeWidth: strokeWidth, ...rest } = props;\n const loc = pointLocator(datum);\n if (loc == null) return null;\n const [cx, cy] = loc;\n return (0, $5eSmp$macrostrathyper)(\"circle\", {\n key: datum.sample_id,\n cx: cx,\n cy: cy,\n r: 2,\n ...rest\n });\n};\nconst $561e9bb965350dc6$export$628a3ef6eb9c3a89 = function(props) {\n const { values: lineValues, ...rest } = props;\n const { lineLocator: lineLocator } = (0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n return (0, $5eSmp$macrostrathyper)(\"path\", {\n d: lineLocator(lineValues),\n fill: \"transparent\",\n ...rest\n });\n};\nconst $561e9bb965350dc6$export$919dbb10b6b5b75 = ()=>(0, $5eSmp$useContext)($561e9bb965350dc6$var$IsotopesDataContext);\n\n\nexport {$561e9bb965350dc6$export$309ef8546e07d921 as IsotopesDataArea, $561e9bb965350dc6$export$4cb5d059db4e2bd as IsotopeDataPoint, $561e9bb965350dc6$export$628a3ef6eb9c3a89 as IsotopeDataLine, $561e9bb965350dc6$export$919dbb10b6b5b75 as useDataLocator};\n//# sourceMappingURL=column-views.4ce5f5e4.js.map\n","import { line } from \"d3-shape\";\nimport { createContext, useContext } from \"react\";\nimport h from \"@macrostrat/hyper\";\nimport { ColumnLayoutContext } from \"@macrostrat/column-components\";\nimport { useCompositeScale } from \"../../data-provider\";\n\nconst inDomain = (scale, num) => {\n const domain = scale.domain();\n return domain[0] < num < domain[1];\n};\n\nconst createPointLocator = function (opts) {\n const { xScale, scale, getHeight, ...rest } = opts;\n return function (d, s = 0) {\n const height = getHeight(d);\n if (!inDomain(scale, height)) return null;\n return [xScale(d.value), scale(height)];\n };\n};\n\nconst IsotopesDataContext = createContext(null);\n\nexport interface DataAreaProps {\n clipY: boolean;\n parameter: string;\n corrected: boolean;\n system: string;\n children: React.ReactNode;\n getHeight?: Function;\n}\n\nconst IsotopesDataArea = function (props: DataAreaProps) {\n const xScale = useContext(ColumnLayoutContext)?.xScale;\n\n const scale = useCompositeScale();\n\n let { corrected, system, children, getHeight, clipY = false } = props;\n if (getHeight == null) {\n getHeight = function (d) {\n if (d.height == null) {\n console.log(d);\n }\n return d.height;\n };\n }\n\n // Handlers for creating points and lines\n const pointLocator = createPointLocator({\n xScale,\n scale,\n corrected,\n system,\n getHeight,\n });\n\n let column = \"avg_\" + system;\n if (corrected) {\n column += \"_corr\";\n }\n const lineLocator = line()\n .x((d) => xScale(d[column]))\n // @ts-ignore\n .y((d) => scale(d.height));\n\n const value = { pointLocator, lineLocator, corrected, system, clipY };\n return h(IsotopesDataContext.Provider, { value }, h(\"g.data\", children));\n};\n\nconst IsotopeDataPoint = function (props) {\n const { pointLocator } = useContext(IsotopesDataContext);\n const { datum, strokeWidth, ...rest } = props;\n const loc = pointLocator(datum);\n if (loc == null) return null;\n const [cx, cy] = loc;\n\n return h(\"circle\", {\n key: datum.sample_id,\n cx,\n cy,\n r: 2,\n ...rest,\n });\n};\n\nconst IsotopeDataLine = function (props) {\n const { values: lineValues, ...rest } = props;\n const { lineLocator } = useContext(IsotopesDataContext);\n return h(\"path\", {\n d: lineLocator(lineValues),\n fill: \"transparent\",\n ...rest,\n });\n};\n\nconst useDataLocator = () => useContext(IsotopesDataContext);\n\nexport { IsotopesDataArea, IsotopeDataPoint, IsotopeDataLine, useDataLocator };\n"],"names":["line","$5eSmp$line","createContext","$5eSmp$createContext","useContext","$5eSmp$useContext","$5eSmp$macrostrathyper","ColumnLayoutContext","$5eSmp$ColumnLayoutContext","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$wtIgl","$561e9bb965350dc6$var$createPointLocator","opts","xScale","scale","getHeight","rest","d","s","height","$561e9bb965350dc6$var$inDomain","num","domain","value","$561e9bb965350dc6$var$IsotopesDataContext","$561e9bb965350dc6$export$309ef8546e07d921","props","useCompositeScale","corrected","system","children","clipY","console","log","pointLocator","column","lineLocator","x","y","Provider","$561e9bb965350dc6$export$4cb5d059db4e2bd","datum","strokeWidth","loc","cx","cy","key","sample_id","r","$561e9bb965350dc6$export$628a3ef6eb9c3a89","values","lineValues","fill","$561e9bb965350dc6$export$919dbb10b6b5b75","IsotopesDataArea","IsotopeDataPoint","IsotopeDataLine","useDataLocator"],"version":3,"file":"column-views.4ce5f5e4.js.map","sourceRoot":"../../../../"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./column-views.1261be59.js";import"./column-views.003348f6.js";import"./column-views.e1813308.js";import"./column-views.0beae29d.js";import"./column-views.a08b0c9f.js";import"./column-views.d08e4328.js";import"./column-views.60b5663d.js";import"./column-views.db47fe3c.js";import"./column-views.7f9c7448.js";import"./column-views.a16cd1f2.js";import{ColumnAxisType as e}from"@macrostrat/column-components";import{hyperStyled as o}from"@macrostrat/hyper";import{extractPadding as n,useDarkMode as t,Box as i}from"@macrostrat/ui-components";import l from"classnames";import{useRef as a,useCallback as s}from"react";import{NonIdealState as r}from"@blueprintjs/core";import{DataField as c}from"@macrostrat/data-components";function m(e,o,n,t){Object.defineProperty(e,o,{get:n,set:t,enumerable:!0,configurable:!0})}var u=globalThis,p={},d={},f=u.parcelRequirea149;null==f&&((f=function(e){if(e in p)return p[e].exports;if(e in d){var o=d[e];delete d[e];var n={id:e,exports:{}};return p[e]=n,o.call(n.exports,n,n.exports),n.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,o){d[e]=o},u.parcelRequirea149=f),f.register;var b={};m(b,"Column",()=>R),m(b,"ColumnContainer",()=>E),m(b,"ColumnBasicInfo",()=>M);var g=f("7YHvf"),v=f("7tWYE"),h=f("wtIgl"),_=f("5SO8b"),x=f("iYfAq"),S=f("2KV3o"),H=f("7exMg"),C=f("4hG2H"),w=f("76iYI"),A=f("610tc");let y=o(g&&g.__esModule?g.default:g);function R(o){let{showUnitPopover:n=!1,keyboardNavigation:t=!1,mergeSections:i,onUnitSelected:l,selectedUnit:s,children:c,units:m,t_age:u,b_age:p,t_pos:d,b_pos:f,unconformityHeight:b=30,targetUnitHeight:g=20,pixelScale:v,minPixelScale:x=.2,minSectionHeight:H=50,collapseSmallUnconformities:R=!0,allowUnitSelection:E,hybridScale:M,scale:F,axisType:$,...j}=o,T=a(),N=g,L=H,O=x;null!=v&&(N=null,L=0,O=v);let I=$??e.AGE,P=C.CompositeAgeAxis;M?.type===w.HybridScaleType.ApproximateHeight&&I!=e.AGE&&(P=C.ApproximateHeightAxis,I=e.AGE);let{sections:D,units:k,totalHeight:G}=(0,A.usePreparedColumnUnits)(m,{axisType:I,t_age:u,b_age:p,t_pos:d,b_pos:f,mergeSections:i,targetUnitHeight:N,unconformityHeight:b,pixelScale:v,minPixelScale:O,minSectionHeight:L,collapseSmallUnconformities:R,scale:F,hybridScale:M});if(0===D.length)return y("div.column-container.empty",y(r,{title:"Empty column",description:"No sections found in this column.",icon:"warning-sign"}));let B=y(U,{columnRef:T,ageAxisComponent:P,...j},[c,y.if(n)(S.UnitSelectionPopover),y.if(t)(_.UnitKeyboardNavigation,{units:k})]),Y=E??!1;return(n||null!=s||null!=l)&&(Y=!0),Y&&(B=y(_.UnitSelectionProvider,{columnRef:T,onUnitSelected:l,selectedUnit:s,units:k},B)),y(h.MacrostratColumnDataProvider,{units:k,sections:D,totalHeight:G,axisType:I},B)}function U(o){let t=n(o),i={"--column-padding-top":`${t.paddingTop}px`,"--column-padding-bottom":`${t.paddingBottom}px`,"--column-padding-left":`${t.paddingLeft}px`,"--column-padding-right":`${t.paddingRight}px`},{unitComponent:l=v.UnitComponent,unconformityLabels:a="minimal",showLabels:r=!0,width:c=300,columnWidth:m=150,showLabelColumn:u=!0,className:p,columnRef:d,clipUnits:f=!1,children:b,showTimescale:g,timescaleLevels:x,maxInternalColumns:S,onMouseOver:w,ageAxisComponent:A=C.CompositeAgeAxis}=o,{axisType:R}=(0,h.useMacrostratColumnData)(),U=!1,M=!1;!0===a||"prominent"===a?M=!0:"minimal"===a&&(U=!0);let F=m;F>c&&(F=c);let $=u;F>c-10&&($=!1);let j=g??!0;return null!=x&&(j=!0),j=R==e.AGE&&j,y(E,{...function(e=null){let o=(0,_.useUnitSelectionDispatch)(),n=s(e=>{o?.(null,null,e)},[o]),t=(0,h.useCompositeScale)(),i=s(o=>{let n=t.invert(o.clientY-o.currentTarget.getBoundingClientRect().top);e?.(null,n,o)},[t,e]),l=s(()=>{e?.(null,null,null)},[e]);return null==e?{onClick:n,onMouseOver:void 0,onMouseMove:void 0,onMouseOut:void 0}:{onMouseOver:i,onMouseMove:i,onMouseOut:l,onClick:n}}(w),style:i,className:p},y("div.column",{ref:d},[y(A),y.if(j)(H.CompositeTimescale,{levels:x,unconformityLabels:U}),y(H.SectionsColumn,{unitComponent:l,showLabels:r,width:c,columnWidth:F,showLabelColumn:$,clipUnits:f,unconformityLabels:M,maxInternalColumns:S}),b]))}function E(e){let{className:o,...n}=e,a=t();return y(i,{className:l(o,{"dark-mode":a?.isEnabled??!1},"column-container"),...n})}function M({data:e,showColumnID:o=!0,showReferences:n=!0}){return null==e?null:y("div.column-info",[y("div.column-title-row",[y("h2",e.col_name),y.if(o)("h4",y(x.Identifier,{id:e.col_id}))]),y(c,{row:!0,label:"Group",value:e.col_group}),y.if(n)(x.ReferencesField,{refs:e.refs,inline:!1,row:!1,className:"column-refs"})])}export{R as Column,E as ColumnContainer,M as ColumnBasicInfo};
|
|
2
|
+
//# sourceMappingURL=column-views.52cc4dd0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,Q,kB,C,K,+B,A,Q,e,C,K,mB,A,Q,kB,C,C,e,C,C,O,C,K,2B,A,Q,M,Y,A,Q,U,C,C,e,C,K,O,A,Q,iB,C,K,mB,A,Q,a,C,K,6B,C,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,I,G,E,E,kB,I,G,E,E,kB,I,G,I,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,SCoDA,IAAM,EAAI,AAAA,E,AAAY,G,AAAA,E,U,C,AAAA,E,O,CAAA,GAuCf,SAAS,EAAO,CAAkB,EACvC,GAAM,CAAA,gBACJ,EAAkB,CAAA,CAAA,CAAA,mBAClB,EAAqB,CAAA,CAAA,CAAA,cACrB,CAAa,CAAA,eACb,CAAc,CAAA,aACd,CAAY,CAAA,SACZ,CAAQ,CACR,MAAO,CAAQ,CAAA,MACf,CAAK,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,EACA,gBAAA,EACA,UAAA,EACA,mBAAoB,EACpB,mBAAA,CACF,GACA,EACD,EAEL,CAwDO,SAAS,EAAgB,CAA2B,EACzD,GAAM,CAAA,UAAE,CAAS,CAAE,GAAG,EAAM,CAAG,EACzB,EAAW,AAAA,IAEjB,OAAO,EAAE,EAAK,CACZ,UAAW,AAAA,EACT,EACA,CACE,YAAa,GAAU,WAAa,CAAA,CACtC,EACA,oBAEF,GAAG,CAAI,AACT,EACF,CAEO,SAAS,EAAgB,CAAA,KAC9B,CAAI,CAAA,aACJ,EAAe,CAAA,CAAA,CAAA,eACf,EAAiB,CAAA,CAAA,CAClB,SACC,AAAI,AAAQ,MAAR,EAAqB,KAClB,EAAE,kBAAmB,CAC1B,EAAE,uBAAwB,CACxB,EAAE,KAAM,EAAK,QAAQ,EACrB,EAAE,EAAE,CAAC,GAAc,KAAM,EAAE,EAAA,UAAS,CAAG,CAAE,GAAI,EAAK,MAAM,AAAC,IAC1D,EACD,EAAE,EAAW,CAAE,IAAK,CAAA,EAAM,MAAO,QAAS,MAAO,EAAK,SAAS,AAAC,GAChE,EAAE,EAAE,CAAC,GAAgB,EAAA,eAAc,CAAG,CACpC,KAAM,EAAK,IAAI,CACf,OAAQ,CAAA,EACR,IAAK,CAAA,EACL,UAAW,aACb,GACD,CACH,Q,K,M,C,K,e,C,K,e","sources":["<anon>","packages/column-views/src/column.ts"],"sourcesContent":["import \"./column-views.1261be59.js\";\nimport \"./column-views.003348f6.js\";\nimport \"./column-views.e1813308.js\";\nimport \"./column-views.0beae29d.js\";\nimport \"./column-views.a08b0c9f.js\";\nimport \"./column-views.d08e4328.js\";\nimport \"./column-views.60b5663d.js\";\nimport \"./column-views.db47fe3c.js\";\nimport \"./column-views.7f9c7448.js\";\nimport \"./column-views.a16cd1f2.js\";\nimport {ColumnAxisType as $6sU8d$ColumnAxisType} from \"@macrostrat/column-components\";\nimport {hyperStyled as $6sU8d$hyperStyled} from \"@macrostrat/hyper\";\nimport {extractPadding as $6sU8d$extractPadding, useDarkMode as $6sU8d$useDarkMode, Box as $6sU8d$Box} from \"@macrostrat/ui-components\";\nimport $6sU8d$classnames from \"classnames\";\nimport {useRef as $6sU8d$useRef, useCallback as $6sU8d$useCallback} from \"react\";\nimport {NonIdealState as $6sU8d$NonIdealState} from \"@blueprintjs/core\";\nimport {DataField as $6sU8d$DataField} from \"@macrostrat/data-components\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $4721fb147cb3f5e1$exports = {};\n\n$parcel$export($4721fb147cb3f5e1$exports, \"Column\", () => $4721fb147cb3f5e1$export$816b5d811295e6bc);\n$parcel$export($4721fb147cb3f5e1$exports, \"ColumnContainer\", () => $4721fb147cb3f5e1$export$2194471aa3d52446);\n$parcel$export($4721fb147cb3f5e1$exports, \"ColumnBasicInfo\", () => $4721fb147cb3f5e1$export$fcdf79c491a4504f);\n\n\n\n\n\n\nvar $7YHvf = parcelRequire(\"7YHvf\");\n\nvar $7tWYE = parcelRequire(\"7tWYE\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nvar $5SO8b = parcelRequire(\"5SO8b\");\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\nvar $2KV3o = parcelRequire(\"2KV3o\");\n\nvar $7exMg = parcelRequire(\"7exMg\");\n\nvar $4hG2H = parcelRequire(\"4hG2H\");\n\nvar $76iYI = parcelRequire(\"76iYI\");\nvar $610tc = parcelRequire(\"610tc\");\n\n\nconst $4721fb147cb3f5e1$var$h = (0, $6sU8d$hyperStyled)((0, (/*@__PURE__*/$parcel$interopDefault($7YHvf))));\nfunction $4721fb147cb3f5e1$export$816b5d811295e6bc(props) {\n const { showUnitPopover: showUnitPopover = false, keyboardNavigation: keyboardNavigation = false, mergeSections: mergeSections, onUnitSelected: onUnitSelected, selectedUnit: selectedUnit, children: children, units: rawUnits, t_age: t_age, b_age: b_age, t_pos: t_pos, b_pos: b_pos, unconformityHeight: unconformityHeight = 30, targetUnitHeight: targetUnitHeight = 20, pixelScale: pixelScale, minPixelScale: minPixelScale = 0.2, minSectionHeight: minSectionHeight = 50, collapseSmallUnconformities: collapseSmallUnconformities = true, allowUnitSelection: allowUnitSelection, hybridScale: hybridScale, scale: scale, axisType: axisType, ...rest } = props;\n const ref = (0, $6sU8d$useRef)();\n // Selected item position\n /* Make pixelScale and targetUnitHeight mutually exclusive. PixelScale implies\n * standardization of scales in all sections */ let _targetUnitHeight = targetUnitHeight;\n let _minSectionHeight = minSectionHeight;\n let _minPixelScale = minPixelScale;\n if (pixelScale != null) {\n _targetUnitHeight = null;\n _minSectionHeight = 0;\n _minPixelScale = pixelScale;\n }\n // Handle special cases for hybrid scales (WIP, we need to regularize this)\n let _axisType = axisType ?? (0, $6sU8d$ColumnAxisType).AGE;\n let ageAxisComponent = (0, $4hG2H.CompositeAgeAxis);\n if (hybridScale?.type === (0, $76iYI.HybridScaleType).ApproximateHeight && _axisType != (0, $6sU8d$ColumnAxisType).AGE) {\n // Use approximate height axis for non-age columns if a non-age axis type is requested\n ageAxisComponent = (0, $4hG2H.ApproximateHeightAxis);\n _axisType = (0, $6sU8d$ColumnAxisType).AGE;\n }\n const { sections: sections, units: units, totalHeight: totalHeight } = (0, $610tc.usePreparedColumnUnits)(rawUnits, {\n axisType: _axisType,\n t_age: t_age,\n b_age: b_age,\n t_pos: t_pos,\n b_pos: b_pos,\n mergeSections: mergeSections,\n targetUnitHeight: _targetUnitHeight,\n unconformityHeight: unconformityHeight,\n pixelScale: pixelScale,\n minPixelScale: _minPixelScale,\n minSectionHeight: _minSectionHeight,\n collapseSmallUnconformities: collapseSmallUnconformities,\n scale: // TODO: consider unifying scale and hybridScale options\n scale,\n hybridScale: hybridScale\n });\n if (sections.length === 0) return $4721fb147cb3f5e1$var$h(\"div.column-container.empty\", $4721fb147cb3f5e1$var$h((0, $6sU8d$NonIdealState), {\n title: \"Empty column\",\n description: \"No sections found in this column.\",\n icon: \"warning-sign\"\n }));\n let main = $4721fb147cb3f5e1$var$h($4721fb147cb3f5e1$var$ColumnInner, {\n columnRef: ref,\n ageAxisComponent: ageAxisComponent,\n ...rest\n }, [\n children,\n $4721fb147cb3f5e1$var$h.if(showUnitPopover)((0, $2KV3o.UnitSelectionPopover)),\n $4721fb147cb3f5e1$var$h.if(keyboardNavigation)((0, $5SO8b.UnitKeyboardNavigation), {\n units: units\n })\n ]);\n /* By default, unit selection is disabled. However, if any related props are passed,\n we enable it.\n */ let _allowUnitSelection = allowUnitSelection ?? false;\n if (showUnitPopover || selectedUnit != null || onUnitSelected != null) _allowUnitSelection = true;\n if (_allowUnitSelection) main = $4721fb147cb3f5e1$var$h((0, $5SO8b.UnitSelectionProvider), {\n columnRef: ref,\n onUnitSelected: onUnitSelected,\n selectedUnit: selectedUnit,\n units: units\n }, main);\n return $4721fb147cb3f5e1$var$h((0, $wtIgl.MacrostratColumnDataProvider), {\n units: units,\n sections: sections,\n totalHeight: totalHeight,\n axisType: _axisType\n }, main);\n}\nfunction $4721fb147cb3f5e1$var$ColumnInner(props) {\n const padding = (0, $6sU8d$extractPadding)(props);\n // TODO: integrate padding vars more closely with the rest of the spacing (right now padding is a bit ad-hoc)\n const paddingVars = {\n \"--column-padding-top\": `${padding.paddingTop}px`,\n \"--column-padding-bottom\": `${padding.paddingBottom}px`,\n \"--column-padding-left\": `${padding.paddingLeft}px`,\n \"--column-padding-right\": `${padding.paddingRight}px`\n };\n const { unitComponent: unitComponent = (0, $7tWYE.UnitComponent), unconformityLabels: unconformityLabels = \"minimal\", showLabels: showLabels = true, width: _width = 300, columnWidth: _columnWidth = 150, showLabelColumn: _showLabelColumn = true, className: className, columnRef: columnRef, clipUnits: clipUnits = false, children: children, showTimescale: showTimescale, timescaleLevels: timescaleLevels, maxInternalColumns: maxInternalColumns, onMouseOver: onMouseOver, ageAxisComponent: ageAxisComponent = (0, $4hG2H.CompositeAgeAxis) } = props;\n const { axisType: axisType } = (0, $wtIgl.useMacrostratColumnData)();\n // Coalesce unconformity label setting to a boolean\n let _timescaleUnconformityLabels = false;\n let _sectionUnconformityLabels = false;\n if (unconformityLabels === true || unconformityLabels === \"prominent\") _sectionUnconformityLabels = true;\n else if (unconformityLabels === \"minimal\") _timescaleUnconformityLabels = true;\n let width = _width;\n let columnWidth = _columnWidth;\n if (columnWidth > width) columnWidth = width;\n let showLabelColumn = _showLabelColumn;\n if (columnWidth > width - 10) showLabelColumn = false;\n let _showTimescale = showTimescale ?? true;\n if (timescaleLevels != null) _showTimescale = true;\n _showTimescale = axisType == (0, $6sU8d$ColumnAxisType).AGE && _showTimescale;\n return $4721fb147cb3f5e1$var$h($4721fb147cb3f5e1$export$2194471aa3d52446, {\n ...$4721fb147cb3f5e1$var$useMouseEventHandlers(onMouseOver),\n style: paddingVars,\n className: className\n }, $4721fb147cb3f5e1$var$h(\"div.column\", {\n ref: columnRef\n }, [\n $4721fb147cb3f5e1$var$h(ageAxisComponent),\n $4721fb147cb3f5e1$var$h.if(_showTimescale)((0, $7exMg.CompositeTimescale), {\n levels: timescaleLevels,\n unconformityLabels: _timescaleUnconformityLabels\n }),\n $4721fb147cb3f5e1$var$h((0, $7exMg.SectionsColumn), {\n unitComponent: unitComponent,\n showLabels: showLabels,\n width: width,\n columnWidth: columnWidth,\n showLabelColumn: showLabelColumn,\n clipUnits: clipUnits,\n unconformityLabels: _sectionUnconformityLabels,\n maxInternalColumns: maxInternalColumns\n }),\n children\n ]));\n}\nfunction $4721fb147cb3f5e1$var$useMouseEventHandlers(_onMouseOver = null) {\n /** Click event handler */ // Click handler for unit selection\n const dispatch = (0, $5SO8b.useUnitSelectionDispatch)();\n const onClick = (0, $6sU8d$useCallback)((evt)=>{\n dispatch?.(null, null, evt);\n }, [\n dispatch\n ]);\n /** Hover event handlers */ const scale = (0, $wtIgl.useCompositeScale)();\n const onMouseOver = (0, $6sU8d$useCallback)((evt)=>{\n const height = scale.invert(evt.clientY - evt.currentTarget.getBoundingClientRect().top);\n _onMouseOver?.(null, height, evt);\n }, [\n scale,\n _onMouseOver\n ]);\n const onMouseOut = (0, $6sU8d$useCallback)(()=>{\n _onMouseOver?.(null, null, null);\n }, [\n _onMouseOver\n ]);\n if (_onMouseOver == null) return {\n onClick: onClick,\n onMouseOver: undefined,\n onMouseMove: undefined,\n onMouseOut: undefined\n };\n return {\n onMouseOver: onMouseOver,\n onMouseMove: onMouseOver,\n onMouseOut: onMouseOut,\n onClick: onClick\n };\n}\nfunction $4721fb147cb3f5e1$export$2194471aa3d52446(props) {\n const { className: className, ...rest } = props;\n const darkMode = (0, $6sU8d$useDarkMode)();\n return $4721fb147cb3f5e1$var$h((0, $6sU8d$Box), {\n className: (0, $6sU8d$classnames)(className, {\n \"dark-mode\": darkMode?.isEnabled ?? false\n }, \"column-container\"),\n ...rest\n });\n}\nfunction $4721fb147cb3f5e1$export$fcdf79c491a4504f({ data: data, showColumnID: showColumnID = true, showReferences: showReferences = true }) {\n if (data == null) return null;\n return $4721fb147cb3f5e1$var$h(\"div.column-info\", [\n $4721fb147cb3f5e1$var$h(\"div.column-title-row\", [\n $4721fb147cb3f5e1$var$h(\"h2\", data.col_name),\n $4721fb147cb3f5e1$var$h.if(showColumnID)(\"h4\", $4721fb147cb3f5e1$var$h((0, $iYfAq.Identifier), {\n id: data.col_id\n }))\n ]),\n $4721fb147cb3f5e1$var$h((0, $6sU8d$DataField), {\n row: true,\n label: \"Group\",\n value: data.col_group\n }),\n $4721fb147cb3f5e1$var$h.if(showReferences)((0, $iYfAq.ReferencesField), {\n refs: data.refs,\n inline: false,\n row: false,\n className: \"column-refs\"\n })\n ]);\n}\n\n\nexport {$4721fb147cb3f5e1$export$816b5d811295e6bc as Column, $4721fb147cb3f5e1$export$2194471aa3d52446 as ColumnContainer, $4721fb147cb3f5e1$export$fcdf79c491a4504f as ColumnBasicInfo};\n//# sourceMappingURL=column-views.52cc4dd0.js.map\n","import { ColumnAxisType } from \"@macrostrat/column-components\";\nimport { hyperStyled } from \"@macrostrat/hyper\";\nimport {\n Box,\n extractPadding,\n Padding,\n useDarkMode,\n} from \"@macrostrat/ui-components\";\nimport classNames from \"classnames\";\nimport {\n RefObject,\n useRef,\n HTMLAttributes,\n useCallback,\n CSSProperties,\n ComponentType,\n} from \"react\";\nimport styles from \"./column.module.sass\";\nimport { UnitComponent } from \"./units\";\nimport {\n UnitSelectionProvider,\n UnitKeyboardNavigation,\n useUnitSelectionDispatch,\n} from \"./data-provider\";\n\nimport {\n Identifier,\n ReferencesField,\n UnitSelectionPopover,\n} from \"./unit-details\";\nimport {\n MacrostratColumnDataProvider,\n useCompositeScale,\n useMacrostratColumnData,\n} from \"./data-provider\";\nimport {\n SectionSharedProps,\n CompositeTimescale,\n SectionsColumn,\n} from \"./section\";\nimport { ApproximateHeightAxis, CompositeAgeAxis } from \"./age-axis\";\nimport {\n MergeSectionsMode,\n usePreparedColumnUnits,\n HybridScaleType,\n ColumnHeightScaleOptions,\n} from \"./prepare-units\";\nimport { UnitLong } from \"@macrostrat/api-types\";\nimport { NonIdealState } from \"@blueprintjs/core\";\nimport { DataField } from \"@macrostrat/data-components\";\nimport { ScaleContinuousNumeric } from \"d3-scale\";\n\nconst h = hyperStyled(styles);\n\ninterface BaseColumnProps extends SectionSharedProps {\n className?: string;\n showLabelColumn?: boolean;\n keyboardNavigation?: boolean;\n showLabels?: boolean;\n maxInternalColumns?: number;\n // Timescale properties\n showTimescale?: boolean;\n timescaleLevels?: number | [number, number];\n unconformityLabels?: boolean | UnconformityLabelPlacement;\n onMouseOver?: (\n unit: UnitLong | null,\n height: number | null,\n evt: MouseEvent,\n ) => void;\n}\n\nexport type UnconformityLabelPlacement = \"minimal\" | \"prominent\" | \"none\";\n\nexport interface ColumnProps\n extends Padding, BaseColumnProps, ColumnHeightScaleOptions {\n // Macrostrat units\n units: UnitLong[];\n t_age?: number;\n b_age?: number;\n t_pos?: number;\n b_pos?: number;\n mergeSections?: MergeSectionsMode;\n showUnitPopover?: boolean;\n allowUnitSelection?: boolean;\n selectedUnit?: number | null;\n onUnitSelected?: (unitID: number | null, unit: any) => void;\n // Unconformity height in pixels\n unconformityHeight?: number;\n scale?: ScaleContinuousNumeric<number, number>;\n}\n\nexport function Column(props: ColumnProps) {\n const {\n showUnitPopover = false,\n keyboardNavigation = false,\n mergeSections,\n onUnitSelected,\n selectedUnit,\n children,\n units: rawUnits,\n t_age,\n b_age,\n t_pos,\n b_pos,\n unconformityHeight = 30,\n targetUnitHeight = 20,\n pixelScale,\n minPixelScale = 0.2,\n minSectionHeight = 50,\n collapseSmallUnconformities = true,\n allowUnitSelection,\n hybridScale,\n scale,\n axisType,\n ...rest\n } = props;\n const ref = useRef<HTMLElement>();\n // Selected item position\n\n /* Make pixelScale and targetUnitHeight mutually exclusive. PixelScale implies\n * standardization of scales in all sections */\n let _targetUnitHeight = targetUnitHeight;\n let _minSectionHeight = minSectionHeight;\n let _minPixelScale = minPixelScale;\n if (pixelScale != null) {\n _targetUnitHeight = null;\n _minSectionHeight = 0;\n _minPixelScale = pixelScale;\n }\n\n // Handle special cases for hybrid scales (WIP, we need to regularize this)\n let _axisType = axisType ?? ColumnAxisType.AGE;\n let ageAxisComponent = CompositeAgeAxis;\n if (\n hybridScale?.type === HybridScaleType.ApproximateHeight &&\n _axisType != ColumnAxisType.AGE\n ) {\n // Use approximate height axis for non-age columns if a non-age axis type is requested\n ageAxisComponent = ApproximateHeightAxis;\n _axisType = ColumnAxisType.AGE;\n }\n\n const { sections, units, totalHeight } = usePreparedColumnUnits(rawUnits, {\n axisType: _axisType,\n t_age,\n b_age,\n t_pos,\n b_pos,\n mergeSections,\n targetUnitHeight: _targetUnitHeight,\n unconformityHeight,\n pixelScale,\n minPixelScale: _minPixelScale,\n minSectionHeight: _minSectionHeight,\n collapseSmallUnconformities,\n // TODO: consider unifying scale and hybridScale options\n scale,\n hybridScale,\n });\n\n if (sections.length === 0) {\n return h(\n \"div.column-container.empty\",\n h(NonIdealState, {\n title: \"Empty column\",\n description: \"No sections found in this column.\",\n icon: \"warning-sign\",\n }),\n );\n }\n\n let main: any = h(\n ColumnInner,\n { columnRef: ref, ageAxisComponent, ...rest },\n [\n children,\n h.if(showUnitPopover)(UnitSelectionPopover),\n h.if(keyboardNavigation)(UnitKeyboardNavigation, { units }),\n ],\n );\n\n /* By default, unit selection is disabled. However, if any related props are passed,\n we enable it.\n */\n let _allowUnitSelection = allowUnitSelection ?? false;\n if (showUnitPopover || selectedUnit != null || onUnitSelected != null) {\n _allowUnitSelection = true;\n }\n\n if (_allowUnitSelection) {\n main = h(\n UnitSelectionProvider,\n {\n columnRef: ref,\n onUnitSelected,\n selectedUnit,\n units,\n },\n main,\n );\n }\n\n return h(\n MacrostratColumnDataProvider,\n { units, sections, totalHeight, axisType: _axisType },\n main,\n );\n}\n\ninterface ColumnInnerProps extends BaseColumnProps {\n columnRef: RefObject<HTMLElement>;\n ageAxisComponent?: ComponentType;\n}\n\nfunction ColumnInner(props: ColumnInnerProps) {\n const padding = extractPadding(props);\n\n // TODO: integrate padding vars more closely with the rest of the spacing (right now padding is a bit ad-hoc)\n const paddingVars: any = {\n \"--column-padding-top\": `${padding.paddingTop}px`,\n \"--column-padding-bottom\": `${padding.paddingBottom}px`,\n \"--column-padding-left\": `${padding.paddingLeft}px`,\n \"--column-padding-right\": `${padding.paddingRight}px`,\n };\n\n const {\n unitComponent = UnitComponent,\n unconformityLabels = \"minimal\",\n showLabels = true,\n width: _width = 300,\n columnWidth: _columnWidth = 150,\n showLabelColumn: _showLabelColumn = true,\n className,\n columnRef,\n clipUnits = false,\n children,\n showTimescale,\n timescaleLevels,\n maxInternalColumns,\n onMouseOver,\n ageAxisComponent = CompositeAgeAxis,\n } = props;\n\n const { axisType } = useMacrostratColumnData();\n\n // Coalesce unconformity label setting to a boolean\n let _timescaleUnconformityLabels = false;\n let _sectionUnconformityLabels = false;\n if (unconformityLabels === true || unconformityLabels === \"prominent\") {\n _sectionUnconformityLabels = true;\n } else if (unconformityLabels === \"minimal\") {\n _timescaleUnconformityLabels = true;\n }\n\n let width = _width;\n let columnWidth = _columnWidth;\n if (columnWidth > width) {\n columnWidth = width;\n }\n let showLabelColumn = _showLabelColumn;\n if (columnWidth > width - 10) {\n showLabelColumn = false;\n }\n\n let _showTimescale = showTimescale ?? true;\n if (timescaleLevels != null) {\n _showTimescale = true;\n }\n _showTimescale = axisType == ColumnAxisType.AGE && _showTimescale;\n\n return h(\n ColumnContainer,\n {\n ...useMouseEventHandlers(onMouseOver),\n style: paddingVars,\n className,\n },\n h(\"div.column\", { ref: columnRef }, [\n h(ageAxisComponent),\n h.if(_showTimescale)(CompositeTimescale, {\n levels: timescaleLevels,\n unconformityLabels: _timescaleUnconformityLabels,\n }),\n h(SectionsColumn, {\n unitComponent,\n showLabels,\n width,\n columnWidth,\n showLabelColumn,\n clipUnits,\n unconformityLabels: _sectionUnconformityLabels,\n maxInternalColumns,\n }),\n children,\n ]),\n );\n}\n\ntype ColumnMouseOverHandler = (\n unit: UnitLong | null,\n height: number | null,\n evt: MouseEvent,\n) => void;\n\nfunction useMouseEventHandlers(\n _onMouseOver: ColumnMouseOverHandler | null = null,\n) {\n /** Click event handler */\n\n // Click handler for unit selection\n const dispatch = useUnitSelectionDispatch();\n const onClick = useCallback(\n (evt) => {\n dispatch?.(null, null, evt as any);\n },\n [dispatch],\n );\n\n /** Hover event handlers */\n const scale = useCompositeScale();\n\n const onMouseOver = useCallback(\n (evt) => {\n const height = scale.invert(\n evt.clientY - evt.currentTarget.getBoundingClientRect().top,\n );\n _onMouseOver?.(null, height, evt);\n },\n [scale, _onMouseOver],\n );\n\n const onMouseOut = useCallback(() => {\n _onMouseOver?.(null, null, null);\n }, [_onMouseOver]);\n\n if (_onMouseOver == null) {\n return {\n onClick,\n onMouseOver: undefined,\n onMouseMove: undefined,\n onMouseOut: undefined,\n };\n }\n\n return { onMouseOver, onMouseMove: onMouseOver, onMouseOut, onClick };\n}\n\nexport interface ColumnContainerProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n style?: CSSProperties;\n}\n\nexport function ColumnContainer(props: ColumnContainerProps) {\n const { className, ...rest } = props;\n const darkMode = useDarkMode();\n\n return h(Box, {\n className: classNames(\n className,\n {\n \"dark-mode\": darkMode?.isEnabled ?? false,\n },\n \"column-container\",\n ),\n ...rest,\n });\n}\n\nexport function ColumnBasicInfo({\n data,\n showColumnID = true,\n showReferences = true,\n}) {\n if (data == null) return null;\n return h(\"div.column-info\", [\n h(\"div.column-title-row\", [\n h(\"h2\", data.col_name),\n h.if(showColumnID)(\"h4\", h(Identifier, { id: data.col_id })),\n ]),\n h(DataField, { row: true, label: \"Group\", value: data.col_group }),\n h.if(showReferences)(ReferencesField, {\n refs: data.refs,\n inline: false,\n row: false,\n className: \"column-refs\",\n }),\n ]);\n}\n"],"names":["ColumnAxisType","$6sU8d$ColumnAxisType","hyperStyled","$6sU8d$hyperStyled","extractPadding","$6sU8d$extractPadding","useDarkMode","$6sU8d$useDarkMode","Box","$6sU8d$Box","$6sU8d$classnames","useRef","$6sU8d$useRef","useCallback","$6sU8d$useCallback","NonIdealState","$6sU8d$NonIdealState","DataField","$6sU8d$DataField","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$4721fb147cb3f5e1$exports","$4721fb147cb3f5e1$export$816b5d811295e6bc","$4721fb147cb3f5e1$export$2194471aa3d52446","$4721fb147cb3f5e1$export$fcdf79c491a4504f","$7YHvf","$7tWYE","$wtIgl","$5SO8b","$iYfAq","$2KV3o","$7exMg","$4hG2H","$76iYI","$610tc","$4721fb147cb3f5e1$var$h","a","__esModule","default","props","showUnitPopover","keyboardNavigation","mergeSections","onUnitSelected","selectedUnit","children","units","rawUnits","t_age","b_age","t_pos","b_pos","unconformityHeight","targetUnitHeight","pixelScale","minPixelScale","minSectionHeight","collapseSmallUnconformities","allowUnitSelection","hybridScale","scale","axisType","rest","ref","_targetUnitHeight","_minSectionHeight","_minPixelScale","_axisType","AGE","ageAxisComponent","CompositeAgeAxis","type","HybridScaleType","ApproximateHeight","ApproximateHeightAxis","sections","totalHeight","usePreparedColumnUnits","length","title","description","icon","main","$4721fb147cb3f5e1$var$ColumnInner","columnRef","if","UnitSelectionPopover","UnitKeyboardNavigation","_allowUnitSelection","UnitSelectionProvider","MacrostratColumnDataProvider","padding","paddingVars","paddingTop","paddingBottom","paddingLeft","paddingRight","unitComponent","UnitComponent","unconformityLabels","showLabels","width","_width","columnWidth","_columnWidth","showLabelColumn","_showLabelColumn","className","clipUnits","showTimescale","timescaleLevels","maxInternalColumns","onMouseOver","useMacrostratColumnData","_timescaleUnconformityLabels","_sectionUnconformityLabels","_showTimescale","$4721fb147cb3f5e1$var$useMouseEventHandlers","_onMouseOver","dispatch","useUnitSelectionDispatch","onClick","evt","useCompositeScale","height","invert","clientY","currentTarget","getBoundingClientRect","top","onMouseOut","undefined","onMouseMove","style","CompositeTimescale","levels","SectionsColumn","darkMode","isEnabled","data","showColumnID","showReferences","col_name","Identifier","col_id","row","label","value","col_group","ReferencesField","refs","inline","Column","ColumnContainer","ColumnBasicInfo"],"version":3,"file":"column-views.52cc4dd0.js.map","sourceRoot":"../../../../"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./column-views.38835c99.js";import"./column-views.1261be59.js";import"./column-views.22c2d45b.js";import"./column-views.e1813308.js";import"./column-views.a08b0c9f.js";import{useMemo as e}from"react";import{useMacrostratIntervals as t,Timescale as n,TimescaleOrientation as o}from"@macrostrat/timescale";import{SVG as a,ColumnAxisType as s}from"@macrostrat/column-components";import i from"@macrostrat/hyper";import{Value as l}from"@macrostrat/data-components";var r=globalThis,c={},m={},u=r.parcelRequirea149;null==u&&((u=function(e){if(e in c)return c[e].exports;if(e in m){var t=m[e];delete m[e];var n={id:e,exports:{}};return c[e]=n,t.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){m[e]=t},r.parcelRequirea149=u),u.register;var p=u("4Abge"),d=u("7YHvf"),f=u("lgTAP"),b=u("wtIgl"),h=u("iYfAq");let g=i.styled(d&&d.__esModule?d.default:d);function x(e){let{unconformityLabels:t=!0,unitComponent:n,unitComponentProps:o,showLabels:a=!0,width:s=300,columnWidth:i=150,showLabelColumn:l=!0,clipUnits:r=!0,maxInternalColumns:c}=e,m=(0,b.useMacrostratUnits)(),u=m[0]?.col_id;return g(p.LabelTrackerProvider,{units:m,key:u},[g(C,{width:i,unitComponent:n,unitComponentProps:o,showLabels:a,clipUnits:r,maxInternalColumns:c,unconformityLabels:t}),g.if(l)(p.SectionLabelsColumn,{width:s-i})])}function C(e){let{width:t,showLabels:n,unitComponent:o,unitComponentProps:s,clipUnits:i,maxInternalColumns:l,axisType:r,unconformityLabels:c=!0}=e,{sections:m,totalHeight:u}=(0,b.useMacrostratColumnData)(),p=m.map(e=>e.scaleInfo),d=t-2;return g("div.section-units-container",{style:{width:t}},[g(a,{className:"sections",height:u,innerWidth:d,paddingH:1},m.map(e=>{let{units:t,scaleInfo:a,section_id:r}=e;return g(v,{units:t,scaleInfo:a,key:`section-${r}`,unitComponent:o,unitComponentProps:s,showLabels:n,width:d,clipUnits:i,maxInternalColumns:l})})),g.if(c)(T,{width:t,sections:p,verbose:!1})])}function v(t){let{units:n,scaleInfo:o,unitComponent:a,showLabels:s=!0,width:i=300,unitComponentProps:l,className:r,clipUnits:c=!0,maxInternalColumns:m}=t,{domain:u,pixelScale:d,pixelHeight:b,scale:h}=o,x=e(()=>({...l,nColumns:Math.min(m??Math.floor(i/10),l?.nColumns??1/0,Math.max(...n.map(e=>e.column))+1)}),[n,l,m,i]);return g("g.section",{className:r,style:{"--section-height":`${b}px`,"--section-width":`${i}px`},transform:`translate(0 ${o.offset})`},g(f.MacrostratColumnProvider,{units:n,domain:u,pixelScale:d,scale:h},g(p.CompositeUnitsColumn,{width:i,showLabels:s,unitComponent:a,unitComponentProps:x,clipToFrame:c})))}function w(e){let{sections:t}=(0,b.useMacrostratColumnData)();return g(y,{packages:t.map(e=>e.scaleInfo),...e})}function y(e){let a,{levels:i=3,packages:l,unconformityLabels:r=!1}=e,c=t((0,f.useMacrostratBaseURL)()),m=(a="number"==typeof i?[2,Math.max(2+Math.min(i,5)-1,1)]:i)[1]-a[0]+1;return g("div.timescale-column",[g("div.timescales",l.map(e=>{let{pixelHeight:t,paddingTop:s,key:i,scale:l}=e;return g("div.timescale-container",{style:{paddingTop:s,"--timescale-level-count":m},key:i},[g(n,{orientation:o.VERTICAL,length:t,levels:a,absoluteAgeScale:!0,showAgeAxis:!1,scale:l,intervals:c})])})),g.if(r)(T,{width:"100%",sections:l,className:"unconformity-labels",axisType:s.AGE})])}function T(e){let{width:t,sections:n,className:o,axisType:a,verbose:s}=e;return g("div.unconformity-labels",{style:{width:t},className:o},n.map((e,o)=>{let i=n[o-1],l=e.offset-e.paddingTop;return g(A,{axisType:a,upperAge:i?.domain[0],lowerAge:e.domain[1],style:{width:t,height:e.paddingTop,top:l},verbose:s})}))}function A({upperAge:e,lowerAge:t,style:n,axisType:o,verbose:a=!1}){let i;if(null==e||null==t)return null;let r=Math.abs(e-t),c=0,m=null;r>1e3?m="giga":r>100?m="mega":r>10?m="large":r<1?(m="small",c=2):c=1,i=o===s.DEPTH||o===s.HEIGHT?g(l,{value:r.toLocaleString("en-US",{maximumFractionDigits:c}),unit:"m"}):g(h.Duration,{value:r,maximumFractionDigits:c});let u=null;return a&&(u=g([" ",g("span.prefix"," gap")])),g("div.unconformity",{style:n,className:m},[g("div.unconformity-inner",g("div.unconformity-text",[i,u]))])}export{x as SectionsColumn,T as UnconformityLabels,w as CompositeTimescale,y as CompositeTimescaleCore};
|
|
2
|
+
//# sourceMappingURL=column-views.60b5663d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"A,M,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,A,Q,W,C,K,O,A,Q,0B,C,C,a,C,C,wB,C,K,uB,A,Q,O,C,C,kB,C,K,+B,A,Q,M,mB,A,Q,S,C,K,6B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,E,S,E,E,S,E,E,S,E,E,SCwBA,IAAM,EAAI,AAAA,EAAM,MAAM,C,AAAC,G,AAAA,E,U,C,AAAA,E,O,CAAA,GAyBhB,SAAS,EAAe,CAAyB,EACtD,GAAM,CAAA,mBACJ,EAAqB,CAAA,CAAA,CAAA,cACrB,CAAa,CAAA,mBACb,CAAkB,CAAA,WAClB,EAAa,CAAA,CAAA,CAAA,MACb,EAAQ,GAAA,CAAA,YACR,EAAc,GAAA,CAAA,gBACd,EAAkB,CAAA,CAAA,CAAA,UAClB,EAAY,CAAA,CAAA,CAAA,mBACZ,CAA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EAAU,UAAU,CAGnD,OAAO,EAAE,EAAc,CACrB,SAAA,EACA,SAJe,GAAW,MAAM,CAAC,EAAE,CAKnC,SAJe,EAAU,MAAM,CAAC,EAAE,CAKlC,MAAO,CACL,MAAA,EACA,OAAQ,EAAU,UAAU,CAC5B,IAAA,CACF,EACA,QAAA,CACF,EACF,GAEJ,CAEA,SAAS,EAAa,CAAA,SACpB,CAAQ,CAAA,SACR,CAAQ,CAAA,MACR,CAAK,CAAA,SACL,CAAQ,CAAA,QACR,EAAU,CAAA,CAAA,CACX,MAuBK,EAtBJ,GAAI,AAAY,MAAZ,GAAoB,AAAY,MAAZ,EACtB,OAAO,KAGT,IAAM,EAAS,KAAK,GAAG,CAAC,EAAW,GAE/B,EAAwB,EAExB,EAAoB,IACpB,CAAA,EAAS,IACX,EAAY,OACH,EAAS,IAClB,EAAY,OACH,EAAS,GAClB,EAAY,QACH,EAAS,GAClB,EAAY,QACZ,EAAwB,GAExB,EAAwB,EAMxB,EAFE,IAAa,AAAA,EAAe,KAAK,EAAI,IAAa,AAAA,EAAe,MAAM,CAEnE,EAAE,EAAO,CAAE,MADJ,EAAO,cAAc,CAAC,QAAS,CAAE,sBAAA,CAAsB,GACtC,KAAM,GAAI,GAElC,EAAE,EAAA,QAAO,CAAG,CAAE,MAAO,EAAQ,sBAAA,CAAsB,GAG3D,IAAI,EAAoB,KAKxB,OAJI,GACF,CAAA,EAAS,EAAE,CAAC,IAAK,EAAE,cAAe,QAAQ,CAAA,EAGrC,EAAE,mBAAoB,CAAE,MAAA,EAAO,UAAA,CAAU,EAAG,CACjD,EAAE,yBAA0B,EAAE,wBAAyB,CAAC,EAAK,EAAO,GACrE,CACH,Q,K,c,C,K,kB,C,K,kB,C,K,sB","sources":["<anon>","packages/column-views/src/section.ts"],"sourcesContent":["import \"./column-views.38835c99.js\";\nimport \"./column-views.1261be59.js\";\nimport \"./column-views.22c2d45b.js\";\nimport \"./column-views.e1813308.js\";\nimport \"./column-views.a08b0c9f.js\";\nimport {useMemo as $dA1GT$useMemo} from \"react\";\nimport {useMacrostratIntervals as $dA1GT$useMacrostratIntervals, Timescale as $dA1GT$Timescale, TimescaleOrientation as $dA1GT$TimescaleOrientation} from \"@macrostrat/timescale\";\nimport {SVG as $dA1GT$SVG, ColumnAxisType as $dA1GT$ColumnAxisType} from \"@macrostrat/column-components\";\nimport $dA1GT$macrostrathyper from \"@macrostrat/hyper\";\nimport {Value as $dA1GT$Value} from \"@macrostrat/data-components\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $4Abge = parcelRequire(\"4Abge\");\n\n\n\n\n\nvar $7YHvf = parcelRequire(\"7YHvf\");\n\nvar $lgTAP = parcelRequire(\"lgTAP\");\nvar $wtIgl = parcelRequire(\"wtIgl\");\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\n\nconst $69e10b1ec4ac73f6$var$h = (0, $dA1GT$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($7YHvf))));\nfunction $69e10b1ec4ac73f6$export$38cb0ab5af8f50d7(props) {\n const { unconformityLabels: unconformityLabels = true, unitComponent: unitComponent, unitComponentProps: unitComponentProps, showLabels: showLabels = true, width: width = 300, columnWidth: columnWidth = 150, showLabelColumn: showLabelColumn = true, clipUnits: clipUnits = true, maxInternalColumns: maxInternalColumns } = props;\n const units = (0, $wtIgl.useMacrostratUnits)();\n // Get a unique key for the column\n const key = units[0]?.col_id;\n return $69e10b1ec4ac73f6$var$h((0, $4Abge.LabelTrackerProvider), {\n units: units,\n key: key\n }, [\n $69e10b1ec4ac73f6$var$h($69e10b1ec4ac73f6$var$SectionUnitsColumn, {\n width: columnWidth,\n unitComponent: unitComponent,\n unitComponentProps: unitComponentProps,\n showLabels: showLabels,\n clipUnits: clipUnits,\n maxInternalColumns: maxInternalColumns,\n unconformityLabels: unconformityLabels\n }),\n $69e10b1ec4ac73f6$var$h.if(showLabelColumn)((0, $4Abge.SectionLabelsColumn), {\n width: width - columnWidth\n })\n ]);\n}\nfunction $69e10b1ec4ac73f6$var$SectionUnitsColumn(props) {\n const { width: width, showLabels: showLabels, unitComponent: unitComponent, unitComponentProps: unitComponentProps, clipUnits: clipUnits, maxInternalColumns: maxInternalColumns, axisType: axisType, unconformityLabels: unconformityLabels = true } = props;\n const { sections: sections, totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const scaleData = sections.map((section)=>{\n return section.scaleInfo;\n });\n const innerWidth = width - 2;\n return $69e10b1ec4ac73f6$var$h(\"div.section-units-container\", {\n style: {\n width: width\n }\n }, [\n $69e10b1ec4ac73f6$var$h((0, $dA1GT$SVG), {\n className: \"sections\",\n height: totalHeight,\n innerWidth: innerWidth,\n paddingH: 1\n }, sections.map((group)=>{\n const { units: units, scaleInfo: scaleInfo, section_id: section_id } = group;\n const key = `section-${section_id}`;\n return $69e10b1ec4ac73f6$var$h($69e10b1ec4ac73f6$var$SectionUnits, {\n units: units,\n scaleInfo: scaleInfo,\n key: key,\n unitComponent: unitComponent,\n unitComponentProps: unitComponentProps,\n showLabels: showLabels,\n width: innerWidth,\n clipUnits: clipUnits,\n maxInternalColumns: maxInternalColumns\n });\n })),\n $69e10b1ec4ac73f6$var$h.if(unconformityLabels)($69e10b1ec4ac73f6$export$e12e53eeee198b99, {\n width: width,\n sections: scaleData,\n verbose: false\n })\n ]);\n}\nfunction $69e10b1ec4ac73f6$var$SectionUnits(props) {\n // Section with \"squishy\" timescale\n const { units: units, scaleInfo: scaleInfo, unitComponent: unitComponent, showLabels: showLabels = true, width: width = 300, unitComponentProps: unitComponentProps, className: className, clipUnits: clipUnits = true, maxInternalColumns: maxInternalColumns } = props;\n const { domain: domain, pixelScale: pixelScale, pixelHeight: pixelHeight, scale: scale } = scaleInfo;\n /** Ensure that we can arrange units into the maximum number\n * of columns defined by unitComponentProps, but that we don't\n * use more than necessary.\n */ const _unitComponentProps = (0, $dA1GT$useMemo)(()=>{\n return {\n ...unitComponentProps,\n nColumns: Math.min(maxInternalColumns ?? Math.floor(width / 10), unitComponentProps?.nColumns ?? Infinity, Math.max(...units.map((d)=>d.column)) + 1)\n };\n }, [\n units,\n unitComponentProps,\n maxInternalColumns,\n width\n ]);\n const style = {\n \"--section-height\": `${pixelHeight}px`,\n \"--section-width\": `${width}px`\n };\n return $69e10b1ec4ac73f6$var$h(\"g.section\", {\n className: className,\n style: style,\n transform: `translate(0 ${scaleInfo.offset})`\n }, $69e10b1ec4ac73f6$var$h((0, $lgTAP.MacrostratColumnProvider), {\n units: units,\n domain: domain,\n pixelScale: pixelScale,\n scale: scale\n }, $69e10b1ec4ac73f6$var$h((0, $4Abge.CompositeUnitsColumn), {\n width: width,\n showLabels: showLabels,\n unitComponent: unitComponent,\n unitComponentProps: _unitComponentProps,\n clipToFrame: clipUnits\n })));\n}\nfunction $69e10b1ec4ac73f6$export$db2df5a73a6fbe10(props) {\n const { sections: sections } = (0, $wtIgl.useMacrostratColumnData)();\n const sectionScales = sections.map((section)=>{\n return section.scaleInfo;\n });\n return $69e10b1ec4ac73f6$var$h($69e10b1ec4ac73f6$export$463f46772c64d403, {\n packages: sectionScales,\n ...props\n });\n}\nfunction $69e10b1ec4ac73f6$export$463f46772c64d403(props) {\n const { levels: levels = 3, packages: packages, unconformityLabels: unconformityLabels = false } = props;\n // Use intervals from Macrostrat API\n const baseURL = (0, $lgTAP.useMacrostratBaseURL)();\n const intervals = (0, $dA1GT$useMacrostratIntervals)(baseURL);\n let _levels;\n if (typeof levels === \"number\") // If levels is a number, use the most common starting level\n _levels = [\n 2,\n Math.max(2 + Math.min(levels, 5) - 1, 1)\n ];\n else _levels = levels;\n const nCols = _levels[1] - _levels[0] + 1;\n return $69e10b1ec4ac73f6$var$h(\"div.timescale-column\", [\n $69e10b1ec4ac73f6$var$h(\"div.timescales\", packages.map((group)=>{\n const { pixelHeight: pixelHeight, paddingTop: paddingTop, key: key, scale: scale } = group;\n return $69e10b1ec4ac73f6$var$h(\"div.timescale-container\", {\n style: {\n paddingTop: paddingTop,\n \"--timescale-level-count\": nCols\n },\n key: key\n }, [\n $69e10b1ec4ac73f6$var$h((0, $dA1GT$Timescale), {\n orientation: (0, $dA1GT$TimescaleOrientation).VERTICAL,\n length: pixelHeight,\n levels: _levels,\n absoluteAgeScale: true,\n showAgeAxis: false,\n scale: scale,\n intervals: intervals\n })\n ]);\n })),\n $69e10b1ec4ac73f6$var$h.if(unconformityLabels)($69e10b1ec4ac73f6$export$e12e53eeee198b99, {\n width: \"100%\",\n sections: packages,\n className: \"unconformity-labels\",\n axisType: (0, $dA1GT$ColumnAxisType).AGE\n })\n ]);\n}\nfunction $69e10b1ec4ac73f6$export$e12e53eeee198b99(props) {\n const { width: width, sections: sections, className: className, axisType: axisType, verbose: verbose } = props;\n return $69e10b1ec4ac73f6$var$h(\"div.unconformity-labels\", {\n style: {\n width: width\n },\n className: className\n }, sections.map((scaleInfo, i)=>{\n const lastGroup = sections[i - 1];\n const top = scaleInfo.offset - scaleInfo.paddingTop;\n const upperAge = lastGroup?.domain[0];\n const lowerAge = scaleInfo.domain[1];\n return $69e10b1ec4ac73f6$var$h($69e10b1ec4ac73f6$var$Unconformity, {\n axisType: axisType,\n upperAge: upperAge,\n lowerAge: lowerAge,\n style: {\n width: width,\n height: scaleInfo.paddingTop,\n top: top\n },\n verbose: verbose\n });\n }));\n}\nfunction $69e10b1ec4ac73f6$var$Unconformity({ upperAge: upperAge, lowerAge: lowerAge, style: style, axisType: axisType, verbose: verbose = false }) {\n if (upperAge == null || lowerAge == null) return null;\n const ageGap = Math.abs(upperAge - lowerAge);\n let maximumFractionDigits = 0;\n let className = null;\n if (ageGap > 1000) className = \"giga\";\n else if (ageGap > 100) className = \"mega\";\n else if (ageGap > 10) className = \"large\";\n else if (ageGap < 1) {\n className = \"small\";\n maximumFractionDigits = 2;\n } else maximumFractionDigits = 1;\n let val;\n if (axisType === (0, $dA1GT$ColumnAxisType).DEPTH || axisType === (0, $dA1GT$ColumnAxisType).HEIGHT) {\n const _txt = ageGap.toLocaleString(\"en-US\", {\n maximumFractionDigits: maximumFractionDigits\n });\n val = $69e10b1ec4ac73f6$var$h((0, $dA1GT$Value), {\n value: _txt,\n unit: \"m\"\n });\n } else val = $69e10b1ec4ac73f6$var$h((0, $iYfAq.Duration), {\n value: ageGap,\n maximumFractionDigits: maximumFractionDigits\n });\n let prefix = null;\n if (verbose) prefix = $69e10b1ec4ac73f6$var$h([\n \" \",\n $69e10b1ec4ac73f6$var$h(\"span.prefix\", \" gap\")\n ]);\n return $69e10b1ec4ac73f6$var$h(\"div.unconformity\", {\n style: style,\n className: className\n }, [\n $69e10b1ec4ac73f6$var$h(\"div.unconformity-inner\", $69e10b1ec4ac73f6$var$h(\"div.unconformity-text\", [\n val,\n prefix\n ]))\n ]);\n}\n\n\nexport {$69e10b1ec4ac73f6$export$38cb0ab5af8f50d7 as SectionsColumn, $69e10b1ec4ac73f6$export$e12e53eeee198b99 as UnconformityLabels, $69e10b1ec4ac73f6$export$db2df5a73a6fbe10 as CompositeTimescale, $69e10b1ec4ac73f6$export$463f46772c64d403 as CompositeTimescaleCore};\n//# sourceMappingURL=column-views.60b5663d.js.map\n","import {\n CompositeUnitsColumn,\n LabelTrackerProvider,\n SectionLabelsColumn,\n} from \"./units\";\nimport { ReactNode, FunctionComponent, useMemo } from \"react\";\nimport {\n Timescale,\n TimescaleOrientation,\n useMacrostratIntervals,\n} from \"@macrostrat/timescale\";\nimport { ColumnAxisType, SVG } from \"@macrostrat/column-components\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./column.module.sass\";\nimport {\n useMacrostratColumnData,\n useMacrostratUnits,\n MacrostratColumnProvider,\n useMacrostratBaseURL,\n} from \"./data-provider\";\nimport { Duration } from \"./unit-details\";\nimport { Value } from \"@macrostrat/data-components\";\nimport type { ExtUnit, PackageScaleLayoutData } from \"./prepare-units/types\";\n\nconst h = hyper.styled(styles);\n\nexport interface SectionSharedProps {\n unitComponent?: FunctionComponent<any>;\n unitComponentProps?: any;\n showLabels?: boolean;\n width?: number;\n columnWidth?: number;\n children?: ReactNode;\n showLabelColumn?: boolean;\n axisType?: ColumnAxisType;\n className?: string;\n clipUnits?: boolean;\n maxInternalColumns?: number;\n // Space between sections\n verticalSpacing?: number;\n // Whether to render unconformity labels\n unconformityLabels?: boolean;\n}\n\nexport interface SectionProps extends SectionSharedProps {\n units: ExtUnit[];\n scaleInfo: PackageScaleLayoutData;\n}\n\nexport function SectionsColumn(props: SectionSharedProps) {\n const {\n unconformityLabels = true,\n unitComponent,\n unitComponentProps,\n showLabels = true,\n width = 300,\n columnWidth = 150,\n showLabelColumn = true,\n clipUnits = true,\n maxInternalColumns,\n } = props;\n\n const units = useMacrostratUnits();\n\n // Get a unique key for the column\n const key = units[0]?.col_id;\n\n return h(LabelTrackerProvider, { units, key }, [\n h(SectionUnitsColumn, {\n width: columnWidth,\n unitComponent,\n unitComponentProps,\n showLabels,\n clipUnits,\n maxInternalColumns,\n unconformityLabels,\n }),\n h.if(showLabelColumn)(SectionLabelsColumn, {\n width: width - columnWidth,\n }),\n ]);\n}\n\nfunction SectionUnitsColumn(props: SectionSharedProps) {\n const {\n width,\n showLabels,\n unitComponent,\n unitComponentProps,\n clipUnits,\n maxInternalColumns,\n axisType,\n unconformityLabels = true,\n } = props;\n\n const { sections, totalHeight } = useMacrostratColumnData();\n\n const scaleData: PackageScaleLayoutData[] = sections.map((section) => {\n return section.scaleInfo;\n });\n\n const innerWidth = width - 2;\n\n return h(\"div.section-units-container\", { style: { width } }, [\n h(\n SVG,\n {\n className: \"sections\",\n height: totalHeight,\n innerWidth,\n paddingH: 1,\n },\n sections.map((group) => {\n const { units, scaleInfo, section_id } = group;\n\n const key = `section-${section_id}`;\n return h(\n SectionUnits,\n {\n units,\n scaleInfo,\n key,\n unitComponent,\n unitComponentProps,\n showLabels,\n width: innerWidth,\n clipUnits,\n maxInternalColumns,\n }, // This unconformity is with the section _above_\n );\n }),\n ),\n h.if(unconformityLabels)(UnconformityLabels, {\n width,\n sections: scaleData,\n verbose: false,\n }),\n ]);\n}\n\nfunction SectionUnits(props: SectionProps) {\n // Section with \"squishy\" timescale\n const {\n units,\n scaleInfo,\n unitComponent,\n showLabels = true,\n width = 300,\n unitComponentProps,\n className,\n clipUnits = true,\n maxInternalColumns,\n } = props;\n\n const { domain, pixelScale, pixelHeight, scale } = scaleInfo;\n\n /** Ensure that we can arrange units into the maximum number\n * of columns defined by unitComponentProps, but that we don't\n * use more than necessary.\n */\n const _unitComponentProps = useMemo(() => {\n return {\n ...unitComponentProps,\n nColumns: Math.min(\n maxInternalColumns ?? Math.floor(width / 10),\n unitComponentProps?.nColumns ?? Infinity,\n Math.max(...units.map((d) => d.column)) + 1,\n ),\n //axisType,\n };\n }, [units, unitComponentProps, maxInternalColumns, width]);\n\n const style = {\n \"--section-height\": `${pixelHeight}px`,\n \"--section-width\": `${width}px`,\n };\n\n return h(\n \"g.section\",\n { className, style, transform: `translate(0 ${scaleInfo.offset})` },\n h(\n MacrostratColumnProvider,\n {\n units,\n domain,\n pixelScale, // Actually pixels per myr,\n scale,\n },\n h(CompositeUnitsColumn, {\n width,\n showLabels,\n unitComponent,\n unitComponentProps: _unitComponentProps,\n clipToFrame: clipUnits,\n }),\n ),\n );\n}\n\ninterface CompositeTimescaleProps {\n levels?: [number, number] | number;\n unconformityLabels?: boolean;\n}\n\nexport function CompositeTimescale(props: CompositeTimescaleProps) {\n const { sections } = useMacrostratColumnData();\n const sectionScales = sections.map((section) => {\n return section.scaleInfo;\n });\n\n return h(CompositeTimescaleCore, {\n packages: sectionScales,\n ...props,\n });\n}\n\ntype CompositeTimescaleCoreProps = CompositeTimescaleProps & {\n packages: PackageScaleLayoutData[];\n};\n\nexport function CompositeTimescaleCore(props: CompositeTimescaleCoreProps) {\n const { levels = 3, packages, unconformityLabels = false } = props;\n\n // Use intervals from Macrostrat API\n const baseURL = useMacrostratBaseURL();\n const intervals = useMacrostratIntervals(baseURL);\n\n let _levels: [number, number];\n if (typeof levels === \"number\") {\n // If levels is a number, use the most common starting level\n _levels = [2, Math.max(2 + Math.min(levels, 5) - 1, 1)];\n } else {\n _levels = levels;\n }\n\n const nCols = _levels[1] - _levels[0] + 1;\n\n return h(\"div.timescale-column\", [\n h(\n \"div.timescales\",\n packages.map((group) => {\n const { pixelHeight, paddingTop, key, scale } = group;\n return h(\n \"div.timescale-container\",\n { style: { paddingTop, \"--timescale-level-count\": nCols }, key },\n [\n h(Timescale, {\n orientation: TimescaleOrientation.VERTICAL,\n length: pixelHeight,\n levels: _levels,\n absoluteAgeScale: true,\n showAgeAxis: false,\n scale,\n intervals,\n }),\n ],\n );\n }),\n ),\n h.if(unconformityLabels)(UnconformityLabels, {\n width: \"100%\",\n sections: packages,\n className: \"unconformity-labels\",\n axisType: ColumnAxisType.AGE,\n }),\n ]);\n}\n\nexport function UnconformityLabels(props: {\n width: string | number;\n sections: PackageScaleLayoutData[];\n axisType?: ColumnAxisType;\n className?: string;\n verbose?: boolean;\n}) {\n const { width, sections, className, axisType, verbose } = props;\n\n return h(\n \"div.unconformity-labels\",\n {\n style: {\n width,\n },\n className,\n },\n sections.map((scaleInfo, i) => {\n const lastGroup = sections[i - 1];\n const top = scaleInfo.offset - scaleInfo.paddingTop;\n const upperAge = lastGroup?.domain[0];\n const lowerAge = scaleInfo.domain[1];\n return h(Unconformity, {\n axisType,\n upperAge,\n lowerAge,\n style: {\n width,\n height: scaleInfo.paddingTop,\n top,\n },\n verbose,\n });\n }),\n );\n}\n\nfunction Unconformity({\n upperAge,\n lowerAge,\n style,\n axisType,\n verbose = false,\n}) {\n if (upperAge == null || lowerAge == null) {\n return null;\n }\n\n const ageGap = Math.abs(upperAge - lowerAge);\n\n let maximumFractionDigits = 0;\n\n let className: string = null;\n if (ageGap > 1000) {\n className = \"giga\";\n } else if (ageGap > 100) {\n className = \"mega\";\n } else if (ageGap > 10) {\n className = \"large\";\n } else if (ageGap < 1) {\n className = \"small\";\n maximumFractionDigits = 2;\n } else {\n maximumFractionDigits = 1;\n }\n\n let val: ReactNode;\n if (axisType === ColumnAxisType.DEPTH || axisType === ColumnAxisType.HEIGHT) {\n const _txt = ageGap.toLocaleString(\"en-US\", { maximumFractionDigits });\n val = h(Value, { value: _txt, unit: \"m\" });\n } else {\n val = h(Duration, { value: ageGap, maximumFractionDigits });\n }\n\n let prefix: ReactNode = null;\n if (verbose) {\n prefix = h([\" \", h(\"span.prefix\", \" gap\")]);\n }\n\n return h(\"div.unconformity\", { style, className }, [\n h(\"div.unconformity-inner\", h(\"div.unconformity-text\", [val, prefix])),\n ]);\n}\n"],"names":["useMemo","$dA1GT$useMemo","useMacrostratIntervals","$dA1GT$useMacrostratIntervals","Timescale","$dA1GT$Timescale","TimescaleOrientation","$dA1GT$TimescaleOrientation","SVG","$dA1GT$SVG","ColumnAxisType","$dA1GT$ColumnAxisType","$dA1GT$macrostrathyper","Value","$dA1GT$Value","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$4Abge","$7YHvf","$lgTAP","$wtIgl","$iYfAq","$69e10b1ec4ac73f6$var$h","styled","a","__esModule","default","$69e10b1ec4ac73f6$export$38cb0ab5af8f50d7","props","unconformityLabels","unitComponent","unitComponentProps","showLabels","width","columnWidth","showLabelColumn","clipUnits","maxInternalColumns","units","useMacrostratUnits","key","col_id","LabelTrackerProvider","$69e10b1ec4ac73f6$var$SectionUnitsColumn","if","SectionLabelsColumn","axisType","sections","totalHeight","useMacrostratColumnData","scaleData","map","section","scaleInfo","innerWidth","style","className","height","paddingH","group","section_id","$69e10b1ec4ac73f6$var$SectionUnits","$69e10b1ec4ac73f6$export$e12e53eeee198b99","verbose","domain","pixelScale","pixelHeight","scale","_unitComponentProps","nColumns","Math","min","floor","Infinity","max","d","column","transform","offset","MacrostratColumnProvider","CompositeUnitsColumn","clipToFrame","$69e10b1ec4ac73f6$export$db2df5a73a6fbe10","$69e10b1ec4ac73f6$export$463f46772c64d403","packages","_levels","levels","intervals","useMacrostratBaseURL","nCols","paddingTop","orientation","VERTICAL","length","absoluteAgeScale","showAgeAxis","AGE","i","lastGroup","top","$69e10b1ec4ac73f6$var$Unconformity","upperAge","lowerAge","val","ageGap","abs","maximumFractionDigits","DEPTH","HEIGHT","value","toLocaleString","unit","Duration","prefix","SectionsColumn","UnconformityLabels","CompositeTimescale","CompositeTimescaleCore"],"version":3,"file":"column-views.60b5663d.js.map","sourceRoot":"../../../../"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./column-views.
|
|
2
|
-
//# sourceMappingURL=column-views.
|
|
1
|
+
import"./column-views.1ac9e2ed.js";import"./column-views.ae54d3e1.js";import"./column-views.8c00beb4.js";function e(e,a){return Object.keys(a).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return a[r]}})}),e}var a=globalThis,r={},o={},t=a.parcelRequirea149;null==t&&((t=function(e){if(e in r)return r[e].exports;if(e in o){var a=o[e];delete o[e];var t={id:e,exports:{}};return r[e]=t,a.call(t.exports,t,t.exports),t.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,a){o[e]=a},a.parcelRequirea149=t),t.register;var c={},n=t("34Mx7"),f=t("dYjy7"),$=t("6Tim5");e(c,n),e(c,f),e(c,$);export{$44d1d5e5d8e823d1$export$821baedf611249f3 as ColumnNavigationMap,$5a7fd801cb316afa$export$c4313db718750a5a as ResizableMapFrame,$5a7fd801cb316afa$export$9595c40c7a4c4f7b as ColumnNavigationSVGMap,$372e0c9189556f66$export$2254347cd20e6080 as MeasurementsLayer,$372e0c9189556f66$export$f177ff57c101017a as ColumnFeatures,$372e0c9189556f66$export$8c41dd563753848 as ColumnKeyboardNavigation,$372e0c9189556f66$export$f02cc02ad0e0bba3 as Columns,$372e0c9189556f66$export$4d8f6e6df85d9012 as ColumnCenters,$372e0c9189556f66$export$b9d912252344e099 as CurrentColumn,$2e0f3abda6f981c3$export$8e7d97509e84cc49 as ColumnCorrelationMap,$c36af3ba15da093b$export$72ffe141ebf87ef1 as ColumnCorrelationProvider,$c36af3ba15da093b$export$21398703d3a9bb4d as useCorrelationMapStore,$ec03b0c93e1da04f$export$1e8149fc0d15fed0 as InsetMap,$25e107971dfb4328$export$d2995719c3a4ae17 as buildColumnsStyle};
|
|
2
|
+
//# sourceMappingURL=column-views.61dc64bc.js.map
|