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

rax-image

Package Overview
Dependencies
Maintainers
8
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-image - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2-0

14

lib/index.js

@@ -10,6 +10,2 @@ "use strict";

var _dedupe = _interopRequireDefault(require("classnames/dedupe"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -35,3 +31,2 @@

var imgRef = (0, _rax.useRef)(null);
var isInitialMount = (0, _rax.useRef)(false);

@@ -78,5 +73,2 @@

}, [props.source.uri]);
(0, _rax.useImperativeHandle)(ref, function () {
return imgRef.current;
});
var nativeProps = Object.assign({}, props); // Source must a object

@@ -115,9 +107,9 @@

var cls = (0, _dedupe.default)('rax-image', className);
var cls = ['rax-image', className].join(' ');
return _universalEnv.isWeex ? (0, _rax.createElement)("image", _extends({
ref: imgRef,
ref: ref,
className: cls,
style: nativeStyle
}, otherProps)) : (0, _rax.createElement)("img", _extends({
ref: imgRef,
ref: ref,
className: cls,

@@ -124,0 +116,0 @@ style: nativeStyle

@@ -10,3 +10,3 @@ import { HTMLAttributes, RefAttributes, CSSProperties, SyntheticEvent } from 'rax';

*/
export interface ImageProps extends HTMLAttributes<HTMLImageElement>, RefAttributes<HTMLDivElement> {
export interface ImageProps extends HTMLAttributes<HTMLImageElement>, RefAttributes<HTMLImageElement> {
/**

@@ -13,0 +13,0 @@ * source: set image uri

{
"name": "rax-image",
"version": "1.1.1",
"version": "1.1.2-0",
"description": "Image component for Rax.",

@@ -37,3 +37,2 @@ "license": "BSD-3-Clause",

"dependencies": {
"classnames": "^2.2.6",
"universal-env": "^1.0.0"

@@ -47,3 +46,2 @@ },

"@types/ali-app": "^1.0.0",
"@types/classnames": "^2.2.9",
"@types/jest": "^24.0.12",

@@ -50,0 +48,0 @@ "@typescript-eslint/eslint-plugin": "^1.7.0",

@@ -1,14 +0,20 @@

import { HTMLAttributes, RefAttributes, CSSProperties, SyntheticEvent } from 'rax';
import {
HTMLAttributes,
RefAttributes,
CSSProperties,
SyntheticEvent
} from 'rax';
export interface Source {
uri?: string;
width?: string|number;
height?: string|number;
width?: string | number;
height?: string | number;
}
/**
* props of components
*/
export interface ImageProps extends HTMLAttributes<HTMLImageElement>, RefAttributes<HTMLDivElement> {
export interface ImageProps
extends HTMLAttributes<HTMLImageElement>,
RefAttributes<HTMLImageElement> {
/**

@@ -59,4 +65,4 @@ * source: set image uri

export interface ImageLoadEvent extends SyntheticEvent<HTMLImageElement>{
export interface ImageLoadEvent extends SyntheticEvent<HTMLImageElement> {
success?: string;
}

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