open-index/open-npm huggingface dataset:
npm package: @juno0424/hapi
Description: Wrapper of Alpine JS plugin for HAPI Form, works on Laravel API endpoint. ## CDN ```html <script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script> <script src="https://unpkg.com/@juno0424/hapi@latest/dist/hapi.min.js"></script> ```
Latest version: 0.8.3

# HAPI Form Plugin
Wrapper of Alpine JS plugin for HAPI Form, works on Laravel API endpoint.
## CDN
```html
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
<script src="https://unpkg.com/@juno0424/hapi@latest/dist/hapi.min.js"></script>
```

## Usage
```html
<script>
Hapi.form({
    name: "",
    endpoint: "",
    redirectTo: "",
    fileUpload: {
        filepond: filepondObject,
        el: '#files'
    },
    onSuccess(res) {},
    onFailed(err) {}
});
</script>
```

- name – The name of the instance, to be matched with `x-data="name"`.
- endpoint – The form endpoint URL generated from the backend.
- redirectTo – Location to be redirected after success. Eg: "/thank-you" or "https://example.com". (Optional)
- fileUpload
  - filepond – Filepond object. (Filepond plugin required)
  - el – Select `input` element if you're using normal upload.
- onSuccess() – On success event.
- onFailed() – On failed event.

## Array data
```js
Hapi.form({
    fields: {
      colors; [] // Example an empty array of colors
    },
    name: "",
    endpoint: "",
});
```

## Alpine.js data
Sometimes you might need to set data for Alpine.js, I got your back.
```js
Hapi.form({
    ...
    open: false,
});
```
## Events

### Success Event
When submission is success, Hapi will emit `hapi:success` event.


### Error Event
When submission has error, Hapi will emit `hapi:error` event.
npm package: @juno0424/vue2-hapi
Description: HAPI Form plugin for Vue 2
Author: Juno
Latest version: 0.7.2

# HAPI Form Plugin For Vue 2

## Installation
NPM
```
npm install @juno0424/vue2-hapi
```

Yarn
```
yarn add @juno0424/vue2-hapi
```

## Usage
```vue
<template>
  <form @submit.prevent="submit">
    <div>
      <label>Name</label>
      <input type="text" v-model="fields.name" />
      <p v-if="errors && errors.name" v-text="errors.name[0]"></p>
    </div>
        <div>
      <label>Name</label>
      <input type="text" v-model="fields.name" />
      <p v-if="errors && errors.name" v-text="errors.name[0]"></p>
    </div>
    <div>
      <button type="submit">Submit</button>
      <p x-if="busy">Busy... please wait.</p>
    </div>
  </form>
</template>

<script>
import hapiMixins from "@juno0424/vue2-hapi";

export default {
  mixins: [hapiMixins],
  data() {
    return {
      endpoint: "http://localhost/api/c9a2eac4-9869-4641-913e-8e132e947229",
      redirectTo: "/thank-you"

      // or

      redirectTo: () => {
          // do something
      }
    };
  },
};
</script>
```

## Busy state
You may make use of the `this.busy` state to bind attributes or display loading image to give better user experience.

## Array fields
When you need array fields, please assign it on the the `data()` object accordingly.

Example:
```vue
<script>
export default {
  data() {
    return {
      fields: {
        colors: []
      }
    }
  }
}
</script>
```
npm package: @juno0424/vue2-hapi-inputs
Description: Frontend adapter for HAPI Form and Laravel API form endpoint
Author: Juno
Latest version: 1.0.2

# HAPI Vue Components
Frontend adapter for HAPI Form and Laravel API form endpoint.

## Installation
```
npm install @juno0424/vue2-hapi-inputs
```
or
```
yarn add @juno0424/vue2-hapi-inputs
```

