open-index/open-npm huggingface dataset:
npm package: @rechunk/api-client
Description: TypeScript API client for ReChunk services with OpenAPI-generated interfaces
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/api-client

TypeScript API client for ReChunk services with OpenAPI-generated interfaces.

## Features

- 🔄 Auto-generated TypeScript interfaces from OpenAPI spec
- 🔒 Built-in authentication handling
- 📦 Comprehensive API coverage
- 🌐 Fetch-based HTTP client
- 📝 Full TypeScript support

## Installation

```bash
npm install @rechunk/api-client

# or with yarn
yarn add @rechunk/api-client

# or with pnpm
pnpm add @rechunk/api-client
```

## Usage

```typescript
import {ChunksApi, Configuration} from '@rechunk/api-client';

// Configure the API client
const config = new Configuration({
  basePath: 'https://api.example.com',
  headers: {
    Authorization: `Basic ${btoa('project:key')}`,
  },
});

// Create API instance
const api = new ChunksApi(config);

// Use the API
async function getChunk(projectId: string, chunkId: string) {
  return await api.getChunkById({projectId, chunkId});
}
```

## API Reference

### Authentication

```typescript
import {AuthenticationApi} from '@rechunk/api-client';

const authApi = new AuthenticationApi(config);
const token = await authApi.createToken();
```

### Projects

```typescript
import {ProjectsApi} from '@rechunk/api-client';

const projectsApi = new ProjectsApi(config);
const project = await projectsApi.createProject();
```

### Chunks

```typescript
import {ChunksApi} from '@rechunk/api-client';

const chunksApi = new ChunksApi(config);

// Get chunk
const chunk = await chunksApi.getChunkById({
  projectId: 'project-id',
  chunkId: 'chunk-id',
});

// Create chunk
const newChunk = await chunksApi.createChunkForProject({
  projectId: 'project-id',
  chunkId: 'chunk-id',
  chunkCreate: {data: 'chunk-content'},
});
```

## Models

- `Chunk` - Represents a code chunk with data and signature
- `Project` - Project configuration and credentials
- `Token` - Authentication token information
- `ChunkCreate` - Parameters for creating new chunks

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @rechunk/babel-plugin
Description: Babel plugin for transforming and processing ReChunk directives in React Native applications
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/babel-plugin

Babel plugin for transforming and processing ReChunk directives in React Native applications.

## Features

- 🎯 Transforms `use rechunk` directives
- 🔄 Automatic code splitting support
- ⚡️ Dynamic imports generation
- 🛡️ Secure token handling
- 🔍 Path alias resolution
- 📦 React Native optimization

## Installation

```bash
npm install --save-dev @rechunk/babel-plugin

# or with yarn
yarn add -D @rechunk/babel-plugin

# or with pnpm
pnpm add -D @rechunk/babel-plugin
```

## Usage

### Basic Configuration

```javascript
// babel.config.js
module.exports = {
  plugins: ['@rechunk/babel-plugin'],
};
```

### With React Native

```javascript
// babel.config.js
const {withReactNativeBabelPresetOptions} = require('@rechunk/babel-plugin');

module.exports = {
  presets: [
    [
      'module:metro-react-native-babel-preset',
      api => withReactNativeBabelPresetOptions(api),
    ],
  ],
  plugins: ['@rechunk/babel-plugin'],
};
```

### With Expo

```javascript
// babel.config.js
const {withBabelPresetExpoOptions} = require('@rechunk/babel-plugin');

module.exports = {
  presets: [['babel-preset-expo', api => withBabelPresetExpoOptions(api)]],
  plugins: ['@rechunk/babel-plugin'],
};
```

## Features

### Directive Transform

```tsx
// Input
'use rechunk';
export default function MyComponent() {
  return <View>...</View>;
}

// Output
import React from 'react';
import {importChunk} from '@rechunk/core';

const $$ReChunkModule = React.lazy(() => importChunk('base64-encoded-path'));
export default $$ReChunkModule;
```

### Environment Support

```bash
# Production mode
RECHUNK_ENVIRONMENT=prod

# Development mode
RECHUNK_ENVIRONMENT=dev

# Offline mode
RECHUNK_ENVIRONMENT=offline
```

## Configuration

### .rechunkrc.json

```json
{
  "host": "https://your-rechunk-host.com",
  "project": "your-project-id",
  "readKey": "your-read-key",
  "publicKey": "your-public-key",
  "external": ["optional-external-dependency"]
}
```

## API Reference

### withReactNativeBabelPresetOptions

```typescript
function withReactNativeBabelPresetOptions(
  api: ConfigAPI,
  options: Record<string, unknown> = {},
): Record<string, unknown>;
```

