open-index/open-npm huggingface dataset:
npm package: @letta-ai/letta-react
Description: Letta's react library
Author: Letta
Latest version: 0.2.2

# Letta React

Letta React is a helper library for using Letta in React applications it uses [tanstack/react-query](https://tanstack.com/query/v4) under the hood to manage the state of your queries and mutations.

## Installation

```bash
npm install @letta-ai/letta-react @tanstack/react-query @letta-ai/letta-client
```

## Usage

First set up a tanstack/react-query client and wrap your app with the `QueryClientProvider` component.

```tsx
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <YourApp />
    </QueryClientProvider>
  );
}
```

Then you can use `useLettaQuery` hooks to interact with the Letta API.

```tsx
import { useLetta, useLettaQuery } from '@letta-ai/letta-react';

function YourComponent() {
  const { data, isLoading, error } = useLettaQuery(
    // the first argument exposes a client instantiation
    (client) => client.agents.list({ limit: 1 }),
    // the rest of the argumenst are the same as react-query, so you should specify a queryKey
    { queryKey: ['agents', 'list'] }
  );

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return <div>Data: {JSON.stringify(data)}</div>;
}
```

# Future Work

This library only supports queries not mutations at the moment. Please use this library in conjunction with [@letta-ai/vercel-ai-sdk-provider](https://www.npmjs.com/package/@letta-ai/vercel-ai-sdk-provider) for a full experience.
npm package: @letter-ai/lector
Description: Headless PDF viewer for React
Author: andrewdr
Latest version: 0.0.0-semantically-released

<p align="center">
  <!-- <h1 align="center"><img src="https://www.anara.ai/icons/logo.png" width="196" /></h1> -->
  <p align="center">
    <i>Simple primitives to compose powerful PDF viewing experiences.<br>powered by <code><a href="https://mozilla.github.io/pdf.js/">PDF.js</a></code> and <code><a href="https://reactjs.org/">React</a></code></i>
  </p>
</p>

# `lector`

A composable, headless PDF viewer toolkit for React applications, powered by `PDF.js`. Build feature-rich PDF viewing experiences with full control over the UI and functionality.

[![npm version](https://badge.fury.io/js/@letter-ai%2Flector.svg)](https://www.npmjs.com/package/@letter-ai/lector)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

```bash
npm install @letter-ai/lector pdfjs-dist

# or with yarn
yarn add @letter-ai/lector pdfjs-dist

# or with pnpm
pnpm add @letter-ai/lector pdfjs-dist
```

## Basic Usage

Here's a simple example of how to create a basic PDF viewer:

```tsx
import { CanvasLayer, Page, Pages, Root, TextLayer } from "@letter-ai/lector";
import "pdfjs-dist/web/pdf_viewer.css";

export default function PDFViewer() {
  return (
    <Root
      source="/sample.pdf"
      className="w-full h-[500px] border overflow-hidden rounded-lg"
      loader={<div className="p-4">Loading...</div>}
    >
      <Pages className="p-4">
        <Page>
          <CanvasLayer />
          <TextLayer />
        </Page>
      </Pages>
    </Root>
  );
}
```

## Features

- 📱 Responsive and mobile-friendly
- 🎨 Fully customizable UI components
- 🔍 Text selection and search functionality
- 📑 Page thumbnails and outline navigation
- 🌗 First-class dark mode support
- 🖱️ Pan and zoom controls
- 📝 Form filling support
- 🔗 Internal and external link handling

## Contributing

We welcome contributions! Key areas we're focusing on:

1. Performance optimizations
2. Accessibility improvements
3. Mobile/touch interactions
4. Documentation and examples

## Thanks

Special thanks to these open-source projects that provided inspiration:

- [react-pdf-headless](https://github.com/jkgenser/react-pdf-headless)
- [pdfreader](https://github.com/OnedocLabs/pdfreader)

## License

MIT © [Unriddle AI]()
npm package: @letterdropcom/gatsby-source-letterdrop
Description: Gatsby source plugin for building websites using Letterdrop as a data source
Author: Letterdrop
Latest version: 1.0.26

<p align="center">
  <a href="https://letterdrop.com/">
    <img alt="Letterdrop" src="https://letterdrop.com/images/logo-gradient-shadow.svg" width="60" />
  </a>
  <a href="https://www.gatsbyjs.com/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter" style="margin-left:-15px;">
    <img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
  </a>
</p>
<h1 align="center">
  Letterdrop Gatsby Source Plugin
</h1>

Source plugin for sourcing data from Letterdrop Posts data.

<br >

## Install

```npm i @letterdropcom/gatsby-source-letterdrop```

<br >

## How to use

The plugin requires your publication api-key from Letterdrop. Check <a href="https://api.letterdrop.com/find-your-api-key">here</a> to know how to generate and use an API key.

Once you got your api-key use the following configuration in your Gatsby Site.

```shell
# In your gatsby-config.js
plugins: [
    {
        resolve: "@letterdropcom/gatsby-source-letterdrop",
        options: {
            apikey: "<your-api-key>",
            version: "v1" # default version
        }
    }
]
```
<br >

## How to query

Upon querying the plugin, it return a single / list of Post nodes. Check the response for the full set of fields made available from <a href="https://api.letterdrop.com/api#get-post">Letterdrop Get Post API</a>

**Example post query**

```shell
{
  allLetterdropPosts {
    nodes {
      url
      title
      ...
      coverImage {
        url
        extension
        ...
      }
      publication {
        customDomain {
          domain
          ...
        }
        _id
        domain
      }
      postAuthor {
        _id
        name
      }
    }
  }
}
```

**Example post query with filter**

Assume you need to query post url  ```adapt-your-writing``` from allLetterdropPosts, specify the filter like below

```shell
{
  allLetterdropPosts(filter: {url: {eq: "adapt-your-writing"}}) {
    nodes {
      url
      title
      ...
      coverImage {
        url
        extension
        ...
      }
      publication {
        customDomain {
          domain
          ...
        }
        _id
        domain
      }
      postAuthor {
        _id
        name
      }
    }
  }
}
```

<br ><br >

# Copyright

Copyright © 2021 Letterdrop
npm package: @letterflow/ngx-dynamic-script-loader
Description: Small Angular library to dynamically load and inject remote JS scripts into the DOM.
Author: Nelson Dominguez
Latest version: 0.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# NgxDynamicScriptLoader

Small Angular library to dynamically load and inject remote JS scripts into the DOM on-demand.

## Install

Using **yarn**:

```bash
yarn add @letterflow/ngx-dynamic-script-loader
```

Using **npm**:

```bash
npm install --save @letterflow/ngx-dynamic-script-loader
```

## Usage

#### Using the library with default configuration:

```ts
import {NgxDynamicScriptLoaderModule} from '@letterflow/ngx-dynamic-script-loader';

@NgModule({
  imports: [..., NgxDynamicScriptLoaderModule]
})
export class ExampleModule {}
```

#### Using the library with custom configuration:

```ts
import {NgxDynamicScriptLoaderModule} from '@letterflow/ngx-dynamic-script-loader';

@NgModule({
  imports: [
    ...,
    NgxDynamicScriptLoaderModule.withConfig({
      async: false,
      skipError: false,
    })
  ]
})
export class ExampleModule {}
```

#### Providing configuration using `NgxDynamicScriptLoaderConfig` InjectionToken:

```ts
import {
  NgxDynamicScriptLoaderModule,
  NgxDynamicScriptLoaderConfig,
} from "@letterflow/ngx-dynamic-script-loader";

@NgModule({
  imports: [NgxDynamicScriptLoaderModule],
  providers: [
    {
      provide: NgxDynamicScriptLoaderConfig,
      useValue: {
        async: false,
        skipAbort: false,
        skipError: false,
        onLoad(script) {
          console.log(script);
        },
      },
    },
  ],
})
export class ExampleFeatureModule {}
```

## Configuration

When calling `NgxDynamicScriptLoader#loadScript`, configuration provided in the methods argument,
will be merged with the current value provided by the `NgxDynamicScriptLoaderConfig` InjectionToken.

All callbacks default to a `noop` function.

Here is a list of possible configuration fields in `NgxDynamicScripLoaderConfig`:

- **async**: _boolean_

  Value to use for the _async_ attribute in the injected HTMLScriptElement.

  Default: `true`.

- **skipAbort**: _boolean_

  Whether to throw an error when the `onabort` event fires on the HTMLScriptElement.

  Default: `true`.

- **skipError**: _boolean_

  Whether to throw an error when the `onerror` event fires on the HTMLScriptElement.
  Note: When loading a list of scripts and this field is set to _true_, all subsequent scripts will not be loaded.

  Default: `true`.

- **onLoad**: (reason) => void

  Callback that fires when the `onload` event occures.

  Default: `noop`.

- **onAbort**: (reason) => void

  Callback that fires when the `onabort` event occures.

  Default: `noop`.

- **onError**: (reason) => void

  Callback that fires when the `onerror` event occures.

  Default: `noop`.