From 385a103b75bed30689afd4401e15802fd9d4dd3f Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Tue, 26 Sep 2023 16:52:49 -0400 Subject: [PATCH] fix(VTKjs): Fix type imports from VTK.js Fixes type imports from '@kitware/vtk.js/types'. Resolves observed error when developing against a local VTK.js development branch: ```sh ERROR Error: The following dependencies are imported but could not be resolved: 16:46:24 @kitware/vtk.js/types (imported by C:/repos/VolView/src/components/tools/polygon/PolygonWidget2D.vue?id=0) Are they installed? at file:///C:/repos/VolView/node_modules/vite/dist/node/chunks/dep-df561101.js:45705:23 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///C:/repos/VolView/node_modules/vite/dist/node/chunks/dep-df561101.js:45114:38 ``` --- src/components/tools/BoundingRectangle.vue | 2 +- src/components/tools/polygon/PolygonWidget2D.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tools/BoundingRectangle.vue b/src/components/tools/BoundingRectangle.vue index 65d786a5e..7f93eb950 100644 --- a/src/components/tools/BoundingRectangle.vue +++ b/src/components/tools/BoundingRectangle.vue @@ -6,7 +6,7 @@ import { worldToSVG } from '@/src/utils/vtk-helpers'; import { nonNullable } from '@/src/utils/index'; import vtkLPSView2DProxy from '@/src/vtk/LPSView2DProxy'; import vtkBoundingBox from '@kitware/vtk.js/Common/DataModel/BoundingBox'; -import { Bounds, Vector3 } from '@kitware/vtk.js/types'; +import type { Bounds, Vector3 } from '@kitware/vtk.js/types'; import { onVTKEvent } from '@/src/composables/onVTKEvent'; const props = defineProps<{ diff --git a/src/components/tools/polygon/PolygonWidget2D.vue b/src/components/tools/polygon/PolygonWidget2D.vue index 73a2df77f..d915b8123 100644 --- a/src/components/tools/polygon/PolygonWidget2D.vue +++ b/src/components/tools/polygon/PolygonWidget2D.vue @@ -25,7 +25,7 @@ import vtkWidgetFactory, { vtkPolygonViewWidget as WidgetView, } from '@/src/vtk/PolygonWidget'; import { Maybe } from '@/src/types'; -import { Vector3 } from '@kitware/vtk.js/types'; +import type { Vector3 } from '@kitware/vtk.js/types'; import { useViewStore } from '@/src/store/views'; import { onViewProxyMounted,