@epilot360/illustrations

中文文档
1.2.1发布于 2026/07/23MITTypeScriptES Module零依赖近 30 天下载 5862

用于 epilot 平台的可树摇摆插图库

中文使用文档
文档目录18 节
  1. 特征
  2. 安装
  3. 使用量
  4. 基本用途
  5. 带有自定义大小
  6. 无障碍
  7. 带有自定义样式
  8. 可用说明
  9. 契约贴现
  10. 发展
  11. 先决条件
  12. 设置
  13. 脚本
  14. 用于 Single- SPA 微前端
  15. 套装大小
  16. 浏览器支持
  17. 捐款
  18. 许可证

@ epilot360/ 喷发

Epilot平台可树可摇动插图库. 由React所建,TypeScript,并优化为最小捆绑大小.

特征

  • 🎨 高质量 SVG 插图 在图像中创建
  • 📦 可动摇的树 - 只导入你需要的
  • ⚡ 业绩优化 - 最小捆绑尺寸
  • 🎯 类型脚本支持 - 全套安全
  • ♿ 可访问 - 建筑无障碍
  • 📱 响应 - 在所有屏幕尺寸上工作
  • 🎛️ 可自定义 - 灵活的尺寸和样式选择

安装

npm install @epilot360/illustrations
# or
yarn add @epilot360/illustrations
# or
pnpm add @epilot360/illustrations

使用量

基本用途

import { CouponDiscount } from '@epilot360/illustrations';

function App() {
  return (
    <div>
      <CouponDiscount />
    </div>
  );
}

带有自定义大小

import { CouponDiscount } from '@epilot360/illustrations';

function App() {
  return (
    <div>
      {/* Using predefined sizes */}
      <CouponDiscount size="large" />
      
      {/* Using custom dimensions */}
      <CouponDiscount width={200} height={200} />
    </div>
  );
}

无障碍

import { CouponDiscount } from '@epilot360/illustrations';

function App() {
  return (
    <div>
      {/* Decorative (hidden from screen readers) */}
      <CouponDiscount />
      
      {/* With accessibility label */}
      <CouponDiscount 
        aria-label="20% discount coupon"
      />
    </div>
  );
}

带有自定义样式

import { CouponDiscount } from '@epilot360/illustrations';

function App() {
  return (
    <div>
      <CouponDiscount 
        className="my-custom-class"
        style={{ 
          border: '2px solid #e2e8f0',
          borderRadius: '8px'
        }}
      />
    </div>
  );
}

可用说明

契约贴现

一个充满活力的优惠券折扣插图 完美地用于宣传内容和营销材料.

道具 :

  • size?: 'small' | 'medium' | 'large' - 预定义的大小变体
  • width?: string | number - 自定义宽度
  • height?: string | number - 自定义高度
  • className?: string - 额外CSS类
  • style?: React.CSSProperties - 内含样式
  • aria-label?: string - 无障碍标签。 如果提供插图,屏幕阅读器就可以访问. 如果不提供,插图会是装饰性的(隐藏在屏幕阅读器中).

发展

先决条件

  • 节点.js 18+
  • npm,纱线,或pnpm

设置

# Install dependencies
npm install

# Start development server for documentation
npm run dev

# Build the library
npm run build:lib

# Build documentation site
npm run build:docs

脚本

文档库( L)

  • npm run dev - 启动文档开发服务器
  • npm run build:lib - 建造图书馆以供分发
  • npm run build:docs - 建立文件网站

SystemJS 单发卡套装

  • npm run dev:bundle - 与Vite建立并服务SystemJS捆绑(http://localhost:3456)
  • npm run build:bundle - 为微前端构建系统JS捆绑
  • npm run serve:bundle:vite - 使用 Vite 预览服务器完成已建捆绑

代码质量

  • npm run type-check - 运行类型脚本类型检查
  • npm run lint - 运行ESLint
  • npm run lint:fix - 解决ESLint问题

用于 Single- SPA 微前端

此库可用作单斯帕应用程序中的SystemJS捆绑:

# Build and serve the bundle locally
npm run dev:bundle

捆绑将在 http://localhost:3456/bundle.js 并给予中央遥感中心全力支持.

导入地图配置 :

{
  "imports": {
    "@epilot360/illustrations": "http://localhost:3456/bundle.js"
  }
}

捆绑使用:

  • 系统JS格式 单相容性
  • 经典JSX转型 (无反应/jsx运行时间依赖)
  • 外部反应/反应DOM (共同依赖关系)

套装大小

库最优化为最小捆绑大小 :

  • 可动摇的树: 只导入需要的插图
  • 基于 SVG: 任何大小的简单渲染的矢量图形
  • 已缩小:生产建筑被精细化和优化
  • 无外部依赖关系: 0 运行时间依赖性

浏览器支持

  • Chrome 88+ (英语)
  • Firefox 85+ (英语)
  • 萨法里14+
  • 边缘88+

捐款

  1. 叉子存储器
  2. 创建特性分支 : git checkout -b feature/new-illustration
  3. 按照已有的图案添加您的插图
  4. 更新文档
  5. 运行测试和林入: npm run lint && npm run type-check
  6. 提交更改 : git commit -m 'Add new illustration'
  7. 推到树枝上: git push origin feature/new-illustration
  8. 创建拉动请求

许可证

麻省理工学院

版本与发布记录

@epilot360/illustrations 共发布 12 个版本,首次发布于 2025/11/11;过去 12 个月发布了 8 个版本。

版本发布日期距今
1.2.1latest2026/07/233 个月前
1.2.02026/07/163 个月前
1.1.02026/06/154 个月前
1.1.0-alpha.0alpha2026/06/085 个月前
1.0.72026/01/159 个月前
1.0.62025/11/2111 个月前

关于 @epilot360/illustrations 的常见问题

@epilot360/illustrations 是什么?

用于 epilot 平台的可树摇摆插图库

如何安装 @epilot360/illustrations?

在项目目录运行 npm install @epilot360/illustrations,或使用 pnpm add / yarn add / bun add。

@epilot360/illustrations 支持 TypeScript 吗?

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

@epilot360/illustrations 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@epilot360/illustrations 可以商用吗?

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

@epilot360/illustrations 的下载量有多少?

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

@epilot360/illustrations 还在维护吗?

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