### withBabelPresetExpoOptions

```typescript
function withBabelPresetExpoOptions(
  api: ConfigAPI,
  options: BabelPresetExpoOptions = {},
): BabelPresetExpoOptions;
```

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @rechunk/cli
Description: Command-line interface for managing ReChunk projects, chunks, and deployments
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/cli

Command-line interface for managing ReChunk projects, chunks, and deployments.

## Features

- 🚀 Project initialization
- 📦 Chunk management
- 🔄 Development server
- 🔐 Secure publishing
- 📱 React Native integration
- 🛠️ Configuration tools

## Installation

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

# or with yarn
yarn global add @rechunk/cli

# or with pnpm
pnpm add -g @rechunk/cli
```

## Commands

### Initialize Project

```bash
rechunk init -h https://rechunk.example.com -u username -p password
```

### Start Development Server

```bash
rechunk dev-server
```

### Publish Chunks

```bash
rechunk publish
```

### Manage Chunks

```bash
rechunk manage
```

## Configuration

### .rechunkrc.json

```json
{
  "host": "https://rechunk.example.com",
  "project": "project-id",
  "readKey": "read-key",
  "writeKey": "write-key",
  "publicKey": "public-key",
  "privateKey": "private-key",
  "external": ["external-dependency"]
}
```

## Environment Variables

```bash
# Development server
RECHUNK_ENVIRONMENT=dev

# Production mode
RECHUNK_ENVIRONMENT=prod

# Offline mode
RECHUNK_ENVIRONMENT=offline
```

## Development Server

The development server runs on port 49904 by default and provides:

- Hot reloading
- Chunk signing
- Development-time optimizations

## Publishing

Interactive chunk publishing process:

1. Scans for `use rechunk` directives
2. Prompts for chunk selection
3. Bundles selected chunks
4. Signs and uploads to server

## Management Interface

Opens a browser interface for:

- Viewing published chunks
- Managing versions
- Monitoring usage
- Configuration updates

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @rechunk/core
Description: Core functionality for ReChunk dynamic code loading and chunk management in React Native
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/core

Core functionality for ReChunk dynamic code loading and chunk management in React Native.

## Features

- 🚀 Dynamic code loading
- 🔒 Secure chunk verification
- 💾 Smart caching
- 🔄 Event emitter support
- 📦 Type-safe imports
- ⚡️ Optimized performance

## Installation

```bash
npm install @rechunk/core

# or with yarn
yarn add @rechunk/core

# or with pnpm
pnpm add @rechunk/core
```

## Usage

### Basic Import

```typescript
import ReChunk, {importChunk} from '@rechunk/core';

// Dynamic import
const MyComponent = React.lazy(() => importChunk('component-id'));
```

### Configuration

```typescript
import ReChunk from '@rechunk/core';

ReChunk.addConfiguration({
  verify: true,
  publicKey: 'YOUR_PUBLIC_KEY',
  resolver: async chunkId => {
    // Custom chunk resolution
    return {data: '...', token: '...'};
  },
});
```

### Event Handling

```typescript
import {on} from '@rechunk/core';

on('chunkId', () => {
  console.log('Chunk loaded!');
});
```

## API Reference

### importChunk

```typescript
async function importChunk<T extends string>(
  chunkId: ValidateReChunkEntry<T>,
): Promise<{default: React.ComponentType<any>}>;
```

### addConfiguration

```typescript
interface Configuration {
  verify?: boolean;
  publicKey?: string;
  resolver?: ResolverFunction;
  global?: CustomRequire;
}

function addConfiguration(config: Configuration): void;
```

### on

```typescript
function on(event: string, callback: Function, ctx?: any): TinyEmitter;
```

## Security

- JWS verification
- Runtime integrity checks
- Secure module loading
- Configurable verification

## Type Safety

```typescript
// Valid import
const Component = await importChunk('valid-chunk');

// Type error
const Invalid = await importChunk('invalid-chunk');
//                                ^^^^^^^^^^^^^^^ Error: Not a valid chunk
```

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @rechunk/metro-config
Description: Metro bundler configuration utilities for ReChunk integration with React Native
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/metro-config

Metro bundler configuration utilities for ReChunk integration with React Native.

## Features

- 🔄 Intelligent cache versioning
- ⚡️ Optimized bundling
- 🔍 Environment-aware configuration
- 🚀 Dev server integration
- 📦 React Native optimization

## Installation

```bash
npm install @rechunk/metro-config

# or with yarn
yarn add @rechunk/metro-config

# or with pnpm
pnpm add @rechunk/metro-config
```

## Usage

### Basic Configuration

```javascript
// metro.config.js
const {cacheVersion} = require('@rechunk/metro-config');

