react-filerobot-image-editor
Advanced tools
Comparing version 5.0.0-beta.10 to 5.0.0-beta.11
@@ -1,1 +0,1 @@ | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","image","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{useEffect,useState}from"react";import{Image}from"react-konva";import loadImage from"../../../../utils/loadImage";import nodesCommonPropTypes from"../nodesCommonPropTypes";var ImageNode=function(a){var b=a.id,c=a.name,d=a.image,e=a.x,f=a.y,g=a.width,h=a.height,i=a.scaleX,j=a.scaleY,k=a.rotation,l=a.annotationEvents,m=a.stroke,n=a.strokeWidth,o=a.shadowOffsetX,p=a.shadowOffsetY,q=a.shadowBlur,r=a.shadowColor,s=a.shadowOpacity,t=a.opacity,u=_objectWithoutProperties(a,_excluded),v=useState(null),w=_slicedToArray(v,2),x=w[0],y=w[1];useEffect(function(){"string"==typeof d&&loadImage(d).then(y)},[d]);var z=d instanceof HTMLImageElement;if(!z&&!x)return null;var A=z?d:x;return React.createElement(Image,_extends({id:b,name:c,rotation:k,scaleX:i,scaleY:j,stroke:m,strokeWidth:n,shadowOffsetX:o,shadowOffsetY:p,shadowBlur:q,shadowColor:r,shadowOpacity:s,image:A,x:e,y:f,width:g,height:h,opacity:t},u,l,u))};ImageNode.defaultProps=_objectSpread(_objectSpread({},nodesCommonPropTypes.defaults),{},{width:0,height:0});export default ImageNode; | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","image","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{useEffect,useState}from"react";import{Image}from"react-konva";import loadImage from"../../../../utils/loadImage";import nodesCommonPropTypes from"../nodesCommonPropTypes";var ImageNode=function(a){var b=a.id,c=a.name,d=a.image,e=a.x,f=a.y,g=a.width,h=a.height,i=a.scaleX,j=a.scaleY,k=a.rotation,l=a.annotationEvents,m=a.stroke,n=a.strokeWidth,o=a.shadowOffsetX,p=a.shadowOffsetY,q=a.shadowBlur,r=a.shadowColor,s=a.shadowOpacity,t=a.opacity,u=_objectWithoutProperties(a,_excluded),v=useState(null),w=_slicedToArray(v,2),x=w[0],y=w[1];useEffect(function(){"string"==typeof d&&loadImage(d).then(y)},[d]);var z=d instanceof HTMLImageElement;if(!z&&!x)return null;var A=z?d:x;return React.createElement(Image,_extends({id:b,name:c,rotation:k,scaleX:i,scaleY:j,stroke:m,strokeWidth:n,shadowOffsetX:o,shadowOffsetY:p,shadowBlur:q,shadowColor:r,shadowOpacity:s,image:A,x:e||0,y:f||0,width:g,height:h,opacity:t||0},u,l,u))};ImageNode.defaultProps=_objectSpread(_objectSpread({},nodesCommonPropTypes.defaults),{},{width:0,height:0});export default ImageNode; |
@@ -1,1 +0,1 @@ | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","text","fontFamily","fontSize","fontStyle","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","letterSpacing","lineHeight","align","autoWidth","autoHeight"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React from"react";import{Text}from"react-konva";import nodesCommonPropTypes from"../nodesCommonPropTypes";var TextNode=function(a){var b=a.id,c=a.name,d=a.text,e=a.fontFamily,f=a.fontSize,g=a.fontStyle,h=a.fill,i=a.x,j=a.y,k=a.width,l=a.height,m=a.scaleX,n=a.scaleY,o=a.rotation,p=a.annotationEvents,q=a.stroke,r=a.strokeWidth,s=a.shadowOffsetX,t=a.shadowOffsetY,u=a.shadowBlur,v=a.shadowColor,w=a.shadowOpacity,x=a.opacity,y=a.letterSpacing,z=a.lineHeight,A=a.align,B=a.autoWidth,C=void 0!==B&&B,D=a.autoHeight,E=void 0!==D&&D,F=_objectWithoutProperties(a,_excluded);return React.createElement(Text,_extends({id:b,name:c,rotation:o,scaleX:m,scaleY:n,stroke:q,strokeWidth:r,shadowOffsetX:s,shadowOffsetY:t,shadowBlur:u,shadowColor:v,shadowOpacity:w,opacity:x,fill:h,text:d,fontFamily:e,fontStyle:g,fontSize:f,letterSpacing:y,lineHeight:z,align:A,x:i,y:j,width:C?void 0:k,height:E?void 0:l,autoWidth:C,autoHeight:E},p,F))};TextNode.defaultProps=_objectSpread(_objectSpread({},nodesCommonPropTypes.defaults),{},{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet tortor quis odio facilisis, id aliquet nulla facilisis. Etiam tincidunt tempor odio nec placerat.",fontFamily:"Arial",fontSize:14,fill:"#000",width:0,height:0,letterSpacing:void 0,lineHeight:void 0,align:"left"});export default TextNode; | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","text","fontFamily","fontSize","fontStyle","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","letterSpacing","lineHeight","align","autoWidth","autoHeight"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React from"react";import{Text}from"react-konva";import nodesCommonPropTypes from"../nodesCommonPropTypes";var TextNode=function(a){var b=a.id,c=a.name,d=a.text,e=a.fontFamily,f=a.fontSize,g=a.fontStyle,h=a.fill,i=a.x,j=a.y,k=a.width,l=a.height,m=a.scaleX,n=a.scaleY,o=a.rotation,p=a.annotationEvents,q=a.stroke,r=a.strokeWidth,s=a.shadowOffsetX,t=a.shadowOffsetY,u=a.shadowBlur,v=a.shadowColor,w=a.shadowOpacity,x=a.opacity,y=a.letterSpacing,z=a.lineHeight,A=a.align,B=a.autoWidth,C=void 0!==B&&B,D=a.autoHeight,E=void 0!==D&&D,F=_objectWithoutProperties(a,_excluded);return React.createElement(Text,_extends({id:b,name:c,rotation:o,scaleX:m,scaleY:n,stroke:q,strokeWidth:r,shadowOffsetX:s,shadowOffsetY:t,shadowBlur:u,shadowColor:v,shadowOpacity:w,opacity:x||0,fill:h,text:d,fontFamily:e,fontStyle:g,fontSize:f||1,letterSpacing:y||0,lineHeight:z||1,align:A,x:i||0,y:j||0,width:C?void 0:k,height:E?void 0:l,autoWidth:C,autoHeight:E},p,F))};TextNode.defaultProps=_objectSpread(_objectSpread({},nodesCommonPropTypes.defaults),{},{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet tortor quis odio facilisis, id aliquet nulla facilisis. Etiam tincidunt tempor odio nec placerat.",fontFamily:"Arial",fontSize:14,fill:"#000",width:0,height:0,letterSpacing:void 0,lineHeight:void 0,align:"left"});export default TextNode; |
{ | ||
"name": "react-filerobot-image-editor", | ||
"version": "5.0.0-beta.10", | ||
"version": "5.0.0-beta.11", | ||
"license": "MIT", | ||
@@ -46,3 +46,3 @@ "author": "Scaleflex", | ||
}, | ||
"gitHead": "ba0e3033637f10c89b3a6bbe7851efe03f4e3844" | ||
"gitHead": "2d54545bdf094c37b8b929ee3b362d85d1432aa2" | ||
} |
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
356716