UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

69 lines (64 loc) 2.17 kB
import $lqvQF$macrostrathyper from "@macrostrat/hyper"; const $d674d3f092d90ef7$var$ArrowMarker = function({ id: id, orient: orient, size: sz, fill: fill }) { if (fill == null) fill = "black"; if (sz == null) sz = 4; return (0, $lqvQF$macrostrathyper)("marker", { id: id, orient: orient, markerHeight: sz, markerWidth: sz, markerUnits: "strokeWidth", refX: "0", refY: "0", viewBox: `-${sz} -${sz} ${sz * 2} ${sz * 2}` }, [ (0, $lqvQF$macrostrathyper)("path", { d: `M 0,0 m -${sz},-${sz} L ${sz},0 L -${sz},${sz} Z`, fill: fill }) ]); }; const $d674d3f092d90ef7$var$EndpointTick = function({ id: id, fill: fill, size: sz }) { if (fill == null) fill = "black"; if (sz == null) sz = 4; return (0, $lqvQF$macrostrathyper)("marker", { id: id, markerHeight: 2, markerWidth: sz * 2, markerUnits: "strokeWidth", refX: 0, refY: 0, viewBox: `-${sz} -1 ${sz * 2} 1` }, [ (0, $lqvQF$macrostrathyper)("path", { d: `M -${sz},0 L ${sz},0`, fill: "transparent", stroke: fill }) ]); }; const $d674d3f092d90ef7$var$NoteDefs = function({ fill: fill, prefix: prefix, size: size }) { if (prefix == null) prefix = ""; return (0, $lqvQF$macrostrathyper)("defs", [ (0, $lqvQF$macrostrathyper)($d674d3f092d90ef7$var$ArrowMarker, { id: prefix + "arrow_start", orient: 270, fill: fill, size: size }), (0, $lqvQF$macrostrathyper)($d674d3f092d90ef7$var$ArrowMarker, { id: prefix + "arrow_end", orient: 90, fill: fill, size: size }), (0, $lqvQF$macrostrathyper)($d674d3f092d90ef7$var$EndpointTick, { id: prefix + "tick", fill: fill, size: size }) ]); }; var $d674d3f092d90ef7$export$2e2bcd8739ae039 = $d674d3f092d90ef7$var$NoteDefs; export {$d674d3f092d90ef7$export$2e2bcd8739ae039 as default}; //# sourceMappingURL=column-components.f725b2e5.js.map