open-index/open-npm huggingface dataset:
npm package: @intastellar/signin-sdk-react
Description: Official Intastellar authentication SDK for React applications
Author: Intastellar Solutions International
Latest version: 1.1.303

# @intastellar/signin-sdk-react

Official Intastellar authentication SDK for React applications.

## Installation

```bash
npm install @intastellar/signin-sdk-react
```

## Usage

### Basic Usage

```jsx
import { IntastellarButton } from "@intastellar/signin-sdk-react";

function App() {
  const handleLogin = (account) => {
    console.log("User logged in:", account);
  };

  return (
    <IntastellarButton clientId="your-client-id" loginCallback={handleLogin} />
  );
}
```

### Using the Hook

```jsx
import { useIntastellar } from "@intastellar/signin-sdk-react";

function MyComponent() {
  const { users, isLoading, signin, logout, isSignedIn } = useIntastellar({
    clientId: "your-client-id",
  });

  return (
    <div>
      {isSignedIn ? (
        <button onClick={logout}>Sign Out</button>
      ) : (
        <button onClick={() => signin()}>Sign In</button>
      )}
    </div>
  );
}
```

## Configuration

| Property        | Type     | Required | Description                             |
| --------------- | -------- | -------- | --------------------------------------- |
| `clientId`      | string   | Yes      | Your Intastellar application client ID  |
| `scopes`        | string   | No       | OAuth scopes (default: "profile,email") |
| `theme`         | object   | No       | Theme configuration                     |
| `loginCallback` | function | No       | Callback when login succeeds            |
| `errorCallback` | function | No       | Callback when login fails               |

## License

MIT © Intastellar Solutions International
npm package: @intavia/api-client
Description: this ia a typescript client for the [intavia api](https://intavia-backend.acdh-dev.oeaw.ac.at).
Latest version: 0.1.27

# InTaVia api client

this ia a typescript client for the [intavia api](https://intavia-backend.acdh-dev.oeaw.ac.at).

you can find more info about the project on the [intavia website](https://intavia.eu).

## how to use

configure the api base url:

```ts
import { configureApiBaseUrl } from "@intavia/api-client";

const baseUrl = process.env.NEXT_PUBLIC_INTAVIA_API_BASE_URL;

configureApiBaseUrl(baseUrl);
```

call endpoint:

```ts
import { searchEntities } from "@intavia/api-client";

const response = await searchEntities.request({ q: "stefan" });
```

use [`zod`](https://github.com/colinhacks/zod) validation schemas:

```ts
import type { Person } from "@intavia/api-client";
import { person as personSchema } from "@intavia/api-client";

const person: Person = {
	id: "1",
	kind: "person",
	label: { default: "stefan" },
};

const result = personSchema.safeParse(person);

if (result.success === true) {
	console.log("Definitely a person.\n", result.data);
} else {
	console.error("You sure this is a person?\n", result.error);
}
```
npm package: @intavia/data-import
Description: this is a module to import local data into the [intavia frontend](https://github.com/InTaVia/web) using an excel template.
Latest version: 0.2.0

# intavia data import

this is a module to import local data into the [intavia frontend](https://github.com/InTaVia/web) using an excel template.

you can find more info about the project on the [intavia website](https://intavia.eu).

## template

An excel template (for the example of Duerer's biography) is in `public/data`.

More detailed information follows.

## how to use

how to use within the [intavia frontend](https://github.com/InTaVia/web) with FileReader (binary file):

```ts
example follows
```

how to use within node with file buffer (see `scripts/xlsx2json2intavia.ts`; run with `npm run generate:xlsx2json2intavia`):

```ts
import { mkdir, writeFile, readFile } from "node:fs/promises";
import { basename, join } from "node:path";
import { format } from "prettier";
import * as XLSX from "xlsx";
import { readDataFromXlsxWorkbook, transformData } from "../src";

async function generate(path: any) {
    const buffer = await readFile(path);
    const workbook = XLSX.read(buffer, { type: "buffer" });
    const idPrefix = basename(path).replace(/\.xlsx$/, "");
    const importedData = readDataFromXlsxWorkbook(workbook, idPrefix);
    const transformedData = transformData(importedData, idPrefix);

    const fixturesFolder = join(process.cwd(), "public", "fixtures");
    await mkdir(fixturesFolder, { recursive: true });

    await writeFile(
        join(fixturesFolder, `${idPrefix}.json`),
        format(JSON.stringify(transformedData), { parser: "json" }),
        { encoding: "utf-8" }
    );
}

generate("public/data/data-duerer.xlsx")
    .then(() => {
        console.log(`Successfully generated data.`);
    })
    .catch((error) => {
        console.log(`Failed to generate data.\n`, String(error));
    });
```
npm package: @intavia/ui
Description: ui components for the [intavia web client](https://github.com/intavia/web). Based on [shadcn/ui](https://github.com/shadcn/ui).
Latest version: 0.2.2

# intavia ui components

ui components for the [intavia web client](https://github.com/intavia/web). Based on
[shadcn/ui](https://github.com/shadcn/ui).