open-index/open-npm huggingface dataset:
npm package: @millcrest/polygonize-wasm
Description: JS/WASM library to compute isolines and isobands (using GDAL-style pixel-boundary polygonization)
Author: Ben Boothby
Latest version: 0.1.0

# @millcrest/polygonize-wasm

WASM library for computing isolines, isobands, and GDAL-style polygon rasterization.

## Installation

```bash
npm install @millcrest/polygonize-wasm
```

## Functions

### polygonize

Converts a raster grid to polygons where output boundaries align exactly with pixel edges (GDAL-style).

```js
import { polygonize } from '@millcrest/polygonize-wasm';

const data = [
  1, 1, 2,
  1, 2, 2,
  3, 3, 2,
];

const result = polygonize(data, 3, 3);
// Returns GeoJSON FeatureCollection with one polygon per unique value
```

### isobands

Computes filled contour polygons using marching squares interpolation.

```js
import { isobands } from '@millcrest/polygonize-wasm';

const data = [
  0, 0, 0, 0,
  0, 2, 2, 0,
  0, 2, 2, 0,
  0, 0, 0, 0,
];

const result = isobands(data, 4, 4, [0, 1.5, 3]);
```

Options:
```js
const options = {
  use_quad_tree: false, // default: true
  x_origin: 0,          // default: 0
  y_origin: 0,          // default: 0
  x_step: 1,            // default: 1
  y_step: 1,            // default: 1
};

const result = isobands(data, 4, 4, [0, 1.5, 3], options);
```

### isolines

Computes contour lines using marching squares interpolation.

```js
import { isolines } from '@millcrest/polygonize-wasm';

const result = isolines(data, 4, 4, [0, 1.5, 3]);
```

Same options as `isobands`.

## Build

```bash
make build
```

## Test

```bash
make test
```
npm package: @millenniumdb/graph-explorer
Description: GraphExplorer is a React component for rendering and interacting with graphs using [react-force-graph-2d](https://github.com/vasturiano/react-force-graph).
Latest version: 0.0.0-alpha.13

# GraphExplorer Component

GraphExplorer is a React component for rendering and interacting with graphs using [react-force-graph-2d](https://github.com/vasturiano/react-force-graph).

It provides a programmatic API (via ref) to interact with the graph (add/remove nodes, links, etc.).

## Installation (pnpm)

```sh
# peer dependencies
pnpm add @mantine/core
pnpm add @tabler/icons-react
pnpm add @millenniumdb/driver
```

```sh
# component
pnpm add @millenniumdb/graph-explorer
```

## Usage

Ensure you have Mantine's core and graph explorer styles imported in your app root:

```tsx
// in your app entry point
import '@mantine/core/styles.css';

import '@millenniumdb/graph-explorer/styles.css'
```

Use the component with MillenniumDB (assuming you are using MQL):

```typescript
import { MQLGraphExplorer, type MDBGraphData } from "@millenniumdb/graph-explorer";
import { driver } from "@millenniumdb/driver";


const data: MDBGraphData = {
  nodes: [{ id: "1", label: "Node 1" }, { id: "2", label: "Node 2" }],
  links: [{ source: "1", target: "2" }],
};

const driverInstance = driver("http://localhost:1234");

export default function App() {
  return (
    <MQLGraphExplorer
      initialGraphData={data}
      driver={driverInstance}
      style={{ width: 500, height: 500 }}
      // other props...
    />
  );
}
```

## Props

| Prop               | Type            | Description                                      |
| ------------------ | --------------- | ------------------------------------------------ |
| `ref`              | `GraphAPI`      | GraphAPI instance. Receives the initialGraphData |
| `driver`           | `Driver`        | MillenniumDB driver instance                     |
| `initialGraphData` | `MDBGraphData`  | Initial nodes and links                          |
| `style`            | `CSSProperties` | Graph container style                            |
| `className`        | `string`        | Graph container classes                          |
| `initialSettings`  | `GraphSettings` | Graph explorer settings                          |

## The base GraphExplorer component

We also expose the base graph explorer (which is not connected to a MillenniumDB driver) for debugging purposes. If a MDBGraphExplorer-like interface is provided, it will work as intended.