@constructor-io/constructorio-ui-asa

中文文档
1.12.1发布于 2026/11/06MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2977

Constructor.io AI Shopping Agent UI library for web applications

原始使用文档
文档目录9 节
  1. Install
  2. Usage
  3. Local Development
  4. Development Scripts
  5. Library Maintenance
  6. Publishing New Versions
  7. Related Libraries
  8. Contributing
  9. License

Constructor.io AI Shopping Agent (ASA) UI Library

npm MIT licensed

React components for Constructor.io's AI Shopping Agent: a conversational shopping assistant.

Documentation →

Install

npm i @constructor-io/constructorio-ui-asa

Usage

import { CioAsaProvider, Chat } from '@constructor-io/constructorio-ui-asa';
import '@constructor-io/constructorio-ui-asa/styles.css';

<CioAsaProvider apiKey='YOUR_API_KEY'>
  <Chat onClose={() => setIsOpen(false)} />
</CioAsaProvider>;

Peer dependencies, layout, product results, tracking, customization and every prop are in the docs.

Local Development

Development Scripts

npm ci                  # Install dependencies for local dev
npm run dev             # Start a local dev server for Storybook
npm run lint            # Run lint
npm run test            # Run tests
npm run check-types     # Run TypeScript type checking

Library Maintenance

npm run compile           # Generate lib folder for publishing to npm
npm run build-storybook   # Generate Storybook static bundle for deploy with GitHub Pages

Publishing New Versions

Dispatch the Publish workflow in GitHub Actions. You're required to provide two arguments:

  • Version Strategy: major, minor, or patch.
  • Title: A title for the release.

This workflow will automatically:

  1. Bump the library version using the provided strategy.
  2. Create a new git tag.
  3. Create a new GitHub release.
  4. Compile the library.
  5. Publish the new version to NPM.
  6. Publish the bundled version to the CDN.
  7. Deploy the Storybook docs to GitHub Pages.

Note: Please don't manually increase the package.json version or create new git tags.

Contributing

  1. Fork the repo and create a new branch.
  2. Run npm ci to install dependencies.
  3. Make your changes.
  4. Run npm run lint and npm run test to verify. For docs changes, follow .claude/docs.md.
  5. Submit a PR for review.

License

MIT © Constructor.io Corporation

版本与发布记录

@constructor-io/constructorio-ui-asa 共发布 19 个版本,首次发布于 2026/08/04;过去 12 个月发布了 19 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.12.1latest2026/11/064 天前
1.12.02026/10/2813 天前
1.11.02026/10/2318 天前
1.10.12026/10/2219 天前
1.10.02026/10/1526 天前
1.9.02026/10/081 个月前

关于 @constructor-io/constructorio-ui-asa 的常见问题

@constructor-io/constructorio-ui-asa 是什么?

Constructor.io AI Shopping Agent UI library for web applications

如何安装 @constructor-io/constructorio-ui-asa?

在项目目录运行 npm install @constructor-io/constructorio-ui-asa,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16.12.0)、tslib(^2.4.0)、react-dom(>=16.12.0)、@constructor-io/constructorio-ui-components(^1.6.0)、@constructor-io/constructorio-client-javascript(^2.93.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@constructor-io/constructorio-ui-asa 支持 TypeScript 吗?

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

@constructor-io/constructorio-ui-asa 支持 ESM 还是 CommonJS?

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

@constructor-io/constructorio-ui-asa 需要什么版本的 Node.js?

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

@constructor-io/constructorio-ui-asa 可以商用吗?

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

@constructor-io/constructorio-ui-asa 的下载量有多少?

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

@constructor-io/constructorio-ui-asa 还在维护吗?

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