open-index/open-npm huggingface dataset:
npm package: @nucleus-ui/nucleus-icons
Description: An icon set by Nucleus UI
Author: Your Name
Latest version: 1.0.0

# Nucleus Icons

A collection of SVG icons available as React components.

## Installation

```bash
npm install nucleus-icons
# or
yarn add nucleus-icons
```

## Usage

```jsx
import { RegularIcons, SolidIcons } from 'nucleus-icons';

function MyComponent() {
  return (
    <div>
      <RegularIcons.IconName width="24" height="24" />
      <SolidIcons.IconName width="24" height="24" />
    </div>
  );
}
```

## Icon Preview

You can view all available icons using the included preview component:

```jsx
import { IconGrid } from 'nucleus-icons/showcase';

function IconPreview() {
  return <IconGrid />;
}
```

## Available Props

All icons accept the following props:

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| width | string or number | "1.5em" | The width of the icon |
| height | string or number | "1.5em" | The height of the icon |
| color | string | "currentColor" | The stroke color of the icon |
| strokeWidth | string or number | "1.5" | The stroke width of the icon |

Plus all standard SVG attributes and event handlers.

## License

MIT
npm package: @nucli/react-big-calendar
Description: Calendar! with events
Author: Jason Quense
Latest version: 0.12.3-nucli-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

`npm install react-big-calendar --save`

Include `react-big-calendar/lib/css/react-big-calendar.css` for styles.

## Run examples locally

* Clone this repository
* Retrieve dependencies: `npm install`
* Start: `npm run examples [port]` (default port is 3000)
* 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 BigCalendar from 'react-big-calendar';
import moment from 'moment';

BigCalendar.setLocalizer(
  BigCalendar.momentLocalizer(moment)
);
```

#### Globalize.js v0.1.1

```js
import BigCalendar from 'react-big-calendar';
import globalize from 'globalize';

BigCalendar.setLocalizer(
  BigCalendar.globalizeLocalizer(globalize)
);
```
npm package: @nuclia/core
Description: SDK allowing to integrate Nuclia services in your frontend application
Latest version: 1.32.0

# Nuclia JavaScript SDK

Nuclia SDK is an open-source library wrapping Nuclia API in order to integrate [Nuclia](https://nuclia.com) services in your frontend application.

It supports both JavaScript and TypeScript.

It can be installed via npm:

```bash
npm install @nuclia/core
```

The full documentation is available at [https://docs.nuclia.dev/docs/develop/js-sdk/](https://docs.nuclia.dev/docs/develop/js-sdk/).

## Basic usage

```ts
import { Nuclia } from '@nuclia/core';

const nuclia = new Nuclia({
  backend: 'https://rag.progress.cloud/api',
  zone: 'europe-1',
  knowledgeBox: '<YOUR-KB-ID>',
});
nuclia.knowledgeBox.search('where does the Little Prince live', [Search.Features.KEYWORD]).subscribe((searchResult) => {
  console.log('search result', searchResult);
});
```

## Usage with NodeJS

This SDK can work in NodeJS by providing some polyfills for `localStorage` and `fetch`:

```js
const { Nuclia } = require('@nuclia/core');
require('localstorage-polyfill');
require('isomorphic-unfetch');

const nuclia = new Nuclia({
  backend: 'https://rag.progress.cloud/api',
  zone: 'europe-1',
  knowledgeBox: '<YOUR-KB-ID>',
});
```

## Direct usage in the browser

The Nuclia SDK is also provided via a CDN for direct browser usage:

```html
<script src="https://cdn.rag.progress.cloud/nuclia-sdk.umd.js"></script>
```

It will expose a global variable `NucliaSDK` containing the `Nuclia` class:

```js
const nuclia = new NucliaSDK.Nuclia({
  backend: 'https://rag.progress.cloud/api',
  zone: 'europe-1',
  knowledgeBox: '<YOUR-KB-ID>',
});
```
npm package: @nuclia/extractor
Description: Allows to extract the HTML content of a web page.
Latest version: 1.0.0

# Web page extractor

Allows to extract the HTML content of a web page.

## Objective

When pushing regular links to your Nuclia Knowledge Box, the content of the page is extracted by the Nuclia processing, but your web pages may not be accessible from the internet. This extractor allows you to extract the content of your web pages locally and so the Nuclia Sync Agent can push the corresponding content to your Nuclia Knowledge Box.

It must be used in conjunction with the [Nuclia Sync agent](https://github.com/nuclia/sync-agent).
It must be deployed on the same machine as the Nuclia Sync agent, and it runs on port 8091.

## Installation

```bash
npm install @nuclia/extractor
```

## Usage

```bash
npm start
```
npm package: @nuclia/protobuf
Description: JavaScript utility to handle Nuclia protobuffer messages
Author: Nuclia
Latest version: 1.2.3

# @nuclia/protobuf

JavaScript utility to handle Nuclia protobuffer messages.

## Functions

- `NucliaProtobufConverter` is a function accepting a buffer and returning a Promise that resolves to a parsed protobuffer message.

- `extractParagraphTexts` is a function adding to each Paragraph object a `text` attribute containing the actual text of the paragraph (by default, Paragraph objects only contain the position of their first and last characters).

## Installation

```bash
npm install @nuclia/protobuf
```

or

```bash
yarn add @nuclia/protobuf
```

## Usage

When using a [webhook with the Nuclia Understanding API](https://docs.nuclia.dev/docs/understanding/intro#use-a-webhook), the message sent to the webhook is a protobuffer message. It can be decoded using the NucliaProtobufConverter.

```js
import { NucliaProtobufConverter } from '@nuclia/protobuf';

router.post('/handle', (request, response) => {
  NucliaProtobufConverter(request.body).then((message) => {
    console.log(message);
  });
});
```

When calling [Nuclia Understanding API `/pull` endpoint](https://docs.nuclia.dev/docs/api#operation/Get_processed_data_processing_pull_get), you get a JSON message containing a `payload` entry with base64 encoded protobuffer message. Processing it could be done as follows:

```js
import { NucliaProtobufConverter } from '@nuclia/protobuf';
import fetch from 'node-fetch';

fetch('https://europe-1.nuclia.cloud/api/v1/processing/pull', {
  headers: {
    'x-stf-nuakey': `Bearer ${NUA_KEY}`,
    'content-type': 'application/json',
  },
  method: 'GET',
})
  .then((res) => res.json())
  .then((data) => {
    if (data.status === 'ok' && data.payload) {
      return NucliaProtobufConverter(Buffer.from(data.payload, 'base64'));
    } else {
      return data;
    }
  })
  .then((res) => console.log(res));
```

To get paragraphs text, you can use the `extractParagraphTexts` function:

```js
import { NucliaProtobufConverter, extractParagraphTexts } from '@nuclia/protobuf';

router.post('/handle', (request, response) => {
  NucliaProtobufConverter(request.body).then((message) => {
    console.log(extractParagraphTexts(message).fieldMetadata[0].metadata.metadata.paragraphs);
  });
});
```