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
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "@sofarocean/mapbox-context",
"version": "2.1.0",
"version": "2.2.0",
"description": "A React wrapper for Mapbox GL JS built for the era of React Context and Hooks",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Wayfinder Engineering <eng-wayfinder@sofarocean.com>",
"license": "MIT",
"private": false,
"repository": "https://github.com/wavespotter/mapbox-context",
"repository": {
"type": "git",
"url": "git+https://github.com/wavespotter/mapbox-context.git"
},
Comment on lines +10 to +13

@ryanhamley ryanhamley Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm said this change had to be made in order to publish? i ran npm pkg fix and this is what it spit out.

"homepage": "https://github.com/wavespotter/mapbox-context",
"files": [
"package.json",
Expand Down Expand Up @@ -44,6 +47,7 @@
"typescript": "^5.9.2",
"typescript-eslint": "^8.41.0",
"vite": "^7.1.2",
"vite-plugin-css-injected-by-js": "^4.0.1",
"vite-plugin-dts": "^4.5.4",
"vitest": "^3.2.4"
},
Expand Down
2 changes: 2 additions & 0 deletions src/components/MapboxMap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "./map.css";
import mapboxgl, {
LngLatBoundsLike,
LngLatLike,
Expand Down Expand Up @@ -101,6 +102,7 @@ const MapboxMap = ({
transformRequest,
accessToken: token,
});
newMap.addControl(new mapboxgl.AttributionControl(), "bottom-left");
newMap.on("load", () => {
setMap(newMap);
});
Expand Down
4 changes: 4 additions & 0 deletions src/components/MapboxMap/map.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.mapboxgl-ctrl-bottom-left {
display: flex;
flex-direction: column-reverse;
}
2 changes: 2 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { dirname } from "node:path";
import { fileURLToPath, URL } from "node:url";
import { extname, relative, resolve } from "path";
import { defineConfig } from "vite";
import cssInjectedByJs from "vite-plugin-css-injected-by-js";
import dts from "vite-plugin-dts";

export default defineConfig({
plugins: [
cssInjectedByJs(),
dts({
exclude: ["**/*.stories.tsx", "**/storybook-helpers/*"],
}),
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4010,11 +4010,6 @@ node-releases@^2.0.19:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314"
integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==

object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==

open@^8.0.4:
version "8.4.2"
resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
Expand Down Expand Up @@ -4871,6 +4866,11 @@ vite-node@3.2.4:
pathe "^2.0.3"
vite "^5.0.0 || ^6.0.0 || ^7.0.0-0"

vite-plugin-css-injected-by-js@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-4.0.1.tgz#ed69dd8f04800f9e3c7a17c3a2e3819eede6092e"
integrity sha512-WfyRojojQyAO/KzWf+efcXpTPv6zJPXaRmr9EYq5a4v5I3PWCR7kR01hiri2lW6+rHm3a57kpwsf+iahIJi1Qw==

vite-plugin-dts@^4.5.4:
version "4.5.4"
resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-4.5.4.tgz#51b60aaaa760d9cf5c2bb3676c69d81910d6b08c"
Expand Down
Loading