open-index/open-npm huggingface dataset:
npm package: @imckl/electron-element-plus-ui
Description: Electron + Element Plus 应用的 UI 组件库
Author: imckl
Latest version: 0.0.2

# @imckl/electron-element-plus-ui

Electron + Element Plus 应用的 UI 组件库。

## 特性

- **开箱即用**：提供标准的 Electron 应用布局
- **三栏布局**：Header + Sidebar + Main 结构
- **Tab 页管理**：内置 Tab 页容器、右键菜单、重命名对话框
- **配置式菜单**：通过 `menuItems` 配置侧边栏菜单
- **可折叠侧边栏**：支持展开/折叠
- **跨进程支持**：提供 main、preload、renderer 三进程入口
- **TypeScript**：完整的类型支持

## 安装

```bash
npm install @imckl/electron-element-plus-ui
```

## 快速开始

### 1. 主进程配置

```typescript
// src/main/index.ts
import { setupTabContextMenu, setupAboutDialog, showAboutDialog } from '@imckl/electron-element-plus-ui/main'

// 创建窗口后调用
setupTabContextMenu(mainWindow)
setupAboutDialog(mainWindow)

// 菜单项（可选）
{ label: '关于', click: () => showAboutDialog(mainWindow) }
```

### 2. 预加载脚本配置

```typescript
// src/preload/index.ts
import { exposeLayoutApi } from '@imckl/electron-element-plus-ui/preload'

// 暴露 API 到渲染进程
exposeLayoutApi()
```

### 3. 类型声明

```typescript
// src/env.d.ts
import type { ElectronLayoutApi } from '@imckl/electron-element-plus-ui'

declare global {
  interface Window {
    electronLayoutApi: ElectronLayoutApi
  }
}
```

### 4. 渲染进程使用

```typescript
// src/renderer/index.ts
import '@imckl/electron-element-plus-ui/dist/style.css'
```

参考 [Layout 模块文档](./src/layout/README.md)。

## 模块文档

- [Layout 模块](./src/layout/README.md) - ElectronLayout 组件 + useTabManager
- [About 模块](./src/about/README.md) - 关于对话框（useAboutDialog / ElectronAboutDialog）

## 开发

```bash
# 跳过下载 Electron binary（构建时不需要）
ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm install
npm run build
```

## 注意事项

### electron-vite 配置

Electron preload 运行在沙盒环境，无法直接 require 第三方包。使用 electron-vite 时需要配置将本包打包进 preload：

```typescript
// electron.vite.config.ts
export default defineConfig({
  preload: {
    build: {
      externalizeDeps: {
        exclude: ['@imckl/electron-element-plus-ui'],
      },
    },
  },
})
```

### Preload 安全性

本库的 preload 入口设计遵循 Electron 安全最佳实践：

- ✅ 只包含 `contextBridge` 和 `ipcRenderer` 调用
- ✅ 只依赖纯常量和类型定义
- ❌ 不引入渲染进程代码（Vue 组件等）
- ❌ 不暴露危险的 Node.js API（fs、child_process 等）
- ❌ 不引入大型依赖库

## License

MIT
npm package: @imckl/electron-utils
Description: Electron common utilities for window, menu, tray and more
Author: imckl
Latest version: 0.0.2

# @imckl/electron-utils

Electron 通用工具包，提供窗口管理、菜单构建等常用功能。

## 特性

- **窗口尺寸自适应**：根据屏幕分辨率自动计算最佳窗口尺寸
- **断点配置**：支持多档屏幕断点，适配不同分辨率
- **完整类型**：TypeScript 类型支持

## 安装

```bash
npm install @imckl/electron-utils
```

## 快速开始

### 主进程

```typescript
// src/main/index.ts
import { BrowserWindow } from 'electron'
import { getWindowSizeSimple } from '@imckl/electron-utils/main'

const mainWindow = new BrowserWindow({
  ...getWindowSizeSimple(),
  webPreferences: {
    preload: path.join(__dirname, 'preload.js'),
  },
})
```

## API

### 主进程

#### getWindowSizeSimple(options?)

计算最佳窗口尺寸（简化版），直接返回 `{ width, height }`。

```typescript
import { getWindowSizeSimple } from '@imckl/electron-utils/main'

const mainWindow = new BrowserWindow({
  ...getWindowSizeSimple(),
})
```

#### getWindowSize(options?)

计算最佳窗口尺寸（详细版），返回额外信息。

```typescript
import { getWindowSize } from '@imckl/electron-utils/main'

const result = getWindowSize()
console.log(`Window: ${result.width}x${result.height}`)
console.log(`Screen: ${result.screenWorkArea.width}x${result.screenWorkArea.height}`)
console.log(`Matched breakpoint: ${result.matchedBreakpointIndex}`)
```

#### 配置选项

```typescript
interface GetWindowSizeOptions {
  breakpoints?: ScreenBreakpoint[]  // 自定义断点配置
  fallbackSize?: WindowSize         // 超高分屏的 fallback 尺寸
  minSize?: WindowSize              // 最小尺寸限制
  maxSize?: WindowSize              // 最大尺寸限制
}
```

#### 自定义断点

