@macrostrat/column-views 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/age-axis.cjs +2 -2
  3. package/dist/age-axis.cjs.map +1 -1
  4. package/dist/age-axis.js +1 -1
  5. package/dist/column-views.css +130 -125
  6. package/dist/index.cjs +30 -19
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +16 -5
  9. package/dist/index.js.map +1 -1
  10. package/dist/maps/column-correlation/core.cjs +10 -30
  11. package/dist/maps/column-correlation/core.cjs.map +1 -1
  12. package/dist/maps/column-correlation/core.d.ts +1 -1
  13. package/dist/maps/column-correlation/core.js +10 -30
  14. package/dist/maps/column-correlation/core.js.map +1 -1
  15. package/dist/maps/column-navigation/mapbox/index.cjs +156 -118
  16. package/dist/maps/column-navigation/mapbox/index.cjs.map +1 -1
  17. package/dist/maps/column-navigation/mapbox/index.d.ts +23 -2
  18. package/dist/maps/column-navigation/mapbox/index.js +158 -120
  19. package/dist/maps/column-navigation/mapbox/index.js.map +1 -1
  20. package/dist/maps/column-navigation/mapbox/keyboard-navigation.cjs +7 -1
  21. package/dist/maps/column-navigation/mapbox/keyboard-navigation.cjs.map +1 -1
  22. package/dist/maps/column-navigation/mapbox/keyboard-navigation.d.ts +3 -26
  23. package/dist/maps/column-navigation/mapbox/keyboard-navigation.js +9 -3
  24. package/dist/maps/column-navigation/mapbox/keyboard-navigation.js.map +1 -1
  25. package/dist/maps/index.d.ts +2 -2
  26. package/dist/maps/{_shared/inset-map.cjs → inset-map/index.cjs} +1 -1
  27. package/dist/maps/inset-map/index.cjs.map +1 -0
  28. package/dist/maps/{_shared/inset-map.js → inset-map/index.js} +1 -1
  29. package/dist/maps/inset-map/index.js.map +1 -0
  30. package/dist/maps/layers/columns.cjs +161 -0
  31. package/dist/maps/layers/columns.cjs.map +1 -0
  32. package/dist/maps/layers/columns.d.ts +28 -0
  33. package/dist/maps/layers/columns.js +161 -0
  34. package/dist/maps/layers/columns.js.map +1 -0
  35. package/dist/maps/layers/index.d.ts +2 -0
  36. package/dist/maps/{units-overlay/index.cjs → layers/units.cjs} +41 -88
  37. package/dist/maps/layers/units.cjs.map +1 -0
  38. package/dist/maps/{units-overlay/index.d.ts → layers/units.d.ts} +1 -1
  39. package/dist/maps/{units-overlay/index.js → layers/units.js} +34 -82
  40. package/dist/maps/layers/units.js.map +1 -0
  41. package/dist/section.cjs +2 -2
  42. package/dist/section.cjs.map +1 -1
  43. package/dist/section.js +1 -1
  44. package/dist/unit-details/age-range.cjs +196 -0
  45. package/dist/unit-details/age-range.cjs.map +1 -0
  46. package/dist/unit-details/age-range.d.ts +70 -0
  47. package/dist/unit-details/age-range.js +194 -0
  48. package/dist/unit-details/age-range.js.map +1 -0
  49. package/dist/unit-details/age-range.module.sass.cjs +16 -0
  50. package/dist/unit-details/age-range.module.sass.cjs.map +1 -0
  51. package/dist/unit-details/age-range.module.sass.js +14 -0
  52. package/dist/unit-details/age-range.module.sass.js.map +1 -0
  53. package/dist/unit-details/index.d.ts +1 -0
  54. package/dist/unit-details/panel.cjs +8 -173
  55. package/dist/unit-details/panel.cjs.map +1 -1
  56. package/dist/unit-details/panel.js +3 -168
  57. package/dist/unit-details/panel.js.map +1 -1
  58. package/dist/unit-details/panel.module.sass.cjs +20 -22
  59. package/dist/unit-details/panel.module.sass.cjs.map +1 -1
  60. package/dist/unit-details/panel.module.sass.js +20 -22
  61. package/dist/unit-details/panel.module.sass.js.map +1 -1
  62. package/dist/unit-details/utils.cjs +31 -0
  63. package/dist/unit-details/utils.cjs.map +1 -0
  64. package/dist/unit-details/utils.d.ts +3 -0
  65. package/dist/unit-details/utils.js +31 -0
  66. package/dist/unit-details/utils.js.map +1 -0
  67. package/package.json +4 -4
  68. package/src/maps/column-correlation/core.ts +9 -29
  69. package/src/maps/column-navigation/mapbox/index.ts +191 -138
  70. package/src/maps/column-navigation/mapbox/keyboard-navigation.ts +17 -3
  71. package/src/maps/index.ts +2 -2
  72. package/src/maps/layers/columns.ts +210 -0
  73. package/src/maps/layers/index.ts +2 -0
  74. package/src/maps/{units-overlay/index.ts → layers/units.ts} +34 -84
  75. package/src/maps/unit-map.stories.ts +27 -12
  76. package/src/unit-details/age-range.module.sass +15 -0
  77. package/src/unit-details/age-range.ts +269 -0
  78. package/src/unit-details/index.ts +1 -0
  79. package/src/unit-details/panel.module.sass +0 -9
  80. package/src/unit-details/panel.ts +12 -226
  81. package/src/unit-details/utils.ts +33 -0
  82. package/dist/maps/_shared/index.d.ts +0 -2
  83. package/dist/maps/_shared/inset-map.cjs.map +0 -1
  84. package/dist/maps/_shared/inset-map.js.map +0 -1
  85. package/dist/maps/_shared/styles.cjs +0 -73
  86. package/dist/maps/_shared/styles.cjs.map +0 -1
  87. package/dist/maps/_shared/styles.d.ts +0 -2
  88. package/dist/maps/_shared/styles.js +0 -73
  89. package/dist/maps/_shared/styles.js.map +0 -1
  90. package/dist/maps/units-overlay/index.cjs.map +0 -1
  91. package/dist/maps/units-overlay/index.js.map +0 -1
  92. package/src/maps/_shared/index.ts +0 -2
  93. package/src/maps/_shared/styles.ts +0 -76
  94. /package/dist/maps/{_shared/inset-map.d.ts → inset-map/index.d.ts} +0 -0
  95. /package/src/maps/{_shared/inset-map.ts → inset-map/index.ts} +0 -0
  96. /package/src/maps/{_shared → inset-map}/inset-map.stories.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format
