From 7e9cd46e0b0ab406ced78166f842668215150ea7 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Sat, 28 Feb 2026 09:00:25 +0300 Subject: [PATCH] Split PropertiesPanel into sections, add Typography panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PropertiesPanel.vue: 513 → 67 lines (composition only) - Extracted: PositionSection, LayoutSection, AppearanceSection, FillSection, StrokeSection, TypographySection - Shared useNodeProps() composable for update/commit logic - Typography panel: font family picker with search (queryLocalFonts), weight select, font size, line height, letter spacing, text alignment - Font picker shows each family in its own typeface - Loads selected font into both CanvasKit and browser on pick --- components.d.ts | 11 + src/components/PropertiesPanel.vue | 474 +----------------- .../properties/AppearanceSection.vue | 25 + src/components/properties/FillSection.vue | 54 ++ src/components/properties/LayoutSection.vue | 256 ++++++++++ src/components/properties/PositionSection.vue | 22 + src/components/properties/StrokeSection.vue | 56 +++ .../properties/TypographySection.vue | 196 ++++++++ src/composables/use-node-props.ts | 33 ++ 9 files changed, 667 insertions(+), 460 deletions(-) create mode 100644 src/components/properties/AppearanceSection.vue create mode 100644 src/components/properties/FillSection.vue create mode 100644 src/components/properties/LayoutSection.vue create mode 100644 src/components/properties/PositionSection.vue create mode 100644 src/components/properties/StrokeSection.vue create mode 100644 src/components/properties/TypographySection.vue create mode 100644 src/composables/use-node-props.ts diff --git a/components.d.ts b/components.d.ts index 857634312..83060de44 100644 --- a/components.d.ts +++ b/components.d.ts @@ -11,12 +11,23 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AppearanceSection: typeof import('./src/components/properties/AppearanceSection.vue')['default'] ColorPicker: typeof import('./src/components/ColorPicker.vue')['default'] EditorCanvas: typeof import('./src/components/EditorCanvas.vue')['default'] + FillSection: typeof import('./src/components/properties/FillSection.vue')['default'] + IconLucideALargeSmall: typeof import('~icons/lucide/a-large-small')['default'] + IconLucideBaseline: typeof import('~icons/lucide/baseline')['default'] + IconLucideCheck: typeof import('~icons/lucide/check')['default'] + IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default'] IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default'] + IconLucideSearch: typeof import('~icons/lucide/search')['default'] LayersPanel: typeof import('./src/components/LayersPanel.vue')['default'] + LayoutSection: typeof import('./src/components/properties/LayoutSection.vue')['default'] + PositionSection: typeof import('./src/components/properties/PositionSection.vue')['default'] PropertiesPanel: typeof import('./src/components/PropertiesPanel.vue')['default'] ScrubInput: typeof import('./src/components/ScrubInput.vue')['default'] + StrokeSection: typeof import('./src/components/properties/StrokeSection.vue')['default'] Toolbar: typeof import('./src/components/Toolbar.vue')['default'] + TypographySection: typeof import('./src/components/properties/TypographySection.vue')['default'] } } diff --git a/src/components/PropertiesPanel.vue b/src/components/PropertiesPanel.vue index c7f2a39b7..0da1b9ab9 100644 --- a/src/components/PropertiesPanel.vue +++ b/src/components/PropertiesPanel.vue @@ -1,217 +1,19 @@