Skip to content

AI-native design editor. Open-source Figma alternative.

fix: build errors

Santos Alarcón0babefa30b26
diff --git a/packages/core/src/editor/clipboard.ts b/packages/core/src/editor/clipboard.ts
index eb9b7f9b6..892ab6252 100644
--- a/packages/core/src/editor/clipboard.ts
+++ b/packages/core/src/editor/clipboard.ts
@@ -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
})
diff --git a/packages/core/src/editor/state.ts b/packages/core/src/editor/state.ts
index 00554a819..54e4f44bf 100644
--- a/packages/core/src/editor/state.ts
+++ b/packages/core/src/editor/state.ts
@@ -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,