Skip to content

Commit d8b7d3c

Browse files
authored
Merge pull request #206 from UW-Macrostrat/update-blueprint
Update BlueprintJS and other major improvements
2 parents 2e68698 + 84c1278 commit d8b7d3c

File tree

139 files changed

+4017
-6014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+4017
-6014
lines changed

.parcelrc

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

.storybook/docs-container.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { useEffect, useState } from "react";
66
export const DocsContainer = ({ children, context }) => {
77
// Check for body class changes
88
const [dark, setDark] = useState(
9-
document.body.classList.contains("bp5-dark"),
9+
document.body.classList.contains("bp6-dark"),
1010
);
1111

1212
useEffect(() => {
1313
const observer = new MutationObserver((mutations) => {
1414
mutations.forEach((mutation) => {
1515
if (mutation.attributeName === "class") {
16-
const dark = document.body.classList.contains("bp5-dark");
16+
const dark = document.body.classList.contains("bp6-dark");
1717
setDark(dark);
1818
}
1919
});

.storybook/main.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { createRequire } from "node:module";
33
import { dirname, join } from "node:path";
44
import type { StorybookConfig } from "@storybook/react-vite";
5+
import { mergeConfig } from "vite";
56

67
const require = createRequire(import.meta.url);
78

@@ -19,10 +20,29 @@ export default {
1920
getAbsolutePath("@storybook/addon-links"),
2021
getAbsolutePath("@vueless/storybook-dark-mode"),
2122
],
22-
framework: getAbsolutePath("@storybook/react-vite"),
23+
framework: "@storybook/react-vite",
24+
async viteFinal(config) {
25+
// Prioritize source files for bundling if available
26+
return mergeConfig(config, {
27+
resolve: {
28+
conditions: ["source"],
29+
},
30+
optimizeDeps: {
31+
exclude: ["node_modules/.cache/storybook"],
32+
},
33+
css: {
34+
preprocessorOptions: {
35+
// https://vite.dev/config/shared-options.html#css-preprocessoroptions
36+
sass: {
37+
api: "modern-compiler", // or "modern", "legacy"
38+
},
39+
},
40+
},
41+
});
42+
},
2343
docs: {},
2444
} as StorybookConfig;
2545

2646
function getAbsolutePath(value: string): any {
27-
return dirname(require.resolve(join(value, "package.json")));
47+
return dirname(require.resolve(value));
2848
}

.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const parameters = {
3030
//current: "light",
3131
dark: { ...themes.dark },
3232
light: { ...themes.light },
33-
darkClass: ["bp5-dark"],
33+
darkClass: ["bp6-dark"],
3434
lightClass: [],
3535
stylePreview: true,
3636
},

.yarnrc.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
nodeLinker: node-modules
1+
nodeLinker: pnp
22

33
packageExtensions:
44
"@blueprintjs/datetime@*":
55
dependencies:
6-
"@types/react": ^16||^17||^18
7-
"@parcel/fs@^2.13.3":
8-
dependencies:
9-
"@parcel/core": ^2.13.3
10-
"@parcel/workers@^2.13.3":
11-
dependencies:
12-
"@parcel/core": ^2.13.3
6+
"@types/react": ^18||^19
137
"@types/react@*":
148
dependencies:
159
prop-types: "*"
@@ -31,3 +25,6 @@ packageExtensions:
3125
supports-color: "*"
3226

3327
yarnPath: .yarn/releases/yarn-4.12.0.cjs
28+
29+
pnpFallbackMode: all
30+
pnpMode: loose

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
# `[4.0.0]` - 2026-01-26
4+
5+
- Major update to bundling strategy using the
6+
[`@macrostrat/web-components-bundler`](./toolchain/bundler) package, removing
7+
the `parcel` dependency.
8+
- Add a `update-metadata` script to handle changes to package JSON files across
9+
the monorepo.
10+
- Update peer dependencies to React 18.
11+
- Require styles to be imported separately for many packages.
12+
- Update to Yarn PnP
13+
- Update Storybook to version `10.2.0`
14+
315
# `[3.0.0]` - 2024-02-04
416

517
This release includes major changes in support of bundling all dependencies for

README.md

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,78 @@ within the library itself.
1010
You can view the latest version of each component in the
1111
[storybook](https://dev.macrostrat.org/docs/web-components/?path=/docs/text-extractions-text-extraction--docs)
1212

13-
## Architecture
13+
## Usage
1414

15-
#### Libraries
15+
### Libraries
1616

1717
Macrostrat's web components system is a workbench for producing user interface
1818
components. It is structured as a monorepo, with several modules (in the
1919
`packages` directory) that are being maintained for publication to NPM and
2020
referencing in Macrostrat's user-facing applications. Open-source contributions
2121
and third-party usage are welcome!
2222

23-
Following is a list of all published modules
24-
25-
[![@macrostrat/api-types](https://img.shields.io/npm/v/@macrostrat/api-types?label=%40macrostrat%2Fapi-types)](https://www.npmjs.com/package/@macrostrat/api-types)
26-
[![@macrostrat/color-utils](https://img.shields.io/npm/v/@macrostrat/color-utils?label=%40macrostrat%2Fcolor-utils)](https://www.npmjs.com/package/@macrostrat/color-utils)
27-
[![@macrostrat/column-components](https://img.shields.io/npm/v/@macrostrat/column-components?label=%40macrostrat%2Fcolumn-components)](https://www.npmjs.com/package/@macrostrat/column-components)
28-
[![@macrostrat/column-views](https://img.shields.io/npm/v/@macrostrat/column-views?label=%40macrostrat%2Fcolumn-views)](https://www.npmjs.com/package/@macrostrat/column-views)
29-
[![@macrostrat/data-components](https://img.shields.io/npm/v/@macrostrat/data-components?label=%40macrostrat%2Fdata-components)](https://www.npmjs.com/package/@macrostrat/data-components)
30-
[![@macrostrat/data-sheet](https://img.shields.io/npm/v/@macrostrat/data-sheet?label=%40macrostrat%2Fdata-sheet)](https://www.npmjs.com/package/@macrostrat/data-sheet)
31-
[![@macrostrat/feedback-components](https://img.shields.io/npm/v/@macrostrat/feedback-components?label=%40macrostrat%2Ffeedback-components)](https://www.npmjs.com/package/@macrostrat/feedback-components)
32-
[![@macrostrat/form-components](https://img.shields.io/npm/v/@macrostrat/form-components?label=%40macrostrat%2Fform-components)](https://www.npmjs.com/package/@macrostrat/form-components)
33-
[![@macrostrat/map-interface](https://img.shields.io/npm/v/@macrostrat/map-interface?label=%40macrostrat%2Fmap-interface)](https://www.npmjs.com/package/@macrostrat/map-interface)
34-
[![@macrostrat/map-styles](https://img.shields.io/npm/v/@macrostrat/map-styles?label=%40macrostrat%2Fmap-styles)](https://www.npmjs.com/package/@macrostrat/map-styles)
35-
[![@macrostrat/mapbox-react](https://img.shields.io/npm/v/@macrostrat/mapbox-react?label=%40macrostrat%2Fmapbox-react)](https://www.npmjs.com/package/@macrostrat/mapbox-react)
36-
[![@macrostrat/mapbox-utils](https://img.shields.io/npm/v/@macrostrat/mapbox-utils?label=%40macrostrat%2Fmapbox-utils)](https://www.npmjs.com/package/@macrostrat/mapbox-utils)
37-
[![@macrostrat/stratigraphy-utils](https://img.shields.io/npm/v/@macrostrat/stratigraphy-utils?label=%40macrostrat%2Fstratigraphy-utils)](https://www.npmjs.com/package/@macrostrat/stratigraphy-utils)
38-
[![@macrostrat/style-system](https://img.shields.io/npm/v/@macrostrat/style-system?label=%40macrostrat%2Fstyle-system)](https://www.npmjs.com/package/@macrostrat/style-system)
39-
[![@macrostrat/svg-map-components](https://img.shields.io/npm/v/@macrostrat/svg-map-components?label=%40macrostrat%2Fsvg-map-components)](https://www.npmjs.com/package/@macrostrat/svg-map-components)
40-
[![@macrostrat/timescale](https://img.shields.io/npm/v/@macrostrat/timescale?label=%40macrostrat%2Ftimescale)](https://www.npmjs.com/package/@macrostrat/timescale)
41-
[![@macrostrat/ui-components](https://img.shields.io/npm/v/@macrostrat/ui-components?label=%40macrostrat%2Fui-components)](https://www.npmjs.com/package/@macrostrat/ui-components)
42-
43-
## Contributing to web components
23+
- [![@macrostrat/api-types](https://img.shields.io/npm/v/@macrostrat/api-types?label=%40macrostrat%2Fapi-types)](https://www.npmjs.com/package/@macrostrat/api-types)
24+
- [![@macrostrat/color-utils](https://img.shields.io/npm/v/@macrostrat/color-utils?label=%40macrostrat%2Fcolor-utils)](https://www.npmjs.com/package/@macrostrat/color-utils)
25+
- [![@macrostrat/column-components](https://img.shields.io/npm/v/@macrostrat/column-components?label=%40macrostrat%2Fcolumn-components)](https://www.npmjs.com/package/@macrostrat/column-components)
26+
- [![@macrostrat/column-views](https://img.shields.io/npm/v/@macrostrat/column-views?label=%40macrostrat%2Fcolumn-views)](https://www.npmjs.com/package/@macrostrat/column-views)
27+
- [![@macrostrat/data-components](https://img.shields.io/npm/v/@macrostrat/data-components?label=%40macrostrat%2Fdata-components)](https://www.npmjs.com/package/@macrostrat/data-components)
28+
- [![@macrostrat/data-sheet](https://img.shields.io/npm/v/@macrostrat/data-sheet?label=%40macrostrat%2Fdata-sheet)](https://www.npmjs.com/package/@macrostrat/data-sheet)
29+
- [![@macrostrat/feedback-components](https://img.shields.io/npm/v/@macrostrat/feedback-components?label=%40macrostrat%2Ffeedback-components)](https://www.npmjs.com/package/@macrostrat/feedback-components)
30+
- [![@macrostrat/form-components](https://img.shields.io/npm/v/@macrostrat/form-components?label=%40macrostrat%2Fform-components)](https://www.npmjs.com/package/@macrostrat/form-components)
31+
- [![@macrostrat/map-interface](https://img.shields.io/npm/v/@macrostrat/map-interface?label=%40macrostrat%2Fmap-interface)](https://www.npmjs.com/package/@macrostrat/map-interface)
32+
- [![@macrostrat/map-styles](https://img.shields.io/npm/v/@macrostrat/map-styles?label=%40macrostrat%2Fmap-styles)](https://www.npmjs.com/package/@macrostrat/map-styles)
33+
- [![@macrostrat/mapbox-react](https://img.shields.io/npm/v/@macrostrat/mapbox-react?label=%40macrostrat%2Fmapbox-react)](https://www.npmjs.com/package/@macrostrat/mapbox-react)
34+
- [![@macrostrat/mapbox-utils](https://img.shields.io/npm/v/@macrostrat/mapbox-utils?label=%40macrostrat%2Fmapbox-utils)](https://www.npmjs.com/package/@macrostrat/mapbox-utils)
35+
- [![@macrostrat/static-map-utils](https://img.shields.io/npm/v/@macrostrat/static-map-utils?label=%40macrostrat%2Fstatic-map-utils)](https://www.npmjs.com/package/@macrostrat/static-map-utils)
36+
- [![@macrostrat/stratigraphy-utils](https://img.shields.io/npm/v/@macrostrat/stratigraphy-utils?label=%40macrostrat%2Fstratigraphy-utils)](https://www.npmjs.com/package/@macrostrat/stratigraphy-utils)
37+
- [![@macrostrat/style-system](https://img.shields.io/npm/v/@macrostrat/style-system?label=%40macrostrat%2Fstyle-system)](https://www.npmjs.com/package/@macrostrat/style-system)
38+
- [![@macrostrat/svg-map-components](https://img.shields.io/npm/v/@macrostrat/svg-map-components?label=%40macrostrat%2Fsvg-map-components)](https://www.npmjs.com/package/@macrostrat/svg-map-components)
39+
- [![@macrostrat/timescale](https://img.shields.io/npm/v/@macrostrat/timescale?label=%40macrostrat%2Ftimescale)](https://www.npmjs.com/package/@macrostrat/timescale)
40+
- [![@macrostrat/ui-components](https://img.shields.io/npm/v/@macrostrat/ui-components?label=%40macrostrat%2Fui-components)](https://www.npmjs.com/package/@macrostrat/ui-components)
41+
42+
### Style imports
43+
44+
Many packages in this monorepo have styles that need to be imported separately
45+
into consuming applications. These styles can be imported into HTML
46+
47+
```html
48+
<link
49+
rel="stylesheet"
50+
href="@macrostrat/column-components/dist/column-components.css"
51+
/>
52+
```
53+
54+
or into JavaScript/TypeScript files:
55+
56+
```ts
57+
import "@macrostrat/column-components/dist/column-components.css";
58+
```
59+
60+
For each package, styles can also be imported using a synthetic default import:
61+
62+
```ts
63+
import "@macrostrat/column-components/style.css";
64+
```
65+
66+
The following table lists the packages that require separate style imports,
67+
along with the version since which the style import has been necessary.
68+
69+
| Module | Stylesheet | Since |
70+
| ---------------------------------- | ---------------------------------- | ------- |
71+
| `@macrostrat/column-components` | `.../dist/column-components.css` | `2.0.0` |
72+
| `@macrostrat/column-creator` | `.../dist/column-creator.css` | `0.2.0` |
73+
| `@macrostrat/column-views` | `.../dist/column-views.css` | `3.0.0` |
74+
| `@macrostrat/data-components` | `.../dist/data-components.css` | `1.0.0` |
75+
| `@macrostrat/data-sheet` | `.../dist/data-sheet.css` | `3.0.0` |
76+
| `@macrostrat/feedback-components` | `.../dist/feedback-components.css` | `2.0.0` |
77+
| `@macrostrat/form-components` | `.../dist/form-components.css` | `1.0.0` |
78+
| `@macrostrat/map-interface` | `.../dist/map-interface.css` | `2.0.0` |
79+
| `@macrostrat/static-map-utils` | `.../dist/static-map-utils.css` | `2.0.0` |
80+
| `@macrostrat/timescale` | `.../dist/timescale.css` | `3.0.0` |
81+
| `@macrostrat/ui-components` | `.../dist/ui-components.css` | `5.0.0` |
82+
| ---------------------------------- | ---------------------------------- | ------- |
83+
84+
## Contributing
4485

4586
### Installation
4687

examples/strat-column/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"vite-plugin-serve-static": "^1.1.0"
1717
},
1818
"dependencies": {
19-
"@blueprintjs/core": "^5.16.5",
19+
"@blueprintjs/core": "^6.6.1",
2020
"@macrostrat/hyper": "^3.0.6",
2121
"@vitejs/plugin-react": "^4.3.4",
2222
"react": "^18.0.0",

package.json

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
"private": true,
55
"type": "module",
66
"repository": "https://github.com/UW-Macrostrat/web-components.git",
7-
"version": "3.0.0",
7+
"version": "4.0.0",
88
"scripts": {
9-
"dev": "storybook dev -p 6006 --no-open",
9+
"dev": "NODE_NO_WARNINGS=1 storybook dev -p 6006 --no-open",
1010
"build:storybook": "storybook build --debug",
11+
"build:bundler": "yarn workspace @macrostrat/web-components-bundler run build",
1112
"build": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers build",
1213
"status": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers status",
1314
"prepare": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers prepare",
1415
"publish": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers publish",
1516
"tag-versions": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers tag-versions",
17+
"update-metadata": "NODE_NO_WARNINGS=1 tsx scripts/publish-helpers/update-package-json-files.ts",
1618
"publish:storybook": "./scripts/publish-storybook.sh",
1719
"format": "prettier --write .",
1820
"check-types": "tsc --noEmit",
@@ -21,62 +23,50 @@
2123
"author": "Daven Quinn",
2224
"license": "ISC",
2325
"dependencies": {
24-
"@babel/core": "^7.18.6",
25-
"@babel/preset-env": "^7.21.4",
26-
"@babel/preset-typescript": "^7.21.4",
27-
"@blueprintjs/core": "^5.10.2",
26+
"@blueprintjs/core": "^6.6.1",
27+
"@macrostrat/column-components": "workspace:^",
2828
"@macrostrat/hyper": "^3.0.6",
29+
"@macrostrat/style-system": "workspace:^",
30+
"@macrostrat/ui-components": "workspace:^",
31+
"@macrostrat/web-components-bundler": "workspace:^",
2932
"@mdx-js/rollup": "^3.1.0",
30-
"@parcel/bundler-default": "^2.16.0",
31-
"@parcel/bundler-library": "^2.16.0",
32-
"@parcel/config-default": "^2.16.0",
33-
"@parcel/transformer-sass": "^2.16.0",
34-
"@parcel/transformer-typescript-types": "^2.16.0",
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",
33+
"@storybook/addon-docs": "10.2.0",
34+
"@storybook/addon-links": "10.2.0",
35+
"@storybook/builder-vite": "10.2.0",
36+
"@storybook/icons": "^2.0.1",
37+
"@storybook/react-vite": "10.2.0",
3938
"@types/d3-geo": "^3.1.0",
4039
"@types/geojson": "^7946.0.16",
4140
"@types/react": "^18.3.12",
42-
"@vueless/storybook-dark-mode": "^10.0.4",
43-
"chalk": "^5.0.1",
41+
"@vueless/storybook-dark-mode": "^10.0.6",
42+
"chalk": "^5.6.2",
4443
"date-fns": "^4.1.0",
4544
"glob": "^11.1.0",
4645
"lorem-ipsum": "^2.0.8",
46+
"madge": "^8.0.0",
4747
"marked": "^11.0",
4848
"marked-terminal": "^7.1.0",
4949
"node-fetch": "^3.2.9",
50-
"parcel": "^2.16.0",
51-
"react": "^19",
52-
"react-dom": "^19",
53-
"sass-embedded": "^1.83.0",
54-
"storybook": "10.1.11",
50+
"react": "^18||^19",
51+
"react-dom": "^18||^19",
52+
"storybook": "10.2.0",
5553
"tsx": "^4.19.1",
5654
"typescript": "^5.8.3",
57-
"underscore": "^1.12.0",
58-
"use-async-effect": "^2.2.1",
59-
"vite": "^7.2.7"
55+
"underscore": "^1.13.7",
56+
"use-async-effect": "^2.2.1"
57+
},
58+
"devDependencies": {
59+
"prettier": "^3.7.4",
60+
"vite": "^7.3.1"
6061
},
6162
"resolutions": {
62-
"@types/react": "18.3.12",
6363
"react": "^19",
64-
"react-dom": "^19",
65-
"rollup": "4.44.2"
64+
"react-dom": "^19"
6665
},
6766
"workspaces": [
6867
"packages/*",
6968
"toolchain/*",
7069
"examples/*"
7170
],
72-
"packageManager": "[email protected]",
73-
"devDependencies": {
74-
"@parcel/packager-ts": "^2.16.0",
75-
"@parcel/transformer-stylus": "^2.16.0",
76-
"@types/d3-array": "^3.2.1",
77-
"@types/underscore": "^1.13.0",
78-
"madge": "^8.0.0",
79-
"prettier": "^3.7.4",
80-
"react-docgen": "^7.0.0"
81-
}
71+
"packageManager": "[email protected]"
8272
}

packages/api-types/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.1.5] - 2026-01-26
10+
11+
Removed local `tsconfig.json` file and Parcel dependency.
12+
913
## [1.1.4] - 2025-12-19
1014

1115
Increase alignment of GeoJSON types

0 commit comments

Comments
 (0)