open-index/open-npm huggingface dataset:
npm package: @mutable/meiosis
Description: Meiosis is the Design System for Mutable Products and Websites
Author: @mutable, @vachi, @AnnaNarim, @sathovsepyan
Latest version: 1.1.18

# meiosis

Use this Design System within Mutable Products.

## Getting Started

```bash
npm install
```

Note: When using NPM v7, you might encounter `npm ERR! ERESOLVE unable to resolve dependency tree`. To fix this, please use `npm install --legacy-peer-deps`, since the error is caused by some of the dependencies (including [@visx](https://github.com/airbnb/visx/issues/872)) not supporting React v17 yet. 

## Run Storybook 

```bash
npm run storybook
```
All the components having `*.stories.tsx` are automatically included in Storybook. 

## Build Storybook for production

```bash
npm run build-storybook
```

## Build the component library for production

```bash
npm run build
```

## Generate new components
When creating a new component, instead of creating the component directory and all its files manually, a util called `create-component.js` can be used. 

```
npm run generate ComponentName
```

This will generate the following files, based on the templates stored at `util/templates`. 

```
/src
  /components
    /ComponentName
      ComponentName.tsx
      ComponentName.stories.tsx
      ComponentName.types.ts
```

To export the newly added component in the npm package, add it to `index.ts`. 

## NPM Publish

The component library is published to [@mutable/meiosis](https://www.npmjs.com/package/@mutable/meiosis). To publish a new version, update the version in `package.json`, and run:

```bash
npm publish
```

## Using the package

To use meiosis components in a client app, run:

```bash
npm install @mutable/meiosis
```
Then, simply use them by `import { Table, SystemHealthCard } from "@mutable/meiosis"`.

## Testing the package

All the components can be tested in different states using Storybook stories. 

In addition, to test the package in client apps locally (before publishing it to NPM package registry), build the component library, and, in the client app run: 

```bash
npm uninstall @mutable/meiosis
npm install full/path/to/package
```

Remember to change the dependency back to the published NPM package after testing. 

## References

The library was inspired by [react-component-library](https://github.com/HarveyD/react-component-library) template.
npm package: @mutableideas/schematics
Description: Schematics for NgRx, NgRx Firebase, Form Control, and Container Components with NgRx
Author: Paul Mead
Latest version: 1.1.0

# Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

### Testing

To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.

Check the documentation with
```bash
schematics --help
```

### Unit Testing

`npm run test` will run the unit tests, using Jasmine as a runner and test framework.

### Publishing

To publish, simply do:

```bash
npm run build
npm publish
```

That's it!
npm package: @mutablepvp/sdk
Description: SDK for integrating with the Mutable gaming platform
Author: Mutable Team
Latest version: 1.0.0

# Mutable SDK

The official SDK for integrating with the Mutable gaming platform.

## Installation

\`\`\`bash
npm install @mutable/sdk
# or
yarn add @mutable/sdk
\`\`\`

## Quick Start

\`\`\`typescript
import { MutableSDK } from '@mutable/sdk';

// Initialize the SDK
const sdk = new MutableSDK({
  environment: 'production', // or 'development', 'staging'
  apiKey: 'YOUR_API_KEY',
  debug: false
});

// Initialize with game information
await sdk.initialize({
  id: 'your-game-id',
  name: 'Your Game Name',
  version: '1.0.0'
});

// Authenticate a player
const player = await sdk.auth.authenticateAsGuest('Player1');

// Set the player in the SDK
sdk.setPlayer(player);

// Now you can use other SDK features
const balance = await sdk.transactions.getBalance('MUTB');
console.log(`Player balance: ${balance} MUTB`);
\`\`\`

## Features

- **Authentication**: Support for guest and wallet-based authentication
- **Game State Management**: Create and manage game sessions, track player states
- **Transactions**: Handle token transactions, wagers, and rewards
- **Analytics**: Track game events and player behavior
- **Unity Integration**: Seamless integration with Unity WebGL games

## Documentation

For full documentation, visit [docs.mutable.io](https://docs.mutable.io).

## Examples

### Creating a Game Session

\`\`\`typescript
// Create a new game session
const session = await sdk.gameState.createSession('standard', true);

// Start the session
const gameState = await sdk.gameState.startSession();

// Update a player's state
await sdk.gameState.updatePlayerState(player.id, {
  score: 100,
  lives: 3
});

// End the session
await sdk.gameState.endSession([player.id]);
\`\`\`

### Handling Transactions

\`\`\`typescript
// Get player balance
const balance = await sdk.transactions.getBalance('MUTB');

// Place a wager
await sdk.transactions.placeWager(10, 'MUTB', gameId, sessionId);

// Award a reward
await sdk.transactions.awardReward(50, 'MUTB', gameId, sessionId);
\`\`\`

### Tracking Analytics

\`\`\`typescript
// Track game start
sdk.analytics.trackGameStart({
  mode: 'standard',
  difficulty: 'normal'
});

// Track custom event
sdk.analytics.trackEvent('custom', {
  action: 'level_complete',
  level: 5,
  score: 1000
});
\`\`\`

### Unity Integration

\`\`\`typescript
// Load Unity WebGL game
await sdk.unityBridge.loadUnity('unity-canvas', {
  loaderUrl: 'Build/Game.loader.js',
  dataUrl: 'Build/Game.data',
  frameworkUrl: 'Build/Game.framework.js',
  codeUrl: 'Build/Game.wasm'
});

// Send message to Unity
sdk.unityBridge.sendMessage('GameManager', 'StartGame', {
  difficulty: 'hard',
  level: 1
});

// Listen for messages from Unity
sdk.unityBridge.on('score_update', (data) => {
  console.log('Score updated:', data.score);
});
\`\`\`

## License

MIT
npm package: @mutadev/account
Description: Account system for [Muta framework](https://github.com/nervosnetwork/muta),
Author: homura
Latest version: 0.2.0

# @mutadev/account

Account system for [Muta framework](https://github.com/nervosnetwork/muta),

## Signature

```js
const Account = require('@mutadev/account');

const account = new Account('0x...');
account.signTransaction({
  service: '...',
  method: '...',
  payload: '{...}',
  sender: '0x...',
});
```

## Multi-signature

```js
const Account = require('@mutadev/account');

const account = new Account('0x...');
// a signed transaction from another account
const signedTransaction = {};

account.signTransaction(signedTransaction);
```
npm package: @mutadev/client
Description: ## Examples
Author: homura
Latest version: 0.2.0

# @mutadev/client

## Examples

### Basic

```js
async function getTransaction() {
  const client = new Client();

  const raw = await client.composeTransaction({
    serviceName: 'asset',
    method: 'create_asset',
    payload: {
      name: Math.random().toString(),
      supply: 10000,
      symbol: Math.random().toString(),
    },
  });

  const hash = client.sendTransaction(account.signTransaction(raw));
  const tx = await retry(() => client.getTransaction(hash));
  console.log(tx);
  const receipt = await retry(() => client.getReceipt(hash));
  console.log(receipt);
}
```

### Batch

```js
async function batch() {
  const client = new Client();

  const tx1 = await client.composeTransaction({
    serviceName: 'asset',
    method: 'create_asset',
    payload: {
      name: Math.random().toString(),
      supply: 10000,
      symbol: Math.random().toString(),
    },
  });

  const tx2 = await client.composeTransaction({
    serviceName: 'asset',
    method: 'create_asset',
    payload: {
      name: Math.random().toString(),
      supply: 10000,
      symbol: Math.random().toString(),
    },
  });

  const hashes = await Promise.all([
    client.sendTransaction(account.signTransaction(tx1)),
    client.sendTransaction(account.signTransaction(tx2)),
  ]);

  const batchClient = new BatchClient();
  const receipts = await retry(() => batchClient.getReceipts(hashes));
  expect(receipts.every((receipt) => receipt.txHash)).toBe(true);
}
```
npm package: @mutadev/client-raw
Description: An auto generated GraphQL API binding with Muta GraphQL
Author: homura
Latest version: 0.2.0

# muta-client-raw

An auto generated GraphQL API binding with Muta GraphQL

## Customize

When you want to customize the generated sdk, try to edit the follow config files.

- [codegen.yml](./codegen.yml) - a configuration for [graphql-code-generator](https://graphql-code-generator.com/)
- [muta.graphql](./muta.graphql) - all the GraphQL `query` all `mutation` defined, then `query`s and `mutation`s would be generated as reusable TypeScript code

Then run `npm run generate`, the code will be generated under the [src](./src) folder
npm package: @mutadev/defaults
Description: Provide the default configuration or read configuration from environment variables for SDK instance
Author: homura
Latest version: 0.2.0

# @mutadev/defaults

Provide the default configuration or read configuration from environment variables for SDK instance

## Environment Variables

### MUTA_ENDPOINT

The Muta GraphQL endpoint

- type: string
- default: http://127.0.0.1:8000/graphql

### MUTA_CHAIN_ID

A hex formatted string for chain_id

- type: string
- default: 0xb6a4d7da21443f5e816e8700eea87610e6d769657d6b8ec73028457bf2ca4036

### MUTA_CONSENSUS_INTERVAL

Interval (in ms) of consensus engine executed each block.

- type: number
- default: 3000

### MUTA_TIMEOUT_GAP

A number for max available unprocessed block height gap

- type: number
- default: 20

### MUTA_ADDRESS_HRP

The HRP(human-readable partition) of [bech32](https://en.bitcoin.it/wiki/Bech32) encoded address, this makes muta address prefix more readable

- type: string
- default: muta

### MUTA_GRAPHQL_CALLER

The default GraphQL caller when calling `queryService`

- type: string
- default: muta1ef58dnhean6ugl7s672ya3tre4h0qgx63nas54
npm package: @mutadev/muta-sdk
Description: Muta JavaScript SDK.
Author: homura
Latest version: 0.2.0

# @mutadev/muta-sdk

Muta JavaScript SDK.

## Usage

```js
const muta = require('@mutadev/muta-sdk');

muta.setDefaultVariables('MUTA_ENDPOINT', 'http://localhost:8000/graphql');

async function main() {
  const client = new muta.Client();
  const height = await client.getLatestBlockHeight();
  console.log(height);
}

main();
```
npm package: @mutadev/types
Description: Muta service binding types for TypeScript definition.
Author: homura
Latest version: 0.2.0

# @mutadev/types

Muta service binding types for TypeScript definition.

## Types Mapping

### GraphQL

| Rust    | TypeScript |
| ------- | ---------- |
| String  | string     |
| Bytes   | Bytes      |
| Address | Address    |
| Hex     | Hex        |

### Service

| Rust    | TypeScript |
| ------- | ---------- |
| u32     | u32        |
| u64     | u64        |
| Vec     | Vec        |
| Address | Address    |
| Hash    | Hash       |
| String  | string     |
npm package: @mutaflow/devtools
Description: Devtools prototype for Mutaflow mutation timelines
Latest version: 0.1.2

# @mutaflow/devtools

Devtools package for inspecting Mutaflow mutation timelines.

## Current Components

- `MutationSummaryPanel`
- `MutationTimelinePanel`
- `MutationEventInspector`
- `MutationDevtoolsPanel`

## Current Direction

The package now helps answer the practical debugging questions behind a mutation flow:
- what happened
- which flow ran
- which `flowId` grouped the lifecycle
- where retries happened
- where rollback happened
- which invalidations were emitted
- which consistency strategy was applied
- what `meta` was attached to the run

## Highlights

- grouping by `flowId`
- filtering by `flowName`
- filtering by event type
- summary cards for success, errors, cancellations, and retries
- richer event inspection for `meta`, `consistency`, and merged invalidations

## Example

```tsx
import { MutationDevtoolsPanel } from "@mutaflow/devtools";

<MutationDevtoolsPanel
  store={events}
  initialFlowName="createTodo"
/>
```
npm package: @mutaflow/testkit
Description: Testing helpers for Mutaflow optimistic flows
Latest version: 0.1.2

# @mutaflow/testkit

Testing helpers for Mutaflow optimistic flows.

## Install

```bash
npm install mutaflow @mutaflow/testkit
```

## What it provides

- `createTestStore(...)`
- `runFlowAndCollectEvents(...)`
- `recordFlow(...)`
- `expectEvents(...)`
- `expectResource(...)`
- `expectInvalidations(...)`
- `expectConsistency(...)`
- `expectSummary(...)`
- `expectOptimisticState(...)`
- `expectRollback(...)`
- `expectReconciled(...)`

## Example

```ts
import { optimistic } from "mutaflow";
import { createFlow } from "mutaflow";
import {
  createTestStore,
  expectConsistency,
  expectEvents,
  expectReconciled,
  runFlowAndCollectEvents,
} from "@mutaflow/testkit";

const flow = createFlow({
  action: async (input) => ({ id: `todo:${input.title}`, title: input.title }),
  optimistic: optimistic.insert({
    target: "todos:list",
    item: (input) => ({ id: `temp:${input.title}`, title: input.title, pending: true }),
  }),
  consistency: () => ({
    strategy: "immediate",
    readYourOwnWrites: true,
    invalidations: [{ kind: "tag", value: "todos.list" }],
  }),
  reconcile: {
    target: "todos:list",
    onSuccess: (current, result) =>
      (Array.isArray(current) ? current : []).map((todo) =>
        todo.id === `temp:${result.title}`
          ? { ...todo, id: result.id, pending: false }
          : todo,
      ),
  },
});

const testStore = createTestStore({
  "todos:list": [],
});

const run = await runFlowAndCollectEvents(flow, { title: "Ship" }, testStore);

expectEvents(run, ["flow:start", "flow:optimistic-applied", "flow:reconciled", "flow:success"]);
expectConsistency(run, { strategy: "immediate", readYourOwnWrites: true });
expectReconciled(run, "todos:list", [
  { id: "todo:Ship", title: "Ship", pending: false },
]);
```

## Status

This is an early test helper package for the current Mutaflow runtime.
npm package: @mutaimwiti/tiny
Description: Test npm with github repo
Latest version: 1.2.6

# npm-test
Testing npm on gitlab

![npm](https://img.shields.io/npm/v/@mutaimwiti/npm-test.svg)
![npm bundle size](https://img.shields.io/bundlephobia/min/@mutaimwiti/npm-test.svg)

-------
Install
-------

$ npm install @mutaimwiti/npm-test
npm package: @mutant-ws/fetch-browser
Description: Thin wrapper over `window.fetch`
Author: Andrei Dumitrescu
Latest version: 1.4.0

<!-- markdownlint-disable line-length -->

# fetch-browser

Thin wrapper over [`window.fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Sister library of [`@mutant-ws/fetch-node`](https://github.com/mutant-ws/fetch-node).

<!-- vim-markdown-toc GFM -->

* [Install](#install)
* [Initialize](#initialize)
  * [Default headers](#default-headers)
  * [Query string parameters](#query-string-parameters)
* [`GET`](#get)
* [`PATCH`](#patch)
* [`POST`](#post)
* [`DELETE`](#delete)
* [`MULTIPART`](#multipart)
* [Changelog](#changelog)

<!-- vim-markdown-toc -->

## Install

```bash
npm i @mutant-ws/fetch-browser
```

## Initialize

```javascript
import { set } from "@mutant-ws/fetch-browser"

set({
  // Throws if not set and using relative paths
  baseURL: "http://localhost",
})
```

### Default headers

```javascript
import { set } from "@mutant-ws/fetch-browser"

set({
  // Persistent headers
  headers: {
    // Library defaults
    "accept": "application/json",
    "content-type": "application/json",

    // Set JWT for authorized requests
    authorization: "signed-payload-with-base64-over",
  },
})
```

### Query string parameters

There is no built-in way to handle query params but you can set a custom
transform function.

```javascript
import { set } from "@mutant-ws/fetch-browser"
import { stringify } from "qs"

set({
  // Throws if query params passed and no stringify function defined
  queryStringifyFn: source =>
    stringify(source, {
      allowDots: true,
      encode: false,
      arrayFormat: "brackets",
      strictNullHandling: true,
    })
})
```

## `GET`

```javascript
import { GET } from "@mutant-ws/fetch-browser"

const myIP = await GET("https://api.ipify.org", {
  query: {
    format: "json"
  }
})
// => {"ip":"213.127.80.141"}
```

## `PATCH`

## `POST`

## `DELETE`

## `MULTIPART`

## Changelog

See the [releases section](https://github.com/mutant-ws/fetch-browser/releases) for details.
npm package: @mutant-ws/fetch-node
Description: Thin wrapper over `node-fetch`
Author: Andrei Dumitrescu
Latest version: 1.2.0

<!-- markdownlint-disable line-length -->

# fetch-node

Thin wrapper over [`node-fetch`](https://github.com/node-fetch/node-fetch). Sister libray of [`@mutant-ws/fetch-browser`](https://github.com/mutant-ws/fetch-browser).

<!-- vim-markdown-toc GFM -->

* [Install](#install)
* [Initialize](#initialize)
  * [Default headers](#default-headers)
  * [Query string parameters](#query-string-parameters)
* [`GET`](#get)
* [`PATCH`](#patch)
* [`POST`](#post)
* [`DELETE`](#delete)
* [`MULTIPART`](#multipart)
* [Changelog](#changelog)

<!-- vim-markdown-toc -->

## Install

```bash
npm i @mutant-ws/fetch-node
```

## Initialize

```javascript
import { set } from "@mutant-ws/fetch-node"

set({
  // Throws if not set and using relative paths
  baseURL: "http://localhost",
})
```

### Default headers

```javascript
import { set } from "@mutant-ws/fetch-node"

set({
  // Persistent headers
  headers: {
    // Library defaults
    "accept": "application/json",
    "content-type": "application/json",

    // Set JWT for authorized requests
    authorization: "signed-payload-with-base64-over",
  },
})
```

### Query string parameters

There is no built-in way to handle query params but you can set a custom
transform function.

```javascript
import { set } from "@mutant-ws/fetch-node"
import { stringify } from "qs"

set({
  // Throws if query params passed and no stringify function defined
  queryStringifyFn: source =>
    stringify(source, {
      allowDots: true,
      encode: false,
      arrayFormat: "brackets",
      strictNullHandling: true,
    })
})
```

## `GET`

```javascript
import { GET } from "@mutant-ws/fetch-node"

const myIP = await GET("https://api.ipify.org", {
  query: {
    format: "json"
  }
})
// => {"ip":"213.127.80.141"}
```

## `PATCH`

## `POST`

## `DELETE`

## `MULTIPART`

## Changelog

See the [releases section](https://github.com/mutant-ws/fetch-node/releases) for details.
npm package: @mutant-ws/next
Description: Official browser tracking library for the Mutant Workspace.
Author: Andrei Dumitrescu
Latest version: 1.9.0

<!-- markdownlint-disable first-line-h1 line-length no-inline-html -->

# next <img src="src/logo.png" alt="MutantNext Logo" align="right"/>

Official browser tracking library for the Mutant Workspace.

<!-- vim-markdown-toc GFM -->

* [Install](#install)
* [Use](#use)
  * [`set`](#set)
  * [`track`](#track)
  * [API](#api)
* [Cookies](#cookies)
* [Collected data](#collected-data)
* [Develop](#develop)
* [Changelog](#changelog)

<!-- vim-markdown-toc -->

## Install

```bash
npm install @mutant-ws/next
```

## Use

### `set`

Attach data to `track` calls. Find the `productId` from your [profile page](https://getmutant.com/me), in the install section of your product.

```js
import { set } from "@mutant-ws/next"

set({
  productId: "UUID",
})
```

You can run `set` multiple times.

Ex. Attach `userId` to `track` calls after a successful login.

```js
import { set } from "@mutant-ws/next"

const login = ({ email, password }) =>
  POST("/login", { body: { email, password } }).then(({ id }) => {
    set({
      userId: id,
    })
  })
```

### `track`

Record an event your application.

* `name` is required - Name of the event that you'll use to plot inside Mutant. An error will be thrown if not passed.
* `productId` - You can either set `productId` once via `set` or explicitly add it to the `track` call.

> If using [BEM](http://getbem.com/naming) for naming events, when plotting an event, the legend label will only show the M (modifier) part of BEM. Ex. for `page__section--login`, only `login` will be displayed.

```js
import { track } from "@mutant-ws/next"

track("page.section.action-name", {
  context: "data such as",
  userId: "can be added to",
  events: "by adding it here",
})
```

### API

Make a `POST` at `https://api.mutant.love/track` with the same requirements as the `track` method (`name` and `productId` required).

Ex. Tracking CI deployment success and failure.

```bash
curl \
  --header "Content-Type: application/json" \
  --data '{"name": "ci.success", "productId": "uuid"}' \
  https://api.mutant.love/track
```

## Cookies

* `mutant` - Unique client id. Created if not present.

## Collected data

We automatically collect the following data with every event.

* Screen size: width and height of viewport and screen
* User agent
* URL
* Referrer
* IP
* Timestamp

## Develop

```bash
git clone git@github.com:mutant-ws/next.git && \
  cd next && \
  npm run setup

# run tests (any `*.test.js`) once
npm test

# watch `src` folder for changes and run test automatically
npm run tdd
```

## Changelog

See the [releases section](https://github.com/mutant-ws/next/releases) for details.