UNPKG

react-aspect-ratio

Version:

React Component to maintain a consistent width-to-height ratio (aspect ratio), preventing cumulative layout shift.

98 lines (97 loc) 2.92 kB
{ "name": "react-aspect-ratio", "version": "1.1.9", "description": "React Component to maintain a consistent width-to-height ratio (aspect ratio), preventing cumulative layout shift.", "author": "Roderick Hsiao <roderickhsiao@gmail.com>", "repository": { "type": "git", "url": "https://github.com/roderickhsiao/react-aspect-ratio.git" }, "license": "MIT", "keywords": [ "aspect ratio", "css variables", "cumulative layout shift", "react image placeholder", "react-aspect-ratio", "reflow", "responsive", "responsive web design" ], "scripts": { "bundlesize": "bundlesize", "lint": "eslint src", "lintfix": "eslint src --fix", "postpublish": "npm run publish-storybook", "prepublish": ". ./.scripts/prepublish.sh", "publish-storybook": "bash .scripts/publish_storybook.sh", "storybook": "storybook dev -p 9010", "build-storybook": "storybook build", "test-watch": "npm run testonly --watch", "test": "npm run lint && npm run testonly", "test:ci": "npm run lint && npm run testonly:ci", "testonly": "jest --config jest-config.js", "testonly:ci": "jest --config jest-config.js -u" }, "devDependencies": { "@babel/cli": "^7.2.3", "@babel/core": "^7.2.2", "@babel/plugin-transform-typescript": "^7.16.8", "@babel/preset-env": "^7.24.5", "@babel/preset-typescript": "^7.24.1", "@storybook/addon-docs": "^7.0.0", "@storybook/react": "^7.0.0", "@storybook/react-webpack5": "^7.0.0", "@types/jest": "^29.0.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.17.0", "@typescript-eslint/parser": "^5.17.0", "babel-eslint": "^10.0.1", "babel-jest": "^29.0.0", "babel-loader": "^9.0.0", "babel-preset-react-app": "^10.0.0", "babel-runtime": "^6.11.6", "bundlesize": "^0.18.0", "eslint": "^8.0.0", "eslint-config-airbnb": "^19.0.0", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^6.1.2", "eslint-plugin-react": "^7.0.0", "git-url-parse": "^13.0.0", "jest": "^29.0.0", "jest-cli": "^29.0.0", "jest-junit": "^15.0.0", "react": "^19.0.0", "react-dom": "^19.0.0", "react-test-renderer": "^18.0.0", "storybook": "^7.0.0", "ts-loader": "^9.2.8", "typescript": "^5.0.0" }, "resolutions": { "jackspeak": "2.1.1" }, "peerDependencies": { "react": "^0.14.7 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "main": "dist/index.js", "module": "dist/es/index.js", "types": "dist/index.d.ts", "sideEffects": [ "*.css" ], "bundlesize": [ { "path": "./dist/*.js", "maxSize": "2 kB" }, { "path": "./dist/es/*.js", "maxSize": "2 kB" } ], "dependencies": {} }