4
4
  is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.3.0] - 2026-02-13
8
+
9
+ - Greatly streamline handling of `InsetMap`, column and unit overlay layers
10
+ - Improve design of age range tags
11
+
12
+ ## [3.2.2] - 2026-02-09
13
+
14
+ - Move `AgeField` and `AgeRange` to separate exports
15
+ - Improve handling of interval ranges
16
+
7
17
  ## [3.2.1] - 2026-02-08
8
18
 
9
19
  - Export `ThicknessField` for unit details panels
package/dist/age-axis.cjs CHANGED
@@ -5,7 +5,7 @@ const columnComponents = require("@macrostrat/column-components");
5
5
  require("react");
6
6
  const ageAxis_module = require("./age-axis.module.sass.cjs");
7
7
  const dataComponents = require("@macrostrat/data-components");
8
- const panel = require("./unit-details/panel.cjs");
8
+ const ageRange = require("./unit-details/age-range.cjs");
9
9
  const store = require("./data-provider/store.cjs");
10
10
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
11
  const h__default = /* @__PURE__ */ _interopDefault(h$1);
@@ -114,7 +114,7 @@ function AgeCursor({ age }) {
114
114
  top: heightPx
115
115
  }
116
116
  },
117
- [h("div.line"), h(panel.AgeLabel, { age, className: "label" })]
117
+ [h("div.line"), h(ageRange.AgeLabel, { age, className: "label" })]
118
118
  );
119
119
  }
120
120
  exports.AgeCursor = AgeCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"age-axis.cjs","sources":["../src/age-axis.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport {\n SVG,\n ColumnAxis,\n ColumnContext,\n ColumnAxisType,\n AgeAxis,\n} from \"@macrostrat/column-components\";\nimport { useContext } from \"react\";\nimport styles from \"./age-axis.module.sass\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport { Parenthetical } from \"@macrostrat/data-components\";\nimport { AgeLabel } from \"./unit-details\";\nimport { PackageScaleLayoutData } from \"./prepare-units\";\n\nconst h = hyper.styled(styles);\n\nconst AgeAxisCore = ({ ticks, tickSpacing = 40, showDomain = false }) => {\n const { pixelHeight } = useContext(ColumnContext);\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n\n return h(\"g.axis\", { transform: \"translate(20 0)\" }, [\n h(ColumnAxis, {\n ticks: v,\n showDomain,\n }),\n ]);\n};\n\nexport function VerticalAxisLabel(props) {\n const { label = \"Age\", unit = \"Ma\", className, height } = props;\n return h(\n \"div.column-axis-label.age-axis-label\",\n { className, style: { height } },\n [\n label,\n \" \",\n h.if(unit)(Parenthetical, { className: \"age-axis-unit\" }, unit),\n ],\n );\n}\n\ninterface CompositeAgeAxisProps {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function CompositeAgeAxis(rest: CompositeAgeAxisProps) {\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo,\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport function ApproximateHeightAxis(rest: CompositeAgeAxisProps) {\n /** Axis to show approximate height based on dynamic column scales */\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n const { scaleInfo } = section;\n if (scaleInfo.heightScale == null) {\n throw new Error(\"No height scale available for section\");\n }\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale, // Use height scale instead of age scale\n // This only works with dynamic columns\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport interface CompositeStratigraphicScaleInfo extends CompositeAgeAxisProps {\n axisType: ColumnAxisType;\n axisLabel?: string;\n axisUnit?: string;\n totalHeight: number;\n packages: PackageScaleLayoutData[];\n}\n\nexport function CompositeAgeAxisCore(props: CompositeStratigraphicScaleInfo) {\n const { axisType, axisLabel, axisUnit, totalHeight, packages, ...rest } =\n props;\n\n if (axisType == ColumnAxisType.ORDINAL) {\n return null;\n }\n\n let _axisLabel: string = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == ColumnAxisType.DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == ColumnAxisType.HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n\n return h(\"div.composite-age-axis\", rest, [\n h(VerticalAxisLabel, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight,\n }),\n h(\n SVG,\n {\n className: \"age-axis-column\",\n style: { width: `22px`, height: `${totalHeight}px` },\n width: 22,\n height: totalHeight,\n },\n packages.map((group, i) => {\n const { key, scale } = group;\n\n return h(AgeAxis, {\n key,\n className: \"age-axis\",\n scale,\n tickSizeOuter: 3,\n });\n }),\n ),\n ]);\n}\n\nexport function AgeCursor({ age }) {\n /** A cursor that shows the age at a specific point on the age axis. */\n const scale = useCompositeScale();\n const heightPx = scale(age);\n\n if (age == null || heightPx == null) {\n return null;\n }\n\n return h(\n \"div.age-cursor\",\n {\n style: {\n top: heightPx,\n },\n },\n [h(\"div.line\"), h(AgeLabel, { age, className: \"label\" })],\n );\n}\n"],"names":["hyper","styles","Parenthetical","useMacrostratColumnData","ColumnAxisType","SVG","AgeAxis","useCompositeScale","AgeLabel"],"mappings":"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"}
