import { Canvas, PencilBrush, Circle, Rect, Line, IText, FabricImage, Path } from 'fabric'; let canvas = null; let editorContainer = null; let currentTool = 'draw'; let currentColor = '#000000'; let currentSize = 5; let fillEnabled = true; export function openCostumeEditor(existingCostume = null, onSave) { closeCostumeEditor(); editorContainer = document.createElement('div'); editorContainer.className = 'costume-editor-overlay'; editorContainer.innerHTML = `