path-data-polyfill
Advanced tools
Comparing version
{ | ||
"name": "path-data-polyfill", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Polyfill for SVG 2 getPathData() and setPathData() methods", | ||
@@ -12,7 +12,3 @@ "main": "path-data-polyfill.js", | ||
"homepage": "https://github.com/jarek-foksa/path-data-polyfill#readme", | ||
"exports": { | ||
".": { | ||
"types": "./types.d.ts" | ||
} | ||
} | ||
"types": "./types.d.ts" | ||
} |
@@ -1,1 +0,1 @@ | ||
export * from "./path-data-polyfill.js"; | ||
export * from "./path-data-polyfill.js"; |
interface SVGPathElement { | ||
/** | ||
* See https://github.com/jarek-foksa/path-data-polyfill | ||
* | ||
* See https://svgwg.org/specs/paths/#InterfaceSVGPathData | ||
*/ | ||
getPathData: (settings?: SVGPathDataSettings) => Array<SVGPathSegment>; | ||
/** | ||
* See https://github.com/jarek-foksa/path-data-polyfill | ||
* | ||
* See https://svgwg.org/specs/paths/#InterfaceSVGPathData | ||
*/ | ||
setPathData: (pathData: Array<SVGPathSegment>) => void; | ||
/** | ||
* See https://github.com/jarek-foksa/path-data-polyfill | ||
* | ||
* See https://svgwg.org/specs/paths/#InterfaceSVGPathData | ||
*/ | ||
getPathData: (settings?: SVGPathDataSettings) => Array<SVGPathSegment>; | ||
/** | ||
* See https://github.com/jarek-foksa/path-data-polyfill | ||
* | ||
* See https://svgwg.org/specs/paths/#InterfaceSVGPathData | ||
*/ | ||
setPathData: (pathData: Array<SVGPathSegment>) => void; | ||
} | ||
type SVGPathDataCommand = | ||
| "A" | ||
| "a" | ||
| "C" | ||
| "c" | ||
| "H" | ||
| "h" | ||
| "L" | ||
| "l" | ||
| "M" | ||
| "m" | ||
| "Q" | ||
| "q" | ||
| "S" | ||
| "s" | ||
| "T" | ||
| "t" | ||
| "V" | ||
| "v" | ||
| "Z" | ||
| "z"; | ||
| "A" | ||
| "a" | ||
| "C" | ||
| "c" | ||
| "H" | ||
| "h" | ||
| "L" | ||
| "l" | ||
| "M" | ||
| "m" | ||
| "Q" | ||
| "q" | ||
| "S" | ||
| "s" | ||
| "T" | ||
| "t" | ||
| "V" | ||
| "v" | ||
| "Z" | ||
| "z"; | ||
interface SVGPathDataSettings { | ||
normalize: boolean; | ||
normalize: boolean; | ||
} | ||
interface SVGPathSegment { | ||
type: SVGPathDataCommand; | ||
values: Array<number>; | ||
type: SVGPathDataCommand; | ||
values: Array<number>; | ||
} |
975
0.1%41289
-0.01%