Repository navigation
@openpresentation/opf-editor 0.25.0
·
7 commits
to main
since this release
- RR-99 (needs core with FA-33): the layout editor,
createLayoutEditorfrom@openpresentation/opf-editor/layout-editor, a Figma-style GUI for building one layout record (directionplus an orderedregionslist of regions and splits). It is a tool palette (Select V, Split into a row R, Split into a column C, Insert region I, Heading regions T, Hand H or Space, Preview P), a canvas (a 16:9 frame with drag-to-resize dividers that snap and show their ratio, double-click to equalize, drag to reorder or move between splits with drop indicators, Delete that collapses a one-child split, and a context menu with wrap in row or column, unwrap, duplicate, delete and rename), a layers tree (role="tree") and an inspector for the layout, splits and regions (autoonly in a column, inherited anchors shown as inherited,acceptschips). Core validates live (opf/layout-templateandopf/layout-region) and the findings are highlighted on the canvas and in the layers; the editor has its own undo and redo, where one drag is one step; Preview draws sample content with the host'stoSvgand fonts handle, or a wireframe. The parts are exported separately (createLayoutToolPalette,createLayoutCanvas,createLayoutTree,createLayoutInspector,createLayoutModel), withgetRecord,setRecord,onChange,saveToDeck(editor)(throughsaveCustomLayout, which now takes{ replace: true }to edit a layout the deck already has) andapplyToSlide(editor, slideIndex). The pure tree operations are@openpresentation/opf-editor/layout-tree. Keyboard: arrows between siblings, Enter into a split, Esc up,[and]to reorder, Cmd or Ctrl+D to duplicate, arrows on a divider; touch density uses 40px controls. The playground has a Layouts view that uses it. This replacesopenCustomLayoutEditor(/custom-layout-editor), which is removed with no alias. - FA-33 (needs core with FA-33; no editor code changes): the development and test dependency
@openpresentation/gallerymoves from^4.0.0to^5.0.0(theme variants, layouts as one list of regions, catalog schema 4), so the suites and the playground read Gallery 5's records. The published package declares no runtime dependency on Gallery; hosts still register the catalogs they choose. - FA-33 (needs core with FA-33): layouts are one
directionplus an ordered, nestableregionslist instead of theareasgrid withcolumns,rowsand aregionsmap. The custom layout editor (openCustomLayoutEditor) now edits that list instead of painting a grid: regions in reading order, each with its name, size and rules (accepted kinds, role, flow), move up and down, remove, a Split button that nests regions the other way for two dimensions, a direction choice, and a live structure preview.layoutFromGridis replaced bylayoutFromRegions(adirection, an optional inheritedanchor, and the region and split entries, all checked). The layout picker draws a nested diagram of the record's regions and splits,layoutRegionSummaryrecognizes a template by its region list, and a gallery layout item is imported in the new form. Slide rendering and PPTX export do not change. - RR-98:
createPresentButtontakesvariant: "quiet" | "primary"(and the button hassetVariant). The default is now"quiet": a transparent icon button like the toolbar's undo and redo, with the icon in--opf-ui-muted-fgand a hover to--opf-ui-fgon--opf-ui-muted, the same control height and focus ring, so a lone icon next to a primary Export does not compete with it.variant: "primary"keeps the previous filled accent look of the Export trigger. The disabled state,aria-labeland title are unchanged.