```typescript
import { getWindowSizeSimple } from '@imckl/electron-utils/main'

const size = getWindowSizeSimple({
  breakpoints: [
    { maxWidth: 1920, maxHeight: 1080, windowSize: { width: 1600, height: 900 } },
    { maxWidth: 2560, maxHeight: 1440, windowSize: { width: 1800, height: 1000 } },
  ],
  fallbackSize: { width: 2000, height: 1200 },
  minSize: { width: 800, height: 600 },
})
```

### 默认断点

| 屏幕分辨率 | 窗口尺寸 | 占比 |
|-----------|---------|------|
| ≤1366x768 | 1200x700 | ~88% |
| ≤1920x1080 | 1400x850 | ~73% |
| ≤2560x1440 | 1700x950 | ~66% |
| 更高 | 2000x1200 | - |

### 类型定义

```typescript
// src/env.d.ts
import type { WindowSize, WindowSizeResult, GetWindowSizeOptions } from '@imckl/electron-utils'
```

## Preload 配置

如果在 preload 中使用本包，需要配置构建工具将其打包进 preload：

```typescript
// electron.vite.config.ts
export default defineConfig({
  preload: {
    build: {
      externalizeDeps: {
        exclude: ['@imckl/electron-utils'],
      },
    },
  },
})
```

## License

MIT
npm package: @imclown/router-sdk
Description: An sdk for routing swaps using Uniswap v2 and Uniswap v3.
Latest version: 0.0.13-beta7

# Alpha software

The latest version of the SDK is used in production in the Uniswap Interface,
but it is considered Alpha software and may contain bugs or change significantly between patch versions.
If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel of the Discord.
Pull requests welcome!

# Uniswap Swap Router SDK

This SDK is meant to facilitate interactions with the contracts in [swap-router-contracts](https://github.com/Uniswap/swap-router-contracts).
npm package: @imclown/sdk-core
Description: ⚒️ An SDK for building applications on top of Uniswap V3
Latest version: 0.0.13-beta1

# Uniswap SDK Core

[![npm version](https://img.shields.io/npm/v/@uniswap/sdk-core/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk-core/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk-core/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk-core@latest)

This code is shared across Uniswap TypeScript SDKs.
npm package: @imclown/uniswapx-sdk
Description: SDK for the UniswapX protocol
Author: Uniswap
Latest version: 0.0.13-beta2

# uniswapx-sdk

SDK for the UniswapX protocol

## Usage

The SDK contains bindings for two main flows: parsing serialized orders & building new orders.

### Building & Signing Orders

```ts
import { DutchOrder, NonceManager } from '@uniswap/uniswapx-sdk';
import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const account = await provider.getSigner().getAddress(); 
const nonceMgr = new NonceManager(provider, 1); 
const nonce = await nonceMgr.useNonce(account); 

const chainId = 1;
const builder = new DutchOrderBuilder(chainId);
const order = builder
  .deadline(deadline)
  .decayEndTime(deadline)
  .decayStartTime(deadline - 100)
  .nonce(nonce)
  .input({
    token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    amount: BigNumber.from('1000000'),
  })
  .output({
    token: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
    startAmount: BigNumber.from('1000000000000000000'),
    endAmount: BigNumber.from('900000000000000000'),
    recipient: '0x0000000000000000000000000000000000000000',
  })
  .build();
 
// Sign the built order 
const { domain, types, values } = order.permitData();
const signature = wallet._signTypedData(domain, types, values);

const serializedOrder = order.serialize();
// submit serializedOrder and signature to order pool
```

### Parsing Orders
```ts
import { DutchOrder, Order } from '@uniswap/uniswapx-sdk';

const serializedOrder = '0x1111222233334444555500000000234300234...';
const chainId = 1; 

const order: Order = DutchOrder.parse(serializedOrder, chainId);

const orderData = order.info;
const orderHash = order.hash();
```
### Validating Orders 
```ts
import { ethers } from 'ethers';
import { OrderValidator } from 'uniswapx-sdk';

const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const validator = new OrderValidator(provider, CHAIN_ID); 
const orders: SignedOrder[] = [
  {
    order: order1, 
    signature: signature1
  }, 
  {
    order: order2, 
    signature: signature2
  }
]; 

try {
  const statusList: OrderValidation[] = await validator.validateBatch(orders); 
  // Do something with list of statuses 
}
catch(e) {
  // Handle error
}

```

### Order Object

**serialize()**

Returns an abi-encoded serialization of the order. This serialized format is passed into the corresponding reactor contract for execution.


**getSigner(signature)**

Recovers the address which created the given signature over the order. Used to determine the order maker.


**permitData()**

Returns the domain, types, and values used to generate an EIP-712 signature over the order. Note that this signature both approves the release of the order's input tokens _and_ the execution of the order itself.


**hash()**

Returns the order hash. This is used as a key to track order fulfillment on-chain. It may also be useful as a unique order identifier for off-chain purposes.
npm package: @imclown/v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 0.0.13-beta3

# Uniswap V2 SDK

[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).
npm package: @imclown/v3-sdk
Description: ⚒️ An SDK for building applications on top of Uniswap V3
Latest version: 0.0.13-beta2

# Alpha software

The latest version of the SDK is used in production in the Uniswap Interface,
but it is considered Alpha software and may contain bugs or change significantly between patch versions.
If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel of the Discord.
Pull requests welcome!

# Uniswap V3 SDK

[![npm version](https://img.shields.io/npm/v/@uniswap/v3-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v3-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v3-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v3-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://docs.uniswap.org/).