@ethisyscore/host-ui-externals

中文文档
1.167.0发布于 2026/10/25SEE LICENSE IN LICENSETypeScriptESM + CJS零依赖近 30 天下载 7244

Type contracts and mock build for Tier T host-supplied Gogo UI externals. Plugin builds depend on this as a dev-dep; production bundles externalise the specifier so the host's registered module instance is used at runtime.

此软件包已被标记为弃用

This package has moved to the Ethisys Core package feed. In Ethisys Core, open the Developers page and follow the setup steps (cc login connects npm to the feed).

原始使用文档
文档目录3 节
  1. Export surface
  2. Typical usage
  3. Build and test

@ethisyscore/host-ui-externals

Type contracts and mock implementations for the host-supplied gogo-ui externals used by high-trust plugin UI tiers. A plugin depends on this package as a dev-dependency only: at build time it provides the TypeScript types (and, via ./mock, runnable stand-ins for local/CI/Storybook), while production bundles externalise the specifier so the plugin binds to the host's own runtime instance rather than shipping a second copy.

This keeps a plugin's UI type-safe against the host's gogo-ui surface without bundling — the same externalisation model PlatformReact uses for react, @mui/material, etc.

Export surface

SubpathKey exportsPurpose
.GogoTheme, GogoMode, GogoThemeProviderProps, GogoChildren, GogoMenuItem, ComponentType, ReactNode, GOGO_EXTERNALS_SPECIFIER_MAPType contracts for the host gogo-ui components (theme presets, mode, provider props, menu-item shape) plus the specifier map the host registry resolves against
./mockGogoThemeProvider, useGogoTheme, and re-exported typesMock implementations for local/CI/Storybook development — render semantic HTML with data-testid attributes so plugin UI can run and be tested without the real host

Typical usage

// Types compile against the host surface; production externalises the import.
import type { GogoTheme, GogoThemeProviderProps } from "@ethisyscore/host-ui-externals";
// Local dev / tests substitute the mock provider.
import { GogoThemeProvider } from "@ethisyscore/host-ui-externals/mock";

Build and test

npm ci && npm run build && npm test

Last Updated: 2026-07-10

版本与发布记录

@ethisyscore/host-ui-externals 共发布 236 个版本,首次发布于 2026/06/11;过去 12 个月发布了 236 个版本。

版本发布日期距今
1.167.0latest2026/10/2520 天前
1.166.02026/10/2420 天前
1.165.02026/10/2420 天前
1.164.02026/10/2321 天前
1.163.32026/10/2321 天前
1.163.22026/10/2321 天前

关于 @ethisyscore/host-ui-externals 的常见问题

@ethisyscore/host-ui-externals 是什么?

Type contracts and mock build for Tier T host-supplied Gogo UI externals. Plugin builds depend on this as a dev-dep; production bundles externalise the specifier so the host's registered module instance is used at runtime.注意:该包已被作者标记为弃用——This package has moved to the Ethisys Core package feed. In Ethisys Core, open the Developers page and follow the setup steps (cc login connects npm to the feed).

如何安装 @ethisyscore/host-ui-externals?

在项目目录运行 npm install @ethisyscore/host-ui-externals,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ethisyscore/host-ui-externals 支持 TypeScript 吗?

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

@ethisyscore/host-ui-externals 支持 ESM 还是 CommonJS?

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

@ethisyscore/host-ui-externals 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ethisyscore/host-ui-externals 可以商用吗?

@ethisyscore/host-ui-externals 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@ethisyscore/host-ui-externals 的下载量有多少?

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

@ethisyscore/host-ui-externals 还在维护吗?

最新版本 1.167.0 发布于 2026/10/25(20 天前);至今共发布 236 个版本,其中过去 12 个月发布了 236 个;首次发布于 2026/06/11。作者已将其标记为弃用,新项目建议寻找替代方案。