### Mixins
```vue
<template>
  <form @submit.prevent="submit">
    <div>
      <label>Name</label>
      <input type="text" v-model="fields.name" />
      <p v-if="errors && errors.name" v-text="errors.name[0]"></p>
    </div>
        <div>
      <label>Name</label>
      <input type="text" v-model="fields.name" />
      <p v-if="errors && errors.name" v-text="errors.name[0]"></p>
    </div>
    <div>
      <button type="submit">Submit</button>
      <p x-if="busy">Busy... please wait.</p>
    </div>
  </form>
</template>

<script>
import hapiMixins from "@juno0424/vue2-hapi";

export default {
  mixins: [hapiMixins],
  data() {
    return {
      endpoint: "http://localhost/api/c9a2eac4-9869-4641-913e-8e132e947229",
      redirectTo: "/thank-you"

      // or

      redirectTo: () => {
          // do something
      }
    };
  },
};
</script>
```

### Busy state
You may make use of the `this.busy` state to bind attributes or display loading image to give better user experience.

### Array fields
When you need array fields, please assign it on the the `data()` object accordingly.

Example:
```vue
<script>
export default {
  data() {
    return {
      fields: {
        colors: []
      }
    }
  }
}
</script>
```

### `InputError` Component
```vue
<template>
  <form>
    <label>Name</name>
    <input type="text" v-model="fields.name">
    <InputError :field="errors.name" />
    ...
  </form>
</template>

<script>
import { InputError } from "@juno0424/vue2-hapi-inputs";

export default {
    components: { InputError }
    ...
}
</script>
```

### `LoaderTailSpin` Component
```vue
<template>
  <form>
    <button>Submit</button>
    <LoaderTailSpin v-if="busy" class="w-10 h-10 inline-block" color="rgba(255,0,255,0.5)" />
    ...
  </form>
</template>

<script>
import { LoaderTailSpin } from "@juno424/vue2-hapi-inputs";

export default {
    components: { LoaderTailSpin }
    ...
}
</script>
```

#### Props
`color` – Accept all HTML color codes (HEX, RGB, HLS)
npm package: @juno_ch/allinpay-syb-mcp-server
Description: Allinpay SYB MCP Server (stdio). Mirrors Java SDK capabilities and exposes one tool per ApiMethod for Cursor/LLM clients.
Latest version: 0.1.1

# Allinpay SYB MCP Server (Node.js)

基于 Node.js 的通联支付收银宝 SDK 封装，已对齐 Java SDK 全量 `ApiMethod` 枚举，通过数据驱动方式映射生产/测试域名和前后台类型。当前以 MCP Server (stdio) 形态运行，不暴露 HTTP 路由。MCP 实现基于通用的 `vscode-jsonrpc`（可走国内 npm 镜像）。

## 特性

- 支持多商户配置，按 `merchantId` 动态路由请求。
- 对齐 Java SDK 的 API 方法注册表，数据驱动，便于新增或变更。
- 内置 MD5、RSA/RSA2、SM2 签名；提供 SM4 加解密（内置敏感字段自动加密，需配置 sm4Key）。
- REST 风格调用入口 `/execute`，同时提供方法和商户管理辅助接口。

## 快速开始

1. 安装依赖
   ```bash
   cd allinpay-syb-mcp-server
   pnpm install # 或 npm install / yarn
   ```
2. 配置商户
   - 复制 `config/merchants.example.json` 为 `config/merchants.json`，填入商户密钥、签名算法、环境等。
   - 或通过环境变量 `MERCHANTS_JSON` 传入数组配置。
3. 启动 MCP Server（stdio）
   ```bash
   pnpm dev          # tsx watch src/mcpServer.ts
   # 或生产构建后
   pnpm build && pnpm start   # node dist/mcpServer.js
   ```
4. 在客户端（如 Cursor）中，连接本地 MCP server 并调用工具：
   - `list-methods`：列举 ApiMethod
   - `<ApiMethod>`：工具名直接对齐 Java SDK `ApiMethod` 枚举常量，例如：
     - 交易：`UNITORDER_PAY`、`TRANX_QUERY`
     - 商户：`MERCHANT_ADD`、`MERCHANT_QUERY`
     - 收银台：`H5_UNIONPAY_ORDER`

## 目录结构

