You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
18 KiB

{
"name": "@sxzz/popperjs-es",
"version": "2.11.7",
"description": "Tooltip and Popover Positioning Engine",
"main": "dist/index.js",
"module": "dist/index.mjs",
"unpkg": "dist/index.iife.js",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": "./*"
},
"types": "./index.d.ts",
"author": "Federico Zivolo <federico.zivolo@gmail.com>",
"license": "MIT",
"repository": "github:popperjs/popper-core",
"keywords": [
"tooltip",
"popover",
"dropdown",
"popup",
"popper",
"positioning engine"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
},
"files": [
"index.d.ts",
"/dist",
"/lib"
],
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"prettier": {
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"proseWrap": "always"
},
"babel": {
"extends": "./.config/babel.config"
},
"jest": {
"preset": "./.config/jest.config"
},
"eslintConfig": {
"extends": "./.config/eslint.config"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.26.0",
"@atomico/rollup-plugin-sizes": "^1.1.4",
"@babel/cli": "^7.12.17",
"@babel/core": "^7.12.17",
"@babel/plugin-transform-flow-strip-types": "^7.12.13",
"@babel/plugin-transform-runtime": "^7.12.17",
"@babel/preset-env": "^7.12.17",
"@fezvrasta/tsc-silent": "^1.3.0",
"@khanacademy/flow-to-ts": "^0.3.0",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-replace": "^2.3.4",
"babel-eslint": "^10.0.3",
"babel-jest": "^26.6.3",
"babel-plugin-add-import-extension": "^1.4.4",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-inline-replace-variables": "^1.3.1",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"concurrently": "^5.3.0",
"dotenv": "^8.2.0",
"esbuild": "^0.14.38",
"esbuild-plugin-flow": "^0.3.2",
"eslint": "^7.20.0",
"eslint-plugin-flowtype": "^5.2.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-unused-imports": "^1.1.0",
"esno": "^0.14.1",
"flow-bin": "^0.139.0",
"flow-copy-source": "^2.0.9",
"get-port-cli": "^2.0.0",
"husky": "^5.0.9",
"jest": "^26.6.3",
"jest-environment-jsdom-sixteen": "^1.0.3",
"jest-environment-puppeteer": "^4.4.0",
"jest-image-snapshot": "^4.3.0",
"jest-puppeteer": "^4.4.0",
"pinst": "^2.1.4",
"poster": "^0.0.9",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"puppeteer": "^10.4.0",
"replace-in-files-cli": "^1.0.0",
"rollup": "^2.70.2",
"rollup-plugin-esbuild": "^4.9.1",
"rollup-plugin-flow-entry": "^0.3.3",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^4.2.0",
"serve": "^11.3.2",
"typescript": "^4.1.5"
},
"scripts": {
"clean": "rimraf lib && rimraf dist && rimraf test/visual/dist",
"test": "yarn test:unit && yarn test:functional",
"test:unit": "jest --coverage src",
"test:functional": "DEV_PORT=`get-port` jest tests/functional",
"test:flow": "flow",
"test:typescript": "tsc --project tests/typescript/tsconfig.json",
"test:eslint": "eslint .",
"dev": "NODE_ENV=dev concurrently 'yarn serve' 'yarn build:dev --watch'",
"serve": "serve -l ${DEV_PORT:-5000} tests/visual",
"build": "yarn clean && esmo build/build.ts && pnpm run build:typescript",
"build:typescript": "rimraf dist/typescript; flow-to-ts \"src/**/*.js\" --write --inline-utility-types; tsc-silent --project .config/tsconfig.json --createSourceFile .config/createSourceFile.js --suppress @; rimraf \"src/**/*.ts\""
},
"readme": "<!-- <HEADER> // IGNORE IT -->\n<p align=\"center\">\n <img src=\"https://rawcdn.githack.com/popperjs/popper-core/8805a5d7599e14619c9e7ac19a3713285d8e5d7f/docs/src/images/popper-logo-outlined.svg\" alt=\"Popper\" height=\"300px\"/>\n</p>\n\n<div align=\"center\">\n <h1>Tooltip & Popover Positioning Engine</h1>\n</div>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/@popperjs/core\">\n <img src=\"https://img.shields.io/npm/v/@popperjs/core?style=for-the-badge\" alt=\"npm version\" />\n </a>\n <a href=\"https://www.npmjs.com/package/@popperjs/core\">\n <img src=\"https://img.shields.io/endpoint?style=for-the-badge&url=https://runkit.io/fezvrasta/combined-npm-downloads/1.0.0?packages=popper.js,@popperjs/core\" alt=\"npm downloads per month (popper.js + @popperjs/core)\" />\n </a>\n <a href=\"https://rollingversions.com/popperjs/popper-core\">\n <img src=\"https://img.shields.io/badge/Rolling%20Versions-Enabled-brightgreen?style=for-the-badge\" alt=\"Rolling Versions\" />\n </a>\n</p>\n\n<br />\n<!-- </HEADER> // NOW BEGINS THE README -->\n\n**Positioning tooltips and popovers is difficult. Popper is here to help!**\n\nGiven an element, such as a button, and a tooltip element describing it, Popper\nwill automatically put the tooltip in the right place near the button.\n\nIt will position _any_ UI element that \"pops out\" from the flow of your document\nand floats near a target element. The most common example is a tooltip, but it\nalso includes popovers, drop-downs, and more. All of these can be generically\ndescribed as a \"popper\" element.\n\n## Demo\n\n[![Popper visualized](https://i.imgur.com/F7qWsmV.jpg)](https://popper.js.org)\n\n## Docs\n\n- [v2.x (latest)](https://popper.js.org/docs/v2/)\n- [v1.x](https://popper.js.org/docs/v1/)\n\nWe've created a\n[Migration Guide](https://popper.js.org/docs/v2/migration-guide/) to help you\nmigrate from Popper 1 to Popper 2.\n\nTo contribute to the Popper website and documentation, please visit the\n[dedicated repository](https://github.com/popperjs/website).\n\n## Why not use pure CSS?\n\n- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from\n overflowing clipping boundaries, such as the viewport. It will get partially\n cut off or overflows if it's near the edge since there is no dynamic\n positioning logic. When using Popper, your popper will always be positioned in\n the right place without needing manual adjustments.\n- **No flipping**: CSS poppers will not flip to a different placement to fit\n better in view if necessary. While you can manually adjust for the main axis\n overflow, this feature cannot be achieved via CSS alone. Popper automatically\n flips the tooltip to make it fit in view as best as possible for the user.\n- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be\n used as a context menu. Popper allows you to position your tooltip relative to\n any coordinates you desire.\n- **Slower development cycle**: When pure CSS is used to position popper\n elements, the lack of dynamic positioning means they must be carefully placed\n to consider overflow on all screen sizes. In reusable component libraries,\n this means a developer can't just add the component anywhere on the page,\n because these issues need to be considered and adjusted for every time. With\n Popper, you can place your elements anywhere and they will be positioned\n correctly, without needing to consider different screen sizes, layouts, etc.\n This massively speeds up development time because this work is automatically\n offloaded to Popper.\n- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any\n arbitrary use case you may need to adjust for. Popper is built with\n extensibility in mind.\n\n## Why Popper?\n\nWith the CSS drawbacks out of the way, we now move on to Popper in the\nJavaScript space itself.\n\nNaive JavaScript tooltip implementations usually have the following problems:\n\n- **Scrolling containers**: They don't ensure the tooltip stays with the\
}