open-index/open-npm huggingface dataset:
npm package: @sfdl/prpc
Description: [![npm version](https://badge.fury.io/js/@sfdl%2Fprpc.svg)](https://badge.fury.io/js/@sfdl%2Fprpc) [![npm - License](https://img.shields.io/npm/l/@sfdl%2Fprpc.svg)](https://www.npmjs.com/package/@sfdl%2Fprpc) [![GitHub issues](https://img.shields.io/githu
Author: Dave Tickle
Latest version: 0.3.3

# prpc-python - Pyodide Remote Procedure Calls - Typescript Client

[![npm version](https://badge.fury.io/js/@sfdl%2Fprpc.svg)](https://badge.fury.io/js/@sfdl%2Fprpc)
[![npm - License](https://img.shields.io/npm/l/@sfdl%2Fprpc.svg)](https://www.npmjs.com/package/@sfdl%2Fprpc)
[![GitHub issues](https://img.shields.io/github/issues/SocialFinanceDigitalLabs/prpc.svg)](https://github.com/SocialFinanceDigitalLabs/prpc/issues)

PRPC is an npm library which simplifies the process of integrating a Pyodide-Python layer (and much more)

PRPC seeks to simplify the integration of Pyodide + alternative APIs in a way that acts as an abstraction layer for the front-end. To do this is standardizes on an RPC call between the application layers, with a payload which instructs the API implementation on how to handle the request and return a response.

When Pyodide is used as a back-end it also simplifies the process of running the implementation in a WebWorker to allow complex data wrangling to take place without causing the UI to halt.

### Installation

`yarn add @sfdl/prpc`
or
`npm install --save-dev @sfdl/prpc`

### Usage

1. import the required library and types

```javascript
import { createApi, APITransport } from '@sfdl/prpc';
```

2. initialize the API and wait for it to confirm that it is ready

```javascript
const apiConfig = {
  transport: APITransport.WEB,
  options: {
    url: 'http://localhost:8000',
  },
};
const api = await createApi(apiConfig, () => {});
```

3. make a call to the API

```javascript
const apiResponse = await api.call("methodname", {/*payload*/})
```

For running in pyodide, set the apiConfig as follows:

```javascript

const apiConfig = {
  transport: APITransport.PYODIDE,
  options: {
    nativePackages: ['numpy', 'pandas'],
    packages: ['<your package name>'],
  },
};
```

`<your package name>` can either be the PyPI package name, or
the URL to a wheel file.
npm package: @sfdl/sf-cookie-gate
Description: This is a small React HoC library for gating top level components behind a cookie.
Author: Dave Tickle
Latest version: 0.0.3

# Cookie Gate

This is a small React HoC library for gating top level components behind a cookie.

### Installation
Install from npm using the package manager of your choice

`yarn add @sfdl/sf-cookie-gate`
or
`npm install @sfdl/sf-cookie-gate`

### Usage
The application exposes a minimal API. Essentially it is a bi-directional HoC which pushes down one path or another depending on whether a cookie has been set. A cookie handler function is provided for convenience

| Prop                   | Description                                        | Type                              |
| ---------------------- | -------------------------------------------------- | --------------------------------- |
| `ApplicationComponent` | The component to be shown if the cookie is set     | JSX Element or React.lazy Element |
| `LandingComponent`     | The component to be shown if the cookie is not set | JSX Element or React.lazy Element |
| `options`              | An object of options to configure the cookie       | `CookieOptions`                   |

### CookieOptions
The cookie options object is used to structure and configure the cookie. It has the following key/values
| Key | Value |
|-----|-------|
| `cookieName` | cookie name string |
| `cookieOptions` | an object of [js-cookie options](https://github.com/js-cookie/js-cookie#cookie-attributes)|
npm package: @sfdl/sf-mui-components
Description: This is a small library of UI components for SF React projects. It leverages the MUI library for styling and underlying application components but builds upon it to deliver components tailored to the requirements of SF.
Author: Dave Tickle
Latest version: 0.1.20-1

# Social Finance MaterialUI Components

This is a small library of UI components for SF React projects. It leverages the MUI library for styling and underlying application components but builds upon it to deliver components tailored to the requirements of SF.

Eventually the intention is that this should be a full-blown NPM library but for now, and until the API and use-cases are stable, the only way to utilise it is to `yarn link` or `npm link` it into an existing React application.

Note: a quirk of Create React App based applications is that they do not support peer dependencies defined outside the src folder. For this reason if this components are to be used in an unejected CRA application you must also link `react` and `react-dom` from the node_modules folder in this project. Not doing so will cause two copies of React to be loaded onto the page and an outbreak of havoc will ensue.