npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@limecloud/desktop-platform-react

v0.2.1

Published

Lime Desktop Platform 公共 React UI modules。

Readme

@limecloud/desktop-platform-react

@limecloud/desktop-platform-react 是 Lime Desktop Platform 的公共 React UI modules 包。zhongcaocontent-studio 和后续 OEM Product App 挂载这个包,而不是在各自仓库重写 OAuth、模型设置、充值、品牌、更新、运行、Host Bridge 或平台应用中心页面。

平台应用中心模块已迁移 Lime 的应用中心产品形态:顶部统计、状态 / 来源筛选、卡片网格、分页、详情弹窗、常用入口、readiness、能力要求、框架能力、安装 / 打开 / 更新 / 启停 / 卸载动作。迁移只复用 UI 和交互结构,数据源与操作仍走 PlatformBootstrapDesktopAppProjectionPlatformModuleActionHandlers,不引入 Lime Tauri 私有命令或业务状态。

边界

  • 本包只提供公共平台页面组件、模块清单和导航 intent helper。
  • 本包不持久化 token、模型 Key、billing 账本、OEM 权威配置或平台安装表。
  • 宿主 App 必须传入 PlatformBootstrapPlatformModuleActionHandlers
  • 类型契约来自 @limecloud/desktop-platform-contracts

最小用法

import {
  PlatformAccountEntry,
  PlatformSettingsDialog,
  PlatformModuleOutlet,
  platformModules,
  type PlatformModuleActionHandlers,
  type PlatformModuleKey,
} from '@limecloud/desktop-platform-react';

function PlatformPage(props: {
  moduleKey: PlatformModuleKey;
  actions: PlatformModuleActionHandlers;
}) {
  return (
    <PlatformModuleOutlet
      moduleKey={props.moduleKey}
      bootstrap={bootstrap}
      actions={props.actions}
      selectedAppId={selectedAppId}
      loginTenant={loginTenant}
      loginEmail={loginEmail}
      onSelectApp={setSelectedAppId}
      onRuntimeResult={setRuntimeResult}
      onCapabilityResult={setCapabilityResult}
      onLoginTenantChange={setLoginTenant}
      onLoginEmailChange={setLoginEmail}
      onBusyActionChange={setBusyAction}
    />
  );
}

左下角账号入口、通用设置、模型设置和账号设置同样由本包提供。Product App 只传入 Host Snapshot / bootstrap 的非敏感账号投影、模型设置投影与平台 intent handler,不在业务仓库复制设置 UI。

PlatformAccountEntryPlatformSettingsDialog 是跨业务 App 的标准设置入口 / 设置中间件。宿主如果要与自身视觉统一,必须通过 theme?: PlatformSettingsThemeTokensclassName 和宿主 CSS token 接入,不要复制 .lime-settings-* DOM 或 fork 公共设置组件。平台包默认继承宿主 font-family,并暴露 --lime-platform-* 变量用于颜色、圆角、阴影和边框适配;未传 token 时使用平台默认轻量桌面风格。

主题页由本包完整承载:外观模式、颜色主题、对话字体大小和衬线体开关通过 onPreviewPlatformSettings 立即投影到当前窗口,通过 onSavePlatformSettings 交给宿主持久化并刷新 Host Snapshot。Product App 只能消费 theme / appearance 投影,不再保存第二套基础外观设置。

模型设置页由本包完整承载:左侧展示已配置 Provider 列表,右侧展示当前 provider 配置卡;点击“添加模型”会创建一个空白自定义 Provider,不内置推荐服务、国内服务、聚合平台、海外平台或本地模型等固定品牌目录,也不自动写入 default-model。配置卡支持 Provider 名称、Base URL、API 格式、认证方式、Responses API、API Key 配置状态和模型优先级;保存前必须显式填写至少一个模型 ID。provider 图标只用于识别,不决定运行时后端。真实 provider 和默认模型保存必须由宿主 settings.saveModel action handler 接入;API Key 明文只作为瞬时输入交给宿主转发 App Server modelProviderKey/create,不能落到 Product App、React 包状态或普通 JSON。

业务 App 独特设置由本包通过 ProductSettingsExtension 开放:平台设置弹窗会在“业务设置”分组里渲染 extension,并把 settings / onSaveSettings 上下文交给业务 UI。extension 只能保存自身 namespace 下的业务偏好,不能复制平台基础设置。

语音模型页由本包完整承载:包含语音输入快捷键、Fn / 自定义快捷键切换、启用开关、SenseVoice Small 本地模型、安装状态、删除 / 安装模型、音频 / 视频 / 实时录音测试入口和所有转录历史。当前组件只维护 UI 草稿状态,真实快捷键注册、模型下载 / 删除、文件选择、录音权限、SenseVoice / FunASR 转写和历史持久化必须由宿主 host-core ASR action handler 接入,不能落到 Product App。

搜索服务页由本包完整承载:按“已启用(拖拽排序优先级)”和“可用服务”分区展示 Tavily、Bing Search、秘塔搜索、Exa、Brave Search、SerpAPI、Serper、Google CSE 和 Firecrawl;启用卡片内直接提供 API Key 输入、获取 Key 入口,Google CSE 额外提供 Custom Search Engine ID (cx) 输入。当前组件只维护 UI 草稿状态,真实 API Key 加密保存、provider 健康检查、WebSearch 路由和失败回退必须由宿主 host-core search action handler 或 App Server provider/key 控制面接入,不能落到 Product App。

网络页由本包完整承载:包含系统代理检测提示、代理服务器开关、协议 / 地址 / 端口输入、代理认证、代理白名单、模型供应商自动白名单展开项和代理地址预览。当前组件只维护 UI 草稿状态,真实系统代理检测、代理配置保存、HTTP_PROXY / HTTPS_PROXY 环境变量注入和 AI 子进程网络隔离必须由宿主 host-core settings / network action handler 接入,Product App 不能保存代理配置或覆盖系统代理。

关于页由本包完整承载:包含品牌 / logo 预留位、版本号、自动检查更新开关、检查更新、查看更新日志、打开日志目录和版权信息。Product App 只能传入 about 投影或自定义 logo 节点;真实更新检查、更新日志和日志目录打开由宿主 updater / diagnostics action handler 接入,不能落到 Product App。