openpencil/tests/helpers/editor-history.ts
Danila Poyarkov c3f5189f8f style: tighten import grouping
- Configure oxfmt custom import groups for workspace, app, package, and test aliases
- Keep type imports grouped with their matching source category instead of one global tail group
- Expand the format script to cover formatter config, Vite files, and scripts
2026-05-06 02:22:08 +03:00

24 lines
582 B
TypeScript

import { createEditor } from '@open-pencil/core/editor'
import type { Editor } from '@open-pencil/core/editor'
export function setupEditorPage() {
const editor = createEditor()
const pageId = editor.graph.getPages()[0].id
return { editor, pageId }
}
export function createHistoryFrame(
editor: Editor,
parentId: string,
overrides: Partial<{ name: string; x: number; y: number; width: number; height: number }> = {}
) {
return editor.graph.createNode('FRAME', parentId, {
name: 'Card',
x: 0,
y: 0,
width: 200,
height: 150,
...overrides
})
}