Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-blurhash

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-blurhash - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

CHANGELOG.md

6

es/Blurhash.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc