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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@composy/image-editor-vue

v0.0.2

Published

Vue components for @composy/image-editor-core

Readme

@composy/image-editor-vue

Professional image editor library with annotations, filters, crop, and more(Vue 3 适配层)

功能特性

  • 🧩 Vue 3 组件
  • 🪝 组合式函数 (Composables)
  • ⚡ 响应式数据绑定

安装

npm install @composy/image-editor-vue

快速开始

<script setup>
// import { /* 组件 */ } from '@composy/image-editor-vue'
</script>

<template>
  <ImageEditor />
</template>

跨域导出

浏览器禁止导出被跨域图片污染的 canvas。默认 crossOrigin 为 anonymous,源站需要返回 CORS 响应头;如果源站不支持 CORS,请改用本地上传、data: URL 或同源 blob: URL。

<ImageEditor image="https://third-party.example.com/a.jpg" cross-origin="anonymous" />

显式设置 cross-origin 为 null 只适合预览无 CORS 图片,修改后的 canvas 不能导出。

加载与重置

Vue 组件通过 Core 复用异步加载语义:连续更新 image 或调用暴露的 loadImage() 时,旧请求会被取消,只有最后一次请求提交;被取消的请求以 AbortError 结束。调用 clearImage() 或卸载组件也不会让已失效的异步结果重新写入画布。旋转、翻转、裁剪和缩放后调用 reset() 会回到加载时的原始尺寸与像素基线。

目录结构

packages/vue/
├── src/              # 源码
├── package.json
├── tsconfig.json     # ESM 构建配置
└── tsconfig.cjs.json # CJS 构建配置

依赖

  • @composy/image-editor-core — 核心引擎
  • vue ^3.3.0 (peerDependency)

License

MIT

构建与检查

pnpm build
pnpm type-check
pnpm type-check:cjs
pnpm lint:check

Builder 配置位于 .ldesign/builder.config.ts,TypeScript 与 ESLint 配置也统一位于 .ldesign/。构建输出为 dist、es、esm 与 lib,并对应 package exports。 包根目录的配置文件仅作为兼容转发入口。