@clutch-creator/react-extension
Advanced tools
Comparing version 1.0.0 to 2.0.0-beta.0
@@ -1,1 +0,1 @@ | ||
module.exports=function(t){var n={};function o(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=n,o.d=function(e,r,t){if(!o.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},o.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(r,e){if(1&e)r=o(r);if(8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)o.d(t,n,function(e){return r[e]}.bind(null,n));return t},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s=21)}([function(e,r){e.exports=require("@clutch-creator/bridge")},,function(e,r){e.exports=require("@babel/runtime/helpers/getPrototypeOf")},function(e,r){e.exports=require("react")},,function(e,r){e.exports=require("@babel/runtime/regenerator")},function(e,r){e.exports=require("react-dom")},,,,function(e,r){e.exports=require("@babel/runtime/helpers/classCallCheck")},function(e,r){e.exports=require("@babel/runtime/helpers/createClass")},function(e,r){e.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},function(e,r){e.exports=require("@babel/runtime/helpers/inherits")},function(e,r){e.exports=require("@babel/runtime/helpers/asyncToGenerator")},,,function(e,r){e.exports=require("react-hot-loader")},,,,function(e,r,t){"use strict";t.r(r);var n=t(5),f=t.n(n),o=t(14),u=t.n(o),p=t(17),a=t(3),d=t.n(a),i=t(6),b=t.n(i),c=t(10),l=t.n(c),s=t(11),m=t.n(s),h=t(12),v=t.n(h),x=t(2),y=t.n(x),g=t(13),k=t.n(g),q=t(0),C=t.n(q),E=function(e){function t(e){var r;return l()(this,t),(r=v()(this,y()(t).call(this,e))).state={error:!1},r}return k()(t,e),m()(t,[{key:"componentDidMount",value:function(){C.a.setCanvasError(!1)}},{key:"componentDidCatch",value:function(e){C.a.setCanvasError(e)}},{key:"render",value:function(){var e=this.props.children;return this.state.error?null:e}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),t}(d.a.Component);t.d(r,"default",function(){return j});var O="development"===process.env.NODE_ENV;function j(){return _.apply(this,arguments)}function _(){return(_=u()(f.a.mark(function e(){var r,t,n,o,u,a,i,c,l,s=arguments;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(r=0<s.length&&void 0!==s[0]?s[0]:{}).element,n=r.hooks,e.prev=2,o=t||null,O)o=d.a.createElement(p.AppContainer,null,d.a.createElement(E,null,o));u={element:o},a=0;case 7:if(!(a<n.length)){e.next=16;break}if((i=n[a]||{}).preRender)return e.next=12,i.preRender(u);e.next=13;break;case 12:u.element=e.sent;case 13:a+=1,e.next=7;break;case 16:if(O)b.a.render(u.element,document.getElementById("root"));else b.a.hydrate(u.element,document.getElementById("root"));c=0;case 18:if(!(c<n.length)){e.next=26;break}if((l=n[c]||{}).postRender)return e.next=23,l.postRender(u);e.next=23;break;case 23:c+=1,e.next=18;break;case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(2),console.error(e.t0);case 31:return e.abrupt("return",void 0);case 32:case"end":return e.stop()}},e,null,[[2,28]])}))).apply(this,arguments)}}]); | ||
module.exports=function(t){var n={};function o(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=n,o.d=function(e,r,t){if(!o.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},o.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(r,e){if(1&e)r=o(r);if(8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)o.d(t,n,function(e){return r[e]}.bind(null,n));return t},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s=8)}([function(e,r){e.exports=require("@babel/runtime/regenerator")},,function(e,r){e.exports=require("@babel/runtime/helpers/asyncToGenerator")},function(e,r){e.exports=require("react-dom")},function(e,r){e.exports=require("react-hot-loader")},function(e,r){e.exports=require("react")},,,function(e,r,t){"use strict";t.r(r),t.d(r,"default",function(){return c});var n=t(0),s=t.n(n),o=t(2),u=t.n(o),p=t(4),a=t(5),d=t.n(a),i=t(3),b=t.n(i),m="development"===process.env.NODE_ENV;function c(){return l.apply(this,arguments)}function l(){return(l=u()(s.a.mark(function e(){var r,t,n,o,u,a,i,c,l,f=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(r=0<f.length&&void 0!==f[0]?f[0]:{}).element,n=r.hooks,e.prev=2,o=t||null,m)o=d.a.createElement(p.AppContainer,null,o);u={element:o},a=0;case 7:if(!(a<n.length)){e.next=16;break}if((i=n[a]||{}).preRender)return e.next=12,i.preRender(u);e.next=13;break;case 12:u.element=e.sent;case 13:a+=1,e.next=7;break;case 16:if(m)b.a.render(u.element,document.getElementById("root"));else b.a.hydrate(u.element,document.getElementById("root"));c=0;case 18:if(!(c<n.length)){e.next=26;break}if((l=n[c]||{}).postRender)return e.next=23,l.postRender(u);e.next=23;break;case 23:c+=1,e.next=18;break;case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(2),console.error(e.t0);case 31:return e.abrupt("return",void 0);case 32:case"end":return e.stop()}},e,null,[[2,28]])}))).apply(this,arguments)}}]); |
{ | ||
"name": "@clutch-creator/react-extension", | ||
"version": "1.0.0", | ||
"version": "2.0.0-beta.0", | ||
"description": "Clutch extension for react components", | ||
@@ -25,3 +25,2 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"@clutch-creator/bridge": "^0.0.1", | ||
"react": ">=16.6.0", | ||
@@ -37,3 +36,2 @@ "react-dom": ">=16.6.0" | ||
"@babel/preset-react": "^7.0.0", | ||
"@clutch-creator/bridge": "^0.0.1", | ||
"babel-eslint": "^10.0.1", | ||
@@ -61,7 +59,4 @@ "babel-loader": "^8.0.4", | ||
"@types/react": ">=16.6.0", | ||
"classnames": "^2.2.6", | ||
"history": "^4.6.1", | ||
"lodash": "^4.17.15", | ||
"react-hot-loader": "^4.12.15" | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
# Clutch Extension React | ||
# Clutch React Extension | ||
This extension allows user created components to interact with Clutch IDE with minimal interface. | ||
Default React client and server entry definitions with support for Clutch hooks. | ||
@@ -5,0 +5,0 @@ ## Installation |
@@ -1,1 +0,1 @@ | ||
module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){if(!o.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e)t=o(t);if(8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=22)}({14:function(e,t){e.exports=require("@babel/runtime/helpers/asyncToGenerator")},18:function(e,t){e.exports=require("react-dom/server")},19:function(e,t){e.exports=require("@babel/runtime/helpers/typeof")},22:function(e,t,n){"use strict";n.r(t);function c(n){var e="";if(n)if(Array.isArray(n))e=n.map(function(e){var t="";if("string"==typeof e)t=e;else t="".concat(e.name,'="').concat(e.value,'"');return t}).join(" ");else if("object"===f()(n))e=Object.keys(n).map(function(e){var t=n[e];return"".concat(e,'="').concat(t,'"')}).join(" ");return e}function u(e){var t="";if(e&&e.length)t=e.map(function(e){var t="";if("string"==typeof e)t=e;else if(t="<".concat(e.tag," ").concat(c(e.attributes),">"),"meta"!==e.tag&&"link"!==e.tag)t+="".concat(e.content||"","</").concat(e.tag,">");return t}).join("\n");return t}var r=n(5),E=n.n(r),o=n(9),k=n.n(o),a=n(14),i=n.n(a),s=n(18),O=n.n(s),l=n(19),f=n.n(l),S=function(e){var t=e.htmlAttributes,n=e.headElements,r=e.footerElements,o=e.bodyAttributes,a=e.bodyContent;return"<!DOCTYPE html>\n<html ".concat(c(t),'>\n <head>\n <meta charset="UTF-8">\n ').concat(u(n),"\n </head>\n <body ").concat(c(o),">\n <div id='root'>\n ").concat(a,"\n </div>\n ").concat(u(r),"\n </body>\n</html>\n")};function b(){return p.apply(this,arguments)}function p(){return(p=i()(E.a.mark(function e(){var t,n,r,o,a,c,u,i,s,l,f,b,p,d,m,y,h,g,v,x,j,A=arguments;return E.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=(t=0<A.length&&void 0!==A[0]?A[0]:{}).element,r=t.pathname,o=t.hooks,a=t.headElements,c=t.footerElements,u=t.bodyAttributes,i=t.htmlAttributes,s=k()(a||[]),l=k()(c||[]),f=Object.assign({},u),b=Object.assign({},i),e.prev=6,p={element:n||null,pathname:r||"/",headElements:s,footerElements:l,bodyAttributes:f,htmlAttributes:b,addHeadElements:function(e){return s.push.apply(s,k()(e))},addFooterElements:function(e){return l.push.apply(l,k()(e))},addBodyAttributes:function(e){Object.assign(f,e)},addHtmlAttributes:function(e){Object.assign(b,e)}},d=0;case 9:if(!(d<o.length)){e.next=18;break}if((m=o[d]||{}).preRender)return e.next=14,m.preRender(p);e.next=15;break;case 14:p.element=e.sent;case 15:d+=1,e.next=9;break;case 18:y=O.a.renderToString(p.element),h=0;case 20:if(!(h<o.length)){e.next=28;break}if((g=o[h]||{}).postRender)return e.next=25,g.postRender(p);e.next=25;break;case 25:h+=1,e.next=20;break;case 28:return v=S({htmlAttributes:b,headElements:s,footerElements:l,bodyAttributes:f,bodyContent:y}),e.abrupt("return",v);case 32:return e.prev=32,e.t0=e.catch(6),x=e.t0&&e.t0.message&&e.t0.message.replace(/(\r\n|\n|\r)/gm,""),j=e.t0&&e.t0.stack&&e.t0.stack.replace(/(\r\n|\n|\r)/gm,""),e.abrupt("return",S({htmlAttributes:[],headElements:s,footerElements:[].concat(k()(l),[{tag:"script",attributes:{type:"text/javascript"},content:'\n console.warn("Error on SSR: '.concat(x,'");\n console.warn("ssr error stack trace: ').concat(j,'");\n ')}]),bodyAttributes:[],bodyContent:""}));case 37:case"end":return e.stop()}},e,null,[[6,32]])}))).apply(this,arguments)}n.d(t,"default",function(){return b})},5:function(e,t){e.exports=require("@babel/runtime/regenerator")},9:function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")}}); | ||
module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){if(!o.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e)t=o(t);if(8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=9)}([function(e,t){e.exports=require("@babel/runtime/regenerator")},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("@babel/runtime/helpers/asyncToGenerator")},,,,function(e,t){e.exports=require("react-dom/server")},function(e,t){e.exports=require("@babel/runtime/helpers/typeof")},,function(e,t,n){"use strict";n.r(t);function c(n){var e="";if(n)if(Array.isArray(n))e=n.map(function(e){var t="";if("string"==typeof e)t=e;else t="".concat(e.name,'="').concat(e.value,'"');return t}).join(" ");else if("object"===f()(n))e=Object.keys(n).map(function(e){var t=n[e];return"".concat(e,'="').concat(t,'"')}).join(" ");return e}function u(e){var t="";if(e&&e.length)t=e.map(function(e){var t="";if("string"==typeof e)t=e;else if(t="<".concat(e.tag," ").concat(c(e.attributes),">"),"meta"!==e.tag&&"link"!==e.tag)t+="".concat(e.content||"","</").concat(e.tag,">");return t}).join("\n");return t}var r=n(0),E=n.n(r),o=n(1),k=n.n(o),a=n(2),i=n.n(a),s=n(6),O=n.n(s),l=n(7),f=n.n(l),S=function(e){var t=e.htmlAttributes,n=e.headElements,r=e.footerElements,o=e.bodyAttributes,a=e.bodyContent;return"<!DOCTYPE html>\n<html ".concat(c(t),'>\n <head>\n <meta charset="UTF-8">\n ').concat(u(n),"\n </head>\n <body ").concat(c(o),">\n <div id='root'>\n ").concat(a,"\n </div>\n ").concat(u(r),"\n </body>\n</html>\n")};function b(){return p.apply(this,arguments)}function p(){return(p=i()(E.a.mark(function e(){var t,n,r,o,a,c,u,i,s,l,f,b,p,d,m,y,h,g,v,x,j,A=arguments;return E.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=(t=0<A.length&&void 0!==A[0]?A[0]:{}).element,r=t.pathname,o=t.hooks,a=t.headElements,c=t.footerElements,u=t.bodyAttributes,i=t.htmlAttributes,s=k()(a||[]),l=k()(c||[]),f=Object.assign({},u),b=Object.assign({},i),e.prev=6,p={element:n||null,pathname:r||"/",headElements:s,footerElements:l,bodyAttributes:f,htmlAttributes:b,addHeadElements:function(e){return s.push.apply(s,k()(e))},addFooterElements:function(e){return l.push.apply(l,k()(e))},addBodyAttributes:function(e){Object.assign(f,e)},addHtmlAttributes:function(e){Object.assign(b,e)}},d=0;case 9:if(!(d<o.length)){e.next=18;break}if((m=o[d]||{}).preRender)return e.next=14,m.preRender(p);e.next=15;break;case 14:p.element=e.sent;case 15:d+=1,e.next=9;break;case 18:y=O.a.renderToString(p.element),h=0;case 20:if(!(h<o.length)){e.next=28;break}if((g=o[h]||{}).postRender)return e.next=25,g.postRender(p);e.next=25;break;case 25:h+=1,e.next=20;break;case 28:return v=S({htmlAttributes:b,headElements:s,footerElements:l,bodyAttributes:f,bodyContent:y}),e.abrupt("return",v);case 32:return e.prev=32,e.t0=e.catch(6),x=e.t0&&e.t0.message&&e.t0.message.replace(/(\r\n|\n|\r)/gm,""),j=e.t0&&e.t0.stack&&e.t0.stack.replace(/(\r\n|\n|\r)/gm,""),e.abrupt("return",S({htmlAttributes:[],headElements:s,footerElements:[].concat(k()(l),[{tag:"script",attributes:{type:"text/javascript"},content:'\n console.warn("Error on SSR: '.concat(x,'");\n console.warn("ssr error stack trace: ').concat(j,'");\n ')}]),bodyAttributes:[],bodyContent:""}));case 37:case"end":return e.stop()}},e,null,[[6,32]])}))).apply(this,arguments)}n.d(t,"default",function(){return b})}]); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
5
24
1
14776
5
- Removedclassnames@^2.2.6
- Removedhistory@^4.6.1
- Removedlodash@^4.17.15
- Removed@clutch-creator/bridge@0.0.1(transitive)
- Removedclassnames@2.5.1(transitive)
- Removedhistory@4.10.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedresolve-pathname@3.0.0(transitive)
- Removedtiny-invariant@1.3.3(transitive)
- Removedtiny-warning@1.0.3(transitive)
- Removedvalue-equal@1.0.1(transitive)