open-index/open-npm huggingface dataset:
npm package: @swyrlfi/router-sdk
Description: An sdk for routing swaps using Uniswap v2 and Uniswap v3.
Latest version: 1.0.0-alpha.12

# 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: @swyrlfi/uniswapx-sdk
Description: SDK for the UniswapX protocol
Author: Uniswap
Latest version: 1.0.0-alpha.12

# 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: @swyrlfi/v3-sdk
Description: ⚒️ An SDK for building applications on top of Uniswap V3
Latest version: 1.0.0-alpha.12

# 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/).
npm package: @swyx/createcontexts
Description: a really small library for a better react context API
Author: swyx
Latest version: 1.0.1

# createContexts

a really small library for a better react context API

<detail>
<summary>
The Problem this solves
</summary>

```js
const Context1 = createContext();
const Context2 = createContext();
const Context3 = createContext();

function App() {
  return (
    <Context1.Provider value={1}>
      <Context2.Provider value={2}>
        <Context3.Provider value={3}>
          <FooBar />
        </Context3.Provider>
      </Context2.Provider>
    </Context1.Provider>
  );
}
```

gross.

</detail>

API

```js
import createContexts from '@swyx/createContexts';

const [Provider, Context1, Context2, Context3] = createContexts(3);

function App() {
  return (
    <Provider values={['a', 'b', 'c']}>
      <FooBar />
    </Provider>
  );
}
```
npm package: @swzs/erp-common
Description: ERP通用组件库，包含可复用的组件、样式和资源
Author: your-name
Latest version: 1.0.2

# @swzs/erp-common

