@sps-woodland/focused-task

中文文档
8.56.21发布于 2026/11/02UNLICENSEDTypeScriptESM + CJS零依赖

SPS Woodland Design System focused task component

原始使用文档
文档目录3 节
  1. @sps-woodland/focused-task
  2. Use @sps-woodland/core instead
  3. Migrate automatically

@sps-woodland/focused-task

SPS Woodland Design System focused task component.

Deprecated: this package will be removed in Woodland 9.0. It only re-exports @sps-woodland/core/focused-task from @sps-woodland/core. Components, props, and behavior are identical, so migrating is an import-path change.

Use @sps-woodland/core instead

import { FocusedTask, useFocusedTask, FocusedTaskActions } from "@sps-woodland/core/focused-task";

import "@sps-woodland/core/focused-task/style.css";

Import every component of a family from the same subpath shown above. Core also has flat per-component subpaths, but they are separate module instances, and mixing them with the family barrel can silently break parent/child components. Import component stylesheets before @sps-woodland/tokens/lib/vanilla-extract/style.css.

Migrate automatically

pnpm dlx --package=@sps-woodland/codemods migrate-wrapper-imports src --write

This rewrites @sps-woodland/focused-task JavaScript and stylesheet imports to the core paths above. Then add @sps-woodland/core (8.53 or later) to your dependencies if needed, remove @sps-woodland/focused-task, and reinstall. See the Woodland 8.0 upgrade guide for details.

版本与发布记录

@sps-woodland/focused-task 共发布 347 个版本,首次发布于 2023/08/08;过去 12 个月发布了 132 个版本。

版本发布日期距今
8.56.21latest2026/11/021 天前
8.56.202026/10/286 天前
8.56.192026/10/286 天前
8.56.182026/10/286 天前
8.56.172026/10/276 天前
8.56.162026/10/277 天前

其他发布通道:rc → 0.0.0-20261022.051351-8a80d01d7。

关于 @sps-woodland/focused-task 的常见问题

@sps-woodland/focused-task 是什么?

SPS林地设计系统重点任务组件

如何安装 @sps-woodland/focused-task?

在项目目录运行 npm install @sps-woodland/focused-task,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0)、react-dom(^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0)、@sps-woodland/core(8.56.21)、@spscommerce/utils(^7.0.0 || ^8.0.0 || ^9.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@sps-woodland/focused-task 支持 TypeScript 吗?

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

@sps-woodland/focused-task 支持 ESM 还是 CommonJS?

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

@sps-woodland/focused-task 可以商用吗?

@sps-woodland/focused-task 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@sps-woodland/focused-task 还在维护吗?

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