Skip to content

Commit

Permalink
v4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Sep 24, 2022
1 parent 36ee9db commit ce8a286
Show file tree
Hide file tree
Showing 12 changed files with 947 additions and 945 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v4.1.0 (2022-09-24)

- Updated Leaflet dependency to v1.9.
- Fixed `eventHandlers` object being injected in WMS request URL.
- Added support for dynamic `bounds` props on `ImageOverlay`.

## v4.0.2 (2022-08-22)

- Fix typos in getting started docs
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
"name": "react-leaflet-repository",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@7.5.0",
"packageManager": "pnpm@7.12.2",
"scripts": {
"lint": "eslint './packages/**/*.ts' './packages/**/*.tsx'",
"test": "jest",
"build": "turbo run build:clean && pnpm run build:types && turbo run build:js"
"build": "turbo run build:clean && pnpm run -r build:types && turbo run build:js"
},
"devDependencies": {
"@skypack/package-check": "^0.2.2",
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.241",
"@swc/core": "^1.3.3",
"@swc/jest": "^0.2.22",
"@testing-library/react": "^13.3.0",
"@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/jest": "^28.1.7",
"@types/leaflet": "^1.7.11",
"@types/jest": "^29.0.3",
"@types/leaflet": "^1.8.0",
"@types/warning": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"cross-env": "^7.0.3",
"del-cli": "^5.0.0",
"eslint": "^8.22.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"leaflet": "^1.8.0",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"leaflet": "^1.9.1",
"prettier": "^2.7.1",
"prettier-eslint": "^15.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-test-renderer": "^18.2.0",
"ts-jest-resolver": "^2.0.0",
"turbo": "^1.4.3",
"typescript": "^4.7.4"
"turbo": "^1.5.3",
"typescript": "^4.8.3"
},
"jest": {
"projects": [
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-leaflet/core",
"version": "2.0.1",
"version": "2.1.0",
"description": "React Leaflet core",
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,12 +41,12 @@
"prepublishOnly": "package-check"
},
"peerDependencies": {
"leaflet": "^1.8.0",
"leaflet": "^1.9.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6"
},
"jest": {
Expand Down
11 changes: 9 additions & 2 deletions packages/core/src/circle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type {
Circle as LeafletCircle,
CircleMarker as LeafletCircleMarker,
CircleMarkerOptions,
CircleOptions,
LatLngExpression,
} from 'leaflet'
import type { ReactNode } from 'react'
Expand All @@ -12,8 +14,13 @@ export interface CircleMarkerProps extends CircleMarkerOptions, PathProps {
children?: ReactNode
}

export function updateCircle<P extends CircleMarkerProps = CircleMarkerProps>(
layer: LeafletCircleMarker,
export interface CircleProps extends CircleOptions, PathProps {
center: LatLngExpression
children?: ReactNode
}

export function updateCircle<P extends CircleMarkerProps | CircleProps>(
layer: LeafletCircle<P> | LeafletCircleMarker<P>,
props: P,
prevProps: P,
) {
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export { useAttribution } from './attribution.js'
export { type CircleMarkerProps, updateCircle } from './circle.js'
export {
type CircleMarkerProps,
type CircleProps,
updateCircle,
} from './circle.js'
export {
createContainerComponent,
createDivOverlayComponent,
Expand Down
32 changes: 0 additions & 32 deletions packages/react-leaflet/__tests__/__snapshots__/Pane.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,24 @@ exports[`Pane can unmount and remount with the same name 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand All @@ -87,28 +83,24 @@ exports[`Pane can unmount and remount with the same name 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down Expand Up @@ -329,28 +321,24 @@ exports[`Pane can unmount and remount with the same name 3`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-foo-nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-foo-nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-foo-nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-foo-nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand All @@ -368,28 +356,24 @@ exports[`Pane can unmount and remount with the same name 3`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-bar-not-nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-bar-not-nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-bar-not-nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/new-bar-not-nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down Expand Up @@ -512,28 +496,24 @@ exports[`Pane renders 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down Expand Up @@ -656,28 +636,24 @@ exports[`Pane renders in Strict Mode 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down Expand Up @@ -804,28 +780,24 @@ exports[`Pane renders nested panes 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand All @@ -843,28 +815,24 @@ exports[`Pane renders nested panes 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost/not-nested"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,24 @@ exports[`TileLayer renders 1`] = `
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: -256px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: -256px; top: 0px;"
/>
<img
alt=""
class="leaflet-tile"
role="presentation"
src="http://localhost"
style="width: 256px; height: 256px; left: 0px; top: 0px;"
/>
Expand Down
Loading

0 comments on commit ce8a286

Please sign in to comment.