@dumiflex/wp-kit

中文文档
0.20.0发布于 2026/11/13GPL-3.0-or-laterES Module零依赖构建来源已验证近 30 天下载 4465

Vue 3 component kit shared by the Wildcard Pipeline manager, canvas and community site.

原始使用文档
文档目录6 节
  1. Install
  2. Use
  3. What your app provides
  4. Versions
  5. Links
  6. License

@dumiflex/wp-kit

npm Vue 3 TypeScript License: GPL-3.0-or-later

A Vue 3 component kit with its own theme: buttons, fields, selects, checkboxes, switches, chips, cards, tables, dialogs, drawers, popovers, menus, tooltips, tabs, sliders, colour, date and icon pickers, lists, toasts, code and diff views. The theme is design tokens, six colour palettes and seven looks (corners, type, borders). It was built for Wildcard Pipeline, a ComfyUI extension, and works in any Vue 3 + Vite app.

Every piece reads CSS custom properties, so it takes on the colours, corners and type of the app it sits in.

See every piece live, with when to use it: dumiflex.github.io/wp-kit. The site has a switcher for the palette, the look and light or dark.

Install

npm install @dumiflex/wp-kit vue primeicons
# or: pnpm add @dumiflex/wp-kit vue primeicons

The package ships source (.vue, .ts and CSS) with no build step, and your Vite app compiles the pieces it imports. In vite.config:

export default defineConfig({
  plugins: [vue()],
  resolve: { dedupe: ["vue"] },                     // one Vue, yours
  optimizeDeps: { exclude: ["@dumiflex/wp-kit"] },  // .vue files go through your Vue plugin
});

Use

Import one file at a time. There is no barrel file, so the bundler only ships what you use:

import "primeicons/primeicons.css";
import "@dumiflex/wp-kit/theme/tokens.css";
import "@dumiflex/wp-kit/theme/palettes.css";
import "@dumiflex/wp-kit/theme/looks.css";
import "@dumiflex/wp-kit/button.css";

import Button from "@dumiflex/wp-kit/Button.vue";
import Chip from "@dumiflex/wp-kit/Chip.vue";
<Button variant="primary" icon="pi-plus" @click="add">Add</Button>
<Chip tone="warn" icon="pi-exclamation-triangle">2 conflicts</Chip>
<Chip :pressed="tag === 'portrait'" :count="12" size="sm" @click="tag = 'portrait'">portrait</Chip>

Pick a palette and a look on <html>: data-wp-palette="…", data-wp-look="…", and the class wp-theme-light for light mode. The site lists them all and shows each piece's props and an example.

If you already import the kit as @/kit/..., alias @/kit to node_modules/@dumiflex/wp-kit/src.

What your app provides

  • Vue 3.5 and PrimeIcons 7 (peer dependencies). Icons are pi pi-* classes. The kit imports nothing else at runtime.

  • A theme: the kit's own sheets above. A host with its own colour sheet can define the names in SHARED_TOKENS instead and use the pieces that read only those.

  • A layer order, if your app uses cascade layers (Tailwind 4 does). A few pieces (the tooltip, Popover, DropdownMenu, the entrance classes) put their rules in @layer wp-extension, so a host page's unlayered CSS wins a clash (that keeps the kit polite on the ComfyUI canvas). Their outlines are drawn as rings, so a reset like Tailwind's preflight (border-width: 0) can't strip them. If your own CSS is layered, declare the order in your page's <head>, before any stylesheet, with the kit above your reset and below your utilities:

    <style>@layer theme, base, wp-extension, components, utilities;</style>
    

Versions

Semantic versioning. Below 1.0, a minor version can break: read the changelog before you bump. Each release is published from CI with provenance.

License

GPL-3.0-or-later. Copyright (C) 2026 DumiFlex.

版本与发布记录

@dumiflex/wp-kit 共发布 25 个版本,首次发布于 2026/11/03;过去 12 个月发布了 25 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.20.0latest2026/11/13今天
0.19.02026/11/121 天前
0.18.12026/11/121 天前
0.18.02026/11/121 天前
0.17.02026/11/121 天前
0.16.02026/11/103 天前

关于 @dumiflex/wp-kit 的常见问题

@dumiflex/wp-kit 是什么?

Vue 3 component kit shared by the Wildcard Pipeline manager, canvas and community site.

如何安装 @dumiflex/wp-kit?

在项目目录运行 npm install @dumiflex/wp-kit,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.0)、primeicons(^7.0.0 || ^8.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dumiflex/wp-kit 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dumiflex__wp-kit 是否存在。

@dumiflex/wp-kit 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dumiflex/wp-kit 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dumiflex/wp-kit 可以商用吗?

@dumiflex/wp-kit 使用 GPL-3.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@dumiflex/wp-kit 的下载量有多少?

根据 npm 官方下载统计,@dumiflex/wp-kit 在 2026/10/13 – 2026/11/11 这 30 天内被下载 4,465 次,日均约 149 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dumiflex/wp-kit 还在维护吗?

最新版本 0.20.0 发布于 2026/11/13(今天);至今共发布 25 个版本,其中过去 12 个月发布了 25 个;首次发布于 2026/11/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。