- `src/apiMethods.ts`：API 枚举表，对齐 Java SDK 全量接口。
- `src/client.ts`：核心请求/签名逻辑。
- `src/merchantStore.ts`：商户配置加载（文件 + 环境变量）。
- `src/signers.ts`：签名工具（MD5、RSA、RSA2、SM2；含 SM4 加解密）。
- `src/mcp/registerMcp.ts`：MCP 协议实现（initialize/tools/list/tools/call）。
- `src/mcp/toolRegistry.ts`：按 ApiMethod 生成工具定义与参数 schema（字段 + Javadoc 说明；工具按模块命名）。
- `src/introspect/javaRequestMeta.ts`：解析 Java Request 源码，提取字段与 `@EncryptField`（用于参数 schema + 精准 SM4 加密）。
- `src/mcpServer.ts`：MCP Server 入口（stdio）。

## MCP 说明

当前以 MCP Server 形式（stdio）对外，无需暴露 HTTP 路由。商户配置需在启动前通过文件或环境变量准备好。

## 待办/扩展建议

- 丰富错误处理、重试与回调验签工具。
- 添加自动化测试与接口契约校验。
npm package: @junobuild/admin
Description: A library for interfacing with admin features of Juno
Author: David Dal Busco
Latest version: 4.3.2

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/admin
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/admin
[npm-license]: https://img.shields.io/npm/l/@junobuild/admin
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript admin SDK

A library for interfacing with admin features of [Juno].

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/analytics
Description: Tracker for Juno analytics
Author: David Dal Busco
Latest version: 0.2.14

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/analytics
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/analytics
[npm-license]: https://img.shields.io/npm/l/@junobuild/analytics
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript analytics

A tracker for [Juno] analytics.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/auth
Description: A SDK for working with Juno authentication modules
Author: David Dal Busco
Latest version: 4.1.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/auth
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/auth
[npm-license]: https://img.shields.io/npm/l/@junobuild/auth
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript Authentication SDK

A SDK for working with [Juno] authentication modules.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/cdn
Description: A toolkit for working with modules that implement Juno's CDN functionality
Author: David Dal Busco
Latest version: 2.4.2

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/cdn
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/cdn
[npm-license]: https://img.shields.io/npm/l/@junobuild/cdn
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript CDN Toolkit

A toolkit for working with modules that implement [Juno]'s CDN functionality.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/cli
Description: The Juno command-line interface
Author: David Dal Busco
Latest version: 0.14.6

# Juno CLI

The [Juno] command-line interface.

## Installation

```bash
npm i -g @junobuild/cli
```

