{"name":"bubblesets-js","description":"JavaScript implementation of bubble sets by Christopher Collins","version":"2.3.3","author":{"name":"Samuel Gratzl","email":"sam@sgratzl.com","url":"https://www.sgratzl.com"},"license":"MIT","homepage":"https://github.com/upsetjs/bubblesets-js","bugs":{"url":"https://github.com/upsetjs/bubblesets-js/issues"},"keywords":["bubblesets"],"repository":{"type":"git","url":"git+https://github.com/upsetjs/bubblesets-js.git"},"global":"BubbleSets","browserslist":["Firefox ESR","last 2 Chrome versions","last 2 Firefox versions"],"module":"build/index.js","main":"build/index.cjs","require":"build/index.cjs","umd":"build/index.umd.js","unpkg":"build/index.umd.min.js","jsdelivr":"build/index.umd.min.js","types":"build/index.d.ts","sideEffects":false,"devDependencies":{"@babel/core":"^7.24.7","@babel/preset-env":"^7.24.7","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.7","@rollup/plugin-typescript":"^11.1.6","@types/jest":"^29.5.12","@typescript-eslint/eslint-plugin":"^7.12.0","@typescript-eslint/parser":"^7.12.0","@yarnpkg/sdks":"^3.1.2","eslint":"^8.57.0","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.1.0","eslint-config-react-app":"^7.0.1","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-react":"^7.34.2","eslint-plugin-react-hooks":"^4.6.2","jest":"^29.7.0","prettier":"^3.3.1","rimraf":"^5.0.7","rollup":"^4.18.0","rollup-plugin-dts":"^6.1.1","rollup-plugin-terser":"^7.0.2","ts-jest":"^29.1.4","tslib":"^2.6.3","typedoc":"^0.25.13","typescript":"^5.4.5"},"resolutions":{"@typescript-eslint/eslint-plugin":"^6.19.0","@typescript-eslint/parser":"^6.19.0"},"scripts":{"clean":"rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\" \"samples/*.js\" \"samples/*.map\"","compile":"tsc -b tsconfig.c.json","start":"yarn run watch","watch":"rollup -c -w","build":"rollup -c","test":"yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit","test:watch":"yarn run test --watch","test:coverage":"yarn run test --coverage","lint":"yarn run eslint && yarn run prettier","fix":"yarn run eslint:fix && yarn run prettier:write","prettier:write":"prettier \"*\" \"*/**\" --write","prettier":"prettier \"*\" \"*/**\" --check","eslint":"eslint src --ext .ts,.tsx","eslint:fix":"yarn run eslint --fix","docs":"typedoc src/index.ts","prepare":"yarn run build"},"packageManager":"yarn@4.2.2","_id":"bubblesets-js@2.3.3","gitHead":"015fc25bd40ce2ea5ac68019aa023850e21fb208","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-7++8/mcahpmJyIGY+YSPG5o2FnTIeNgVx17eoFyEjzcTblpcMd8SSUtt67MlKYlj8mIh9/aYpY+1GvPoy6pViQ==","shasum":"e94e05cdc10bf9508084876d71b9339d29c57ffb","tarball":"http://registry-npm.ywwl.com/bubblesets-js/download/bubblesets-js-2.3.3.tgz","fileCount":33,"unpackedSize":564657,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDu80NUpV7gIScKlyGn9mYyrrnhWS9t4bobjT5xYBLwJAiA8RB8U51tRRD67dSdkRX5PC5+cJFFi+p1M36AqoZpbog=="}],"size":109381,"noattachment":false,"key":"/bubblesets-js/-/bubblesets-js-2.3.3.tgz"},"_npmUser":{"name":"sgratzl","email":"sam@sgratzl.com"},"directories":{},"maintainers":[{"name":"sgratzl","email":"sam@sgratzl.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bubblesets-js_2.3.3_1717890110930_0.6382049851338691"},"_hasShrinkwrap":false,"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":1717890111154,"_cnpm_publish_time":1717890111154,"dist-tags":{"latest":"3.0.1"}}