{"_id":"@bernie_signagent/konva","_rev":"3-272e65800ef6d928d57e180ff4477385","name":"@bernie_signagent/konva","dist-tags":{"latest":"0.99.0"},"versions":{"0.99.0":{"name":"@bernie_signagent/konva","version":"0.99.0","keywords":["canvas","animations","graphic","html5"],"author":{"name":"Anton Lavrenov, Bernie Blakeney"},"license":"MIT","_id":"@bernie_signagent/konva@0.99.0","maintainers":[{"name":"bernie_signagent","email":"bernie@signagent.com"}],"homepage":"http://konvajs.org/","bugs":{"url":"https://github.com/konvajs/konva/issues"},"dist":{"shasum":"b59494c61c6109f18f3612917edcc3dcc24c7c1a","tarball":"https://registry.npmjs.org/@bernie_signagent/konva/-/konva-0.99.0.tgz","fileCount":132,"integrity":"sha512-xtGtPTLQV6O51DraBeSxGD4+naZ7FMQMD+Xeay0loUCLvO0iLGUMN2IU/IrNcF2M03JpsHVl3twvLrMMigwnwQ==","signatures":[{"sig":"MEQCIFmRc7o2pVntI50wPJVL5qOCK+ZHGdL7tWyHZobiRakkAiA834PfKvODSxQptFnEHf2DiZ4Pe4aYVImFOUcC1lNMLQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1481695},"main":"./lib/index-node.js","browser":"./lib/index.js","funding":[{"url":"https://www.patreon.com/lavrton","type":"patreon"},{"url":"https://opencollective.com/konva","type":"opencollective"},{"url":"https://github.com/sponsors/lavrton","type":"github"}],"gitHead":"2155715a2077c389676675d585a4f3dfc98b6adf","scripts":{"tsc":"tsc --removeComments","size":"size-limit","test":"npm run test:browser && npm run test:node","build":"npm run compile && cp ./src/index-types.d.ts ./lib && gulp build && node ./rename-imports.mjs","clean":"rm -rf ./lib && rm -rf ./types && rm -rf ./cmj && rm -rf ./test-build","start":"npm run test:watch","watch":"rollup -c -w","rollup":"rollup -c --bundleConfigAsCjs","compile":"npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup","test:node":"npm run test:node:compiled","test:build":"PARCEL_WORKER_BACKEND=process parcel build ./test/unit-tests.html --dist-dir ./test-build --target none --public-url ./ --no-source-maps","test:watch":"rm -rf ./.parcel-cache && PARCEL_WORKERS=0  parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html ./test/text-paths.html ./test/bunnies.html","test:import":"npm run build  && node ./test/import-test.cjs && node ./test/import-test.mjs","test:browser":"npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security -a no-sandbox -a disable-setuid-sandbox","test:node:compiled":"rm -rf ./.test-temp && mkdir ./.test-temp && (tsc -p ./test/tsconfig.json --outDir ./.test-temp || true) && mocha './.test-temp/test/unit/**/*.js' -r ./test/node-global-setup.mjs --exit && rm -rf ./.test-temp && npm run test:import"},"targets":{"none":{}},"typings":"./lib/index-types.d.ts","_npmUser":{"name":"bernie_signagent","email":"bernie@signagent.com"},"prettier":{"singleQuote":true},"repository":{"url":"git://github.com/konvajs/konva.git","type":"git"},"size-limit":[{"path":"./lib/index.js","limit":"45 KB"},{"path":"./lib/Core.js","limit":"26 KB"},{"path":"./konva.min.js"}],"_npmVersion":"10.2.0","description":"SignAgent's HTML5 2d canvas library.","directories":{},"_nodeVersion":"21.1.0","_hasShrinkwrap":false,"devDependencies":{"chai":"5.1.2","gulp":"^5.0.0","mocha":"10.2.0","canvas":"^3.1.0","parcel":"2.13.3","rollup":"^4.31.0","process":"^0.11.10","ts-node":"^10.9.2","ts-mocha":"^10.0.0","filehound":"^1.17.6","gulp-exec":"^5.0.0","gulp-util":"^3.0.8","size-limit":"^11.1.6","typescript":"^5.7.3","gulp-concat":"^2.6.1","gulp-jsdoc3":"^3.0.0","gulp-rename":"^2.0.0","gulp-uglify":"^3.0.2","@types/mocha":"^10.0.10","gulp-connect":"^5.7.0","gulp-replace":"^1.1.4","gulp-uglify-es":"^3.0.0","gulp-typescript":"^5.0.1","mocha-headless-chrome":"^4.0.0","@parcel/transformer-image":"2.13.2","rollup-plugin-typescript2":"^0.36.0","@size-limit/preset-big-lib":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/konva_0.99.0_1753118333435_0.7394527993647968","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-07-21T17:18:53.434Z","modified":"2025-12-01T12:01:46.776Z","0.99.0":"2025-07-21T17:18:53.622Z"},"bugs":{"url":"https://github.com/konvajs/konva/issues"},"author":{"name":"Anton Lavrenov, Bernie Blakeney"},"license":"MIT","homepage":"http://konvajs.org/","keywords":["canvas","animations","graphic","html5"],"repository":{"url":"git://github.com/konvajs/konva.git","type":"git"},"description":"SignAgent's HTML5 2d canvas library.","maintainers":[{"email":"bernie@signagent.com","name":"signagent_bernie"}],"readme":"<p align=\"center\">\n  <img src=\"https://konvajs.org/android-chrome-192x192.png\" alt=\"Konva logo\" height=\"180\" />\n</p>\n\n<h1 align=\"center\">Konva</h1>\n\n[![Financial Contributors on Open Collective](https://opencollective.com/konva/all/badge.svg?label=financial+contributors)](https://opencollective.com/konva)\n[![npm version](https://badge.fury.io/js/konva.svg)](http://badge.fury.io/js/konva)\n[![Build Status](https://github.com/konvajs/konva/actions/workflows/test-browser.yml/badge.svg)](https://github.com/konvajs/konva/actions/workflows/test-browser.ym)\n[![Build Status](https://github.com/konvajs/konva/actions/workflows/test-node.yml/badge.svg)](https://github.com/konvajs/konva/actions/workflows/test-node.ym)[![CDNJS version](https://img.shields.io/cdnjs/v/konva.svg)](https://cdnjs.com/libraries/konva)\n\nKonva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.\n\nYou can draw things onto the stage, add event listeners to them, move them, scale them, and rotate them independently from other shapes to support high performance animations, even if your application uses thousands of shapes. Served hot with a side of awesomeness.\n\nThis repository began as a GitHub fork of [ericdrowell/KineticJS](https://github.com/ericdrowell/KineticJS).\n\n- **Visit:** The [Home Page](http://konvajs.org/) and follow on [Twitter](https://twitter.com/lavrton)\n- **Discover:** [Tutorials](http://konvajs.org/docs/index.html), [API Documentation](http://konvajs.org/api/Konva.html)\n- **Help:** [StackOverflow](http://stackoverflow.com/questions/tagged/konvajs), [Discord Chat](https://discord.gg/8FqZwVT)\n\n# Quick Look\n\n```html\n<script src=\"https://unpkg.com/konva@9/konva.min.js\"></script>\n<div id=\"container\"></div>\n<script>\n  var stage = new Konva.Stage({\n    container: 'container',\n    width: window.innerWidth,\n    height: window.innerHeight,\n  });\n\n  // add canvas element\n  var layer = new Konva.Layer();\n  stage.add(layer);\n\n  // create shape\n  var box = new Konva.Rect({\n    x: 50,\n    y: 50,\n    width: 100,\n    height: 50,\n    fill: '#00D2FF',\n    stroke: 'black',\n    strokeWidth: 4,\n    draggable: true,\n  });\n  layer.add(box);\n\n  // add cursor styling\n  box.on('mouseover', function () {\n    document.body.style.cursor = 'pointer';\n  });\n  box.on('mouseout', function () {\n    document.body.style.cursor = 'default';\n  });\n</script>\n```\n\n# Browsers support\n\nKonva works in all modern mobile and desktop browsers. A browser need to be capable to run javascript code from ES2015 spec. For older browsers you may need polyfills for missing functions.\n\nAt the current moment `Konva` doesn't work in IE11 directly. To make it work you just need to provide some polyfills such as `Array.prototype.find`, `String.prototype.trimLeft`, `String.prototype.trimRight`, `Array.from`.\n\n# Debugging\n\nThe Chrome inspector simply shows the canvas element.  To see the Konva objects and their details, install the konva-dev extension at https://github.com/konvajs/konva-devtool.\n\n# Loading and installing Konva\n\nKonva supports UMD loading. So you can use all possible variants to load the framework into your project:\n\n### Load Konva via classical `<script>` tag from CDN:\n\n```html\n<script src=\"https://unpkg.com/konva@9/konva.min.js\"></script>\n```\n\n### Install with npm:\n\n```bash\nnpm install konva --save\n```\n\n```javascript\n// The modern way (e.g. an ES6-style import for webpack, parcel)\nimport Konva from 'konva';\n```\n\n#### Typescript usage\n\nAdd DOM definitions into your `tsconfig.json`:\n\n```\n{\n  \"compilerOptions\": {\n    \"lib\": [\n        \"es6\",\n        \"dom\"\n    ]\n  }\n}\n```\n\n### 3 Minimal bundle\n\n```javascript\nimport Konva from 'konva/lib/Core';\n// Now you have a Konva object with Stage, Layer, FastLayer, Group, Shape and some additional utils function.\n// Also core currently already have support for drag&drop and animations.\n// BUT there are no shapes (rect, circle, etc), no filters.\n\n// but you can simply add anything you need:\nimport { Rect } from 'konva/lib/shapes/Rect';\n// importing a shape will automatically inject it into Konva object\n\nvar rect1 = new Rect();\n// or:\nvar shape = new Konva.Rect();\n\n// for filters you can use this:\nimport { Blur } from 'konva/lib/filters/Blur';\n```\n\n### 4 NodeJS env\n\nIn order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.\n\n```bash\nnpm install konva canvas\n```\n\nThen you can use the same Konva API and all Konva demos will work just fine. You just don't need to use `container` attribute in your stage.\n\n```js\nimport Konva from 'konva';\n\nconst stage = new Konva.Stage({\n  width: 500,\n  height: 500,\n});\n// then all regular Konva code will work\n```\n\n# Backers\n\n![https://simpleshow.com](https://avatars.githubusercontent.com/u/99720652?s=200&v=4 'https://simpleshow.com')\n![https://www.notably.ai/](https://avatars.githubusercontent.com/u/80046841?s=200&v=4 'https://www.notably.ai/')\n\n- [myposter GmbH](https://www.myposter.de/)\n- [queue.gg](https://queue.gg/)\n\n# Change log\n\nSee [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md).\n\n## Building the Konva Framework\n\nTo make a full build run `npm run build`. The command will compile all typescript files, combine then into one bundle and run minifier.\n\n## Testing\n\nKonva uses Mocha for testing.\n\n- If you need run test only one time run `npm run test`.\n- While developing it is easy to use `npm start`. Just run it and go to [http://localhost:1234/unit-tests.html](http://localhost:1234/unit-tests.html). The watcher will rebuild the bundle on any change.\n\nKonva is covered with hundreds of tests and well over a thousand assertions.\nKonva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test.\n\n## Generate documentation\n\nRun `npx gulp api` which will build the documentation files and place them in the `api` folder.\n\n# Pull Requests\n\nI'd be happy to review any pull requests that may better the Konva project,\nin particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the tests pass (`npm run test`).\n\n## Contributors\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/konva/contribute)]\n\n#### Individuals\n\n<a href=\"https://opencollective.com/konva\"><img src=\"https://opencollective.com/konva/individuals.svg?width=890\"></a>\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/konva/contribute)]\n\n<a href=\"https://opencollective.com/konva/organization/0/website\"><img src=\"https://opencollective.com/konva/organization/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/1/website\"><img src=\"https://opencollective.com/konva/organization/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/2/website\"><img src=\"https://opencollective.com/konva/organization/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/3/website\"><img src=\"https://opencollective.com/konva/organization/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/4/website\"><img src=\"https://opencollective.com/konva/organization/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/5/website\"><img src=\"https://opencollective.com/konva/organization/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/6/website\"><img src=\"https://opencollective.com/konva/organization/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/7/website\"><img src=\"https://opencollective.com/konva/organization/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/8/website\"><img src=\"https://opencollective.com/konva/organization/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/konva/organization/9/website\"><img src=\"https://opencollective.com/konva/organization/9/avatar.svg\"></a>\n","readmeFilename":"README.md"}