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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ys-md-rendering

v0.2.4

Published

[![npm 版本](https://badge.fury.io/js/ys-md-rendering.svg)](https://www.npmjs.com/package/ys-md-rendering)

Readme

YS MD Rendering - Markdown 自定义渲染组件

npm 版本

一套可定制的 Web 组件集合,用于自定义 Markdown 渲染功能,支持插件扩展。 通过markdown-it进行markdown解析,通过lit进行渲染

安装

通过 npm 安装:

npm install ys-md-rendering

或使用 pnpm:

pnpm add ys-md-rendering

使用方式

基础用法

在 Vue 组件中导入主组件和所需的插件:

<script setup lang="ts">
import 'ys-md-rendering'

import { ref } from 'vue'

const content = ref('# 你好世界\n\n这里是Markdown内容')
</script>

<template>
  <ys-md-rendering :content="content"></ys-md-rendering>
</template>

示例文档

示例文档

主要特性

  • 模块化设计:按需使用插件
  • 框架无关:兼容 Vue、React、Angular、原生 HTML

浏览器支持

支持现代浏览器(Chrome、Firefox、Safari、Edge)的 Web Components 功能。

如果vue2项目启动报错,可尝试vue.config.js添加如下配置

const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  // ....
  transpileDependencies: ['ys-md-rendering']
}

更新记录

0.2.4

  • fix: 解决超链接点击没有传递text问题
  • feat: 增加HEX颜色识别功能
  • feat: 添加@mdit/plugin-mark支持

0.2.3

  • fix: 解决增量更新时,自定义组件iscomplete属性未更新问题

0.2.2

  • fix: 解决通过 block.ruler.at 修改导致的fence判断失败问题

0.2.1

  • feat: 重构自定义组件注册方法,升级历史插件

0.1.25

  • fix: 修复ys-mermaid图表渲染失败时,可能会渲染出错误元素插入body的问题

0.1.23

  • feat: 增加link-click事件,点击链接时触发