# @artsy/palette-mobile 中文文档

规范地址：https://npmcn.com/package/%40artsy/palette-mobile/

版本：24\.22\.0
npm 元数据更新时间：2026-11-17T10:22:27.543Z
中文译文更新时间：2026-11-17T17:54:46.693Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40artsy/palette-mobile
原文对照：https://npmcn.com/package/%40artsy/palette-mobile/?lang=original
项目主页：https://github.com/artsy/palette-mobile#readme
源码仓库：https://github.com/artsy/palette-mobile

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：664 kB，440 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：24\.x
- 运行依赖：6 个
- peer 依赖：react \*，react-native \*，react-native-svg \*，styled-components \>= 5，react-native-blurhash \*，react-native-worklets \*，react-native-pager-view \*，react-native-reanimated \*，@d11/react-native-fast-image \*，react-native-haptic-feedback \*，react-native-linear-gradient \*，react-native-collapsible-tab-view \*
- 首次发布：2022-09-02T12:18:50.116Z
- 最新版本发布：2026-11-17T10:22:27.069Z
- 近 30 天下载量：4680（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：636（近 12 个月 87 个）

## 中文简介

Artsy的设计系统

## 安装

```sh
npm install @artsy/palette-mobile
```

也可以使用：`pnpm add @artsy/palette-mobile`、`yarn add @artsy/palette-mobile`、`bun add @artsy/palette-mobile`

## README

# 调色板移动

# @artsy/palette-移动 [![npm version](https://badge.fury.io/js/%40artsy%2Fpalette-mobile.svg)](https://www.npmjs.com/package/@artsy/palette-mobile) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/artsy/palette-mobile/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/artsy/palette-mobile/tree/main)

Artsy的移动设计系统

## 元数据