Detailed installation instructions can be found in the [CLI documentation](https://juno.build/docs/miscellaneous/cli).

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/cli-tools
Description: A collection of tools for Juno CLIs and Plugins.
Author: David Dal Busco
Latest version: 0.13.3

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/cli-tools
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/cli-tools
[npm-license]: https://img.shields.io/npm/l/@junobuild/cli-tools
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno CLI tools

A collection of tools for Juno CLIs and Plugins.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/config-loader
Description: Utilities for reading Juno's configuration settings.
Author: David Dal Busco
Latest version: 0.4.10

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/config-loader
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/config-loader
[npm-license]: https://img.shields.io/npm/l/@junobuild/config-loader
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno Config Loader

Utilities for reading Juno's configuration settings.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/core
Description: JavaScript core client for Juno
Author: David Dal Busco
Latest version: 5.3.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/core
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/core
[npm-license]: https://img.shields.io/npm/l/@junobuild/core
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript core SDK

JavaScript core client for [Juno].

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/core-peer
Description: JavaScript core client for Juno (deprecated, use @junobuild/core)
Author: David Dal Busco
Latest version: 5.3.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/core-peer
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/core-peer
[npm-license]: https://img.shields.io/npm/l/@junobuild/core-peer
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript core SDK

This library was originally a clone of [core](../core/README.md), with the DFINITY agent-js set as peer-dependencies.

However, since `core` now also uses agent-js as peer dependencies, this library has been **deprecated**.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/core-standalone
Description: JavaScript core client for Juno with all dependencies bundled — no peer dependencies
Author: David Dal Busco
Latest version: 5.3.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/core-standalone
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/core-standalone
[npm-license]: https://img.shields.io/npm/l/@junobuild/core-standalone
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript core SDK

JavaScript [core](../core/README.md) client for Juno with all dependencies bundled — no peer dependencies.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/emulator-playwright
Description: A Playwright library to simplify the integration of the Juno Console and CLI in E2E tests.
Latest version: 0.0.5

# @junobuild/emulator-playwright

A Playwright library to simplify the integration of the Juno Console and CLI in E2E tests.

## Page Objects

- **ConsolePage** — Interact with the Juno Console (sign in, create satellites, copy IDs, etc.)
- **CliPage** — Wrap the Juno CLI (login, deploy, snapshots, config management, etc.)
- **SatellitePage** — Interact with a deployed satellite project

## Test Suite Helpers

### `initEmulatorSuite`

Creates a full emulator test suite: signs in to the Console, creates a satellite, and logs in via the CLI.

```ts
const getPages = initEmulatorSuite({satelliteKind: 'website'});

test('...', async () => {
  const {consolePage, cliPage} = getPages();
});
```

### `initSatelliteSuite`

Lighter suite for tests that target an already-deployed satellite from the local config.

```ts
const getPages = initSatelliteSuite();

test('...', async () => {
  const {satelliteId, cliPage} = getPages();
});
```

## Requirements

- Juno emulator running locally
- `juno.config.ts` with a `<DEV_SATELLITE_ID>` placeholder
npm package: @junobuild/errors
Description: A collection of predefined error constants and utilities for Juno applications.
Author: David Dal Busco
Latest version: 0.2.6

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/errors
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/errors
[npm-license]: https://img.shields.io/npm/l/@junobuild/errors
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript Errors

A collection of predefined error constants and utilities for Juno applications.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/ic-client
Description: Agent and actor with generated bindings for Juno on the Internet Computer
Author: David Dal Busco
Latest version: 8.1.2

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/ic-client
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/ic-client
[npm-license]: https://img.shields.io/npm/l/@junobuild/ic-client
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript Internet Computer Client

Agent and actor with generated bindings for [Juno] on the Internet Computer.

> [!CAUTION]
> This package is intended for use by Juno’s JavaScript/TypeScript libraries and tooling.  
> It is **not** designed to be used directly in application code.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/plugin-tools
Description: A collection of tools for Juno's plugins
Author: David Dal Busco
Latest version: 4.6.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/plugin-tools
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/plugin-tools
[npm-license]: https://img.shields.io/npm/l/@junobuild/plugin-tools
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno plugin tools

A collection of tools for Juno plugins.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/schema
Description: The type system and utilities for validation on Juno
Author: David Dal Busco
Latest version: 1.2.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/schema
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/schema
[npm-license]: https://img.shields.io/npm/l/@junobuild/schema
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript Internet Computer Client

The `j` type system, all schemas and utilities for validation on [Juno].

```typescript
import {defineQuery} from '@junobuild/functions';
import {j} from '@junobuild/schema';

const ArgsSchema = j.strictObject({
  id: j.principal(),
  name: j.string()
});

export const myQuery = defineQuery({
  args: ArgsSchema,
  handler: ({id, name}) => {
    console.log(id.toText(), name);
  }
});
```

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/storage
Description: A library for interfacing with Juno's Storage features.
Author: David Dal Busco
Latest version: 2.4.1

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/storage
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/storage
[npm-license]: https://img.shields.io/npm/l/@junobuild/storage
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript Storage

A library for interfacing with Juno's Storage features.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junobuild/utils
Description: A collection of utilities and constants for Juno JS libs.
Author: David Dal Busco
Latest version: 1.0.2

[![npm][npm-badge]][npm-badge-url]
[![license][npm-license]][npm-license-url]

[npm-badge]: https://img.shields.io/npm/v/@junobuild/utils
[npm-badge-url]: https://www.npmjs.com/package/@junobuild/utils
[npm-license]: https://img.shields.io/npm/l/@junobuild/utils
[npm-license-url]: https://github.com/junobuild/juno-js/blob/main/LICENSE

# Juno JavaScript utils

A collection of utilities and constants for Juno JS libs.

## License

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com)

[juno]: https://juno.build
npm package: @junojs/cli
Description: CLI tool for JunoJS scaffolding and management
Author: JunoJS Team
Latest version: 0.3.5

