fix: build errors

This commit is contained in:
Santos Alarcón 2026-05-22 19:26:28 +02:00
parent 9bbd57299d
commit 0babefa30b
2 changed files with 2 additions and 7 deletions

View file

@ -7,8 +7,6 @@ import { computeAllLayouts } from '#core/layout'
import type { SceneNode } from '#core/scene-graph'
import type { Vector } from '#core/types'
import {useI18n} from "@open-pencil/vue";
import { createClipboardCopyActions } from './clipboard/copy'
import { createClipboardExportActions } from './clipboard/export'
import { createClipboardFontActions } from './clipboard/fonts'
@ -27,7 +25,6 @@ type PasteOptions = {
export function createClipboardActions(ctx: EditorContext) {
function duplicateSelected(selectedNodes: SceneNode[]) {
const {panels} = useI18n();
const prevSelection = new Set(ctx.state.selectedIds)
const selectedSet = new Set(selectedNodes.map((n) => n.id))
const topLevel = selectedNodes.filter((n) => !n.parentId || !selectedSet.has(n.parentId))
@ -38,7 +35,7 @@ export function createClipboardActions(ctx: EditorContext) {
for (const node of topLevel) {
const parentId = node.parentId ?? ctx.state.currentPageId
const clone = ctx.graph.cloneTree(node.id, parentId, {
name: node.name + panels.value.nodeCopyString || ' copy',
name: node.name + ' copy',
x: node.x + 20,
y: node.y + 20
})

View file

@ -1,9 +1,7 @@
import { CANVAS_BG_COLOR } from '#core/constants'
import type { EditorState } from '#core/editor/types'
import { useI18n } from "@open-pencil/vue"
export function createDefaultEditorState(pageId: string): EditorState {
const { panels } = useI18n();
return {
activeTool: 'SELECT',
currentPageId: pageId,
@ -20,7 +18,7 @@ export function createDefaultEditorState(pageId: string): EditorState {
penCursorY: null,
remoteCursors: [],
autoLayoutHover: null,
documentName: panels.value.untitled || 'Untitled',
documentName: 'Untitled',
panX: 0,
pageColor: { ...CANVAS_BG_COLOR },
panY: 0,