@types/inline-css
Advanced tools
@@ -1,26 +0,112 @@ | ||
| // Type definitions for inline-css | ||
| // Type definitions for inline-css 3.0 | ||
| // Project: https://github.com/jonkemp/inline-css | ||
| // Definitions by: Philip Spain <https://github.com/philipisapain> | ||
| // BendingBender <https://github.com/BendingBender> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| // TypeScript Version: 3.2 | ||
| import Promise = require('bluebird'); | ||
| import cheerio = require("cheerio"); | ||
| export = InlineCss; | ||
| /** | ||
| * Inline your CSS properties into the `style` attribute in an html file. Useful for emails. | ||
| * | ||
| * @example | ||
| * import inlineCss = require('inline-css'); | ||
| * | ||
| * const html = "<style>div{color:red;}</style><div/>"; | ||
| * | ||
| * inlineCss(html, options) | ||
| * .then((html) => { console.log(html); }); | ||
| */ | ||
| declare function InlineCss(html: string, options: InlineCss.Options): Promise<string>; | ||
| declare namespace InlineCss { | ||
| export interface Options { | ||
| interface Options extends CheerioParserOptions { | ||
| /** | ||
| * How to resolve hrefs. | ||
| */ | ||
| url: string; | ||
| /** | ||
| * Extra css to apply to the file. | ||
| * | ||
| * @default "" | ||
| */ | ||
| extraCss?: string; | ||
| /** | ||
| * Whether to inline styles in `<style></style>`. | ||
| * | ||
| * @default true | ||
| */ | ||
| applyStyleTags?: boolean; | ||
| /** | ||
| * Whether to resolve `<link rel="stylesheet">` tags and inline the resulting styles. | ||
| * | ||
| * @default true | ||
| */ | ||
| applyLinkTags?: boolean; | ||
| /** | ||
| * Whether to remove the original `<style></style>` tags after (possibly) inlining the css from them. | ||
| * | ||
| * @default true | ||
| */ | ||
| removeStyleTags?: boolean; | ||
| /** | ||
| * Whether to remove the original `<link rel="stylesheet">` tags after (possibly) inlining the css from them. | ||
| * | ||
| * @default true | ||
| */ | ||
| removeLinkTags?: boolean; | ||
| /** | ||
| * Preserves all media queries (and contained styles) within `<style></style>` tags as a refinement when | ||
| * `removeStyleTags` is `true`. Other styles are removed. | ||
| * | ||
| * @default false | ||
| */ | ||
| preserveMediaQueries?: boolean; | ||
| /** | ||
| * Whether to use any CSS pixel widths to create `width` attributes on elements. | ||
| * | ||
| * @default false | ||
| */ | ||
| applyWidthAttributes?: boolean; | ||
| /** | ||
| * Whether to apply the `border`, `cellpadding` and `cellspacing` attributes to table elements. | ||
| * | ||
| * @default false | ||
| */ | ||
| applyTableAttributes?: boolean; | ||
| /** | ||
| * Whether to remove the `class` and `id` attributes from the markup. | ||
| * | ||
| * @default false | ||
| */ | ||
| removeHtmlSelectors?: boolean; | ||
| /** | ||
| * An object that specifies fenced code blocks that should be ignored during parsing and inlining. | ||
| * For example, Handlebars (hbs) templates are `HBS: {start: '{{', end: '}}'}`. `codeBlocks` can fix | ||
| * problems where otherwise inline-css might interpret code like `<=` as HTML, when it is meant to | ||
| * be template language code. | ||
| * | ||
| * @default { EJS: { start: '<%', end: '%>' }, HBS: { start: '{{', end: '}}' } } | ||
| */ | ||
| codeBlocks?: Record<string, CodeBlockSpec>; | ||
| } | ||
| } | ||
| declare function InlineCss(html: string, options: InlineCss.Options): Promise<string>; | ||
| interface CodeBlockSpec { | ||
| start: string; | ||
| end: string; | ||
| } | ||
| export = InlineCss; | ||
| type CheerioParserOptions = Exclude<Parameters<typeof cheerio["load"]>[1], undefined>; | ||
| } |
| { | ||
| "name": "@types/inline-css", | ||
| "version": "0.0.33", | ||
| "version": "3.0.0", | ||
| "description": "TypeScript definitions for inline-css", | ||
@@ -11,2 +11,7 @@ "license": "MIT", | ||
| "githubUsername": "philipisapain" | ||
| }, | ||
| { | ||
| "name": "BendingBender", | ||
| "url": "https://github.com/BendingBender", | ||
| "githubUsername": "BendingBender" | ||
| } | ||
@@ -23,6 +28,6 @@ ], | ||
| "dependencies": { | ||
| "@types/bluebird": "*" | ||
| "@types/cheerio": "*" | ||
| }, | ||
| "typesPublisherContentHash": "8d030b37030858290c655b50017e8b82b58765a69331528d308b5f6f953fc610", | ||
| "typeScriptVersion": "3.2" | ||
| "typesPublisherContentHash": "6f1aaa6f019985b90126f4ebf76164a5c4d07b67289aa3624102c741da58e88f", | ||
| "typeScriptVersion": "3.5" | ||
| } |
@@ -11,7 +11,7 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Mon, 13 Apr 2020 23:58:20 GMT | ||
| * Dependencies: [@types/bluebird](https://npmjs.com/package/@types/bluebird) | ||
| * Last updated: Sun, 09 May 2021 19:01:24 GMT | ||
| * Dependencies: [@types/cheerio](https://npmjs.com/package/@types/cheerio) | ||
| * Global values: none | ||
| # Credits | ||
| These definitions were written by [Philip Spain](https://github.com/philipisapain). | ||
| These definitions were written by [Philip Spain](https://github.com/philipisapain), and [BendingBender](https://github.com/BendingBender). |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6023
84.98%96
336.36%1
-50%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed