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

svg-mark

v1.1.8

Published

Downloads

6

Readme

svg ink tool

this is demo,thanks to vercel.app!

svg-mark is a svg ink tool developed based on Vue3.2 and TypeScript,which supports two import methods, umd and esmodule,but CSS files need to be imported manually. The usage method is as follows:

Use your favorite package manager, pnpm is recommended

pnpm add svg-mark

After treeshaking, the size is less than 40KB, and it relies on vue3 to manage data internally.A zero-dependency version will be updated later, and its size will be smaller

Import components and style files in code:

import { PaintArea } from "svg-mark";
import "svg-mark/dist/style.css";

PaintArea is a drawing area component. The design idea of ​​this component is "overlay", so it needs a prop to control whether it is displayed or not. It is turned off by default. You can change the display of this "ink layer" at will, and the ink will not be cleared when it is closed.


const paintMode = ref(false);

<PaintArea :paint-mode="paintMode" />

Current features(v1.0.5)

Supports five drawing tools: text, free curve, straight line, arrow, and rectangle. In the selection mode, you can click an ink, press Delete or Backspace to delete the ink, press Ctrl to select multiple, the selected ink will be highlighted, and one key is supported. Clear the canvas.

follow-up development plan

  1. Support exporting and importing ink data as JSON;
  2. Support ink color modification;
  3. Support multiple ink combinations and ungroups;
  4. Support ink stroke thickness setting;
  5. Customize toolbar via slots;

If you have good ideas or needs, you can contact me by e-mail [email protected]


SVG 墨迹绘图工具

一个基于Vue3.2和TypeScript开发的svg墨迹工具,支持umd和esmodule两种导入方式,CSS文件需要手动导入,使用方式:

使用你喜欢的包管理器,推荐pnpm

pnpm add svg-mark

treeshaking后只有不到40KB的大小,内部依赖了vue3管理数据。之后会更新一个零依赖的版本,它的体积会更小.

在代码中导入组件和样式代码:

import { PaintArea } from "svg-mark";
import "svg-mark/dist/style.css";

PaintArea是绘图区域组件,本组件的设计思路是“覆盖层”,故需要一个prop控制显示与否,默认关闭,你可以任意变更这个“墨迹层”的显示与否,关闭时不会清除墨迹。


const paintMode = ref(false);

<PaintArea :paint-mode="paintMode" />

当前功能(v1.0.5)

支持文字、自由曲线、直线、箭头、矩形五种绘图工具,选择模式下可点击某墨迹,按下DeleteBackspace删除墨迹,按住Ctrl可多选,被选中的墨迹会高亮,支持一键清除画布。

后续开发规划

  1. 支持导出、导入墨迹数据为JSON;
  2. 支持墨迹颜色修改;
  3. 支持多个墨迹组合、取消组合;
  4. 支持墨迹笔画粗细设置;
  5. 通过插槽自定义工具栏;

如果您有好的想法或需求,可以发邮件联系我[email protected]