paper-ink 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,9 +4,11 @@
4
4
 
5
5
  Paper Ink 追求清晰、克制的水墨风格:足够对比度的黑白、淡色边界,以及简洁的交互。常用组件 API 参考 Ant Design,提供组件包和 CLI 源码安装两种使用方式,既能直接使用,也能将源码带回项目自由修改。
6
6
 
7
+ [![Paper Ink 中文组件总览](https://raw.githubusercontent.com/tingxi8087/paper-ink/main/apps/website/public/images/components-overview.png)](https://tingxi8087.github.io/paper-ink/#/showcase)
8
+
7
9
  [在线文档](https://tingxi8087.github.io/paper-ink/) · [组件画廊](https://tingxi8087.github.io/paper-ink/#/showcase) · [快速开始](https://tingxi8087.github.io/paper-ink/#/guide) · [主题实验室](https://tingxi8087.github.io/paper-ink/#/theme)
8
10
 
9
- > 首个公开版本为 **0.1.0**。面向 React 18+、ReactDOM 和 TypeScript 项目。
11
+ > 当前版本为 **0.2.0**。面向 React 18+、ReactDOM 和 TypeScript 项目。
10
12
 
11
13
  ## 为什么选择 Paper Ink
12
14
 
@@ -103,7 +105,7 @@ pnpm --filter paper-ink build
103
105
  pnpm --dir packages/paper-ink pack --pack-destination ../../.artifacts
104
106
  ```
105
107
 
106
- 将生成的 tgz 文件复制到消费项目后执行 `npm install ./paper-ink-0.1.0.tgz`。本仓库也可通过 `pnpm build:registry` 与 `pnpm cli` 使用未发布的本地 CLI 源码。
108
+ 将生成的 tgz 文件复制到消费项目后执行 `npm install ./paper-ink-0.2.0.tgz`。本仓库也可通过 `pnpm build:registry` 与 `pnpm cli` 使用未发布的本地 CLI 源码。
107
109
 
108
110
  </details>
109
111
 
@@ -119,6 +121,22 @@ pnpm --dir packages/paper-ink pack --pack-destination ../../.artifacts
119
121
 
120
122
  这是概览,不代表完整实现对应 Ant Design API。具体用法、示例与支持范围以 [在线文档](https://tingxi8087.github.io/paper-ink/) 为准。组件规划见 [状态清单](https://github.com/tingxi8087/paper-ink/blob/main/doc/component-priorities.md)。
121
123
 
124
+ ## 图标
125
+
126
+ 公开图标库采用 [Tabler Icons](https://tabler.io/icons),MIT 许可。安装 Paper Ink 时会自动安装依赖,不需要单独安装图标包:
127
+
128
+ ```tsx
129
+ import { IconSearch, IconPlus } from 'paper-ink/icons';
130
+ import { Button } from 'paper-ink';
131
+
132
+ <IconSearch size={20} stroke={2} />;
133
+ <Button icon={<IconPlus size={16} />}>新建</Button>;
134
+ ```
135
+
136
+ 保留 Tabler 官方组件名称和属性,支持按需打包,无图标 CSS 和额外包装节点。[图标目录](https://tingxi8087.github.io/paper-ink/#/icons)支持搜索、筛选、复制代码与居中辅助线。
137
+
138
+ 源码安装:`npx @tingxi8087/paper-ink-cli add tabler-icons`,CLI 自动处理依赖。
139
+
122
140
  ## 与 Ant Design 的关系
123
141
 
124
142
  Paper Ink 的常用组件 API 与交互习惯参考 [Ant Design](https://ant.design/),采用独立实现,不依赖 `antd`;提供常用 API 子集,主题及部分复杂组件采用独立设计。它不是 Ant Design 的完整替代,也不保证直接迁移所有现有用法。
@@ -0,0 +1,2 @@
1
+ /** Tabler Icons, re-exported with the original component names and props. */
2
+ export * from '@tabler/icons-react';
@@ -0,0 +1,2 @@
1
+ /** Tabler Icons, re-exported with the original component names and props. */
2
+ export * from '@tabler/icons-react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paper-ink",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A monochrome-first React UI library with familiar APIs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -307,7 +307,11 @@
307
307
  "types": "./dist/use-upload/index.d.ts",
308
308
  "import": "./dist/use-upload/index.js"
309
309
  },
310
- "./upload/style.css": "./dist/upload/style.css"
310
+ "./upload/style.css": "./dist/upload/style.css",
311
+ "./icons": {
312
+ "types": "./dist/icons/index.d.ts",
313
+ "import": "./dist/icons/index.js"
314
+ }
311
315
  },
312
316
  "scripts": {
313
317
  "build": "tsc -p tsconfig.build.json && node ../../scripts/build-css.mjs",
@@ -324,6 +328,7 @@
324
328
  "dependencies": {
325
329
  "@ctrl/tinycolor": "^4.2.1",
326
330
  "@rc-component/mini-decimal": "^1.1.4",
331
+ "@tabler/icons-react": "3.49.0",
327
332
  "dayjs": "^1.11.23"
328
333
  },
329
334
  "repository": {