The Export panel, SDK helpers, app menus, and CLI each kept their own hand-written format lists, so new formats such as PPTX reached some surfaces and not others. Scene Graph now owns the persisted export-setting format ids, Core IO adapters carry literal ids so that list is checked against real adapters, and the panel labels, scale handling, app format types, and CLI format validation/help are derived from the registry. PPTX joins the Export panel as a result.
901 B
901 B
| title | description |
|---|---|
| useExport | Manage export settings like scale and format for the current selection. |
useExport
useExport() is the export-panel composable for selected nodes.
It manages:
- export settings rows
- selected node ids
- export name labeling
- supported scales and formats (
formatsids and labeledformatOptions)
Usage
import { useExport } from '@open-pencil/vue'
const exportState = useExport()
Basic example
const {
settings,
nodeName,
scales,
formats,
formatOptions,
addSetting,
updateScale,
updateFormat,
} = useExport()
Practical examples
Add another export preset
exportState.addSetting()
Change the first export to 2x WEBP
exportState.updateScale(0, 2)
exportState.updateFormat(0, 'webp')