react-blurhash
Advanced tools
Comparing version 0.1.0 to 0.1.1
import React from 'react'; | ||
declare type Props = React.HTMLAttributes<HTMLDivElement> & { | ||
hash: string; | ||
height?: number; | ||
/** CSS height, default: 128 */ | ||
height?: number | string | 'auto'; | ||
punch?: number; | ||
@@ -9,3 +10,4 @@ resolutionX?: number; | ||
style?: React.CSSProperties; | ||
width?: number; | ||
/** CSS width, default: 128 */ | ||
width?: number | string | 'auto'; | ||
}; | ||
@@ -12,0 +14,0 @@ export default class Blurhash extends React.PureComponent<Props> { |
@@ -62,3 +62,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var _a = this.props, hash = _a.hash, height = _a.height, width = _a.width, punch = _a.punch, resolutionX = _a.resolutionX, resolutionY = _a.resolutionY, style = _a.style, rest = __rest(_a, ["hash", "height", "width", "punch", "resolutionX", "resolutionY", "style"]); | ||
return (React.createElement("div", __assign({}, rest, { style: __assign({ display: 'inline-block' }, style, { height: height, width: width, position: 'relative' }) }), | ||
return (React.createElement("div", __assign({}, rest, { style: __assign({ display: 'inline-block', height: height, width: width }, style, { position: 'relative' }) }), | ||
React.createElement(BlurhashCanvas, { hash: hash, height: resolutionY, width: resolutionX, punch: punch, style: canvasStyle }))); | ||
@@ -65,0 +65,0 @@ }; |
import React from 'react'; | ||
declare type Props = React.HTMLAttributes<HTMLDivElement> & { | ||
hash: string; | ||
height?: number; | ||
/** CSS height, default: 128 */ | ||
height?: number | string | 'auto'; | ||
punch?: number; | ||
@@ -9,3 +10,4 @@ resolutionX?: number; | ||
style?: React.CSSProperties; | ||
width?: number; | ||
/** CSS width, default: 128 */ | ||
width?: number | string | 'auto'; | ||
}; | ||
@@ -12,0 +14,0 @@ export default class Blurhash extends React.PureComponent<Props> { |
@@ -64,3 +64,3 @@ "use strict"; | ||
var _a = this.props, hash = _a.hash, height = _a.height, width = _a.width, punch = _a.punch, resolutionX = _a.resolutionX, resolutionY = _a.resolutionY, style = _a.style, rest = __rest(_a, ["hash", "height", "width", "punch", "resolutionX", "resolutionY", "style"]); | ||
return (react_1.default.createElement("div", __assign({}, rest, { style: __assign({ display: 'inline-block' }, style, { height: height, width: width, position: 'relative' }) }), | ||
return (react_1.default.createElement("div", __assign({}, rest, { style: __assign({ display: 'inline-block', height: height, width: width }, style, { position: 'relative' }) }), | ||
react_1.default.createElement(BlurhashCanvas_1.default, { hash: hash, height: resolutionY, width: resolutionX, punch: punch, style: canvasStyle }))); | ||
@@ -67,0 +67,0 @@ }; |
{ | ||
"name": "react-blurhash", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Blurhash implementation for React", | ||
@@ -5,0 +5,0 @@ "keywords": ["blurhash", "blur", "hash", "image", "react", "component"], |
@@ -31,11 +31,10 @@ # react-blurhash | ||
| name | description | | ||
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `hash` (string) | The encoded blurhash string. | | ||
| `width` (int) | Width of the decoded image. | | ||
| `height` (int) | Height of the decoded image. | | ||
| `resolutionX` (int) | The X-axis resolution in which the decoded image will be rendered at. Recommended min. 32px. Large sizes (>128px) will greatly decrease rendering performance. (Default: 32) | | ||
| `resolutionY` (int) | The Y-axis resolution in which the decoded image will be rendered at. Recommended min. 32px. Large sizes (>128px) will greatly decrease rendering performance. (Default: 32) | | ||
| | | ||
| `punch` (int) | Controls the "punch" value (~contrast) of the blurhash decoding algorithm. (Default: 1) | | ||
| name | description | | ||
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `hash` (string) | The encoded blurhash string. | | ||
| `width` (int \| string) | Width (CSS) of the decoded image. | | ||
| `height` (int \| string) | Height (CSS) of the decoded image. | | ||
| `resolutionX` (int) | The X-axis resolution in which the decoded image will be rendered at. Recommended min. 32px. Large sizes (>128px) will greatly decrease rendering performance. (Default: 32) | | ||
| `resolutionY` (int) | The Y-axis resolution in which the decoded image will be rendered at. Recommended min. 32px. Large sizes (>128px) will greatly decrease rendering performance. (Default: 32) | | ||
| `punch` (int) | Controls the "punch" value (~contrast) of the blurhash decoding algorithm. (Default: 1) | | ||
@@ -42,0 +41,0 @@ #### Example |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
936785
28
1236
1
81