8889841cREADME.md000066600000001322150476761220006037 0ustar00# Installation > `npm install --save @types/svgo` # Summary This package contains type definitions for svgo (https://github.com/svg/svgo). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svgo/v1. ### Additional Details * Last updated: Fri, 02 Jul 2021 22:33:14 GMT * Dependencies: none * Global values: none # Credits These definitions were written by [Bradley Ayers](https://github.com/bradleyayers), [Gilad Gray](https://github.com/giladgray), [Aankhen](https://github.com/Aankhen), [Jan Karres](https://github.com/jankarres), [Gavin Gregory](https://github.com/gavingregory), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). index.d.ts000066600000023263150476761220006471 0ustar00// Type definitions for svgo 1.3 // Project: https://github.com/svg/svgo // Definitions by: Bradley Ayers // Gilad Gray // Aankhen // Jan Karres // Gavin Gregory // Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 interface PluginCleanupAttrs { cleanupAttrs: boolean | object; } interface PluginInlineStyles { inlineStyles: boolean | object; } interface PluginRemoveDoctype { removeDoctype: boolean | object; } interface PluginRemoveXMLProcInst { removeXMLProcInst: boolean | object; } interface PluginRemoveComments { removeComments: boolean | object; } interface PluginRemoveMetadata { removeMetadata: boolean | object; } interface PluginRemoveTitle { removeTitle: boolean | object; } interface PluginRemoveDesc { removeDesc: boolean | object; } interface PluginRemoveUselessDefs { removeUselessDefs: boolean | object; } interface PluginRemoveXMLNS { removeXMLNS: boolean | object; } interface PluginRemoveEditorsNSData { removeEditorsNSData: boolean | object; } interface PluginRemoveEmptyAttrs { removeEmptyAttrs: boolean | object; } interface PluginRemoveHiddenElems { removeHiddenElems: boolean | object; } interface PluginRemoveEmptyText { removeEmptyText: boolean | object; } interface PluginRemoveEmptyContainers { removeEmptyContainers: boolean | object; } interface PluginRemoveViewBox { removeViewBox: boolean | object; } interface PluginCleanupEnableBackground { cleanupEnableBackground: boolean | object; } interface PluginMinifyStyles { minifyStyles: boolean | object; } interface PluginConvertStyleToAttrs { convertStyleToAttrs: boolean | object; } interface PluginConvertColors { convertColors: boolean | object; } interface PluginConvertEllipseToCircle { /** convert ellipse with equal radius measures to circle */ convertEllipseToCircle: boolean | object; } interface PluginConvertPathData { convertPathData: boolean | object; } interface PluginConvertTransform { convertTransform: boolean | object; } interface PluginRemoveUnknownsAndDefaults { removeUnknownsAndDefaults: boolean | object; } interface PluginRemoveNonInheritableGroupAttrs { removeNonInheritableGroupAttrs: boolean | object; } interface PluginRemoveUselessStrokeAndFill { removeUselessStrokeAndFill: boolean | object; } interface PluginRemoveUnusedNS { removeUnusedNS: boolean | object; } interface PluginPrefixIds { /** prefix IDs and classes with the SVG filename or an arbitrary string */ prefixIds: boolean | object; } interface PluginCleanupIDs { cleanupIDs: boolean | object; } interface PluginCleanupNumericValues { cleanupNumericValues: boolean | object; } interface PluginCleanupListOfValues { cleanupListOfValues: boolean | object; } interface PluginMoveElemsAttrsToGroup { moveElemsAttrsToGroup: boolean | object; } interface PluginMoveGroupAttrsToElems { moveGroupAttrsToElems: boolean | object; } interface PluginCollapseGroups { collapseGroups: boolean | object; } interface PluginRemoveRasterImages { removeRasterImages: boolean | object; } interface PluginMergePaths { mergePaths: boolean | object; } interface PluginConvertShapeToPath { convertShapeToPath: boolean | object; } interface PluginSortAttrs { sortAttrs: boolean | object; } interface PluginSortDefsChildren { /** sort children of in order to improve compression */ sortDefsChildren: boolean | object; } interface PluginRemoveDimensions { removeDimensions: boolean | object; } interface PluginRemoveAttrs { removeAttrs: boolean | object; } interface PluginRemoveAttributesBySelector { removeAttributesBySelector: boolean | object; } interface PluginRemoveElementsByAttr { removeElementsByAttr: boolean | object; } interface PluginAddClassesToSVGElement { addClassesToSVGElement: boolean | object; } interface PluginAddAttributesToSVGElement { addAttributesToSVGElement: boolean | object; } interface PluginRemoveOffCanvasPaths { removeOffCanvasPaths: boolean | object; } interface PluginRemoveStyleElement { removeStyleElement: boolean | object; } interface PluginRemoveScriptElement { removeScriptElement: boolean | object; } interface PluginReusePaths { reusePaths: boolean | object; } interface SvgInfo { path?: string | undefined; } interface OptimizedSvg { data: string; info: { width: string; height: string; }; path?: string | undefined; } declare class SVGO { static Config(config?: SVGO.Options): SVGO.Options; constructor(config?: SVGO.Options); optimize(svgString: string, info?: SvgInfo): Promise; } declare namespace SVGO { type PluginConfig = | PluginCleanupAttrs | PluginInlineStyles | PluginRemoveDoctype | PluginRemoveXMLProcInst | PluginRemoveComments | PluginRemoveMetadata | PluginRemoveTitle | PluginRemoveDesc | PluginRemoveUselessDefs | PluginRemoveXMLNS | PluginRemoveEditorsNSData | PluginRemoveEmptyAttrs | PluginRemoveHiddenElems | PluginRemoveEmptyText | PluginRemoveEmptyContainers | PluginRemoveViewBox | PluginCleanupEnableBackground | PluginMinifyStyles | PluginConvertStyleToAttrs | PluginConvertColors | PluginConvertEllipseToCircle | PluginConvertPathData | PluginConvertTransform | PluginRemoveUnknownsAndDefaults | PluginRemoveNonInheritableGroupAttrs | PluginRemoveUselessStrokeAndFill | PluginRemoveUnusedNS | PluginPrefixIds | PluginCleanupIDs | PluginCleanupNumericValues | PluginCleanupListOfValues | PluginMoveElemsAttrsToGroup | PluginMoveGroupAttrsToElems | PluginCollapseGroups | PluginRemoveRasterImages | PluginMergePaths | PluginConvertShapeToPath | PluginSortAttrs | PluginSortDefsChildren | PluginRemoveDimensions | PluginRemoveAttrs | PluginRemoveAttributesBySelector | PluginRemoveElementsByAttr | PluginAddClassesToSVGElement | PluginAddAttributesToSVGElement | PluginRemoveOffCanvasPaths | PluginRemoveStyleElement | PluginRemoveScriptElement | PluginReusePaths; interface Js2SvgOptions { /** @default '' */ doctypeEnd?: string | undefined; /** @default '' */ procInstEnd?: string | undefined; /** @default '<' */ tagOpenStart?: string | undefined; /** @default '>' */ tagOpenEnd?: string | undefined; /** @default '' */ tagCloseEnd?: string | undefined; /** @default '<' */ tagShortStart?: string | undefined; /** @default '/>' */ tagShortEnd?: string | undefined; /** @default '="' */ attrStart?: string | undefined; /** @default '"' */ attrEnd?: string | undefined; /** @default '' */ commentEnd?: string | undefined; /** @default '' */ cdataEnd?: string | undefined; /** @default '' */ textStart?: string | undefined; /** @default '' */ textEnd?: string | undefined; /** @default 4 */ indent?: number | undefined; /** @default /[&'"<>]/g */ regEntities?: RegExp | undefined; /** @default /[&"<>]/g */ regValEntities?: RegExp | undefined; /** @default encodeEntity */ encodeEntity?: ((char?: string) => string) | undefined; /** @default false */ pretty?: boolean | undefined; /** @default true */ useShortTags?: boolean | undefined; } interface Svg2JsOptions { /** @default true */ strict?: boolean | undefined; /** @default false */ trim?: boolean | undefined; /** @default true */ normalize?: boolean | undefined; /** @default true */ lowercase?: boolean | undefined; /** @default true */ xmlns?: boolean | undefined; /** @default true */ position?: boolean | undefined; } interface Options { /** Output as Data URI string. */ datauri?: 'base64' | 'enc' | 'unenc' | undefined; /** Precision of floating point numbers. Will be passed to each plugin that suppors this param. */ floatPrecision?: number | undefined; /** Use full set of plugins. */ full?: boolean | undefined; /** Pass over SVGs multiple times to ensure all optimizations are applied */ multipass?: boolean | undefined; /** Options for rendering optimized SVG from AST. */ js2svg?: Js2SvgOptions | undefined; /** * Individual plugin configurations. * For specific options, see plugin source in https://github.com/svg/svgo/tree/master/plugins. */ plugins?: PluginConfig[] | undefined; /** Options for parsing original SVG into AST. */ svg2js?: Svg2JsOptions | undefined; } } export = SVGO; LICENSE000066600000002165150476761220005573 0ustar00 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE package.json000066600000003014150476761220007046 0ustar00{ "name": "@types/svgo", "version": "1.3.6", "description": "TypeScript definitions for svgo", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svgo", "license": "MIT", "contributors": [ { "name": "Bradley Ayers", "url": "https://github.com/bradleyayers", "githubUsername": "bradleyayers" }, { "name": "Gilad Gray", "url": "https://github.com/giladgray", "githubUsername": "giladgray" }, { "name": "Aankhen", "url": "https://github.com/Aankhen", "githubUsername": "Aankhen" }, { "name": "Jan Karres", "url": "https://github.com/jankarres", "githubUsername": "jankarres" }, { "name": "Gavin Gregory", "url": "https://github.com/gavingregory", "githubUsername": "gavingregory" }, { "name": "Piotr Błażejewicz", "url": "https://github.com/peterblazejewicz", "githubUsername": "peterblazejewicz" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/svgo" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "a1859e50480342db713c1b9e0739d99933148398dc6f0557a6a7429e58a46463", "typeScriptVersion": "3.6" }