// This file is auto-generated by alef — DO NOT EDIT. // alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75 // To regenerate: alef generate // To verify freshness: alef verify --exit-code // Issues & docs: https://github.com/kreuzberg-dev/alef package dev.kreuzberg; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import org.jspecify.annotations.Nullable; /** * Configuration for styled HTML output. * * When set on ExtractionConfig.html_output alongside * {@code output_format = OutputFormat.Html}, the pipeline builds a * StyledHtmlRenderer(crate.rendering.StyledHtmlRenderer) instead of * the plain comrak-based renderer. */ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = HtmlOutputConfig.Builder.class) public record HtmlOutputConfig( /** * Inline CSS string injected into the output after the theme stylesheet. * Concatenated after {@code css_file} content when both are set. */ @Nullable @JsonProperty("css") String css, /** * Path to a CSS file loaded once at renderer construction time. * Concatenated before {@code css} when both are set. */ @JsonProperty("css_file") java.nio.file.@Nullable Path cssFile, /** * Built-in colour/typography theme. Default: HtmlTheme.Unstyled. */ @Nullable @JsonProperty("theme") HtmlTheme theme, /** * CSS class prefix applied to every emitted class name. * * Default: {@code "kb-"}. Change this if your host application already uses * classes that start with {@code kb-}. */ @Nullable @JsonProperty("class_prefix") String classPrefix, /** * When {@code true} (default), write the resolved CSS into a {@code <style>} block * immediately after the opening {@code <div class="{prefix}doc">}. * * Set to {@code false} to emit only the structural markup and wire up your * own stylesheet targeting the {@code kb-*} class names. */ @Nullable @JsonProperty("embed_css") Boolean embedCss ) { public static Builder builder() { return new Builder(); } // CPD-OFF @JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build") public static final class Builder { private String css = null; @JsonProperty("css_file") private java.nio.file.Path cssFile = null; @Nullable private HtmlTheme theme = HtmlTheme.Unstyled; @JsonProperty("class_prefix") private String classPrefix = null; @JsonProperty("embed_css") private Boolean embedCss = null; /** Sets the css field. */ @JsonProperty("css") public Builder withCss(final @Nullable String value) { this.css = value; return this; } /** Sets the cssFile field. */ @JsonProperty("css_file") public Builder withCssFile(final java.nio.file.@Nullable Path value) { this.cssFile = value; return this; } /** Sets the theme field. */ @JsonProperty("theme") public Builder withTheme(final @Nullable HtmlTheme value) { this.theme = value; return this; } /** Sets the classPrefix field. */ @JsonProperty("class_prefix") public Builder withClassPrefix(final @Nullable String value) { this.classPrefix = value; return this; } /** Sets the embedCss field. */ @JsonProperty("embed_css") public Builder withEmbedCss(final @Nullable Boolean value) { this.embedCss = value; return this; } /** Builds the HtmlOutputConfig instance. */ public HtmlOutputConfig build() { return new HtmlOutputConfig( css, cssFile, theme, classPrefix, embedCss ); } } // CPD-ON public static HtmlOutputConfig defaultInstance() { throw new UnsupportedOperationException("defaultInstance is not yet bridged via JNI; use the Builder instead."); } }