open-index/open-npm huggingface dataset:
npm package: @optilogic/charts
Description: Chart components for Optilogic - LineChart and BarChart built on Recharts
Latest version: 1.3.2

# @optilogic/charts

Chart components for opti-ui - LineChart and BarChart built on Recharts.

## Installation

```bash
npm install @optilogic/charts @optilogic/core recharts
```

## Setup

Make sure you have configured `@optilogic/core` with the Tailwind preset and CSS variables.

## Usage

```tsx
import { LineChart, BarChart } from '@optilogic/charts';

// Line chart
const data = [
  { month: 'Jan', revenue: 4000, profit: 2400 },
  { month: 'Feb', revenue: 3000, profit: 1398 },
  { month: 'Mar', revenue: 2000, profit: 9800 },
];

<LineChart
  data={data}
  series={[
    { dataKey: 'revenue', name: 'Revenue', color: 'hsl(var(--chart-1))' },
    { dataKey: 'profit', name: 'Profit', color: 'hsl(var(--chart-2))' },
  ]}
  xAxis={{ dataKey: 'month' }}
  yAxis={{ domain: [0, 'auto'] }}
  tooltip
  legend
/>

// Bar chart
<BarChart
  data={data}
  series={[
    { dataKey: 'revenue', name: 'Revenue' },
    { dataKey: 'profit', name: 'Profit' },
  ]}
  xAxis={{ dataKey: 'month' }}
  tooltip
  legend={{ position: 'top' }}
/>
```

## Components

### LineChart

A theme-aware line chart with support for:
- Multiple series
- Configurable axes
- Grid lines
- Tooltips
- Legends
- Animations

### BarChart

A theme-aware bar chart with support for:
- Vertical and horizontal layouts
- Stacked and grouped bars
- Configurable axes
- Grid lines
- Tooltips
- Legends
- Animations

## License

MIT
npm package: @optilogic/core
Description: Core UI components for Optilogic - A professional React component library
Latest version: 1.3.2

# @optilogic/core

Core UI components for opti-ui - A professional React component library built with Tailwind CSS and Radix UI primitives.

## Installation

```bash
npm install @optilogic/core
```

### Peer Dependencies

Install the required peer dependencies:

```bash
npm install react react-dom tailwindcss
```

Optional peer dependencies for specific components:

```bash
# DataGrid virtualization
npm install @tanstack/react-virtual

# DatePicker
npm install date-fns react-day-picker

# Toaster notifications
npm install sonner
```

## Setup

### 1. Configure Tailwind CSS

Add the opti-ui preset to your Tailwind configuration:

```js
// tailwind.config.js
import { optiUiPreset } from '@optilogic/core/tailwind-preset';

export default {
  presets: [optiUiPreset],
  content: [
    './src/**/*.{js,ts,jsx,tsx}',
    './node_modules/@optilogic/core/dist/**/*.{js,mjs}',
  ],
};
```

### 2. Import Styles

Import the base styles in your app's entry point:

```tsx
import '@optilogic/core/styles.css';
```

Or define the CSS variables yourself using the reference in the styles.css file.

## Usage

```tsx
import { Button, Input, Card, CardHeader, CardTitle, CardContent } from '@optilogic/core';

function App() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Welcome</CardTitle>
      </CardHeader>
      <CardContent>
        <Input placeholder="Enter your name" />
        <Button variant="primary">Submit</Button>
      </CardContent>
    </Card>
  );
}
```

## Components

### Primitives
- Button, Input, Label, Textarea
- Badge, Checkbox, Switch
- Progress, Separator, Skeleton

### Radix-based
- Select, Tabs, Accordion
- Tooltip, Popover, DropdownMenu
- AlertDialog

### Layout
- Card, Table, Modal
- ResizablePanel, ResizeHandle

### Data
- DataGrid (with virtualization)
- Autocomplete

### Feedback
- Chip, LoadingSpinner, Toaster
- ConfirmationModal

### Utility
- IconButton, CopyButton, ContextMenu

## License

MIT
npm package: @optilogic/editor
Description: Rich text editor component for Optilogic - SlateEditor built on Slate.js
Latest version: 1.3.2

