Skip to content

Package responsibilities ​

YunLeFun/design is a pnpm workspace. Directory names describe responsibilities, but not every directory is an installable npm package.

Current packages and directories ​

Package or directoryPurposeConsumers and current status
@yunlefun/ui · packages/uiShared colors, font roles, radii, shadows, themes and optional fontsWeb styling foundations; package exports configured
@yunlefun/vue · packages/vueVue components such as YlfButton and YlfDialog, plus Nuxt auto importsVue/Nuxt applications; build and release scripts configured
vitepress-theme-yunlefun · packages/vitepress-theme-yunlefunShared VitePress theme, Markdown and appearance transitionsdesign / docs / wiki; Integration
@yunlefun/ui-utils · packages/utilsFramework independent DOM utilities, mainly previewElementExperimental source; build, types and exports are incomplete
@yunlefun/metadata · packages/metadataGenerated index of names, titles, descriptions and update datesPrivate internal documentation/build package
packages/cssPulse and animation examples; legacy aurora files retainedNo package.json; not an npm package
registry.json and packages/public/rDeclare and generate source installed by URLA distribution channel for the same implementations
@yunlefun/design-monorepoWorkspace dependencies, builds and verificationPrivate root; applications do not install it

Release configuration describes repository capability; it does not establish that the latest local changes are already on npm.

@yunlefun/ui: foundations ​

This package uses packages/ui/tokens/source.mjs as its single structured source of truth, generating zero-dependency CSS (tokens.css, compat.css, admin.css, editor.css, adapters/{shadcn,nuxt-ui,tdesign}.css), optional SCSS (css-vars.scss), W3C DTCG JSON (@yunlefun/ui/tokens.json), browser-safe JS/TS constants (@yunlefun/ui/tokens), and a zero-dependency UnoCSS preset (presetYunlefun() from @yunlefun/ui/unocss). CSS does not need Sass; SCSS does. It contains no Vue components and imports no framework, router, authentication SDK or business API.

bash
pnpm add @yunlefun/ui
ts
import '@yunlefun/ui/css'
// Optional legacy aliases, grid/sky backgrounds, and Admin / Editor profile layers
// import '@yunlefun/ui/compat.css'
import '@yunlefun/ui/patterns.css'
// import '@yunlefun/ui/admin.css'
// import '@yunlefun/ui/editor.css'

For SCSS, install sass and use @use '@yunlefun/ui/styles'. CSS and SCSS are generated from one structured token source; choose one foundation entry.

The base entry only loads tokens. Opt into @yunlefun/ui/styles/fonts for brand display fonts, or host fonts yourself. See Typography.

@yunlefun/ui/tokens.json already exports W3C Design Tokens, while @yunlefun/ui/tokens and @yunlefun/ui/unocss share those exact definitions with JS/TS and UnoCSS toolchains without duplicating token tables.

@yunlefun/vue: Vue implementation ​

Components receive presentation data and interaction state through props, slots, events and v-model, using native CSS custom properties with no sass dependency. Focus, keyboard and overlay behavior reuse Reka UI where appropriate.

  • Import SFCs from paths such as @yunlefun/vue/components/YlfButton.vue.
  • Nuxt registers components through @yunlefun/vue/nuxt; the application explicitly loads tokens (prefer @yunlefun/ui/css).
  • The root @yunlefun/vue entry exports browser-safe types only, not named exports for every Ylf* component; Node path helpers such as componentsDir live in @yunlefun/vue/node.
  • Applications install and load @yunlefun/ui alongside Vue; the Vue package does not inject styles automatically.

See Vue components for executable integration examples.

@yunlefun/ui-utils: DOM utilities ​

previewElement enlarges an element using DOM operations and requires a browser. Framework independent does not mean server executable, nor does it promise complete focus, keyboard or dialog behavior.

Documentation imports source directly. Until packaging, declarations and behavior verification are complete, this is not a required application dependency. Prefer YlfDialog for production dialogs.

@yunlefun/metadata: internal index ​

Build scripts read metadata in packages/vue/components/*/index.md and Git update dates for demos to generate the component index used by navigation and previews.

bash
pnpm run update

Use run to distinguish the workspace generator from the package manager dependency update command. This package provides no themes, icons or business data, and is not installed by applications. Add components through source documentation and demos, not by editing generated metadata.

Styles and Registry ​

Documentation directly imports packages/css. Mature effects may become optional @yunlefun/ui entries after verification; experimental effects remain examples. Avoid two sets of theme values.

Registry generates ylf-tokens, ylf-button and ylf-dialog from the UI and Vue packages. npm makes centralized upgrades easier. Once Registry source is copied into an application, its maintainers merge subsequent updates. See Registry distribution.

Dependencies and business boundaries ​

text
Application ──→ @yunlefun/ui (styles)
Application ──→ @yunlefun/vue ──→ Reka UI + Vue (interaction)
Documentation ──→ ui + vue + metadata + CSS examples
Registry ──→ generated from authoritative ui / vue source

Applications own authentication, permissions, payments, data and analytics. The design system supplies form layouts, loading and error states, and controls. Compositions become shared modules after validation in multiple real scenarios.