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

@offilite/assets

v1.0.0

Published

Static assets for ONLYOFFICE local editor - web-apps, sdkjs, wasm, and icons

Readme

@offilite/assets

ONLYOFFICE 本地编辑器的静态资源包。

安装

# 必须安装
npm install @offilite/assets

# 可选:字体文件(约 81MB)
npm install @offilite/assets-fonts

简介

此包包含 ONLYOFFICE 编辑器的全部运行时静态资源:

  • web-apps/ — 编辑器 API 和主应用
  • sdkjs/ — ONLYOFFICE SDK JavaScript
  • wasm/ — WebAssembly 文档转换引擎
  • img/ — 图标和文档格式图像
  • standard-fonts/ — 标准字体目录

使用方式

方式一:Vite 插件(推荐)

// vite.config.ts
import { defineConfig } from 'vite'
import { vitePluginOffiliteAssets } from '@offilite/assets/vite'

export default defineConfig({
  plugins: [
    vitePluginOffiliteAssets({
      fonts: true,  // 需要安装 @offilite/assets-fonts
      target: 'public',  // 目标目录,默认为 'public'
    }),
  ],
})

Vite 插件会在开发服务器启动和构建时自动将资源复制到 public/ 目录。

方式二:CLI 命令

# 复制基础资源
npx offilite-assets copy --target ./public

# 同时复制字体
npx offilite-assets copy --target ./public --with-fonts

方式三:编程方式

import { getAssetsPath, getFontsPath, ASSET_DIRS } from '@offilite/assets'

// 获取资源目录路径
const assetsPath = getAssetsPath()
console.log('Assets:', assetsPath)  // 如: /path/to/node_modules/@offilite/assets/assets

// 获取字体目录路径(如果已安装)
const fontsPath = getFontsPath()
console.log('Fonts:', fontsPath)

资源目录结构

node_modules/@offilite/assets/assets/
├── web-apps/          # 编辑器 API 脚本
│   └── apps/
│       ├── api/
│       ├── common/
│       ├── documenteditor/
│       ├── presentationeditor/
│       └── spreadsheeteditor/
├── sdkjs/             # ONLYOFFICE SDK
│   ├── cell/
│   ├── common/
│   ├── slide/
│   └── word/
├── wasm/              # WebAssembly 转换引擎
│   └── x2t/
│       ├── x2t.js
│       └── x2t.wasm
├── img/               # 图标
│   ├── doc-formats/
│   └── icon/
└── standard-fonts/    # 标准字体(空目录)

重要约束

web-apps/sdkjs/ 必须保持同级目录结构,因为编辑器内部代码使用 ../../../../sdkjs/... 这样的相对路径引用。此包已确保目录结构正确。

许可证

MIT