Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ follow semantic versioning; release dates are ISO 8601.

## v2.2.1 — Planned

### Public API

- **The SVG surface graduates from `@Beta` to Stable.** `SvgPath`, `SvgIcon`,
`PathBuilder.svg(svgPath)`, both `addSvgIcon(...)` flow adders,
`ShapeContainerBuilder.path(w, h, svgPath)`, and the gradient paints the
reader emits (`DocumentPaint.LinearAxis` / `RadialCircle`) drop the
annotation and join the Stable tier — additive-only changes in minors from
here on. The surface shipped in 1.8.0 marked `@Beta` "while it hardens
against real-world exporter output"; that hardening is done — the stroke,
colour and unit work, per-element error context, the clip-path support
added in 1.9.0, and the opacity-family + warning pass in this release —
and the API shape itself has not moved since 1.9.0, four minors of real
use. The annotation drop also closes an inconsistency: `inlineSvgIcon` /
`RichText.svgIcon` and the emoji pipeline were built on `@Beta` `SvgIcon`
without carrying the marker themselves; now no SVG entry point does. No
binary or source change for callers — the remaining `@Beta` carriers are
the `NodeDefinition` Extension SPI seam and the PPTX backend, exactly as
[docs/api-stability.md](docs/api-stability.md) lists them.

### Fixed

- **The SVG reader honours the opacity family.** `opacity`, `fill-opacity` and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,6 @@ public T addPath(Consumer<PathBuilder> spec) {
* @return this builder
* @since 1.8.0
*/
@com.demcha.compose.document.api.Beta
public T addSvgIcon(com.demcha.compose.document.svg.SvgIcon icon, double width) {
Objects.requireNonNull(icon, "icon");
return add(icon.node(width));
Expand All @@ -643,7 +642,6 @@ public T addSvgIcon(com.demcha.compose.document.svg.SvgIcon icon, double width)
* @return this builder
* @since 1.8.0
*/
@com.demcha.compose.document.api.Beta
public T addSvgIcon(com.demcha.compose.document.svg.SvgIcon icon, double width,
com.demcha.compose.document.node.HorizontalAlign align) {
Objects.requireNonNull(icon, "icon");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.document.dsl;

import com.demcha.compose.document.api.Beta;
import com.demcha.compose.document.node.PathNode;
import com.demcha.compose.document.style.DocumentColor;
import com.demcha.compose.document.style.DocumentDashPattern;
Expand Down Expand Up @@ -171,7 +170,6 @@ public PathBuilder closePath() {
* @return this builder
* @since 1.8.0
*/
@Beta
public PathBuilder svg(SvgPath svgPath) {
Objects.requireNonNull(svgPath, "svgPath");
segments.addAll(svgPath.segments());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public ShapeContainerBuilder path(double width, double height,
* @return this builder
* @since 1.8.0
*/
@com.demcha.compose.document.api.Beta
public ShapeContainerBuilder path(double width, double height,
com.demcha.compose.document.svg.SvgPath svgPath) {
Objects.requireNonNull(svgPath, "svgPath");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.document.style;

import com.demcha.compose.document.api.Beta;

import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -134,17 +133,13 @@ public DocumentColor primaryColor() {
* exact: colour runs from the first stop at {@code (x0, y0)} to the last
* stop at {@code (x1, y1)} and clamps beyond (pad spread).
*
* <p>Marked {@link Beta} — emitted by the beta SVG gradient reader; the
* endpoint normalization contract may shift while that reader hardens.</p>
*
* @param stops ordered colour stops, offsets in [0,1]; at least two
* @param x0 axis start x, normalized to the box width
* @param y0 axis start y, normalized to the box height
* @param x1 axis end x, normalized to the box width
* @param y1 axis end y, normalized to the box height
* @since 1.8.0
*/
@Beta
record LinearAxis(List<Stop> stops, double x0, double y0, double x1, double y1)
implements DocumentPaint {
/**
Expand Down Expand Up @@ -179,16 +174,12 @@ public DocumentColor primaryColor() {
* a circle when the box preserves the source's aspect ratio (the SVG
* icon frame contract). Colour clamps beyond the last stop (pad spread).
*
* <p>Marked {@link Beta} — emitted by the beta SVG gradient reader; the
* centre/radius normalization contract may shift while that reader hardens.</p>
*
* @param stops ordered colour stops, offsets in [0,1]; at least two
* @param cx centre x, normalized to the box width
* @param cy centre y, normalized to the box height
* @param r radius as a fraction of the box width; positive
* @since 1.8.0
*/
@Beta
record RadialCircle(List<Stop> stops, double cx, double cy, double r)
implements DocumentPaint {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.document.svg;

import com.demcha.compose.document.api.Beta;
import com.demcha.compose.document.node.LayerStackNode;
import com.demcha.compose.document.node.PathNode;
import com.demcha.compose.document.style.DocumentColor;
Expand Down Expand Up @@ -69,13 +68,9 @@
* card.center(logo.node(48)); // node form for layer anchors
* }</pre>
*
* <p><b>Beta:</b> the SVG surface is new in 1.8.0 and marked {@link Beta}
* while it hardens against real-world exporter output.</p>
*
* @author Artem Demchyshyn
* @since 1.8.0
*/
@Beta
public final class SvgIcon {

private final List<Layer> layers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.document.svg;

import com.demcha.compose.document.api.Beta;
import com.demcha.compose.document.style.DocumentPathSegment;

import java.util.ArrayList;
Expand Down Expand Up @@ -34,14 +33,9 @@
* .fillColor(crimson));
* }</pre>
*
* <p><b>Beta:</b> the SVG surface is new in 1.8.0 and marked {@link Beta}
* while it hardens against real-world files — the API may still adjust in a
* minor release based on feedback.</p>
*
* @author Artem Demchyshyn
* @since 1.8.0
*/
@Beta
public final class SvgPath {

private static final double EPS = 1e-9;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
* {@code PathBuilder.svg(...)} / {@code PathNode}. Curves render as native
* PDF operators; nothing is tessellated.</p>
*
* <p><b>Beta:</b> the whole package is marked beta for the 1.8 cycle while
* it hardens against real-world exporter output.</p>
*
* @since 1.8.0
*/
package com.demcha.compose.document.svg;
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void strayTokenAfterCloseIsRejectedAndDoesNotHang() {
// Regression: an operand-less Z/z followed by a non-command token used
// to spin forever (the close op consumes no characters, so the scanner
// never advanced), appending a close op per iteration until OOM. A
// single malformed/hostile 'd' string would DoS the @Beta reader.
// single malformed/hostile 'd' string would DoS the reader.
// Each call must fail fast; the assertTimeout pins that it cannot hang.
Assertions.assertTimeoutPreemptively(
Duration.ofSeconds(2), () -> {
Expand Down
Loading