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

react-loading-skeleton

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-loading-skeleton - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

3

dist/index.d.ts

@@ -0,4 +1,5 @@

import { Skeleton } from './Skeleton';
export default Skeleton;
export * from './SkeletonStyleProps';
export * from './SkeletonTheme';
export { Skeleton as default } from './Skeleton';
export type { SkeletonProps } from './Skeleton';

@@ -16,6 +16,2 @@ 'use strict';

function SkeletonTheme({ children, ...styleOptions }) {
return (React__default["default"].createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children));
}
/* eslint-disable react/no-array-index-key */

@@ -46,5 +42,13 @@ const defaultEnableAnimation = true;

}
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...propsStyleOptions }) {
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
var _a, _b;
const contextStyleOptions = React__default["default"].useContext(SkeletonThemeContext);
const propsStyleOptions = { ...originalPropsStyleOptions };
// DO NOT overwrite style options from the context if `propsStyleOptions`
// has properties explicity set to undefined
for (const [key, value] of Object.entries(originalPropsStyleOptions)) {
if (typeof value === 'undefined') {
delete propsStyleOptions[key];
}
}
// Props take priority over context

@@ -84,3 +88,7 @@ const styleOptions = {

function SkeletonTheme({ children, ...styleOptions }) {
return (React__default["default"].createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children));
}
exports.SkeletonTheme = SkeletonTheme;
exports["default"] = Skeleton;

@@ -12,2 +12,2 @@ import React, { CSSProperties, ReactElement } from 'react';

}
export declare function Skeleton({ count, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle, style: styleProp, ...propsStyleOptions }: SkeletonProps): ReactElement;
export declare function Skeleton({ count, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle, style: styleProp, ...originalPropsStyleOptions }: SkeletonProps): ReactElement;
{
"name": "react-loading-skeleton",
"version": "3.0.1",
"keywords": [
"react",
"loading",
"skeleton",
"progress",
"spinner"
],
"repository": {
"type": "git",
"url": "https://github.com/dvtng/react-loading-skeleton.git"
},
"license": "MIT",
"author": "David Tang",
"sideEffects": [
"**/*.css"
],
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"build": "yarn clean && tsc && rollup -c .config/rollup.config.js",
"clean": "rimraf dist",
"lint": "eslint",
"lint-all": "yarn lint .",
"lint-staged": "lint-staged --no-stash",
"prepack": "yarn run build",
"prettier-all": "prettier .",
"setup": "husky install",
"start": "yarn run storybook",
"storybook": "start-storybook -p 8080",
"test": "jest --config .config/jest.config.cjs"
},
"lint-staged": {
"*.ts?(x)": [
"eslint --max-warnings 0 --fix",
"prettier --write"
"name": "react-loading-skeleton",
"version": "3.0.2",
"keywords": [
"react",
"loading",
"skeleton",
"progress",
"spinner"
],
"*.{md,js,cjs,yml,json}": "prettier --write"
},
"browserslist": [
"maintained node versions",
"> 0.25%",
"not dead",
"not IE 11"
],
"devDependencies": {
"@babel/core": "^7.15.8",
"@rollup/plugin-typescript": "^8.2.5",
"@storybook/addon-essentials": "^6.3.10",
"@storybook/addon-links": "^6.3.10",
"@storybook/react": "^6.3.10",
"@swc/core": "^1.2.93",
"@swc/jest": "^0.2.4",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.1.2",
"@types/react": "^17.0.27",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"babel-loader": "^8.2.2",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^14.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.5.2",
"eslint-plugin-jest-dom": "^3.9.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-testing-library": "^4.12.4",
"husky": "^7.0.0",
"jest": "^27.2.5",
"lint-staged": "^11.2.0",
"prettier": "^2.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.58.0",
"rollup-plugin-copy": "^3.4.0",
"tslib": "^2.3.1",
"typescript": "^4.4.3",
"webpack": "^5.58.1"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"packageManager": "yarn@3.0.2"
}
"repository": {
"type": "git",
"url": "https://github.com/dvtng/react-loading-skeleton.git"
},
"license": "MIT",
"author": "David Tang",
"sideEffects": [
"**/*.css"
],
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"build": "yarn clean && tsc && rollup -c .config/rollup.config.js",
"clean": "rimraf dist",
"lint": "eslint .",
"lint-staged": "lint-staged --no-stash",
"prepack": "yarn run build",
"prettier": "prettier .",
"setup": "husky install",
"storybook": "start-storybook -p 8080",
"test": "jest --config .config/jest.config.cjs"
},
"lint-staged": {
"*.ts?(x)": [
"eslint --max-warnings 0 --fix",
"prettier --write"
],
"*.{md,js,cjs,yml,json}": "prettier --write"
},
"browserslist": [
"maintained node versions",
"> 0.25%",
"not dead",
"not IE 11"
],
"devDependencies": {
"@babel/core": "^7.16.0",
"@rollup/plugin-typescript": "^8.3.0",
"@storybook/addon-essentials": "^6.3.12",
"@storybook/addon-links": "^6.3.12",
"@storybook/react": "^6.3.12",
"@swc/core": "^1.2.111",
"@swc/jest": "^0.2.5",
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^12.1.2",
"@types/react": "^17.0.35",
"@types/react-dom": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"babel-loader": "^8.2.3",
"eslint": "^8.2.0",
"eslint-config-airbnb": "^19.0.0",
"eslint-config-airbnb-typescript": "^16.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.2.4",
"eslint-plugin-jest-dom": "^3.9.2",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-testing-library": "^5.0.0",
"husky": "^7.0.4",
"jest": "^27.3.1",
"lint-staged": "^12.0.3",
"prettier": "^2.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.60.0",
"rollup-plugin-copy": "^3.4.0",
"tslib": "^2.3.1",
"typescript": "^4.5.2",
"webpack": "^5.64.2"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"packageManager": "yarn@3.1.0"
}

Sorry, the diff of this file is not supported yet

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