npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lxx-react-img-editor

v0.2.2

Published

图片编辑器(微信截图编辑 PRO 版)

Downloads

147

Readme

react-img-editor · 图像编辑器

react-img-editor 是一个图像编辑器 react 组件,支持对图片进行裁剪、涂鸦、文字编辑、马赛克处理等操作,同时支持自定义插件和灵活的样式配置。

示例

查看 demo

✨ 特性

  • 支持自由画笔、矩形、圆形、箭头、文字、马赛克的绘制
  • 支持橡皮擦、撤销操作、截图和图片下载
  • 支持自定义插件和工具栏配置
  • 支持矩形、圆形、箭头、文字等节点的拉伸、拖拽和删除
  • 支持同一页面多个组件同时存在

📦 下载

npm install react-img-editor -S

🔨 引入和使用

import ReactImgEditor from 'react-img-editor'
import 'react-img-editor/assets/index.css'

<ReactImgEditor src="https://www.w3schools.com/html/img_girl.jpg" />

🧰 API

| 属性 | 描述 | 类型 | 默认值 | | --- | --- | --- | --- | | src | 图片 url | string | - | | width | 画板宽度 | number? | 700 | | height | 画板高度 | number? | 500 | | style | 画板样式 | React.CSSProperties | - | | plugins | 自定义的插件 | Plugin[] | [] | | toolbar | 工具栏配置 | { items: string[] } | {items: ['pen', 'eraser', 'arrow', 'rect', 'circle', 'mosaic', 'text', '|', 'repeal', 'download', 'crop']} | | getStage | 获取 KonvaJS 的 Stage 对象,可用于下载图片等操作 | (stage: any) => void | | defaultPluginName | 默认选中的插件名称 | string? | - | | crossOrigin | 处理跨域图片 | string? | - |

📝 TODO

  • [ ] 动态加载图片
  • [ ] 下载图片类型配置
  • [ ] 提供插件配置项配置
  • [ ] 优化自由画笔书写体验
  • [ ] 国际化支持

🤝 贡献

开发

npm run start

http://127.0.0.1:8012/examples/simple.html

发布

npm run lint
npm run pub