@zixiao-labs/extra-icons 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/index.d.ts +22 -0
- package/dist/index.js +4007 -0
- package/package.json +46 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zixiao Laboratories and extra-icons contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zixiao-labs/extra-icons
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React SVG 图标库。首批收录「暗八仙」8 种纹样,每种各有粗线版和细线版。
|
|
4
|
+
|
|
5
|
+
安装:`npm install @zixiao-labs/extra-icons`。完整用法见[英文文档](https://github.com/zixiao-labs/extra-icons/blob/main/docs/getting-started.md)。
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { EightImmortalsSword, EightImmortalsLotusOutline } from "@zixiao-labs/extra-icons";
|
|
9
|
+
|
|
10
|
+
<EightImmortalsSword size={32} aria-label="宝剑" />;
|
|
11
|
+
<EightImmortalsLotusOutline size={48} color="#385d47" />;
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
组件支持 React 18、19,默认大小为 `1em`,颜色继承 `currentColor`。可传入 `size`、`width`、`height` 和其他标准 SVG 属性。图标默认按装饰处理;传入 `aria-label` 或 `aria-labelledby` 可提供无障碍名称。
|
|
15
|
+
|
|
16
|
+
| 纹样 | 粗线版 | 细线版 |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| 宝剑 | `EightImmortalsSword` | `EightImmortalsSwordOutline` |
|
|
19
|
+
| 葫芦 | `EightImmortalsGourd` | `EightImmortalsGourdOutline` |
|
|
20
|
+
| 团扇 | `EightImmortalsRoundFan` | `EightImmortalsRoundFanOutline` |
|
|
21
|
+
| 荷花 | `EightImmortalsLotus` | `EightImmortalsLotusOutline` |
|
|
22
|
+
| 鱼鼓 | `EightImmortalsFishDrum` | `EightImmortalsFishDrumOutline` |
|
|
23
|
+
| 花篮 | `EightImmortalsFlowerBasket` | `EightImmortalsFlowerBasketOutline` |
|
|
24
|
+
| 玉板 | `EightImmortalsJadeClappers` | `EightImmortalsJadeClappersOutline` |
|
|
25
|
+
| 洞箫 | `EightImmortalsFlute` | `EightImmortalsFluteOutline` |
|
|
26
|
+
|
|
27
|
+
本地运行 `pnpm test` 执行 Lightning 测试,运行 `pnpm build` 用 tsdown 生成 ESM 和 TypeScript 声明。相似度门禁逐个比对组件渲染结果和从参考图裁出的独立像素基准,按前景交并比(IoU)计算,粗线版须达到 96%,细线版须达到 92%。`pnpm pack` 会先运行类型检查、构建及测试。
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes } from "react";
|
|
2
|
+
type IconProps = Omit<ComponentPropsWithoutRef<"svg">, "children" | "dangerouslySetInnerHTML"> & {
|
|
3
|
+
size?: number | string;
|
|
4
|
+
};
|
|
5
|
+
type IconComponent = ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
|
|
6
|
+
export declare const EightImmortalsSword: IconComponent;
|
|
7
|
+
export declare const EightImmortalsSwordOutline: IconComponent;
|
|
8
|
+
export declare const EightImmortalsGourd: IconComponent;
|
|
9
|
+
export declare const EightImmortalsGourdOutline: IconComponent;
|
|
10
|
+
export declare const EightImmortalsRoundFan: IconComponent;
|
|
11
|
+
export declare const EightImmortalsRoundFanOutline: IconComponent;
|
|
12
|
+
export declare const EightImmortalsLotus: IconComponent;
|
|
13
|
+
export declare const EightImmortalsLotusOutline: IconComponent;
|
|
14
|
+
export declare const EightImmortalsFishDrum: IconComponent;
|
|
15
|
+
export declare const EightImmortalsFishDrumOutline: IconComponent;
|
|
16
|
+
export declare const EightImmortalsFlowerBasket: IconComponent;
|
|
17
|
+
export declare const EightImmortalsFlowerBasketOutline: IconComponent;
|
|
18
|
+
export declare const EightImmortalsJadeClappers: IconComponent;
|
|
19
|
+
export declare const EightImmortalsJadeClappersOutline: IconComponent;
|
|
20
|
+
export declare const EightImmortalsFlute: IconComponent;
|
|
21
|
+
export declare const EightImmortalsFluteOutline: IconComponent;
|
|
22
|
+
export type { IconProps };
|