# @optilogic/editor

Rich text editor component for opti-ui - SlateEditor built on Slate.js.

## Installation

```bash
npm install @optilogic/editor @optilogic/core slate slate-react slate-history
```

## Setup

Make sure you have configured `@optilogic/core` with the Tailwind preset and CSS variables.

## Usage

```tsx
import { SlateEditor } from '@optilogic/editor';
import { useState } from 'react';

function App() {
  const [content, setContent] = useState('');

  return (
    <SlateEditor
      value={content}
      onChange={setContent}
      placeholder="Type your message..."
      enableTags
      onSubmit={(text) => {
        console.log('Submitted:', text);
      }}
    />
  );
}
```

## Features

- Rich text editing with Slate.js
- Inline tag support (type # to create tags)
- Keyboard shortcuts
- Customizable placeholder
- Submit on Enter (Shift+Enter for new line)
- History (undo/redo)
- Theme-aware styling

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| value | string | '' | Initial plain text value |
| onChange | (value: string) => void | - | Callback when content changes |
| onSubmit | (text: string) => void | - | Callback when Enter is pressed |
| onTagCreate | (tag: string) => void | - | Callback when a tag is created |
| onTagDelete | (tag: string) => void | - | Callback when a tag is deleted |
| placeholder | string | 'Type something...' | Placeholder text |
| disabled | boolean | false | Whether the editor is disabled |
| enableTags | boolean | true | Whether to enable tag detection |
| minRows | number | 3 | Minimum number of rows |
| maxRows | number | 8 | Maximum number of rows |
| className | string | - | Additional class names |

## Ref Methods

```tsx
const editorRef = useRef<SlateEditorRef>(null);

// Focus the editor
editorRef.current?.focus();

// Clear content
editorRef.current?.clear();

// Get plain text
const text = editorRef.current?.getText();

// Insert text at cursor
editorRef.current?.insertText('Hello');

// Insert a tag
editorRef.current?.insertTag('important');
```

## License

MIT
npm package: @optima-chat/amazon-cli
Description: Amazon 卖家中心集成工具 - 管理商品、订单、库存、价格和报告的命令行工具
Author: Optima Commerce Team
Latest version: 0.2.0

# Amazon CLI

Amazon 卖家中心集成工具 - 管理商品、订单、库存、价格和报告的命令行工具。

## 安装

```bash
npm install -g @optima-chat/amazon-cli
```

## 命令

```bash
amazon auth login              # 登录 Amazon Seller Central
amazon auth status             # 查看登录状态

amazon product list            # 商品列表
amazon product sync            # 同步商品到 Optima
amazon order list              # 订单列表
amazon order fulfill           # 发货确认 (FBM)

amazon feeds list              # Feed 列表
amazon feeds price             # 批量更新价格
amazon feeds inventory         # 批量更新库存

amazon inventory list          # FBA 库存列表
amazon inventory alerts        # 库存预警

amazon pricing get             # 获取定价
amazon pricing competitive     # 竞争价格分析
amazon pricing suggest         # 价格建议

amazon reports types           # 报告类型
amazon reports create          # 创建报告
amazon reports download        # 下载报告

amazon notifications types     # 通知类型
amazon notifications subscribe # 订阅通知
```

## 常用选项

```bash
-m, --marketplace <code>  # 市场: US, CA, UK, DE, JP 等
--json                    # JSON 输出 (默认)
--pretty                  # 表格输出
```

## 配置

```bash
# 后端地址
export AMAZON_BACKEND_URL=http://localhost:8000

# 输出格式
export AMAZON_CLI_FORMAT=pretty

# CI/CD Token
export AMAZON_TOKEN='{"refresh_token":"...","seller_id":"..."}'
```

## License

MIT
npm package: @optima-chat/cc-chat
Description: Claude Code 用户的中文聊天社区 CLI
Author: Optima Chat
Latest version: 0.13.5

# CC Chat CLI

Claude Code 用户的中文聊天社区命令行工具

## 快速开始

### 安装

```bash
npm install -g @optima-chat/cc-chat@latest
```

### 使用

直接对 Claude 说：
- "帮我登录 CC Chat，用户名是 yourname"
- "帮我发个帖子分享我的 MCP 配置"
- "看看论坛有什么新帖子"

Claude 会自动调用相应命令 ✨

## 命令参考

### 登录

交互式登录：
```bash
cc-chat login
```

非交互式登录：
```bash
cc-chat login --username "你的用户名"
```

**提示**：如果想更换用户名，重新登录即可覆盖之前的账号。

### 发帖

交互式发帖：
```bash
cc-chat post
```

非交互式发帖：
```bash
cc-chat post --title "标题" --content "内容"
```

### 浏览帖子

浏览最新 10 个帖子：
```bash
cc-chat browse
```

指定数量：
```bash
cc-chat browse --limit 20
```

### 评论（开发中）

```bash
cc-chat comment <post-id> --text "评论内容"
```

### 配置

手动配置 Claude Code 集成（通常不需要，安装时会自动配置）：
```bash
cc-chat setup-claude
```

强制更新配置：
```bash
cc-chat setup-claude --force
```

### 更新

更新到最新版本：
```bash
npm update -g @optima-chat/cc-chat
```

查看当前版本：
```bash
cc-chat --version
```

## 开发

```bash
# 安装依赖
npm install

# 开发模式
npm run dev

# 构建
npm run build
```
npm package: @optima-chat/observability
Description: Optima 生产可观测性共享库 - 诊断、日志、追踪 (Next.js/Node.js)
Author: Optima Team
Latest version: 0.3.1

# @optima/core

Optima 生产可观测性共享库 - 专为 Next.js/Node.js 设计

## 功能

- **诊断端点**: `/health` 健康检查、`/debug/info`、`/debug/config`
- **结构化日志**: JSON/Text 格式、自动注入追踪信息
- **分布式追踪**: trace_id 生成与传递、AsyncLocalStorage 上下文
- **HTTP 客户端**: 自动传递追踪 header

## 安装

```bash
npm install @optima/core
# 或
pnpm add @optima/core
```

## 使用方法

### 健康检查端点

```typescript
// app/api/health/route.ts
import { createHealthHandler } from "@optima/core/diagnostics";

export const GET = createHealthHandler({
  serviceName: "agentic-chat",
  checks: {
    database: async () => {
      // 检查数据库连接
      return { status: "healthy" };
    },
    redis: async () => {
      // 检查 Redis
      return { status: "healthy" };
    },
  },
});
```

### 调试端点

```typescript
// app/api/debug/info/route.ts
import { createDebugInfoHandler } from "@optima/core/diagnostics";
export const GET = createDebugInfoHandler();

// app/api/debug/config/route.ts
import { createDebugConfigHandler } from "@optima/core/diagnostics";
export const GET = createDebugConfigHandler();
```

### API Route 追踪

```typescript
// app/api/users/route.ts
import { withTracing } from "@optima/core/tracing";

async function handler(request: Request) {
  // 处理请求
  return Response.json({ users: [] });
}

export const GET = withTracing(handler, {
  serviceName: "agentic-chat",
  serviceShort: "chat",
});
```

### 结构化日志

```typescript
import { createLogger } from "@optima/core/logging";

const logger = createLogger({
  serviceName: "agentic-chat",
  format: "json", // 或 "text"
  level: "info",
});

logger.info("User logged in", { userId: "123" });
logger.error("Failed to process", { error: "timeout" }, new Error("Timeout"));
```

### 带追踪的 HTTP 请求

```typescript
import { tracedFetch, createTracedClient } from "@optima/core/http";

// 单次请求
const response = await tracedFetch("http://user-auth/api/users");

// 创建客户端
const authApi = createTracedClient("http://user-auth:8000");
const user = await authApi.get("/users/123");
await authApi.post("/users", { name: "John" });
```

## 环境变量

| 变量 | 说明 | 默认值 |
|------|------|--------|
| `GIT_COMMIT` | Git commit hash | `unknown` |
| `GIT_BRANCH` | Git 分支 | `unknown` |
| `APP_VERSION` | 应用版本 | `0.0.0` |
| `BUILD_DATE` | 构建日期 | 当前时间 |
| `DEPLOYMENT_ID` | 部署 ID (蓝绿) | - |
| `LOG_FORMAT` | 日志格式 | `json` |
| `LOG_LEVEL` | 日志级别 | `info` |
| `DEBUG_KEY` | Debug 端点密钥 | - |

## Trace ID 格式

```
格式: {timestamp_hex}-{random_hex}-{service_short}
示例: 67890abc-f1e2d3c4b5a6-chat
```

## 响应 Header

| Header | 说明 |
|--------|------|
| `X-Trace-ID` | 追踪 ID |
| `X-Request-ID` | 请求 ID |
| `X-Response-Time` | 响应时间 |
| `X-Served-By` | 服务名-版本 |
| `X-Deployment-ID` | 部署 ID |

## License

MIT
npm package: @optima-chat/scout-cli
Description: AI-powered product research CLI - Amazon, TikTok Shop, Shein, Temu search and 1688 supplier sourcing with real sales data
Author: VeryPro
Latest version: 0.13.0

# Optima Scout CLI

AI-powered Amazon product research and 1688 supplier sourcing tool for Claude Code and LLMs.

## Installation

```bash
npm install -g @optima-chat/scout-cli
```

## Quick Start

```bash
# Initialize Claude Code skills
scout init

# Search Amazon products
scout search "coffee maker"

# Get product details
scout product B01GJOMWVA

# Search 1688 suppliers
scout supplier-search "咖啡机"

# Search TikTok Shop products
scout tiktok "wireless earbuds"
```

## Commands

### `scout init`

Initialize Optima Scout skills for Claude Code.

**Options:**
- `-f, --force` - Overwrite existing skills

### `scout search <query>`

Search Amazon products with structured JSON output.

**Options:**
- `-d, --domain <domain>` - Amazon domain (default: `amazon.com`)
- `-l, --limit <number>` - Result limit (default: `10`)
- `-f, --format <format>` - Output: `json` | `text`

**Example:**
```bash
scout search "wireless mouse" --limit 5 --format json
```

### `scout product <asin>`

Get detailed product information.

**Options:**
- `-d, --domain <domain>` - Amazon domain (default: `amazon.com`)
- `-f, --format <format>` - Output: `json` | `text`

**Example:**
```bash
scout product B004YAVF8I --domain amazon.com
```

### `scout supplier-search <keyword>`

Search for suppliers on 1688.com.

**Options:**
- `-l, --limit <number>` - Result limit (default: `20`, max: `100`)
- `-f, --format <format>` - Output: `json` | `text`

**Example:**
```bash
scout supplier-search "咖啡机" --limit 10
scout supplier-search "蓝牙耳机" --format json
```

### `scout tiktok <keyword>`

Search TikTok Shop products with actual sales data.

**Options:**
- `-l, --limit <number>` - Result limit (default: `20`, max: `50`)
- `-f, --format <format>` - Output: `json` | `text`

**Features:**
- ✅ Real sales numbers (not estimates)
- ✅ Actual prices and GMV
- ✅ Product ratings and reviews
- ✅ Shop information
- ✅ Direct product links

**Example:**
```bash
# Text format for quick review
scout tiktok "coffee maker" --limit 10 --format text

# JSON format for LLM processing
scout tiktok "wireless earbuds" --limit 20 --format json
```

**Data Source:** ScrapeCreators API - $0.002/request

## Configuration

Set API endpoint via environment variable:

```bash
export API_URL=http://dev.optima.sh:7290
```

Or create `.env` file:

```env
API_URL=http://localhost:7290
```

## Features

- **JSON-first**: Structured output optimized for LLM parsing
- **Non-interactive**: No spinners, prompts, or colors
- **Fast**: Backend caching for quick responses
- **Claude Code integration**: Auto-discovery via skills

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Link locally
npm link
```

## License

MIT
npm package: @optima-digital/inline-calendars
Description: Based on `MatCalendar`, the component under Angular Material Datepicker, this package will help you display and manage multiple inline calendars. Its main purpose is to be used as custom form control in reactive forms.
Author: Venelin Manchev
Latest version: 0.0.7

# Angular Material multiple inline calendars

Based on `MatCalendar`, the component under Angular Material Datepicker, this package will help you display and manage multiple inline calendars. Its main purpose is to be used as custom form control in reactive forms.

**Features**
- list multuple months;
- multiple dates selection;
- navigation to next/previous month;

![Inline calendars](./docs/inline-calendars.png)


## Install

```
npm install @optima-digital/inline-calendars
```

## Usage

Import the module to your `app.module.ts`
```
import { OptimaInlineCalendarsModule } from '@optima-digital/inline-calendars';
```

Add the inline calendar components to your view:

```
<optima-inline-calendars></optima-inline-calendars>
```

The following inputs are available at the moment:

* **__totalCalendars__** - number of calendars to be displayed. Default is 3.
* **__startAt__** - The date to be considered as start date. This will be the date on which the calendar in the middle position will be set. Defaults to todays date.
* **__formControlName__** - use this component as custom form control in any reactive form.
npm package: @optima-lib/inline-calendars
Description: Based on `MatCalendar`, the component under Angular Material Datepicker, this package will help you display and manage multiple inline calendars. Its main purpose is to be used as custom form control in reactive forms.
Author: Venelin Manchev
Latest version: 17.0.0

# Angular Material multiple inline calendars

Based on `MatCalendar`, the component under Angular Material Datepicker, this package will help you display and manage multiple inline calendars. Its main purpose is to be used as custom form control in reactive forms.

**Features**
- list multuple months;
- multiple dates selection;
- navigation to next/previous month;

![Inline calendars](./docs/inline-calendars.png)

## Versions grid

| Angular | OptimaLib |
| --- | --- |
| 17.x | 17.x |
| 16.x | 16.x |
| 15.x | 15.x |
| 14.x | 14.x |
| 13.x | 13.x |
| 12.x | 0.1.0 |
| 11.x | 0.0.7 |

## Install

```
npm install @optima-lib/inline-calendars
```

## Usage

Import **OptimaInlineCalendarsComponent** in the component where you want to use it:
```
import { OptimaInlineCalendarsComponent } from '@optima-lib/inline-calendars';

@Component({
  imports: [
    ...,
    OptimaInlineCalendarsComponent
  ]
})
export class UserComponent() { }
```

Add the inline calendar components to your view:

```
<optima-inline-calendars></optima-inline-calendars>
```

The following inputs are available at the moment:

* **__totalCalendars__** - number of calendars to be displayed. Default is 3.
* **__startAt__** - The date to be considered as start date. This will be the date on which the calendar in the middle position will be set. Defaults to todays date.
* **__formControlName__** - use this component as custom form control in any reactive form.
npm package: @optimal/fn
Description: Force V8 to try to optimize a function and check optimization status in nodes 4, 6, 8, and 10.
Author: Eli Doran
Latest version: 0.3.1

# @optimal/fn
[![Build Status](https://travis-ci.org/elidoran/node-optimal-fn.svg?branch=master)](https://travis-ci.org/elidoran/node-optimal-fn)
[![npm version](https://badge.fury.io/js/%40optimal%2Ffn.svg)](http://badge.fury.io/js/%40optimal%2Ffn)
[![Coverage Status](https://coveralls.io/repos/github/elidoran/node-optimal-fn/badge.svg?branch=master)](https://coveralls.io/github/elidoran/node-optimal-fn?branch=master)

Force V8 to try to optimize a function and check optimization status in nodes 4, 6, 7, and 8.

Use in benchmarking to optimize before running the benchmark.

Use in analysis to test if your functions can be optimized.

See tests for examples of what optimizes and what doesn't. [[JS]](https://github.com/elidoran/node-optimal-fn/tree/master/test/lib/js) [[CS]](https://github.com/elidoran/node-optimal-fn/tree/master/test/lib/coffee)

See:

1. [article](https://github.com/petkaantonov/bluebird/wiki/Optimization-killers)
2. [another article](http://www.aerospike.com/blog/node-on-fire/)
3. [node benchmark helper](https://github.com/nodejs/node/blob/master/benchmark/common.js#L213-L225)
4. [node 8+ runtime/runtime.h](https://github.com/v8/v8/blob/master/src/runtime/runtime.h) for new optimization status bit mask

    ```c++
    enum class OptimizationStatus {
      kIsFunction = 1 << 0,      // 1
      kNeverOptimize = 1 << 1,   // 2
      kAlwaysOptimize = 1 << 2,  // 4
      kMaybeDeopted = 1 << 3,    // 8
      kOptimized = 1 << 4,       // 16
      kTurboFanned = 1 << 5,     // 32
      kInterpreted = 1 << 6,     // 64
      kMarkedForOptimization = 1 << 7,            //  128
      kMarkedForConcurrentOptimization = 1 << 8,  //  256
      kOptimizingConcurrently = 1 << 9,           //  512
      kIsExecuting = 1 << 10,                     // 1024
      kTopmostFrameIsTurboFanned = 1 << 11,       // 2048
    };
    ```

## Install

```sh
npm install @optimal/fn --save
```


## Usage

```javascript
// 1. attempt to optimize a function and get its status
var optimize = require('@optimal/fn')

function fn() { }

var result = optimize(fn)

console.log(result)
// {
//    optimized: true,
//    always   : false,
//    maybe    : false,
//    TurboFan : false
// }

// 2. test a function to see if it's optimized:
var someOtherFn = getSomeOtherFn()
result = optimize.check(someOtherFn)
```

## Result Properties

The result may contain these properties:

1. **optimized** - true when optimized, false otherwise
2. **always** - When function "is optimized" then **always** will be **false**. When function is "always optimized" then **always** will be **true**. When function will "never be optimized" then **always** is **true** (and **optimized** is **false**).
3. **maybe** - when function is "maybe deoptimized" then **maybe** is true, otherwise it is false.
4. **TurboFan** - when function is "optimized by TurboFan" then this is true, otherwise it is false.


## [MIT License](LICENSE)
npm package: @optimal/object
Description: Force V8 to optimize an object's properties or check its status
Author: Eli Doran
Latest version: 0.1.0

# @optimal/object
[![Build Status](https://travis-ci.org/elidoran/node-optimal-object.svg?branch=master)](https://travis-ci.org/elidoran/node-optimal-object)
[![Dependency Status](https://gemnasium.com/elidoran/node-optimal-object.png)](https://gemnasium.com/elidoran/node-optimal-object)
[![npm version](https://badge.fury.io/js/%40optimal%2Fobject.svg)](http://badge.fury.io/js/%40optimal%2Fobject)
[![Coverage Status](https://coveralls.io/repos/github/elidoran/node-optimal-object/badge.svg?branch=master)](https://coveralls.io/github/elidoran/node-optimal-object?branch=master)

Force V8 to optimize an object's properties or check its status.

Use this when:

1. the object ends up in slow mode
2. it's not possible to refactor code to avoid slow mode (such as defining all the properties on it ahead of time and only altering their values, not adding properties, and not deleting them)
3. an object's properties are accessed often enough to affect performance

The optimization doesn't require `'--allow_natives_syntax'`; only the check does.

Check if an object's property access is in optimized mode with `optimize.check()`. This tries to enable the flag `'--allow_natives_syntax'`, so, use in testing and performance benchmarking. (The flag is required in order to check the optimization status.)

See [V8 test](https://github.com/v8/v8/blob/master/test/mjsunit/fast-prototype.js)


## Install

```sh
npm install @optimal/object --save
```


## Usage

```javascript
// 1. optimize a an object
var optimize = require('@optimal/object')

var object = {
  key :'value',
  some:'thing',
  and :'more',
}

// trigger slow mode
delete object.and

// back to fast access
optimize(object)

// 2. test an object to know if it's optimized:
var someOtherObject = getSomeOtherObject()
result = optimize.check(someOtherObject) // returns true or false
```

## Others

1. [@optimal/fn](https://www.npmjs.com/package/@optimal/fn)


## MIT License