open-index/open-npm huggingface dataset:
npm package: @mori-enterprises/qcanvas
Description: A highly performant infinite canvas component for React
Latest version: 1.0.0

# QCanvas

A performant infinte canvas library for React.

## Getting Started

```
yarn add @mori-enterprises/qcanvas
```

This library works by rendering elements on a canvas. An element must have at least these properties:

```
export interface BaseElementData {
    id: string;
    kind: string;
    x: number;
    y: number;
    draggable?: boolean;
    clickable?: boolean;
}
```

You provide a "canvas controller" that lets you control what happens on user interaction.

```
class ExampleCanvasController implements CanvasController<BaseElementData> {
    constructor(
        readonly dataController: DataController<BaseElementData>,
    ) { }

    onElementDragStart(id: string, x: number, y: number): void {}
    onElementDrag(id: string, deltaX: number, deltaY: number): void {}
    onElementDragEnd(id: string, props: { cancelled: boolean }): void {}
    onElementClick(ev: MouseEvent, id: string): void {}
}
```

You also provide a "component" factory that converts your data elements into React components:

```
const Content = () => {
    const data = useElementContext();

    const color = useMemo(() => {
        return `#${Math.floor(Math.random() * 16777215).toString(16)}`;
    }, []);

    return <div style={{
        width: '100px',
        height: '100px',
        backgroundColor: color,
    }}>{data.id}</div>;
};

const componentFactory = (kind: string): React.JSX.Element | null => {
    if (kind === 'content') {
        return <Content />
    } else {
        return null;
    }
}
```

Finally, you render your canvas:

```
const MyCanvasContainer = () => {
    const controller = useMemo(() => new ExampleCanvasController(new DataController({
        elements: [],
    })), []);

    return <Canvas controller={controller} componentFactory={componentFactory} />
}
```
npm package: @mori-mori/mcp-ssh-pty
Description: MCP Server for SSH remote command execution with PTY shell support
Author: me
Latest version: 1.9.2

# @mori-mori/mcp-ssh-pty

MCP Server for SSH remote command execution with PTY shell support.

## Installation

```bash
npm install -g @mori-mori/mcp-ssh-pty
```

### Start MCP Server

```bash
mcp-ssh-pty
```

### Add to Claude Code

```bash
# 全局安装后
claude mcp add --transport stdio ssh -- mcp-ssh-pty

# 或使用 npx（无需安装）
claude mcp add --transport stdio ssh -- npx -y @mori-mori/mcp-ssh-pty
```

## CLI Commands

### List servers

```bash
mcp-ssh-pty list           # Auto-detect config level
mcp-ssh-pty list --local   # Project level only
mcp-ssh-pty list --global  # User level only
mcp-ssh-pty list --all     # Show both levels
```

### Add server

```bash
# Interactive mode
mcp-ssh-pty add

# Save to project level
mcp-ssh-pty add my-server -l -H 192.168.1.100 -u root -k ~/.ssh/id_rsa

# Save to user level
mcp-ssh-pty add my-server -g -H 192.168.1.100 -u root -p mypassword
```

### Remove server

```bash
mcp-ssh-pty remove my-server
mcp-ssh-pty remove --local   # From project level
mcp-ssh-pty remove --global  # From user level
```

### Test connection

```bash
mcp-ssh-pty test my-server
```

### Interactive configuration

```bash
mcp-ssh-pty config
```

## Configuration

### Config file locations

| Level | Path | Priority |
|-------|------|----------|
| Project | `./.mori/ssh/ssh-servers.json` | High |
| User | `~/.mori/ssh/ssh-servers.json` | Low |
| Custom | `SSH_MCP_CONFIG_PATH` env | Highest |

### Config format

```json
{
  "servers": [
    {
      "name": "my-server",
      "host": "192.168.1.100",
      "port": 22,
      "username": "root",
      "privateKeyPath": "~/.ssh/id_rsa"
    }
  ]
}
```

## MCP Usage

### List Servers

```
ssh({ action: "list" })
```

Returns:
```json
[
  { "name": "local", "connected": false, "type": "built-in" },
  { "name": "my-server", "connected": false, "type": "configured" }
]
```

### Connect

```
ssh({ action: "connect", server: "local" })      # Local shell
ssh({ action: "connect", server: "my-server" })  # Remote SSH
```

### Command Execution

```
ssh({ command: "ls -la" })
ssh({ command: "whoami" })
```

### Interactive Programs

```
ssh({ command: "mysql -u root -p" })
ssh({ command: "password123" })
ssh({ command: "SHOW DATABASES;" })
```

### Read Buffer

```
ssh({ read: true })                # Last 20 lines
ssh({ read: true, lines: -1 })     # All
ssh({ read: true, lines: 100 })    # 100 lines
```

### Signal Control

```
ssh({ command: "tail -f /var/log/syslog" })
ssh({ read: true })
ssh({ signal: "SIGINT" })          # Ctrl+C
```

### Disconnect

```
ssh({ action: "disconnect" })
```

### Status

```
ssh({ action: "status" })
```

## Built-in Servers

| Name | Description |
|------|-------------|
| `local` | Local shell (uses system default shell) |

## License

MIT
npm package: @moriajs/auth
Description: MoriaJS auth — JWT + httpOnly cookies, pluggable auth system
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/auth

Authentication plugin for MoriaJS.

## Features

- **JWT-based**: Secure authentication using JSON Web Tokens.
- **OAuth Support**: Easy integration with GitHub, Google, and more.
- **Auth Hooks**: `requireAuth` guard for routes.

## Usage

```ts
import { authPlugin, requireAuth } from '@moriajs/auth';

