Skip to content

@openpresentation/opf-editor 0.23.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 19:21
· 25 commits to main since this release
fe0aa34
  • RR-96: chart colors. setChartOptions and prepareChartOptions accept colors (chart.colors, the colors by position: a hex color, a scheme slot such as accent3 that keeps following the deck, or a var: color variable; null or "" leaves a position to the deck palette; null for the whole value removes the field; at most 24, CHART_COLORS_MAX), as one undoable patch. readChartOptions reports colors (what a position means: the plotted series, the slices or rows of a pie, doughnut, treemap or funnel, or the colors of a histogram, pareto or waterfall, and the scheme slots to offer) and state.colors. The chart options panel gains a "Colors" group with the deck's accent swatches, a "Default" choice and a hex field per position, and "Reset to deck palette". New /color-slots entry point: readSchemeSlots reads the deck's resolved scheme slots for swatches. The opf-render preview draws chart.colors once opf-render#256 lands.
  • RR-96 (needs core 0.23 for design.variant): color variant pickers. New /design-variants entry point: setDesignVariant and prepareDesignVariant set design.variant (a background slot light1, light2, dark1 or dark2, written as the slot name, or { background, accents } when the six accents are reordered; null removes it) at the deck or on one slide with slideIndex, as one undoable patch, with clearSlideOverrides and a shadowed list for the slides whose own variant or theme-slot background hides a deck change; readDesignVariant reads the own and the effective variant (core's resolution) and variantSwatches the four variants as colors built from the deck's own scheme slots, like PowerPoint's Variants gallery; normalizeVariant validates. The design controls gain a "Color variant" section (four swatches, "Same as presentation" on a slide, an accent order control and "Reset accent order"); the editor imports core's normalizeColorVariant, so it needs core 0.23. The preview and the PowerPoint export read the variant from core's roles.