open-index/open-npm huggingface dataset:
npm package: @palamar-ui/react
Description: An open-source UI component library for building high-quality, accessible design systems and web apps. Palamar-UI is a low-level UI component library with a focus on accessibility, customization and developer experience. You can use these components eith
Latest version: 5.0.0

# Welcome to Palamar-UI!

An open-source UI component library for building high-quality, accessible design systems and web apps.
Palamar-UI is a low-level UI component library with a focus on accessibility, customization and developer experience. You can use these components either as the base layer of your design system, or adopt them incrementally.

```shell
  npm install @palamar-ui/react
  # or
  yarn add @palamar-ui/react
```

## Documentation

[Palamar-UI Documentation](https://aleksanderpalamar.github.io/palamar-ui/?path=/docs/overview-introduction--page)

## Contributing

We welcome contributions to Palamar-UI! Please read our [contributing guidelines](https://github.com/aleksanderpalamar/palamar-ui) before getting started.

## License

Palamar-UI is licensed under the [MIT License](https://github.com/aleksanderpalamar/palamar-ui/blob/main/LICENSE)

## Credits

Palamar-UI is inspired by [Chakra UI](https://chakra-ui.com/)

## Author

Aleksander Palamar
npm package: @palamar-ui/tokens
Description: An open-source UI component library for building high-quality, accessible design systems and web apps. Palamar-UI is a low-level UI component library with a focus on accessibility, customization and developer experience. You can use these components eith
Latest version: 3.0.0

# Welcome to Palamar-UI!

An open-source UI component library for building high-quality, accessible design systems and web apps.
Palamar-UI is a low-level UI component library with a focus on accessibility, customization and developer experience. You can use these components either as the base layer of your design system, or adopt them incrementally.

```shell
  npm install @palamar-ui/tokens
  # or
  yarn add @palamar-ui/tokens
```

## Documentation

[Palamar-UI Documentation](https://aleksanderpalamar.github.io/palamar-ui/?path=/docs/overview-introduction--page)

## Contributing

We welcome contributions to Palamar-UI! Please read our [contributing guidelines](https://github.com/aleksanderpalamar/palamar-ui) before getting started.

## License

Palamar-UI is licensed under the [MIT License](https://github.com/aleksanderpalamar/palamar-ui/blob/main/LICENSE)

## Credits

Palamar-UI is inspired by [Chakra UI](https://chakra-ui.com/)

## Author

Aleksander Palamar
npm package: @palamedes/cli
Description: Palamedes CLI - Next-generation Lingui tooling
Latest version: 0.1.1

# pmds (Palamedes)

Next-generation Lingui CLI with OXC-based extraction.

## Installation

```bash
pnpm add -g pmds
```

## Usage

### Extract messages

```bash
# Extract messages from source files
pmds extract

# Watch mode
pmds extract --watch

# Remove obsolete messages
pmds extract --clean

# Custom config path
pmds extract --config ./lingui.config.ts

# Verbose output
pmds extract --verbose
```

## Features

- ⚡ **Fast**: Uses OXC parser (~20-100x faster than Babel)
- 📦 **Simple**: No compile step needed (use .po loader instead)
- 👀 **Watch mode**: Re-extract on file changes
- 🧹 **Clean mode**: Remove obsolete messages

## Configuration

Uses standard `lingui.config.ts`:

```typescript
import type { LinguiConfig } from "@lingui/conf"

const config: LinguiConfig = {
  locales: ["en", "de", "es"],
  sourceLocale: "en",
  catalogs: [
    {
      path: "<rootDir>/src/locales/{locale}",
      include: ["src/**/*.{ts,tsx}"],
    },
  ],
}

export default config
```

## Why "pmds"?

Short for **Palamedes** - the next generation of Lingui tooling.
npm package: @palamedes/core-node
Description: Thin Node.js wrapper around the Palamedes Rust core
Latest version: 0.1.1

# @palamedes/core-node

Thin Node.js wrapper around the Palamedes Rust core.

This package provides the JavaScript wrapper around the Palamedes native bindings.

The actual `.node` binary is delivered through platform-specific optional dependencies:

- `@palamedes/core-node-darwin-arm64`
- `@palamedes/core-node-linux-x64-gnu`
- `@palamedes/core-node-linux-arm64-gnu`
- `@palamedes/core-node-win32-x64-msvc`

## Available APIs

- `getNativeInfo()`
- `generateMessageId(message, context?)`
- `parsePo(source)`

## Development

```bash
pnpm --filter @palamedes/core-node build
```

In development, build the matching native target package for your current platform before using this wrapper.
npm package: @palamedes/extractor
Description: High-performance message extractor for Lingui using oxc-parser
Latest version: 0.1.1

# @palamedes/extractor

High-performance message extractor for [Lingui](https://lingui.dev) using [oxc-parser](https://oxc.rs).

## Why?

The default Babel-based extractor is powerful but slow. This extractor uses oxc-parser, which is written in Rust and is **20-100x faster** than Babel for parsing JavaScript/TypeScript.

**Benchmark results (100 files, 2000 messages):**

| Extractor | Time |
|-----------|------|
| Babel     | ~1500ms |
| **oxc**   | **~15ms** |

## Installation

```bash
pnpm add @palamedes/extractor
```

## Usage

```ts
// lingui.config.ts
import { extractor } from '@palamedes/extractor'

export default {
  locales: ['en', 'de', 'fr'],
  sourceLocale: 'en',
  catalogs: [
    {
      path: '<rootDir>/src/locales/{locale}',
      include: ['src'],
    },
  ],
  extractors: [extractor],
}
```

## Supported Syntax

### JSX Macros

```tsx
import { Trans, Plural, Select, SelectOrdinal } from '@lingui/react/macro'

// Trans
<Trans>Hello {name}</Trans>
<Trans id="greeting">Hello World</Trans>
<Trans id="greeting" message="Hello {name}">...</Trans>

// Plural
<Plural value={count} one="# item" other="# items" />

// Select
<Select value={gender} male="He" female="She" other="They" />

// SelectOrdinal
<SelectOrdinal value={position} one="#st" two="#nd" few="#rd" other="#th" />
```

### JS Macros

```ts
import { t, msg, defineMessage, plural, select, selectOrdinal } from '@lingui/core/macro'

// Tagged template
t`Hello ${name}`
msg`Hello World`

// Object descriptor
t({ id: 'greeting', message: 'Hello' })
defineMessage({ id: 'greeting', message: 'Hello {name}' })

// Plural/Select functions
plural(count, { one: '# item', other: '# items' })
select(gender, { male: 'He', female: 'She', other: 'They' })
```

### Runtime Calls (i18n._)

```ts
import { i18n } from '@lingui/core'

// String ID
i18n._("greeting")

// Message descriptor
i18n._({ id: "greeting", message: "Hello" })

// With values and descriptor
i18n._("greeting", { name }, { message: "Hello {name}" })

// Tagged template
i18n.t`Hello ${name}`

// Also works with this.i18n or obj.i18n
this.i18n._("greeting")
```

## Limitations

- Does not support `// lingui-extract-ignore` comments (yet)

## License

MIT
npm package: @palamedes/next-plugin
Description: Next.js integration for Lingui using OXC-based macro transformer
Latest version: 0.1.1

# @palamedes/next-plugin

Next.js integration for Lingui using OXC-based macro transformation. No Babel required.

## Features

- 🚀 **Fast**: Uses [oxc-parser](https://oxc-project.github.io/) for high-performance parsing
- 🔧 **No Babel**: Transforms Lingui macros without Babel or SWC plugins
- 📦 **PO Loader**: Compiles `.po` files to JS at build time
- ⚡ **Webpack & Turbopack**: Works with both bundlers

## Installation

```bash
pnpm add @palamedes/next-plugin @lingui/core @lingui/react
```

## Usage

```js
// next.config.js
const { withPalamedes } = require("@palamedes/next-plugin")

/** @type {import('next').NextConfig} */
const nextConfig = {
  // your existing config
}

module.exports = withPalamedes(nextConfig)
```

That's it! The plugin will:

1. Transform Lingui macros (`` t`...` ``, `<Trans>`, etc.) to runtime calls
2. Compile `.po` files when imported

## Options

```js
const { withPalamedes } = require("@palamedes/next-plugin")

module.exports = withPalamedes(nextConfig, {
  // Only transform files matching this pattern (optional)
  include: /\.(tsx?|jsx?)$/,

  // Exclude files matching this pattern (optional)
  exclude: /node_modules/,

  // Enable/disable .po file compilation (default: true)
  enablePoLoader: true,

  // Path to lingui.config.js (optional)
  configPath: "./lingui.config.js",

  // Fail build on missing translations (default: false)
  failOnMissing: false,

  // Fail build on compilation errors (default: false)
  failOnCompileError: false,

  // Module to import getI18n from (default: "@palamedes/runtime")
  runtimeModule: "@palamedes/runtime",
})
```

## How It Works

### With Webpack

The plugin adds webpack loaders that:
1. Transform Lingui macros in JS/TS files before SWC processes them
2. Compile `.po` files to JS modules

### With Turbopack

The plugin configures Turbopack rules to:
1. Run the OXC transform loader for JS/TS files
2. Compile `.po` files to JS modules

## Usage in Components

```tsx
// Using macros (transformed at build time)
import { t } from "@lingui/macro"
import { Trans } from "@lingui/react/macro"

function Greeting({ name }) {
  return (
    <div>
      <p>{t`Hello, ${name}!`}</p>
      <Trans>Welcome to our app</Trans>
    </div>
  )
}
```

```tsx
// Importing .po files
import { getI18n } from "@palamedes/runtime"
import messages from "./locales/en.po"

const i18n = getI18n()
i18n.load("en", messages)
i18n.activate("en")
```

## Comparison with @lingui/swc-plugin

| Feature | @lingui/swc-plugin | @palamedes/next-plugin |
|---------|-------------------|-------------------------|
| PO compilation | ❌ (separate loader) | ✅ Built-in |
| Macro transformation | ✅ | ✅ |
| Written in | Rust | TypeScript |
| Parser | SWC | OXC |
| Easy to extend | Difficult | Easy |

## License

MIT
npm package: @palamedes/runtime
Description: Palamedes runtime primitives for resolving the active i18n instance
Latest version: 0.1.1

# @palamedes/runtime

Runtime primitives for Palamedes-transformed code.

## API

- `getI18n()`: return the active i18n instance or throw
- `setClientI18n(i18n)`: register the active client instance
- `setServerI18nGetter(getter)`: resolve the active server instance on demand
npm package: @palamedes/transform
Description: OXC-based macro transformer for Lingui - transforms Lingui macros to runtime calls without Babel
Latest version: 0.1.1

# @palamedes/transform

OXC-based macro transformer for Lingui. Transforms Lingui macros (e.g., `` t`Hello` ``, `<Trans>`, `plural`, `select`) into runtime calls without requiring Babel.

## Features

- 🚀 Fast: Uses [oxc-parser](https://oxc-project.github.io/) for high-performance parsing
- 🔧 No Babel required: Works as a standalone transform
- 📦 Framework agnostic: Can be integrated with any bundler via adapters

## Installation

```bash
pnpm add @palamedes/transform
```

## Usage

```ts
import { transformLinguiMacros } from "@palamedes/transform"

const result = transformLinguiMacros(sourceCode, "filename.tsx", {
  runtimeModule: "@palamedes/runtime",
})

console.log(result.code)
```

## API

### `transformLinguiMacros(code, filename, options?)`

Transforms source code containing Lingui macros into runtime calls.

#### Parameters

- `code` (string): The source code to transform
- `filename` (string): The filename (used for source maps and determining file type)
- `options` (object, optional):
  - `runtimeModule` (string): The module to import `getI18n` from. Default: `"@palamedes/runtime"`

#### Returns

- `{ code: string, hasChanged: boolean, map: SourceMap | null }`: The transformed code, whether any transformations were made, and the generated source map

## Supported Macros

- `` t`...` `` - Tagged template literal
- `t({ id, message })` - Call expression with message descriptor
- `plural(count, { one: "...", other: "..." })`
- `select(value, { ... })`
- `selectOrdinal(count, { ... })`
- `<Trans>...</Trans>`
- `<Plural>`, `<Select>`, `<SelectOrdinal>`

## License

MIT
npm package: @palamedes/vite-plugin
Description: Vite plugin for Lingui using OXC-based macro transformer
Latest version: 0.1.1

# @palamedes/vite-plugin

Vite plugin for Lingui that uses OXC-based macro transformation. No Babel required.

## Features

- 🚀 **Fast**: Uses [oxc-parser](https://oxc-project.github.io/) for high-performance parsing
- 🔧 **No Babel**: Transforms Lingui macros without Babel or SWC plugins
- 📦 **PO Loader**: Compiles `.po` files to JS at build time
- ⚡ **Vite Native**: Works seamlessly with Vite's plugin system

## Installation

```bash
pnpm add @palamedes/vite-plugin @lingui/core @lingui/react
```

## Usage

```ts
// vite.config.ts
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import { palamedes } from "@palamedes/vite-plugin"

export default defineConfig({
  plugins: [
    palamedes(),
    react(), // or any other framework plugin
  ],
})
```

That's it! The plugin will:

1. Transform Lingui macros (`` t`...` ``, `<Trans>`, etc.) to runtime calls
2. Compile `.po` files when imported

## Options

```ts
palamedes({
  // Only transform files matching this pattern (optional)
  include: /\.(tsx?|jsx?)$/,

  // Exclude files matching this pattern (optional)
  exclude: /node_modules/,

  // Enable/disable .po file compilation (default: true)
  enablePoLoader: true,

  // Path to lingui.config.js (optional)
  configPath: "./lingui.config.js",

  // Fail build on missing translations (default: false)
  failOnMissing: false,

  // Fail build on compilation errors (default: false)
  failOnCompileError: false,
})
```

## How It Works

### Macro Transformation

The plugin runs as a `pre` transform, processing your source files before other plugins (like React):

```tsx
// Before (your code)
import { t } from "@lingui/macro"
const greeting = t`Hello, ${name}!`

// After (transformed)
import { getI18n } from "@palamedes/runtime"
const greeting = getI18n()._({ id: "abc123", message: "Hello, {name}!", values: { name } })
```

### PO File Loading

Import `.po` files directly:

```tsx
import { getI18n } from "@palamedes/runtime"
import messages from "./locales/en.po"

const i18n = getI18n()
i18n.load("en", messages)
i18n.activate("en")
```

## Comparison with @lingui/vite-plugin

| Feature | @lingui/vite-plugin | @palamedes/vite-plugin |
|---------|---------------------|-------------------------|
| PO compilation | ✅ | ✅ |
| Macro transformation | ❌ (requires babel) | ✅ |
| Babel required | Yes | No |
| Parser | N/A | OXC |

## License

MIT