{"_id":"@anthologen/cytoscape-node-html-label","_rev":"1-5ef774c355029fafad78294b92faaaf0","name":"@anthologen/cytoscape-node-html-label","dist-tags":{"latest":"1.2.4"},"versions":{"1.2.3":{"name":"@anthologen/cytoscape-node-html-label","version":"1.2.3","description":"labels for cytoscape nodes","author":{"name":"Kalugin Sergey","email":"kalugin.perm@gmail.com","url":"https://github.com/kaluginserg"},"main":"./dist/cytoscape-node-html-label.js","spm":{"main":"./dist/cytoscape-node-html-label.js"},"scripts":{"test":"gulp test","test-firefox":"TEST_ON_FIREFOX=true gulp test","build":"tsc --declaration && gulp min","lint":"eslint src --ext .ts","start":"tsc --watch --declaration"},"repository":{"type":"git","url":"git+https://github.com/anthologen/cytoscape-node-html-label.git"},"keywords":["cytoscape","cytoscape-extension","cytoscape-labels","cytoscape html label"],"license":"MIT","bugs":{"url":"https://github.com/kaluginserg/cytoscape-node-html-label/issues"},"homepage":"https://github.com/anthologen/cytoscape-node-html-label/tree/updated_deps","devDependencies":{"@types/cytoscape":"^3.19.9","@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1","eslint":"^8.31.0","gulp":"^4.0.2","gulp-bump":"^3.2.0","gulp-git":"^2.10.1","gulp-rename":"^2.0.0","gulp-tag-version":"^1.3.1","gulp-uglify":"^3.0.2","jasmine":"^4.5.0","karma":"^6.4.1","karma-chrome-launcher":"^3.1.1","karma-coverage":"^2.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.1.0","typescript":"^4.9.4"},"peerDependencies":{"@types/cytoscape":"^3.1.0","cytoscape":"^3.0.0"},"peerDependenciesMeta":{"@types/cytoscape":{"optional":true}},"overrides":{"chokidar":"3.5.3","glob-parent":"6.0.2","trim-newlines":"^3.0.1"},"types":"./dist/cytoscape-node-html-label.d.ts","gitHead":"56711be331d75c5d8612cd5b575394cf7efe39ce","_id":"@anthologen/cytoscape-node-html-label@1.2.3","_nodeVersion":"16.13.1","_npmVersion":"9.3.0","dist":{"integrity":"sha512-0b6q3BhyoHAtJFBhdkZRz8qXbuiNMO/TY4fzcIv6SuFE71d/HbqEVlWWdbUr4nH53lOv8UE2VfNVxYudD71zbw==","shasum":"5c73376d96804ace5caaf5f641460fec5c6cd299","tarball":"https://registry.npmjs.org/@anthologen/cytoscape-node-html-label/-/cytoscape-node-html-label-1.2.3.tgz","fileCount":21,"unpackedSize":384317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICosp+rNv5mf7hS56uxrz5LoQofyHMich0D/wuu2dv+3AiEA8du+qWhtxee7XC70Mu+Rj+hcZNz4dJaJqKovXKlCxtM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4HQhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEqA//YRynbl47m4NgfsNvRuLhVCAI0zkmMmzdCVldejfMRDzQh72I\r\nytiwCcFrPCd5xkvXMlqB8PFt4v2pCLaGRlcozfEF0BmsBwtvL2B4pHEyT/i2\r\nu4G5jCgoC25AUA7od36fQqYog1YeYcnx3Sfdq8uqESSM/hSV9tiKwNFnYixA\r\nYGrHxopMoVuOYfH+obtVc7pIE/GkGtRvvNqZWueZ8qnY3+LNVBYEhQQkgZ8i\r\nyQfkTDgZeL+J7IfRNSBwEfnyUxhIe/m7RrZIf55gMVpQe/GqjeAHhrooAqkk\r\ngRxHNGEO0FjXRtKbd8iNtz/KXy9TF6wGY16wJeBUUnTnFC/VcjVebfkuvNkK\r\nPfct40sGD88QPkC+YlKfz5uKObfxglrXqXm1GXyGFExmS8npLmZ7QXA2MOND\r\nATVHlsjFSl45n9YHHZ/u3ic3S0UrtuBU4JB70QjELypCBiWp+/XV9sB4k7LK\r\ntk56zPvY+QtaUbeFYqCSvPXn9QGn6x3i08C5vy8znGnrA20re3/c+aNOdi/R\r\nY/e+3VJyXdy2IFSK7MUdbHNXN71kbJP8ICxzwGHtsNMsM42U6iPyHbUlFf1Q\r\n8ROjgsWATyBNDL4ZsOHWtrO6nqGcO+dWkXnh2ujqxH7P2ddne7Qy32DD5Th/\r\ngPPzRxv+vTo+RWtiYj3LV6f8VcXVUL0dBmg=\r\n=tTRS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anthologen","email":"anthologen@gmail.com"},"directories":{},"maintainers":[{"name":"anthologen","email":"anthologen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-node-html-label_1.2.3_1675654177532_0.8712501132830459"},"_hasShrinkwrap":false},"1.2.4":{"name":"@anthologen/cytoscape-node-html-label","version":"1.2.4","description":"labels for cytoscape nodes","author":{"name":"Kalugin Sergey","email":"kalugin.perm@gmail.com","url":"https://github.com/kaluginserg"},"main":"./dist/cytoscape-node-html-label.js","spm":{"main":"./dist/cytoscape-node-html-label.js"},"scripts":{"test":"gulp test","test-firefox":"TEST_ON_FIREFOX=true gulp test","build":"tsc --declaration && gulp min","lint":"eslint src --ext .ts","start":"tsc --watch --declaration"},"repository":{"type":"git","url":"git+https://github.com/anthologen/cytoscape-node-html-label.git"},"keywords":["cytoscape","cytoscape-extension","cytoscape-labels","cytoscape html label"],"license":"MIT","bugs":{"url":"https://github.com/kaluginserg/cytoscape-node-html-label/issues"},"homepage":"https://github.com/anthologen/cytoscape-node-html-label/tree/export_cy_interface","devDependencies":{"@types/cytoscape":"^3.19.9","@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1","eslint":"^8.31.0","gulp":"^4.0.2","gulp-bump":"^3.2.0","gulp-git":"^2.10.1","gulp-rename":"^2.0.0","gulp-tag-version":"^1.3.1","gulp-uglify":"^3.0.2","jasmine":"^4.5.0","karma":"^6.4.1","karma-chrome-launcher":"^3.1.1","karma-coverage":"^2.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.1.0","typescript":"^4.9.4"},"peerDependencies":{"@types/cytoscape":"^3.1.0","cytoscape":"^3.0.0"},"peerDependenciesMeta":{"@types/cytoscape":{"optional":true}},"overrides":{"chokidar":"3.5.3","glob-parent":"6.0.2","trim-newlines":"^3.0.1"},"types":"./dist/cytoscape-node-html-label.d.ts","gitHead":"195f12372f8fd82c5dc973d51fedcc1267cf2f91","_id":"@anthologen/cytoscape-node-html-label@1.2.4","_nodeVersion":"16.13.1","_npmVersion":"9.6.4","dist":{"integrity":"sha512-XX9fh6uyO0UzmNFpUkQ2t4JupQ4QhLPRBVDt7SqYycK6WGV+CNHK3t3TnKbhYjd/olP12fRL0KvjZGQSRKGOWg==","shasum":"9d2326d46d5f2cf2e958d99a67d9da78a2a6b4b3","tarball":"https://registry.npmjs.org/@anthologen/cytoscape-node-html-label/-/cytoscape-node-html-label-1.2.4.tgz","fileCount":21,"unpackedSize":384496,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHD9EjhCnrtWOugTAvDCPW0uZSPs3IoJW+Oxb2ijKNqxAiA5RtUQu0j422b8Em+4V04li8SMH9FOC/l8BWpBTwG2xg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVI/2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZNA//YWbTZhCCpAKHC00P+lXWWbQrswixRLaqSxzAq6ZiZkCOD5eb\r\nmnXBsSvxEupqaQDWJHVRHokOqSo6e8t7/62QkXhuufdzSB5QTEyEcMF4z9o4\r\nccSfMkf5jP8tvM7/0R7sziDxCyetat7moag2ujNSERu1YOQBgWDoLOJBjjVG\r\nUX5sJDYTtVgWW1xta76rGQGmUhLjut6otqwCfpk2fB5Y6rL4/WFIt1F6rfN+\r\ngbFnxI4mubJcMBFM/comOcISJl8oeNoFkc/ESFVZR+F7A7uw1T4f9QIOTK9K\r\n9BBExvpCe/lfbWFwiKJU6Jchs0SBe8bQcZbEN2M9vZpFqBU+8kwJZ0dBVBCh\r\nW3UNaNCbX4F6rnGi4Ymg7aPGvcSXfH9QD7dkn80CAMkdCQ9TRrC9mYG1qHXF\r\nNT93G1kqRw5TBObE9HHWRFk2bKqtNGlKjGnaRjdVvOevMArPHp8fpIXLQ+6d\r\nse4a3mFzGUPHoxHFSyKZwToDxBI0RenZAk1qeu/EJp5QAwqM25cY413KJJMf\r\nlRz1aTeOm8ZUXP1R4IMwBhb4vrTT8ahdowz0TYdwNBFPjp+bpF4uFoiPM6d8\r\n2qy6jnPhWd7d3XHVJT2TXWiv1ypSin66j6OpnEYOGyjgCLph78BcUeB7K379\r\naWBVAhMpr0PZZSe1qMOBz3oAdG+fTcyUiE4=\r\n=pRj0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anthologen","email":"anthologen@gmail.com"},"directories":{},"maintainers":[{"name":"anthologen","email":"anthologen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-node-html-label_1.2.4_1683263478239_0.3473724287572939"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-06T03:29:37.460Z","1.2.3":"2023-02-06T03:29:37.781Z","modified":"2023-05-05T05:11:18.663Z","1.2.4":"2023-05-05T05:11:18.498Z"},"maintainers":[{"name":"anthologen","email":"anthologen@gmail.com"}],"description":"labels for cytoscape nodes","homepage":"https://github.com/anthologen/cytoscape-node-html-label/tree/export_cy_interface","keywords":["cytoscape","cytoscape-extension","cytoscape-labels","cytoscape html label"],"repository":{"type":"git","url":"git+https://github.com/anthologen/cytoscape-node-html-label.git"},"author":{"name":"Kalugin Sergey","email":"kalugin.perm@gmail.com","url":"https://github.com/kaluginserg"},"bugs":{"url":"https://github.com/kaluginserg/cytoscape-node-html-label/issues"},"license":"MIT","readme":"cytoscape-node-html-label\n================================================================================\n\n## About\n\nThis is a [cytoscape-node-html-label](https://github.com/kaluginserg/cytoscape-node-html-label) fork with dependencies updated to address security vulnerabilities.\nThis branch also exports the CytoscapeNodeHtmlParams interface to [work around an import error](https://github.com/kaluginserg/cytoscape-node-html-label/issues/31).\n\n## Description\n\nThis extension provides ability to add labels for Cytoscape nodes. Simple example:\n\n`cyInstance.nodeHtmlLabel( [{ tpl: d => '<div>' + d + '</div>' }] );`\n\nDemo: https://kaluginserg.github.io/cytoscape-node-html-label/\n\n## Features\n- optimized for high performance with high number of nodes, for smooth panning and zooming.\n- customizable labels with different templates.\n\n## Dependencies\n\n * Cytoscape.js ^3.0.0\n\n\n## Usage instructions\n\nDownload the library:\n * via npm: `npm install cytoscape-node-html-label`,\n * via bower: `bower install cytoscape-node-html-label`, or\n * via direct download from the repository (probably from a tag).\n\n#### Plain HTML/JS has extension registered for you automatically:\n```html\n<script src=\"http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js\"></script>\n<script src=\"cytoscape-node-html-label.js\"></script>\n```\n\n#### RequireJs approach:\n`require()` the library as appropriate for your project:\n\nCommonJS:\n```js\nvar cytoscape = require('cytoscape');\nvar nodeHtmlLabel = require('cytoscape-node-html-label');\nnodeHtmlLabel( cytoscape ); // register extension\n```\n\nAMD:\n```js\nrequire(['cytoscape', 'cytoscape-node-html-label'], function( cytoscape, nodeHtmlLabel ){\n  nodeHtmlLabel( cytoscape ); // register extension\n});\n```\n\n\n## API\n\n`nodeHtmlLabel` parameter is an array of options:\n\n```js\ncyInstance.nodeHtmlLabel([\n  {\n    query: 'node', // cytoscape query selector\n    halign: 'center', // title vertical position. Can be 'left',''center, 'right'\n    valign: 'center', // title vertical position. Can be 'top',''center, 'bottom'\n    halignBox: 'center', // title vertical position. Can be 'left',''center, 'right'\n    valignBox: 'center', // title relative box vertical position. Can be 'top',''center, 'bottom'\n    cssClass: '', // any classes will be as attribute of <div> container for every title\n    tpl(data) {\n      return '<span>' + data + '</span>'; // your html template here\n    }\n  }\n]);\n```\n\nTo make links clickable inside your labels, you need to pass `enablePointerEvents: true` as the 3rd argument to `nodeHtmlLabel`:\n\n```js\ncyInstance.nodeHtmlLabel([\n  {\n    ...\n  }\n], {\n  enablePointerEvents: true\n});\n```\n\n## Usage example\n\nCode example:\n```js\n// create Cy instance\nvar cyInstance = cytoscape({\n    container: document.getElementById('cy'),\n    layout: {\n        name: 'random'\n    },\n    elements: [ // your cy elements\n        { group: \"nodes\", data: { id: 'a1', name: 'a10' }, classes: 'l1' },\n        { group: \"nodes\", data: { id: 'a1', name: 'a10' }, classes: 'l1' },\n        { group: \"nodes\", data: { id: 'a1', name: 'a10' }, classes: 'l1' },\n        { group: \"nodes\", data: { id: 'a5', name: 'a5' }, classes: 'l2' }\n    ]\n});\n\n// set nodeHtmlLabel for your Cy instance\ncyInstance.nodeHtmlLabel([{\n        query: '.l1',\n        valign: \"top\",\n        halign: \"left\",\n        valignBox: \"top\",\n        halignBox: \"left\",\n        tpl: function(data) {\n            return '<p class=\"cy-title__p1\">' + data.id + '</p>' + '<p  class=\"cy-title__p2\">' + data.name + '</p>';\n        }\n    },\n    {\n        query: '.l2',\n        tpl: function(data) {\n            return '<p class=\"cy-title__p1\">' + data.id + '</p>' + '<p  class=\"cy-title__p2\">' + data.name + '</p>';\n        }\n    }\n]);\n```\n\nDemo here: https://kaluginserg.github.io/cytoscape-node-html-label/\n\n\n## How to build and develop:\n1) Run `npm start`\n1) Create change in src/cytoscape-node-html-label.ts\n1) When finished => `npm run test`\n1) Prepare js and min files: `npm run build`\n1) `git commit`\n\nThen, for version update and publish:\n1) Create new npm version: `gulp patch`, `gulp feature` or `gulp release`\n1) `npm publish`\n","readmeFilename":"README.md"}