# @junojs/cli

Providing the lightning-fast command-line interface for **JunoJS**, the AI-native reactive engine. Scaffold projects, generate components, and manage your full-stack development workflow with ease.

## ✨ Features

- **🚀 Instant Scaffolding**: Create a new, pre-configured JunoJS project in seconds.
- **🏗️ Smart Generators**: Quickly spin up components and services with boilerplate-free code.
- **📦 Manifest System**: Auto-discovery of project structure for optimized builds.
- **⚡ Dev & Build Pipeline**: Integrated support for Vite-powered dev server and production builds with Static Site Generation (SSG).

## 🚀 Installation

Install the CLI globally to access the `juno` command anywhere:

```bash
npm install -g @junojs/cli
```

## 🛠️ Usage

### 🆕 Create a New Project
Initialize a fresh JunoJS workspace with all base dependencies:

```bash
juno new my-awesome-app
cd my-awesome-app
npm install
juno dev
```

### 🏗️ Generators
Speed up your development by generating boilerplate for UI components or business logic services.

#### Generate a Component
Creates a `.ts` logic file and a `.html` template in `src/components`.

```bash
juno generate component user-profile
# Shortcut
juno g c user-profile
```

#### Generate a Service
Creates a singleton service class in `src/services`.

```bash
juno generate service auth
# Shortcut
juno g s auth
```

### ⚡ Development & Production

- **`juno dev`**: Starts the Vite development server.
- **`juno build`**: Compiles your application and runs the **Static Site Generation (SSG)** builder.
- **`juno preview`**: Serves your production build locally for final verification.
- **`juno build:static`**: Runs only the Static Site Generation process.

### 📋 Manifest Discovery
Generate or update the `junojs.manifest.json` file which tracks all components and services in your project:

```bash
juno manifest
```

## 📜 License

