{"_id":"@ankipro/react-native-canvas-view","_rev":"2-46b4e984e4d6b4f176b96c0b712d2e80","name":"@ankipro/react-native-canvas-view","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ankipro/react-native-canvas-view","version":"1.0.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/AnkiPro","name":"AnkiPro"},"license":"MIT","_id":"@ankipro/react-native-canvas-view@1.0.0","maintainers":[{"name":"ankipro","email":"danil@ankipro.net"}],"homepage":"https://github.com/AnkiPro/react-native-canvas-view#readme","bugs":{"url":"https://github.com/AnkiPro/react-native-canvas-view/issues"},"dist":{"shasum":"779079182750163919d6af2f628e98726eb8445d","tarball":"https://registry.npmjs.org/@ankipro/react-native-canvas-view/-/react-native-canvas-view-1.0.0.tgz","fileCount":29,"integrity":"sha512-otPTdHdLynRDdXSAFPaRCKizCJ4pcTpeW/ZFvfCg8kY33Wocna3IyQMZpNrE8s/5pG8WnI1Bc1J1oZi8co0ONg==","signatures":[{"sig":"MEUCIA0cWB+vwJjDqYT235UiYMaxCb0rHlQi0j8kyE0CsvESAiEAj6yrE0gdJ7sXSVqH7bc6DEj5+8lhYzQtUnXIDHZCC+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30334},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/src/index.d.ts","module":"lib/module/index","source":"src/index","engines":{"node":">= 18.0.0"},"gitHead":"2658ec284139fce07fc3fa6c37d0152a757751a8","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","example":"yarn workspace @ankipro/react-native-canvas-view-example","prepare":"bob build","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ankipro","email":"danil@ankipro.net"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/AnkiPro/react-native-canvas-view.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.2.4","description":"React Native canvas drawing view for iOS","directories":{},"resolutions":{"@types/react":"17.0.21"},"_nodeVersion":"21.3.0","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^28.1.1","react":"18.2.0","turbo":"^1.10.7","eslint":"^8.4.1","del-cli":"^5.0.0","prettier":"^2.0.5","commitlint":"^17.0.2","release-it":"^15.0.0","typescript":"^5.0.2","@types/jest":"^28.1.2","pod-install":"^0.1.0","@types/react":"~17.0.21","react-native":"0.73.1","@types/react-native":"0.70.0","@evilmartians/lefthook":"^1.5.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","react-native-builder-bob":"^0.20.0","@react-native/eslint-config":"^0.72.2","@commitlint/config-conventional":"^17.0.2","@release-it/conventional-changelog":"^5.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-canvas-view_1.0.0_1704968597283_0.3893400206752573","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"1.0.1":{"name":"@ankipro/react-native-canvas-view","version":"1.0.1","description":"React Native canvas drawing view for iOS","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/src/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"example":"yarn workspace @ankipro/react-native-canvas-view-example","test":"jest","typecheck":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","prepare":"bob build","release":"release-it"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/AnkiPro/react-native-canvas-view.git"},"author":{"name":"AnkiPro","url":"https://github.com/AnkiPro"},"license":"MIT","bugs":{"url":"https://github.com/AnkiPro/react-native-canvas-view/issues"},"homepage":"https://github.com/AnkiPro/react-native-canvas-view#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"17.0.2","@evilmartians/lefthook":"1.5.0","@react-native/eslint-config":"0.72.2","@release-it/conventional-changelog":"5.0.0","@types/jest":"28.1.2","@types/react":"17.0.21","@types/react-native":"0.70.0","commitlint":"17.0.2","del-cli":"5.0.0","eslint":"8.4.1","eslint-config-prettier":"8.5.0","eslint-plugin-prettier":"4.0.0","jest":"28.1.1","pod-install":"0.1.0","prettier":"2.0.5","react":"18.2.0","react-native":"0.73.1","react-native-builder-bob":"0.20.0","release-it":"15.0.0","turbo":"1.13.3","typescript":"5.0.2"},"resolutions":{"@types/react":"17.0.21"},"peerDependencies":{"react":"*","react-native":"*"},"workspaces":["example"],"packageManager":"yarn@3.6.1","engines":{"node":">= 18.0.0"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"_id":"@ankipro/react-native-canvas-view@1.0.1","gitHead":"d3d1a75127d7ee8aa365c1026748d6b9acf6a2d3","_nodeVersion":"23.6.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-u57Z2X3vkQz+P8psCJCJxcNnsIduNtuHva+yOLUa1XtfU8/3PudMCrWG+pbn6Sw4OYSCAX3VsIkEEm2lNozYZQ==","shasum":"b1a85526cf04c1e9c89e8b258e4d68c7556706b0","tarball":"https://registry.npmjs.org/@ankipro/react-native-canvas-view/-/react-native-canvas-view-1.0.1.tgz","fileCount":29,"unpackedSize":31053,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC94Xbhk/mmLOEXhEzfU/sEPpfY+XZqWLPiK+/h2yNPRgIhALUGh9l379utQI9FzdWMSB+Elsw6RzP66bPJknOw7eoz"}]},"_npmUser":{"name":"ankipro","email":"danil@ankipro.net"},"directories":{},"maintainers":[{"name":"ankipro","email":"danil@ankipro.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-canvas-view_1.0.1_1769528142537_0.542933504844771"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-11T10:23:17.175Z","modified":"2026-01-27T15:35:42.799Z","1.0.0":"2024-01-11T10:23:17.415Z","1.0.1":"2026-01-27T15:35:42.691Z"},"bugs":{"url":"https://github.com/AnkiPro/react-native-canvas-view/issues"},"author":{"name":"AnkiPro","url":"https://github.com/AnkiPro"},"license":"MIT","homepage":"https://github.com/AnkiPro/react-native-canvas-view#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/AnkiPro/react-native-canvas-view.git"},"description":"React Native canvas drawing view for iOS","maintainers":[{"name":"ankipro","email":"danil@ankipro.net"}],"readme":"# @ankipro/react-native-canvas-view\n\nReact Native library for drawing on iOS, leveraging the power of [Apple PencilKit](https://developer.apple.com/documentation/pencilkit) to provide a seamless and immersive canvas drawing experience. Ideal for applications that require precise and natural drawing capabilities.\n\n## Key Features:\n- `Versatile Drawing Tools`: Choose from a variety of drawing tools, including brushes, pencils, erasers, and more.\n- `Customizable Brushes`: Customizable brush sizes, colors, and styles.\n- `Undo/Redo Functionality`\n- `Save`: Save your masterpieces in Base64 format.\n\n<br/>\n\n<img src=\"./assets/demo.png\" alt=\"canvas demo\" width=\"200\"/>\n\nMade with 💙 by [Anki Pro](https://ankipro.net/) team\n\n## Installation\n\n```sh\nyarn add @ankipro/react-native-canvas-view\n```\n... and pods\n```sh\nnpx pod-install\n```\n\n\n## Basic usage\n\n```js\nimport CanvasView from \"@ankipro/react-native-canvas-view\";\n\n// ...\n\n<CanvasView ref={canvasRef} />\n```\n\nFor more information see [example](./example/src/App.tsx).\n\n## Props\n\nName | Type | Description\n-|-|-\nref | CanvasViewRef | See methods [below](#methods)\nstyle | ViewStyle | Base RN View style\nonUndoRedoChange | (undoRedo: {canUndo: boolean; canRedo: boolean}) => void | Check ability undo/redo\n\n## Methods\n\nName | Type | Description\n-|-|-\n.showToolbar() | () => void | Show Toolbar\n.hideToolbar() | () => void | Hide Toolbar\n.undo() | () => void | Reverse the last action\n.redo() | () => void | Reapply previously undone action\n.getDrawingBase64() | (onComplete: (base64: string) => void) => void | Get Base64 image\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","readmeFilename":"README.md"}