1
+ {"version":3,"file":"age-axis.cjs","sources":["../src/age-axis.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport {\n SVG,\n ColumnAxis,\n ColumnContext,\n ColumnAxisType,\n AgeAxis,\n} from \"@macrostrat/column-components\";\nimport { useContext } from \"react\";\nimport styles from \"./age-axis.module.sass\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport { Parenthetical } from \"@macrostrat/data-components\";\nimport { AgeLabel } from \"./unit-details\";\nimport { PackageScaleLayoutData } from \"./prepare-units\";\n\nconst h = hyper.styled(styles);\n\nconst AgeAxisCore = ({ ticks, tickSpacing = 40, showDomain = false }) => {\n const { pixelHeight } = useContext(ColumnContext);\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n\n return h(\"g.axis\", { transform: \"translate(20 0)\" }, [\n h(ColumnAxis, {\n ticks: v,\n showDomain,\n }),\n ]);\n};\n\nexport function VerticalAxisLabel(props) {\n const { label = \"Age\", unit = \"Ma\", className, height } = props;\n return h(\n \"div.column-axis-label.age-axis-label\",\n { className, style: { height } },\n [\n label,\n \" \",\n h.if(unit)(Parenthetical, { className: \"age-axis-unit\" }, unit),\n ],\n );\n}\n\ninterface CompositeAgeAxisProps {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function CompositeAgeAxis(rest: CompositeAgeAxisProps) {\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo,\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport function ApproximateHeightAxis(rest: CompositeAgeAxisProps) {\n /** Axis to show approximate height based on dynamic column scales */\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n const { scaleInfo } = section;\n if (scaleInfo.heightScale == null) {\n throw new Error(\"No height scale available for section\");\n }\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale, // Use height scale instead of age scale\n // This only works with dynamic columns\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport interface CompositeStratigraphicScaleInfo extends CompositeAgeAxisProps {\n axisType: ColumnAxisType;\n axisLabel?: string;\n axisUnit?: string;\n totalHeight: number;\n packages: PackageScaleLayoutData[];\n}\n\nexport function CompositeAgeAxisCore(props: CompositeStratigraphicScaleInfo) {\n const { axisType, axisLabel, axisUnit, totalHeight, packages, ...rest } =\n props;\n\n if (axisType == ColumnAxisType.ORDINAL) {\n return null;\n }\n\n let _axisLabel: string = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == ColumnAxisType.DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == ColumnAxisType.HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n\n return h(\"div.composite-age-axis\", rest, [\n h(VerticalAxisLabel, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight,\n }),\n h(\n SVG,\n {\n className: \"age-axis-column\",\n style: { width: `22px`, height: `${totalHeight}px` },\n width: 22,\n height: totalHeight,\n },\n packages.map((group, i) => {\n const { key, scale } = group;\n\n return h(AgeAxis, {\n key,\n className: \"age-axis\",\n scale,\n tickSizeOuter: 3,\n });\n }),\n ),\n ]);\n}\n\nexport function AgeCursor({ age }) {\n /** A cursor that shows the age at a specific point on the age axis. */\n const scale = useCompositeScale();\n const heightPx = scale(age);\n\n if (age == null || heightPx == null) {\n return null;\n }\n\n return h(\n \"div.age-cursor\",\n {\n style: {\n top: heightPx,\n },\n },\n [h(\"div.line\"), h(AgeLabel, { age, className: \"label\" })],\n );\n}\n"],"names":["hyper","styles","Parenthetical","useMacrostratColumnData","ColumnAxisType","SVG","AgeAxis","useCompositeScale","AgeLabel"],"mappings":"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"}
package/dist/age-axis.js CHANGED
@@ -3,7 +3,7 @@ import { ColumnAxisType, SVG, AgeAxis } from "@macrostrat/column-components";
3
3
  import "react";
4
4
  import h$2 from "./age-axis.module.sass.js";
5
5
  import { Parenthetical } from "@macrostrat/data-components";
6
- import { AgeLabel } from "./unit-details/panel.js";
6
+ import { AgeLabel } from "./unit-details/age-range.js";
7
7
  import { useCompositeScale, useMacrostratColumnData } from "./data-provider/store.js";
8
8
  const h = h$1.styled(h$2);
9
9
  function VerticalAxisLabel(props) {
@@ -74,138 +74,23 @@
74
74
  position: relative;
75
75
  display: flex;
76
76
  flex-direction: row;
77
- }._legend-panel-header_128wy_1 {
78
- display: flex;
79
- justify-content: space-between;
80
- align-items: center;
81
- gap: 0.5em;
82
- border-bottom: 1px solid var(--panel-rule-color);
83
- position: sticky;
84
- top: 0;
85
- background-color: var(--panel-secondary-background-color);
86
- padding: 0.5em 1em;
87
- z-index: 50;
88
- min-height: 45px;
89
- overflow: hidden;
90
- }
91
- ._legend-panel-header_128wy_1 ._title-container_128wy_15 {
77
+ }._interval-proportions_1ibvp_1 {
78
+ display: inline-flex;
79
+ flex-flow: row wrap;
92
80
  gap: 0.5em;
81
+ text-align: right;
93
82
  align-items: baseline;
94
- margin: 0;
95
- flex-grow: 1;
96
- z-index: 5;
97
- }
98
- ._legend-panel-header_128wy_1 ._title-container_128wy_15:hover ._hidden-actions-container_128wy_22 {
99
- visibility: visible;
100
- }
101
- ._legend-panel-header_128wy_1 ._title-container_128wy_15 h1, ._legend-panel-header_128wy_1 ._title-container_128wy_15 h2, ._legend-panel-header_128wy_1 ._title-container_128wy_15 h3 {
102
- display: inline;
103
- margin: 0;
104
- }
105
- ._legend-panel-header_128wy_1 ._title-container_128wy_15 ._hidden-actions-container_128wy_22 {
106
- visibility: hidden;
107
- }
108
- ._legend-panel-header_128wy_1 ._title-container_128wy_15 button {
109
- transform: translateY(0px);
110
- }
111
- ._legend-panel-header_128wy_1 code {
112
- font-size: 0.9em;
113
- color: var(--secondary-color);
114
- }
115
- ._legend-panel-header_128wy_1 ._unit-id_128wy_39:before {
116
- content: "#";
117
- color: var(--secondary-color);
118
- }
119
- ._legend-panel-header_128wy_1 ._spacer_128wy_43 {
120
- flex: 1;
121
- }
122
-
123
- ._unit-details-panel_128wy_47 {
124
- display: flex;
125
- flex-direction: column;
126
- }
127
- ._unit-details-panel_128wy_47 ._unit-details-content-holder_128wy_51 {
128
- flex: 1;
129
- overflow-y: scroll;
130
- }
131
-
132
- ._unit-details-content_128wy_51 {
133
- position: relative;
134
- margin: 1em;
135
- }
136
-
137
- ._units-list_128wy_61 ._item_128wy_61:after {
138
- content: ", ";
139
- }
140
- ._units-list_128wy_61 ._item_128wy_61:last-child:after {
141
- content: "";
142
83
  }
