open-index/open-npm huggingface dataset:
npm package: @nekazari/module-builder
Description: Vite preset for building Nekazari module IIFE bundles
Latest version: 1.0.0

# @nekazari/module-builder

Vite preset for building Nekazari platform modules as IIFE bundles.

## Quick Start

```ts
// vite.config.ts
import { defineConfig } from 'vite';
import { nkzModulePreset } from '@nekazari/module-builder';

export default defineConfig(nkzModulePreset({
  moduleId: 'my-module',
  entry: 'src/moduleEntry.ts',     // default
  outputFile: 'nkz-module.js',     // default
}));
```

## Module Entry Point

Create `src/moduleEntry.ts`:

```ts
import type { ModuleViewerSlots } from '@nekazari/sdk';

// Import your slot components
import { MyMapLayer } from './slots/MyMapLayer';
import { MyContextPanel } from './slots/MyContextPanel';

const viewerSlots: ModuleViewerSlots = {
  'map-layer': [
    {
      id: 'my-module-map-layer',
      moduleId: 'my-module',
      component: 'MyMapLayer',
      localComponent: MyMapLayer,
      priority: 100,
    },
  ],
  'context-panel': [
    {
      id: 'my-module-context',
      moduleId: 'my-module',
      component: 'MyContextPanel',
      localComponent: MyContextPanel,
      priority: 100,
    },
  ],
};

// Self-register with the host runtime
window.__NKZ__.register({
  id: 'my-module',
  viewerSlots,
  version: '1.0.0',
});
```

## Build

```bash
npm run build:module
# → dist/nkz-module.js (IIFE bundle)
```

Add to `package.json`:
```json
{
  "scripts": {
    "build:module": "vite build"
  }
}
```

## Deploy

```bash
# Upload to MinIO
mc cp dist/nkz-module.js minio/nekazari-frontend/modules/{module-id}/nkz-module.js
```

## Externals

These dependencies are provided by the host via `window` globals. **Do not bundle them**:

| Package | Window Global |
|---------|--------------|
| `react` | `window.React` |
| `react-dom` | `window.ReactDOM` |
| `@nekazari/sdk` | `window.__NKZ_SDK__` |
| `@nekazari/ui-kit` | `window.__NKZ_UI__` |

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `moduleId` | `string` | required | Module identifier (must match DB) |
| `entry` | `string` | `'src/moduleEntry.ts'` | Entry point file |
| `outputFile` | `string` | `'nkz-module.js'` | Output filename |
| `additionalExternals` | `Record<string, string>` | `{}` | Extra externals |
| `viteConfig` | `Partial<UserConfig>` | `{}` | Additional Vite config |
npm package: @nekazari/sdk
Description: **Nekazari Platform SDK** - Official SDK for building Nekazari Platform modules.
Latest version: 1.0.5

# @nekazari/sdk

**Nekazari Platform SDK** - Official SDK for building Nekazari Platform modules.

## License

**Apache-2.0** - See [LICENSE](./LICENSE) file.

This SDK is licensed under Apache-2.0 to enable developers to build proprietary/commercial modules. The core Nekazari Platform remains under AGPL-3.0.

## Installation

```bash
npm install @nekazari/sdk
```

## Usage

```typescript
import { NKZClient, useAuth, useTranslation } from '@nekazari/sdk';

// API Client
const client = new NKZClient({
  baseUrl: '/api',
  getToken: () => token,
  getTenantId: () => tenantId,
});

// Authentication
const { user, token, tenantId } = useAuth();

// Internationalization
const { t } = useTranslation('common');
```

## Documentation

See the [External Developer Guide](https://github.com/nkz-os/nkz/blob/main/docs/development/EXTERNAL_DEVELOPER_GUIDE.md) for complete documentation.

## License Note

This package is licensed under **Apache-2.0**, separate from the core NKZ Platform (AGPL-3.0). This explicitly means that:

- ✅ Third-party modules built with this SDK can use **any license** (proprietary, commercial, closed-source, open-source, etc.).
- ✅ You can build proprietary/commercial modules.
- ✅ You can distribute modules under any license.
- ✅ You can monetize your modules.

Your modules are considered **separate works** when using only the public SDK APIs and communicate with the platform via standard APIs. They do not become derived works of the AGPL-3.0 platform.

---

**Copyright 2025 NKZ Platform (Nekazari)**
npm package: @nekazari/ui-kit
Description: **Nekazari Platform UI Kit** - Official UI components for Nekazari Platform modules.
Latest version: 1.0.1

# @nekazari/ui-kit

**Nekazari Platform UI Kit** - Official UI components for Nekazari Platform modules.

## License

**Apache-2.0** - See [LICENSE](./LICENSE) file.

This UI Kit is licensed under Apache-2.0 to enable developers to build proprietary/commercial modules. The core Nekazari Platform remains under AGPL-3.0.

## Installation

```bash
npm install @nekazari/ui-kit
```

## Usage

```typescript
import { Button, Card, Input } from '@nekazari/ui-kit';

function MyComponent() {
  return (
    <Card padding="md">
      <Input placeholder="Enter text" />
      <Button variant="primary">Submit</Button>
    </Card>
  );
}
```

## Documentation

See the [External Developer Guide](https://github.com/nkz-os/nekazari-public/blob/main/docs/EXTERNAL_DEVELOPER_GUIDE.md) for complete component documentation.

## License Note

This package is licensed under **Apache-2.0**, separate from the core NKZ Platform (AGPL-3.0). This explicitly means that:

- ✅ Third-party modules built with this UI Kit can use **any license** (proprietary, commercial, closed-source, open-source, etc.).
- ✅ You can build proprietary/commercial modules.
- ✅ You can distribute modules under any license.
- ✅ You can monetize your modules.

Your modules are considered **separate works** when using only the public SDK/UI-Kit APIs. They do not become derived works of the AGPL-3.0 platform.

---

**Copyright 2025 NKZ Platform (Nekazari)**