await app.use(authPlugin({
  secret: 'your-secret'
}));

// Guard a route
server.get('/me', { preHandler: [requireAuth] }, async (req) => {
  return req.user;
});
```
npm package: @moriajs/cli
Description: MoriaJS CLI — dev, build, and generate commands
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/cli

The command-line interface for MoriaJS.

## Commands

- `moria init`: Scaffold a new project.
- `moria dev`: Start the development server.
- `moria build`: Build for production.

## Installation

```bash
npm install -g @moriajs/cli
```
npm package: @moriajs/core
Description: MoriaJS framework core — Fastify server, Vite integration, and routing
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/core

The engine of the MoriaJS framework.

## Features

- **File-Based Routing**: Auto-discovery of routes in `src/routes`.
- **SSR & Hydration**: Server-side rendering with Mithril.js.
- **Fastify under the hood**: High-performance HTTP server.
- **Vite Integration**: Blazing fast development server and production builds.
- **Middleware**: Intuitive middleware system.

## Usage

```ts
import { createApp } from '@moriajs/core';

const app = await createApp();
await app.listen({ port: 3000 });
```
npm package: @moriajs/db
Description: MoriaJS database — Kysely adapters with kysely-schema integration
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/db

Database abstraction layer for MoriaJS.

## Features

- **Kysely Integration**: Type-safe SQL query builder.
- **Pongo Support**: Document API for PostgreSQL (JSONB).
- **MongoDB Support**: Native MongoDB integration.
- **Multi-adapter**: Support for PostgreSQL, SQLite, and MongoDB.

## Usage

### SQL (Kysely)
```ts
import { createDatabase } from '@moriajs/db';

const db = await createDatabase({
  adapter: 'pg',
  url: process.env.DATABASE_URL
});
```

### Document (MongoDB)
```ts
import { createDatabase } from '@moriajs/db';

const db = await createDatabase({
  adapter: 'mongo',
  url: 'mongodb://localhost:27017',
  dbName: 'my_database'
});
```
npm package: @moriajs/renderer
Description: MoriaJS renderer — Mithril.js SSR/CSR hybrid rendering engine
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/renderer

Isomorphic renderer for Mithril.js.

## Features

- **SSR**: Render Mithril components on the server.
- **Hydration**: Seamless hand-off from server to client.
- **Data Fetching**: Support for `getServerData`.

## Usage

```ts
import { renderToString } from '@moriajs/renderer';
const html = await renderToString(MyComponent, initialData);
```

## Isomorphic Components & SSR

When building components that run on both server and client, you must follow specific guidelines to avoid ReferenceErrors and state leaks:

> [!CAUTION]
> **Do not use top-level module variables for component state.** This can lead to server crashes (ReferenceError) during HMR and state bleeding across requests. Always use `vnode.state`.

See the full [SSR Guidelines](./SSR_GUIDELINES.md) for best practices and common pitfalls.
npm package: @moriajs/ui
Description: MoriaJS UI — Toaster, modals, and component primitives for Mithril.js
Author: Guntur-D
Latest version: 0.4.39

# @moriajs/ui

A collection of premium UI components for MoriaJS apps.

## Components

- **Toast**: Beautiful notifications (`toast`, `Toaster`).
- **Modal**: Interactive modal dialogs with smooth animations.
- **Confirmation**: Imperative confirmation dialogs (`confirm`, `ConfirmationRegistry`).
- **MoriaUI**: Aggregate export for easy discovery.

## Usage

### 1. Root Setup

Mount the `Toaster` and `ConfirmationRegistry` once in your application's root layout to enable global notifications and confirmations.

```ts
import m from 'mithril';
import { Toaster, ConfirmationRegistry } from '@moriajs/ui';

const Layout = {
  view(vnode) {
    return m('div', [
      m(Toaster),
      m(ConfirmationRegistry),
      m('main', vnode.children),
    ]);
  }
};
```

### 2. Notifications

```ts
import { toast } from '@moriajs/ui';

toast.success('Project saved!');
toast.error('Connection failed');
```

### 3. Confirmations (Imperative)

The `confirm()` utility returns a Promise that resolves to `true` if the user confirms, and `false` if they cancel or close the modal.

```ts
import { confirm } from '@moriajs/ui';

