Skip to content

Commit 8967a8d

Browse files
authored
Merge pull request #199 from UW-Macrostrat/package-updates
Package updates
2 parents dfba51d + 9ee2b04 commit 8967a8d

File tree

11 files changed

+150
-848
lines changed

11 files changed

+150
-848
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"@parcel/config-default": "^2.16.0",
3333
"@parcel/transformer-sass": "^2.16.0",
3434
"@parcel/transformer-typescript-types": "^2.16.0",
35-
"@storybook/addon-docs": "10.1.8",
36-
"@storybook/addon-links": "10.1.8",
37-
"@storybook/builder-vite": "10.1.8",
38-
"@storybook/react-vite": "10.1.8",
35+
"@storybook/addon-docs": "10.1.11",
36+
"@storybook/addon-links": "10.1.11",
37+
"@storybook/builder-vite": "10.1.11",
38+
"@storybook/react-vite": "10.1.11",
3939
"@types/d3-geo": "^3.1.0",
4040
"@types/geojson": "^7946.0.16",
4141
"@types/react": "^18.3.12",
@@ -51,7 +51,7 @@
5151
"react": "^19",
5252
"react-dom": "^19",
5353
"sass-embedded": "^1.83.0",
54-
"storybook": "10.1.8",
54+
"storybook": "10.1.11",
5555
"tsx": "^4.19.1",
5656
"typescript": "^5.8.3",
5757
"underscore": "^1.12.0",

packages/column-components/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format
44
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
55
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.5.0] - 2026-01-17
8+
9+
Remove outdated `react-images` dependency and convert `PhotoViewer` component to
10+
a shim.
11+
712
## [1.4.2] - 2025-12-19
813

914
Small fixes to typings

packages/column-components/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/column-components",
3-
"version": "1.4.2",
3+
"version": "1.5.0",
44
"description": "React rendering primitives for stratigraphic columns",
55
"keywords": [
66
"geology",
@@ -59,13 +59,10 @@
5959
"d3-path": "^3.1.0",
6060
"d3-scale": "^3.2.1",
6161
"d3-selection": "^3.0.0",
62-
"fscreen": "^1.0.2",
6362
"immutability-helper": "^3.0.2",
6463
"labella": "^1.1.4",
6564
"react-color": "^2.18.0",
6665
"react-draggable": "^4.4.5",
67-
"react-images": "^1.1.0-beta.1",
68-
"react-router-dom": "^5.1.2",
6966
"react-scroll": "^1.7.16",
7067
"react-select": "^3.0.8",
7168
"react-svg-textures": "^1.4.7",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import { useContext, useEffect, createContext, ReactNode } from "react";
2+
import h from "@macrostrat/hyper";
3+
// Default value for computePhotoPath
4+
const passThrough = (src) => src;
5+
6+
interface PhotoLibraryCtx {
7+
photos: PhotoData[] | null;
8+
computePhotoPath: (src: string) => string;
9+
}
10+
11+
export const PhotoLibraryContext = createContext<PhotoLibraryCtx>({
12+
photos: null,
13+
computePhotoPath: passThrough,
14+
});
15+
16+
interface PhotoData {
17+
id: number;
18+
src: string;
19+
caption?: string;
20+
}
21+
22+
interface PhotoLibraryProviderProps extends PhotoLibraryCtx {
23+
children: ReactNode;
24+
}
25+
26+
export function PhotoLibraryProvider(props: PhotoLibraryProviderProps) {
27+
const { children, computePhotoPath = passThrough, photos } = props;
28+
return h(PhotoLibraryContext.Provider, {
29+
value: {
30+
photos,
31+
computePhotoPath,
32+
},
33+
children,
34+
});
35+
}
36+
37+
export function PhotoOverlay(props) {
38+
const { photos, computePhotoPath } = useContext(PhotoLibraryContext);
39+
if (photos == null) {
40+
return null;
41+
}
42+
const { photoIDs, ...rest } = props;
43+
44+
const displayedPhotos = photoIDs.map((id) => {
45+
return photos.find((d) => d.id === id);
46+
});
47+
48+
const getPaths = function (d) {
49+
const src = computePhotoPath(d);
50+
return { src, caption: d.note };
51+
};
52+
53+
const images = displayedPhotos.filter((d) => d != null).map(getPaths);
54+
55+
return h(PhotoGallery, {
56+
images,
57+
...rest,
58+
});
59+
}
60+
61+
const PhotoGallery = function ({ images, isOpen = false, onClose }) {
62+
/** The photo gallery component has been removed due to an outdated design.
63+
* Please use another library for this functionality.
64+
*/
65+
useEffect(() => {
66+
console.error(
67+
"PhotoOverlay from @macrostrat/column-components has been disabled due to an outdated design. Please use another library for this functionality.",
68+
);
69+
}, []);
70+
return null;
71+
};

packages/column-components/src/photos/context.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/column-components/src/photos/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/column-components/src/photos/overlay.ts

Lines changed: 0 additions & 57 deletions
This file was deleted.

packages/data-components/src/components/prevalent-taxa/prevalent-taxa.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { hyperStyled } from "@macrostrat/hyper";
44
//@ts-ignore
55
import styles from "./taxa.module.scss";
66
import { Spinner } from "@blueprintjs/core";
7-
import fetch from "node-fetch";
87

98
const h = hyperStyled(styles);
109

packages/data-sheet/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format
44
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
55
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.3] - 2026-01-17
8+
9+
- Fix issue with column resizing
10+
- Refactored key handlers
11+
- Reduced rendering overhead with `useCallback` and `useMemo`
12+
713
## [2.2.2] - 2025-12-13
814

915
Small typing fixes

packages/data-sheet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/data-sheet",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "Scalable data sheet with optional editing capabilities",
55
"type": "module",
66
"source": "src/index.ts",

0 commit comments

Comments
 (0)