@boomi/exosphere

中文文档
8.1.4发布于 2026/10/22BSD-3-ClauseTypeScriptESM + CJS近 30 天下载 6316

A library of Web Components

原始使用文档
文档目录19 节
  1. Usage
  2. Web Components
  3. React
  4. Vue
  5. Angular
  6. Requirements
  7. Install
  8. Pre start (only once)
  9. Storybook
  10. Build
  11. Feature Testing
  12. Prerequisite
  13. Unit Testing
  14. Coverage
  15. Scaffolding
  16. MCP Server
  17. Consumer setup
  18. Updating the MCP server (Exosphere developers)
  19. Browser Support

ExoSphere

A library of Web Components

  • Works with all frameworks 💡
  • First-class React support 👔
  • Dark theme enabled 🌙
  • Bundled with Vite ⚡

Usage

Web Components

Local installation

Add styles and javascript file to the <head> section of your HTML markup

<link rel="stylesheet" href="/dist/styles.css">
<script type="module" src="/dist/index.mjs"></script>

Usage

// index.html

<ex-button type="primary" flavor="branded">Hello Web Components!</ex-button>

React

Web components are wrapped with a react wrapper

Installation

npm i @boomi/exosphere --save

Configuration

Import CSS in a global file such as index.(js|ts|tsx) or App.(js|ts|tsx)

import "@boomi/exosphere/dist/styles.css";

For Jest, you need to add the following entry in your package.json

// package.json

"jest" : {
      "transformIgnorePatterns": [ "<roodDir>/node_modules/(?!@boomi/exosphere/)" ],
      "moduleNameMapper": {
            "^@boomi/exosphere": "<rootDir>/node_modules/@boomi/exosphere/dist/react/index.mjs"
      }
}

Usage

Start using Exosphere React components. Example:

// src/App.(js|ts|tsx)

import {ExButton} from '@boomi/exosphere';

function App() {
  return (
    <div>
        <ExButton flavor="base" type="primary"> Hello from ExoSphere!</ExButton>
    </div>
  );
}

export default App;

Vue

Installation

npm i @boomi/exosphere --save

Configuration

// src/main.js

import "@boomi/exosphere/dist/styles.css";
import "@boomi/exosphere";

Usage

// src/App.vue
<template>
    <ex-button type="primary" flavor="branded" @click="doSomething">Hello Vue!<ex-button>
</template>

Angular

Installation

npm i @boomi/exosphere --save

Configuration

// app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {}

Import Exosphere & it's styles

// app.component.ts

import "@boomi/exosphere/dist/styles.css";
import "@boomi/exosphere";

Usage

// app.component.html

<div>
  <ex-button (click)="doSomething()" type="primary" flavor="branded">Hello Angular!</ex-button>
</div>

Requirements

Node v16+

Install

Install all dependencies

npm install

Pre start (only once)

Adds git hooks to run unit tests when code is committed

npm run prestart

Storybook

Runs storybook in watch mode on http://localhost:6006/ with hot module replacement for development. Changes in code can be previewed instantly.

npm run storybook

Build

Create javascript and styles bundle. Also, wraps web components for React usage

npm run build

Feature Testing

Prerequisite

  • Git CLI
  • Node
  • Bitbucket Access to the Exosphere Repo
  • Exosphere Repo local clone

Builds and host the storybook build files locally. Currently, the default branch is set to develop.

npm run build-storybook:host

use --branch flag to build and host the respective branch i.e.

npm run build-storybook:host --branch=<FEATURE_BRANCH>

Examples:
npm run build-storybook:host --branch=UU-127
npm run build-storybook:host --branch=develop

Note: Make sure that feature branch has been pushed to the bitbucket origin by developer.

Unit Testing

Runs unit tests

npm test

Coverage

Generates code coverate report in coverage/ folder

npm run coverage

Scaffolding

Generates scaffolding of a new component

npm run create-component

you need to export the newly created component in the index.ts file under src/components.

MCP Server

Exosphere ships an MCP (Model Context Protocol) server that gives AI assistants (Claude Code, Cursor, etc.) structured knowledge of all components, icons, props, events, and usage guidelines.

Consumer setup

The MCP server is bundled inside the package. When you run npm install @boomi/exosphere, a postinstall script automatically writes a .mcp.json to your project root:

{
  "mcpServers": {
    "exosphere": {
      "command": "node",
      "args": ["./node_modules/@boomi/exosphere/dist/mcp-server/index.js"]
    }
  }
}

To disable this behaviour, set EXOSPHERE_SKIP_MCP=1. Use one of:

# Shell profile (~/.zshrc, ~/.bashrc)
export EXOSPHERE_SKIP_MCP=1
# .npmrc (project or global)
exosphere_skip_mcp=1

Restart Claude Code (or your MCP-compatible IDE) after installing. The server exposes 10 tools: list_components, get_component_details, get_code_examples, search_components, get_usage_guidelines, get_design_tokens, search_icons, list_icon_categories, get_component_summary, and list_tools.

Updating the MCP server (Exosphere developers)

The MCP server reads from a pre-built registry (mcp-server/data/component-registry.json) generated from each component's knowledge.md, TypeScript source, Storybook stories, React wrapper, and styles.

When you update a knowledge.md file, rebuild the registry and bundle manually:

npm run mcp:build

This runs three steps in sequence:

  1. mcp:generate-registry — re-parses all knowledge.md, .ts, .stories.ts, React wrapper, and .styles.ts files → writes mcp-server/data/component-registry.json and icon-registry.json
  2. mcp:bundle — bundles the MCP server + all dependencies into a single self-contained dist/mcp-server/index.js
  3. mcp:copy-data — copies the registry JSON files into dist/mcp-server/data/

The MCP build is also included in the full production build (npm run build), so the registry is always up to date in published packages.

Adding a new component to the registry:

No manual registry edits are needed. Once a component has a knowledge.md following the standard template, it is picked up automatically on the next npm run mcp:generate-registry. The generator prints a completeness score for each component — aim for 80%+ by including Overview, API Reference, Usage Guidelines, Best Practices, and Examples sections in the knowledge file.

Browser Support

Chrome, Edge, Safari

版本与发布记录

@boomi/exosphere 共发布 191 个版本,首次发布于 2022/08/12;过去 12 个月发布了 30 个版本。

版本发布日期距今
8.1.4latest2026/10/2217 天前
8.1.32026/10/2118 天前
7.18.0unknown2026/10/1623 天前
8.1.22026/10/1524 天前
7.17.02026/10/1325 天前
8.1.12026/10/061 个月前

其他发布通道:next → 3.0.0-beta.0,testing-version → 5.0.1-rc.13,archive → 4.6.0,rc → 6.0.0-rc.1,beta → 7.14.0-beta.0,unknown → 7.18.0。

关于 @boomi/exosphere 的常见问题

@boomi/exosphere 是什么?

A library of Web Components

如何安装 @boomi/exosphere?

在项目目录运行 npm install @boomi/exosphere,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 exosphere-mcp,可以用 npx exosphere-mcp 直接运行。

@boomi/exosphere 支持 TypeScript 吗?

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

@boomi/exosphere 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@boomi/exosphere 可以商用吗?

@boomi/exosphere 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@boomi/exosphere 的下载量有多少?

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

@boomi/exosphere 还在维护吗?

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