Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"@parcel/config-default": "^2.16.0",
"@parcel/transformer-sass": "^2.16.0",
"@parcel/transformer-typescript-types": "^2.16.0",
"@storybook/addon-docs": "10.1.8",
"@storybook/addon-links": "10.1.8",
"@storybook/builder-vite": "10.1.8",
"@storybook/react-vite": "10.1.8",
"@storybook/addon-docs": "10.1.11",
"@storybook/addon-links": "10.1.11",
"@storybook/builder-vite": "10.1.11",
"@storybook/react-vite": "10.1.11",
"@types/d3-geo": "^3.1.0",
"@types/geojson": "^7946.0.16",
"@types/react": "^18.3.12",
Expand All @@ -51,7 +51,7 @@
"react": "^19",
"react-dom": "^19",
"sass-embedded": "^1.83.0",
"storybook": "10.1.8",
"storybook": "10.1.11",
"tsx": "^4.19.1",
"typescript": "^5.8.3",
"underscore": "^1.12.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/column-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.0] - 2026-01-17

Remove outdated `react-images` dependency and convert `PhotoViewer` component to
a shim.

## [1.4.2] - 2025-12-19

Small fixes to typings
Expand Down
5 changes: 1 addition & 4 deletions packages/column-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@macrostrat/column-components",
"version": "1.4.2",
"version": "1.5.0",
"description": "React rendering primitives for stratigraphic columns",
"keywords": [
"geology",
Expand Down Expand Up @@ -59,13 +59,10 @@
"d3-path": "^3.1.0",
"d3-scale": "^3.2.1",
"d3-selection": "^3.0.0",
"fscreen": "^1.0.2",
"immutability-helper": "^3.0.2",
"labella": "^1.1.4",
"react-color": "^2.18.0",
"react-draggable": "^4.4.5",
"react-images": "^1.1.0-beta.1",
"react-router-dom": "^5.1.2",
"react-scroll": "^1.7.16",
"react-select": "^3.0.8",
"react-svg-textures": "^1.4.7",
Expand Down
71 changes: 71 additions & 0 deletions packages/column-components/src/photos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { useContext, useEffect, createContext, ReactNode } from "react";
import h from "@macrostrat/hyper";
// Default value for computePhotoPath
const passThrough = (src) => src;

interface PhotoLibraryCtx {
photos: PhotoData[] | null;
computePhotoPath: (src: string) => string;
}

export const PhotoLibraryContext = createContext<PhotoLibraryCtx>({
photos: null,
computePhotoPath: passThrough,
});

interface PhotoData {
id: number;
src: string;
caption?: string;
}

interface PhotoLibraryProviderProps extends PhotoLibraryCtx {
children: ReactNode;
}

export function PhotoLibraryProvider(props: PhotoLibraryProviderProps) {
const { children, computePhotoPath = passThrough, photos } = props;
return h(PhotoLibraryContext.Provider, {
value: {
photos,
computePhotoPath,
},
children,
});
}

export function PhotoOverlay(props) {
const { photos, computePhotoPath } = useContext(PhotoLibraryContext);
if (photos == null) {
return null;
}
const { photoIDs, ...rest } = props;

const displayedPhotos = photoIDs.map((id) => {
return photos.find((d) => d.id === id);
});

const getPaths = function (d) {
const src = computePhotoPath(d);
return { src, caption: d.note };
};

const images = displayedPhotos.filter((d) => d != null).map(getPaths);

return h(PhotoGallery, {
images,
...rest,
});
}

const PhotoGallery = function ({ images, isOpen = false, onClose }) {
/** The photo gallery component has been removed due to an outdated design.
* Please use another library for this functionality.
*/
useEffect(() => {
console.error(
"PhotoOverlay from @macrostrat/column-components has been disabled due to an outdated design. Please use another library for this functionality.",
);
}, []);
return null;
};
34 changes: 0 additions & 34 deletions packages/column-components/src/photos/context.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/column-components/src/photos/index.ts

This file was deleted.

57 changes: 0 additions & 57 deletions packages/column-components/src/photos/overlay.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { hyperStyled } from "@macrostrat/hyper";
//@ts-ignore
import styles from "./taxa.module.scss";
import { Spinner } from "@blueprintjs/core";
import fetch from "node-fetch";

const h = hyperStyled(styles);

Expand Down
6 changes: 6 additions & 0 deletions packages/data-sheet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.3] - 2026-01-17

- Fix issue with column resizing
- Refactored key handlers
- Reduced rendering overhead with `useCallback` and `useMemo`

## [2.2.2] - 2025-12-13

Small typing fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/data-sheet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@macrostrat/data-sheet",
"version": "2.2.2",
"version": "2.2.3",
"description": "Scalable data sheet with optional editing capabilities",
"type": "module",
"source": "src/index.ts",
Expand Down
Loading