143
84
 
144
- ._proportion_128wy_68, ._sep_128wy_68, ._no-units_128wy_68, ._strat-name-text_128wy_68 {
145
- color: var(--secondary-color);
146
- font-style: italic;
147
- }
148
-
149
- ._strat-name-id_128wy_73, ._identifier_128wy_73 {
150
- font-family: var(--monospace-font);
151
- color: var(--secondary-color);
152
- }
153
- ._strat-name-id_128wy_73::before, ._identifier_128wy_73::before {
154
- content: "#";
155
- color: var(--tertiary-color);
156
- }
157
-
158
- ._color-swatch_128wy_82 {
159
- width: 1em;
160
- height: 1em;
161
- border-radius: 0.2em;
162
- margin-right: 0.2em;
163
- border: 1px solid var(--panel-rule-color);
164
- display: inline-block;
165
- }
166
-
167
- ._refs_128wy_91 {
168
- list-style: none;
169
- margin: 0;
170
- padding-left: 0;
171
- }
172
-
173
- ._interval-proportions_128wy_97 {
174
- flex-grow: 1;
175
- width: 100%;
176
- text-align: right;
177
- }
178
- ._interval-proportions_128wy_97 ._discourage-break_128wy_102 {
85
+ ._interval-proportions_1ibvp_1, ._discourage-break_1ibvp_9 {
86
+ align-items: baseline;
179
87
  white-space: nowrap;
180
- }
181
- ._interval-proportions_128wy_97 ._sep_128wy_68 {
182
- margin: 0 0.3em;
183
- }
184
-
185
- ._clickable_128wy_109 {
186
- cursor: pointer;
187
- }
188
-
189
- ._hidden-actions-container_128wy_22 {
190
- min-width: 0;
191
- display: inline-block;
192
- width: 0;
193
- position: relative;
88
+ display: inline-flex;
89
+ gap: 0.5em;
194
90
  }
195
91
 
196
- ._hidden-actions_128wy_22 {
197
- padding-left: 1em;
198
- width: fit-content;
199
- display: flex;
200
- align-items: center;
201
- gap: 0.25em;
202
- background-color: var(--panel-secondary-background-color);
203
- z-index: 50;
204
- position: relative;
205
- bottom: 0;
206
- }
207
- ._hidden-actions_128wy_22 button {
208
- color: var(--secondary-color) !important;
92
+ ._sep_1ibvp_16 {
93
+ color: var(--secondary-color);
209
94
  }._column-container_15bga_1, body.light-mode ._column-container_15bga_1 {
210
95
  --column-background-color: var(--background-color, #fff);
211
96
  --column-stroke-color: var(--text-emphasized-color, #000);
@@ -428,6 +313,126 @@ body.dark-mode ._column-container_15bga_1 svg pattern image {
428
313
  ._legend-json-view_4jzei_30 {
429
314
  padding-left: 0;
430
315
  margin-left: -0.5em;
316
+ }._legend-panel-header_ue390_1 {
317
+ display: flex;
318
+ justify-content: space-between;
319
+ align-items: center;
320
+ gap: 0.5em;
321
+ border-bottom: 1px solid var(--panel-rule-color);
322
+ position: sticky;
323
+ top: 0;
324
+ background-color: var(--panel-secondary-background-color);
325
+ padding: 0.5em 1em;
326
+ z-index: 50;
327
+ min-height: 45px;
328
+ overflow: hidden;
329
+ }
330
+ ._legend-panel-header_ue390_1 ._title-container_ue390_15 {
331
+ gap: 0.5em;
332
+ align-items: baseline;
333
+ margin: 0;
334
+ flex-grow: 1;
335
+ z-index: 5;
336
+ }
337
+ ._legend-panel-header_ue390_1 ._title-container_ue390_15:hover ._hidden-actions-container_ue390_22 {
338
+ visibility: visible;
339
+ }
340
+ ._legend-panel-header_ue390_1 ._title-container_ue390_15 h1, ._legend-panel-header_ue390_1 ._title-container_ue390_15 h2, ._legend-panel-header_ue390_1 ._title-container_ue390_15 h3 {
341
+ display: inline;
342
+ margin: 0;
343
+ }
344
+ ._legend-panel-header_ue390_1 ._title-container_ue390_15 ._hidden-actions-container_ue390_22 {
345
+ visibility: hidden;
346
+ }
347
+ ._legend-panel-header_ue390_1 ._title-container_ue390_15 button {
348
+ transform: translateY(0px);
349
+ }
350
+ ._legend-panel-header_ue390_1 code {
351
+ font-size: 0.9em;
352
+ color: var(--secondary-color);
353
+ }
354
+ ._legend-panel-header_ue390_1 ._unit-id_ue390_39:before {
355
+ content: "#";
356
+ color: var(--secondary-color);
357
+ }
358
+ ._legend-panel-header_ue390_1 ._spacer_ue390_43 {
359
+ flex: 1;
360
+ }
361
+
362
+ ._unit-details-panel_ue390_47 {
363
+ display: flex;
364
+ flex-direction: column;
365
+ }
366
+ ._unit-details-panel_ue390_47 ._unit-details-content-holder_ue390_51 {
367
+ flex: 1;
368
+ overflow-y: scroll;
369
+ }
370
+
371
+ ._unit-details-content_ue390_51 {
372
+ position: relative;
373
+ margin: 1em;
374
+ }
375
+
376
+ ._units-list_ue390_61 ._item_ue390_61:after {
377
+ content: ", ";
378
+ }
379
+ ._units-list_ue390_61 ._item_ue390_61:last-child:after {
380
+ content: "";
381
+ }
382
+
383
+ ._proportion_ue390_68, ._sep_ue390_68, ._no-units_ue390_68, ._strat-name-text_ue390_68 {
384
+ color: var(--secondary-color);
385
+ font-style: italic;
386
+ }
387
+
388
+ ._strat-name-id_ue390_73, ._identifier_ue390_73 {
389
+ font-family: var(--monospace-font);
390
+ color: var(--secondary-color);
391
+ }
392
+ ._strat-name-id_ue390_73::before, ._identifier_ue390_73::before {
393
+ content: "#";
394
+ color: var(--tertiary-color);
395
+ }
396
+
397
+ ._color-swatch_ue390_82 {
398
+ width: 1em;
399
+ height: 1em;
400
+ border-radius: 0.2em;
401
+ margin-right: 0.2em;
402
+ border: 1px solid var(--panel-rule-color);
403
+ display: inline-block;
404
+ }
405
+
406
+ ._refs_ue390_91 {
407
+ list-style: none;
408
+ margin: 0;
409
+ padding-left: 0;
410
+ }
411
+
412
+ ._clickable_ue390_97 {
413
+ cursor: pointer;
414
+ }
415
+
416
+ ._hidden-actions-container_ue390_22 {
417
+ min-width: 0;
418
+ display: inline-block;
419
+ width: 0;
420
+ position: relative;
421
+ }
422
+
423
+ ._hidden-actions_ue390_22 {
424
+ padding-left: 1em;
425
+ width: fit-content;
426
+ display: flex;
427
+ align-items: center;
428
+ gap: 0.25em;
429
+ background-color: var(--panel-secondary-background-color);
430
+ z-index: 50;
431
+ position: relative;
432
+ bottom: 0;
433
+ }
434
+ ._hidden-actions_ue390_22 button {
435
+ color: var(--secondary-color) !important;
431
436
  }._boundary-age-model_16scl_1 {
432
437
  top: 0;
433
438
  left: 0;
package/dist/index.cjs CHANGED
@@ -6,23 +6,25 @@ const index$6 = require("./prepare-units/index.cjs");
6
6
  const column = require("./column.cjs");
7
7
  const ageModelOverlay = require("./age-model-overlay.cjs");
8
8
  const notes = require("./notes.cjs");
9
- const panel = require("./unit-details/panel.cjs");
9
+ const ageRange = require("./unit-details/age-range.cjs");
10
10
  const composite = require("./units/composite.cjs");
11
+ const columns = require("./maps/layers/columns.cjs");
11
12
  const base = require("./facets/measurements/base.cjs");
13
+ const panel = require("./unit-details/panel.cjs");
12
14
  const layers = require("./maps/column-navigation/svg/layers.cjs");
13
15
  const core = require("./maps/column-correlation/core.cjs");
14
16
  const state = require("./maps/column-correlation/state.cjs");
15
- const columnNav = require("./data-provider/column-nav.cjs");
16
17
  const index$1 = require("./maps/column-navigation/mapbox/index.cjs");
18
+ const columnNav = require("./data-provider/column-nav.cjs");
17
19
  const index$2 = require("./maps/column-navigation/svg/index.cjs");
18
20
  const main = require("./correlation-chart/main.cjs");
19
21
  const index$3 = require("./facets/detrital-zircon/index.cjs");
20
22
  const provider = require("./facets/fossils/provider.cjs");
21
23
  const types = require("./prepare-units/types.cjs");
22
- const insetMap = require("./maps/_shared/inset-map.cjs");
24
+ const index$4 = require("./maps/inset-map/index.cjs");
23
25
  const isotopesColumn = require("./facets/carbon-isotopes/isotopes-column.cjs");
24
26
  const store = require("./data-provider/store.cjs");
25
- const index$4 = require("./maps/units-overlay/index.cjs");
27
+ const units = require("./maps/layers/units.cjs");
26
28
  const dataProvider = require("./facets/carbon-isotopes/data-provider.cjs");
27
29
  const utils = require("./prepare-units/utils.cjs");
28
30
  const index$5 = require("./facets/fossils/index.cjs");
@@ -31,7 +33,6 @@ const sgp = require("./facets/measurements/sgp.cjs");
31
33
  const modalPanel = require("./unit-details/modal-panel.cjs");
32
34
  const popover = require("./unit-details/popover.cjs");
33
35
  const unitSelection = require("./data-provider/unit-selection.cjs");
34
- const styles = require("./maps/_shared/styles.cjs");
35
36
  const colors = require("./units/colors.cjs");
36
37
  const hashString = require("./correlation-chart/hash-string.cjs");
37
38
  const helpers = require("./prepare-units/helpers.cjs");
@@ -56,15 +57,13 @@ exports.ColumnContainer = column.ColumnContainer;
56
57
  exports.BoundaryAgeModelOverlay = ageModelOverlay.BoundaryAgeModelOverlay;
57
58
  exports.ComputedSurfacesOverlay = ageModelOverlay.ComputedSurfacesOverlay;
58
59
  exports.ColumnNotes = notes.ColumnNotes;
59
- exports.AgeLabel = panel.AgeLabel;
60
- exports.ClickableText = panel.ClickableText;
61
- exports.Duration = panel.Duration;
62
- exports.Identifier = panel.Identifier;
63
- exports.LegendPanelHeader = panel.LegendPanelHeader;
64
- exports.ReferencesField = panel.ReferencesField;
65
- exports.ThicknessField = panel.ThicknessField;
66
- exports.UnitDetailsFeature = panel.UnitDetailsFeature;
67
- exports.UnitDetailsPanel = panel.UnitDetailsPanel;
60
+ exports.AgeField = ageRange.AgeField;
61
+ exports.AgeLabel = ageRange.AgeLabel;
62
+ exports.AgeRange = ageRange.AgeRange;
63
+ exports.Duration = ageRange.Duration;
64
+ exports.IntervalProportions = ageRange.IntervalProportions;
65
+ exports.getAge = ageRange.getAge;
66
+ exports.getAgeRange = ageRange.getAgeRange;
68
67
  exports.AnnotatedUnitsColumn = composite.AnnotatedUnitsColumn;
69
68
  exports.ColumnNotesProvider = composite.ColumnNotesProvider;
70
69
  exports.CompositeUnitComponent = composite.CompositeUnitComponent;
@@ -72,11 +71,21 @@ exports.CompositeUnitsColumn = composite.CompositeUnitsColumn;
72
71
  exports.LabelTrackerProvider = composite.LabelTrackerProvider;
73
72
  exports.SectionLabelsColumn = composite.SectionLabelsColumn;
74
73
  exports.TrackedLabeledUnit = composite.TrackedLabeledUnit;
74
+ exports.BaseColumnsLayer = columns.BaseColumnsLayer;
75
+ exports.SelectedColumnOverlay = columns.SelectedColumnOverlay;
76
+ exports.buildColumnsStyle = columns.buildColumnsStyle;
75
77
  exports.BaseMeasurementsColumn = base.BaseMeasurementsColumn;
76
78
  exports.TruncatedList = base.TruncatedList;
77
79
  exports.groupNotesByPixelDistance = base.groupNotesByPixelDistance;
78
80
  exports.mergeHeightRanges = base.mergeHeightRanges;
79
81
  exports.standardizeMeasurementHeight = base.standardizeMeasurementHeight;
82
+ exports.ClickableText = panel.ClickableText;
83
+ exports.Identifier = panel.Identifier;
84
+ exports.LegendPanelHeader = panel.LegendPanelHeader;
85
+ exports.ReferencesField = panel.ReferencesField;
86
+ exports.ThicknessField = panel.ThicknessField;
87
+ exports.UnitDetailsFeature = panel.UnitDetailsFeature;
88
+ exports.UnitDetailsPanel = panel.UnitDetailsPanel;
80
89
  exports.ColumnCenters = layers.ColumnCenters;
81
90
  exports.ColumnFeatures = layers.ColumnFeatures;
82
91
  exports.ColumnKeyboardNavigation = layers.ColumnKeyboardNavigation;
@@ -86,9 +95,12 @@ exports.MeasurementsLayer = layers.MeasurementsLayer;
86
95
  exports.ColumnCorrelationMap = core.ColumnCorrelationMap;
87
96
  exports.ColumnCorrelationProvider = state.ColumnCorrelationProvider;
88
97
  exports.useCorrelationMapStore = state.useCorrelationMapStore;
98
+ exports.ColumnHoverInteraction = index$1.ColumnHoverInteraction;
99
+ exports.ColumnNavigationMap = index$1.ColumnNavigationMap;
100
+ exports.ColumnSelectionManager = index$1.ColumnSelectionManager;
101
+ exports.ColumnsNavigationLayer = index$1.ColumnsNavigationLayer;
89
102
  exports.ColumnNavProvider = columnNav.ColumnNavProvider;
90
103
  exports.useColumnNav = columnNav.useColumnNav;
91
- exports.ColumnNavigationMap = index$1.ColumnNavigationMap;
92
104
  exports.ColumnNavigationSVGMap = index$2.ColumnNavigationSVGMap;
93
105
  exports.ResizableMapFrame = index$2.ResizableMapFrame;
94
106
  exports.CorrelationChart = main.CorrelationChart;
@@ -98,7 +110,7 @@ exports.FossilDataType = provider.FossilDataType;
98
110
  exports.useFossilData = provider.useFossilData;
99
111
  exports.HeightMethod = types.HeightMethod;
100
112
  exports.HybridScaleType = types.HybridScaleType;
101
- exports.InsetMap = insetMap.InsetMap;
113
+ exports.InsetMap = index$4.InsetMap;
102
114
  exports.IsotopesColumn = isotopesColumn.IsotopesColumn;
103
115
  exports.IsotopesDataset = isotopesColumn.IsotopesDataset;
104
116
  exports.LithologiesProvider = store.LithologiesProvider;
@@ -113,8 +125,8 @@ exports.useColumnUnitsMap = store.useColumnUnitsMap;
113
125
  exports.useCompositeScale = store.useCompositeScale;
114
126
  exports.useMacrostratColumnData = store.useMacrostratColumnData;
115
127
  exports.useMacrostratUnits = store.useMacrostratUnits;
116
- exports.MacrostratUnitsOverlay = index$4.MacrostratUnitsOverlay;
117
- exports.buildUnitsStyle = index$4.buildUnitsStyle;
128
+ exports.MacrostratUnitsOverlay = units.MacrostratUnitsOverlay;
129
+ exports.buildUnitsStyle = units.buildUnitsStyle;
118
130
  exports.MeasurementDataContext = dataProvider.MeasurementDataContext;
119
131
  exports.MeasurementDataProvider = dataProvider.MeasurementDataProvider;
120
132
  exports.useMeasurementData = dataProvider.useMeasurementData;
@@ -141,7 +153,6 @@ exports.useColumnRef = unitSelection.useColumnRef;
141
153
  exports.useSelectedUnit = unitSelection.useSelectedUnit;
142
154
  exports.useUnitSelectionDispatch = unitSelection.useUnitSelectionDispatch;
143
155
  exports.useUnitSelectionTarget = unitSelection.useUnitSelectionTarget;
144
- exports.buildColumnsStyle = styles.buildColumnsStyle;
145
156
  exports.flattenLithologies = colors.flattenLithologies;
146
157
  exports.getMixedColorForData = colors.getMixedColorForData;
147
158
  exports.getMixedUnitColor = colors.getMixedUnitColor;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -4,23 +4,25 @@ import { prepareColumnUnits, usePreparedColumnUnits } from "./prepare-units/inde
4
4
  import { Column, ColumnBasicInfo, ColumnContainer } from "./column.js";
5
5
  import { BoundaryAgeModelOverlay, ComputedSurfacesOverlay } from "./age-model-overlay.js";
6
6
  import { ColumnNotes } from "./notes.js";
7
- import { AgeLabel, ClickableText, Duration, Identifier, LegendPanelHeader, ReferencesField, ThicknessField, UnitDetailsFeature, UnitDetailsPanel } from "./unit-details/panel.js";
7
+ import { AgeField, AgeLabel, AgeRange, Duration, IntervalProportions, getAge, getAgeRange } from "./unit-details/age-range.js";
8
8
  import { AnnotatedUnitsColumn, ColumnNotesProvider, CompositeUnitComponent, CompositeUnitsColumn, LabelTrackerProvider, SectionLabelsColumn, TrackedLabeledUnit } from "./units/composite.js";
9
+ import { BaseColumnsLayer, SelectedColumnOverlay, buildColumnsStyle } from "./maps/layers/columns.js";
9
10
  import { BaseMeasurementsColumn, TruncatedList, groupNotesByPixelDistance, mergeHeightRanges, standardizeMeasurementHeight } from "./facets/measurements/base.js";
11
+ import { ClickableText, Identifier, LegendPanelHeader, ReferencesField, ThicknessField, UnitDetailsFeature, UnitDetailsPanel } from "./unit-details/panel.js";
10
12
  import { ColumnCenters, ColumnFeatures, ColumnKeyboardNavigation, Columns, CurrentColumn, MeasurementsLayer } from "./maps/column-navigation/svg/layers.js";
11
13
  import { ColumnCorrelationMap } from "./maps/column-correlation/core.js";
12
14
  import { ColumnCorrelationProvider, useCorrelationMapStore } from "./maps/column-correlation/state.js";
15
+ import { ColumnHoverInteraction, ColumnNavigationMap, ColumnSelectionManager, ColumnsNavigationLayer } from "./maps/column-navigation/mapbox/index.js";
13
16
  import { ColumnNavProvider, useColumnNav } from "./data-provider/column-nav.js";
14
- import { ColumnNavigationMap } from "./maps/column-navigation/mapbox/index.js";
15
17
  import { ColumnNavigationSVGMap, ResizableMapFrame } from "./maps/column-navigation/svg/index.js";
16
18
  import { CorrelationChart } from "./correlation-chart/main.js";
17
19
  import { DetritalColumn, DetritalGroup } from "./facets/detrital-zircon/index.js";
18
20
  import { FossilDataType, useFossilData } from "./facets/fossils/provider.js";
19
21
  import { HeightMethod, HybridScaleType } from "./prepare-units/types.js";
20
- import { InsetMap } from "./maps/_shared/inset-map.js";
22
+ import { InsetMap } from "./maps/inset-map/index.js";
21
23
  import { IsotopesColumn, IsotopesDataset } from "./facets/carbon-isotopes/isotopes-column.js";
22
24
  import { LithologiesProvider, MacrostratColumnDataProvider, MacrostratColumnProvider, MacrostratColumnStateProvider, UnitSelectionProvider, columnUnitsAtom, columnUnitsMapAtom, scope, useColumnUnitsMap, useCompositeScale, useMacrostratColumnData, useMacrostratUnits } from "./data-provider/store.js";
23
- import { MacrostratUnitsOverlay, buildUnitsStyle } from "./maps/units-overlay/index.js";
25
+ import { MacrostratUnitsOverlay, buildUnitsStyle } from "./maps/layers/units.js";
24
26
  import { MeasurementDataContext, MeasurementDataProvider, useMeasurementData } from "./facets/carbon-isotopes/data-provider.js";
25
27
  import { MergeSectionsMode, agesOverlap, createUnitSorter, ensureArray, ensureRealFloat, getPositionWithinUnit, getUnitHeightRange, unitsOverlap } from "./prepare-units/utils.js";
26
28
  import { PBDBFossilsColumn } from "./facets/fossils/index.js";
@@ -29,15 +31,17 @@ import { SGPMeasurementsColumn } from "./facets/measurements/sgp.js";
29
31
  import { UnitDetailsPanelWithNavigation } from "./unit-details/modal-panel.js";
30
32
  import { UnitDetailsPopover, UnitSelectionPopover } from "./unit-details/popover.js";
31
33
  import { UnitKeyboardNavigation, UnitSelectionCallbackManager, allowUnitSelectionAtom, selectedUnitIDAtom, useAtomOverlayPosition, useColumnRef, useSelectedUnit, useUnitSelectionDispatch, useUnitSelectionTarget } from "./data-provider/unit-selection.js";
32
- import { buildColumnsStyle } from "./maps/_shared/styles.js";
33
34
  import { flattenLithologies, getMixedColorForData, getMixedUnitColor } from "./units/colors.js";
34
35
  import { parseLineFromString, stringifyLine } from "./correlation-chart/hash-string.js";
35
36
  import { preprocessUnits } from "./prepare-units/helpers.js";
36
37
  export {
37
38
  AgeCursor,
39
+ AgeField,
38
40
  AgeLabel,
41
+ AgeRange,
39
42
  AnnotatedUnitsColumn,
40
43
  ApproximateHeightAxis,
44
+ BaseColumnsLayer,
41
45
  BaseMeasurementsColumn,
42
46
  BasicUnitComponent,
43
47
  BoundaryAgeModelOverlay,
@@ -50,13 +54,16 @@ export {
50
54
  ColumnCorrelationMap,
51
55
  ColumnCorrelationProvider,
52
56
  ColumnFeatures,
57
+ ColumnHoverInteraction,
53
58
  ColumnKeyboardNavigation,
54
59
  ColumnNavProvider,
55
60
  ColumnNavigationMap,
56
61
  ColumnNavigationSVGMap,
57
62
  ColumnNotes,
58
63
  ColumnNotesProvider,
64
+ ColumnSelectionManager,
59
65
  Columns,
66
+ ColumnsNavigationLayer,
60
67
  CompositeAgeAxis,
61
68
  CompositeAgeAxisCore,
62
69
  CompositeUnitComponent,
@@ -73,6 +80,7 @@ export {
73
80
  HybridScaleType,
74
81
  Identifier,
75
82
  InsetMap,
83
+ IntervalProportions,
76
84
  IsotopesColumn,
77
85
  IsotopesDataset,
78
86
  LabelTrackerProvider,
@@ -92,6 +100,7 @@ export {
92
100
  ResizableMapFrame,
93
101
  SGPMeasurementsColumn,
94
102
  SectionLabelsColumn,
103
+ SelectedColumnOverlay,
95
104
  SimpleUnitsColumn,
96
105
  ThicknessField,
97
106
  TrackedLabeledUnit,
@@ -117,6 +126,8 @@ export {
117
126
  ensureArray,
118
127
  ensureRealFloat,
119
128
  flattenLithologies,
129
+ getAge,
130
+ getAgeRange,
120
131
  getMixedColorForData,
121
132
  getMixedUnitColor,
122
133
  getPositionWithinUnit,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,30 +6,22 @@ const h = require("@macrostrat/hyper");
6
6
  const React = require("react");
7
7
  const mapboxUtils = require("@macrostrat/mapbox-utils");
8
8
  const state = require("./state.cjs");
9
+ const index = require("../inset-map/index.cjs");
9
10
  const mapStyles = require("@macrostrat/map-styles");
10
- const styles = require("../_shared/styles.cjs");
11
- const insetMap = require("../_shared/inset-map.cjs");
11
+ const columns = require("../layers/columns.cjs");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const h__default = /* @__PURE__ */ _interopDefault(h);
14
14
  function ColumnCorrelationMap(props) {
15
15
  const { padding = 50, children, columnColor, projectID, ...rest } = props;
16
- const overlayStyles = React.useMemo(() => {
17
- return [
18
- styles.buildColumnsStyle(columnColor),
19
- selectedColumnsStyle,
20
- lineOfSectionStyle
21
- ];
22
- }, [columnColor]);
23
16
  return h__default.default(
24
- insetMap.InsetMap,
17
+ index.InsetMap,
25
18
  {
26
19
  ...rest,
27
20
  boxZoom: false,
28
- dragRotate: false,
29
- overlayStyles
21
+ dragRotate: false
30
22
  },
31
23
  [
32
- h__default.default(ColumnsLayer),
24
+ h__default.default(ColumnsLayer, { color: columnColor }),
33
25
  h__default.default(SelectedColumnsLayer),
34
26
  h__default.default(MapClickHandler),
35
27
  h__default.default(SectionLine, { padding }),
@@ -48,6 +40,7 @@ function MapClickHandler() {
48
40
  return null;
49
41
  }
50
42
  function SelectedColumnsLayer() {
43
+ mapboxReact.useOverlayStyle(() => selectedColumnsStyle, []);
51
44
  const focusedColumns = state.useCorrelationMapStore(
52
45
  (state2) => state2.focusedColumns
53
46
  );
@@ -78,23 +71,9 @@ function SelectedColumnsLayer() {
78
71
  );
79
72
  return null;
80
73
  }
81
- function ColumnsLayer({ enabled = true }) {
82
- const columns = state.useCorrelationMapStore((state2) => state2.columns);
83
- mapboxReact.useMapStyleOperator(
84
- (map) => {
85
- if (columns == null) {
86
- return;
87
- }
88
- const data = {
89
- type: "FeatureCollection",
90
- features: columns
91
- };
92
- console.log(" columns", data);
93
- mapboxUtils.setGeoJSON(map, "columns", data);
94
- },
95
- [columns, enabled]
96
- );
97
- return null;
74
+ function ColumnsLayer({ enabled = true, color }) {
75
+ const columns$1 = state.useCorrelationMapStore((state2) => state2.columns);
76
+ return h__default.default(columns.BaseColumnsLayer, { enabled, color, columns: columns$1 });
98
77
  }
99
78
  const selectedColumnsStyle = {
100
79
  version: 8,
@@ -142,6 +121,7 @@ const lineOfSectionStyle = {
142
121
  layers: mapStyles.buildCrossSectionLayers()
143
122
  };
144
123
  function SectionLine({ padding }) {
124
+ mapboxReact.useOverlayStyle(() => lineOfSectionStyle, []);
145
125
  const focusedLine = state.useCorrelationMapStore((state2) => state2.focusedLine);
146
126
  mapboxReact.useMapStyleOperator(
147
127
  (map) => {