async function handleDelete() {
  const confirmed = await confirm({
    title: 'Delete everything?',
    message: 'This action is irreversible. Continue?',
    confirmText: 'Yes, delete it',
    cancelText: 'No, wait',
    type: 'danger',
  });

  if (confirmed) {
    // Perform deletion...
  }
}
```

### 4. Modal (Declarative)

```ts
import { Modal } from '@moriajs/ui';

let isOpen = false;

m(Modal, {
  isOpen,
  title: 'Information',
  onClose: () => { isOpen = false; },
}, [
  m('p', 'This is a declarative modal.'),
]);
```
npm package: @morimorig3/fizzbuzz
Description: A JavaScript implementation of FizzBuzz
Author: Naoto Morishita
Latest version: 1.0.0

# fizzbuzz

A JavaScript implementation of FizzBuzz

## Installation

```sh
$ npm install @morimorig3/fizzbuzz
```

## Usage

### In JavaScript Code

```js
const fizzbuzz = require('@morimorig3/fizzbuzz')

fizzbuzz(1) // '1'
fizzbuzz(2) // '1'
fizzbuzz(3) // 'Fizz'
fizzbuzz(4) // '1'
fizzbuzz(5) // 'Buzz'
fizzbuzz(15) // 'FizzBuzz'
```

### From the command line

```sh
$ npx fizzbuzz 1
1
$ npx fizzbuzz 2
2
$ npx fizzbuzz 3
Fizz
$ npx fizzbuzz 5
Buzz
$ npx fizzbuzz 15
FizzBuzz
```
npm package: @morimoriysmoon/chartjs-plugin-zoom
Description: Plugin that enables zoom and pan functionality in Chart.js charts.
Author: morimori.ysmoon@gmail.com
Latest version: 2.0.4

# chartjs-plugin-zoom

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/chartjs/chartjs-plugin-zoom/ci.yml)](https://github.com/chartjs/chartjs-plugin-zoom/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/chartjs/chartjs-plugin-zoom/badge.svg?branch=master)](https://coveralls.io/github/chartjs/chartjs-plugin-zoom?branch=master)
[![release](https://img.shields.io/github/v/release/chartjs/chartjs-plugin-zoom?include_prereleases)](https://github.com/chartjs/chartjs-plugin-zoom/releases)
[![npm (latest)](https://img.shields.io/npm/v/chartjs-plugin-zoom/latest)](https://www.npmjs.com/package/chartjs-plugin-zoom/v/latest)
[![npm (next)](https://img.shields.io/npm/v/chartjs-plugin-zoom/next)](https://www.npmjs.com/package/chartjs-plugin-zoom/v/next)
[![documentation](https://img.shields.io/static/v1?message=Documentation&color=informational)](https://www.chartjs.org/chartjs-plugin-zoom/index)
<a href="https://github.com/chartjs/awesome"><img src="https://awesome.re/badge-flat2.svg" alt="Awesome"></a>

A zoom and pan plugin for Chart.js >= 3.0.0

For Chart.js 2.6.0 to 2.9.x support, use [version 0.7.7 of this plugin](https://github.com/chartjs/chartjs-plugin-zoom/releases/tag/v0.7.7).

Panning can be done via the mouse or with a finger.
Zooming is done via the mouse wheel or via a pinch gesture. [Hammer.js](https://hammerjs.github.io/) is used for gesture recognition.

## Documentation

You can find documentation for chartjs-plugin-zoom at [www.chartjs.org/chartjs-plugin-zoom](https://www.chartjs.org/chartjs-plugin-zoom/).

Prior to v0.4.0, this plugin was known as 'Chart.Zoom.js'. Old versions are still available on npm under that name.

## Contributing

Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](CONTRIBUTING.md) first.

## License

chartjs-plugin-zoom.js is available under the [MIT license](https://opensource.org/licenses/MIT).

## Change log

- Supports range selection with "range" options

```javascript
// sample options
const zoomPluginOptions = {
 pan: {...},
 zoom: {...},
 range: {
   enabled: true,
   mode: "xy",
   mirroring: true, // if false, "normal" mode
   drawTime: "beforeDatasetsDraw",
   modifierKey: "alt",
   backgroundColor: "rgba(255, 99, 132, 0.2)",
   borderColor: "rgb(255, 99, 132)",
   borderWidth: 1,
   onRangeSelected: (chart, rangeDataIndex) => {
    // rangeDataIndex: {x: {left, right}, y:{top, bottom}}
   },
   label: {
     enabled: false,
     font: {
       size: 10,
       weight: "normal",
       color: "rgb(255, 99, 132)",
     },
     xFormatter: (dataIndex) => { return "x-value" },
     yFormatter: (dataIndex) => { return "y-value" },
   },
 }
}
```