@codeamp/block-components

中文文档
0.0.1-beta.14发布于 2025/05/16GPL-2.0-or-laterCommonJS近 30 天下载 3767

React components for the WordPress block editor

原始使用文档
文档目录7 节
  1. Install
  2. Components
  3. Usage
  4. Requirements
  5. Project status
  6. Contributing
  7. Updating the project version number

Code Amp Block Components

React components for the WordPress block editor.

Inspired by the work in 10up/block-components

Install

Run npm install @codeamp/block-components

Components

Usage

Use imports to include the components in your project.

import { MultiSelectControl, ResourceSelectControl } from '@codeamp/block-components';

Requirements

This project is depends on the WordPress block editor and such it expects those packages to already be installed/aliased.

Ensure you add @wordpress/dependency-extraction-webpack-plugin to your project or manually install the WordPress packages.

If you use @wordpress/create-block to create a plugin, this is handled for you automatically.

Project status

This package is currently published as beta while we continue to setup the repository and add testing, but should be completely usable.

Contributing

All contributions are welcome, but at this early stage the priority is to setup testing and improve the documentation.

Updating the project version number

To update the project version number, run the following command:

npm version <update_type>

Where <update_type> is one of the semantic versioning release types: patch, minor, or major. This command will update the version number in package.json, create a version commit, and tag the commit.

版本与发布记录

@codeamp/block-components 共发布 15 个版本,首次发布于 2022/11/12;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.1-beta.14latest2025/05/161.5 年前
0.0.1-beta.132024/03/082 年前
0.0.1-beta.122024/03/062 年前
0.0.1-beta.112024/02/182 年前
0.0.1-beta.102024/02/182 年前
0.0.1-beta.92023/02/103 年前

关于 @codeamp/block-components 的常见问题

@codeamp/block-components 是什么?

React components for the WordPress block editor

如何安装 @codeamp/block-components?

在项目目录运行 npm install @codeamp/block-components,或使用 pnpm add / yarn add / bun add。

@codeamp/block-components 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/codeamp__block-components 是否存在。

@codeamp/block-components 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@codeamp/block-components 可以商用吗?

@codeamp/block-components 使用 GPL-2.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以兼容的 GPL 许可开源。仅在内部使用、不对外分发时不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@codeamp/block-components 的下载量有多少?

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

@codeamp/block-components 还在维护吗?

最新版本 0.0.1-beta.14 发布于 2025/05/16(1.5 年前);至今共发布 15 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/11/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。