open-index/open-npm huggingface dataset:
npm package: @raphaelbravo19/x-data-grid
Description: The Community plan edition of the Data Grid components (MUI X).
Author: Raphael Bravo
Latest version: 7.7.1

# MUI X Data Grid

This package is the Community plan edition of the Data Grid components.
It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.

## Installation

Install the package in your project directory with:

```bash
npm install @mui/x-data-grid
```

This component has the following peer dependencies that you will need to install as well.

```json
"peerDependencies": {
  "@mui/material": "^5.15.14",
  "react": "^17.0.0 || ^18.0.0",
  "react-dom": "^17.0.0 || ^18.0.0"
},
```

## Documentation

Visit [https://mui.com/x/react-data-grid/](https://mui.com/x/react-data-grid/) to view the full documentation.
npm package: @raphaellcs/auto-tasker
Description: 任务自动化工具 - 定时执行、条件触发、任务编排
Author: 梦心
Latest version: 1.0.0

# @claw-dev/auto-tasker

> 任务自动化工具 - 定时执行、条件触发、任务编排

## 🚀 功能

- **定时执行**：固定间隔或 cron 表达式
- **文件监控**：文件变化自动触发任务
- **任务编排**：串行或并行执行
- **灵活配置**：JSON 配置文件
- **执行日志**：清晰的执行状态和输出

## 📦 安装

```bash
npx @claw-dev/auto-tasker
```

## 📖 快速开始

### 1. 初始化配置

```bash
auto-task init
```

生成 `auto-tasker.json` 配置文件。

### 2. 编辑配置

```json
{
  "version": "1.0",
  "mode": "series",
  "tasks": [
    {
      "name": "备份代码",
      "command": "git add . && git commit -m 'auto-backup' && git push",
      "interval": 3600000
    }
  ]
}
```

### 3. 运行任务

```bash
# 执行所有任务
auto-task run

# 执行指定任务
auto-task run --task "备份代码"

# 使用自定义配置文件
auto-task run --config /path/to/config.json
```

## 📋 配置说明

### 全局配置

| 字段 | 类型 | 说明 |
|------|------|------|
| `version` | string | 配置文件版本 |
| `mode` | string | 执行模式：`series`（串行）或 `parallel`（并行） |

### 任务配置

| 字段 | 类型 | 必需 | 说明 |
|------|------|------|------|
| `name` | string | ✅ | 任务名称 |
| `command` | string | ✅ | 要执行的命令 |
| `interval` | number | ❌ | 定时间隔（毫秒） |
| `schedule` | string | ❌ | cron 表达式（未实现） |
| `watch` | string | ❌ | 监控的文件/目录 |
| `debounce` | number | ❌ | 防抖延迟（毫秒），默认 1000 |
| `cwd` | string | ❌ | 工作目录 |
| `env` | object | ❌ | 环境变量 |
| `verbose` | boolean | ❌ | 详细输出 |
| `stopOnError` | boolean | ❌ | 失败时停止，默认 true |

## 🎯 使用场景

### 1. 自动备份

```json
{
  "name": "备份项目",
  "command": "git add . && git commit -m 'auto-backup' && git push",
  "interval": 3600000
}
```

### 2. 文件变化触发测试

```json
{
  "name": "运行测试",
  "command": "npm test",
  "watch": "src/",
  "debounce": 2000
}
```

### 3. 定时清理

```json
{
  "name": "清理临时文件",
  "command": "rm -rf temp/",
  "schedule": "0 0 * * *"
}
```

### 4. 构建部署流水线

```json
{
  "mode": "series",
  "tasks": [
    {
      "name": "安装依赖",
      "command": "npm install"
    },
    {
      "name": "运行测试",
      "command": "npm test"
    },
    {
      "name": "构建",
      "command": "npm run build"
    },
    {
      "name": "部署",
      "command": "npm run deploy"
    }
  ]
}
```

## 🔍 执行模式

### 串行执行 (series)

任务按顺序执行，前一个任务成功后才执行下一个。

```bash
auto-task run --config config-series.json
```

### 并行执行 (parallel)

所有任务同时执行。

```json
{
  "mode": "parallel",
  "tasks": [...]
}
```

## 📊 输出示例

### 成功

```
执行任务: 备份代码
  命令: git add . && git commit -m 'auto-backup' && git push
  ✓ 成功 (2450ms)

==================================================
✓ 所有任务成功
```

### 失败

```
执行任务: 运行测试
  命令: npm test
  ✗ 失败 (120ms)
  stderr: FAIL test/example.test.js

==================================================
✗ 1/2 个任务失败
```

## 💡 提示

- 使用 `interval` 进行简单的定时任务
- 使用 `watch` 监控文件变化（如代码修改后自动测试）
- `debounce` 可以防止频繁触发（如保存时）
- 定期备份你的配置文件
- 敏感信息使用环境变量（`env` 字段）

## 🚧 待实现

- [ ] 完整的 cron 表达式支持
- [ ] 任务依赖
- [ ] 通知功能（邮件、Webhook）
- [ ] 执行历史记录
- [ ] Web UI

## 🤝 贡献

欢迎提交 Issue 和 PR！

## 📄 许可证

MIT © 梦心

---

Made with 🌙 by 梦心
npm package: @raphaellcs/color-picker
Description: 颜色选择工具 - 生成和转换颜色代码
Author: 梦心
Latest version: 1.0.0

# @claw-dev/color-picker

> 颜色选择工具 - 生成和转换颜色代码

## 🎨 功能

- **HEX 转 RGB**：十六进制颜色转 RGB
- **RGB 转 HEX**：RGB 值转十六进制
- **RGB 转 HSL**：RGB 值转 HSL 色彩空间
- **HSL 转 RGB**：HSL 色彩空间转 RGB
- **生成调色板**：基于主色生成和谐调色板
- **随机颜色**：生成随机颜色
- **颜色预览**：ANSI 颜色块显示

## 📦 安装

```bash
npx @claw-dev/color-picker
```

## 📖 快速开始

### 1. 转换颜色格式

```bash
# HEX 转 RGB/HSL
color-picker convert #ff5733

# 只显示 HSL
color-picker convert #ff5733 --hsl
```

输出：

```
🎨 颜色转换

HEX: #FF5733
RGB: rgb(255, 87, 51)
HSL: hsl(14, 100%, 60%)

 ████████████ 
 ████████████ 
```

### 2. 生成调色板

```bash
# 生成 10 个和谐颜色
color-picker palette #ff5733

# 生成 20 个
color-picker palette #ff5733 --count 20

# 显示颜色预览
color-picker palette #ff5733 --preview
```

### 3. 生成随机颜色

```bash
# 生成 1 个随机颜色
color-picker random

# 生成 5 个随机颜色
color-picker random --count 5

# 显示颜色预览
color-picker random --count 3 --preview
```

## 📋 命令

### convert

转换颜色格式。

```bash
color-picker convert <hex>
```

**选项：**
- `--hsl` - 显示 HSL 格式
- `--no-preview` - 不显示颜色预览块

**输出：**
- HEX 值（大写）
- RGB 值（rgb(r, g, b)）
- HSL 值（hsl(h, s%, l%)）
- ANSI 颜色预览块

### palette

基于主色生成和谐调色板。

```bash
color-picker palette <hex>
```

**选项：**
- `-n, --count <number>` - 颜色数量（默认 10）
- `--preview` - 显示颜色预览块

**调色板生成规则：**
- 保持色相（H）不变
- 调整饱和度（S）：从主色开始，逐渐变化
- 调整亮度（L）：从主色开始，向两端扩展

### random

生成随机颜色。

```bash
color-picker random
```

**选项：**
- `-n, --count <number>` - 生成数量（默认 1）
- `--preview` - 显示颜色预览块

## 🎨 色彩格式

### HEX

十六进制表示法，如 `#FF5733`。

### RGB

红绿蓝三原色表示法，如 `rgb(255, 87, 51)`。

### HSL

色相、饱和度、亮度表示法，如 `hsl(14, 100%, 60%)`。

| 格式 | 说明 | 示例 |
|------|------|------|
| HEX | 网页常用 | `#FF5733` |
| RGB | 图形处理 | `rgb(255, 87, 51)` |
| HSL | 设计、调色 | `hsl(14, 100%, 60%)` |

## 💡 使用场景

### 1. 网页设计

```bash
# 选择主色，生成调色板
color-picker palette #ff5733 --preview
```

获得一组和谐的颜色用于网页设计。

### 2. UI 设计

```bash
# 生成随机的 UI 配色
color-picker random --count 3 --preview
```

快速生成多个配色方案。

### 3. 品牌设计

```bash
# 品牌色转换为所有格式
color-picker convert #ff5733
```

获取品牌色的所有格式表示。

### 4. 开发调试

```bash
# HEX 转 RGB
color-picker convert #ff5733
```

快速转换不同颜色格式用于开发。

## 🎨 颜色预览

当使用 `--preview` 选项时，会显示 ANSI 颜色块：

```
 ████████████ 
 ████████████ 
```

这能让你直观看到颜色的效果。

## 🔧 颜色算法

### HEX 转 RGB

```javascript
hex = hex.replace('#', '');
r = parseInt(hex.substring(0, 2), 16);
g = parseInt(hex.substring(2, 4), 16);
b = parseInt(hex.substring(4, 6), 16);
```

### RGB 转 HSL

```javascript
r /= 255;
g /= 255;
b /= 255;

max = Math.max(r, g, b);
min = Math.min(r, g, b);
l = (max + min) / 2;

if (max === min) {
  h = 0;
} else {
  d = max - min;
  if (max === r) {
    h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
  } else if (max === g) {
    h = ((b - r) / d + 2) / 6;
  } else {
    h = ((r - g) / d + 4) / 6;
  }
}

s = l > 0.5 ? (max - min) / (2 - max - min) : 0;
```

### 调色板生成

基于主色的 HSL 值生成：

1. **保持色相（H）不变**
2. **调整饱和度（S）**：从主色开始，逐渐降低
3. **调整亮度（L）**：从主色开始，向两端扩展

## 🚧 待实现

- [ ] 支持更多色彩空间（CMYK、LAB）
- [ ] 颜色对比度计算
- [ ] 颜色和谐规则分析
- [ ] 导出为 CSS 变量
- [ ] 导出为设计资源

## 🤝 贡献

欢迎提交 Issue 和 PR！

## 📄 许可证

MIT © 梦心

---

Made with 🌙 by 梦心
npm package: @raphaellcs/log-analyzer
Description: 日志分析工具 v2.1.0 - 新增日志归档功能
Author: 梦心
Latest version: 2.1.0

# log-analyzer

日志分析工具 - 快速分析日志文件，提取关键信息

## 功能

- **日志分析**：统计日志级别、错误、警告数量
- **模式搜索**：快速查找包含特定内容的日志
- **实时监控**：监控日志文件变化，实时输出
- **异常检测**：检测错误突增、重复错误、趋势分析
- **错误分类**：自动将错误分类（数据库、网络、内存、文件系统等）
- **多文件聚合**：同时分析多个日志文件
- **日志归档**：归档旧日志文件，支持 gzip 压缩

## 安装

```bash
# 使用 npx 直接运行（推荐）
npx @raphaellcs/log-analyzer analyze app.log

# 全局安装
npm install -g @raphaellcs/log-analyzer

# 然后使用
log-analyzer analyze app.log
```

## 使用方法

### 日志分析

```bash
# 分析单个日志
log-analyzer analyze app.log

# 指定输出格式
log-analyzer analyze app.log -o result.json -f json

# 只显示错误
log-analyzer analyze app.log --only-errors
```

### 异常检测

```bash
# 检测异常
log-analyzer detect app.log

# 检测错误突增
log-analyzer detect app.log --spike-threshold 5

# 检测重复错误
log-analyzer detect app.log --repeat-threshold 3

# 检测趋势变化
log-analyzer detect app.log --trend-window 300
```

### 多文件聚合

```bash
# 聚合多个日志
log-analyzer aggregate logs/*.log

# 递归聚合目录
log-analyzer aggregate logs/ -r

# 指定输出格式
log-analyzer aggregate logs/*.log -o summary.json -f json
```

### 日志归档

```bash
# 归档单个文件
log-analyzer archive app.log

# 归档到指定目录
log-analyzer archive app.log --archive-dir ./archive

# 归档并压缩
log-analyzer archive app.log --compress

# 归档目录
log-analyzer archive-dir /var/log/myapp --compress

# 显示归档统计
log-analyzer archive-stats --archive-dir ./archive
```

## 适用场景

- 快速定位系统错误
- 分析日志异常趋势
- 聚合分析多个服务的日志
- DevOps 运维监控
- 自动日志归档和备份

## 项目地址

- **GitHub**: https://github.com/RaphaelLcs-financial/log-analyzer
- **npm**: https://www.npmjs.com/package/@raphaellcs/log-analyzer

## 开源和贡献

所有工具都是开源的，欢迎提交 Issue 和 PR！

- **GitHub**: https://github.com/RaphaelLcs-financial
- **npm**: https://www.npmjs.com/~raphaellcs

如果你觉得这个工具对你有帮助，请给个 Star ⭐️，或者考虑[赞助我](https://github.com/sponsors/RaphaelLcs-financial)！

---

**作者**: 梦心
**GitHub**: https://github.com/RaphaelLcs-financial
**npm**: https://www.npmjs.com/~raphaellcs
npm package: @raphaellcs/port-checker
Description: 端口占用检查工具 - 快速查看端口占用情况
Author: 梦心
Latest version: 1.0.0

# @claw-dev/port-checker

> 端口占用检查工具 - 快速查看端口占用情况

## 🚀 功能

- **检查端口**：查看单个端口是否被占用
- **批量检查**：检查多个端口
- **列出占用**：列出所有占用的端口
- **终止进程**：杀掉占用端口的进程
- **详细信息**：显示进程名称、PID、用户等

## 📦 安装

```bash
npx @claw-dev/port-checker
```

## 📖 快速开始

### 1. 检查单个端口

```bash
port-checker check 3000
```

输出：

```
📋 端口占用情况

✓ 端口 3000 可用
```

如果被占用：

```
📋 端口占用情况

✗ 端口 3000 被占用
  进程: node
  PID: 12345
  命令: node /path/to/app.js
  用户: yourname
```

### 2. 检查多个端口

```bash
port-checker check-all 3000 8000 8080
```

检查多个端口是否被占用。

### 3. 列出所有占用的端口

```bash
port-checker list
```

输出所有被占用的端口和对应进程。

### 4. 杀掉占用端口的进程

```bash
port-checker kill 3000
```

终止占用端口 3000 的进程。

## 📋 命令

### check

检查单个端口是否被占用。

```bash
port-checker check <port>
```

**参数：**
- `<port>` - 端口号

**退出码：**
- 0 - 端口可用
- 1 - 端口被占用

### check-all

检查多个端口。

```bash
port-checker check-all <port1> <port2> ...
```

**参数：**
- `<port1> <port2> ...` - 多个端口号

### list

列出所有占用的端口。

```bash
port-checker list
```

**选项：**
- `-p, --port <number>` - 只显示指定端口

### kill

杀掉占用指定端口的进程。

```bash
port-checker kill <port>
```

**参数：**
- `<port>` - 端口号

**警告：** 此命令会终止进程，请谨慎使用。

## 🎯 使用场景

### 1. 启动服务前检查

```bash
# 检查端口是否可用
port-checker check 3000

# 如果可用，启动服务
if [ $? -eq 0 ]; then
    npm start
fi
```

### 2. 快速查看占用

```bash
# 查看端口 3000 被谁占用
port-checker list -p 3000

# 查看所有占用
port-checker list
```

### 3. 释放端口

```bash
# 终止占用端口的进程
port-checker kill 3000
```

### 4. 批量检查常用端口

```bash
# 检查常用的开发端口
port-checker check-all 3000 8000 8080 5432 27017
```

### 5. 脚本中使用

```bash
#!/bin/bash

# 启动服务前检查端口
PORT=3000

if port-checker check $PORT; then
    echo "端口 $PORT 可用，启动服务..."
    npm start
else
    echo "端口 $PORT 被占用"
    exit 1
fi
```

## 💡 提示

### 1. 常用端口

| 端口 | 用途 |
|------|------|
| 3000 | 开发服务器（Node.js/Express）|
| 8080 | 备用开发服务器 |
| 5432 | PostgreSQL |
| 27017 | MongoDB |
| 6379 | Redis |
| 3306 | MySQL |

### 2. 安全提示

使用 `kill` 命令前，请确认：
- 你知道这个进程是什么
- 终止它不会影响其他服务
- 你有权限终止这个进程

### 3. 跨平台

这个工具支持：
- Linux
- macOS
- Windows（部分功能）

## 🔧 故障排查

### 1. 权限问题

查看其他用户的进程可能需要 sudo：

```bash
sudo port-checker list
```

### 2. lsof 未安装

Linux/macOS 需要 `lsof` 命令：

```bash
# macOS
brew install lsof

# Ubuntu/Debian
sudo apt-get install lsof

# CentOS/RHEL
sudo yum install lsof
```

### 3. 检查失败

如果检查失败，确保：
- 端口号在有效范围内（1-65535）
- 你有权限访问端口信息
- `lsof` 或 `netstat` 可用

## 🚧 待实现

- [ ] 按进程名过滤
- [ ] 按用户过滤
- [ ] 显示监听地址
- [ ] 显示连接数
- [ ] 历史记录

## 🤝 贡献

欢迎提交 Issue 和 PR！

## 📄 许可证

MIT © 梦心

---

Made with 🌙 by 梦心
npm package: @raphaellcs/starter
Description: OpenClaw 技能快速启动器 - 一键生成技能骨架
Author: 梦心
Latest version: 1.0.0

# @claw-dev/starter

> OpenClaw 技能快速启动器 - 一键生成技能骨架，支持格式验证

## 🚀 快速开始

### 交互式创建

```bash
npx @claw-dev/starter
```

### 命令行创建

```bash
# 基础模板
npx @claw-dev/starter create my-skill

# NPM 模块模板
npx @claw-dev/starter create my-skill -t npm

# TypeScript 模板
npx @claw-dev/starter create my-skill -t typescript

# 完整选项
npx @claw-dev/starter create my-skill \
  --template typescript \
  --description "一个很棒的技能" \
  --emoji "⚡" \
  --author "你的名字"
```

## 📦 模板

| 模板 | 说明 |
|------|------|
| `basic` | 基础模板 - 最小结构，只需 SKILL.md |
| `npm` | NPM 模块模板 - 包含 package.json，可发布到 npm |
| `typescript` | TypeScript 模板 - 类型安全，适合复杂技能 |

## 📁 生成结构

### Basic 模板

```
my-skill/
├── SKILL.md          # 技能定义文件
└── scripts/          # 脚本目录（空）
```

### NPM 模板

```
my-skill/
├── SKILL.md
├── package.json      # NPM 配置
├── index.js          # 入口文件
└── scripts/
```

### TypeScript 模板

```
my-skill/
├── SKILL.md
├── package.json
├── tsconfig.json     # TypeScript 配置
├── src/
│   └── index.ts      # TypeScript 源码
└── dist/             # 编译输出（自动生成）
```

## ✅ 验证技能

验证已生成的 `SKILL.md` 是否符合 OpenClaw 格式要求：

```bash
# 验证当前目录
npx @claw-dev/starter validate

# 验证指定路径
npx @claw-dev/starter validate /path/to/skill/SKILL.md
```

**验证检查项：**
- ✅ 必需字段（name, description）
- ✅ Metadata 部分
- ✅ 至少一个实现章节

## 🎨 SKILL.md 格式

生成的 `SKILL.md` 包含以下元数据：

```yaml
---
name: MySkill
description: 技能描述
metadata:
  {
    "openclaw": { "emoji": "🤖", "requires": {} },
  }
---
```

## 📚 学习更多

- [OpenClaw 文档](https://docs.openclaw.ai/skills)
- [技能开发指南](https://docs.openclaw.ai/skills/development)
- [示例技能](https://clawhub.com)

## 🤝 贡献

欢迎提交 Issue 和 PR！

## 📄 许可证

MIT © 梦心

---

Made with 🌙 by 梦心
npm package: @raphaellcs/validator
Description: OpenClaw 技能验证器 - 检查 SKILL.md 格式和结构
Author: 梦心
Latest version: 1.0.0

# @claw-dev/validator

> OpenClaw 技能验证器 - 检查 SKILL.md 格式和结构

## 🚀 功能

- 验证 SKILL.md frontmatter 格式
- 检查必需字段（name, description, metadata）
- 验证 metadata 结构
- 检查描述长度
- 比对技能名与目录名
- 批量验证目录中的所有技能

## 📦 安装

```bash
npx @claw-dev/validator
```

## 📖 使用

### 验证单个 SKILL.md

```bash
claw-validate path/to/SKILL.md
```

### 验证目录中的所有技能

```bash
claw-validate path/to/skills/
```

### 显示详细信息

```bash
claw-validate -v
```

## 🔍 检查内容

### 必须满足（ERROR）

- ✅ SKILL.md 文件存在
- ✅ Frontmatter 格式正确（`---` 包裹）
- ✅ 包含 `name` 字段
- ✅ 包含 `description` 字段
- ✅ 包含 `metadata` 字段
- ✅ `metadata.openclaw` 存在
- ✅ `metadata` JSON 格式正确

### 建议满足（WARNING）

- ⚠️ `metadata.openclaw.emoji` 存在
- ⚠️ `metadata.openclaw.requires` 存在
- ⚠️ 描述长度在 10-100 字符之间
- ⚠️ 技能名与目录名匹配
- ⚠️ 有文档内容

## 📊 输出示例

### 成功

```
🔍 验证: my-skill/SKILL.md

  ✓ SKILL.md 格式正确 ✨

==================================================
✓ 验证通过
```

### 有问题

```
🔍 验证: my-skill/SKILL.md

  ✗ 缺少必需字段: description
  ⚠️ metadata.openclaw.emoji 缺失（建议添加表情符号）

==================================================
✗ 验证失败
```

## 🎨 与 claw-starter 配合

```bash
# 1. 生成技能
npx @claw-dev/starter create my-skill

# 2. 验证
claw-validate my-skill/SKILL.md
```

## 📝 规则说明

### Frontmatter 格式

```yaml
---
name: MySkill
description: 技能描述
metadata:
  {
    "openclaw": { "emoji": "🤖", "requires": {} }
  }
---
```

### 描述长度建议

- 最少：10 字符
- 最多：100 字符

### 目录名匹配

目录名应该与 `name` 字段一致，避免混淆。

## 🤝 贡献

欢迎提交 Issue 和 PR！

## 📄 许可证

MIT © 梦心

---

Made with 🌙 by 梦心
npm package: @raphaelscunha/event-tracker
Description: A simple event tracking and user identification package with streaming capabilities
Author: Raphael Scunha
Latest version: 1.1.0

# Event Tracker Package

This package provides a simple way to track events in your application and send them to your analytics server.

## Installation

\`\`\`bash
npm install @survey/event-tracker
\`\`\`

## API

### `EventTracker(options)`

Creates a new event tracker instance.

**Options:**

- `serverUrl` (string, required): The URL of your analytics server API.
- `apiKey` (string, required): Your API key.
- `batchSize` (number, optional): The number of events to batch before sending (default: 10).
- `flushInterval` (number, optional): The flush interval in milliseconds (default: 5000).


### `tracker.identify(userId, properties)`

Identifies a user.

- `userId` (string, required): The user ID.
- `properties` (object, optional): Additional user properties.


### `tracker.track(eventName, properties)`

Tracks an event.

- `eventName` (string, required): The name of the event.
- `properties` (object, optional): Additional event properties.


### `tracker.shutdown()`

Flushes any remaining events and clears the flush interval. Call this method when your application is closing to ensure all data is sent.

## Streaming and Batching

This package now supports event batching and periodic flushing for improved performance:

- Events are collected in a queue and sent in batches.
- You can configure the `batchSize` to set how many events should be collected before sending.
- A `flushInterval` determines how often the event queue should be sent, even if the batch size hasn't been reached.
- If sending fails, events are added back to the queue to be sent later.
- The `shutdown` method ensures all remaining events are sent before your application closes.

## Usage

```javascript
import EventTracker from '@survey/event-tracker';

const tracker = new EventTracker({
  serverUrl: 'https://your-analytics-server.com/api',
  apiKey: 'your-api-key-here',
  batchSize: 20, // Optional: number of events to batch before sending (default: 10)
  flushInterval: 10000 // Optional: flush interval in milliseconds (default: 5000)
});

// Identify a user
await tracker.identify('user123', { email: 'user@example.com' });

// Track events (these will be batched and sent periodically)
tracker.track('Button Clicked', { buttonName: 'Submit' });
tracker.track('Page Viewed', { pageName: 'Home' });

// When your application is closing, make sure to call shutdown
await tracker.shutdown();
```
npm package: @raphaelsiz/extarray
Description: Extended Array capabilities
Author: raphaelSiz
Latest version: 1.0.0

# extarray
Extended array functionality. Work in progress, but stable. Eventually there will be more functions and classes to use.
## Added functions for Array and Array.prototype
Check if an array only has values of allowed type(s)
* `Array.isAllType(array,type | types)`
Push value if it doesn't exist or remove it if it does
* `Array.prototype.add(value)`
* `Array.prototype.remove(value)`
* `Array.prototype.toggle(value)`
Do arithmetic with vectors
* `Array.prototype.vectorAdd(otherArray)`
* `Array.prototype.vectorMultiply(otherArray)`
> Note: vectorAdd works with strings as well (although strings like "1" + "2" will be added into "12"). vectorMultiply works with strings only if they can be parsed into numbers, and then it multiplies them normally. I recommend only using numbers with both, but you do you.
> Also note that vectorAdd and vectorMultiply return a new array rather than mutating the array. This means if you want to set an array to itself plus another one you'll have to do something along the lines of `array = array.vectorAdd(otherArray)` but you can also use both functions to create new arrays without fear of messing up your data.
[Docs for Array](https://cdn.jsdelivr.net/gh/raphaelsiz/extraray/out/Array.html)
### Usage
If you only want to use the above functions and don't need the extra classes, it's really simple:
```js
import 'extarray'
let array = [0,1,2];
Array.isAllType(array,"number") // > true
array.add(3) // > array = [0,1,2,3]
array.vectorMultiply([0,2,4,6]) // > [0,2,8,18]
```
> Important note! This only works with static imports. That means this doesn't work in commonJS's `import('extarray')` function. Your package has to be a module, too. In your `package.json`, you can include `"type": "module",` and that should fix it!
## New Classes
So far, I've only added Vector2 and Vector3. Both are just arrays of numbers at that specific length.
```js
import {Vector2} from 'extarray'
let position = new Vector2(0,1) // > Vector2 [0,1]
Array.isArray(position) // > true
Vector2.isVector2(position) // > true
```
[Docs for Vector2](https://cdn.jsdelivr.net/gh/raphaelsiz/extraray/out/Vector2.html)
[Docs for Vector3](https://cdn.jsdelivr.net/gh/raphaelsiz/extraray/out/Vector3.html)
npm package: @raphaelvserafim/consulta-cnpj
Description: Implementação em TypeScript para consultar CNPJ
Author: Raphael Serafim
Latest version: 1.0.1

# Consultar CNPJ

## CONTATO 

<a href="https://wa.me/5566996852025" target="_blank"> 
<img src="https://img.shields.io/badge/WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" title="+55 66 99685-2025"/> 
</a>
<a href="https://t.me/raphaelserafim" target="_blank">
<img src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"  />
</a>  
<a href="https://www.linkedin.com/in/raphaelvserafim" target="_blank">
<img src="https://img.shields.io/badge/-LinkedIn-%230077B5?style=for-the-badge&logo=linkedin&logoColor=white"/>
</a> 


## Iniciando

```sh
npm i @raphaelvserafim/consulta-cnpj
```

# Uso
```ts
import ConsultaCNPJ from "@raphaelvserafim/consulta-cnpj";
```
### ou
```js
const ConsultaCNPJ = require("@raphaelvserafim/consulta-cnpj");
```

```ts
const consultaCNPJ = new ConsultaCNPJ();
const response = await consultaCNPJ.getEmpresaInfo("23711695000115");
```
npm package: @raphaelvserafim/gerar-pix-sicredi
Description: Implementação em TypeScript para geração de cobranças e recebimento de eventos de webhook Pix com Sicredi
Author: Raphael Serafim
Latest version: 1.0.0

# Gerar Pix Sicredi

#### Uma implementação simples em TypeScript para facilitar a geração de cobranças e o recebimento de eventos de webhook Pix em integrações com o Sicredi.

##### Esta classe oferece uma solução completa e segura para interagir com a API Pix do Sicredi, permitindo aos desenvolvedores criar cobranças, atualizar webhooks, e acessar dados de cobrança de forma eficiente e confiável. 

###### Com este módulo, você pode integrar facilmente o sistema de pagamentos Pix do Sicredi em seus aplicativos e serviços, automatizando processos de cobrança e acompanhando eventos em tempo real.

 
## CONTATO 

<a href="https://wa.me/5566996852025" target="_blank"> 
<img src="https://img.shields.io/badge/WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" title="+55 66 99685-2025"/> 
</a>
<a href="https://t.me/raphaelserafim" target="_blank">
<img src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"  />
</a>  
<a href="https://www.linkedin.com/in/raphaelvserafim" target="_blank">
<img src="https://img.shields.io/badge/-LinkedIn-%230077B5?style=for-the-badge&logo=linkedin&logoColor=white"/>
</a> 



## Versão em PHP 
<a href="https://github.com/raphaelvserafim/api-sicredi-pix" target="_blank">Gerar Pix com PHP</a>


## Iniciando

```sh
npm i @raphaelvserafim/gerar-pix-sicredi
```

# Uso
```ts
import { PixSicredi } from "@raphaelvserafim/gerar-pix-sicredi";
```
### ou
```js
const { PixSicredi } = require("@raphaelvserafim/gerar-pix-sicredi");
```

## InitPix
```ts
const initPix: InitPix = {
    producao: 0,
    client_id: "",
    client_secret: "",
    crt_file: "/certificado.pem",
    key_file: "/APLICACAO.key",
    pass: ""
};

const pix  = new PixSicredi(initPix);
```


## Atualizando URL WebHook Receber Eventos Pix:
```ts
const response = await pix.updateWebhook("url", "chave-pix");
```

## Geração de cobranças Pix:
```ts
const cobranca: Cobranca = {
    calendario: {
        dataDeVencimento: "2040-04-01",
        validadeAposVencimento: 1
    },
    valor: {
        original: 10.00,
        modalidadeAlteracao: 1
    },
    chave: "23711695000115",
    solicitacaoPagador: "Serviço realizado.",
    infoAdicionais: [
        {
            nome: "cliente_id",
            valor: "1234"
        },
        {
            nome: "fatura_id",
            valor: 123334
        }
    ]
};
const response = await pix.criarCobranca(cobranca);
```
 
## Informações de uma Cobrança Pix:
```ts
const response = await pix.dadosDeCobranca("id");
```
npm package: @raphaelvserafim/whatsapp-proto
Description: WhatsApp Protocol Buffer schema extractor and compiler
Author: Raphael Serafim
Latest version: 2.0.1

# WhatsApp Proto

WhatsApp Protocol Buffer definitions compiled from the official web client.

## Installation

```bash
npm install @raphaelvserafim/whatsapp-proto
```

## Available Message Types

This package includes all WhatsApp protobuf message definitions:

- `ADVDeviceIdentity`
- `WebMessageInfo`
- `Message`
- `MessageKey`
- `ContactMessage`
- `LocationMessage`
- `ExtendedTextMessage`
- And many more...

 
## Generated From

This package contains protobuf definitions automatically extracted from WhatsApp Web client.

**Current WhatsApp Version:** Check the package version for the corresponding WhatsApp build.

## License

MIT

## Disclaimer

This package is for educational and development purposes. Use in accordance with WhatsApp's terms of service.
npm package: @rapharacing/design-tokens
Description: Design Tokens for the Rapha Design System
Author: Rapha Racing
Latest version: 2.0.0

# Rapha Design Tokens

<h3 align="center">Breakpoints, Colors and Typography for all platforms</h3>

<p align="center"><em>JavaScript · JSON · SCSS</em></p>

[![MIT License][license-image]][license-url]

> Design tokens are the visual design atoms of the design system — specifically, they are named entities that store visual design attributes. We use them in place of hard-coded values (such as hex values for color or pixel values for spacing) in order to maintain a scalable and consistent visual system for UI development – [Salesforce UX](https://www.lightningdesignsystem.com/design-tokens/)

## Installation

Using [npm](https://www.npmjs.com/):

```console
npm i @rapharacing/design-tokens --save
```

Using [Yarn](https://yarnpkg.com/):

```console
yarn add @rapharacing/design-tokens
```

## How to use

### JavaScript

If the project supports ECMAScript Modules, you can use the `import` syntax

```js
import * as tokens from "@rapharacing/design-tokens";

console.log(tokens.colorPink); // hsl(343, 88%, 71%)
```

otherwise

```js
const tokens = require('@rapharacing/design-tokens');

console.log(tokens.colorPink); // hsl(343, 88%, 71%)
```

In JSON, design token names are formatted in [kebab-case](http://wiki.c2.com/?KebabCase).

```js
const tokens = require('@rapharacing/design-tokens/dist/index.json');

console.log(tokens['color-pink']); // hsl(343, 88%, 71%)
```

### Sass

Sass variables are formatted in [kebab-case](http://wiki.c2.com/?KebabCase).

```scss
// Using variables
@import '~@rapharacing/design-tokens/dist/index';

a {
  color: $color-pink;
}
```

## License

Design tokens are freely distributable under the terms of the [MIT license](https://github.com/rapharacing/design-tokens/blob/develop/Licence).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://github.com/moment/moment/blob/develop/LICENSE.md
npm package: @rapharacing/error-handler
Description: Error Handler
Author: Rapha Racing
Latest version: 1.3.3

# Rapha Error Handler

[![pipeline status](https://gitlab.com/rapharacing/rapha-front-end/error-handler/badges/master/pipeline.svg)](https://gitlab.com/rapharacing/rapha-front-end/error-handler/commits/master)
[![coverage report](https://gitlab.com/rapharacing/rapha-front-end/error-handler/badges/master/coverage.svg)](https://gitlab.com/rapharacing/rapha-front-end/error-handler/commits/master)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

[![MIT License][license-image]][license-url]

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://gitlab.com/rapharacing/rapha-front-end/error-handler/-/blob/master/LICENCE.md

Transform and translated error messages for client-side applications and middlware.

## Features

- [**Babel**](https://babeljs.io/) - Write next generation JavaScript today.
- [**Jest**](https://facebook.github.io/jest) - JavaScript testing framework used by Facebook.
- [**ESLint**](http://eslint.org/) - Make sure you are writing a quality code.
- [**Prettier**](https://prettier.io/) - Enforces a consistent style by parsing your code and re-printing it.
- [**Travis CI**](https://travis-ci.org) - Automate tests and linting for every push or pull request.
- [**Documentation**](http://documentation.js.org/) - A documentation system so good, you'll actually write documentation.
- [**Standard Version**](https://github.com/conventional-changelog/standard-version) - Automate versioning and CHANGELOG generation.

## API

#### Table of Contents

- [getError](#getError)
  - [Parameters](#parameters)

### getError

Returns a transformed and translated error message for the FE or MW. These can be further tailored for Customer service by passing an optional param

#### Parameters

- `error` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Error string
- `locale` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Locale string
- `cs` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Customer service boolean

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Translated error message string

```js
import getError from "@rapharacing/error-handler";

const error = getError("AccessDeniedException", "en");
```

## Commands

```sh
$ yarn test # run tests with Jest
$ yarn coverage # run tests with coverage and open it on browser
$ yarn lint # lint code
$ yarn docs # generate docs
$ yarn build # generate docs and transpile code
```
npm package: @rapharacing/interfaces
Description: Interfaces inferred from JSON Schemas. To be used in TS middleware projects
Author: Rapha Racing
Latest version: 0.0.4

# Middleware Interfaces

Middleware Interfaces

[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)

## [API documentation](https://rapharacing.gitlab.io/rapha-middleware/interfaces)

Generated by [typedoc](https://github.com/TypeStrong/typedoc)

## Commands

Unfortunately quicktype-core can not infer definition files properly. It also gives useless errors for debugging InputData.

To Generate CC Interfaces run the following commands:

1. Convert OpenApi to JSON Schema

```sh
$ openapi2jsonschema https://api.c616d-rapharaci1-d1-public.model-t.cc.commerce.ondemand.com/rest/v2/api-docs -o src/schemas
```

2. Convert JSON Schemas to TS Interfaces

```sh
generate:interfaces
```

3. Transpile the package

```sh
$ yarn build
```

## How to use

```js
import { Address } from "@rapharacing/interfaces";

const Address = ({ data }: Address) => {};
```
npm package: @rapharacing/lambda-utils
Description: Lambda Utils
Author: Rapha Racing
Latest version: 0.0.9

# Lambda Utils

## Installation

`yarn add @rapharacing/lambda-utils`

## How to use

```js
import * as utils from "@rapharacing/lambda-utils";

import {
	errorResponse,
	cognitoErrorResponse,
	requestConfig,
	formatAuthorizationToken,
} from "@rapharacing/lambda-utils";
```

## License

Design tokens are freely distributable under the terms of the [MIT license](https://github.com/rapharacing/design-tokens/blob/develop/Licence).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat

[license-url]: https://github.com/moment/moment/blob/develop/LICENSE

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [errorResponse](#errorresponse)
    -   [Parameters](#parameters)
-   [cognitoErrorResponse](#cognitoerrorresponse)
    -   [Parameters](#parameters-1)
-   [requestConfig](#requestconfig)
    -   [Parameters](#parameters-2)
-   [formatAuthorizationToken](#formatauthorizationtoken)
    -   [Parameters](#parameters-3)

## errorResponse

Returns a Error Object

### Parameters

-   `error` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Error response from AWS or CC
-   `customKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Custom error key to overwrite stack errors
-   `customMessage` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Custom error message to overwrite stack errors

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Error

## cognitoErrorResponse

Returns a Error key

### Parameters

-   `error` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Error response from AWS or CC
-   `customMessage` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Custom error message to overwrite stack errors

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Error key

## requestConfig

Returns a configuration object for axios

### Parameters

-   `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data to be sent as the request body
    -   `data.url`  
    -   `data.method`  
    -   `data.token`  
    -   `data.data`  

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Configuration object

## formatAuthorizationToken

Format Authorization Token

### Parameters

-   `token` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Token

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Token
npm package: @rapharacing/media-query
Description: Beautiful media queries for styled-components
Author: Rapha Racing
Latest version: 2.0.1

# Rapha Media Query

Beautiful media queries for styled-components

[![pipeline status](https://gitlab.com/rapharacing/rapha-front-end/media-query/badges/master/pipeline.svg)](https://gitlab.com/rapharacing/rapha-front-end/media-query/commits/master)
[![coverage report](https://gitlab.com/rapharacing/rapha-front-end/media-query/badges/master/coverage.svg)](https://gitlab.com/rapharacing/rapha-front-end/media-query/commits/master)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

[![MIT License][license-image]][license-url]

## Installation

Using [npm](https://www.npmjs.com/):

```console
npm i @rapharacing/media-query --save
```

Using [Yarn](https://yarnpkg.com/):

```console
yarn add @rapharacing/media-query
```

## Breakpoints

Default breakpoints

```javascript
{
  small: '30em', // 480px
  medium: '48em', // 768px
  large: '62em' // 992px,
  xl: '75em' // 1200px
}
```

## Example

If the project supports ECMAScript Modules, you can use the `import` syntax

```js
import mq from '@rapharacing/media-query';

const Example = styled.div`
  display: flex;
  flex-direction: column;

  ${mq.md`
        flex-direction: row;
    `};
`;
```

Will generate the following css

```css
.example {
  display: flex;
  flex-direction: column;

  @media (min-width: 48em) {
    flex-direction: row;
  }
}
```

## License

Media query is freely distributable under the terms of the [MIT license](https://gitlab.com/rapharacing/rapha-front-end/media-query/-/blob/master/LICENCE.md).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://gitlab.com/rapharacing/rapha-front-end/media-query/-/blob/master/LICENCE.md
npm package: @rapharacing/mw-utils
Description: Middleware Utils
Author: Rapha Racing
Latest version: 0.0.4

# Middleware Utils

Middleware Utils

[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)

## [API documentation](https://rapharacing.gitlab.io/rapha-middleware/mw-utils)

Generated by [typedoc](https://github.com/TypeStrong/typedoc)

## How to use

```ts
import {
	errorResponse,
	getRequestConfig,
	cognitoErrorResponse,
	formatAuthorizationToken
} from "@rapharacing/mw-utils";

const config = await getRequestConfig(url, "get", token);
```

## License

Design tokens are freely distributable under the terms of the [MIT license](https://github.com/rapharacing/design-tokens/blob/develop/Licence).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://github.com/moment/moment/blob/develop/LICENSE
npm package: @rapharacing/request
Description: Request wrapper for axios
Author: Rapha Racing
Latest version: 0.0.3

# Request

<h3 align="center">Axios wrapper for node to make a common request pattern</h3>

[![MIT License][license-image]][license-url]

## Installation

Using [npm](https://www.npmjs.com/):

```console
npm i @rapharacing/request --save
```

Using [Yarn](https://yarnpkg.com/):

```console
yarn add @rapharacing/request
```

## How to use

### JavaScript

If the project supports ECMAScript Modules, you can use the `import` syntax

```js
import request, { get, post, put, patch, remove } from "@rapharacing/request";

const requestUsers = async () => {
  const config = {
    method: "get",
    url: "/users"
  };

  const res = await request(config);
  const { data } = res.data;

  return data;
};

const requestUsers = async () => {
  const res = await get("/users");
  const { data } = res.data;

  return data;
};

const postUser = async user => {
  const res = await post("/user", user);
  const { data } = res.data;

  return data;
};
```

## License

Request is freely distributable under the terms of the [MIT license](https://gitlab.com/rapharacing/rapha-middleware/request/blob/develop/Licence).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://github.com/moment/moment/blob/develop/LICENSE.md
npm package: @rapharacing/schemas
Description: OpenAPI to JSON Schema to be used with middy for CC response validation
Author: Rapha Racing
Latest version: 0.0.5

# Middleware Schemas

Middleware Schemas

## Commands

Unfortunately quicktype-core can not infer definition files properly. It also gives useless errors for debugging InputData.

To Generate CC Schemas and Interfaces run the following commands

1. Convert OpenApi to JSON Schema

```sh
$ openapi2jsonschema https://api.c616d-rapharaci1-d1-public.model-t.cc.commerce.ondemand.com/rest/v2/api-docs -o src/schemas
```

2. Build the package

```sh
$ yarn build
```

## How to use

```js
import { getSchema } from "@rapharacing/mw-schemas";

const address = getSchema("address");
```

## To do

Rewrite quicktype util to be used with other schemas (Exponea etc)
npm package: @rapharacing/token
Description: [![MIT License][license-image]][license-url]
Author: Rapha Racing
Latest version: 1.1.0
Deprecated: this package has been deprecated

# Rapha Tokens

[![MIT License][license-image]][license-url]

Design tokens are atomic pieces that store visual design attributes. They help us make our UI more consistent and consistent and support custom themes. We use them instead of static values like HEX codes for color or sizing units.

## Installation
Run [Yarn](https://yarnpkg.com/) to add the package to your project:

```sh
yarn add @rapharacing/tokens
```

or do so with [npm](https://www.npmjs.com/):

```sh
npm i @rapharacing/tokens --save
```

## How to use

To access tokens we neeed to import the file like so

```jsx
import tokens from "@rapharacing/tokens";
```

Or use named exports such as

```ts
import { dim, mq } from "@rapharacing/tokens";

const Grid = styled.div`
  background: ${tokens.color('grey1')};
  display: grid;
  grid-template-rows: 2fr;
  grid-template-columns: repeat(6, 1fr);
  grid-column-gap: ${dim(2)};
  margin: 0 ${dim(2)};

  ${mq.md`
    grid-template-rows: 1fr;
    grid-template-columns: repeat(12, 1fr);
    grid-column-gap: ${dim(2)};
    margin: 0 ${dim(2)};
  `}
`;
```

## Basic API methods

### `tokens.get()` - Get a token value

The `tokens.get()` function can be used to get any value from the design-system. Use object dot notation to find the value you need from your design system object.

```jsx
  tokens.get('type.baseFontSize')
```

## API helper methods

The helper methods make getting values _much_ more simple.

- [`tokens.fontSize()` or `tokens.fs()`](#tokensfontsize-or-tokensfs---get-font-size-values) - Get font-size values
- [`tokens.color()`](#tokenscolor---get-color-palette-values) - Get color palette values
- [`tokens.brand()`](#tokensbrand---get-brand-palette-values) - Get brand palette values

## `tokens.fontSize()`

```jsx
  tokens.fontSize('heading1')
```

## `tokens.color()`

```jsx
  tokens.color('grey1')
```

## `tokens.brand()`

```jsx
  tokens.color('pink')
```

## Formats

The main structure of the package is written in `Typescript` for better usage in `Typescript` projects.

## License

Rapha tokens are freely distributable under the terms of the [MIT license] (https://github.com/rapharacing/tokens/blob/develop/Licence).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://github.com/moment/moment/blob/develop/LICENSE
npm package: @rapharacing/tokens
Description: [![pipeline status](https://gitlab.com/rapharacing/rapha-front-end/tokens/badges/master/pipeline.svg)](https://gitlab.com/rapharacing/rapha-front-end/tokens/commits/master) [![coverage report](https://gitlab.com/rapharacing/rapha-front-end/tokens/badges/m
Author: Rapha Racing
Latest version: 1.7.1

# Rapha Tokens

[![pipeline status](https://gitlab.com/rapharacing/rapha-front-end/tokens/badges/master/pipeline.svg)](https://gitlab.com/rapharacing/rapha-front-end/tokens/commits/master)
[![coverage report](https://gitlab.com/rapharacing/rapha-front-end/tokens/badges/master/coverage.svg)](https://gitlab.com/rapharacing/rapha-front-end/tokens/commits/master)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

[![MIT License][license-image]][license-url]

Design tokens are atomic pieces that store visual design attributes. They help us make our UI more consistent and consistent and support custom themes. We use them instead of static values like HEX codes for color or sizing units.

## Installation

Run [Yarn](https://yarnpkg.com/) to add the package to your project:

```sh
yarn add @rapharacing/tokens
```

or do so with [npm](https://www.npmjs.com/):

```sh
npm i @rapharacing/tokens --save
```

## How to use

To access tokens we neeed to import the file like so

```jsx
import tokens from '@rapharacing/tokens';
```

Or use named exports such as

```ts
import { dim, mq } from '@rapharacing/tokens';

const Grid = styled.div`
	background: ${tokens.color('grey1')};
	display: grid;
	grid-template-rows: 2fr;
	grid-template-columns: repeat(6, 1fr);
	grid-column-gap: ${dim(2)};
	margin: 0 ${dim(2)};

	${mq.md`
    grid-template-rows: 1fr;
    grid-template-columns: repeat(12, 1fr);
    grid-column-gap: ${dim(2)};
    margin: 0 ${dim(2)};
  `}
`;
```

## Basic API methods

### `tokens.get()` - Get a token value

The `tokens.get()` function can be used to get any value from the design-system. Use object dot notation to find the value you need from your design system object.

```jsx
tokens.get('type.baseFontSize');
```

## API helper methods

The helper methods make getting values _much_ more simple.

- [`tokens.fontSize()` or `tokens.fs()`](#tokensfontsize-or-tokensfs---get-font-size-values) - Get font-size values
- [`tokens.color()`](#tokenscolor---get-color-palette-values) - Get color palette values
- [`tokens.brand()`](#tokensbrand---get-brand-palette-values) - Get brand palette values

## `tokens.fontSize()`

```jsx
tokens.fontSize('heading1');
```

## `tokens.color()`

```jsx
tokens.color('grey1');
```

## `tokens.brand()`

```jsx
tokens.color('pink');
```

## Formats

The main structure of the package is written in `Typescript` for better usage in `Typescript` projects.

## License

Media query is freely distributable under the terms of the [MIT license](https://gitlab.com/rapharacing/rapha-front-end/tokens/-/blob/master/LICENCE.md).

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://gitlab.com/rapharacing/rapha-front-end/tokens/-/blob/master/LICENCE.md
npm package: @rapharacing/types
Description: Types package for all things tech related - New Store, Angrilu, etc
Author: Rapha Racing
Latest version: 1.0.2-beta.0
Deprecated: deprication

# Rapha Racing Types

This package is to handle the type definitions for all Rapha projects.

## Do's

- Namespace and split files. This helps with organisation and will allow for duplicate named interfaces.
- Only export the namespace, this will prevent random interfaces from floating around
- Interfaces, Namespaces and Types should all be Capitalised

```ts
interface Foo {}

type Bar = string | number;

namespace Baz {}
```

## Don'ts

- Assign enums directly to a property, create an exportable type

```ts
// bad
interface Foo {
  bar: "hello" | "world" | 1;
}

// good
type Bar = "hello" | "world" | 1;

interface Foo {
  bar: Bar;
}
```

## Publishing

1. Make sure you have an NPM account and are logged in.

- Visit https://www.npmjs.com/ to create an account
- Request access to the the @rapharacing organisation (Alex / John)
- Login into the CLI
  ```bash
  npm login
  ```

2. Create a new symatic package version
   https://docs.npmjs.com/cli/v7/commands/npm-version.

```bash
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
```

whilst we are in dev, we should be using prerelease versions

`npm version prerelease --preid=beta`

N.B

There is a post version hook that will then trigger a push with the version tag. GitLab CI will run, and create a new version in NPM.
npm package: @raphckrman/react-native-alarm-kit
Description: This library provides a simple and modern interface for working with alarms in your React Native app using Apple’s latest AlarmKit framework.
Author: raphckrman
Latest version: 1.0.0

# 📱 react-native-alarmkit

> [!WARNING]
> This library is still under development. Use at your own risk.

This library provides a simple and modern interface for working with alarms in your React Native app using Apple’s latest AlarmKit framework.

## ⚙️ Installation

### React Native
> [!NOTE]  
> ``react-native-nitro-modules`` is required because this library leverages [Nitro Modules](https://nitro.margelo.com/).
```sh
npm install @raphckrman/react-native-alarm-kit react-native-nitro-modules
```
### Expo
```sh
npx expo add @raphckrman/react-native-alarm-kit react-native-nitro-modules
npx expo prebuild
```

## 🚀 Usage


```js
import { createAlarmButton, createAlarmCountdown, requestAlarmPermission, scheduleFixedAlarm, scheduleRelativeAlarm } from 'react-native-alarmkit';

// Ask for permission to schedule alarms
await requestAlarmPermission();

// Alarm Buttons and Countdown
const secondBtn = await createAlarmButton("repeat", "#000000", "play.circle")
const stopBtn = await createAlarmButton("stop", "#FF0000", "stop.circle")
const countdown = await createAlarmCountdown(3, 15)

// Set up a timer that will trigger in 3 seconds and repeat after 15 seconds
scheduleFixedAlarm("super alarme", stopBtn, "#FFFFFF", secondBtn, undefined, countdown)

// Set up a relative alarm that will trigger at 10:00 on Monday, Thursday, and Friday
scheduleRelativeAlarm("amazing relative alarm", stopBtn, "#FFFFFF", 10, 0, ["monday", "friday", "thursday"])
```


## 🤝 Contributing

We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to learn how to get started, report issues, or suggest improvements.

## 📄 License

This project is licensed under the [MIT License](LICENSE.md).
npm package: @raphtlw/indoc
Description: Indented document literals for JavaScript.
Author: raphtlw
Latest version: 0.1.6

<p align='center'>
  <h5 align='center'>ABOUT</h5>
  <p align='center'>
    <code>indoc</code> is a utility for un-indenting string literals.
  </p>
</p>

<p align='center'>
  <a href='/'>
    <img src='https://img.shields.io/badge/stability-stable-blue?style=for-the-badge'>
  </a>
  <a href='https://github.com/raphtlw/indoc/pulls'>
    <img src="https://img.shields.io/badge/PR's-welcome-blue?style=for-the-badge&logo=github">
  </a>
  <a href='https://www.npmjs.com/package/@raphtlw/indoc'>
    <img src='https://img.shields.io/npm/v/@raphtlw/indoc?color=blue&style=for-the-badge'>
  </a>
</p>

## Table of contents

- [Usage](#usage)
- [Contributing](#contributing)

## Usage

```typescript
import indoc from 'indoc'

indoc`
  This spans
  multiple lines.
`

// Output
// ---
// This spans
// multiple lines.
```

## Contributing

Contributions are always welcome. If you feel inclined to, feel free to submit a pull request.

In addition, you can also contribute by submitting issues. Please describe the issue with enough details and I will solve them as soon as I can.