JustGenius-s/DSH-Plugs--packages-ui ↗★ 8

@just-genius/dsh-plugin-ui

提供DSH原生UI组件库与主题Token 适合开发DSH插件或独立应用,需要使用统一React基础组件和主题的用户。

包名
@just-genius/dsh-plugin-ui
兼容性
待验证
Harness 依赖范围
0.1.5-rc.1
版本
0.2.0
最近更新
2026年9月24日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@just-genius/dsh-plugin-ui

DSH-native UI kit: --dsw-* theme tokens plus React primitives. Used by plugins in this monorepo (bundled at build time) and by standalone apps such as Vellum (runtime dependency).

What it exports

SurfaceContents
.Components + installTheme / setThemePreference
./official-primitivesDSH-only facade for the platform's content renderers
./theme.cssConcatenated token sheets for Vite/CSS @import
./css-modulesBuild helper (dshCssModules) for plugin tsdown configs

Atoms: Button, Input, Pill, Tooltip, Modal, Menu, StateDot, DisclosureRow, plus the ic_ds_* icon set.

Settings chrome: Switch, Field*, SettingsCard, ExpandableRow, Tree*, FilterChip*, Tag, …

Standalone app (e.g. Vellum)

// boot once
import { installTheme } from '@just-genius/dsh-plugin-ui'
installTheme('system') // 'light' | 'dark' | 'system'
@import '@just-genius/dsh-plugin-ui/theme.css';
import { Button, Input, Modal } from '@just-genius/dsh-plugin-ui'

Tokens live on body / body[data-ds-dark-theme]. Dark mode is toggled by installTheme / setThemePreference, not by a .dark class.

Sync theme from deepseek-harness

DSH_THEME_SRC=/path/to/ui-theme/src/styles pnpm --filter @just-genius/dsh-plugin-ui sync-theme

Normal builds use the committed snapshot under src/theme and never read another checkout. Refreshing that snapshot is an explicit maintainer operation requiring DSH_THEME_SRC.

Local link (before npm publish)

"@just-genius/dsh-plugin-ui": "file:../DSH-Plugs/packages/ui"

Build this package first (pnpm --filter @just-genius/dsh-plugin-ui build) so lib/ exists.

Peer deps

react and react-dom >=18.2.0. The DSH-only ./official-primitives entry additionally expects the platform-materialized @deepseek-ai/dsh-client-ui-primitives version declared in package.json.