{"name":"bubblesets-js","version":"2.3.2","keywords":["bubblesets"],"author":{"url":"https://www.sgratzl.com","name":"Samuel Gratzl","email":"sam@sgratzl.com"},"license":"MIT","_id":"bubblesets-js@2.3.2","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":"56d0bca6a38f9364486b29ce64ef501dc7584147","tarball":"http://registry-npm.ywwl.com/bubblesets-js/download/bubblesets-js-2.3.2.tgz","fileCount":33,"integrity":"sha512-TkofIls7vjYlqgLERl817zi53ig6d/MSCh5XnxR7LAiZkL90prirLZP6QjtwMPRiWTXfCxLih1U/mzDqOlWgkw==","signatures":[{"sig":"MEQCIFQv4iDzoWa+WoQFYHGINQwXt+SqvuYG/piufkPe6izSAiB9QaQ9hWZvyF+EKUH73UiYBnZ02bV3rT4Pkpv9pE/19A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":564593,"size":109320,"noattachment":false,"key":"/bubblesets-js/-/bubblesets-js-2.3.2.tgz"},"main":"build/index.cjs","types":"build/index.d.ts","unpkg":"build/index.umd.min.js","global":"BubbleSets","module":"build/index.js","gitHead":"0ef0267a2207f5d86cb0dd0064efcd2750a77b12","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":"10.2.3","description":"JavaScript implementation of bubble sets by Christopher Collins","directories":{},"resolutions":{"@typescript-eslint/parser":"^6.19.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"sideEffects":false,"_nodeVersion":"20.10.0","browserslist":["Firefox ESR","last 2 Chrome versions","last 2 Firefox versions"],"_hasShrinkwrap":false,"packageManager":"yarn@4.0.2","devDependencies":{"jest":"^29.7.0","tslib":"^2.6.2","eslint":"^8.56.0","rimraf":"^5.0.5","rollup":"^4.9.6","ts-jest":"^29.1.1","typedoc":"^0.25.7","prettier":"^3.2.4","typescript":"^5.3.3","@babel/core":"^7.23.7","@types/jest":"^29.5.11","@yarnpkg/sdks":"^3.1.0","@babel/preset-env":"^7.23.8","rollup-plugin-dts":"^6.1.0","eslint-plugin-react":"^7.33.2","@rollup/plugin-babel":"^6.0.4","eslint-plugin-import":"^2.29.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-replace":"^5.0.5","eslint-config-prettier":"^9.1.0","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-prettier":"^5.1.3","@rollup/plugin-commonjs":"^25.0.7","eslint-config-react-app":"^7.0.1","@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/parser":"^6.19.0","eslint-plugin-react-hooks":"^4.6.0","@rollup/plugin-node-resolve":"^15.2.3","eslint-config-airbnb-typescript":"^17.1.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bubblesets-js_2.3.2_1705872214518_0.5317863855638829","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":1705872214675,"_cnpm_publish_time":1705872214675,"dist-tags":{"latest":"3.0.1"}}