module.exports = {
  cacheVersion,
  // ... other Metro configuration
};
```

### Advanced Configuration

```javascript
// metro.config.js
const {cacheVersion} = require('@rechunk/metro-config');

module.exports = {
  cacheVersion,
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
  },
};
```

## Cache Version Generation

The cache version is generated based on:

- `.rechunkrc.json` modification time
- Current `RECHUNK_ENVIRONMENT` value
- ReChunk dev server status

```typescript
const version = cacheVersion; // Returns MD5 hash string
```

## Environment Support

```bash
# Development mode
RECHUNK_ENVIRONMENT=dev

# Production mode
RECHUNK_ENVIRONMENT=prod

# Offline mode
RECHUNK_ENVIRONMENT=offline
```

## Integration with ReChunk

- Automatically invalidates cache when configuration changes
- Supports development server hot reloading
- Optimizes builds for different environments

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @rechunk/rollup-preset
Description: Rollup configuration preset for bundling ReChunk components and modules
Author: Chris Herman
Latest version: 0.3.0

# @rechunk/rollup-preset

Rollup configuration preset for bundling ReChunk components and modules.

## Features

- 🎯 Optimized for ReChunk components
- 🔧 Babel integration
- 📦 Asset handling
- 🔄 Tree shaking
- ⚡️ Performance optimization
- 🛡️ TypeScript support

## Installation

```bash
npm install @rechunk/rollup-preset

# or with yarn
yarn add @rechunk/rollup-preset

# or with pnpm
pnpm add @rechunk/rollup-preset
```

## Usage

### Basic Configuration

```javascript
// rollup.config.js
import withRechunk from '@rechunk/rollup-preset';

export default withRechunk({
  input: 'src/component.tsx',
});
```

### Advanced Configuration

```javascript
// rollup.config.js
import withRechunk from '@rechunk/rollup-preset';

export default withRechunk({
  input: 'src/component.tsx',
  external: ['react', 'react-native'],
  output: {
    format: 'cjs',
    sourcemap: true,
  },
});
```

## Features

### Babel Integration

Automatically configures Babel with:

- TypeScript support
- React/JSX transformation
- Module resolution
- Plugin optimization

```javascript
export const BABEL_ROLLUP_OVERRIDES = {
  overrides: [
    {
      plugins: [['module-resolver', false]],
    },
  ],
};
```

### Asset Handling

Built-in support for:

- Images
- SVGs
- Other static assets

### External Dependencies

Automatically handles:

- Package dependencies
- Peer dependencies
- Custom externals from `.rechunkrc.json`

## API Reference

### withRechunk

```typescript
function withRechunk(options: RollupOptions = {}): Promise<RollupOptions>;
```

### Configuration Options

```typescript
interface RollupOptions {
  input: string;
  external?: string[];
  plugins?: Plugin[];
  // ... other Rollup options
}
```

## Integration with ReChunk

- Optimized for ReChunk component bundling
- Supports development server
- Handles chunk signing and verification

## Best Practices

1. Always specify `input` as a string path
2. Use `.rechunkrc.json` for external dependencies
3. Let the preset handle Babel configuration
4. Utilize tree shaking for optimal bundles

## Contributing

Contributions are welcome! Please read our contributing guidelines first.

## License

MIT
npm package: @recipe-book/core
Description: A toolkit to build recipe interfaces in any framework. Supports unit conversions, ingredient highlighting, and more.
Latest version: 0.0.3

# @recipe-book/core

A toolkit to build recipe interfaces in any framework. Supports unit conversions, ingredient highlighting, and more.

## Packages

| Package                         | Description                                   |
| :------------------------------ | :-------------------------------------------- |
| [`core`](./packages/core)       | Core logic for parsing and formatting recipes |
| [`react`](./packages/react)     | React components for displaying recipes       |
| [`website`](./packages/website) | Demo website for Recipe components.           |
npm package: @recipe-book/react
Description: Unstyled, accessible, compound React components for displaying recipes
Latest version: 0.0.3

# @recipe-book/react

Unstyled, accessible, compound React components for displaying recipes

## Core concepts

### Compound structure

Recipe components are designed to be used as building blocks for displaying recipes. They are unstyled, and can be composed together to create a custom recipe interface.

```jsx
function MyRecipeComponent() {
  <Recipe.Root>
    <Recipe.Thumbnail />
    <h3>Ingredients</h3>
    <Recipe.Ingredients />
    <h3>Instructions</h3>
    <Recipe.Instructions renderer={(instruction) => <MyInstructionComponent {...instruction}>} />
    <hr />
    <RecipeNotes />
  </Recipe.Root>
}
```