MIT © [JunoJS Team](https://junojs.example.com)
npm package: @junojs/common
Description: Common utilities for JunoJS (Forms, Router, Http, i18n)
Author: JunoJS Team
Latest version: 0.4.0

# @junojs/common

A set of core utilities for **JunoJS** applications, providing robust solutions for form management, HTTP communication, and internationalization.

## ✨ Features

- **Reactive Forms**: Decorator-based validation system with `FormModel` for state tracking.
- **HTTP Client**: Interceptor-powered `HttpClient` with automatic JSON handling and error routing.
- **I18n Service**: Lightweight, singleton-based internationalization with parameter interpolation.
- **Zod Integration**: Support for schema-based validation alongside class-level decorators.

## 🚀 Installation

```bash
npm install @junojs/common
```

## 🛠️ Modules

### 📝 Forms & Validation
JunoJS Common provides a powerful way to handle forms using class decorators or schemas.

#### Class-Based Forms
Extend `FormModel` and use decorators to define validation rules.

```typescript
import { FormModel, Required, Email, Match } from '@junojs/common';

class RegistrationForm extends FormModel {
  @Required('Username is required')
  username = '';

  @Required()
  @Email()
  email = '';

  @Required()
  password = '';

  @Match('password', 'Passwords do not match')
  confirmPassword = '';
}

const form = new RegistrationForm();
// Check validity
if (form.isValid()) {
  console.log('Form is valid!', form.getErrors());
}
```

#### Schema Validation (Custom or Zod)
Use the built-in schema builder for ad-hoc validation.

```typescript
import { s } from '@junojs/common';

const userSchema = s.object({
  name: s.string().required(),
  age: s.number().min(18)
});

const result = await userSchema.parse({ name: 'John', age: 16 });
// { success: false, errors: { age: 'Min length 18' } }
```

---

### 🌐 HTTP Client
The `HttpClient` provides a clean API for making requests with support for interceptors and global error handling.

```typescript
import { HttpClient } from '@junojs/common';

const http = new HttpClient();

// Interceptors
http.addRequestInterceptor((url, init) => {
  init.headers = { ...init.headers, 'Authorization': 'Bearer ...' };
  return [url, init];
});

// Fetching data
const users = await http.get<User[]>('/api/users');
```

---

### 🌍 I18n Service
The `I18nService` handles multilingual content with simple registration and translation APIs.

```typescript
import { I18nService } from '@junojs/common';

const i18n = I18nService.instance;

// Register translations
i18n.addTranslations('en', { 
  welcome: 'Welcome, {{name}}!',
  submit: 'Send' 
});

i18n.setLocale('en');

// Use in your components
const text = i18n.t('welcome', { name: 'Juno' }); // "Welcome, Juno!"
```

## 📜 License

MIT © [JunoJS Team](https://junojs.example.com)
npm package: @junosuarez/svega
Description: A cli tool to render vega-lite visualizations to svg
Latest version: 1.1.0

# svega

A cli tool to render [vega-lite](https://vega.github.io/vega-lite) visualizations to svg.

![](example/example.png)

## Installation

```
npm install --global @junosuarez/svega

# or

yarn add --global @junosuarez/svega
```

## Usage

```
svega [opts] <spec.vl.json> < data.json > out.svg

   stdin must be data, stdout will be svg or empty

   OPTIONS:
     --format=[auto],json,ndjson,csv
```

The output on stdout is an SVG string. You can save this to a file, open it in your favorite viewer, or display it right in your terminal:

## Displaying svg in your terminal

Kudos to [Kate](https://twitter.com/thingskatedid/status/1316074032379248640) for sending me down this whole graphical terminal adventure.

The examples use `isvg`, the following shell alias, using [kitty terminal](https://sw.kovidgoyal.net/kitty/kittens/icat.html) and rsvg-convert (with `brew install imagemagick`):

```sh
alias isvg='rsvg-convert --zoom=2 | kitty icat --align=left'
```

## Alternatives

There is an official [vega-cli](https://github.com/vega/vega/tree/master/packages/vega-cli) package that includes two tools that may suit your needs:

- vg2svg
- vl2svg
npm package: @junrillg/eslint-config-base
Description: Base eslint config
Author: Junrill Galvez
Latest version: 1.0.7

# @junrillg/eslint-config-base
> This is a base eslint config for any project.

## Installation
```bash
npm install --save-dev eslint @junrillg/eslint-config-base
```

## Basic usage
Create a `.eslintrc` file in the base directory of your project

.eslintrc
```
{
  "extends": [
    "@junrillg/eslint-config-base"
  ],
  "rules: {}
}
```
npm package: @junron/vitepress-md-var
Description: Adds editable variables to markdown code blocks
Author: junron
Latest version: 0.1.0

# VitePress Markdown Variables

## Demo
https://github.com/user-attachments/assets/81a8d859-d089-44b1-ab88-3d84b1abf646

See [./demo](./demo)

## Installation
1. Create `.vitepress/theme/index.ts`
2. Paste the following code  
```typescript
import DefaultTheme from 'vitepress/theme';
import { useRoute } from 'vitepress';
import mdVar from 'vitepress-md-var';  // TODO: actually publish this package

export default {
    ...DefaultTheme,
    enhanceApp(ctx) {
        DefaultTheme.enhanceApp(ctx);
    },
    setup() {
        const route = useRoute();
        mdVar(route);
    }
};
```


## Configuration

```typescript
export interface MarkdownVariablesConfig {
    // Strings that start with this prefix are treated as variables
    prefix?: string,
    // Strings that start with this prefix are NOT treated as variables
    noVarPrefix?: string,
    // This function will be called to store a variable's value in persistent storage
    storeVar?: ((varName: string, varValue: string) => void),
    // This function will be called to load a variable's value from persistent storage
    loadVar?: ((varName: string) => string|null)
}
```

### Example variable persistence
```typescript
export default {
  ...DefaultTheme,
  enhanceApp(ctx) {
    DefaultTheme.enhanceApp(ctx);
  },
  setup() {
    const route = useRoute();
    mdVar(route, {
      loadVar: (varName) => localStorage.getItem("MD_" + varName),
      storeVar: (varName, varVal) =>
        localStorage.setItem("MD_" + varName, varVal),
    });
  },
};
```
npm package: @junsiang/my-card-widget
Description: A simple and reusable card widget built with React and Vite.
Author: Your Name
Latest version: 0.1.0

# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.