Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-paint

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-paint - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

22

package.json
{
"name": "vue-paint",
"version": "0.0.1",
"version": "0.1.0",
"private": false,

@@ -11,6 +11,17 @@ "type": "module",

"module": "./dist/vue-paint.js",
"types": "./dist/main.d.ts",
"exports": {
".": {
"import": "./dist/vue-paint.js",
"require": "./dist/vue-paint.umd.cjs"
"import": {
"types": "./dist/main.d.ts",
"default": "./dist/vue-paint.js"
},
"require": {
"types": "./dist/main.d.ts",
"default": "./dist/vue-paint.umd.cjs"
}
},
"./themes/*": {
"import": "./dist/themes/*",
"require": "./dist/themes/*"
}

@@ -22,3 +33,3 @@ },

"preview": "vite preview",
"test:unit": "vitest",
"test:unit": "vitest --typecheck",
"build-only": "vite build",

@@ -53,5 +64,6 @@ "build:demo": "vite build --config vite.demo-config.ts",

"vite": "^5.2.8",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0",
"vue-tsc": "^2.0.11"
}
}
}

@@ -5,3 +5,49 @@ # vue-paint

Demo: [https://github.com/robertrosman/vue-paint]
## Getting started
First install `vue-paint` with your favorite package manager, like this `npm i vue-paint`. Then you need to choose what tools you want to include, setup
history and you're good to go.
```vue
<script setup lang="ts">
import { ref } from 'vue'
import { VpEditor, useFreehand, useRectangle, downloadSvg, type ImageHistory } from 'vue-paint'
// Add the tools you like to use, or call useAllTools to make use of all available tools
const tools = [useFreehand(), useRectangle()]
// The history can be manipulated programmatically, and used to persist the image
const history = ref<ImageHistory<typeof tools>>([])
</script>
<template>
<vp-editor v-model:history="history" @save="downloadSvg" :tools></vp-editor>
</template>
```
## Key features
### Tree shakable
Only include the tools you need and leave the rest outside of your bundle.
### Non-destructive
Support for both undo and redo, even after result is exported.
### Clean format
The state is a simple javascript array of objects you can serialize to JSON, manipulate programmatically, store in your database or local storage.
### Easily extendable
Create your own tools if you want to extend the library.
### Type safe
Written in Typescript and fully typed.
## Project Setup

@@ -30,1 +76,5 @@

```
## Contribute
Contributions are welcome! Fork and create a new Pull request. Try to follow the patterns in `src/composables/tools` when creating new tools.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc