Socket
Socket
Sign inDemoInstall

filerobot-image-editor

Package Overview
Dependencies
Maintainers
4
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filerobot-image-editor - npm Package Compare versions

Comparing version 4.2.1 to 4.3.0

2

lib/index.js

@@ -1,1 +0,1 @@

import _typeof from"@babel/runtime/helpers/typeof";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _classPrivateFieldGet from"@babel/runtime/helpers/classPrivateFieldGet";import _classPrivateFieldSet from"@babel/runtime/helpers/classPrivateFieldSet";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}function _classPrivateFieldInitSpec(a,b,c){_checkPrivateRedeclaration(a,b),b.set(a,c)}function _checkPrivateRedeclaration(a,b){if(b.has(a))throw new TypeError("Cannot initialize the same private elements twice on an object")}import{createElement}from"react";import{render,unmountComponentAtNode}from"react-dom";import AssemblyPoint,{TOOLS,TABS}from"react-filerobot-image-editor";import deepMerge from"react-filerobot-image-editor/lib/utils/deepMerge";var _render=new WeakMap,_unmount=new WeakMap,_getCurrentImgDataFnRef=new WeakMap,_updateStateFnRef=new WeakMap,FilerobotImageEditor=function(){function a(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(_classCallCheck(this,a),_classPrivateFieldInitSpec(this,_render,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,_unmount,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,_getCurrentImgDataFnRef,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,_updateStateFnRef,{writable:!0,value:void 0}),this.container=b,this.config=c,!b||!(b instanceof HTMLElement))throw new Error("`container` (argument 0) is required to initialize the image editor plugin.");_classPrivateFieldSet(this,_render,render),_classPrivateFieldSet(this,_unmount,unmountComponentAtNode),_classPrivateFieldSet(this,_getCurrentImgDataFnRef,{}),_classPrivateFieldSet(this,_updateStateFnRef,{})}return _createClass(a,[{key:"render",value:function(a){"object"===_typeof(a)&&(this.config=this.config=deepMerge(this.config||{},a)),this.config=_objectSpread(_objectSpread({},this.config),{},{getCurrentImgDataFnRef:_classPrivateFieldGet(this,_getCurrentImgDataFnRef),updateStateFnRef:_classPrivateFieldGet(this,_updateStateFnRef)}),_classPrivateFieldGet(this,_render).call(this,createElement(AssemblyPoint,this.config),this.container)}},{key:"terminate",value:function terminate(){_classPrivateFieldGet(this,_unmount).call(this,this.container)}},{key:"getCurrentImgData",value:function getCurrentImgData(a,b,c){var d,e;return(null===(d=_classPrivateFieldGet(this,_getCurrentImgDataFnRef))||void 0===d||null===(e=d.current)||void 0===e?void 0:e.call(d,a,b,c))||{}}},{key:"updateState",value:function updateState(a){var b,c;null===(b=_classPrivateFieldGet(this,_updateStateFnRef))||void 0===b||null===(c=b.current)||void 0===c?void 0:c.call(b,a)}}]),a}();_defineProperty(FilerobotImageEditor,"TABS",TABS),_defineProperty(FilerobotImageEditor,"TOOLS",TOOLS),FilerobotImageEditor.TABS=TABS,FilerobotImageEditor.TOOLS=TOOLS;export default FilerobotImageEditor;
import _typeof from"@babel/runtime/helpers/typeof";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _classPrivateFieldGet from"@babel/runtime/helpers/classPrivateFieldGet";import _classPrivateFieldSet from"@babel/runtime/helpers/classPrivateFieldSet";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}function _classPrivateFieldInitSpec(a,b,c){_checkPrivateRedeclaration(a,b),b.set(a,c)}function _checkPrivateRedeclaration(a,b){if(b.has(a))throw new TypeError("Cannot initialize the same private elements twice on an object")}import{createElement}from"react";import{createRoot}from"react-dom/client";import AssemblyPoint,{TOOLS,TABS}from"react-filerobot-image-editor";import deepMerge from"react-filerobot-image-editor/lib/utils/deepMerge";var _root=new WeakMap,_getCurrentImgDataFnRef=new WeakMap,_updateStateFnRef=new WeakMap,FilerobotImageEditor=function(){function a(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(_classCallCheck(this,a),_classPrivateFieldInitSpec(this,_root,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,_getCurrentImgDataFnRef,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,_updateStateFnRef,{writable:!0,value:void 0}),this.container=b,this.config=c,!b||!(b instanceof HTMLElement))throw new Error("`container` (argument 0) is required to initialize the image editor plugin.");_classPrivateFieldSet(this,_root,createRoot(this.container)),_classPrivateFieldSet(this,_getCurrentImgDataFnRef,{}),_classPrivateFieldSet(this,_updateStateFnRef,{})}return _createClass(a,[{key:"render",value:function render(a){"object"===_typeof(a)&&(this.config=this.config=deepMerge(this.config||{},a)),this.config=_objectSpread(_objectSpread({},this.config),{},{getCurrentImgDataFnRef:_classPrivateFieldGet(this,_getCurrentImgDataFnRef),updateStateFnRef:_classPrivateFieldGet(this,_updateStateFnRef)}),_classPrivateFieldGet(this,_root).render(createElement(AssemblyPoint,this.config))}},{key:"terminate",value:function terminate(){_classPrivateFieldGet(this,_root).unmount()}},{key:"getCurrentImgData",value:function getCurrentImgData(a,b,c){var d,e;return(null===(d=_classPrivateFieldGet(this,_getCurrentImgDataFnRef))||void 0===d||null===(e=d.current)||void 0===e?void 0:e.call(d,a,b,c))||{}}},{key:"updateState",value:function updateState(a){var b,c;null===(b=_classPrivateFieldGet(this,_updateStateFnRef))||void 0===b||null===(c=b.current)||void 0===c?void 0:c.call(b,a)}}]),a}();_defineProperty(FilerobotImageEditor,"TABS",TABS),_defineProperty(FilerobotImageEditor,"TOOLS",TOOLS),FilerobotImageEditor.TABS=TABS,FilerobotImageEditor.TOOLS=TOOLS;export default FilerobotImageEditor;
{
"name": "filerobot-image-editor",
"version": "4.2.1",
"version": "4.3.0",
"license": "MIT",

@@ -32,5 +32,5 @@ "author": "Scaleflex",

"@babel/runtime": "^7.17.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"styled-components": "5.1.0"
"react": "18.2.0",
"react-dom": "18.2.0",
"styled-components": "5.3.5"
},

@@ -43,3 +43,3 @@ "peerDependencies": {

},
"gitHead": "6ca886052c9607168683e57ad7a868149a1db598"
"gitHead": "47a287e2709b57893c58fb0f619509b062e31189"
}
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