# @freightos/freightwind 中文文档

规范地址：https://npmcn.com/package/%40freightos/freightwind/

版本：2\.4\.0
npm 元数据更新时间：2026-11-09T08:54:18.211Z
中文译文更新时间：2026-11-15T14:22:25.663Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40freightos/freightwind
原文对照：https://npmcn.com/package/%40freightos/freightwind/?lang=original
项目主页：https://bitbucket.org/freightos/freightwind#readme
源码仓库：https://bitbucket.org/freightos/freightwind

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.7 MB，915 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：2 个
- peer 依赖：react \>=18，react-dom \>=18，@modelcontextprotocol/sdk ^1\.29\.0，@modelcontextprotocol/ext-apps \>=1\.7\.5 \<2
- 首次发布：2026-01-14T21:17:37.749Z
- 最新版本发布：2026-11-09T08:54:18.048Z
- 近 30 天下载量：2775（2026-10-16 至 2026-11-14，npm 官方下载统计）
- 已发布版本数：26（近 12 个月 26 个）

## 中文简介

FlordWind设计系统——Flordos应用程序的图标、常数和公用事业

## 安装

```sh
npm install @freightos/freightwind
```

也可以使用：`pnpm add @freightos/freightwind`、`yarn add @freightos/freightwind`、`bun add @freightos/freightwind`

## README

# @freightos/freightwind (英语)

FredWind Design System — React UI组件用于Fredos应用.

## 安装

```bash
npm install @freightos/freightwind @freightos/freightwind/icons
```

## 使用量

```tsx
import { Button, Alert, Badge } from '@freightos/freightwind';
import '@freightos/freightwind/tokens.css';
```

组件需要用 FDS 设计符号装入 Tailwind CSS v4 `tokens.css`。 。 。 .

## 主机隔离( WebCargo)

在 WebCargo 主机内安装货运窗口时, 也会导入 WebCargo 将您的 App 包装到 `.fw-root` 元素 :

```tsx
import '@freightos/freightwind/tokens.css';
import '@freightos/freightwind/host-isolation/webcargo.css';

<div className="fw-root">
  <App />
</div>
```

图纸端口 Tailwind的标准飞行前范围 `.fw-root` 通过 `:where()` (0个添加的特异性),加上有焦点的取消键 编辑 `.fw-base` 每个元素标记,所以它覆盖了所提供的FW组件 在 Radix 门户内部(Dialog / Popover / Tooltip / Dropdown Menu / 选择). 它的存在完全是为了中和WebCargo的"靴子"式主机CSS 目标赤元素选择器( e)`h1-h6 { margin-bottom: .5rem }`, (中文(简体) ), `button { border-radius: 0 }`, (中文(简体) ), `button:focus { outline: 5px auto … }`,(.)—— 它不强制FW特定型号, 所以它从来不从FW设计中漂移 标志.

在干净的主机中消耗货运窗口时跳过此文件( Vite player, greenfield Next.js apps,合作伙伴站点没有"靴子")——没有主机 CSS在那里战斗.

## MCP Apps (英语:`@freightos/freightwind/mcp-app`(中文(简体) )

将货运窗口表面作为AI聊天内的互动卡(Claude, ChatGPT)通过MCP Apps标准. `useMcpApp` 连接到主机、 镜像 会议主题`.dark`)和语言(`dir`编号 :`lang`把工具结果交给你, 并停止旧卡发送 一旦更新它.

```tsx
import { useMcpApp } from '@freightos/freightwind/mcp-app';

function Card() {
  const { data, isSuperseded, updateModelContext, sendMessage } = useMcpApp<MyData>({
    appInfo: { name: 'my-card', version: '1.0.0' },
    supersessionChannel: 'my-app:show_thing',
    instanceKeyOf: (d) => ({ issuedAt: d.issuedAt, seq: d.seq }),
  });
  // updateModelContext(text) informs the model quietly; sendMessage(text) posts to the chat.
}
```

安装可选的同位素以使用 : `@modelcontextprotocol/ext-apps` (>= 1.7.5 < 2) 财务报告和审定财务报表 `@modelcontextprotocol/sdk` (^ 1.29) (中文(简体) ). 副路径是仅限无害环境管理,例如: ext-apps本身。 超级会话使用 a `BroadcastChannel`,所以一个新的卡在 又一次公开聊天也标志着年长者已经过时。 全向导:货运窗口 文件 – AI – MCP Apps.

## 同伴依赖关系

-   `react` 第18条
-   `react-dom` 第18条
-   `@freightos/freightwind/icons` >= 1.0.0
-   `@modelcontextprotocol/ext-apps` >= 1.7.5 < 2和 `@modelcontextprotocol/sdk` ^1.29(可选,用于 `/mcp-app` 仅限)

## 许可证

麻省理工学院

## 常见问题

### @freightos/freightwind 是什么？

FlordWind设计系统——Flordos应用程序的图标、常数和公用事业

### 如何安装 @freightos/freightwind？

在项目目录运行 npm install @freightos/freightwind，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=18）、react-dom（\>=18）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @freightos/freightwind 支持 TypeScript 吗？

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

### @freightos/freightwind 支持 ESM 还是 CommonJS？

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

### @freightos/freightwind 可以商用吗？

@freightos/freightwind 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @freightos/freightwind 的下载量有多少？

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

### @freightos/freightwind 还在维护吗？

最新版本 2\.4\.0 发布于 2026/11/09（6 天前）；至今共发布 26 个版本，其中过去 12 个月发布了 26 个；首次发布于 2026/01/15。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

