UNPKG

@amandaghassaei/flat-svg

Version:

A TypeScript library for converting nested SVGs into a flat list of elements, paths, or segments and applying style-based filters.

25 lines (22 loc) 792 B
// Wrapper elements. export const SVG = 'svg'; export const DEFS = 'defs'; export const G = 'g'; export const TEXT = 'text'; // Geometry elements. export const LINE = 'line'; export const RECT = 'rect'; export const POLYGON = 'polygon'; export const POLYLINE = 'polyline'; export const PATH = 'path'; export const CIRCLE = 'circle'; export const ELLIPSE = 'ellipse'; // https://css-tricks.com/svg-properties-and-css/ export const SVG_STYLE_FILL = 'fill'; export const SVG_STYLE_STROKE_WIDTH = 'stroke-width'; export const SVG_STYLE_STROKE_COLOR = 'stroke'; export const SVG_STYLE_COLOR = 'color'; export const SVG_STYLE_OPACITY = 'opacity'; export const SVG_STYLE_MASK = 'mask'; export const SVG_STYLE_CLIP_PATH = 'clip-path'; export const SVG_STYLE_STROKE_DASH_ARRAY = 'stroke-dasharray';