{"name":"bubblesets-js","version":"2.3.1","keywords":["bubblesets"],"author":{"url":"https://www.sgratzl.com","name":"Samuel Gratzl","email":"sam@sgratzl.com"},"license":"MIT","_id":"bubblesets-js@2.3.1","maintainers":[{"name":"sgratzl","email":"sam@sgratzl.com"}],"homepage":"https://github.com/upsetjs/bubblesets-js","bugs":{"url":"https://github.com/upsetjs/bubblesets-js/issues"},"umd":"build/index.umd.js","dist":{"shasum":"5a11ef2bf8176f14855ca214181c3883ed1fb47e","tarball":"http://registry-npm.ywwl.com/bubblesets-js/download/bubblesets-js-2.3.1.tgz","fileCount":33,"integrity":"sha512-YZ/SkawZbVM1DFsWzos4/l4FGsKOe99hJc4ITnvkblb9DqlBGtebCeMz/yFIjD3kGLSQEGQTRPeZ1JsFdxsKVg==","signatures":[{"sig":"MEUCICp0dczABp2nDbVBZeHl3iioqmg9r+Gq3yBry6m+NQfDAiEAuPhS/wLYF2usEd6o4AeoaPfrWrdDomWTSPecwY6ngKc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":567024,"size":110780,"noattachment":false,"key":"/bubblesets-js/-/bubblesets-js-2.3.1.tgz"},"main":"build/index.cjs","types":"build/index.d.ts","unpkg":"build/index.umd.min.js","global":"BubbleSets","module":"build/index.js","gitHead":"03c9b60ec1c676643039720b40a984e142f9afb9","require":"build/index.cjs","scripts":{"fix":"yarn run eslint:fix && yarn run prettier:write","docs":"typedoc src/index.ts","lint":"yarn run eslint && yarn run prettier","test":"jest --passWithNoTests","build":"rollup -c","clean":"rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\" \"samples/*.js\" \"samples/*.map\"","start":"yarn run watch","watch":"rollup -c -w","eslint":"eslint src --ext .ts,.tsx","compile":"tsc -b tsconfig.c.json","prepare":"yarn run build","prettier":"prettier \"*\" \"*/**\" --check","eslint:fix":"yarn run eslint --fix","test:watch":"jest --passWithNoTests --watch","test:coverage":"jest --passWithNoTests --coverage","prettier:write":"prettier \"*\" \"*/**\" --write"},"_npmUser":{"name":"sgratzl","email":"sam@sgratzl.com"},"jsdelivr":"build/index.umd.min.js","repository":{"url":"git+https://github.com/upsetjs/bubblesets-js.git","type":"git"},"_npmVersion":"6.14.18","description":"JavaScript implementation of bubble sets by Christopher Collins","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","browserslist":["Firefox ESR","last 2 Chrome versions","last 2 Firefox versions"],"_hasShrinkwrap":false,"packageManager":"yarn@3.2.4","devDependencies":{"jest":"^29.3.1","tslib":"^2.4.1","eslint":"^8.27.0","rimraf":"^3.0.2","rollup":"^3.2.5","ts-jest":"^29.0.3","typedoc":"^0.23.20","prettier":"^2.7.1","typescript":"^4.8.4","@babel/core":"^7.20.2","@types/jest":"^29.2.2","@yarnpkg/sdks":"^2.6.3","@babel/preset-env":"^7.20.2","rollup-plugin-dts":"^5.0.0","eslint-plugin-react":"^7.31.10","@rollup/plugin-babel":"^6.0.2","eslint-plugin-import":"^2.26.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^5.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-jsx-a11y":"^6.6.1","eslint-plugin-prettier":"^4.2.1","@rollup/plugin-commonjs":"^23.0.2","eslint-config-react-app":"^7.0.1","@rollup/plugin-typescript":"^9.0.2","@typescript-eslint/parser":"^5.42.1","eslint-plugin-react-hooks":"^4.6.0","@rollup/plugin-node-resolve":"^15.0.1","eslint-config-airbnb-typescript":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.42.1"},"_npmOperationalInternal":{"tmp":"tmp/bubblesets-js_2.3.1_1705860901240_0.24180598782179974","host":"s3://npm-registry-packages"},"readme":"# BubbleSets for JavaScript\n\n[![NPM Package][npm-image]][npm-url] [![Github Actions][github-actions-image]][github-actions-url]\n\nFork of http://github.com/josuakrause/bubblesets-js/ - a JavaScript implementation of Christopher Collins' [bubble sets](http://vialab.science.uoit.ca/portfolio/bubblesets) without the use of external libraries.\nA Java implementation can be found [here](https://github.com/JosuaKrause/Bubble-Sets).\n\nA [Cytoscape](https://js.cytoscape.org/#extensions/ui-extensions) plugin is located at [Cytoscape.js-Bubblesets](https://github.com/upsetjs/cytoscape.js-bubblesets).\n\n![bubblesets](https://user-images.githubusercontent.com/4129778/83879077-60607800-a73d-11ea-9d1d-4f76752280ee.png)\n\n## Install\n\n```sh\nnpm install --save bubblesets-js\n```\n\n## Usage\n\n```js\nconst bubbleSets = new BubbleSets.BubbleSets();\nbubbleSets.pushMember(BubbleSets.rect(30, 30, 50, 20));\nbubbleSets.pushMember(BubbleSets.rect(200, 100, 50, 20));\nbubbleSets.pushMember(BubbleSets.circle(240, 40, 10));\n\nconst pointPath = bubbleSets.compute();\nconst cleanPath = pointPath.sample(8).simplify(0).bSplines().simplify(0);\n\nconst canvas = document.createElement('canvas');\ncanvas.width = 400;\ncanvas.height = 200;\ndocument.body.appendChild(canvas);\nconst ctx = canvas.getContext('2d');\n\n// svg path\n//const path = document.createElement('path');\n//path.setAttribute('d', cleanPath.toString());\n\n// canvas\nctx.beginPath();\ncleanPath.draw(ctx);\nctx.strokeStyle = 'black';\nctx.fillStyle = 'rgba(0,0,255,0.2)';\nctx.fill();\nctx.stroke();\n\nctx.beginPath();\nbubbleSets.drawMembers(ctx);\nctx.fillStyle = 'steelblue';\nctx.fill();\n```\n\n![sample](https://user-images.githubusercontent.com/4129778/83879033-52aaf280-a73d-11ea-9a19-d803718fec17.png)\n\nsee [Samples](https://github.com/upsetjs/bubblesets-js/tree/master/samples) on Github\n\nor at this [![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/MWKYRWo)\n\n## Development Environment\n\n```sh\nnpm i -g yarn\nyarn set version latest\ncat .yarnrc_patch.yml >> .yarnrc.yml\nyarn\nyarn pnpify --sdk vscode\n```\n\n### Common commands\n\n```sh\nyarn compile\nyarn test\nyarn lint\nyarn fix\nyarn build\nyarn docs\nyarn release\nyarn release:pre\n```\n\n[npm-image]: https://badge.fury.io/js/bubblesets-js.svg\n[npm-url]: https://npmjs.org/package/bubblesets-js\n[github-actions-image]: https://github.com/upsetjs/bubblesets-js/workflows/ci/badge.svg\n[github-actions-url]: https://github.com/upsetjs/bubblesets-js/actions\n[codepen]: https://img.shields.io/badge/CodePen-open-blue?logo=codepen\n","publish_time":1705860901422,"_cnpm_publish_time":1705860901422,"dist-tags":{"latest":"3.0.1"}}