From 1117580f0abaefc76d512f07cff6328655dc3d54 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 13 Apr 2026 11:31:10 +0300 Subject: [PATCH 01/28] Extract shared zoom, geometry, and minimap utilities from workflow editor. --- .../Workflow/Editor/AdaptiveGrid.vue | 3 +- .../Workflow/Editor/AreaHighlight.vue | 2 +- .../Workflow/Editor/Comments/FrameComment.vue | 2 +- .../Editor/Comments/FreehandComment.vue | 2 +- .../Workflow/Editor/Comments/useResizable.ts | 3 +- .../src/components/Workflow/Editor/Lint.vue | 1 + .../Workflow/Editor/SVGConnection.vue | 6 +- .../Workflow/Editor/Tools/InputCatcher.vue | 2 +- .../Workflow/Editor/Tools/useToolLogic.ts | 10 +- .../Workflow/Editor/WorkflowEdges.vue | 2 +- .../Workflow/Editor/WorkflowGraph.vue | 10 +- .../Workflow/Editor/WorkflowMinimap.vue | 130 +++++----------- .../Workflow/Editor/ZoomControl.vue | 78 +--------- .../Editor/composables/workflowBoundingBox.ts | 3 +- .../Workflow/Editor/modules/layout.ts | 3 +- .../Workflow/Editor/modules/zoomLevels.ts | 73 ++------- .../Editor => }/composables/d3Zoom.ts | 10 +- .../src/composables/useMinimapInteraction.ts | 144 ++++++++++++++++++ .../composables/viewportBoundingBox.ts | 3 +- .../src/stores/workflowEditorCommentStore.ts | 4 +- .../src/stores/workflowEditorToolbarStore.ts | 2 +- client/src/stores/workflowSearchStore.ts | 2 +- client/src/utils/connectionPath.ts | 127 +++++++++++++++ .../Editor/modules => utils}/geometry.ts | 0 client/src/utils/zoomLevels.ts | 61 ++++++++ 25 files changed, 419 insertions(+), 264 deletions(-) rename client/src/{components/Workflow/Editor => }/composables/d3Zoom.ts (92%) create mode 100644 client/src/composables/useMinimapInteraction.ts rename client/src/{components/Workflow/Editor => }/composables/viewportBoundingBox.ts (97%) create mode 100644 client/src/utils/connectionPath.ts rename client/src/{components/Workflow/Editor/modules => utils}/geometry.ts (100%) create mode 100644 client/src/utils/zoomLevels.ts diff --git a/client/src/components/Workflow/Editor/AdaptiveGrid.vue b/client/src/components/Workflow/Editor/AdaptiveGrid.vue index 580c27d675c..12273682e85 100644 --- a/client/src/components/Workflow/Editor/AdaptiveGrid.vue +++ b/client/src/components/Workflow/Editor/AdaptiveGrid.vue @@ -3,8 +3,7 @@ import type { UseElementBoundingReturn } from "@vueuse/core"; import { computed, onMounted, type Ref, ref, watch } from "vue"; import { useAnimationFrame } from "@/composables/sensors/animationFrame"; - -import { type AxisAlignedBoundingBox, Transform, type WorkflowTransform } from "./modules/geometry"; +import { type AxisAlignedBoundingBox, Transform, type WorkflowTransform } from "@/utils/geometry"; const lineGap = 10; diff --git a/client/src/components/Workflow/Editor/AreaHighlight.vue b/client/src/components/Workflow/Editor/AreaHighlight.vue index 2b4163f8ecb..29091bc0cd8 100644 --- a/client/src/components/Workflow/Editor/AreaHighlight.vue +++ b/client/src/components/Workflow/Editor/AreaHighlight.vue @@ -1,7 +1,7 @@