open-index/open-npm huggingface dataset:
npm package: @swan-io/boxed
Description: Utility types for functional TypeScript
Author: Matthias Le Brun
Latest version: 3.2.1

<img width="108" alt="@swan-io/boxed logo" src="https://github.com/swan-io/boxed/blob/main/docs/static/img/logo.svg?raw=true">

# @swan-io/boxed

[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/swan-io/boxed/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@swan-io/boxed?style=for-the-badge)](https://www.npmjs.org/package/@swan-io/boxed)
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/@swan-io/boxed?label=size&style=for-the-badge)](https://bundlephobia.com/result?p=@swan-io/boxed)

> Essential building-blocks for functional & safe TypeScript code

**Boxed** provides essential building-blocks (in the form of types and functions) so that you can write functional, safe TypeScript code.

## Design principles

- Provide utility types that **make data-manipulation and storage easier**
- **Immutable** (all provided types are)
- Give a **good development experience** (chaining API, reliable types)
- Simple **interoperability** (you can convert back and forth to JS native types)
- Compatibility with `ts-pattern` (using `patterns` we provide).

## What's in the box?

- `Option<Value>`
- `Result<Ok, Error>`
- `Future<Value>`
- `AsyncData<Value>`
- `Lazy<Value>`
- Some utils like `Deferred`, `Dict` & `Array`

## Installation

```bash
$ yarn add @swan-io/boxed
# --- or ---
$ npm install --save @swan-io/boxed
```

## Links

- 📘 [**Documentation**](https://boxed.cool)
- ⚖️ [**License**](./LICENSE)
npm package: @swan-io/chicane
Description: A simple and safe router for React and TypeScript
Author: Mathieu Acthernoene
Latest version: 3.0.0

<img width="108" alt="@swan-io/chicane logo" src="https://github.com/swan-io/chicane/blob/main/docs/static/img/logo.svg?raw=true">

# @swan-io/chicane

[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/swan-io/chicane/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@swan-io/chicane?style=for-the-badge)](https://www.npmjs.org/package/@swan-io/chicane)
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/@swan-io/chicane?label=size&style=for-the-badge)](https://bundlephobia.com/result?p=@swan-io/chicane)

A simple and safe router for React and TypeScript.

## Design principles

- **Typed routes**: improving the DX, and making sure all your params are here!
- **Component-friendly**: the router nicely fits in your React app.
- **Easy-to-use**: naming routes instead of moving around unsafe URLs.
- **Performant**: avoids any unnecessary render.

## Installation

```bash
$ yarn add @swan-io/chicane
# --- or ---
$ npm install --save @swan-io/chicane
```

## Links

- 📘 [**Documentation**](https://swan-io.github.io/chicane)
- ⚖️ [**License**](./LICENSE)

## Quickstart

```tsx
import { createRouter } from "@swan-io/chicane";
import { match } from "ts-pattern";

const Router = createRouter({
  Home: "/",
  Users: "/users",
  User: "/users/:userId",
});

const App = () => {
  const route = Router.useRoute(["Home", "Users", "User"]);

  // route object is a discriminated union
  return match(route)
    .with({ name: "Home" }, () => <h1>Home</h1>)
    .with({ name: "Users" }, () => <h1>Users</h1>)
    .with({ name: "User" }, ({ params }) => <h1>User {params.userId}</h1>) // params are strongly typed
    .otherwise(() => <h1>404</h1>);
};
```

## Run the example app

```bash
$ git clone git@github.com:swan-io/chicane.git
$ cd chicane/example

$ yarn install && yarn dev
# --- or ---
$ npm install && npm run dev
```

## 🙌 Acknowledgements

- [react-router](https://github.com/remix-run/react-router) for the `history` and the `Link` creation code.
- [reach-router](https://github.com/reach/router) for the path ranking algorithm.
npm package: @swan-io/gql-client
Description: A simple, typesafe GraphQL client for React
Author: Matthias Le Brun
Latest version: 0.1.0-alpha

<img width="108" alt="@swan-io/graphql-client" src="https://github.com/swan-io/graphql-client/blob/main/docs/static/img/logo.svg?raw=true">

# @swan-io/graphql-client

[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/swan-io/graphql-client/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@swan-io/graphql-client?style=for-the-badge)](https://www.npmjs.org/package/@swan-io/graphql-client)
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/@swan-io/graphql-client?label=size&style=for-the-badge)](https://bundlephobia.com/result?p=@swan-io/graphql-client)

> A simple, typesafe GraphQL client for React

## Installation

```bash
$ yarn add @swan-io/graphql-client
# --- or ---
$ npm install --save @swan-io/graphql-client
```

## Links

- 📘 [**Documentation**](https://swan-io.github.io/graphql-client)
- ⚖️ [**License**](./LICENSE)
npm package: @swan-io/graphql-client
Description: A simple, typesafe GraphQL client for React
Author: Matthias Le Brun
Latest version: 0.8.0

<img width="108" alt="@swan-io/graphql-client" src="https://github.com/swan-io/graphql-client/blob/main/docs/static/img/logo.svg?raw=true">

# @swan-io/graphql-client

[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/swan-io/graphql-client/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@swan-io/graphql-client?style=for-the-badge)](https://www.npmjs.org/package/@swan-io/graphql-client)
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/@swan-io/graphql-client?label=size&style=for-the-badge)](https://bundlephobia.com/result?p=@swan-io/graphql-client)

> A simple, typesafe GraphQL client for React

## Installation

```bash
$ yarn add @swan-io/graphql-client
# --- or ---
$ npm install --save @swan-io/graphql-client
```

## Links

- 📘 [**Documentation**](https://swan-io.github.io/graphql-client)
- ⚖️ [**License**](./LICENSE)
npm package: @swan-io/indexed-db
Description: A resilient, Future-based key-value store for IndexedDB
Author: Mathieu Acthernoene
Latest version: 0.4.4

# @swan-io/indexed-db

[![Tests](https://github.com/swan-io/indexed-db/actions/workflows/tests.yml/badge.svg)](https://github.com/swan-io/indexed-db/actions/workflows/tests.yml)
[![mit licence](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/swan-io/indexed-db/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@swan-io/indexed-db)](https://www.npmjs.org/package/@swan-io/indexed-db)
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/@swan-io/indexed-db&label=size)](https://bundlephobia.com/result?p=@swan-io/indexed-db)

A resilient, [Future](https://swan-io.github.io/boxed/future)-based key-value store for IndexedDB.

## Installation

```sh
$ yarn add @swan-io/indexed-db
# --- or ---
$ npm install --save @swan-io/indexed-db
```

## Quickstart

```ts
const store = openStore("myDatabaseName", "myStoreName");

store
  .setMany({
    firstName: "Mathieu",
    lastName: "Breton",
  })
  .flatMap(() => store.getMany(["firstName", "lastName"]))
  .flatMap(({ firstName, lastName }) => {
    console.log({
      firstName,
      lastName,
    });

    return store.clear();
  })
  .tap(() => {
    console.log("✅");
  });
```

## API

Open a database, create a store if needed and returns methods to manipulate it.<br/>
Note that you can open multiple databases / stores, with different names.

```ts
const store = await openStore("myDatabaseName", "myStoreName", {
  transactionRetries: 2, // retry failed transactions (default: 2)
  transactionTimeout: 500, // timeout a transaction when it takes too long (default: 500ms)
  onDatabaseError: (error: Error) => console.error(error), // called with idb errors (default: noop)
});
```

### store.getMany

Get many values at once. Resolves with a record.

```ts
store
  .getMany(["firstName", "lastName"])
  .map(({ firstName, lastName }) => console.log({ firstName, lastName }));
```

### store.setMany

Set many key-value pairs at once.

```ts
store
  .setMany({ firstName: "Mathieu", lastName: "Breton" })
  .tap(() => console.log("✅"));
```

### store.clear

Clear all values in the store.

```ts
store.clear().tap(() => console.log("✅"));
```

## 🙌 Acknowledgements

- [firebase-js-sdk](https://github.com/firebase/firebase-js-sdk) by [@firebase](https://github.com/firebase)
- [idb-keyval](https://github.com/jakearchibald/idb-keyval) and [safari-14-idb-fix](https://github.com/jakearchibald/safari-14-idb-fix) by [@jakearchibald](https://github.com/jakearchibald)
npm package: @swan-io/lake
Description: > Swan's design system
Latest version: 13.7.9

# @swan-io/lake

> Swan's design system

## Getting started

You can start the [Storybook](https://storybook.js.org), a small application that allows you to list and play with the various components.

```console
$ pnpm start
```

## Consume the design system from apps

### Scaffolding

Our design system assumes that some basic CSS is injected (for fonts, variables and reset). In order to do so:

```typescript
import "@swan-io/lake/src/assets/fonts/Inter.css";
import "@swan-io/lake/src/assets/main.css";
```

### Tokens

To use the design tokens (e.g. colors, spacings…), you can import the `design` file:

```typescript
import {
  colors,
  backgroundColor,
  texts,
  gradients,
  shadows,
  spacings,
  negativeSpacings,
  radii,
  fonts,
  animations,
} from "@swan-io/lake/src/constants/design";
```

## Build

You can build a static version of the Storybook (e.g. to host a demo space):

```console
$ pnpm build
```
npm package: @swan-io/lokalise-sync-cli
Description: ## Install
Author: bloodyowl
Latest version: 1.0.3

# Lokalise Sync CLI

## Install

```console
$ yarn add @swan-io/lokalise-sync-cli
```

## Getting started

First, provide a `LOKALISE_API_KEY` environment variable, containing your Lokalise API Key.

Create a `lokalise.config.js` file at the root of your project:

```js
require("dotenv").config();

module.exports = [
  {
    name: "your-app-name",
    id: "your-app-lokalise-id",
    defaultLocale: "en",
    paths: {
      src: "/your/app/absolute/path",
      locales: "/your/app/locales/absolute/path",
    },
  },
]
```

## Usage

### lokalise sync

```console
$ lokalise sync
```

Syncs your projects (pulls and pushes).

### lokalise pull

```console
$ lokalise pull
```

Pulls up to date translations from lokalise.

### lokalise push

```console
$ lokalise push
```

Pushes translations to lokalise.

### lokalise clean

```console
$ lokalise clean
```

Removes keys that aren't in the reference locale anymore.

### lokalise lint

```console
$ lokalise lint
```

Checks that translations are in the correct format.

### lokalise find-unused

```console
$ lokalise find-unused
```

Logs values that aren't used in your projects.

### lokalise remove-unused

```console
$ lokalise remove-unused
```

Removes values from your translations files if they aren't used in your projects.
npm package: @swan-io/vitest-notion-reporter
Description: A lightweight vitest reporter that sends results on a Notion page
Author: Arnaud Commelin
Latest version: 0.1.0

# vitest-notion-reporter

Eager to make your unit tests a source of documentation for everyone in your company? Here comes a vitest reporter that creates documentation on Notion from your tests `describe`s and `it`s :rocket:

## Prerequisites

You will need to [**setup an integration in your Notion**](https://www.notion.so/help/create-integrations-with-the-notion-api) able to write on the root page you'll have for documentation.

## Installation

```bash
npm install -D @swan-io/vitest-notion-reporter
```

## Usage

### Add the reporter to your vitest configuration

```ts
import { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";

export default defineConfig(<UserWorkspaceConfig>{
  test: {
    reporters: [new NotionReporter()],
  },
});
```

### Configuration

```bash
export NOTION_TOKEN=<YOUR-NOTION-TOKEN>
export NOTION_PARENT_PAGE_ID=<ROOT-PAGE-FOR-DOCUMENTATION-ID>
```

or

```ts
import { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";

export default defineConfig(<UserWorkspaceConfig>{
  test: {
    reporters: [
      new NotionReporter({
        token: "<YOUR-NOTION-TOKEN>",
        parentPageId: "<ROOT-PAGE-FOR-DOCUMENTATION-ID>",
      }),
    ],
  },
});
```

## Links

- ⚖️ [**License**](./LICENSE)