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
12 changes: 11 additions & 1 deletion src/lib/export/dom2svg/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ interface FontConfig {
type FontMapping = Record<string, string | FontConfig | FontConfig[]>;
/** SVG compatibility configuration flags */
interface SvgCompatConfig {
/** Use <clipPath> instead of <mask> for overflow clipping */
useClipPathForOverflow: boolean;
/** Skip CSS filter effects (blur, brightness, etc.) */
stripFilters: boolean;
/** Skip box-shadow rendering */
stripBoxShadows: boolean;
/** Skip CSS mask-image */
stripMaskImage: boolean;
/** Skip text-shadow filters */
stripTextShadows: boolean;
/** No style= attributes on SVG elements */
avoidStyleAttributes: boolean;
/** No xml:space="preserve" on <text> elements */
stripXmlSpace: boolean;
/** Skip group-level opacity (prevents Inkscape from rasterizing subtrees) */
stripGroupOpacity: boolean;
/** Avoid transform attributes inside <clipPath> (Inkscape ignores them) */
inlineClipPathTransforms: boolean;
/** Convert nested <svg> to <g> with translate (Inkscape clips overflow:visible) */
flattenNestedSvg: boolean;
}
/** SVG compatibility preset */
/** SVG compatibility preset: 'full' (default), 'inkscape' (LaTeX/Inkscape safe), or custom config */
type SvgCompat = 'full' | 'inkscape' | SvgCompatConfig;
/** Options for domToSvg() */
interface DomToSvgOptions {
Expand Down
Loading
Loading