From c4f1e3d053263e6f9bbf840104559113fac687b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 8 Jul 2024 12:29:28 +0100 Subject: [PATCH] chore: Import turf modules, not full package --- editor.planx.uk/package.json | 2 ++ editor.planx.uk/pnpm-lock.yaml | 13 +++++++++++++ .../Settings/GeneralSettings/BoundaryForm.tsx | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index 3cf94a79fc..b5fcbef8f8 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -36,6 +36,8 @@ "@tiptap/react": "^2.4.0", "@tiptap/suggestion": "^2.0.3", "@turf/area": "^7.0.0", + "@turf/bbox": "^7.0.0", + "@turf/bbox-polygon": "^7.0.0", "@turf/buffer": "^7.0.0", "@turf/helpers": "^7.0.0", "array-move": "^4.0.0", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index a8064a9bf5..94afc869b1 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -110,6 +110,12 @@ dependencies: '@turf/area': specifier: ^7.0.0 version: 7.0.0 + '@turf/bbox': + specifier: ^7.0.0 + version: 7.0.0 + '@turf/bbox-polygon': + specifier: ^7.0.0 + version: 7.0.0 '@turf/buffer': specifier: ^7.0.0 version: 7.0.0 @@ -8055,6 +8061,13 @@ packages: tslib: 2.6.3 dev: false + /@turf/bbox-polygon@7.0.0: + resolution: {integrity: sha512-RMBADOr0zOhVhTidKXCAx1TLTzgBvZwQKI6KJ1FgoCPH7GMZZnMXGMvOtdQLdsplS4Zs6+NoVtaK2x0+EXdYJQ==} + dependencies: + '@turf/helpers': 7.0.0 + tslib: 2.6.3 + dev: false + /@turf/bbox@7.0.0: resolution: {integrity: sha512-IyXG5HAsn6IZLdAtQo7aWYccjU5WsV+uzIzhGaXrh/qTVylSYmRiWgLdiekHZVED9nv9r7D/EJUMOT4zyA6POA==} dependencies: diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Settings/GeneralSettings/BoundaryForm.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Settings/GeneralSettings/BoundaryForm.tsx index 74c59299d9..225e0fde0f 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Settings/GeneralSettings/BoundaryForm.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Settings/GeneralSettings/BoundaryForm.tsx @@ -1,4 +1,6 @@ -import { bbox, bboxPolygon, feature } from "@turf/turf"; +import { bbox } from "@turf/bbox"; +import { bboxPolygon } from "@turf/bbox-polygon"; +import { feature } from "@turf/helpers"; import axios from "axios"; import { useFormik } from "formik"; import { useStore } from "pages/FlowEditor/lib/store";