[![npm version](https://badge.fury.io/js/%40swzs%2Ferp-common.svg)](https://badge.fury.io/js/%40swzs%2Ferp-common)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

ERP通用组件库，基于React + TypeScript + Ant Design开发，提供可复用的组件、样式和资源。

## 🚀 特性

- 📦 **开箱即用**: 基于Ant Design设计语言，提供高质量React组件
- 🎯 **TypeScript**: 完整的类型定义，更好的开发体验
- 🎨 **主题定制**: 支持主题定制，满足不同业务需求
- 📱 **响应式**: 支持移动端和桌面端
- 🔧 **工程化**: 完整的开发工具链，支持多种模块格式
- 🌍 **国际化**: 支持多语言
- ⚡ **性能优化**: 支持按需加载

## 📦 安装

```bash
# npm
npm install @swzs/erp-common

# yarn
yarn add @swzs/erp-common

# pnpm
pnpm add @swzs/erp-common
```

## 🔨 使用

### 基础用法

```jsx
import React from 'react';
import { DictSelect, CountrySelect, StatusIcons } from '@swzs/erp-common';

function App() {
  return (
    <div>
      {/* 字典选择组件 */}
      <DictSelect
        dictType="USER_STATUS"
        onLoadDict={fetchDictData}
        onChange={value => console.log(value)}
      />

      {/* 国家选择组件 */}
      <CountrySelect
        open={true}
        onLoadCountry={fetchCountryData}
        onChange={codes => console.log(codes)}
      />

      {/* 图标使用 */}
      <StatusIcons.success />
    </div>
  );
}
```

### 样式引入

```jsx
// 在你的应用入口文件中引入样式
import '@swzs/erp-common/dist/erp-common.min.css';
```

## 📚 组件文档

### 字典组件

- `DictSelect` - 字典选择器
- `DictRadio` - 字典单选框
- `DictCheckbox` - 字典复选框
- `DictTree` - 字典树形选择
- `DictTreeSelect` - 字典树形下拉选择

### 业务组件

- `CountrySelect` - 国家选择器
- `Button` - 通用按钮

### 图标模块

- `StatusIcons` - 状态图标
- `ActionIcons` - 操作图标
- `BusinessIcons` - 业务图标
- `IconFont` - Iconfont图标

### Hooks

- `useDict` - 字典数据管理
- `useCountry` - 国家数据管理

## 🔗 依赖

### 同伴依赖 (peerDependencies)

```json
{
  "react": ">=16.9.0",
  "react-dom": ">=16.9.0",
  "antd": ">=5.0.0"
}
```

确保你的项目中已安装这些依赖。

## 🛠️ 开发

```bash
# 克隆仓库
git clone https://github.com/your-username/erp-common.git

# 安装依赖
cd erp-common
npm install

# 启动开发服务器
npm run dev

# 构建
npm run build

# 运行测试
npm test

# 类型检查
npm run type-check
```

## 📋 目录结构

```
erp-common/
├── src/                    # 源码目录
│   ├── components/         # 组件
│   ├── hooks/             # Hooks
│   ├── icons/             # 图标模块
│   ├── styles/            # 样式
│   ├── types/             # 类型定义
│   └── utils/             # 工具函数
├── docs/                  # 文档
├── lib/                   # CommonJS 构建产物
├── es/                    # ES Module 构建产物
└── dist/                  # UMD 构建产物
```

## 🤝 贡献

欢迎提交 Issue 和 Pull Request!

## 📄 许可证

[MIT](./LICENSE)

## 🔗 相关链接

- [文档站点](https://your-docs-site.com)
- [更新日志](./CHANGELOG.md)
- [问题反馈](https://github.com/your-username/erp-common/issues)
npm package: @sx3/i18n
Description: A simple, lightweight localization system
Author: SX3
Latest version: 0.1.1

[![npm](https://img.shields.io/npm/v/@sx3/i18n)](https://www.npmjs.com/package/@sx3/i18n)

# I18n

Flexible localization system like a [Fluent](https://projectfluent.org/) but for TypeScript.

## Features

- Small ~630 bytes gzip
- Support message functions (for pluralization or for any functions)
- [Native](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules) pluralization
- Dependency free
- Type safe (for keys and message functions)
- Simple lazy loading

## Install

```bash
bun add @sx3/i18n
```

## Usage

```ts
import { createI18n } from '@sx3/i18n';
import { pluralize } from '@sx3/i18n/plural';

// Better to define in the localization file.
const EN_RULES = new Intl.PluralRules('en-US');

const { t } = createI18n({
  locale: 'en',
  locales: {
    en: {
      // Static string message
      me: 'SX3',
      // Functional messages
      hello: (who: string) => `Hello ${who}!`,
      user: {
        liked: (who: string, what: string) => `${who} liked the ${what}`
      },
      // Pluralization with Intl.PluralRules
      apple: pluralize({ one: 'apple', other: count => `${count} apples` }, EN_RULES)

    },

    // Lazy loading locale
    ru: () => import('./lang/ru').then(m => m.default)
  },

  // Fallbacks loads in background
  fallbackLocales: { en: ['ru'] },

  // Handle missing keys
  onMissingKey: (key, locale) => {
    console.warn(`Key "${key}" not found in "${locale}" locale and their fallbacks`);
    // You can rewrite message for missing keys
    return 'Unknown key';
  }
});

t('hello', 'world'); // -> Hello world
t('non-existent'); // -> TypeScript error for non existent key
t('apple'); // -> TypeScript error need count argument specified
t('apple', 1); // -> apple
t('apple', 3); // -> 3 apples
t('user.liked', 'SX3', 'post'); // -> SX3 liked the post
```

### Usage with reactivity (Vue example)

```ts
import { createI18n } from '@sx3/i18n';
import { createApp, shallowReactive } from 'vue';

// Now store is reactive
const store = shallowReactive(new Map());
const i18n = createI18n({
  locale: 'en',
  store,
  // ...other options
});

// Wait when main locale loaded
await i18n.isReady();

const app = createApp(App).mount('#app');
```
npm package: @sxo/alpine
Description: Alpine.js adaptor for SXO Design System.
Author: sxo team
Latest version: 0.1.1

<div align="center">
  <h1>@sxo/alpine</h1>
  <p><b>Alpine.js implementation of the SXO design system, bringing powerful headless logic to the simple and declarative world of Alpine.</b></p>

  <p>
    <a href="https://www.npmjs.com/package/@sxo/alpine"><img src="https://img.shields.io/npm/v/@sxo/alpine.svg?style=flat-square" alt="npm version"></a>
    <img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="license">
    <img src="https://img.shields.io/bundlephobia/minzip/@sxo/alpine?style=flat-square" alt="bundle size">
    <img src="https://img.shields.io/npm/dm/@sxo/alpine.svg?style=flat-square" alt="downloads">
  </p>
</div>

---

`@sxo/alpine` allows you to use SXO's design tokens and component logic within your Alpine.js projects with ease.

## ✨ Key Features

- 🧩 **Headless Integration**: Use SXO's state management directly in your `x-data`.
- ⚡ **Lightweight**: Minimal overhead, fitting perfectly with Alpine's philosophy.
- 🎨 **Atomic Styling**: Consumes `@sxo/ui` generators for class-based styling.
- 🛡️ **Type Safe**: TypeScript support for better IDE integration.

## 🚀 Quick Start

### Installation

```bash
pnpm add @sxo/alpine @sxo/ui @sxo/engine @sxo/design
```

### Basic Usage

```html
<div x-data="sxoButton({ variant: 'primary' })">
  <button :class="classes" @click="handleClick">
    Click Me
  </button>
</div>

<script>
  import Alpine from 'alpinejs';
  import { sxoButton } from '@sxo/alpine';

  Alpine.data('sxoButton', sxoButton);
  Alpine.start();
</script>
```

## 📖 Documentation

For full documentation and examples, visit the [Alpine.js Adaptor Documentation](https://sxo-engine.pages.dev/zh-CN/adaptors/alpine.html).

## 📄 License

MIT License.
npm package: @sxo/cli
Description: Command line interface for managing SXO projects and themes.
Author: sxo team
Latest version: 0.1.1

<div align="center">
  <h1>@sxo/cli</h1>
  <p><b>The official command-line interface for the SXO design system. Streamline your development workflow.</b></p>

  <p>
    <a href="https://www.npmjs.com/package/@sxo/cli"><img src="https://img.shields.io/npm/v/@sxo/cli.svg?style=flat-square" alt="npm version"></a>
    <img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="license">
    <img src="https://img.shields.io/npm/dm/@sxo/cli.svg?style=flat-square" alt="downloads">
  </p>
</div>

---

`@sxo/cli` is the ultimate companion for developers working with the SXO ecosystem. It automates repetitive tasks, from scaffolding new projects to generating consistent component structures.

## ✨ Features

- 🏗️ **Smart Scaffolding**: Instantly create new projects pre-configured with SXO adaptors (React, Vue, Solid, etc.).
- 🧩 **Component Generator**: Generate accessible, headless-ready component templates with a single command.
- 🎨 **Theme Orchestration**: Easily manage and preview official or custom SXO themes.
- ⚡ **Optimized Workflow**: Built-in commands for building bundles and managing workspace dependencies.

## 🚀 Quick Start

### Installation

```bash
pnpm add -g @sxo/cli
```

### Basic Commands

```bash
# Initialize a new SXO project
sxo init my-app

# Generate a new component
sxo generate component my-button

# Preview available themes
sxo theme list
```

## 📖 Documentation

For full command reference and advanced usage, visit the [CLI Documentation](https://sxo-engine.pages.dev/zh-CN/guide/getting-started.html).

## 📄 License

MIT License.