
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@open-pencil/vue
Advanced tools
Headless Vue 3 SDK for building OpenPencil-powered editors.
@open-pencil/vue sits on top of @open-pencil/core and provides:
provideEditor() / useEditor()useCanvas(), useCanvasInput(), and useTextEdit()CanvasRoot, LayerTreeRoot, PageListRoot, and ToolbarRootThe SDK is headless by design: it provides logic and structure, while your app owns styling and product-specific UI.
bun add @open-pencil/vue @open-pencil/core canvaskit-wasm
<script setup lang="ts">
import { createEditor } from '@open-pencil/core/editor'
import { provideEditor } from '@open-pencil/vue'
const editor = createEditor({
width: 1200,
height: 800,
})
editor.createShape('RECTANGLE', 100, 100, 200, 150)
editor.zoomToFit()
provideEditor(editor)
</script>
<template>
<div class="h-screen">
<CanvasRoot v-slot="{ canvasRef }">
<canvas ref="canvasRef" class="size-full" />
</CanvasRoot>
</div>
</template>
Use provideEditor(editor) once near the top of your subtree.
import { provideEditor } from '@open-pencil/vue'
provideEditor(editor)
Read it anywhere below with useEditor().
import { useEditor } from '@open-pencil/vue'
const editor = useEditor()
At the composable level, the main canvas APIs are:
useCanvas()useCanvasInput()useTextEdit()If you want SDK-provided structure, use headless primitives like CanvasRoot and CanvasSurface.
Main structural primitives include:
CanvasRootLayerTreeRootPageListRootPropertyListRootToolbarRootColorPickerRootFillPickerRootFontPickerRootThese components coordinate structure and state, but do not impose app styling.
These are the main APIs most SDK consumers should start with.
provideEditor()useEditor()useCanvas()useCanvasInput()useTextEdit()useSelectionState()useSelectionCapabilities()useEditorCommands()useMenuModel()usePosition()useLayout()useAppearance()useTypography()useExport()useFillControls()useStrokeControls()useEffectsControls()useVariablesEditor()usePageList()useI18n()CanvasRootLayerTreeRootPageListRootPropertyListRootToolbarRootThese exports are intentionally public, but they are lower-level or more specialized.
useNodeProps()useSceneComputed()useColorVariableBinding()useFillPicker()useGradientStops()useFontPicker()useOkHCL()useVariables()useVariablesDialogState()useVariablesTable()usePropScrub()useLayerDrag()useInlineRename()useToolbarState()useNodeFontStatus()useCanvasDrop()extractImageFilesFromClipboard()useViewportKind()toolCursor()These are mostly useful when extending SDK primitives rather than building from top-level composables.
useCanvasContext()useLayerTree()useToolbar()usePropertyList()useScrubInput()localelocaleSettingsetLocale()AVAILABLE_LOCALESLOCALE_LABELS<script setup lang="ts">
import { provideEditor } from '@open-pencil/vue'
import type { Editor } from '@open-pencil/core/editor'
const props = defineProps<{
editor: Editor
}>()
provideEditor(props.editor)
</script>
<template>
<slot />
</template>
import { useSelectionState } from '@open-pencil/vue'
const { hasSelection, selectedCount, selectedNode } = useSelectionState()
import { useMenuModel } from '@open-pencil/vue'
const { appMenu, canvasMenu } = useMenuModel()
<PageListRoot v-slot="{ pages, currentPageId, switchPage }">
<ul>
<li v-for="page in pages" :key="page.id">
<button :data-active="page.id === currentPageId" @click="switchPage(page.id)">
{{ page.name }}
</button>
</li>
</ul>
</PageListRoot>
For fuller guides and API docs, see the documentation site:
packages/docs/programmable/sdk/Run the included example:
cd packages/vue/example
bun install
bun run dev
FAQs
Headless Vue 3 SDK for building OpenPencil-powered editors.
The npm package @open-pencil/vue receives a total of 234 weekly downloads. As such, @open-pencil/vue popularity was classified as not popular.
We found that @open-pencil/vue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.