-   点人: [@araujobarret (英语)](https://github.com/araujobarret) [@ MrsSltun (英语)](https://github.com/MrSltun)
-   Web 调色板 : [调色板](https://github.com/artsy/palette)

## 什么是调色板?

调色器是原始,出品不可知元素的集合,有助于将Artsy的外观和感觉囊括在基位. 这个项目打算用于我们的数字产品组合.

## 我的部件属于调色板吗?

如果该组件作为品牌适用于Artsy,并且可以/将会被跨多款数字产品使用,那么Palette就是一个很好的场所. 如果它是高度具体的产品,那么最好把部件留在使用的地方. 我们以后可以搬东西!

## 寻找家用视图组件?

在Eigen (Q4 2024)中推出的由服务器驱动的家庭取景架构,使用了家取景部分组件的标准库.

这些组件可能使用调色板-移动原始,但此处没有定义. 相反,它们被定义 [直接在爱根](https://github.com/artsy/eigen/tree/main/src/app/Scenes/HomeView/Sections) 和记录 [此逗号页面](https://www.notion.so/artsy/Home-view-section-reference-150cab0764a0803fb00ed5dc3d860d1f)。 。 。 .

如果上述指导仍然没有给您带来良好的办学意识,请加入移动练习会.

# 如何安装

-   安装主库

```sh
yarn add @artsy/palette-mobile
```

-   安装本地端点解析器

```sh
yarn add react-native-haptic-feedback react-native-linear-gradient react-native-reanimated react-native-svg react-native-safe-area-context
```

## 如何捐款

如果您想在调色板上添加一个新的组件,请使用组件 spec模板创建一个问题. 这样可以让设计和工程都有机会在前进前偷看提案并提供反馈.

## 地方发展

```sh
mise install
```

如果您仍在使用灰:

```sh
asdf install
```

使用 :

```sh
yarn install
yarn setup:artsy
yarn install:all
```

使用 :

```sh
yarn ios
```

或者说

```sh
yarn android
```

## 部署到测试 Flight 和游戏存储

### 本地建筑

本地构建和提交 iOS 和 Android :

```sh
brew install eas-cli # First time only
brew install gh # First time only
```

如果Android 本地构建配置在更改后似乎不同步 `Example/app.json` 或与本地有关的附属关系,运行:

```sh
cd Example
npx expo prebuild --clean
```

### 触发云通过 GitHub 动作构建

```sh
yarn deploy-beta
```

此同步整个版本编号 `package.json`, (中文(简体) ), `Example/package.json`,以及 `Example/app.json` 以匹配最新版本 `main`,然后强制将您的当前分支推到 `beta-ios` 财务报告和审定财务报表 `beta-android`, (中文(简体) ), 它触发了GitHub Actions上的iOS和Androidβ工作流程. (单位:千美元)[https://github.com/artsy/palette-mobile/actions 互联网档案馆的存檔,存档日期2013-12-02](https://github.com/artsy/palette-mobile/actions)) (中文(简体) ).

## 使用调色板本地版本开发特性

在Palette中开发出新的组件时,在消耗应用(如Eigen)中测试这些组件往往有用. 然而,由于React Industrial对同义词的支持不足,这可能很难. 输入 [雅尔克语](https://github.com/wclr/yalc). Yalc是一个迷你软件包管理器,人们可以发布和从中安装,这使得从您的应用程序外实时测试代码变得容易.

> 说明: [@artsy/palette-移动](https://github.com/artsy/palette-mobile) 使用故事书来开发特征; 在那里先工作! 然后,在准备就绪时(如有必要),使用下面描述的流量在当地测试您的代码。 也可以通过附加: `canary` 标签为您的 PR.

### 设置

-   安装 `yalc` 全球:

```sh
yarn global add yalc
```

-   导航到 `palette-mobile` 在终端开始监视器 :

```sh
cd palette-mobile
yarn local-palette-dev
```

-   导航回Eigen并链接:

```sh
cd eigen
yarn local-palette-dev
yarn start
```

这将更新 `package.json` 指向雅尔克出版的调色板版本.

-   当开发出您的本地调色板特性时, 请确定取消链接 :

```sh
yarn local-palette-dev:stop
```

## 重置消耗调色板移动

-   [爱根](https://github.com/artsy/eigen)
-   [能源](https://github.com/artsy/energy)

您可以使用 `yarn add @artsy/palette-mobile`。 。 。 . _别忘了加上所有的东西 `peerDependencies` 你的项目._

关于将调色板连接到本地运行版本的移动应用程序,请参见 [这些文件](https://github.com/artsy/eigen/blob/main/docs/developing_local_palette.md)。 。 。 .

## 关于艺术

[![](https://avatars2.githubusercontent.com/u/546231?s=200&v=4)](https://www.artsy.net/)

这个项目是设计师和工程师在 [艺术](https://www.artsy.net/),则 世界领先和最大的在线艺术市场和平台 发现艺术. 我们的核心之一 [工程原则](https://npmcn.com/package/%40artsy/palette-mobile/culture/engineering-principles.md) 这是 [打开 默认来源](https://npmcn.com/package/%40artsy/palette-mobile/culture/engineering-principles.md#open-source-by-default) 这意味着我们努力分享尽可能多的细节 我们的工作尽可能.

你可以从 [我们的博客](https://artsy.github.io/) 并通过以下方式: [@ Artsy 打开来源](https://twitter.com/ArtsyOpenSource) 或者通过检查来探索我们的公开数据 [我们的API](https://developers.artsy.net/)如果你对Arty的事业感兴趣,读读 我们 [工作岗位](https://www.artsy.net/jobs)来啊!

## 常见问题

### @artsy/palette-mobile 是什么？

Artsy的设计系统

### 如何安装 @artsy/palette-mobile？

在项目目录运行 npm install @artsy/palette-mobile，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\*）、react-native（\*）、react-native-svg（\*）、styled-components（\>= 5）、react-native-blurhash（\*）、react-native-worklets（\*）、react-native-pager-view（\*）、react-native-reanimated（\*）、@d11/react-native-fast-image（\*）、react-native-haptic-feedback（\*）、react-native-linear-gradient（\*）、react-native-collapsible-tab-view（\*）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @artsy/palette-mobile 支持 TypeScript 吗？

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

### @artsy/palette-mobile 支持 ESM 还是 CommonJS？

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

### @artsy/palette-mobile 需要什么版本的 Node\.js？

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

### @artsy/palette-mobile 可以商用吗？

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

### @artsy/palette-mobile 的下载量有多少？

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

### @artsy/palette-mobile 还在维护吗？

最新版本 24\.22\.0 发布于 2026/11/17（今天）；至今共发布 636 个版本，其中过去 12 个月发布了 87 个；首次发布于 2022/09/02。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

