open-index/open-npm huggingface dataset:
npm package: @mirohq/prettier-config
Description: Miro Prettier config
Author: Miro
Latest version: 2.0.0

# `@mirohq/prettier-config`

![](https://img.shields.io/npm/v/@mirohq/prettier-config.svg?style=flat-square)

## Usage

**Install**:

> Requires `prettier >= 2.4`

```bash
npm install --dev @mirohq/prettier-config
```

**Edit `package.json`**:

```json
{
  "prettier": "@mirohq/prettier-config"
}
```

**or `prettier.config.js`**:

```js
module.exports = require('@mirohq/prettier-config')
```

You can also override [configuration](https://prettier.io/docs/en/options.html)
like this

```js
module.exports = {
  ...require("@mirohq/prettier-config")
  semi: true,
}
```
npm package: @mirohq/websdk-types
Description: Provides typing for the Miro WebSDK v2.
Author: Miro
Latest version: 2.17.2

# Miro WebSDK v2 typings file

Provides typing for the Miro WebSDK v2.

## Usage

### Install the package

Using `npm`

```
npm install @mirohq/websdk-types
```

Using `yarn`

```
yarn add @mirohq/websdk-types
```

Using `pnpm`

```
pnpm add @mirohq/websdk-types
```

### If you are working on a `TypeScript` project

Include the types file inside your [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
file like this:

```diff
{
  "compilerOptions": {
+   "typeRoots": [
+     "./node_modules/@types",
+     "./node_modules/@mirohq"
+   ]
  }
}
```

### If you are working on a `JavaScript` project

> This step does not add types to your project, but it improves your autocompletion experience. This typically works
> with all modern editors & IDEs. If you encounter an issue, check the documentation for your editor.

1. Create the [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) file at the root of your project.

2. Add the following

```json
{
	"compilerOptions": {
		"typeRoots": ["./node_modules/@types", "./node_modules/@mirohq"]
	}
}
```

3. You should be able to get autocompletion working inside your JavaScript project.
npm package: @miroir/eslint-config-svelte
Description: ESlint config file for strict Svelte(Kit) formatting
Author: Miro Storm Polfliet
Latest version: 0.2.0

# Custom ES-Lint rules for Svelte & SvelteKit

This is a WIP collection of custom ESLint rules for Svelte and SvelteKit projects inspired by common (and sometimes annoying) mistakes we do and probably can be avoided with some code linting.
The main goal is to create a more consistent and predictable development experience, and less time spend on code review.
 
The rules are very strict by default and can be configured with an extra options object to make them less strict, more flexible, or completely disabled. [WIP]

## Installation

```sh
npm i -D @miroir/eslint-config-svelte
```
or
```sh
yarn add -D @miroir/eslint-config-svelte
```

## Usage

Add a `.eslintrc` file to the root of your project with the following content: 
```json
{
  "extends": ["@miroir/eslint-config-svelte"],
  "rules": {
    // add custom rules here
  }
}
```

You may also want to add a `.eslintignore` file to your project to ignore files and folders from linting:
```md
node_modules
public
```

## Contributing

This is a work in progress. Please feel free to open an issue or a pull request with more custom rules to add.
npm package: @miroiu/json-to-excel
Description: Export JSON to Excel
Author: Emanuel Miroiu
Latest version: 1.0.1

# Convert JSON to XLSX

## Quick start:

```cmd
npm install -g @miroiu/json-to-excel
```

Create a test.json file:

```js
[
	{
		"Id": 0,
		"Name": "Test 1"
	},
	{
		"Id": 1,
		"Name": "Test 2"
	}
]
```

Run:

```cmd
jx test.json
```

You should see a test.xlsx file near the test.json file.

### Show helpful information

```cmd
jx --help
jx c --help
```

### Working with files

Create a bunch of json files and run the following command:

```cmd
jx file1 file2 file3
```

### Working with the clipboard

Copy the contents of test.json and run the following command:

```cmd
jx c outputFileName
```
npm package: @miroiu/react-popover
Description: React popover component using emotionjs
Author: Emanuel Miroiu
Latest version: 1.0.0

# react-popover

> React popover component

[![NPM](https://img.shields.io/npm/v/@miroiu/react-popover.svg)](https://www.npmjs.com/package/@miroiu/react-popover)

## Install

```bash
npm install @miroiu/react-popover
```

## Usage

```tsx
import React, { useState } from 'react';
import ReactDOM from 'react-dom';
import {
	Popover,
	PopoverTrigger,
	PopoverClose,
	PopoverContent,
} from '@miroiu/react-popover';
import styled from '@emotion/styled';

const FancyButton = styled.button`
	outline: none;
	padding: 5px 10px;
	background-color: white;
	border: none;
	cursor: pointer;
	min-width: 80px;
	text-align: left;

	:hover {
		background-color: #d1d1d1;
	}
`;

const FancyText = styled.p`
	font-size: 14px;
	padding: 0 5px;
`;

const Dropdown: React.FC<{
	values: string[];
	onChange: (value: string) => void;
}> = ({ values, onChange }) => {
	return (
		<Popover>
			<PopoverTrigger>
				<FancyButton>{values[0]}</FancyButton>
			</PopoverTrigger>
			<PopoverContent closeOnClick={false}>
				<PopoverClose>
					{values.map((value, index) => (
						<FancyButton
							key={index}
							onClick={() => onChange(value)}
						>
							{value}
						</FancyButton>
					))}
				</PopoverClose>
				<FancyText>Won't close on click</FancyText>
			</PopoverContent>
		</Popover>
	);
};

const possibleValues = ['red', 'green', 'blue', 'white', 'black'];

const App: React.FC = () => {
	const [selected, setSelected] = useState(possibleValues[0]);

	return (
		<div>
			<Dropdown values={possibleValues} onChange={setSelected} />
			<FancyText style={{ color: 'white' }}>
				Selected value: {selected}
			</FancyText>
		</div>
	);
};

ReactDOM.render(<App />, document.getElementById('root'));
```

PopoverContent props:

```js
	closeOnClick?: boolean; // makes everything under PopoverContent close on click
```

## License

MIT © [miroiu](https://github.com/miroiu)

> Note to self: Make sure you delete react and react-dom from node_modules in library otherwise you'll get an 'Invalid hook call' error
npm package: @miroiu/use-debug-panel
Description: useDebugPanel provides a panel where you can modify properties of an object
Author: Emanuel Miroiu
Latest version: 1.2.2

# use-debug-panel

> useDebugPanel provides a panel where you can modify properties of an object

[![NPM](https://img.shields.io/npm/v/@miroiu/use-debug-panel.svg)](https://www.npmjs.com/package/@miroiu/use-debug-panel)

[![Example](https://i.imgur.com/KhtlkkR.png)](Example)

## Install

```bash
npm install @miroiu/use-debug-panel
```

## Usage

```tsx
import React from 'react';
import ReactDOM from 'react-dom';
import {
	DebugPanelProvider,
	makeSlider,
	makeColor,
	useDebugPanel,
} from '@miroiu/use-debug-panel';

const App: React.FC = () => {
	const { string, slider } = useDebugPanel(
		{
			number: 1,
			string: 'text',
			boolean: true,
			date: new Date(),
			slider: makeSlider(10),
			color: makeColor('#00aaff'),
			function: () => alert('Hi'),
			array: [1, 2, 4, 5],
			object: {},
			undefined: undefined,
			null: null,
		},
		'Optional Title'
	);

	return (
		<div>
			{string}: {slider.value}
		</div>
	);
};

ReactDOM.render(
	<DebugPanelProvider>
		<App />
	</DebugPanelProvider>,
	document.getElementById('root')
);
```

## License

MIT © [miroiu](https://github.com/miroiu)
npm package: @miromaprojectfactory/nestjs-firebase-admin
Description: Firebase Admin module for Nest framework
Latest version: 3.0.2

<a href="https://www.npmjs.com/@aginix/nestjs-firebase-admin"><img src="https://img.shields.io/npm/v/@aginix/nestjs-firebase-admin.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/@aginix/nestjs-firebase-admin"><img src="https://img.shields.io/npm/l/@aginix/nestjs-firebase-admin.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/@aginix/nestjs-firebase-admin"><img src="https://img.shields.io/npm/dm/@aginix/nestjs-firebase-admin.svg" alt="NPM Downloads" /></a>

## Description

Firebase Admin Module for [Nest.js Framework](https://nestjs.com/)

This is a fork of @aginix/nestjs-firebase-admin to support NestJS8 dependencies

## Installation

```bash
$ yarn add @miromaprojectfactory/nestjs-firebase-admin
```

### Import module

```typescript
import { Module } from '@nestjs/common';
import { FirebaseAdminModule } from '@wilfridli/nestjs-firebase-admin'
import * as admin from 'firebase-admin'

@Module({
  imports: [
    FirebaseAdminModule.forRootAsync({
      useFactory: () => ({
        credential: admin.credential.applicationDefault()
      })
    }),
  ],
})
export class AppModule {}
```

## Example

### Inject Authentication Service

```typescript
import { Injectable } from '@nestjs/common';
import { FirebaseAuthenticationService } from '@aginix/nestjs-firebase-admin';

@Injectable()
export class AppService {
  constructor(private firebaseAuth: FirebaseAuthenticationService) {}

  getUsers() {
    return this.firebaseAuth.listUsers()
  }
}
```

## Compatibility Table

| firebase-admin    | NestJS Library |
| ----------------- |----------------|
| `9.xx`            | `master`       |
| `8.xx`            | `1.xx`         |

## License

MIT © [Aginix Technologies Co., Ltd.](https://github.com/Aginix/nestjs-firebase-admin)
npm package: @mironal/github-token-store
Description: A very simple GitHub personal token store for your CLI app. that like `~/.your-app/token`
Author: mironal
Latest version: 1.0.0

# github-auth-store

## usage

`npm install @mironal/github-auth-store`

```ts
const store = new GitHubTokenStore(
    "~/.your-app/token"
)

if (store.exists()) {
    store.readToken().then(token => console.log(token)).catch(error => console.error(error))
} else {
    store.authenticate("username", "password", {
        note:"some note"
    }).then(() => {
        console.log(store.exists())
        // true
    })
}

```
npm package: @mironal/validate-ts
Description: The object validator for TypeScript.
Author: mironal
Latest version: 1.0.0

# validate-{TS}

> The object validator for TypeScript.

![](./code.gif)

## Install

`npm install @mironal/validate-ts`

## Usage

```ts
interface Example {
  n: number
  s: string
  b: boolean
  obj: { [key: string]: string }
  nested: { [key: string]: { [inner: string]: number[] } }
}

const validator = createValidatorFor<Example>({
  n: value => typeof value === "number",
  s: value => typeof value === "string",
  b: value => typeof value === "boolean",
  obj: value => typeof value === "object",
  nested: value => typeof value === "object",
})

const anyVal = {/**/}
try {
    if (validator(anyVal)) {
        // If the verification succeeds, code completion becomes possible.
    }
} catch (e) {
    // Or an exception is thrown.
    console.error(e)
}
```

### Recommended to use

We recommend that you use [@sindresorhus/is](https://github.com/sindresorhus/is) to write validator more easily.

```ts
const is = require('@sindresorhus/is')

const validator = createValidatorFor<Example>({
  n: value => is.number,
  s: value => is.string,
  b: value => is.boolean
  obj: value => is.object,
  nested: value => is.object,
})
```

## TODO

- [ ] more test
- [ ] more useful functions
  - compose validator
npm package: @mironante/frisk
Description: CLI tool to search for text in a folder
Author: Nazar Shmanov
Latest version: 1.0.2

# Frisk - CLI tool to search for text in a folder


[![npm version](https://badge.fury.io/js/@mironante%2Ffrisk.svg)](https://www.npmjs.com/package/@mironante/frisk)

## Prerequisites

- Install [Node.js] which includes [Node Package Manager][npm]

## Installation
```
npm install -g @mironante/frisk
```

## Usage
```
frisk <dir> <keyword> [options]
```

### Arguments:
|Argument|Description|
|--------|-----------|
|dir|Folder path|
|keyword|Search word|

### Options:
|Option|Shortcat|Description|
|------|--------|-----------|
|--version|-V|Output the version number|
|--recursively|-r|Search recursively|
|--exclude <char...>|-ex|Exclude files or directories|
|--encoding <char>|-e|Supported encodings (https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings)|
|--help|-h|Display help for command|

### Example:
```
frisk ./project 名前 -e Shift_JIS -r -ex node_modules *.js
```
npm package: @miroslavzeman/openai-cli
Description: ChatGPT API inside of terminal running on Node. 🚀
Author: Miroslav Zeman
Latest version: 0.6.0

# OpenAI CLI

Leverage the power of OpenAI's ChatGPT API directly from the CLI and have a smart assistant in your favourite terminal or IDE! 🚀

## Installation

```console
$ npm install -g @miroslavzeman/openai-cli
$ yarn global add @miroslavzeman/openai-cli
```

## Usage

### Initialization

Before using the tool you have to initialize your API key. You can get your API key from [OpenAI](https://platform.openai.com/account/api-keys).

```console
$ ai init -k YOUR_API_KEY

Usage: ai init [options]

Initialize tool configuration

Options:
  -k, --apiKey <apiKey>  set ChatGPT API key
  -m, --model <model>    set ChatGPT model (default: "gpt-3.5-turbo")
  -p, --prompt <prompt>  set default prompt
  -l, --limit <limit>    set conversation history limit (default: "20")
  -u, --usage            show usage and price for each message
  -h, --help             display help for command
```

### Update configuration

You can update your API key, default prompt and other configuration options via `update` command.

> **Note:** When you update the default prompt, don't forget to use `ai clear` command to clear the conversation history, so you start up a new conversation with the new prompt setup.

```console
$ ai update

Usage: ai update [options]

Update tool configuration

Options:
  -k, --apiKey <apiKey>  update ChatGPT API key
  -m, --model <model>    update ChatGPT model (default: "gpt-3.5-turbo")
  -p, --prompt <prompt>  update default prompt
  -l, --limit <limit>    update conversation history limit (default: "20")
  -u, --usage            show usage and price for each message
  -h, --help             display help for command
```

#### Default prompt

The tool has a default prompt configuration to act like a linux terminal. You may override the system prompt with `update` command.

> I want you to act as a linux terminal. I will ask questions and you will reply with command for terminal. I want you to only reply with the terminal command nothing else. Do not write explanations. do not type commands unless I instruct you to do so. When I need to tell you something in English, I will do so by putting text inside curly brackets {like this}.


#### Pricing and token usage

In case you update configuration with `--usage` flag, the tool will show you how many tokens you have spent on the request and how much it cost you.

```conosle
$ ai "How much does ChatGPT API costs to use the tool?"

The ChatGPT API pricing details can be found on the official website of ChatGPT.
Here is the link to the pricing section: https://openai.com/pricing

Prompt: 352, Completion: 40, Total: 392, Price: 0.00007840000000000001$
```

### Clear conversation history

When you update default prompt, make sure you clear the conversation history. Otherwise, the tool will continue to use the old prompt.

```console
$ ai clear
```

## License

This project is licensed under the terms of the MIT License.
npm package: @miroyar/ccolor
Description: Utility for console text color.
Author: Artem Shutov
Latest version: 1.0.4

# cColor [pre-alpha(!)]

---

Utility for console text color. Based on [3-bit, 4-bit color chart](https://en.wikipedia.org/wiki/ANSI_escape_code#:~:text=The%20chart%20below%20shows%20the%20default%20values) from Wikipedia.

### Description

---

**Method:** cColor
\
**Type:**

```typescript
(text: string, initial: StringColorInitial | ObjectColorInitial) => string;
```

**Type:** StringColorInitial
\
**Description:** Has a value from the [table](#table) of color full initials.

**Type:** ObjectColorInitial

```typescript
{
  F?: ColorInitials;
  B?: ColorInitials;
}
```

**Description:** An object consisting of two keys F and B, denoting the position of the Foreground and Background colors and having a value from the color initials [table](#table).

**<a name="table"></a>Table:** Colored initials that you can see here.

| Color               | Foreground | Background |
| ------------------- | :--------: | ---------- |
|                     |     F+     | B+         |
| Black               |     D      |            |
| Red                 |     R      |            |
| Green               |     G      |            |
| Yellow              |     Y      |            |
| Blue                |     B      |            |
| Magenta             |     M      |            |
| Cyan                |     C      |            |
| White               |     W      |            |
| Bright Black (Gray) |     BD     |            |
| Bright Red          |     BR     |            |
| Bright Green        |     BG     |            |
| Bright Yellow       |     BY     |            |
| Bright Blue         |     BB     |            |
| Bright Magenta      |     BM     |            |
| Bright Cyan         |     BC     |            |
| Bright White        |     BW     |            |

**Example:**

```typescript
import { CColor } from '@miroyar/ccolor';

const text = 'The SGR parameters 30–37 selected the foreground color, while 40–47 selected the background.';

const cColor = new CColor();

console.log(cColor.print(text, 'FB'));
console.log(cColor.print(text, 'BBG'));
console.log(cColor.print(text, { F: 'B', B: 'BG' }));
```
npm package: @mirror-kt/textlint-plugin-kdoc
Description: textlint plugin to support kdoc
Author: Kano Misato
Latest version: 0.1.1

## textlint-plugin-kdoc

[![NPM Version](https://img.shields.io/npm/v/%40mirror-kt%2Ftextlint-plugin-kdoc)](https://www.npmjs.com/package/@mirror-kt/textlint-plugin-kdoc)

[textlint](https://textlint.org) plugin to support [kdoc](https://kotlinlang.org/docs/kotlin-doc.html)
comments.

### Installation

```shell
# npm
npm add -D @mirror-kt/textlint-plugin-kdoc

# yarn
yarn add -D @mirror-kt/textlint-plugin-kdoc

# pnpm
pnpm add -D @mirror-kt/textlint-plugin-kdoc
```

And write the following content in the textlint configuration file (e.x. `.textlintrc.json`).

```jsonc
{
  "plugins": {
    "@mirror-kt/textlint-plugin-kdoc": true
  },
  "rules": {
    // your rules...
  }
}
```

### License

This project is licensed under [MIT License](https://opensource.org/license/mit).
npm package: @mirror-kt/textlint-plugin-rustdoc
Description: ![NPM Version](https://img.shields.io/npm/v/%40mirror-kt%2Ftextlint-plugin-rustdoc)
Author: Kano Misato
Latest version: 0.1.1

## textlint-plugin-rustdoc

![NPM Version](https://img.shields.io/npm/v/%40mirror-kt%2Ftextlint-plugin-rustdoc)

[textlint](https://textlint.org) plugin to support [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)
comments.

### Installation

```shell
# npm
npm add -D @mirror-kt/textlint-plugin-rustdoc

# yarn
yarn add -D @mirror-kt/textlint-plugin-rustdoc

# pnpm
pnpm add -D @mirror-kt/textlint-plugin-rustdoc
```

And write the following content in the textlint configuration file (e.x. `.textlintrc.json`).

```jsonc
{
  "plugins": {
    "@mirror-kt/textlint-plugin-rustdoc": true
  },
  "rules": {
    // your rules...
  }
}
```
npm package: @mirror-media/nuxt-ssr-cache
Description: Cache middleware for nuxt's SSR rendering.
Author: kwhsiung
Latest version: 1.8.0

# nuxt-ssr-cache
[![NPM version](https://img.shields.io/npm/v/nuxt-ssr-cache.svg)](https://www.npmjs.com/package/nuxt-ssr-cache)

Cache middleware for nuxt's SSR rendering.

## Setup
```npm install nuxt-ssr-cache```

or

```yarn add nuxt-ssr-cache```

then inside your `nuxt.config.js` add cache config:

```javascript
module.exports = {
  // If you provide a version, it will be stored inside cache.
  // Later when you deploy a new version, old cache will be
  // automatically purged.
  version: pkg.version,

  // ....

  modules: [
      'nuxt-ssr-cache',
  ],
  cache: {
    // if you're serving multiple host names (with differing
    // results) from the same server, set this option to true.
    // (cache keys will be prefixed by your host name)
    // if your server is behind a reverse-proxy, please use
    // express or whatever else that uses 'X-Forwarded-Host'
    // header field to provide req.hostname (actual host name)
    useHostPrefix: false,
    pages: [
      // these are prefixes of pages that need to be cached
      // if you want to cache all pages, just include '/'
      '/page1',
      '/page2',

      // you can also pass a regular expression to test a path
      /^\/page3\/\d+$/,

      // to cache only root route, use a regular expression
      /^\/$/
    ],
    
    key(route, context) {
      // custom function to return cache key, when used previous
      // properties (useHostPrefix, pages) are ignored. return 
      // falsy value to bypass the cache
    },

    store: {
      type: 'memory',

      // maximum number of pages to store in memory
      // if limit is reached, least recently used page
      // is removed.
      max: 100,

      // number of seconds to store this page in cache
      ttl: 60,
    },
  },

  // ...
};
```

### `redis` store
```javascript
module.exports = {
  // ....
  cache: {
    // ....
    store: {
      type: 'redis',
      host: 'localhost',
      ttl: 10 * 60,
      configure: [
        // these values are configured
        // on redis upon initialization
        ['maxmemory', '200mb'],
        ['maxmemory-policy', 'allkeys-lru'],
      ],
    },
  },
}
```
Uses [cache-manager-redis](https://www.npmjs.com/package/cache-manager-redis) under the hood.

### `memcached` store
```javascript
module.exports = {
  // ....
  cache: {
    // ....
    store: {
      type: 'memcached',
      options: {
        hosts: ['127.0.0.1:11211'],
      },
    },
  },
}
```
Uses [cache-manager-memcached-store](https://www.npmjs.com/package/cache-manager-memcached-store) under the hood.

### `multi` cache (layered)
```javascript
module.exports = {
  // ....
  cache: {
    // ....
    store: {
      // multi cache stores pages in all caches
      // later tries to read them in sequential order
      // in this example it first tries to read from memory
      // if not found, it tries to read from redis
      type: 'multi',
      stores: [
        { type: 'memory', /* ... */ },
        { type: 'redis', /* ... */ },
      ],
    },
  },
}
```

## License
MIT
npm package: @mirror-protocol/mirror-airdrop
Description: Airdrop implementation
Author: YunYeo
Latest version: 1.1.0

# Airdrop

## How to use


### Install package
```
$ npm install @mirror-protocol/mirror-airdrop
```

### Create distribution list
`airdrop.json`
```json
{
  "accounts": [
    {
      "address": "terra1qfqa2eu9wp272ha93lj4yhcenrc6ymng079nu8",
      "amount": "1000000"
    },
    {
      "address": "terra1ucp369yry6n70qq3zaxyt85cnug75r7ln8l6se",
      "amount": "2000000"
    },
    {
      "address": "terra1t849fxw7e8ney35mxemh4h3ayea4zf77dslwna",
      "amount": "3000000"
    },
    ...
  ]
}
```

### Get proof with user input
```javascript
import { Airdrop } from "@mirror-protocol/mirror-airdrop";
import { accounts } from "../airdrop.json";

const airdrop = new Airdrop(accounts);
const proof = airdrop.getMerkleProof(accounts[0]);

console.log("Merkle Root", airdrop.getMerkleRoot());
console.log("Merkle Proof", proof);
console.log("Target Acc", accounts[0]);
console.log("Verified", airdrop.verify(proof, accounts[0]));
```

## Take snapshot
```javascript
import { Snapshot } from "@mirror-protocol/mirror-airdrop";

const snapshot = new Snapshot("https://lcd.terra.dev");
snapshot.takeSnapshot(10000).then(delegators => {
  console.log(delegators)
});
```

## How to build contract
```
$ docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="devcontract_cache_airdrop",target=/code/contracts/airdrop/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/rust-optimizer:0.10.2 ./contracts/airdrop
```
npm package: @mirror/react-big-calendar
Description: Calendar! with events
Author: Jason Quense
Latest version: 0.22.1

# react-big-calendar

An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ception approach.

[**DEMO and Docs**](http://intljusticemission.github.io/react-big-calendar/examples/index.html)

Inspired by [Full Calendar](http://fullcalendar.io/).

## Use and Setup

`yarn add react-big-calendar` or `npm install --save react-big-calendar`

Include `react-big-calendar/lib/css/react-big-calendar.css` for styles, and make sure your calendar's container
element has a height, or the calendar won't be visible. To provide your own custom styling, see the [Custom Styling](#custom-styling) topic.

## Starters

- [react-big-calendar](https://github.com/arecvlohe/rbc-starter)
- [react-big-calendar with drag and drop](https://github.com/arecvlohe/rbc-with-dnd-starter)

## Run examples locally

```sh
$ git clone git@github.com:intljusticemission/react-big-calendar.git
$ cd react-big-calendar
$ yarn
$ yarn examples
```

- Open [localhost:3000/examples/index.html](http://localhost:3000/examples/index.html).

### Localization and Date Formatting

`react-big-calendar` includes two options for handling the date formatting and culture localization, depending
on your preference of DateTime libraries. You can use either the [Moment.js](http://momentjs.com/) or [Globalize.js](https://github.com/jquery/globalize) localizers.

Regardless of your choice, you **must** choose a localizer to use this library:

#### Moment.js

```js
import { Calendar, momentLocalizer } from 'react-big-calendar'
import moment from 'moment'

const localizer = momentLocalizer(moment)

const MyCalendar = props => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
    />
  </div>
)
```

#### Globalize.js v0.1.1

```js
import { Calendar, globalizeLocalizer } from 'react-big-calendar'
import globalize from 'globalize'

const localizer = globalizeLocalizer(globalize)

const MyCalendar = props => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
    />
  </div>
)
```

## Custom Styling

Out of the box you can include the compiled css files and be up and running. But, sometimes, you may want to style
Big Calendar to match your application styling. For this reason SASS files are included with Big Calendar.

```
  @import 'react-big-calendar/lib/sass/styles';
  @import 'react-big-calendar/addons/dragAndDrop/styles'; // if using DnD
```

SASS implementation provides a `variables` file containing color and sizing variables that you can
update to fit your application. _Note:_ Changing and/or overriding styles can cause rendering issues with your
Big Calendar. Carefully test each change accordingly.

## Join us on Reactiflux Discord

Join us on [Reactiflux Discord](https://discord.gg/uJsgpkC) community under the channel #react-big-calendar if you have any questions.
npm package: @mirror/use-shared-state
Description: Use shared state with react hook in your functional components.
Author: yongzhi-chen
Latest version: 1.0.4

# use-shared-state

Use shared state with namespace using react hook in your function components.

[![NPM](https://img.shields.io/npm/v/use-shared-state.svg)](https://www.npmjs.com/package/use-shared-state) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @mirror/use-shared-state
```

## Demo
https://codesandbox.io/s/zl814j09mp

## Usage

```jsx
import React from 'react'
import {useSharedState, createSharedState} from '@mirror/use-shared-state'

createSharedState('app', {
  label : 'App'
})

createSharedState('other', 0)

const Child = () => {
  const [appLabel, setAppLabel] = useSharedState('app')
  const [sharedCnt, setSharedCnt] = useSharedState('other')
  
  return (
    <div>
      <p>{sharedCnt}</p>
      <div>
        <button onClick={() => setSharedCnt(sharedCnt + 1)}>Inc</button>
      </div>
      <input value={appLabel.label} onChange={e => setAppLabel({label : e.target.value})} />
    </div>
  )
}

const App = () => {

  const [appLabel, setAppLabel] = useSharedState('app')
  return (
    <div>
      <h1>{appLabel.label}</h1>
      <Child />
      <Child />
    </div>
  )
}

export default App

```

## Api

```tsx
createSharedState(namespace : string, initState : any) => void
```
Create a shared state associated to given namespace. If you call useSharedState(ns) with namespace that has not been created, an error will be thrown. 

```tsx
useSharedState(namespace : string) => [sharedState, setSharedState]
```
Return sharedState and its set function associated to the namespace. 

## License

MIT © [yongzhi-chen](https://github.com/yongzhi-chen)
npm package: @mirror_cy/gpt
Description: GPT service for Koishi
Author: 42
Latest version: 0.0.1

# [@koishijs/censor](https://censor.koishi.chat)

在 Koishi 中使用内容审查服务。

## 插件

- [koishi-plugin-text-censor](https://censor.koishi.chat/plugins/text.html)

## 许可证

使用 [MIT](./LICENSE) 许可证发布。

```
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
npm package: @mirrordigital/create-boris
Description: Create a new Strapi CMS powered by APP Platform
Author: Mirror
Latest version: 1.0.6

# Create Boris

Create a new Strapi CMS powered by DigitalOcean APP Platform.

## Usage

```bash
# Using npx
npx @mirrorprod/create-boris my-new-cms

# Using yarn
yarn create @mirrorprod/boris my-new-cms

# Using pnpm
pnpm create @mirrorprod/boris my-new-cms
```

This will create a new Strapi CMS in the specified directory with all the necessary configuration for DigitalOcean APP Platform.

## What's included

- Strapi CMS configuration
- DigitalOcean APP Platform configuration
- Automatic deployment scripts
- GitLab CI/CD configuration

## Available Scripts

In your new project, you can run:

### `yarn start`

Starts the local development environment by running the Docker containers.

### `yarn stop`

Stops the running Docker containers while preserving the data.

### `yarn down`

Removes all Docker containers and their associated volumes.

### `yarn build`

Builds the Docker containers with the latest changes.

### `yarn deploy`

Performs a complete deployment to DigitalOcean App Platform (includes generate and build-platform steps).
npm package: @mirrormedia/lilith-draft-editor
Description: ## Installation
Latest version: 3.0.14

# [@mirrormedia/lilith-draft-editor](https://www.npmjs.com/package/@mirrormedia/lilith-draft-editor) &middot; ![npm version](https://img.shields.io/npm/v/@mirrormedia/lilith-draft-editor.svg?style=flat)

## Installation

`yarn install`

## Development

`@mirrormedia/lilith-draft-editor` export `@mirrormedia/lilith-core` 所需要的 `RichTextEditor`，而 `@mirrormedia/lilith-core` 則是被 `@mirrormedia/lilith-(mirrormedia|readr|mesh|editools)` 所使用，因此在開發上會以各網站的角度去切入，在本套件中修改 editor 相關的程式碼，並在 lilith-(mirrormedia|readr|mesh|editools) 中測試開發狀況。

舉 lilith-mirrormedia 為例，要修改 mirrormedia 相關的 RichTextEditor 需要在 `packages/lilith-draft-editor` 中進行改動，改動完之後跑 `yarn build` 產生 transpiled 後的程式碼，若 `packages/lilith-draft-editor` 有修改 package.json 中的套件版本時，則需要同時修改 `packages/core` 中 import `@mirrormedia/lilith-draft-editor` 的版本; 同理，若是因此 `packages/core` 有修改版本號的話也需要跑 `yarn build`， `packages/mirrormedia` 也同樣需要修改 import `@mirrormedia/lilith-core` 的版本。

因為 lilith-mirrormedia, lilith-core, lilith-draft-editor 都在 monorepo 中，yarn workspaces 會為 lilith-core, lilith-draft-editor pkg 建立 soft link，將 `node_modules/@mirrormedia/lilith-core` 指到 `packages/core` 而 `node_modules/@mirrormedia/lilith-draft-editor` 指到 `packages/draft-editor`，所以 `yarn build` 產生的新的程式碼，可以不需要透過 npm publish 和 yarn install 的方式，立即讓 lilith-mirrormedia, lilith-core 使用。

等到確定程式碼修改完畢後，我們再將最新的程式碼上傳(`npm publish`)到 npm registry 去，讓 lilith-editools 的 CI/CD 可以下載到最新的版本。

## File Structure

在 `src` 資料夾下有兩大類的檔案

1. 共用的 draft.js 程式碼： 主要是 draft.js button UI, draft-converter 和其他 helper function
2. 各網站客製化的改動：

依照各網站需求修改`src/website/${website}/`中的檔案

- block-renderer : 在既有(注 1)的 block-renderer 上附加可編輯的 wrapper，僅有部分 block renderers 適用
- selector: 依照各網站 keystone list 來調整 photo, video 和 post 的 gql query
- draft-editor: 主要 export 出 RichTextEditor 的檔案，實際使用在 lilith-core 對應的 webiste 中，可直接決定 RichTextEditor 樣式(注 2)

\* 註 1: lilith-draft-editor 各個 buttons 對應的 block-renderers, entity-decorators 會 maintain 在 lilith-draft-renderer，由各網站 Next.js 專案開發人員實作，在本專案中會直接將 lilith-draft-renderer 中定義好的 block-renderers, entity-decorators 直接使用(除了少數需要再編輯的 block-renderer，參考 `src/website/${website}/block-renderer`中的 editor wrapper component)。

\* 註 2: 雖然各個網站都 maintain 了一個 draft-editor，可以自行決定 import 進來的 buttons，不過因為 lilith-core 中實作 disalbedButtons 的功能，所以目前一率將所有的 buttons 加入 RichTextEditor 中，由 lilith-(mirrormedia|readr|mesh|editools) 來控制所使用的 buttons。

## Build

`yarn build`

## Publish

`npm run publish`

在 publish 前，請根據 conventional commits 的規範，將 package.json#version 升版。

## Notable Details
* 元件裡的 `import React from 'react'` 為必要的，避免 babel transpile 後，無法抓取的 react 依賴的問題。
npm package: @mirrormedia/lilith-draft-renderer
Description: ## Introduction
Latest version: 1.4.6

# [@mirrormedia/lilith-draft-renderer](https://www.npmjs.com/package/@mirrormedia/lilith-draft-renderer) &middot; ![npm version](https://img.shields.io/npm/v/@mirrormedia/lilith-draft-renderer.svg?style=flat)

## Introduction

本套件是由 `@mirrormedia/lilith-draft-editor` 將其 maintain 的 buttons 對應的 block renderers 和 entity decorators 的邏輯 decouple，
以應用在 Next.js 專案以及 CMS 上。

## Installation

`yarn install`

## Development

在開發順序上，一開始各網站會有一套 default 的 block renderers 和 entity decorators，這些預設的 components 將會被 export 給 lilith-draft-editor 使用並在 CMS 上呈現出各 button 新增的 content。

## For Next.js to use

在各網站開發時，工程師將因應設計將會針對 block renderers 和 entity decorators 修改樣式，因此會在各個網站的資料夾中修改網站專屬的 block renderers 和 entity decorators，這個套件將直接用在該 Next.js 專案上，當作 React component 直接使用，只要帶入 CMS 上拿到的 draft.js 相關的 contentBlock 的資料即可呈現樣式。

除了 block renderers 和 entity decorators 等檔案可以針對 block type 修改之外，built-in 的 draft.js block type 可以透過 `src/website/${website}/draft-renderer.tsx`中的 styled-components `DraftEditorWrapper` 中的 css 來修改

```
  /* Draft built-in buttons' style */
  .public-DraftStyleDefault-header-two {
  }
  .public-DraftStyleDefault-header-three {
  }
  .public-DraftStyleDefault-header-four {
  }
  .public-DraftStyleDefault-blockquote {
  }
  .public-DraftStyleDefault-ul {
  }
  .public-DraftStyleDefault-unorderedListItem {
  }
  .public-DraftStyleDefault-ol {
  }
  .public-DraftStyleDefault-orderedListItem {
  }
  /* code-block */
  .public-DraftStyleDefault-pre {
  }
```

修改完成後修改 package version, 跑 `yarn build` 和 `npm publish` 即可以發布新版套件並在 Next.js 中 `yarn install` 使用。

### For CMS to use

在特定網站的 block renderers 和 entity decorators 改動之後，為了保持 CMS 上的 draft-editorn 所見即所得呈現和 Next.js 端同樣的樣式，
在完成 `npm publish` 後需要到 `packages/draft-editor` 去更新 `@mirrormedia/lilith-draft-renderer` 的版本，並依照該套件的 README.md 的指示在該網站的 CMS 中測試。

## File Structure

在 `src` 資料夾下有兩大類的檔案

1. 共用的 draft.js 程式碼： 主要是 draft.js button UI, draft-converter 和其他 helper function
2. 各網站客製化的改動：

依照各網站需求修改`src/website/${website}/`中的檔案

- block-renderer : 在既有(注 1)的 block-renderer 上附加可編輯的 wrapper，僅有部分 block renderers 適用
- selector: 依照各網站 keystone list 來調整 photo, video 和 post 的 gql query
- draft-editor: 主要 export 出 RichTextEditor 的檔案，實際使用在 lilith-core 對應的 webiste 中，可直接決定 RichTextEditor 樣式(注 2)

\*注 1: lilith-draft-editor 各個 buttons 對應的 block-renderers, entity-decorators 會 maintain 在 lilith-draft-renderer，由各網站 Next.js 專案開發人員實作，在本專案中會直接將 lilith-draft-renderer 中定義好的 block-renderers, entity-decorators 直接使用(除了少數需要再編輯的 block-renderer，參考 `src/website/${website}/block-renderer`中的 editor wrapper component)。

\*注 2: 雖然各個網站都 maintain 了一個 draft-editor，可以自行決定 import 進來的 buttons，不過因為 lilith-core 中實作 disalbedButtons 的功能，所以目前一率將所有的 buttons 加入 RichTextEditor 中，由 lilith-(mirrormedia|readr|mesh|editools) 來控制所使用的 buttons。

## Build

`yarn build`

## Publish

`npm run publish`

在 publish 前，請根據 conventional commits 的規範，將 package.json#version 升版。

## Notable Details
npm package: @mirrormedia/seinsights-cms-core
Description: ### Installation `yarn install`
Latest version: 1.2.4

# [@mirrormedia/lilith-core](https://www.npmjs.com/package/@mirrormedia/lilith-core) &middot; ![npm version](https://img.shields.io/npm/v/@mirrormedia/lilith-core.svg?style=flat)

### Installation
`yarn install`

### Development
`@mirrormedia/lilith-core` 被 `@mirrormedia/lilith-(vision|mesh|editools)` 所依賴，因此，在開發 lilith-core 的程式碼時，
可以透過 lilith-(vision|mesh|editools) 來協助開發。

舉 lilith-editools 為例，
我們可以先起 lilith-editools server，接著修改 lilith-core 的程式碼，
修改到一個階段，想要測試，便在 `packages/core` 底下跑 `yarn build`，產生新的 transpiled 程式碼。
因為 lilith-editools 和 lilith-core 都在 monorepo 中，yarn workspaces 會為 lilith-core pkg 建立 soft link，
將 `node_modules/@mirrormedia/lilith-core` 指到 `packages/core`，所以 `yarn build` 產生的新的程式碼，
可以不需要透過 npm publish 和 yarn install 的方式，立即讓 lilith-editools 使用。
等到確定程式碼修改完畢後，我們再將最新的程式碼上傳(`npm publish`)到 npm registry 去，讓 lilith-editools 的 CI/CD 可以下載到最新的版本。

### Build
`yarn build`

### Publish
`npm run publish`

在 publish 前，請根據 conventional commits 的規範，將 package.json#version 升版。

### Notable Details
#### For those files under `views/` folder, we transpile them specifically.
For those files under `views/` folder, we transpile them by babel according to different configuation.
The specific babel configuration is `.views.babelrc.js`.
In `.views.babelrc.js`, we tell babel not to transpile `import` and `export` es6 codes into commonJS codes.
The Keystone server won't start server well if those files under `views/` are transpiled into commonJS codes.
npm package: @mirrorprod/create-stanis
Description: Mirror frontend generator
Author: Davide Cesaroni
Latest version: 1.5.1

# Frontend generator

## TODO

- Aggiungere richiesta e lista di locales in modo da selezionare solo i necessari e impostare il default
- Aggiungere page e page wrapper
- Correggere urls per le immagini (richidere all'utente)
- Aggiornare file env richiedendo le informazioni all'utente
- Aggiungere connessione al CMS con query base, tipi e configurazione di `apollo`.
- Splittare i componenti dalla libreria `@mirrorprod/mexc`, adesso ad esempio la build fallisce se nel progetto che la
  importa non è presente `framer-motion`
npm package: @mirrorprod/ep-node-client
Description: Javascript client to send mails using Electric Pigeon service
Author: Davide Cesaroni
Latest version: 1.0.3

# Electric Pigeon node client

Javascript client to send mails using Electric Pigeon service

## Installation

```bash
# using yarn
yarn add @mirrorprod/ep-node-client

# using npm
npm install @mirrorprod/ep-node-client --save
```

## How to use

To use it just set the api key **save it in an env file, it'll take just 3 minutes, so please, if someone stole this key we have to update many projects**.
To send the mail just call the `sendMail` method using and object like this:

```typescript
interface MailData {
  to: string;
  fromEmail: string;
  fromName: string;
  subject: string;
  mailBody: string;
  replyTo?: string;
  attachments?: {
    fileName?: string;
    contentBody: string; // the file in base64 format
    contentType: string;
  }[];
}
```

```typescript
import { electricPigeonClient } from "@mirrorprod/ep-node-client";

electricPigeonClient.setApiKey(proces.env.MAIL_API_KEY);

try {
  await electricPigeonClient.sendMail({
    fromEmail: "sender@email.com", // this must be a verified email
    fromName: "name",
    to: "recipient@email.com",
    subject: "subject",
    mailBody: "mail body",
    replyTo: "replyTo@email.com",
    attachments: [
      {
        fileName: "filename",
        contentBody: "base64 of the file",
        contentType: "application/pdf",
      },
    ],
  });
} catch (err) {
  console.log(err);
}
```

If you are using it in a NextJS API here a complete snippet

```typescript
import { NextApiRequest, NextApiResponse } from "next";
import { electricPigeonClient } from "@mirrorprod/ep-node-client";

const sendMail = async (req: NextApiRequest, res: NextApiResponse) => {
  const apiKey = process.env.MAIL_API_KEY || "";

  electricPigeonClient.setApiKey(apiKey);

  try {
    await electricPigeonClient.sendMail({
      fromEmail: "sender@email.com", // this must be a verified email
      fromName: "name",
      to: "recipient@email.com",
      subject: "subject",
      mailBody: "mail body",
      replyTo: "replyTo@email.com",
      attachments: [
        {
          fileName: "filename",
          contentBody: "base64 of the file",
          contentType: "application/pdf",
        },
      ],
    });

    return res.json({
      status: 200,
    });
  } catch (error: any) {
    console.error(error);
    res.statusCode = 400;
    res.json({ error: error?.message });
  }
};

export default sendMail;
```
npm package: @mirrorprod/strapi-email-provider-ep
Description: Strapi email provider for mirror Electric Pigeon service
Author: Davide Cesaroni
Latest version: 1.0.3

# Strapi email provider for Electric Pigeon

Custom strapi email provider to use mirror mail service

## Links

- [Strapi website](https://strapi.io/)
- [Strapi documentation](https://docs.strapi.io)

## Installation

```bash
# using yarn
yarn add @mirrorprod/strapi-email-provider-ep

# using npm
npm install @mirrorprod/strapi-email-provider-ep --save
```

## Configuration

| Variable                | Type                    | Description                                                                                                             | Required | Default   |
| ----------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
| provider                | string                  | The name of the provider you use                                                                                        | yes      |           |
| providerOptions         | object                  | Provider options                                                                                                        | yes      |           |
| providerOptions.apiKey  | object                  | Api key given to the function setApiKey.                                                                                | yes      |           |
| settings                | object                  | Settings                                                                                                                | no       | {}        |
| settings.defaultFrom    | string                  | Default sender mail address                                                                                             | no       | undefined |

> :warning: The Shipper Email (or defaultfrom) may also need to be changed in the `Email Templates` tab on the admin panel for emails to send properly

### Example

**Path -** `config/plugins.js`

```js
module.exports = ({ env }) => ({
  // ...
  email: {
    config: {
      provider: '@mirrorprod/strapi-email-provider-ep',
      providerOptions: {
        apiKey: env('MAIL_API_KEY'), // you have to add this in your .env file
      },
      settings: {
        defaultFrom: 'mailer@mirror.it'
      },
    },
  },
  // ...
});
```
npm package: @mirrorworld/approval.middleware
Description: Medusa SDK Core
Author: Jonathan Bakebwa
Latest version: 1.5.0

# Approval Middleware

This middleware is used to authorize actions executed by users. This prevents external entities from performing
actions on behalf of users. The way it works is that the user approves an action, which creates
a token that is valid for 60 seconds on the Mirror World SSO.

This token should then be used to authenticate the user's action on the target service.

## Installation

```shell
yarn add @mirrorworld/approval.middleware
```

## Usage

```ts
import myRedisClient from '../path/to/redis';
import { ActionApprovalClient } from '@mirrorworld/approval.middleware';

const secret = process.env.MY_JWT_SECRET;
const algorithm = process.env.MY_JWT_ALGORITHM;

// 1. Create Action approval client
const approvalClient = new ActionApprovalClient({
  redisClient: myRedisClient,
  jwt: {
    secret: secret,
    algorithm: algorithm,
  },
});

// 2. Create middleware instance
const approvalMiddleware = approvalClient.createValidateActionMiddleware(
  'x-authorization-token',
  'x-api-req-approval'
);

// 3. Add middleware to request
router.post('/v1/transfer', approvalMiddleware, async (req, res, next) => {
  // Execute authorized action transfer
});
```

## Supported Actions

```ts
export type ActionType =
  | 'mint_nft'
  | 'update_nft'
  | 'transfer_sol'
  | 'transfer_spl_token'
  | 'create_collection'
  | 'create_sub_collection'
  | 'list_nft'
  | 'buy_nft'
  | 'cancel_listing'
  | 'update_listing'
  | 'transfer_nft'
  | 'interaction'
  | 'create_marketplace'
  | 'update_marketplace'
  | 'transfer_bnb'
  | 'transfer_matic'
  | 'transfer_eth'
  | 'transfer_erc20_token'
  | 'sign_transaction'
  | 'personal_sign'
  | 'sign_typed_data'
  | 'sign_typed_data_with_version';
```
npm package: @mirrorworld/server.utils
Description: Mirror World Server Utilities
Author: Jonathan Bakebwa
Latest version: 1.3.0

# Approval Middleware

This middleware is used to authorize actions executed by users. This prevents external entities from performing
actions on behalf of users. The way it works is that the user approves an action, which creates
a token that is valid for 60 seconds on the Mirror World SSO.

This token should then be used to authenticate the user's action on the target service.

## Installation
```shell
yarn add @mirrorworld/approval.middleware
```

## Usage
```ts
import myRedisClient from "../path/to/redis"
import { ActionApprovalClient } from "@mirrorworld/approval.middleware"

const secret = process.env.MY_JWT_SECRET
const algorithm = process.env.MY_JWT_ALGORITHM

// 1. Create Action approval client
const approvalClient = new ActionApprovalClient({
  redisClient: myRedisClient,
  jwt: {
    secret: secret,
    algorithm: algorithm
  }
})

// 2. Create middleware instance
const approvalMiddleware = approvalClient.createValidateActionMiddleware("x-authorization-token")

// 3. Add middleware to request
router.post("/v1/transfer", approvalMiddleware, async (req, res, next) => {
  // Execute authorized action transfer
})
```