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

react-simple-skeleton

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-skeleton - npm Package Compare versions

Comparing version 0.1.23 to 0.1.31

2

lib/Skeleton.js

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

module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,a=t(1),o=(r=a)&&r.__esModule?r:{default:r};t(2);n.default=function(e){for(var n=[],t=e.contentNumber?parseInt(e.contentNumber):4,r=0;r<t;r++)n.push(o.default.createElement("div",{className:e.content?"skeletonBody":"skeletonBody animations"},"card"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardImg shadow animations"}),o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"})):null,"card-2"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardImg2 shadow animations"}),o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"})):null,"text"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"}),o.default.createElement("div",{className:"cardBigText shadow animations"})):null));return o.default.createElement("div",{className:"skeletonMain",style:{width:e.width?e.width:"100%"}},n)}},function(e,n){e.exports=require("react")},function(e,n,t){var r=t(3),a=t(4);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,n,t){"use strict";var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),i=[];function c(e){for(var n=-1,t=0;t<i.length;t++)if(i[t].identifier===e){n=t;break}return n}function l(e,n){for(var t={},r=[],a=0;a<e.length;a++){var o=e[a],l=n.base?o[0]+n.base:o[0],s=t[l]||0,d="".concat(l," ").concat(s);t[l]=s+1;var u=c(d),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==u?(i[u].references++,i[u].updater(f)):i.push({identifier:d,updater:v(f,n),references:1}),r.push(d)}return r}function s(e){var n=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=t.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){n.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(n);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}return n}var d,u=(d=[],function(e,n){return d[e]=n,d.filter(Boolean).join("\n")});function f(e,n,t,r){var a=t?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(n,a);else{var o=document.createTextNode(a),i=e.childNodes;i[n]&&e.removeChild(i[n]),i.length?e.insertBefore(o,i[n]):e.appendChild(o)}}function p(e,n,t){var r=t.css,a=t.media,o=t.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function v(e,n){var t,r,a;if(n.singleton){var o=h++;t=m||(m=s(n)),r=f.bind(null,t,o,!1),a=f.bind(null,t,o,!0)}else t=s(n),r=p.bind(null,t,n),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else a()}}e.exports=function(e,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=a());var t=l(e=e||[],n);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<t.length;r++){var a=c(t[r]);i[a].references--}for(var o=l(e,n),s=0;s<t.length;s++){var d=c(t[s]);0===i[d].references&&(i[d].updater(),i.splice(d,1))}t=o}}}},function(e,n,t){(n=t(5)(!1)).push([e.i,'.skeletonMain {\r\n position: relative;\r\n}\r\n.skeletonBody {\r\n display: inline-block;\r\n position: relative;\r\n width: 200px;\r\n height: 250px;\r\n padding: 10px;\r\n margin: 10px;\r\n box-shadow: 0 4px 10px 0 rgba(33, 33, 33, 0.15);\r\n border-radius: 5px;\r\n}\r\n.animations {\r\n overflow: hidden;\r\n}\r\n.animations::before {\r\n content: "";\r\n display: block;\r\n position: absolute;\r\n left: -150px;\r\n top: 0;\r\n height: 100%;\r\n width: 150px;\r\n background: linear-gradient(\r\n to right,\r\n transparent 0%,\r\n #e8e8e8 50%,\r\n transparent 100%\r\n );\r\n animation: loading 1s infinite;\r\n z-index: inherit;\r\n}\r\n@keyframes loading {\r\n from {\r\n left: -200px;\r\n }\r\n to {\r\n left: 50%;\r\n }\r\n}\r\n.shadow {\r\n position: relative;\r\n width: 100%;\r\n background-color: #d3d3d3;\r\n margin-top: 20px;\r\n}\r\n.cardImg {\r\n width: 120px;\r\n height: 120px;\r\n border-radius: 50%;\r\n margin-left: 20%;\r\n}\r\n.cardImg2 {\r\n width: 100%;\r\n height: 120px;\r\n}\r\n.cardHeader {\r\n height: 20px;\r\n}\r\n.cardText {\r\n height: 40px;\r\n}\r\n.cardBigText {\r\n height: 75px;\r\n width: 100%;\r\n}\r\n@media (max-width: 500px) {\r\n .skeletonMain {\r\n text-align: center;\r\n }\r\n}\r\n',""]),e.exports=n},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var a=(i=r,c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([a]).join("\n")}var i,c,l;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&a[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),n.push(l))}},n}}]);
module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,a=t(1),o=(r=a)&&r.__esModule?r:{default:r};t(2);n.default=function(e){for(var n=[],t=e.contentNumber?parseInt(e.contentNumber):4,r=0;r<t;r++)n.push(o.default.createElement("div",{className:e.content?"skeletonBody":"skeletonBody animations"},"card"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardImg shadow animations"}),o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"})):null,"card-2"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardImg2 shadow animations"}),o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"})):null,"text"==e.content?o.default.createElement("div",null,o.default.createElement("div",{className:"cardHeader shadow animations"}),o.default.createElement("div",{className:"cardText shadow animations"}),o.default.createElement("div",{className:"cardBigText shadow animations"})):null));return o.default.createElement("div",{className:"skeletonMain",style:{width:e.width?e.width:"100%"}},n)}},function(e,n){e.exports=require("react")},function(e,n,t){var r=t(3),a=t(4);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,n,t){"use strict";var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),i=[];function c(e){for(var n=-1,t=0;t<i.length;t++)if(i[t].identifier===e){n=t;break}return n}function l(e,n){for(var t={},r=[],a=0;a<e.length;a++){var o=e[a],l=n.base?o[0]+n.base:o[0],s=t[l]||0,d="".concat(l," ").concat(s);t[l]=s+1;var u=c(d),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==u?(i[u].references++,i[u].updater(f)):i.push({identifier:d,updater:v(f,n),references:1}),r.push(d)}return r}function s(e){var n=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=t.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){n.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(n);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}return n}var d,u=(d=[],function(e,n){return d[e]=n,d.filter(Boolean).join("\n")});function f(e,n,t,r){var a=t?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(n,a);else{var o=document.createTextNode(a),i=e.childNodes;i[n]&&e.removeChild(i[n]),i.length?e.insertBefore(o,i[n]):e.appendChild(o)}}function p(e,n,t){var r=t.css,a=t.media,o=t.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function v(e,n){var t,r,a;if(n.singleton){var o=h++;t=m||(m=s(n)),r=f.bind(null,t,o,!1),a=f.bind(null,t,o,!0)}else t=s(n),r=p.bind(null,t,n),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else a()}}e.exports=function(e,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=a());var t=l(e=e||[],n);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<t.length;r++){var a=c(t[r]);i[a].references--}for(var o=l(e,n),s=0;s<t.length;s++){var d=c(t[s]);0===i[d].references&&(i[d].updater(),i.splice(d,1))}t=o}}}},function(e,n,t){(n=t(5)(!1)).push([e.i,'.skeletonMain {\r\n position: relative;\r\n}\r\n.skeletonBody {\r\n display: inline-block;\r\n position: relative;\r\n width: 200px;\r\n height: 250px;\r\n padding: 10px;\r\n margin: 10px;\r\n box-shadow: 0 4px 10px 0 rgba(33, 33, 33, 0.15);\r\n border-radius: 5px;\r\n}\r\n.animations {\r\n overflow: hidden;\r\n}\r\n.animations::before {\r\n content: "";\r\n display: block;\r\n position: absolute;\r\n left: -150px;\r\n top: 0;\r\n height: 100%;\r\n width: 150px;\r\n background: linear-gradient(\r\n to right,\r\n transparent 0%,\r\n #e8e8e8 50%,\r\n transparent 100%\r\n );\r\n animation: loading 1s infinite;\r\n z-index: inherit;\r\n}\r\n@keyframes loading {\r\n from {\r\n left: -200px;\r\n }\r\n to {\r\n left: 100%;\r\n }\r\n}\r\n.shadow {\r\n position: relative;\r\n width: 100%;\r\n background-color: #d3d3d3;\r\n margin-top: 20px;\r\n}\r\n.cardImg {\r\n width: 120px;\r\n height: 120px;\r\n border-radius: 50%;\r\n margin-left: 20%;\r\n}\r\n.cardImg2 {\r\n width: 100%;\r\n height: 120px;\r\n}\r\n.cardHeader {\r\n height: 20px;\r\n}\r\n.cardText {\r\n height: 40px;\r\n}\r\n.cardBigText {\r\n height: 75px;\r\n width: 100%;\r\n}\r\n@media (max-width: 500px) {\r\n .skeletonMain {\r\n text-align: center;\r\n }\r\n}\r\n',""]),e.exports=n},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var a=(i=r,c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([a]).join("\n")}var i,c,l;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&a[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),n.push(l))}},n}}]);
{
"name": "react-simple-skeleton",
"version": "0.1.23",
"version": "0.1.31",
"description": "react simple skeleton loading page",

@@ -11,3 +11,2 @@ "main": "./lib/Skeleton.js",

"peerDependencies": {
"prop-types": "^15.6.0",
"react": "^16.0.0",

@@ -14,0 +13,0 @@ "react-dom": "^16.0.0"

@@ -1,26 +0,78 @@

> This project is created to simplify the process of publishing a React component to npm. For a full tutorial on publishing React component to npm, please refer to [this guide](https://medium.com/groftware/how-to-publish-your-react-component-on-npm-9cf48d91944d)
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Guide
1. Replace contents in `/src` with your React component.
1. Edit `webpack.config.js`, replace the following:
1. `entry: './src/YOUR_COMPONENT.js'` Replace value of `entry` to path to the entry point of your component.
1. Replace `output.filename` to the name of your component
```
output: {
path: path.resolve('lib'),
filename: 'YOUR_COMPONENT.js',
libraryTarget: 'commonjs2',
},
```
1. Edit `package.json`, replace the following:
1. `"name": "YOUR_PACKAGE_NAME"` Replace the value of `name` to your package name. This will be the name of the package that is published to `npm` and the name that is used when other people install your package using `npm install YOUR_PACKAGE_NAME`.
1. Update the values of `version` and `description` to accordingly.
1. `"main": "./lib/YOUR_COMPONENT.js"` replace `YOUR_COMPONENT.js` with the name that you've set in `output.filename` during Step #2
1. If your component uses any other dependencies, make sure to add them into the `peerDependencies` list.
1. Building your component by running `npm build` in your command line. This would generate the folder `/lib` which includes your component.
1. Publishing to [npm](https://www.npmjs.com/)
1. Make sure you've [registered an npm account](https://www.npmjs.com/signup)
1. Run `npm login` in your command line, and enter your credentials.
1. Run `npm publish`, and your React component will be uploaded to npm! You can find it at https://www.npmjs.com/package/[YOUR PACKAGE NAME] or your npm profile.
## Available Scripts
1. To update your package, make sure you remember to increment the `version` in `package.json`, and then perform Step #5 again.
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
##
MIT License
Copyright (c) 2020 Muhsin Köse
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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