@bitspark-ai/design

中文文档
0.39.1发布于 2026/11/05UNLICENSEDTypeScriptES Module近 30 天下载 2.4万

Bitspark design system — tokens, Svelte 5 components, and the reactive display clock.

原始使用文档
文档目录5 节
  1. Quick start
  2. What's inside
  3. Subpath exports
  4. Framework
  5. License

@bitspark-ai/design

The Bitspark design system — design tokens, Svelte 5 components, framework-pure UI recipes, and a reactive display clock, shipped as one package under one semver.

Published from a private source, installable with no registry auth.

npm i @bitspark-ai/design
# Svelte 5 is a peer dependency — the consumer supplies it:
npm i svelte

Quick start

Load the tokens + base stylesheet once (required — components are styled through the token layer), then import components and utilities from the barrel:

// once, at your app root:
import '@bitspark-ai/design/css';
<script>
  import { Button, DataTable, StatCard } from '@bitspark-ai/design';
  import { clockDuration, staleness } from '@bitspark-ai/design';
</script>

<StatCard label="Uptime" value="99.98%" tone="success" />
<Button loading={submitting}>Publish</Button>

What's inside

  • 98 components — primitives (Button, Badge, Icon, Card…), data & metric surfaces (DataTable, StatCard, Meter, DecayMeter, Sparkline, BarChart…), navigation & shell (AppShell, SideNav, MarketingNav, Breadcrumbs…), live-ops (LiveStatusBar, LivenessStatus, Lane / LaneGroup / ConnectorNode…), and the changelog family (ReleaseFeed, ReleaseBanner…). Every component's metadata is machine-readable via ./catalog.
  • Design tokens — colour, surface, spacing, type, and motion tokens as CSS custom properties (./css, ./*.css) and as typed JS values (./tokens).
  • UI recipes & actions — small, framework-pure, tree-shakeable utilities exported from the barrel:
    • formatting — clockDuration, formatBytes, formatRelativeTime
    • state & colour — classifyFreshness, thresholdColor, utilizationColor, rowStateClasses, deltaText
    • collection-at-scale — pressure (occupancy + hot), staleness (duration → warm→cold), adaptive (representation by count)
    • motion — use:travel (keyed FLIP move) and use:flight (source→target enter), plus prefersReducedMotion, valueChange, motionMs
    • navigation & misc — paginationMode, collapseBreadcrumbs, tabIndicator, toastStore
  • ./time — a reactive display clock and time formatters (duration, relative time, cost), safe to share across the kit under the same semver.

All utilities carry full JSDoc; import from @bitspark-ai/design and your editor surfaces the signatures.

Subpath exports

ImportWhat
@bitspark-ai/designcomponents + recipes + actions (the barrel)
@bitspark-ai/design/cssthe aggregate tokens + base stylesheet (import once)
@bitspark-ai/design/tokensdesign tokens as typed JS values
@bitspark-ai/design/base.css · /motion.css · /portal.cssindividual style layers
@bitspark-ai/design/timethe reactive display clock + time formatters
@bitspark-ai/design/catalogmachine-readable component metadata
@bitspark-ai/design/rolescomponent role/kind classification

Framework

Built with svelte-package — Svelte 5 source ships to dist/ (not pre-compiled), so your bundler compiles it in your app's Svelte context. Svelte ^5.55.1 is a peerDependency. Components are framework-pure: no SvelteKit $app/* imports — navigation is injected through a resolveHref seam, so any Svelte 5 app can consume the kit. CSS carries side effects (sideEffects: ["**/*.css"]), so your bundler keeps the imported styles while tree-shaking unused JS.

License

UNLICENSED — world-installable, all rights reserved. Not open-source; installable from a private source with no auth. See the repository for terms.

版本与发布记录

@bitspark-ai/design 共发布 47 个版本,首次发布于 2026/06/14;过去 12 个月发布了 47 个版本。

版本发布日期距今
0.39.1latest2026/11/052 天前
0.39.02026/10/1128 天前
0.38.02026/08/232 个月前
0.37.02026/07/133 个月前
0.36.02026/07/133 个月前
0.34.02026/07/123 个月前

关于 @bitspark-ai/design 的常见问题

@bitspark-ai/design 是什么?

Bitspark design system — tokens, Svelte 5 components, and the reactive display clock.

如何安装 @bitspark-ai/design?

在项目目录运行 npm install @bitspark-ai/design,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:svelte(^5.55.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bitspark-ai/design 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bitspark-ai/design 支持 ESM 还是 CommonJS?

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

@bitspark-ai/design 可以商用吗?

@bitspark-ai/design 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@bitspark-ai/design 的下载量有多少?

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

@bitspark-ai/design 还在维护吗?

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