diff --git a/LICENSE b/LICENSE
index f3fc12c6..2b697128 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2018 John J Czaplewski
+Copyright (c) 2018-2023 John J Czaplewski and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/package.json b/package.json
index b7c3e935..28cf1454 100644
--- a/package.json
+++ b/package.json
@@ -129,9 +129,9 @@
"use-debounce": "^9.0.4",
"use-react-router-breadcrumbs": "^3.2.1",
"use-resize-observer": "^9.1.0",
+ "vike": "^0.4.150",
"vite": "^4.4.9",
- "vite-plugin-cesium": "^1.2.22",
- "vite-plugin-ssr": "^0.4.139"
+ "vite-plugin-cesium": "^1.2.22"
},
"resolutions": {
"react": "^18.2.0",
diff --git a/packages/data-sheet-test/package.json b/packages/data-sheet-test/package.json
index 72bdcfbf..8effb7fc 100644
--- a/packages/data-sheet-test/package.json
+++ b/packages/data-sheet-test/package.json
@@ -6,7 +6,7 @@
"dependencies": {
"@blueprintjs/core": "^4",
"@blueprintjs/table": "^4",
- "@macrostrat/data-sheet": "workspace:^2.0.0-a1",
+ "@macrostrat/data-sheet": "workspace:*",
"@macrostrat/hyper": "^2.2.1",
"@macrostrat/ui-components": "workspace:^3.0.0",
"chroma-js": "^2.4.2",
diff --git a/packages/globe-dev/src/index.ts b/packages/globe-dev/src/index.ts
index b1bc25e5..98b2ea54 100644
--- a/packages/globe-dev/src/index.ts
+++ b/packages/globe-dev/src/index.ts
@@ -25,7 +25,7 @@ import Map from "./map-comparison";
import {
getMapPositionForHash,
applyMapPositionToHash,
-} from "~/map-interface/app-state/reducers/hash-string";
+} from "/Users/Daven/Projects/Macrostrat/Software/web/src/pages/map/map-interface/app-state/reducers/hash-string";
function VisControl({ show, setShown, name }) {
const className = show ? "active" : "";
diff --git a/server/index.js b/server/index.js
index 6fb8c4ae..d71d0466 100644
--- a/server/index.js
+++ b/server/index.js
@@ -1,53 +1,53 @@
-// This file isn't processed by Vite, see https://github.com/brillout/vite-plugin-ssr/issues/562
+// This file isn't processed by Vite, see https://github.com/brillout/vike/issues/562
// Consequently:
// - When changing this file, you needed to manually restart your server for your changes to take effect.
-// - To use your environment variables defined in your .env files, you need to install dotenv, see https://vite-plugin-ssr.com/env
-// - To use your path aliases defined in your vite.config.js, you need to tell Node.js about them, see https://vite-plugin-ssr.com/path-aliases
+// - To use your environment variables defined in your .env files, you need to install dotenv, see https://vike.dev/env
+// - To use your path aliases defined in your vite.config.js, you need to tell Node.js about them, see https://vike.dev/path-aliases
-import express from 'express'
-import compression from 'compression'
-import { renderPage } from 'vite-plugin-ssr/server'
-import { root } from './root.js'
+import express from "express"
+import compression from "compression"
+import { renderPage } from "vite-plugin-ssr/server"
+import { root } from "./root.js"
// Auth imports
-import cookieParser from 'cookie-parser'
-import * as jose from 'jose'
+import cookieParser from "cookie-parser"
+import * as jose from "jose"
-const isProduction = process.env.NODE_ENV === 'production'
+const isProduction = process.env.NODE_ENV === "production"
-startServer()
+startServer();
async function startServer() {
- const app = express()
+ const app = express();
- app.use(compression())
- app.use(cookieParser())
+ app.use(compression());
+ app.use(cookieParser());
// Vite integration
if (isProduction) {
// In production, we need to serve our static assets ourselves.
// (In dev, Vite's middleware serves our static assets.)
- const sirv = (await import('sirv')).default
- app.use(sirv(`${root}/dist/client`))
+ const sirv = (await import("sirv")).default;
+ app.use(sirv(`${root}/dist/client`));
} else {
// We instantiate Vite's development server and integrate its middleware to our server.
// ⚠️ We instantiate it only in development. (It isn't needed in production and it
// would unnecessarily bloat our production server.)
- const vite = await import('vite')
+ const vite = await import("vite");
const viteDevMiddleware = (
await vite.createServer({
root,
server: { middlewareMode: true },
})
- ).middlewares
- app.use(viteDevMiddleware)
+ ).middlewares;
+ app.use(viteDevMiddleware);
}
// ...
// Other middlewares (e.g. some RPC middleware such as Telefunc)
// ...
- // Vite-plugin-ssr middleware. It should always be our last middleware (because it's a
+ // vike middleware. It should always be our last middleware (because it's a
// catch-all middleware superseding any middleware placed after it).
app.get('*', async (req, res, next) => {
@@ -70,25 +70,28 @@ async function startServer() {
const pageContextInit = {
urlOriginal: req.originalUrl,
user: user
- }
+ };
- const pageContext = await renderPage(pageContextInit)
+ const pageContext = await renderPage(pageContextInit);
- const { httpResponse } = pageContext
+ const { httpResponse } = pageContext;
if (!httpResponse) {
- return next()
+ return next();
} else {
- const { body, statusCode, headers, earlyHints } = httpResponse
+ const { body, statusCode, headers, earlyHints } = httpResponse;
// if (res.writeEarlyHints) res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) })
- headers.forEach(([name, value]) => res.setHeader(name, value))
- res.status(statusCode)
- if (!res.hasHeader('Content-Type')) res.setHeader('Content-Type', 'text/html');
- // For HTTP streams use httpResponse.pipe() instead, see https://vite-plugin-ssr.com/stream
- res.send(body)
+ headers.forEach(([name, value]) => res.setHeader(name, value));
+ res.status(statusCode);
+ if (!res.hasHeader("Content-Type"))
+ res.setHeader("Content-Type", "text/html");
+ // For HTTP streams use httpResponse.pipe() instead, see https://vike.dev/stream
+ res.send(body);
}
- })
+ });
- const port = process.env.PORT || 3000
- app.listen(port)
- console.log(`Server (${process.env.NODE_ENV}) running at http://localhost:${port}`)
+ const port = process.env.PORT || 3000;
+ app.listen(port);
+ console.log(
+ `Server (${process.env.NODE_ENV}) running at http://localhost:${port}`
+ );
}
diff --git a/src/dev/color-schemes.ts b/src/_legacy/map-dev/color-schemes.ts
similarity index 100%
rename from src/dev/color-schemes.ts
rename to src/_legacy/map-dev/color-schemes.ts
diff --git a/src/dev/column-inspector/column-inspector.module.styl b/src/_legacy/map-dev/column-inspector/column-inspector.module.styl
similarity index 100%
rename from src/dev/column-inspector/column-inspector.module.styl
rename to src/_legacy/map-dev/column-inspector/column-inspector.module.styl
diff --git a/src/dev/column-inspector/index.ts b/src/_legacy/map-dev/column-inspector/index.ts
similarity index 100%
rename from src/dev/column-inspector/index.ts
rename to src/_legacy/map-dev/column-inspector/index.ts
diff --git a/src/dev/column-inspector/modal-panel.ts b/src/_legacy/map-dev/column-inspector/modal-panel.ts
similarity index 100%
rename from src/dev/column-inspector/modal-panel.ts
rename to src/_legacy/map-dev/column-inspector/modal-panel.ts
diff --git a/src/dev/index.ts b/src/_legacy/map-dev/index.ts
similarity index 98%
rename from src/dev/index.ts
rename to src/_legacy/map-dev/index.ts
index 9cb1405f..5fec9021 100644
--- a/src/dev/index.ts
+++ b/src/_legacy/map-dev/index.ts
@@ -11,7 +11,7 @@ import {
import { loadableElement } from "~/_utils";
import styles from "./main.module.styl";
import { MapColorsInspector } from "./color-schemes";
-import { WeaverPage } from "../weaver";
+import { WeaverPage } from "../../weaver";
const h = hyper.styled(styles);
export default function DevIndex() {
diff --git a/src/dev/main.module.styl b/src/_legacy/map-dev/main.module.styl
similarity index 100%
rename from src/dev/main.module.styl
rename to src/_legacy/map-dev/main.module.styl
diff --git a/src/dev/map-layers/catalog.ts b/src/_legacy/map-dev/map-layers/catalog.ts
similarity index 97%
rename from src/dev/map-layers/catalog.ts
rename to src/_legacy/map-dev/map-layers/catalog.ts
index 9b781022..a39ea8e1 100644
--- a/src/dev/map-layers/catalog.ts
+++ b/src/_legacy/map-dev/map-layers/catalog.ts
@@ -5,7 +5,7 @@ import { Routes, Route, Link, useParams } from "react-router-dom";
import styles from "../main.module.styl";
import { useAPIResult, ErrorBoundary } from "@macrostrat/ui-components";
import { ParentRouteButton } from "~/components/map-navbar";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
import { Spinner } from "@blueprintjs/core";
import { BasicLayerInspectorPage } from ".";
diff --git a/src/dev/map-layers/index.ts b/src/_legacy/map-dev/map-layers/index.ts
similarity index 96%
rename from src/dev/map-layers/index.ts
rename to src/_legacy/map-dev/map-layers/index.ts
index 7628a546..291e3f27 100644
--- a/src/dev/map-layers/index.ts
+++ b/src/_legacy/map-dev/map-layers/index.ts
@@ -11,13 +11,13 @@ import {
import { useStoredState, useDarkMode } from "@macrostrat/ui-components";
import mapboxgl from "mapbox-gl";
import { useCallback, useEffect, useState, useMemo } from "react";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
import { FloatingNavbar } from "@macrostrat/map-interface";
-import { useAppActions } from "../../map-interface/app-state";
+import { useAppActions } from "../../../pages/map/map-interface/app-state";
import { LocationPanel } from "@macrostrat/map-interface";
-import { MapAreaContainer } from "../../map-interface/map-page";
-import { PanelCard } from "../../map-interface/map-page/menu";
-import { getBaseMapStyle } from "../../map-interface/map-page/map-view";
+import { MapAreaContainer } from "../../../pages/map/map-interface/map-page";
+import { PanelCard } from "../../../pages/map/map-interface/map-page/menu";
+import { getBaseMapStyle } from "../../../pages/map/map-interface/map-page/map-view";
import { MapLoadingButton } from "@macrostrat/map-interface";
import {
toggleLineSymbols,
diff --git a/src/dev/map-layers/raster-map.ts b/src/_legacy/map-dev/map-layers/raster-map.ts
similarity index 90%
rename from src/dev/map-layers/raster-map.ts
rename to src/_legacy/map-dev/map-layers/raster-map.ts
index 60758a66..068d2ff2 100644
--- a/src/dev/map-layers/raster-map.ts
+++ b/src/_legacy/map-dev/map-layers/raster-map.ts
@@ -2,10 +2,13 @@ import { FormGroup, Label, Slider, Spinner } from "@blueprintjs/core";
import { useDarkMode } from "@macrostrat/ui-components";
import { useEffect, useState, useMemo } from "react";
import { useSelector } from "react-redux";
-import { useAppActions, useAppState } from "~/map-interface/app-state";
-import { MapAreaContainer } from "~/map-interface/map-page";
-import { PanelCard } from "~/map-interface/map-page/menu";
-import { getBaseMapStyle } from "~/map-interface/map-page/map-view";
+import {
+ useAppActions,
+ useAppState,
+} from "~/pages/map/map-interface/app-state";
+import { MapAreaContainer } from "~/pages/map/map-interface/map-page";
+import { PanelCard } from "~/pages/map/map-interface/map-page/menu";
+import { getBaseMapStyle } from "~/pages/map/map-interface/map-page/map-view";
import { MacrostratRasterTileset, buildRasterStyle, h } from ".";
import { FloatingNavbar, MapLoadingButton } from "@macrostrat/map-interface";
import { useMapStyle } from "./utils";
diff --git a/src/dev/map-layers/utils.ts b/src/_legacy/map-dev/map-layers/utils.ts
similarity index 100%
rename from src/dev/map-layers/utils.ts
rename to src/_legacy/map-dev/map-layers/utils.ts
diff --git a/src/burwell-sources/app-state/action-runner.ts b/src/_legacy/map-sources/app-state/action-runner.ts
similarity index 100%
rename from src/burwell-sources/app-state/action-runner.ts
rename to src/_legacy/map-sources/app-state/action-runner.ts
diff --git a/src/burwell-sources/app-state/fetch.ts b/src/_legacy/map-sources/app-state/fetch.ts
similarity index 100%
rename from src/burwell-sources/app-state/fetch.ts
rename to src/_legacy/map-sources/app-state/fetch.ts
diff --git a/src/burwell-sources/app-state/hooks.ts b/src/_legacy/map-sources/app-state/hooks.ts
similarity index 100%
rename from src/burwell-sources/app-state/hooks.ts
rename to src/_legacy/map-sources/app-state/hooks.ts
diff --git a/src/burwell-sources/app-state/index.ts b/src/_legacy/map-sources/app-state/index.ts
similarity index 100%
rename from src/burwell-sources/app-state/index.ts
rename to src/_legacy/map-sources/app-state/index.ts
diff --git a/src/burwell-sources/app-state/reducer.ts b/src/_legacy/map-sources/app-state/reducer.ts
similarity index 100%
rename from src/burwell-sources/app-state/reducer.ts
rename to src/_legacy/map-sources/app-state/reducer.ts
diff --git a/src/burwell-sources/app-state/types.ts b/src/_legacy/map-sources/app-state/types.ts
similarity index 100%
rename from src/burwell-sources/app-state/types.ts
rename to src/_legacy/map-sources/app-state/types.ts
diff --git a/src/burwell-sources/app-state/utils.ts b/src/_legacy/map-sources/app-state/utils.ts
similarity index 100%
rename from src/burwell-sources/app-state/utils.ts
rename to src/_legacy/map-sources/app-state/utils.ts
diff --git a/src/burwell-sources/archive_/content.ts b/src/_legacy/map-sources/archive_/content.ts
similarity index 100%
rename from src/burwell-sources/archive_/content.ts
rename to src/_legacy/map-sources/archive_/content.ts
diff --git a/src/burwell-sources/archive_/css/skeleton.styl b/src/_legacy/map-sources/archive_/css/skeleton.styl
similarity index 100%
rename from src/burwell-sources/archive_/css/skeleton.styl
rename to src/_legacy/map-sources/archive_/css/skeleton.styl
diff --git a/src/burwell-sources/archive_/css/styles.styl b/src/_legacy/map-sources/archive_/css/styles.styl
similarity index 100%
rename from src/burwell-sources/archive_/css/styles.styl
rename to src/_legacy/map-sources/archive_/css/styles.styl
diff --git a/src/burwell-sources/archive_/index-map.ts b/src/_legacy/map-sources/archive_/index-map.ts
similarity index 100%
rename from src/burwell-sources/archive_/index-map.ts
rename to src/_legacy/map-sources/archive_/index-map.ts
diff --git a/src/burwell-sources/archive_/options.tsx b/src/_legacy/map-sources/archive_/options.tsx
similarity index 100%
rename from src/burwell-sources/archive_/options.tsx
rename to src/_legacy/map-sources/archive_/options.tsx
diff --git a/src/burwell-sources/archive_/scale-button.tsx b/src/_legacy/map-sources/archive_/scale-button.tsx
similarity index 100%
rename from src/burwell-sources/archive_/scale-button.tsx
rename to src/_legacy/map-sources/archive_/scale-button.tsx
diff --git a/src/burwell-sources/archive_/source-map.tsx b/src/_legacy/map-sources/archive_/source-map.tsx
similarity index 100%
rename from src/burwell-sources/archive_/source-map.tsx
rename to src/_legacy/map-sources/archive_/source-map.tsx
diff --git a/src/burwell-sources/components/app.ts b/src/_legacy/map-sources/components/app.ts
similarity index 91%
rename from src/burwell-sources/components/app.ts
rename to src/_legacy/map-sources/components/app.ts
index 5b25d40c..52b4b262 100644
--- a/src/burwell-sources/components/app.ts
+++ b/src/_legacy/map-sources/components/app.ts
@@ -1,5 +1,5 @@
import { useEffect } from "react";
-import { useBurwellActions } from "~/burwell-sources/app-state";
+import { useBurwellActions } from "~/_legacy/map-sources/app-state";
import hyper from "@macrostrat/hyper";
import IndexMapContainer from "./map";
import { InfoDrawer } from "./info-drawer";
diff --git a/src/burwell-sources/components/feature-list.tsx b/src/_legacy/map-sources/components/feature-list.tsx
similarity index 97%
rename from src/burwell-sources/components/feature-list.tsx
rename to src/_legacy/map-sources/components/feature-list.tsx
index 0a5ea520..d17fb8da 100644
--- a/src/burwell-sources/components/feature-list.tsx
+++ b/src/_legacy/map-sources/components/feature-list.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { NavLink } from "react-router-dom";
-import { useBurwellActions } from "~/burwell-sources/app-state";
+import { useBurwellActions } from "~/_legacy/map-sources/app-state";
import { ExpansionPanel } from "@macrostrat/map-interface";
import h from "@macrostrat/hyper";
import { settings, zoomMap } from "../app-state/utils";
diff --git a/src/burwell-sources/components/info-drawer.ts b/src/_legacy/map-sources/components/info-drawer.ts
similarity index 100%
rename from src/burwell-sources/components/info-drawer.ts
rename to src/_legacy/map-sources/components/info-drawer.ts
diff --git a/src/burwell-sources/components/main.module.scss b/src/_legacy/map-sources/components/main.module.scss
similarity index 100%
rename from src/burwell-sources/components/main.module.scss
rename to src/_legacy/map-sources/components/main.module.scss
diff --git a/src/burwell-sources/components/map/index.tsx b/src/_legacy/map-sources/components/map/index.tsx
similarity index 97%
rename from src/burwell-sources/components/map/index.tsx
rename to src/_legacy/map-sources/components/map/index.tsx
index fc71a82b..68635695 100644
--- a/src/burwell-sources/components/map/index.tsx
+++ b/src/_legacy/map-sources/components/map/index.tsx
@@ -3,7 +3,7 @@ import {
useBurwellActions,
useBurwellState,
flyToData,
-} from "~/burwell-sources/app-state";
+} from "~/_legacy/map-sources/app-state";
import { initializeMap } from "./initialize-map";
import { mapSources } from "./map-sources";
import h from "@macrostrat/hyper";
diff --git a/src/burwell-sources/components/map/initialize-map.ts b/src/_legacy/map-sources/components/map/initialize-map.ts
similarity index 100%
rename from src/burwell-sources/components/map/initialize-map.ts
rename to src/_legacy/map-sources/components/map/initialize-map.ts
diff --git a/src/burwell-sources/components/map/map-sources.ts b/src/_legacy/map-sources/components/map/map-sources.ts
similarity index 100%
rename from src/burwell-sources/components/map/map-sources.ts
rename to src/_legacy/map-sources/components/map/map-sources.ts
diff --git a/src/burwell-sources/components/options.tsx b/src/_legacy/map-sources/components/options.tsx
similarity index 97%
rename from src/burwell-sources/components/options.tsx
rename to src/_legacy/map-sources/components/options.tsx
index 93f361ed..f16328aa 100644
--- a/src/burwell-sources/components/options.tsx
+++ b/src/_legacy/map-sources/components/options.tsx
@@ -10,7 +10,7 @@ import {
import {
useBurwellActions,
useBurwellState,
-} from "~/burwell-sources/app-state";
+} from "~/_legacy/map-sources/app-state";
import h from "@macrostrat/hyper";
const capitalizeWord = (word) => {
diff --git a/src/burwell-sources/index.ts b/src/_legacy/map-sources/index.ts
similarity index 100%
rename from src/burwell-sources/index.ts
rename to src/_legacy/map-sources/index.ts
diff --git a/src/components/map-navbar/index.ts b/src/components/map-navbar/index.ts
index f0c9111d..2c64b4bf 100644
--- a/src/components/map-navbar/index.ts
+++ b/src/components/map-navbar/index.ts
@@ -1,4 +1,4 @@
-import { LinkButton } from "~/map-interface/components/buttons";
+import { LinkButton } from "~/pages/map/map-interface/components/buttons";
import { AnchorButton } from "@blueprintjs/core";
import { FloatingNavbar, MapLoadingButton } from "@macrostrat/map-interface";
import { useMapStatus } from "@macrostrat/mapbox-react";
diff --git a/src/map-interface/page-info.ts b/src/components/page-info.ts
similarity index 100%
rename from src/map-interface/page-info.ts
rename to src/components/page-info.ts
diff --git a/src/index.ts b/src/index.ts
index f952e10e..4dde05d2 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,7 +3,7 @@ import "./styles/padding.css";
import { FocusStyleManager } from "@blueprintjs/core";
import h from "@macrostrat/hyper";
-import { Page } from "./pages/map/map";
+import { Page } from "./pages/map/map-interface";
FocusStyleManager.onlyShowFocusOnTabs();
diff --git a/src/map-interface/index.ts b/src/map-interface/index.ts
deleted file mode 100644
index e0ab2c49..00000000
--- a/src/map-interface/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./map-page";
diff --git a/src/pages/about/index.page.tsx b/src/pages/about/index.page.tsx
index 3cf7a11f..3120478e 100644
--- a/src/pages/about/index.page.tsx
+++ b/src/pages/about/index.page.tsx
@@ -1,14 +1,14 @@
-import './code.css'
+import "./code.css";
-export { Page }
+export { Page };
function Page() {
return (
<>
About
- Example of using vite-plugin-ssr
.
+ Example of using vike
.
>
- )
+ );
}
diff --git a/src/pages/column/@id.page.server.ts b/src/pages/column/@id.page.server.ts
index 88cd5a08..ed209bb9 100644
--- a/src/pages/column/@id.page.server.ts
+++ b/src/pages/column/@id.page.server.ts
@@ -1,5 +1,5 @@
import fetch from "node-fetch";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
const apiAddress = SETTINGS.apiDomain + "/api/v2/units";
diff --git a/src/pages/dev/paleo/paleo-map.ts b/src/pages/dev/paleo/paleo-map.ts
index 2996f156..ca0173f6 100644
--- a/src/pages/dev/paleo/paleo-map.ts
+++ b/src/pages/dev/paleo/paleo-map.ts
@@ -1,9 +1,9 @@
import h from "@macrostrat/hyper";
-import { MacrostratVectorTileset } from "~/dev/map-layers";
+import { MacrostratVectorTileset } from "~/_legacy/map-dev/map-layers";
import { buildMacrostratStyle } from "@macrostrat/mapbox-styles";
import mapboxgl from "mapbox-gl";
import { useCallback, useMemo, useReducer } from "react";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
import { Switch, HTMLSelect, Spinner } from "@blueprintjs/core";
import {
Spacer,
@@ -26,22 +26,30 @@ import {
buildInspectorStyle,
} from "@macrostrat/map-interface";
import { TimescalePanel } from "./timescale";
+import { MapPosition, getMapPosition } from "@macrostrat/mapbox-utils";
import { useAPIResult } from "@macrostrat/ui-components";
import { getHashString, setHashString } from "@macrostrat/ui-components";
// Having to include these global styles is a bit awkward
import "~/styles/global.styl";
+import {
+ applyMapPositionToHash,
+ getMapPositionForHash,
+} from "~/pages/map/map-interface/app-state/reducers/hash-string";
// Import other components
type PaleogeographyState = {
model_id: number;
age: number;
+ mapPosition: MapPosition;
+ initialized: boolean;
};
type PaleogeographyAction =
| { type: "set-model"; model_id: number }
| { type: "set-age"; age: number }
+ | { type: "set-map-position"; mapPosition: MapPosition }
| { type: "initialize"; state: PaleogeographyState };
function usePaleogeographyState(
@@ -53,7 +61,6 @@ function usePaleogeographyState(
const [state, dispatch] = useReducer(
(state: PaleogeographyState, action: PaleogeographyAction) => {
- console.log(state, action);
switch (action.type) {
case "set-model":
return {
@@ -63,21 +70,32 @@ function usePaleogeographyState(
};
case "set-age":
return { ...state, age: action.age };
+ case "set-map-position":
+ return { ...state, mapPosition: action.mapPosition };
case "initialize":
- return action.state;
+ return { ...action.state, initialized: true };
}
},
- { model_id: null, age: null }
+ { model_id: null, age: null, mapPosition: null, initialized: false }
);
+ const { model_id, age, mapPosition } = state;
+
useEffect(() => {
- const { model_id, age } = state;
- if (model_id == null || age == null) return;
- setHashString({ model_id, age }, { sort: false });
- }, [state]);
+ if (model_id == null || age == null || mapPosition == null) return;
+ let args: any = { model_id, age };
+ applyMapPositionToHash(args, mapPosition);
+ setHashString(args, { sort: false, arrayFormat: "comma" });
+ }, [model_id, age, mapPosition]);
useEffect(() => {
- const { model_id, age } = getHashString(window.location.hash) ?? {};
+ const hashData = getHashString(window.location.hash) ?? {};
+ const { model_id, age, ...rest } = hashData;
+ const mapPosition = getMapPositionForHash(
+ rest,
+ defaultState.mapPosition.camera
+ );
+
if (model_id == null || age == null) return;
if (Array.isArray(model_id)) return;
if (Array.isArray(age)) return;
@@ -86,6 +104,8 @@ function usePaleogeographyState(
state: {
model_id: parseInt(model_id) ?? defaultModelID,
age: parseInt(age) ?? defaultAge,
+ mapPosition,
+ initialized: true,
},
});
}, []);
@@ -93,9 +113,19 @@ function usePaleogeographyState(
return [state, dispatch];
}
+const baseTilesetURL =
+ SETTINGS.burwellTileDomain +
+ "/carto-slim-rotated/{z}/{x}/{y}?model_id=6&t_step=0";
+
const common = {
version: 8,
- sources: {},
+ sources: {
+ burwell: {
+ type: "vector",
+ tiles: [baseTilesetURL],
+ tileSize: 512,
+ },
+ },
glyphs: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
sprite: "mapbox://sprites/mapbox/light-v10",
};
@@ -112,13 +142,14 @@ const darkStyle = {
},
},
{
- id: "plate",
+ id: "plates",
type: "fill",
source: "burwell",
- "source-layer": "plate",
+ "source-layer": "plates",
paint: {
+ //"fill-color": "color",
"fill-color": "hsl(55, 1%, 20%)",
- //"fill-opacity": 0.8,
+ "fill-opacity": 0.8,
},
},
],
@@ -135,13 +166,14 @@ const lightStyle = {
},
},
{
- id: "plate",
+ id: "plates",
type: "fill",
source: "burwell",
- "source-layer": "plate",
+ "source-layer": "plates",
paint: {
+ //"fill-color": "color",
"fill-color": "hsl(55, 11%, 96%)",
- //"fill-opacity": 0.8,
+ "fill-opacity": 0.8,
},
},
],
@@ -172,9 +204,6 @@ export default function PaleoMap({
const mapboxToken = SETTINGS.mapboxAccessToken;
mapboxgl.accessToken = mapboxToken;
- let transformRequest = null;
- let mapPosition = null;
-
const style = isEnabled ? darkStyle : lightStyle;
const [isOpen, setOpen] = useState(false);
@@ -187,11 +216,19 @@ export default function PaleoMap({
const [actualStyle, setActualStyle] = useState(style);
const [paleoState, dispatch] = usePaleogeographyState({
- model_id: 6,
+ model_id: null,
age: 0,
+ initialized: false,
+ mapPosition: {
+ camera: {
+ lng: -40,
+ lat: 45,
+ altitude: 5000000,
+ },
+ },
});
- const { age, model_id } = paleoState;
+ const { age, model_id, mapPosition } = paleoState;
const plateModelId = model_id;
const models: { id: string; max_age: number; min_age: number }[] =
@@ -218,6 +255,8 @@ export default function PaleoMap({
// }
// }, [model, age]);
+ // Manage location hash
+
const _overlayStyle = useMemo(() => {
if (plateModelId == null || age == null) return overlayStyle;
return replaceSourcesForTileset(overlayStyle, plateModelId, age);
@@ -240,6 +279,11 @@ export default function PaleoMap({
setInspectPosition(position);
}, []);
+ const onMapMoved = useCallback(
+ (pos) => dispatch({ type: "set-map-position", mapPosition: pos }),
+ []
+ );
+
if (age == null || model_id == null) {
return h(Spinner);
}
@@ -264,7 +308,7 @@ export default function PaleoMap({
}),
h(FeaturePanel, {
features: data,
- focusedSource: "burwell",
+ focusedSource: "plates",
focusedSourceTitle: "Paleogeography",
}),
]
@@ -315,10 +359,11 @@ export default function PaleoMap({
MapView,
{
style: actualStyle,
- transformRequest,
mapPosition,
projection: { name: "globe" },
+ enableTerrain: false,
mapboxToken,
+ onMapMoved,
},
[
h(FeatureSelectionHandler, {
diff --git a/src/pages/index/index.page.tsx b/src/pages/index.page.tsx
similarity index 100%
rename from src/pages/index/index.page.tsx
rename to src/pages/index.page.tsx
diff --git a/src/changelog.mdx b/src/pages/map/changelog.mdx
similarity index 100%
rename from src/changelog.mdx
rename to src/pages/map/changelog.mdx
diff --git a/src/pages/map/index.page.ts b/src/pages/map/index.page.ts
index 0a6e342d..0ce1df15 100644
--- a/src/pages/map/index.page.ts
+++ b/src/pages/map/index.page.ts
@@ -1,7 +1,7 @@
import h from "@macrostrat/hyper";
import { ClientOnly } from "~/renderer/client-only";
-const MapPage = () => import("./map");
+const MapPage = () => import("./map-interface");
export function Page() {
return h(
diff --git a/src/map-interface/app-state/handlers/columns.ts b/src/pages/map/map-interface/app-state/handlers/columns.ts
similarity index 100%
rename from src/map-interface/app-state/handlers/columns.ts
rename to src/pages/map/map-interface/app-state/handlers/columns.ts
diff --git a/src/map-interface/app-state/handlers/fetch.ts b/src/pages/map/map-interface/app-state/handlers/fetch.ts
similarity index 98%
rename from src/map-interface/app-state/handlers/fetch.ts
rename to src/pages/map/map-interface/app-state/handlers/fetch.ts
index 8202d8d7..8239e461 100644
--- a/src/map-interface/app-state/handlers/fetch.ts
+++ b/src/pages/map/map-interface/app-state/handlers/fetch.ts
@@ -1,6 +1,6 @@
import axios from "axios";
-import { joinURL } from "~/map-interface/utils";
-import { SETTINGS } from "../../settings";
+import { joinURL } from "~/pages/map/map-interface/utils";
+import { SETTINGS } from "~/settings";
import { ColumnGeoJSONRecord } from "../reducers";
import { UPDATE_FILTERED_COLUMNS } from "../reducers/filtered-columns";
diff --git a/src/map-interface/app-state/handlers/filters.ts b/src/pages/map/map-interface/app-state/handlers/filters.ts
similarity index 99%
rename from src/map-interface/app-state/handlers/filters.ts
rename to src/pages/map/map-interface/app-state/handlers/filters.ts
index e4d12d68..77fc9692 100644
--- a/src/map-interface/app-state/handlers/filters.ts
+++ b/src/pages/map/map-interface/app-state/handlers/filters.ts
@@ -1,5 +1,5 @@
import axios from "axios";
-import { SETTINGS } from "../../settings";
+import { SETTINGS } from "~/settings";
export const base = `${SETTINGS.apiDomain}/api/v2`;
diff --git a/src/map-interface/app-state/handlers/index.ts b/src/pages/map/map-interface/app-state/handlers/index.ts
similarity index 98%
rename from src/map-interface/app-state/handlers/index.ts
rename to src/pages/map/map-interface/app-state/handlers/index.ts
index 8c0c3cd8..d62329e7 100644
--- a/src/map-interface/app-state/handlers/index.ts
+++ b/src/pages/map/map-interface/app-state/handlers/index.ts
@@ -11,11 +11,11 @@ import { AppAction, AppState } from "../reducers";
import axios from "axios";
import { runFilter } from "./filters";
import { push } from "@lagunovsky/redux-react-router";
-import { routerBasename, mapPagePrefix } from "~/map-interface/settings";
+import { routerBasename, mapPagePrefix } from "~/settings";
import { isDetailPanelRoute } from "../nav-hooks";
import { MenuPage, setInfoMarkerPosition } from "../reducers";
-import { formatCoordForZoomLevel } from "~/map-interface/utils/formatting";
+import { formatCoordForZoomLevel } from "~/pages/map/map-interface/utils/formatting";
import { currentPageForPathName } from "../nav-hooks";
import { getInitialStateFromHash } from "../reducers/hash-string";
import { findColumnForLocation, ColumnGeoJSONRecord } from "./columns";
diff --git a/src/map-interface/app-state/hooks.ts b/src/pages/map/map-interface/app-state/hooks.ts
similarity index 100%
rename from src/map-interface/app-state/hooks.ts
rename to src/pages/map/map-interface/app-state/hooks.ts
diff --git a/src/map-interface/app-state/index.ts b/src/pages/map/map-interface/app-state/index.ts
similarity index 100%
rename from src/map-interface/app-state/index.ts
rename to src/pages/map/map-interface/app-state/index.ts
diff --git a/src/map-interface/app-state/nav-hooks.ts b/src/pages/map/map-interface/app-state/nav-hooks.ts
similarity index 97%
rename from src/map-interface/app-state/nav-hooks.ts
rename to src/pages/map/map-interface/app-state/nav-hooks.ts
index d3a0472a..4beb510a 100644
--- a/src/map-interface/app-state/nav-hooks.ts
+++ b/src/pages/map/map-interface/app-state/nav-hooks.ts
@@ -2,7 +2,7 @@ import { useLocation, useNavigate } from "react-router";
import { useAppState } from "./hooks";
import classNames from "classnames";
import { MenuPage } from "./reducers";
-import { routerBasename, mapPagePrefix } from "../settings";
+import { routerBasename, mapPagePrefix } from "~/settings";
export function isDetailPanelRouteInternal(pathname: string) {
/* Check if we're in a detail panel route from within the app. */
diff --git a/src/map-interface/app-state/reducers/core/index.ts b/src/pages/map/map-interface/app-state/reducers/core/index.ts
similarity index 100%
rename from src/map-interface/app-state/reducers/core/index.ts
rename to src/pages/map/map-interface/app-state/reducers/core/index.ts
diff --git a/src/map-interface/app-state/reducers/core/types.ts b/src/pages/map/map-interface/app-state/reducers/core/types.ts
similarity index 100%
rename from src/map-interface/app-state/reducers/core/types.ts
rename to src/pages/map/map-interface/app-state/reducers/core/types.ts
diff --git a/src/map-interface/app-state/reducers/hash-string.ts b/src/pages/map/map-interface/app-state/reducers/hash-string.ts
similarity index 98%
rename from src/map-interface/app-state/reducers/hash-string.ts
rename to src/pages/map/map-interface/app-state/reducers/hash-string.ts
index d080878e..1b4b1333 100644
--- a/src/map-interface/app-state/reducers/hash-string.ts
+++ b/src/pages/map/map-interface/app-state/reducers/hash-string.ts
@@ -9,7 +9,7 @@ import {
fmtInt,
fmt1,
fmt2,
-} from "~/map-interface/utils/formatting";
+} from "~/pages/map/map-interface/utils/formatting";
export function hashStringReducer(state: AppState, action: AppAction) {
switch (action.type) {
@@ -84,9 +84,9 @@ function applyInfoMarkerPosition(
export function applyMapPositionToHash(
args: HashParams,
- mapPosition: MapPosition
+ mapPosition: MapPosition | null
) {
- const pos = mapPosition.camera;
+ const pos = mapPosition?.camera;
if (pos == null) return;
const zoom = mapPosition.target?.zoom;
diff --git a/src/map-interface/app-state/reducers/index.ts b/src/pages/map/map-interface/app-state/reducers/index.ts
similarity index 99%
rename from src/map-interface/app-state/reducers/index.ts
rename to src/pages/map/map-interface/app-state/reducers/index.ts
index 63a01cc1..ccd859da 100644
--- a/src/map-interface/app-state/reducers/index.ts
+++ b/src/pages/map/map-interface/app-state/reducers/index.ts
@@ -9,7 +9,7 @@ import { hashStringReducer } from "./hash-string";
import { matchPath } from "react-router";
import { performanceReducer, PerformanceState } from "../../performance/core";
-import { mapPagePrefix } from "~/map-interface/settings";
+import { mapPagePrefix } from "~/settings";
export const browserHistory = createBrowserHistory();
import { MenuState, AppState, AppAction, MenuAction } from "./types";
diff --git a/src/map-interface/app-state/reducers/map.ts b/src/pages/map/map-interface/app-state/reducers/map.ts
similarity index 100%
rename from src/map-interface/app-state/reducers/map.ts
rename to src/pages/map/map-interface/app-state/reducers/map.ts
diff --git a/src/map-interface/app-state/reducers/types.ts b/src/pages/map/map-interface/app-state/reducers/types.ts
similarity index 100%
rename from src/map-interface/app-state/reducers/types.ts
rename to src/pages/map/map-interface/app-state/reducers/types.ts
diff --git a/src/map-interface/components/About.tsx b/src/pages/map/map-interface/components/About.tsx
similarity index 98%
rename from src/map-interface/components/About.tsx
rename to src/pages/map/map-interface/components/About.tsx
index 75d62a96..7e2ef6bf 100644
--- a/src/map-interface/components/About.tsx
+++ b/src/pages/map/map-interface/components/About.tsx
@@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
import styles from "./about.module.styl";
import newGithubIssueUrl from "new-github-issue-url";
import { AnchorButton } from "@blueprintjs/core";
-import { mapPagePrefix } from "~/map-interface/settings";
+import { mapPagePrefix } from "~/settings";
const h = hyper.styled(styles);
diff --git a/src/map-interface/components/about.module.styl b/src/pages/map/map-interface/components/about.module.styl
similarity index 100%
rename from src/map-interface/components/about.module.styl
rename to src/pages/map/map-interface/components/about.module.styl
diff --git a/src/map-interface/components/buttons.module.styl b/src/pages/map/map-interface/components/buttons.module.styl
similarity index 100%
rename from src/map-interface/components/buttons.module.styl
rename to src/pages/map/map-interface/components/buttons.module.styl
diff --git a/src/map-interface/components/buttons.ts b/src/pages/map/map-interface/components/buttons.ts
similarity index 100%
rename from src/map-interface/components/buttons.ts
rename to src/pages/map/map-interface/components/buttons.ts
diff --git a/src/map-interface/components/card.module.styl b/src/pages/map/map-interface/components/card.module.styl
similarity index 93%
rename from src/map-interface/components/card.module.styl
rename to src/pages/map/map-interface/components/card.module.styl
index c1a315fc..5e06e029 100644
--- a/src/map-interface/components/card.module.styl
+++ b/src/pages/map/map-interface/components/card.module.styl
@@ -9,7 +9,9 @@
min-height 0
-@require "../../styles/_common"
+.spacer
+ flex-grow 1
+ pointer-events none
.closeable-card
padding 0
diff --git a/src/map-interface/components/closeable-card.ts b/src/pages/map/map-interface/components/closeable-card.ts
similarity index 100%
rename from src/map-interface/components/closeable-card.ts
rename to src/pages/map/map-interface/components/closeable-card.ts
diff --git a/src/map-interface/components/docs.module.styl b/src/pages/map/map-interface/components/docs.module.styl
similarity index 100%
rename from src/map-interface/components/docs.module.styl
rename to src/pages/map/map-interface/components/docs.module.styl
diff --git a/src/map-interface/components/docs.ts b/src/pages/map/map-interface/components/docs.ts
similarity index 95%
rename from src/map-interface/components/docs.ts
rename to src/pages/map/map-interface/components/docs.ts
index 3a5208f0..9fdc9528 100644
--- a/src/map-interface/components/docs.ts
+++ b/src/pages/map/map-interface/components/docs.ts
@@ -3,9 +3,9 @@ import { Alignment } from "@blueprintjs/core";
import styles from "./docs.module.styl";
import { useInView } from "react-intersection-observer";
import { HashLink } from "react-router-hash-link";
-import { routerBasename } from "../settings";
+import { routerBasename } from "~/settings";
import classNames from "classnames";
-import { joinURL } from "~/map-interface/utils";
+import { joinURL } from "~/pages/map/map-interface/utils";
const h = hyper.styled(styles);
diff --git a/src/map-interface/components/elevation-chart/index.ts b/src/pages/map/map-interface/components/elevation-chart/index.ts
similarity index 98%
rename from src/map-interface/components/elevation-chart/index.ts
rename to src/pages/map/map-interface/components/elevation-chart/index.ts
index f57f1c7b..b173f6e0 100644
--- a/src/map-interface/components/elevation-chart/index.ts
+++ b/src/pages/map/map-interface/components/elevation-chart/index.ts
@@ -1,5 +1,8 @@
import React, { useRef, useEffect } from "react";
-import { useAppActions, useAppState } from "~/map-interface/app-state";
+import {
+ useAppActions,
+ useAppState,
+} from "~/pages/map/map-interface/app-state";
import hyper from "@macrostrat/hyper";
import { Button, Spinner } from "@blueprintjs/core";
import { select, mouse } from "d3-selection";
@@ -11,7 +14,7 @@ import { useAPIResult } from "@macrostrat/ui-components";
import { LocationFocusButton } from "@macrostrat/mapbox-react";
import styles from "./main.module.styl";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
const h = hyper.styled(styles);
function drawElevationChart(
diff --git a/src/map-interface/components/elevation-chart/main.module.styl b/src/pages/map/map-interface/components/elevation-chart/main.module.styl
similarity index 100%
rename from src/map-interface/components/elevation-chart/main.module.styl
rename to src/pages/map/map-interface/components/elevation-chart/main.module.styl
diff --git a/src/map-interface/components/filter-panel/admonishments.ts b/src/pages/map/map-interface/components/filter-panel/admonishments.ts
similarity index 100%
rename from src/map-interface/components/filter-panel/admonishments.ts
rename to src/pages/map/map-interface/components/filter-panel/admonishments.ts
diff --git a/src/map-interface/components/filter-panel/filters.module.styl b/src/pages/map/map-interface/components/filter-panel/filters.module.styl
similarity index 100%
rename from src/map-interface/components/filter-panel/filters.module.styl
rename to src/pages/map/map-interface/components/filter-panel/filters.module.styl
diff --git a/src/map-interface/components/filter-panel/index.ts b/src/pages/map/map-interface/components/filter-panel/index.ts
similarity index 97%
rename from src/map-interface/components/filter-panel/index.ts
rename to src/pages/map/map-interface/components/filter-panel/index.ts
index 35074fc9..e0093768 100644
--- a/src/map-interface/components/filter-panel/index.ts
+++ b/src/pages/map/map-interface/components/filter-panel/index.ts
@@ -1,7 +1,10 @@
import React, { useState } from "react";
import hyper from "@macrostrat/hyper";
import { Tag, Card, Button, Collapse, Switch } from "@blueprintjs/core";
-import { useFilterState, useAppActions } from "~/map-interface/app-state";
+import {
+ useFilterState,
+ useAppActions,
+} from "~/pages/map/map-interface/app-state";
import { useAdmoinshments } from "./admonishments";
import styles from "./filters.module.styl";
diff --git a/src/map-interface/components/icons/BedrockIcon.tsx b/src/pages/map/map-interface/components/icons/BedrockIcon.tsx
similarity index 100%
rename from src/map-interface/components/icons/BedrockIcon.tsx
rename to src/pages/map/map-interface/components/icons/BedrockIcon.tsx
diff --git a/src/map-interface/components/icons/ColumnIcon.tsx b/src/pages/map/map-interface/components/icons/ColumnIcon.tsx
similarity index 100%
rename from src/map-interface/components/icons/ColumnIcon.tsx
rename to src/pages/map/map-interface/components/icons/ColumnIcon.tsx
diff --git a/src/map-interface/components/icons/ElevationIcon.tsx b/src/pages/map/map-interface/components/icons/ElevationIcon.tsx
similarity index 100%
rename from src/map-interface/components/icons/ElevationIcon.tsx
rename to src/pages/map/map-interface/components/icons/ElevationIcon.tsx
diff --git a/src/map-interface/components/icons/FossilIcon.tsx b/src/pages/map/map-interface/components/icons/FossilIcon.tsx
similarity index 100%
rename from src/map-interface/components/icons/FossilIcon.tsx
rename to src/pages/map/map-interface/components/icons/FossilIcon.tsx
diff --git a/src/map-interface/components/icons/LineIcon.tsx b/src/pages/map/map-interface/components/icons/LineIcon.tsx
similarity index 100%
rename from src/map-interface/components/icons/LineIcon.tsx
rename to src/pages/map/map-interface/components/icons/LineIcon.tsx
diff --git a/src/map-interface/components/info-blocks.module.styl b/src/pages/map/map-interface/components/info-blocks.module.styl
similarity index 100%
rename from src/map-interface/components/info-blocks.module.styl
rename to src/pages/map/map-interface/components/info-blocks.module.styl
diff --git a/src/map-interface/components/info-blocks.ts b/src/pages/map/map-interface/components/info-blocks.ts
similarity index 100%
rename from src/map-interface/components/info-blocks.ts
rename to src/pages/map/map-interface/components/info-blocks.ts
diff --git a/src/map-interface/components/info-drawer/fossil-collections/collections.tsx b/src/pages/map/map-interface/components/info-drawer/fossil-collections/collections.tsx
similarity index 100%
rename from src/map-interface/components/info-drawer/fossil-collections/collections.tsx
rename to src/pages/map/map-interface/components/info-drawer/fossil-collections/collections.tsx
diff --git a/src/map-interface/components/info-drawer/fossil-collections/index.ts b/src/pages/map/map-interface/components/info-drawer/fossil-collections/index.ts
similarity index 100%
rename from src/map-interface/components/info-drawer/fossil-collections/index.ts
rename to src/pages/map/map-interface/components/info-drawer/fossil-collections/index.ts
diff --git a/src/map-interface/components/info-drawer/fossil-collections/main.module.sass b/src/pages/map/map-interface/components/info-drawer/fossil-collections/main.module.sass
similarity index 100%
rename from src/map-interface/components/info-drawer/fossil-collections/main.module.sass
rename to src/pages/map/map-interface/components/info-drawer/fossil-collections/main.module.sass
diff --git a/src/map-interface/components/info-drawer/geo-map.ts b/src/pages/map/map-interface/components/info-drawer/geo-map.ts
similarity index 98%
rename from src/map-interface/components/info-drawer/geo-map.ts
rename to src/pages/map/map-interface/components/info-drawer/geo-map.ts
index a767e4bf..a50803a0 100644
--- a/src/map-interface/components/info-drawer/geo-map.ts
+++ b/src/pages/map/map-interface/components/info-drawer/geo-map.ts
@@ -3,7 +3,7 @@ import { ExpansionPanel } from "@macrostrat/map-interface";
import Reference from "../Reference";
import LongText from "../long-text";
import { IntervalChip } from "../info-blocks";
-import { useAppActions } from "~/map-interface/app-state";
+import { useAppActions } from "~/pages/map/map-interface/app-state";
function LongTextRenderer(props) {
const { name, text } = props;
diff --git a/src/map-interface/components/info-drawer/index.ts b/src/pages/map/map-interface/components/info-drawer/index.ts
similarity index 95%
rename from src/map-interface/components/info-drawer/index.ts
rename to src/pages/map/map-interface/components/info-drawer/index.ts
index e50f5a9d..8481285c 100644
--- a/src/map-interface/components/info-drawer/index.ts
+++ b/src/pages/map/map-interface/components/info-drawer/index.ts
@@ -1,6 +1,6 @@
import hyper from "@macrostrat/hyper";
import { Route, Routes } from "react-router-dom";
-import { MapLayer, useAppActions } from "~/map-interface/app-state";
+import { MapLayer, useAppActions } from "~/pages/map/map-interface/app-state";
import { LocationPanel } from "@macrostrat/map-interface";
import { FossilCollections } from "./fossil-collections";
import { GeologicMapInfo } from "./geo-map";
@@ -8,7 +8,7 @@ import { MacrostratLinkedData } from "./macrostrat-linked";
import { RegionalStratigraphy } from "./reg-strat";
import { Physiography } from "./physiography";
import { XddExpansion } from "./xdd-panel";
-import { useAppState } from "~/map-interface/app-state";
+import { useAppState } from "~/pages/map/map-interface/app-state";
import styles from "./main.module.styl";
import { LoadingArea } from "../transitions";
import { StratColumn } from "./strat-column";
diff --git a/src/map-interface/components/info-drawer/macrostrat-linked.ts b/src/pages/map/map-interface/components/info-drawer/macrostrat-linked.ts
similarity index 100%
rename from src/map-interface/components/info-drawer/macrostrat-linked.ts
rename to src/pages/map/map-interface/components/info-drawer/macrostrat-linked.ts
diff --git a/src/map-interface/components/info-drawer/main.module.styl b/src/pages/map/map-interface/components/info-drawer/main.module.styl
similarity index 95%
rename from src/map-interface/components/info-drawer/main.module.styl
rename to src/pages/map/map-interface/components/info-drawer/main.module.styl
index 012832bf..fc9a25d0 100644
--- a/src/map-interface/components/info-drawer/main.module.styl
+++ b/src/pages/map/map-interface/components/info-drawer/main.module.styl
@@ -1,4 +1,6 @@
-@require "../../../styles/_common"
+.spacer
+ flex-grow 1
+ pointer-events none
.infodrawer-main
margin: 0 -1em -1em;
diff --git a/src/map-interface/components/info-drawer/physiography.ts b/src/pages/map/map-interface/components/info-drawer/physiography.ts
similarity index 100%
rename from src/map-interface/components/info-drawer/physiography.ts
rename to src/pages/map/map-interface/components/info-drawer/physiography.ts
diff --git a/src/map-interface/components/info-drawer/reg-strat.ts b/src/pages/map/map-interface/components/info-drawer/reg-strat.ts
similarity index 94%
rename from src/map-interface/components/info-drawer/reg-strat.ts
rename to src/pages/map/map-interface/components/info-drawer/reg-strat.ts
index 5a352482..79adac51 100644
--- a/src/map-interface/components/info-drawer/reg-strat.ts
+++ b/src/pages/map/map-interface/components/info-drawer/reg-strat.ts
@@ -1,7 +1,7 @@
import h from "@macrostrat/hyper";
import { ExpansionPanel } from "@macrostrat/map-interface";
-import { addCommas } from "~/map-interface/utils";
-import { useAppState } from "~/map-interface/app-state";
+import { addCommas } from "~/pages/map/map-interface/utils";
+import { useAppState } from "~/pages/map/map-interface/app-state";
import { Spinner } from "@blueprintjs/core";
import { Link } from "react-router-dom";
diff --git a/src/map-interface/components/info-drawer/strat-column/index.ts b/src/pages/map/map-interface/components/info-drawer/strat-column/index.ts
similarity index 95%
rename from src/map-interface/components/info-drawer/strat-column/index.ts
rename to src/pages/map/map-interface/components/info-drawer/strat-column/index.ts
index 24924d13..b6922738 100644
--- a/src/map-interface/components/info-drawer/strat-column/index.ts
+++ b/src/pages/map/map-interface/components/info-drawer/strat-column/index.ts
@@ -5,7 +5,7 @@ import { UnitLong } from "@macrostrat/api-types";
//import "@macrostrat/column-components/src/main.module.scss";
import styles from "./strat-column.module.styl";
-import { ColumnSummary } from "~/map-interface/app-state/handlers/columns";
+import { ColumnSummary } from "~/pages/map/map-interface/app-state/handlers/columns";
import { NonIdealState } from "@blueprintjs/core";
import useBreadcrumbs from "use-react-router-breadcrumbs";
import { LinkButton } from "../../buttons";
diff --git a/src/map-interface/components/info-drawer/strat-column/strat-column.module.styl b/src/pages/map/map-interface/components/info-drawer/strat-column/strat-column.module.styl
similarity index 100%
rename from src/map-interface/components/info-drawer/strat-column/strat-column.module.styl
rename to src/pages/map/map-interface/components/info-drawer/strat-column/strat-column.module.styl
diff --git a/src/map-interface/components/info-drawer/xdd-panel/Article.tsx b/src/pages/map/map-interface/components/info-drawer/xdd-panel/Article.tsx
similarity index 100%
rename from src/map-interface/components/info-drawer/xdd-panel/Article.tsx
rename to src/pages/map/map-interface/components/info-drawer/xdd-panel/Article.tsx
diff --git a/src/map-interface/components/info-drawer/xdd-panel/Journal.tsx b/src/pages/map/map-interface/components/info-drawer/xdd-panel/Journal.tsx
similarity index 92%
rename from src/map-interface/components/info-drawer/xdd-panel/Journal.tsx
rename to src/pages/map/map-interface/components/info-drawer/xdd-panel/Journal.tsx
index 643b171d..6223e5b0 100644
--- a/src/map-interface/components/info-drawer/xdd-panel/Journal.tsx
+++ b/src/pages/map/map-interface/components/info-drawer/xdd-panel/Journal.tsx
@@ -2,7 +2,7 @@ import Article from "./Article";
import { Divider } from "@blueprintjs/core";
import h from "@macrostrat/hyper";
import { SubExpansionPanel } from "@macrostrat/map-interface";
-import { XDDSnippet } from "~/map-interface/app-state/handlers/fetch";
+import { XDDSnippet } from "~/pages/map/map-interface/app-state/handlers/fetch";
function Journal(props) {
return h("div.journal", [
diff --git a/src/map-interface/components/info-drawer/xdd-panel/index.ts b/src/pages/map/map-interface/components/info-drawer/xdd-panel/index.ts
similarity index 89%
rename from src/map-interface/components/info-drawer/xdd-panel/index.ts
rename to src/pages/map/map-interface/components/info-drawer/xdd-panel/index.ts
index 52a6d61c..ab99c250 100644
--- a/src/map-interface/components/info-drawer/xdd-panel/index.ts
+++ b/src/pages/map/map-interface/components/info-drawer/xdd-panel/index.ts
@@ -2,8 +2,11 @@ import { Spinner } from "@blueprintjs/core";
import h from "@macrostrat/hyper";
import Journal from "./Journal";
import { ExpansionPanel } from "@macrostrat/map-interface";
-import { useAppActions, useAppState } from "~/map-interface/app-state";
-import { XDDSnippet } from "~/map-interface/app-state/handlers/fetch";
+import {
+ useAppActions,
+ useAppState,
+} from "~/pages/map/map-interface/app-state";
+import { XDDSnippet } from "~/pages/map/map-interface/app-state/handlers/fetch";
function XddExpansion() {
const runAction = useAppActions();
diff --git a/src/map-interface/components/long-text.ts b/src/pages/map/map-interface/components/long-text.ts
similarity index 100%
rename from src/map-interface/components/long-text.ts
rename to src/pages/map/map-interface/components/long-text.ts
diff --git a/src/map-interface/components/navbar/index.ts b/src/pages/map/map-interface/components/navbar/index.ts
similarity index 100%
rename from src/map-interface/components/navbar/index.ts
rename to src/pages/map/map-interface/components/navbar/index.ts
diff --git a/src/map-interface/components/navbar/navbar.module.sass b/src/pages/map/map-interface/components/navbar/navbar.module.sass
similarity index 100%
rename from src/map-interface/components/navbar/navbar.module.sass
rename to src/pages/map/map-interface/components/navbar/navbar.module.sass
diff --git a/src/map-interface/components/transitions/index.ts b/src/pages/map/map-interface/components/transitions/index.ts
similarity index 100%
rename from src/map-interface/components/transitions/index.ts
rename to src/pages/map/map-interface/components/transitions/index.ts
diff --git a/src/map-interface/components/transitions/main.module.styl b/src/pages/map/map-interface/components/transitions/main.module.styl
similarity index 100%
rename from src/map-interface/components/transitions/main.module.styl
rename to src/pages/map/map-interface/components/transitions/main.module.styl
diff --git a/src/map-interface/debug/index.ts b/src/pages/map/map-interface/debug/index.ts
similarity index 100%
rename from src/map-interface/debug/index.ts
rename to src/pages/map/map-interface/debug/index.ts
diff --git a/src/map-interface/debug/main.module.styl b/src/pages/map/map-interface/debug/main.module.styl
similarity index 100%
rename from src/map-interface/debug/main.module.styl
rename to src/pages/map/map-interface/debug/main.module.styl
diff --git a/src/pages/map/map-interface/index.ts b/src/pages/map/map-interface/index.ts
new file mode 100644
index 00000000..75e7f1f3
--- /dev/null
+++ b/src/pages/map/map-interface/index.ts
@@ -0,0 +1,46 @@
+import { Route, Routes } from "react-router-dom";
+import { ReduxRouter } from "@lagunovsky/redux-react-router";
+import h from "@macrostrat/hyper";
+
+import "~/styles/global.styl";
+import "./searchbar.styl";
+import "./ui-components.styl";
+
+import { Provider } from "react-redux";
+import { createStore, compose, applyMiddleware } from "redux";
+import reducerStack, { Action, browserHistory, AppState } from "./app-state";
+import { createRouterMiddleware } from "@lagunovsky/redux-react-router";
+import { onDemand } from "~/_utils";
+import { mapPagePrefix } from "~/settings";
+
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+
+const routerMiddleware = createRouterMiddleware(browserHistory);
+// Create the data store
+let store = createStore(
+ reducerStack,
+ composeEnhancers(applyMiddleware(routerMiddleware))
+);
+
+import MapPage from "./map-page";
+
+const Sources = onDemand(() => import("~/_legacy/map-sources"));
+const DevMapPage = onDemand(() => import("~/_legacy/map-dev"));
+
+export default function MapApp({ routerBasename }) {
+ return h(
+ Provider,
+ { store },
+ h(
+ ReduxRouter,
+ { basename: routerBasename, store, history: browserHistory },
+ [
+ h(Routes, [
+ h(Route, { path: mapPagePrefix + "/dev/*", element: h(DevMapPage) }),
+ h(Route, { path: mapPagePrefix + "/sources", element: h(Sources) }),
+ h(Route, { path: "*", element: h(MapPage) }),
+ ]),
+ ]
+ )
+ );
+}
diff --git a/src/map-interface/map-page/index.ts b/src/pages/map/map-interface/map-page/index.ts
similarity index 94%
rename from src/map-interface/map-page/index.ts
rename to src/pages/map/map-interface/map-page/index.ts
index 6d9f1701..f3ce0639 100644
--- a/src/map-interface/map-page/index.ts
+++ b/src/pages/map/map-interface/map-page/index.ts
@@ -2,7 +2,7 @@ import { Suspense, useEffect, useCallback, useRef } from "react";
// Import other components
import hyper from "@macrostrat/hyper";
import Searchbar from "../components/navbar";
-import { Spinner, Button, Switch } from "@blueprintjs/core";
+import { Spinner } from "@blueprintjs/core";
import { useSelector } from "react-redux";
import loadable from "@loadable/component";
import { useAppState, useAppActions } from "../app-state";
@@ -12,10 +12,9 @@ import { useContextPanelOpen, useContextClass } from "../app-state";
import { MapAreaContainer } from "@macrostrat/map-interface";
import { Routes, Route, useParams } from "react-router-dom";
import classNames from "classnames";
-import { MenuPage, PanelCard } from "./menu";
-import { mapPagePrefix } from "../settings";
+import { MenuPage } from "./menu";
+import { mapPagePrefix } from "~/settings";
import MapContainer from "./map-view";
-import DevIndex from "../../dev";
const ElevationChart = loadable(() => import("../components/elevation-chart"));
const InfoDrawer = loadable(() => import("../components/info-drawer"));
@@ -107,7 +106,6 @@ function MapPageRoutes() {
})
)
),
- h(Route, { path: mapPagePrefix + "/dev/*", element: h(DevIndex) }),
h(Route, { path: "*", element: h(MapPage) }),
]);
}
diff --git a/src/map-interface/map-page/main.module.styl b/src/pages/map/map-interface/map-page/main.module.styl
similarity index 100%
rename from src/map-interface/map-page/main.module.styl
rename to src/pages/map/map-interface/map-page/main.module.styl
diff --git a/src/map-interface/map-page/map-styles/index.ts b/src/pages/map/map-interface/map-page/map-styles/index.ts
similarity index 100%
rename from src/map-interface/map-page/map-styles/index.ts
rename to src/pages/map/map-interface/map-page/map-styles/index.ts
diff --git a/src/map-interface/map-page/map-styles/line-symbols.ts b/src/pages/map/map-interface/map-page/map-styles/line-symbols.ts
similarity index 100%
rename from src/map-interface/map-page/map-styles/line-symbols.ts
rename to src/pages/map/map-interface/map-page/map-styles/line-symbols.ts
diff --git a/src/map-interface/map-page/map-styles/map-sources.ts b/src/pages/map/map-interface/map-page/map-styles/map-sources.ts
similarity index 97%
rename from src/map-interface/map-page/map-styles/map-sources.ts
rename to src/pages/map/map-interface/map-page/map-styles/map-sources.ts
index 9c21acd2..bbeed3a7 100644
--- a/src/map-interface/map-page/map-styles/map-sources.ts
+++ b/src/pages/map/map-interface/map-page/map-styles/map-sources.ts
@@ -1,7 +1,7 @@
import { useEffect } from "react";
import { useMapElement } from "@macrostrat/mapbox-react";
import { useAPIResult } from "@macrostrat/ui-components";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
import { features } from "process";
const sourceMapStyle = {
diff --git a/src/map-interface/map-page/map-styles/overlay.ts b/src/pages/map/map-interface/map-page/map-styles/overlay.ts
similarity index 99%
rename from src/map-interface/map-page/map-styles/overlay.ts
rename to src/pages/map/map-interface/map-page/map-styles/overlay.ts
index ee05ee51..3c64d7f5 100644
--- a/src/map-interface/map-page/map-styles/overlay.ts
+++ b/src/pages/map/map-interface/map-page/map-styles/overlay.ts
@@ -1,4 +1,4 @@
-import { SETTINGS } from "../../settings";
+import { SETTINGS } from "~/settings";
export const overlayStyle = {
version: 8,
diff --git a/src/map-interface/map-page/map-styles/relief-shading.ts b/src/pages/map/map-interface/map-page/map-styles/relief-shading.ts
similarity index 100%
rename from src/map-interface/map-page/map-styles/relief-shading.ts
rename to src/pages/map/map-interface/map-page/map-styles/relief-shading.ts
diff --git a/src/map-interface/map-page/map-view/__archive.ts b/src/pages/map/map-interface/map-page/map-view/__archive.ts
similarity index 98%
rename from src/map-interface/map-page/map-view/__archive.ts
rename to src/pages/map/map-interface/map-page/map-view/__archive.ts
index be6391f1..c4f616e1 100644
--- a/src/map-interface/map-page/map-view/__archive.ts
+++ b/src/pages/map/map-interface/map-page/map-view/__archive.ts
@@ -1,4 +1,4 @@
-import { MapLayer } from "~/map-interface/app-state";
+import { MapLayer } from "~/pages/map/map-interface/app-state";
import { Component } from "react";
class VestigialMap extends Component {
diff --git a/src/map-interface/map-page/map-view/cross-section.ts b/src/pages/map/map-interface/map-page/map-view/cross-section.ts
similarity index 97%
rename from src/map-interface/map-page/map-view/cross-section.ts
rename to src/pages/map/map-interface/map-page/map-view/cross-section.ts
index 094d75ac..f82210dc 100644
--- a/src/map-interface/map-page/map-view/cross-section.ts
+++ b/src/pages/map/map-interface/map-page/map-view/cross-section.ts
@@ -1,6 +1,6 @@
import { useMapRef, useMapStatus } from "@macrostrat/mapbox-react";
import { useEffect, useRef } from "react";
-import { useAppState } from "~/map-interface/app-state";
+import { useAppState } from "~/pages/map/map-interface/app-state";
import { LineString } from "geojson";
import { GeoJSONSource } from "mapbox-gl";
diff --git a/src/map-interface/map-page/map-view/filter-helpers.ts b/src/pages/map/map-interface/map-page/map-view/filter-helpers.ts
similarity index 98%
rename from src/map-interface/map-page/map-view/filter-helpers.ts
rename to src/pages/map/map-interface/map-page/map-view/filter-helpers.ts
index b2ce1fa1..ebda8cd2 100644
--- a/src/map-interface/map-page/map-view/filter-helpers.ts
+++ b/src/pages/map/map-interface/map-page/map-view/filter-helpers.ts
@@ -2,8 +2,8 @@ import { FeatureCollection, Point } from "geojson";
import {
FilterData,
IntervalFilterData,
-} from "~/map-interface/app-state/handlers/filters";
-import { SETTINGS } from "../../settings";
+} from "~/pages/map/map-interface/app-state/handlers/filters";
+import { SETTINGS } from "~/settings";
export function getExpressionForFilters(
filters: FilterData[]
diff --git a/src/map-interface/map-page/map-view/index.ts b/src/pages/map/map-interface/map-page/map-view/index.ts
similarity index 96%
rename from src/map-interface/map-page/map-view/index.ts
rename to src/pages/map/map-interface/map-page/map-view/index.ts
index 7919e0c3..9223ac3b 100644
--- a/src/map-interface/map-page/map-view/index.ts
+++ b/src/pages/map/map-interface/map-page/map-view/index.ts
@@ -14,14 +14,14 @@ import {
mergeStyles,
setMapPosition,
} from "@macrostrat/mapbox-utils";
-import { inDarkMode } from "@macrostrat/ui-components";
+import { useInDarkMode } from "@macrostrat/ui-components";
import mapboxgl from "mapbox-gl";
import { useCallback, useEffect, useMemo, useState } from "react";
import {
MapLayer,
useAppActions,
useAppState,
-} from "~/map-interface/app-state";
+} from "~/pages/map/map-interface/app-state";
import styles from "../main.module.styl";
import { applyAgeModelStyles } from "@macrostrat/mapbox-styles";
import {
@@ -34,7 +34,7 @@ import {
HoveredFeatureManager,
MacrostratLayerManager,
} from "./map";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
const h = hyper.styled(styles);
@@ -61,7 +61,7 @@ export default function MainMapView(props) {
} = useAppState((state) => state.core);
let mapRef = useMapRef();
- const isDarkMode = inDarkMode();
+ const isDarkMode = useInDarkMode();
const baseMapURL = getBaseMapStyle(mapLayers, isDarkMode);
diff --git a/src/map-interface/map-page/map-view/map.ts b/src/pages/map/map-interface/map-page/map-view/map.ts
similarity index 98%
rename from src/map-interface/map-page/map-view/map.ts
rename to src/pages/map/map-interface/map-page/map-view/map.ts
index ee71b9ba..1238f832 100644
--- a/src/map-interface/map-page/map-view/map.ts
+++ b/src/pages/map/map-interface/map-page/map-view/map.ts
@@ -1,9 +1,13 @@
import { getPBDBData } from "./filter-helpers";
-import { AppAction, MapLayer, useAppActions } from "~/map-interface/app-state";
-import { ColumnProperties } from "~/map-interface/app-state/handlers/columns";
+import {
+ AppAction,
+ MapLayer,
+ useAppActions,
+} from "~/pages/map/map-interface/app-state";
+import { ColumnProperties } from "~/pages/map/map-interface/app-state/handlers/columns";
import { useMapRef, useMapStatus } from "@macrostrat/mapbox-react";
import { useEffect, useRef, useCallback } from "react";
-import { useAppState } from "~/map-interface/app-state";
+import { useAppState } from "~/pages/map/map-interface/app-state";
import { getExpressionForFilters } from "./filter-helpers";
interface MapProps {
diff --git a/src/map-interface/map-page/map-view/utils.ts b/src/pages/map/map-interface/map-page/map-view/utils.ts
similarity index 95%
rename from src/map-interface/map-page/map-view/utils.ts
rename to src/pages/map/map-interface/map-page/map-view/utils.ts
index e79dbe26..2183e159 100644
--- a/src/map-interface/map-page/map-view/utils.ts
+++ b/src/pages/map/map-interface/map-page/map-view/utils.ts
@@ -3,7 +3,7 @@ import {
useAppState,
MapLayer,
PositionFocusState,
-} from "~/map-interface/app-state";
+} from "~/pages/map/map-interface/app-state";
import { GeolocateControl } from "mapbox-gl";
import hyper from "@macrostrat/hyper";
import { useEffect } from "react";
@@ -17,9 +17,9 @@ import {
} from "@macrostrat/mapbox-react";
import classNames from "classnames";
import { mapViewInfo } from "@macrostrat/mapbox-utils";
-import { SETTINGS } from "../../settings";
+import { SETTINGS } from "~/settings";
import mapboxgl from "mapbox-gl";
-import { LinkButton } from "~/map-interface/components/buttons";
+import { LinkButton } from "~/pages/map/map-interface/components/buttons";
const h = hyper.styled(styles);
@@ -99,7 +99,12 @@ export function MapBottomControls() {
h(CompassControl, { className: "compass-control" }),
h(GlobeControl, { className: "globe-control" }),
h(GeolocationControl, { className: "geolocation-control" }),
- h(LinkButton, {className: "show-in-globe", icon: "globe", to: "/globe", small: true}, )
+ h(LinkButton, {
+ className: "show-in-globe",
+ icon: "globe",
+ to: "/globe",
+ small: true,
+ }),
]);
}
diff --git a/src/map-interface/map-page/menu.ts b/src/pages/map/map-interface/map-page/menu.ts
similarity index 98%
rename from src/map-interface/map-page/menu.ts
rename to src/pages/map/map-interface/map-page/menu.ts
index 8a40a268..bd03ec23 100644
--- a/src/map-interface/map-page/menu.ts
+++ b/src/pages/map/map-interface/map-page/menu.ts
@@ -26,7 +26,7 @@ import styles from "./main.module.styl";
import loadable from "@loadable/component";
import UsageText from "../usage.mdx";
import { Routes, Route } from "react-router-dom";
-import Changelog from "~/changelog.mdx";
+import Changelog from "../../changelog.mdx";
import { useMatch, useLocation } from "react-router";
import { useTransition } from "transition-hook";
import { useCurrentPage } from "../app-state/nav-hooks";
@@ -35,7 +35,7 @@ import { isDetailPanelRouteInternal } from "../app-state/nav-hooks";
import { SettingsPanel, ExperimentsPanel, ThemeButton } from "./settings-panel";
import { useState, useEffect } from "react";
import { LinkButton, LayerButton, ListButton } from "../components/buttons";
-import { routerBasename, mapPagePrefix } from "../settings";
+import { routerBasename, mapPagePrefix } from "~/settings";
import { Card } from "@blueprintjs/core";
function ChangelogPanel() {
diff --git a/src/map-interface/map-page/settings-panel.module.styl b/src/pages/map/map-interface/map-page/settings-panel.module.styl
similarity index 100%
rename from src/map-interface/map-page/settings-panel.module.styl
rename to src/pages/map/map-interface/map-page/settings-panel.module.styl
diff --git a/src/map-interface/map-page/settings-panel.ts b/src/pages/map/map-interface/map-page/settings-panel.ts
similarity index 96%
rename from src/map-interface/map-page/settings-panel.ts
rename to src/pages/map/map-interface/map-page/settings-panel.ts
index e56c1ded..90344e0f 100644
--- a/src/map-interface/map-page/settings-panel.ts
+++ b/src/pages/map/map-interface/map-page/settings-panel.ts
@@ -1,7 +1,10 @@
// Settings panel for the map
// TODO: re-integrate LinkButton to @macrostrat/router-components
-import { useAppState, useAppActions } from "~/map-interface/app-state";
+import {
+ useAppState,
+ useAppActions,
+} from "~/pages/map/map-interface/app-state";
import {
Switch,
Icon,
@@ -14,7 +17,7 @@ import hyper from "@macrostrat/hyper";
import { Tag, Collapse, Callout, Text, NumericInput } from "@blueprintjs/core";
import { useState } from "react";
import { useEffect } from "react";
-import { MapLayer } from "~/map-interface/app-state";
+import { MapLayer } from "~/pages/map/map-interface/app-state";
import styles from "./settings-panel.module.styl";
import {
DarkModeButton,
@@ -81,7 +84,7 @@ const SettingsPanel = (props) => {
]);
};
-import { applyMapPositionToHash } from "~/map-interface/app-state/reducers/hash-string";
+import { applyMapPositionToHash } from "~/pages/map/map-interface/app-state/reducers/hash-string";
function GlobeLink() {
const mapPosition = useAppState((s) => s.core.mapPosition);
diff --git a/src/map-interface/performance/core.ts b/src/pages/map/map-interface/performance/core.ts
similarity index 100%
rename from src/map-interface/performance/core.ts
rename to src/pages/map/map-interface/performance/core.ts
diff --git a/src/map-interface/performance/display.ts b/src/pages/map/map-interface/performance/display.ts
similarity index 95%
rename from src/map-interface/performance/display.ts
rename to src/pages/map/map-interface/performance/display.ts
index 4576461d..ca0e5e05 100644
--- a/src/map-interface/performance/display.ts
+++ b/src/pages/map/map-interface/performance/display.ts
@@ -1,9 +1,5 @@
import hyper from "@macrostrat/hyper";
-import {
- MapPerformanceStep,
- PerformanceState,
- ResourceCounts,
-} from "../performance/core";
+import { MapPerformanceStep, PerformanceState, ResourceCounts } from "./core";
import styles from "./main.module.styl";
const h = hyper.styled(styles);
diff --git a/src/map-interface/performance/index.ts b/src/pages/map/map-interface/performance/index.ts
similarity index 100%
rename from src/map-interface/performance/index.ts
rename to src/pages/map/map-interface/performance/index.ts
diff --git a/src/map-interface/performance/main.module.styl b/src/pages/map/map-interface/performance/main.module.styl
similarity index 100%
rename from src/map-interface/performance/main.module.styl
rename to src/pages/map/map-interface/performance/main.module.styl
diff --git a/src/styles/searchbar.styl b/src/pages/map/map-interface/searchbar.styl
similarity index 100%
rename from src/styles/searchbar.styl
rename to src/pages/map/map-interface/searchbar.styl
diff --git a/src/styles/ui-components.styl b/src/pages/map/map-interface/ui-components.styl
similarity index 100%
rename from src/styles/ui-components.styl
rename to src/pages/map/map-interface/ui-components.styl
diff --git a/src/map-interface/usage.mdx b/src/pages/map/map-interface/usage.mdx
similarity index 100%
rename from src/map-interface/usage.mdx
rename to src/pages/map/map-interface/usage.mdx
diff --git a/src/map-interface/utils/formatting.ts b/src/pages/map/map-interface/utils/formatting.ts
similarity index 100%
rename from src/map-interface/utils/formatting.ts
rename to src/pages/map/map-interface/utils/formatting.ts
diff --git a/src/map-interface/utils/fossils.ts b/src/pages/map/map-interface/utils/fossils.ts
similarity index 100%
rename from src/map-interface/utils/fossils.ts
rename to src/pages/map/map-interface/utils/fossils.ts
diff --git a/src/map-interface/utils/index.ts b/src/pages/map/map-interface/utils/index.ts
similarity index 100%
rename from src/map-interface/utils/index.ts
rename to src/pages/map/map-interface/utils/index.ts
diff --git a/src/pages/map/map.ts b/src/pages/map/map.ts
deleted file mode 100644
index 92a5c253..00000000
--- a/src/pages/map/map.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
-import { ReduxRouter } from "@lagunovsky/redux-react-router";
-import h from "@macrostrat/hyper";
-
-import "~/styles/global.styl";
-import "../../styles/searchbar.styl";
-import "../../styles/ui-components.styl";
-
-import { Provider } from "react-redux";
-import { createStore, compose, applyMiddleware } from "redux";
-import reducerStack, {
- Action,
- browserHistory,
- AppState,
-} from "../../map-interface/app-state";
-import { createRouterMiddleware } from "@lagunovsky/redux-react-router";
-import { onDemand } from "../../_utils";
-
-const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
-
-const routerMiddleware = createRouterMiddleware(browserHistory);
-// Create the data store
-let store = createStore(
- reducerStack,
- composeEnhancers(applyMiddleware(routerMiddleware))
-);
-
-//const _ColumnPage = loadable(import("./columns"));
-//const ColumnPage = () => h(Suspense, { fallback: h(Spinner) }, h(_ColumnPage));
-
-import MapPage from "../../map-interface/map-page";
-
-const Sources = onDemand(() => import("~/burwell-sources"));
-const DevMapPage = onDemand(() => import("../../dev"));
-
-export default function MapApp({ routerBasename }) {
- return h(
- Provider,
- { store },
- h(
- ReduxRouter,
- { basename: routerBasename, store, history: browserHistory },
- [
- h(Routes, [
- h(Route, { path: "/sources", element: h(Sources) }),
- h(Route, {
- path: "/dev/*",
- element: h(DevMapPage),
- }),
- h(Route, { path: "*", element: h(MapPage) }),
- ]),
- // h(Route, { path: "/columns", component: ColumnPage }),
- // h(Route, {
- // exact: true,
- // path: "/",
- // render: () => h(Redirect, { to: "/map" }),
- // }),
- ]
- )
- );
-}
diff --git a/src/pages/maps/@id/index.page.ts b/src/pages/maps/@id/index.page.ts
index 0af28a9a..2e038820 100644
--- a/src/pages/maps/@id/index.page.ts
+++ b/src/pages/maps/@id/index.page.ts
@@ -1,5 +1,5 @@
-import { PageContextBuiltInServer } from "vite-plugin-ssr/types";
-import { SETTINGS } from "~/map-interface/settings";
+import { PageContextBuiltInServer } from "vike/types";
+import { SETTINGS } from "~/settings";
import h from "@macrostrat/hyper";
import { ClientOnly } from "~/renderer/client-only";
const MapInterface = () => import("./map-interface");
diff --git a/src/pages/maps/@id/map-interface.ts b/src/pages/maps/@id/map-interface.ts
index 6654008c..aaa7183e 100644
--- a/src/pages/maps/@id/map-interface.ts
+++ b/src/pages/maps/@id/map-interface.ts
@@ -12,7 +12,7 @@ import {
Collapse,
Switch,
} from "@blueprintjs/core";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
import { useEffect } from "react";
import styles from "./main.module.sass";
import { useMemo, useState } from "react";
diff --git a/src/pages/maps/index.page.server.ts b/src/pages/maps/index.page.server.ts
index baa86d09..23d74502 100644
--- a/src/pages/maps/index.page.server.ts
+++ b/src/pages/maps/index.page.server.ts
@@ -1,5 +1,5 @@
import fetch from "node-fetch";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
const apiAddress = SETTINGS.apiDomain + "/api/v2/defs/sources";
diff --git a/src/renderer/_default.page.client.tsx b/src/renderer/_default.page.client.tsx
index 4ccbb57d..a59af55b 100644
--- a/src/renderer/_default.page.client.tsx
+++ b/src/renderer/_default.page.client.tsx
@@ -5,7 +5,7 @@ import { PageShell } from "./page-shell";
import type { PageContextClient } from "./types";
import { FocusStyleManager } from "@blueprintjs/core";
-// This render() hook only supports SSR, see https://vite-plugin-ssr.com/render-modes for how to modify render() to support SPA
+// This render() hook only supports SSR, see https://vike.dev/render-modes for how to modify render() to support SPA
async function render(pageContext: PageContextClient) {
const { Page, pageProps } = pageContext;
if (!Page)
@@ -28,4 +28,4 @@ async function render(pageContext: PageContextClient) {
/* To enable Client-side Routing:
export const clientRouting = true
-// !! WARNING !! Before doing so, read https://vite-plugin-ssr.com/clientRouting */
+// !! WARNING !! Before doing so, read https://vike.dev/clientRouting */
diff --git a/src/renderer/_default.page.server.tsx b/src/renderer/_default.page.server.tsx
index d40d0fad..5c8ebca9 100644
--- a/src/renderer/_default.page.server.tsx
+++ b/src/renderer/_default.page.server.tsx
@@ -1,15 +1,15 @@
export { render };
-// See https://vite-plugin-ssr.com/data-fetching
+// See https://vike.dev/data-fetching
export const passToClient = ["pageProps", "urlPathname"];
import ReactDOMServer from "react-dom/server";
import { PageShell } from "./page-shell";
-import { escapeInject, dangerouslySkipEscape } from "vite-plugin-ssr/server";
+import { escapeInject, dangerouslySkipEscape } from "vike/server";
import type { PageContextServer } from "./types";
async function render(pageContext: PageContextServer) {
const { Page, pageProps } = pageContext;
- // This render() hook only supports SSR, see https://vite-plugin-ssr.com/render-modes for how to modify render() to support SPA
+ // This render() hook only supports SSR, see https://vike.dev/render-modes for how to modify render() to support SPA
if (!Page)
throw new Error("render() hook expects pageContext.Page to be defined");
const pageHtml = ReactDOMServer.renderToString(
@@ -18,7 +18,7 @@ async function render(pageContext: PageContextServer) {
);
- // See https://vite-plugin-ssr.com/head
+ // See https://vike.dev/head
const { documentProps } = pageContext.exports;
const title = (documentProps && documentProps.title) || "Macrostrat";
const desc = (documentProps && documentProps.description) || "Macrostrat";
@@ -53,7 +53,7 @@ async function render(pageContext: PageContextServer) {
return {
documentHtml,
pageContext: {
- // We can add some `pageContext` here, which is useful if we want to do page redirection https://vite-plugin-ssr.com/page-redirection
+ // We can add some `pageContext` here, which is useful if we want to do page redirection https://vike.dev/page-redirection
},
};
}
diff --git a/src/renderer/page-context.ts b/src/renderer/page-context.ts
index 8e81914b..bd3223a1 100644
--- a/src/renderer/page-context.ts
+++ b/src/renderer/page-context.ts
@@ -1,5 +1,5 @@
// `usePageContext` allows us to access `pageContext` in any React component.
-// See https://vite-plugin-ssr.com/pageContext-anywhere
+// See https://vike.dev/pageContext-anywhere
import React, { useContext } from "react";
import type { PageContext } from "./types";
diff --git a/src/renderer/types.ts b/src/renderer/types.ts
index 0f191410..0dc6d2f7 100644
--- a/src/renderer/types.ts
+++ b/src/renderer/types.ts
@@ -1,35 +1,35 @@
-export type { PageContextServer }
-export type { PageContextClient }
-export type { PageContext }
-export type { PageProps }
+export type { PageContextServer };
+export type { PageContextClient };
+export type { PageContext };
+export type { PageProps };
import type {
PageContextBuiltInServer,
/*
- // When using Client Routing https://vite-plugin-ssr.com/clientRouting
+ // When using Client Routing https://vike.dev/clientRouting
PageContextBuiltInClientWithClientRouting as PageContextBuiltInClient
/*/
// When using Server Routing
- PageContextBuiltInClientWithServerRouting as PageContextBuiltInClient
+ PageContextBuiltInClientWithServerRouting as PageContextBuiltInClient,
//*/
-} from 'vite-plugin-ssr/types'
+} from "vike/types";
-type Page = (pageProps: PageProps) => React.ReactElement
-type PageProps = Record
+type Page = (pageProps: PageProps) => React.ReactElement;
+type PageProps = Record;
export type PageContextCustom = {
- Page: Page
- pageProps?: PageProps
- urlPathname: string
+ Page: Page;
+ pageProps?: PageProps;
+ urlPathname: string;
exports: {
documentProps?: {
- title?: string
- description?: string
- }
- }
-}
+ title?: string;
+ description?: string;
+ };
+ };
+};
-type PageContextServer = PageContextBuiltInServer & PageContextCustom
-type PageContextClient = PageContextBuiltInClient & PageContextCustom
+type PageContextServer = PageContextBuiltInServer & PageContextCustom;
+type PageContextClient = PageContextBuiltInClient & PageContextCustom;
-type PageContext = PageContextClient | PageContextServer
+type PageContext = PageContextClient | PageContextServer;
diff --git a/src/map-interface/settings.ts b/src/settings.ts
similarity index 100%
rename from src/map-interface/settings.ts
rename to src/settings.ts
diff --git a/src/styles/_common.styl b/src/styles/_common.styl
deleted file mode 100644
index f00604ec..00000000
--- a/src/styles/_common.styl
+++ /dev/null
@@ -1,3 +0,0 @@
-.spacer
- flex-grow 1
- pointer-events none
\ No newline at end of file
diff --git a/src/weaver/index.ts b/src/weaver/index.ts
index e509cdf4..87eb64da 100644
--- a/src/weaver/index.ts
+++ b/src/weaver/index.ts
@@ -28,7 +28,7 @@ import {
} from "@macrostrat/ui-components";
import mapboxgl from "mapbox-gl";
import { useCallback, useEffect, useState } from "react";
-import { SETTINGS } from "~/map-interface/settings";
+import { SETTINGS } from "~/settings";
export function WeaverPage() {
return h(
diff --git a/vite.config.ts b/vite.config.ts
index 49105450..75c00d5b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -2,7 +2,7 @@ import { UserConfig } from "vite";
import path from "path";
import mdx from "@mdx-js/rollup";
import react from "@vitejs/plugin-react";
-import ssr from "vite-plugin-ssr/plugin";
+import ssr from "vike/plugin";
import revisionInfo from "@macrostrat/revision-info-webpack";
import rewriteAll from "vite-plugin-rewrite-all";
import cesium from "vite-plugin-cesium";
diff --git a/yarn.lock b/yarn.lock
index 97dc8af7..ca9e74c8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -241,7 +241,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.22.5":
+"@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.22.5":
version: 7.22.15
resolution: "@babel/helper-module-imports@npm:7.22.15"
dependencies:
@@ -1622,15 +1622,6 @@ __metadata:
languageName: node
linkType: hard
-"@babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.23.2":
- version: 7.23.2
- resolution: "@babel/runtime@npm:7.23.2"
- dependencies:
- regenerator-runtime: ^0.14.0
- checksum: 6c4df4839ec75ca10175f636d6362f91df8a3137f86b38f6cd3a4c90668a0fe8e9281d320958f4fbd43b394988958585a17c3aab2a4ea6bf7316b22916a371fb
- languageName: node
- linkType: hard
-
"@babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3":
version: 7.22.15
resolution: "@babel/template@npm:7.22.15"
@@ -1844,17 +1835,17 @@ __metadata:
languageName: node
linkType: hard
-"@brillout/json-serializer@npm:^0.5.6":
- version: 0.5.6
- resolution: "@brillout/json-serializer@npm:0.5.6"
- checksum: 5b32a8aa70f9b079e3ee517bc2c2a1e19ad8e91bbae7c8d5224da15ad2c1d0a51e8103586a4283688cc63baaaea42d1a47018a71306bceefa7ee16fba874baf3
+"@brillout/json-serializer@npm:^0.5.8":
+ version: 0.5.8
+ resolution: "@brillout/json-serializer@npm:0.5.8"
+ checksum: 7d737a8a20c04c27a41ecf0c5f8bd60031b7f58d80f76f7bf9719f237b2bcd8dafb4495771638a7546cdadac08c629c3e08be801ea0dd14b70ecf9213e6400fa
languageName: node
linkType: hard
-"@brillout/picocolors@npm:^1.0.9":
- version: 1.0.9
- resolution: "@brillout/picocolors@npm:1.0.9"
- checksum: 157b3ec0a965244acba0d0c96abb0c7343f115408eddb3563545f2bf5d2a8b3b38d43908af3347b612c908fac50b1707f52296a9c3eaef0a004cd6883aeeb468
+"@brillout/picocolors@npm:^1.0.10":
+ version: 1.0.10
+ resolution: "@brillout/picocolors@npm:1.0.10"
+ checksum: e14436613d6c4c6f3f6921b5244b13f5bd21b69cb8645f4c454961ceba41bc666613ee11d03534000cdfc8da95eb09efb1f90bf8a941f9e37f362359f8b2b4c3
languageName: node
linkType: hard
@@ -1865,12 +1856,12 @@ __metadata:
languageName: node
linkType: hard
-"@brillout/vite-plugin-import-build@npm:^0.2.18":
- version: 0.2.18
- resolution: "@brillout/vite-plugin-import-build@npm:0.2.18"
+"@brillout/vite-plugin-import-build@npm:^0.2.20":
+ version: 0.2.20
+ resolution: "@brillout/vite-plugin-import-build@npm:0.2.20"
dependencies:
"@brillout/import": ^0.2.3
- checksum: 3dd2bb19912b3075d8d96f4a04518fe3adbc15f14aa46b27776706203400ed44bd1b4316d95cc9e21636211c747cbf8c6a4590416f7a53593132fed039584f98
+ checksum: 761d9c8e370f385bc28164091e583a31e9f43437451e186a5ec9c244399988846db4fa8ca7e6582c0f1b5c09461a2840f88d979e82636e030b421e6ca6d1582d
languageName: node
linkType: hard
@@ -2159,25 +2150,6 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/babel-plugin@npm:^11.11.0":
- version: 11.11.0
- resolution: "@emotion/babel-plugin@npm:11.11.0"
- dependencies:
- "@babel/helper-module-imports": ^7.16.7
- "@babel/runtime": ^7.18.3
- "@emotion/hash": ^0.9.1
- "@emotion/memoize": ^0.8.1
- "@emotion/serialize": ^1.1.2
- babel-plugin-macros: ^3.1.0
- convert-source-map: ^1.5.0
- escape-string-regexp: ^4.0.0
- find-root: ^1.1.0
- source-map: ^0.5.7
- stylis: 4.2.0
- checksum: 6b363edccc10290f7a23242c06f88e451b5feb2ab94152b18bb8883033db5934fb0e421e2d67d09907c13837c21218a3ac28c51707778a54d6cd3706c0c2f3f9
- languageName: node
- linkType: hard
-
"@emotion/cache@npm:11.7.1":
version: 11.7.1
resolution: "@emotion/cache@npm:11.7.1"
@@ -2203,7 +2175,7 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/cache@npm:^11.11.0, @emotion/cache@npm:^11.7.1":
+"@emotion/cache@npm:^11.7.1":
version: 11.11.0
resolution: "@emotion/cache@npm:11.11.0"
dependencies:
@@ -2264,15 +2236,6 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/is-prop-valid@npm:^1.2.1":
- version: 1.2.1
- resolution: "@emotion/is-prop-valid@npm:1.2.1"
- dependencies:
- "@emotion/memoize": ^0.8.1
- checksum: 8f42dc573a3fad79b021479becb639b8fe3b60bdd1081a775d32388bca418ee53074c7602a4c845c5f75fa6831eb1cbdc4d208cc0299f57014ed3a02abcad16a
- languageName: node
- linkType: hard
-
"@emotion/memoize@npm:0.7.4":
version: 0.7.4
resolution: "@emotion/memoize@npm:0.7.4"
@@ -2317,27 +2280,6 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/react@npm:^11.11.1":
- version: 11.11.1
- resolution: "@emotion/react@npm:11.11.1"
- dependencies:
- "@babel/runtime": ^7.18.3
- "@emotion/babel-plugin": ^11.11.0
- "@emotion/cache": ^11.11.0
- "@emotion/serialize": ^1.1.2
- "@emotion/use-insertion-effect-with-fallbacks": ^1.0.1
- "@emotion/utils": ^1.2.1
- "@emotion/weak-memoize": ^0.3.1
- hoist-non-react-statics: ^3.3.1
- peerDependencies:
- react: ">=16.8.0"
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: aec3c36650f5f0d3d4445ff44d73dd88712b1609645b6af3e6d08049cfbc51f1785fe13dea1a1d4ab1b0800d68f2339ab11e459687180362b1ef98863155aae5
- languageName: node
- linkType: hard
-
"@emotion/serialize@npm:1.0.2":
version: 1.0.2
resolution: "@emotion/serialize@npm:1.0.2"
@@ -2364,7 +2306,7 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/serialize@npm:^1.0.2, @emotion/serialize@npm:^1.1.2":
+"@emotion/serialize@npm:^1.0.2":
version: 1.1.2
resolution: "@emotion/serialize@npm:1.1.2"
dependencies:
@@ -2391,26 +2333,6 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/styled@npm:^11.11.0":
- version: 11.11.0
- resolution: "@emotion/styled@npm:11.11.0"
- dependencies:
- "@babel/runtime": ^7.18.3
- "@emotion/babel-plugin": ^11.11.0
- "@emotion/is-prop-valid": ^1.2.1
- "@emotion/serialize": ^1.1.2
- "@emotion/use-insertion-effect-with-fallbacks": ^1.0.1
- "@emotion/utils": ^1.2.1
- peerDependencies:
- "@emotion/react": ^11.0.0-rc.0
- react: ">=16.8.0"
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: 904f641aad3892c65d7d6c0808b036dae1e6d6dad4861c1c7dc0baa59977047c6cad220691206eba7b4059f1a1c6e6c1ef4ebb8c829089e280fa0f2164a01e6b
- languageName: node
- linkType: hard
-
"@emotion/stylis@npm:0.8.5":
version: 0.8.5
resolution: "@emotion/stylis@npm:0.8.5"
@@ -2432,15 +2354,6 @@ __metadata:
languageName: node
linkType: hard
-"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1":
- version: 1.0.1
- resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1"
- peerDependencies:
- react: ">=16.8.0"
- checksum: 700b6e5bbb37a9231f203bb3af11295eed01d73b2293abece0bc2a2237015e944d7b5114d4887ad9a79776504aa51ed2a8b0ddbc117c54495dd01a6b22f93786
- languageName: node
- linkType: hard
-
"@emotion/utils@npm:0.11.3":
version: 0.11.3
resolution: "@emotion/utils@npm:0.11.3"
@@ -2802,44 +2715,6 @@ __metadata:
languageName: node
linkType: hard
-"@floating-ui/core@npm:^1.4.2":
- version: 1.5.0
- resolution: "@floating-ui/core@npm:1.5.0"
- dependencies:
- "@floating-ui/utils": ^0.1.3
- checksum: 54b4fe26b3c228746ac5589f97303abf158b80aa5f8b99027259decd68d1c2030c4c637648ebd33dfe78a4212699453bc2bd7537fd5a594d3bd3e63d362f666f
- languageName: node
- linkType: hard
-
-"@floating-ui/dom@npm:^1.5.1":
- version: 1.5.3
- resolution: "@floating-ui/dom@npm:1.5.3"
- dependencies:
- "@floating-ui/core": ^1.4.2
- "@floating-ui/utils": ^0.1.3
- checksum: 00053742064aac70957f0bd5c1542caafb3bfe9716588bfe1d409fef72a67ed5e60450d08eb492a77f78c22ed1ce4f7955873cc72bf9f9caf2b0f43ae3561c21
- languageName: node
- linkType: hard
-
-"@floating-ui/react-dom@npm:^2.0.2":
- version: 2.0.2
- resolution: "@floating-ui/react-dom@npm:2.0.2"
- dependencies:
- "@floating-ui/dom": ^1.5.1
- peerDependencies:
- react: ">=16.8.0"
- react-dom: ">=16.8.0"
- checksum: 4797e1f7a19c1e531ed0d578ccdcbe58970743e5a480ba30424857fc953063f36d481f8c5d69248a8f1d521b739e94bf5e1ffb35506400dea3d914f166ed2f7f
- languageName: node
- linkType: hard
-
-"@floating-ui/utils@npm:^0.1.3":
- version: 0.1.6
- resolution: "@floating-ui/utils@npm:0.1.6"
- checksum: b34d4b5470869727f52e312e08272edef985ba5a450a76de0917ba0a9c6f5df2bdbeb99448e2c60f39b177fb8981c772ff1831424e75123471a27ebd5b52c1eb
- languageName: node
- linkType: hard
-
"@hypnosphi/create-react-context@npm:^0.3.1":
version: 0.3.1
resolution: "@hypnosphi/create-react-context@npm:0.3.1"
@@ -3287,7 +3162,7 @@ __metadata:
dependencies:
"@blueprintjs/core": ^4
"@blueprintjs/table": ^4
- "@macrostrat/data-sheet": "workspace:^2.0.0-a1"
+ "@macrostrat/data-sheet": "workspace:*"
"@macrostrat/hyper": ^2.2.1
"@macrostrat/ui-components": "workspace:^3.0.0"
chroma-js: ^2.4.2
@@ -3314,12 +3189,6 @@ __metadata:
languageName: unknown
linkType: soft
-"@macrostrat-web/security@workspace:*, @macrostrat-web/security@workspace:packages/security":
- version: 0.0.0-use.local
- resolution: "@macrostrat-web/security@workspace:packages/security"
- languageName: unknown
- linkType: soft
-
"@macrostrat/api-types@workspace:deps/web-components/packages/api-types":
version: 0.0.0-use.local
resolution: "@macrostrat/api-types@workspace:deps/web-components/packages/api-types"
@@ -3497,7 +3366,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@macrostrat/data-sheet@workspace:^2.0.0-a1, @macrostrat/data-sheet@workspace:deps/web-components/packages/data-sheet":
+"@macrostrat/data-sheet@workspace:*, @macrostrat/data-sheet@workspace:deps/web-components/packages/data-sheet":
version: 0.0.0-use.local
resolution: "@macrostrat/data-sheet@workspace:deps/web-components/packages/data-sheet"
dependencies:
@@ -3840,14 +3709,10 @@ __metadata:
"@babel/preset-typescript": ^7.18.6
"@blueprintjs/core": ^4.14.1
"@blueprintjs/select": 4
- "@blueprintjs/table": ^4
- "@emotion/react": ^11.11.1
- "@emotion/styled": ^11.11.0
"@lagunovsky/redux-react-router": ^3.2.0
"@loadable/component": ^5.14.1
"@macrostrat-web/data-sheet-test": "workspace:*"
"@macrostrat-web/globe": "workspace:*"
- "@macrostrat-web/security": "workspace:*"
"@macrostrat/api-utils": "workspace:*"
"@macrostrat/api-views": "workspace:*"
"@macrostrat/column-components": "workspace:*"
@@ -3865,7 +3730,6 @@ __metadata:
"@mapbox/tilebelt": ^1.0.2
"@mapbox/vector-tile": ^1.3.1
"@mdx-js/rollup": ^2.3.0
- "@mui/material": ^5.14.16
"@turf/bbox": ^6.5.0
"@turf/boolean-contains": ^6.5.0
"@turf/buffer": ^6.5.0
@@ -3888,7 +3752,6 @@ __metadata:
chroma-js: ^2.4.2
classnames: ^2.2.6
compression: ^1.7.4
- cookie-parser: ^1.4.6
cross-env: ^7.0.3
d3-array: ^3.1.1
d3-axis: ^3.0.0
@@ -3901,7 +3764,6 @@ __metadata:
express: ^4.18.2
history: ^5.3.0
immutability-helper: ^3.1.1
- jose: ^5.1.2
mapbox-gl: ^2.15.0
new-github-issue-url: ^1.0.0
pbf: ^3.2.1
@@ -3928,13 +3790,12 @@ __metadata:
transition-hook: ^1.5.2
ts-node: ^10.9.1
typescript: ^5.1.6
- use-debounce: ^9.0.4
use-react-router-breadcrumbs: ^3.2.1
use-resize-observer: ^9.1.0
+ vike: ^0.4.150
vite: ^4.4.9
vite-plugin-cesium: ^1.2.22
vite-plugin-rewrite-all: ^1.0.1
- vite-plugin-ssr: ^0.4.139
dependenciesMeta:
"@esbuild-kit/esm-loader@2.5.5":
unplugged: true
@@ -4230,164 +4091,6 @@ __metadata:
languageName: node
linkType: hard
-"@mui/base@npm:5.0.0-beta.22":
- version: 5.0.0-beta.22
- resolution: "@mui/base@npm:5.0.0-beta.22"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@floating-ui/react-dom": ^2.0.2
- "@mui/types": ^7.2.8
- "@mui/utils": ^5.14.16
- "@popperjs/core": ^2.11.8
- clsx: ^2.0.0
- prop-types: ^15.8.1
- peerDependencies:
- "@types/react": ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- react-dom: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: 8677c13174bd7cb79663f1356d4d3f950eb4ec7561480beb586309b84be3b1fc72db6ef59c45539a2d8a8ed610aefc60bdbf32db7f0db6201e5753c953f44e2d
- languageName: node
- linkType: hard
-
-"@mui/core-downloads-tracker@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/core-downloads-tracker@npm:5.14.16"
- checksum: 26d691d20eabc7f0f23d4fc4bc21f247dde43ab86c5f3e57201ed63afbb67dba94e0b0e80cb8f2f0e6f6e1ba94e46853f0ca6ab593d558a749bde843ec1d4aa6
- languageName: node
- linkType: hard
-
-"@mui/material@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/material@npm:5.14.16"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@mui/base": 5.0.0-beta.22
- "@mui/core-downloads-tracker": ^5.14.16
- "@mui/system": ^5.14.16
- "@mui/types": ^7.2.8
- "@mui/utils": ^5.14.16
- "@types/react-transition-group": ^4.4.8
- clsx: ^2.0.0
- csstype: ^3.1.2
- prop-types: ^15.8.1
- react-is: ^18.2.0
- react-transition-group: ^4.4.5
- peerDependencies:
- "@emotion/react": ^11.5.0
- "@emotion/styled": ^11.3.0
- "@types/react": ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- react-dom: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@emotion/react":
- optional: true
- "@emotion/styled":
- optional: true
- "@types/react":
- optional: true
- checksum: 77b2e02b82c9eebef0b24bca8f05721d320f40eb5f6ae77a265f5613933afc98173b90773fc789b63868303cfbc406e7bff2ce445c0c3e7033dcaa8782af6a99
- languageName: node
- linkType: hard
-
-"@mui/private-theming@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/private-theming@npm:5.14.16"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@mui/utils": ^5.14.16
- prop-types: ^15.8.1
- peerDependencies:
- "@types/react": ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: ce4b0e2aa5bf285d72732394c785b47de04745ad2dc4f61a9a249adf0eb25e23998f97c6932d994481656116f177bbdf42bd815ba6f54e8a2d9f9f70a40037ae
- languageName: node
- linkType: hard
-
-"@mui/styled-engine@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/styled-engine@npm:5.14.16"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@emotion/cache": ^11.11.0
- csstype: ^3.1.2
- prop-types: ^15.8.1
- peerDependencies:
- "@emotion/react": ^11.4.1
- "@emotion/styled": ^11.3.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@emotion/react":
- optional: true
- "@emotion/styled":
- optional: true
- checksum: be56ed34e3c6300de1934707ce81584638683be83b3b9d7b5ce27b87871b7621487a1fc8c196d9bfc1a59c87090f3feaf07984274d51d6110147f6a85e86670a
- languageName: node
- linkType: hard
-
-"@mui/system@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/system@npm:5.14.16"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@mui/private-theming": ^5.14.16
- "@mui/styled-engine": ^5.14.16
- "@mui/types": ^7.2.8
- "@mui/utils": ^5.14.16
- clsx: ^2.0.0
- csstype: ^3.1.2
- prop-types: ^15.8.1
- peerDependencies:
- "@emotion/react": ^11.5.0
- "@emotion/styled": ^11.3.0
- "@types/react": ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@emotion/react":
- optional: true
- "@emotion/styled":
- optional: true
- "@types/react":
- optional: true
- checksum: fdb1212e2366efeeddc30cec794459e06d548180f186a3840ba2985bfc99cf0251f0b97dc572732c73b58cec8586ae8694dfea54053bee2b097aee1716ec48ef
- languageName: node
- linkType: hard
-
-"@mui/types@npm:^7.2.8":
- version: 7.2.8
- resolution: "@mui/types@npm:7.2.8"
- peerDependencies:
- "@types/react": ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: 1302d2d1b5a13201efede82ef16438737bd890f9b0a728714fc2da204f6031f055fbd84623ea63ff4ae5d4306b458699d85925608eb8f35df78e1dc0d7a44fc5
- languageName: node
- linkType: hard
-
-"@mui/utils@npm:^5.14.16":
- version: 5.14.16
- resolution: "@mui/utils@npm:5.14.16"
- dependencies:
- "@babel/runtime": ^7.23.2
- "@types/prop-types": ^15.7.9
- prop-types: ^15.8.1
- react-is: ^18.2.0
- peerDependencies:
- "@types/react": ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- "@types/react":
- optional: true
- checksum: 4f2fab609447ccd09d237b0136f6f3122b0a4c9864b1cebe6bd8a26350d3fb3cffb8b23b26af4fa9f34f74fffcb2d549285ce75a7185fcde39e14241aa06e129
- languageName: node
- linkType: hard
-
"@nodelib/fs.scandir@npm:2.1.5":
version: 2.1.5
resolution: "@nodelib/fs.scandir@npm:2.1.5"
@@ -5422,7 +5125,7 @@ __metadata:
languageName: node
linkType: hard
-"@popperjs/core@npm:^2.11.7, @popperjs/core@npm:^2.11.8, @popperjs/core@npm:^2.9.3":
+"@popperjs/core@npm:^2.11.7, @popperjs/core@npm:^2.9.3":
version: 2.11.8
resolution: "@popperjs/core@npm:2.11.8"
checksum: e5c69fdebf52a4012f6a1f14817ca8e9599cb1be73dd1387e1785e2ed5e5f0862ff817f420a87c7fc532add1f88a12e25aeb010ffcbdc98eace3d55ce2139cf0
@@ -7081,13 +6784,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/prop-types@npm:^15.7.9":
- version: 15.7.9
- resolution: "@types/prop-types@npm:15.7.9"
- checksum: c7591d3ff7593e243908a07e1d3e2bb6e8879008af5800d8378115a90d0fdf669a1cae72a6d7f69e59c4fa7bb4c8ed61f6ebc1c520fe110c6f2b03ac02414072
- languageName: node
- linkType: hard
-
"@types/q@npm:^1.5.1":
version: 1.5.6
resolution: "@types/q@npm:1.5.6"
@@ -7157,15 +6853,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/react-transition-group@npm:^4.4.8":
- version: 4.4.8
- resolution: "@types/react-transition-group@npm:4.4.8"
- dependencies:
- "@types/react": "*"
- checksum: ad7ba2bce97631fda9d89b4ed9772489bd050fec3ccd7563041b206dbe219d37d22e0d7731b1f90f56e89daf40e69ba16beba8066c42165bf8a584533feb6a2c
- languageName: node
- linkType: hard
-
"@types/react@npm:*, @types/react@npm:>=15, @types/react@npm:^18.2.20":
version: 18.2.22
resolution: "@types/react@npm:18.2.22"
@@ -9079,7 +8766,7 @@ __metadata:
languageName: node
linkType: hard
-"babel-plugin-macros@npm:^3.0.1, babel-plugin-macros@npm:^3.1.0":
+"babel-plugin-macros@npm:^3.0.1":
version: 3.1.0
resolution: "babel-plugin-macros@npm:3.1.0"
dependencies:
@@ -10418,13 +10105,6 @@ __metadata:
languageName: node
linkType: hard
-"clsx@npm:^2.0.0":
- version: 2.0.0
- resolution: "clsx@npm:2.0.0"
- checksum: a2cfb2351b254611acf92faa0daf15220f4cd648bdf96ce369d729813b85336993871a4bf6978ddea2b81b5a130478339c20d9d0b5c6fc287e5147f0c059276e
- languageName: node
- linkType: hard
-
"cmd-shim@npm:^3.0.0, cmd-shim@npm:^3.0.3":
version: 3.0.3
resolution: "cmd-shim@npm:3.0.3"
@@ -10920,16 +10600,6 @@ __metadata:
languageName: node
linkType: hard
-"cookie-parser@npm:^1.4.6":
- version: 1.4.6
- resolution: "cookie-parser@npm:1.4.6"
- dependencies:
- cookie: 0.4.1
- cookie-signature: 1.0.6
- checksum: 1e5a63aa82e8eb4e02d2977c6902983dee87b02e87ec5ec43ac3cb1e72da354003716570cd5190c0ad9e8a454c9d3237f4ad6e2f16d0902205a96a1c72b77ba5
- languageName: node
- linkType: hard
-
"cookie-signature@npm:1.0.6":
version: 1.0.6
resolution: "cookie-signature@npm:1.0.6"
@@ -10937,13 +10607,6 @@ __metadata:
languageName: node
linkType: hard
-"cookie@npm:0.4.1":
- version: 0.4.1
- resolution: "cookie@npm:0.4.1"
- checksum: bd7c47f5d94ab70ccdfe8210cde7d725880d2fcda06d8e375afbdd82de0c8d3b73541996e9ce57d35f67f672c4ee6d60208adec06b3c5fc94cebb85196084cf8
- languageName: node
- linkType: hard
-
"cookie@npm:0.5.0":
version: 0.5.0
resolution: "cookie@npm:0.5.0"
@@ -11558,7 +11221,7 @@ __metadata:
languageName: node
linkType: hard
-"csstype@npm:^3.0.10, csstype@npm:^3.0.2, csstype@npm:^3.1.2":
+"csstype@npm:^3.0.10, csstype@npm:^3.0.2":
version: 3.1.2
resolution: "csstype@npm:3.1.2"
checksum: e1a52e6c25c1314d6beef5168da704ab29c5186b877c07d822bd0806717d9a265e8493a2e35ca7e68d0f5d472d43fac1cdce70fd79fd0853dff81f3028d857b5
@@ -18354,13 +18017,6 @@ __metadata:
languageName: node
linkType: hard
-"jose@npm:^5.1.2":
- version: 5.1.2
- resolution: "jose@npm:5.1.2"
- checksum: 035aff9c3413c2dbcb4fe240f14249e59c91225575063c1e27a0944e6b78a24b20b61f3b687ccff2012ff430b335c002f4af7e3599e284475b451752866041a0
- languageName: node
- linkType: hard
-
"jpeg-js@npm:^0.4.1":
version: 0.4.4
resolution: "jpeg-js@npm:0.4.4"
@@ -24882,13 +24538,6 @@ __metadata:
languageName: node
linkType: hard
-"react-is@npm:^18.2.0":
- version: 18.2.0
- resolution: "react-is@npm:18.2.0"
- checksum: e72d0ba81b5922759e4aff17e0252bd29988f9642ed817f56b25a3e217e13eea8a7f2322af99a06edb779da12d5d636e9fda473d620df9a3da0df2a74141d53e
- languageName: node
- linkType: hard
-
"react-json-tree@npm:^0.15.0":
version: 0.15.2
resolution: "react-json-tree@npm:0.15.2"
@@ -29581,15 +29230,6 @@ __metadata:
languageName: node
linkType: hard
-"use-debounce@npm:^9.0.4":
- version: 9.0.4
- resolution: "use-debounce@npm:9.0.4"
- peerDependencies:
- react: ">=16.8.0"
- checksum: 37da4ecbe4e10a6230580cac03a8cae1788ea3e417dfdd92fcf654325458cf1b4567fd57bebf888edab62701a6abe47059a585008fd04228784f223f94d66ce4
- languageName: node
- linkType: hard
-
"use-element-dimensions@npm:^2.1.3":
version: 2.1.3
resolution: "use-element-dimensions@npm:2.1.3"
@@ -29887,6 +29527,34 @@ __metadata:
languageName: node
linkType: hard
+"vike@npm:^0.4.150":
+ version: 0.4.150
+ resolution: "vike@npm:0.4.150"
+ dependencies:
+ "@brillout/import": 0.2.3
+ "@brillout/json-serializer": ^0.5.8
+ "@brillout/picocolors": ^1.0.10
+ "@brillout/require-shim": ^0.1.2
+ "@brillout/vite-plugin-import-build": ^0.2.20
+ acorn: ^8.8.2
+ cac: ^6.7.14
+ es-module-lexer: ^1.3.0
+ esbuild: ^0.17.18
+ fast-glob: ^3.2.12
+ sirv: ^2.0.2
+ source-map-support: ^0.5.21
+ peerDependencies:
+ react-streaming: ">=0.3.5"
+ vite: ">=3.1.0"
+ peerDependenciesMeta:
+ react-streaming:
+ optional: true
+ bin:
+ vike: node/cli/bin-entry.js
+ checksum: 3c925b3339286ac6bb2e89fa4f066350b407efb7f128f2e6851fc8b2ce7975e369b46dc4821092fe5c1811656aac33656c6cbda511dfe45a72067bf73a4b3ada
+ languageName: node
+ linkType: hard
+
"vite-plugin-cesium@npm:^1.2.22":
version: 1.2.22
resolution: "vite-plugin-cesium@npm:1.2.22"
@@ -29912,34 +29580,6 @@ __metadata:
languageName: node
linkType: hard
-"vite-plugin-ssr@npm:^0.4.139":
- version: 0.4.142
- resolution: "vite-plugin-ssr@npm:0.4.142"
- dependencies:
- "@brillout/import": 0.2.3
- "@brillout/json-serializer": ^0.5.6
- "@brillout/picocolors": ^1.0.9
- "@brillout/require-shim": ^0.1.2
- "@brillout/vite-plugin-import-build": ^0.2.18
- acorn: ^8.8.2
- cac: ^6.7.14
- es-module-lexer: ^1.3.0
- esbuild: ^0.17.18
- fast-glob: ^3.2.12
- sirv: ^2.0.2
- source-map-support: ^0.5.21
- peerDependencies:
- react-streaming: ">=0.3.5"
- vite: ">=3.1.0"
- peerDependenciesMeta:
- react-streaming:
- optional: true
- bin:
- vite-plugin-ssr: node/cli/bin-entry.js
- checksum: b89f194747da06554982fbd79db04b6962e8bfbfc9f11656948651917f52b1a5d0c16079cf1ac6d077684c3396cd9b1026529215df2142dc691b18e911cc8050
- languageName: node
- linkType: hard
-
"vite@npm:^4.4.9":
version: 4.4.9
resolution: "vite@npm:4.4.9"