From 5b75fe5fd7e4c224cc00d8543d403a55836ead0d Mon Sep 17 00:00:00 2001 From: Jose Antonio Ciccio Date: Sun, 31 Mar 2024 11:11:46 -0600 Subject: [PATCH] 0.7.2 ready, size optimized greatly --- .npmignore | 1 + README.md | 3 + dist/main.js | 23 ------- package.json | 3 +- yarn.lock | 184 ++------------------------------------------------- 5 files changed, 11 insertions(+), 203 deletions(-) delete mode 100644 dist/main.js diff --git a/.npmignore b/.npmignore index 4c27d6d..175a1d2 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ banner.png +images react-js-banner-example \ No newline at end of file diff --git a/README.md b/README.md index a003558..6d81efa 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,9 @@ https://patreon.com/Jacware # Changelog +### v0.7.2 +* Package size further optimized from ~118kb+ to <11kb packed / 31kb unpacked :) + ### v0.7.1 * Package size optimized from ~600kb+ to <100kb diff --git a/dist/main.js b/dist/main.js deleted file mode 100644 index 03d7902..0000000 --- a/dist/main.js +++ /dev/null @@ -1,23 +0,0 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){e.exports=n(6)()},function(e,t,n){"use strict";e.exports=n(12)},function(e,t,n){"use strict";e.exports=n(4)},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(0),i=n.n(o),a=(n(8),n(1));function u(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&b(o)}),[o]);var h=function(e){return new Promise((function(t){return setTimeout(t,e)}))};return void 0===l||l?t&&(void 0===y||y)?(function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(void 0!==m&&m>0)){e.next=5;break}return e.next=3,h(1e3+m);case 3:return e.next=5,d(!1);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,c,"next",e)}function c(e){u(i,r,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}()(),Object(a.jsxs)("div",{className:"banner",style:n,children:[i&&f?Object(a.jsx)("img",{src:i,className:f}):i?Object(a.jsx)("img",{src:i}):null,Object(a.jsx)("div",{children:t})]},"banner")):s?Object(a.jsx)("div",{className:"banner",style:n,children:s},"banner"):null:null};l.propTypes={title:i.a.node,css:i.a.object,visibleTime:i.a.number,image:i.a.string,imageClass:i.a.string,transitionAppearTime:i.a.number,transitionTime:i.a.number,showBanner:i.a.bool,children:i.a.node},t.default=l},function(e,t,n){"use strict"; -/** @license React v16.14.0 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var r=n(5),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,f=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,s=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,d=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nR.length&&R.push(e)}function A(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case a:c=!0}}if(c)return r(o,t,""===n?"."+I(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var f=0;f