From 70c88dd72b20867aec03401bd20d45fc3a2c5023 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Sat, 28 Feb 2026 23:08:45 +0300 Subject: [PATCH] Replace relative imports with @/ alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add @/ → src/ alias in vite.config.ts and tsconfig.json. Rewrite all ../ imports across 32 files to use @/ paths. Same-directory ./ imports kept as-is. --- src/components/CanvasContextMenu.vue | 2 +- src/components/ColorPicker.vue | 4 +-- src/components/EditorCanvas.vue | 6 ++--- src/components/FillPicker.vue | 6 ++--- src/components/LayersPanel.vue | 2 +- src/components/PagesPanel.vue | 2 +- src/components/PropertiesPanel.vue | 2 +- src/components/Toolbar.vue | 4 +-- .../properties/AppearanceSection.vue | 6 ++--- src/components/properties/EffectsSection.vue | 10 +++---- src/components/properties/FillSection.vue | 12 ++++----- src/components/properties/LayoutSection.vue | 11 +++----- src/components/properties/PageSection.vue | 8 +++--- src/components/properties/PositionSection.vue | 4 +-- src/components/properties/StrokeSection.vue | 10 +++---- .../properties/TypographySection.vue | 6 ++--- src/composables/use-canvas-input.ts | 17 +++++------- src/composables/use-canvas.ts | 6 ++--- src/composables/use-keyboard.ts | 5 ++-- src/composables/use-menu.ts | 4 +-- src/composables/use-node-props.ts | 4 +-- src/engine/clipboard.ts | 7 ++--- src/engine/color.ts | 2 +- src/engine/fig-export.ts | 7 ++--- src/engine/renderer.ts | 5 ++-- src/engine/scene-graph.ts | 4 +-- src/engine/snap.ts | 2 +- src/kiwi/client.ts | 2 +- src/kiwi/codec.ts | 7 ++--- src/kiwi/fig-file.ts | 2 +- src/kiwi/fig-import.ts | 8 +++--- src/stores/editor.ts | 26 +++++++++---------- tsconfig.json | 5 +++- vite.config.ts | 7 +++++ 34 files changed, 111 insertions(+), 104 deletions(-) diff --git a/src/components/CanvasContextMenu.vue b/src/components/CanvasContextMenu.vue index 64445b2b2..a0107628e 100644 --- a/src/components/CanvasContextMenu.vue +++ b/src/components/CanvasContextMenu.vue @@ -12,7 +12,7 @@ import { ContextMenuPortal } from 'reka-ui' -import { useEditorStore } from '../stores/editor' +import { useEditorStore } from '@/stores/editor' const store = useEditorStore() diff --git a/src/components/ColorPicker.vue b/src/components/ColorPicker.vue index d4815694c..dd2fcb9f4 100644 --- a/src/components/ColorPicker.vue +++ b/src/components/ColorPicker.vue @@ -2,9 +2,9 @@ import { ref, computed, watch } from 'vue' import { PopoverRoot, PopoverTrigger, PopoverPortal, PopoverContent } from 'reka-ui' -import { colorToHexRaw, parseColor } from '../engine/color' +import { colorToHexRaw, parseColor } from '@/engine/color' -import type { Color } from '../types' +import type { Color } from '@/types' const props = defineProps<{ color: Color diff --git a/src/components/EditorCanvas.vue b/src/components/EditorCanvas.vue index 516be29f7..e5a94bd50 100644 --- a/src/components/EditorCanvas.vue +++ b/src/components/EditorCanvas.vue @@ -1,9 +1,9 @@