- 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
24 lines
582 B
TypeScript
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
|
|
})
|
|
}
|