@macrostrat/map-interface 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ import h from "@macrostrat/hyper";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+
4
+ import { LngLatCoords, LngLatProps } from "../src/location-info";
5
+
6
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta: Meta<LngLatProps> = {
8
+ title: "Map interface/Utilities/LngLatCoords",
9
+ component: LngLatCoords,
10
+ };
11
+
12
+ export default meta;
13
+
14
+ type Story = StoryObj<LngLatProps>;
15
+
16
+ export const Primary: Story = {
17
+ args: {
18
+ position: {
19
+ lat: 40.7128,
20
+ lng: -74.006,
21
+ },
22
+ zoom: 10,
23
+ precision: null,
24
+ },
25
+ argTypes: {
26
+ zoom: {
27
+ type: {
28
+ name: "number",
29
+ required: false,
30
+ },
31
+ },
32
+ precision: {
33
+ type: {
34
+ name: "number",
35
+ required: false,
36
+ },
37
+ },
38
+ },
39
+ };
@@ -0,0 +1,26 @@
1
+ import h from "@macrostrat/hyper";
2
+ import type { Meta } from "@storybook/react";
3
+
4
+ import { DevMapPage } from "../src";
5
+ import Box from "ui-box";
6
+
7
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8
+ const meta: Meta<typeof DevMapPage> = {
9
+ title: "Map interface/Dev map page",
10
+ component: DevMapPage,
11
+ };
12
+
13
+ export default meta;
14
+
15
+ const mapboxToken = import.meta.env.STORYBOOK_MAPBOX_API_TOKEN;
16
+
17
+ export function DevMapPageTest() {
18
+ return h(
19
+ Box,
20
+ { className: "container", position: "relative", height: 500 },
21
+ h(DevMapPage, {
22
+ mapboxToken,
23
+ fitViewport: false,
24
+ })
25
+ );
26
+ }
@@ -0,0 +1,27 @@
1
+ import h from "@macrostrat/hyper";
2
+ import type { Meta } from "@storybook/react";
3
+ import Box from "ui-box";
4
+
5
+ import { MapAreaContainer } from "../src";
6
+
7
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8
+ const meta: Meta<typeof MapAreaContainer> = {
9
+ title: "Map interface/Map area container",
10
+ component: MapAreaContainer,
11
+ };
12
+
13
+ export default meta;
14
+
15
+ export const Container = {
16
+ render() {
17
+ return h(MapAreaContainer, {
18
+ navbar: h(Box, { backgroundColor: "blue", minHeight: 50 }),
19
+ contextPanel: h(Box, { backgroundColor: "dodgerblue", flex: 1 }),
20
+ mainPanel: h(Box, { backgroundColor: "red", flex: 1 }),
21
+ detailPanel: h(Box, {
22
+ backgroundColor: "magenta",
23
+ flex: 1,
24
+ }),
25
+ });
26
+ },
27
+ };