export type PatternDef = { id: string; width?: number; height?: number; }; export type FillPattern = PatternDef & { svg: string; }; export type LinePattern = PatternDef & { marker: string; dashArray: number[]; }; /** Ids of the built-in fill patterns, usable with a component's `pattern` accessor. */ export declare enum FillPatternType { StripesDiagonal = "stripes-diagonal", Dots = "dots", StripesVertical = "stripes-vertical", Crosshatch = "crosshatch", Waves = "waves", Circles = "circles" } /** Ids of the built-in line patterns, usable with a component's `pattern` accessor. */ export declare enum LinePatternType { Circle = "circle", Triangle = "triangle", Diamond = "diamond", Arrow = "arrow", Square = "square", Star = "star" } export declare const PATTERN_SIZE_PX = 10; export declare const fills: FillPattern[]; export declare const lines: LinePattern[]; export declare function getPatternVariable(p: PatternDef): string; /** DOM id used to reference a fill pattern's `` (e.g. `url(#vis-pattern-fill-)`). */ export declare function getFillPatternId(id: string): string; /** DOM id used to reference a line pattern's `` (e.g. `url(#vis-pattern-marker-)`). */ export declare function getMarkerPatternId(id: string): string; /** DOM id of the `context-stroke` marker variant, which inherits the referencing path's color. */ export declare function getContextMarkerPatternId(id: string): string; /** Looks up a built-in pattern by id, returning its `FillPattern` or `LinePattern` definition, or `null`. */ export declare function getPatternById(id: string): FillPattern | LinePattern | null; /** Creates a `` element with an explicit fill color (fallback for browsers without `context-stroke`). */ export declare function createColoredMarkerElement(p: LinePattern, id: string, fill: string): SVGMarkerElement;