open-index/open-npm huggingface dataset:
npm package: @mischnic/babel-plugin-proton-hot
Description: Transform proton-native code to be hot reloadable
Author: Niklas Mischkulnig
Latest version: 1.0.1

# babel-plugin-proton-hot

Transforms proton-native code to be hot reloadable in an appropriate (webpack) environment. Used by [proton-hot-cli](https://github.com/mischnic/proton-hot-cli).

You can disable hot reloading (for both imported and exported components) on a per-file basis:
```js
// @proton-hot-disable
import ...
```
npm package: @mischnic/codemirror-preact
Description: Use https://github.com/codemirror/codemirror.next with Preact.
Latest version: 0.3.0

# codemirror-preact

Use https://github.com/codemirror/codemirror.next with Preact.

```js
import { Codemirror } from "@mischnic/codemirror-preact";

<Codemirror
	value={"<b>Hello!</b>"}
	extensions={extensions}
	onHandleUpdate={(view, t) => view.update(t)}
	onTextChange={(view) => console.log(view.state.doc.toString())}
	readOnly={false},
	...rest //, other props for the wrapper <div>
/>;
```

**`useMemo` the props to prevent unnecessary updates!**

-   Use `onHandleUpdate` if you want to efficiently prevent updates to the editor (apart from `readOnly`).
-   You can use `onTextChange` for a "controlled input" by updating the state that sets `value` (might be less performant).
npm package: @mischnic/dot-svg
Description: **[Demo](https://dot-wasm.now.sh/)**
Author: Niklas Mischkulnig
Latest version: 0.0.0

# dot-svg

**[Demo](https://dot-wasm.now.sh/)**

Render `.dot` Graphs into SVGs right in your browser (or in node without any native module). 

## Usage

The package exports a promise that resolves to a `dotToSVG` function. This is necessary because this function can only be called after the WASM module was loaded.

```js
const render = require("@mischnic/dot-svg");

render.then(function(dotToSVG) {
	try {
		const svg = dotToSVG(document.querySelector("textarea").value);
	} catch(e){
		console.error(e);
	}
	// ...
});
```

For examples, see [this node example](./demo-node.js) or [this more complete browser example](./demo-browser), which is also hosted as a demo at https://dot-wasm.now.sh/

<br>

For the most part this is a reduced version fo the unmaintained https://github.com/mdaines/viz.js .
npm package: @mischnic/json-sourcemap
Description: Generate positions for values in JSON and JSON5 strings
Latest version: 0.1.1

# @mischnic/json-sourcemap

Generate positions for values in JSON and JSON5 strings.

Inspired by and mostly API-compatible with https://github.com/epoberezkin/json-source-map.

## Usage

```ts
type Position = {
  line: number;
  column: number;
  pos: number;
};

type Mapping =
  | {
      value: Position;
      valueEnd: Position;
    }
  | {
      value: Position;
      valueEnd: Position;
      key?: Position;
      keyEnd?: Position;
    };

export function parse(
  json: string,
  reviver?: (key: any, value: any) => any,
  options?: {
    tabWidth?: number;
    dialect?: "JSON5" | "JSON";
  }
): {
  data: any;
  pointers: Record<string, Mapping>;
};
```

The default `tabWidth` is 4.

The `valueEnd` and `keyEnd` positions are exclusive. `line`, `column` and `pos` are 0-based.
npm package: @mischnic/parcel-namer-preserve-structure
Description: Tries to retain the existing folder structure of your source files.
Latest version: 0.2.0

# `@mischnic/parcel-namer-preserve-structure`

Tries to retain the existing folder structure of your source files.

## Usage:

Add a `.parcelrc` into your root directory (next to `package.json`):

```json
{
	"extends": "@parcel/config-default",
	"namers": ["@mischnic/parcel-namer-preserve-structure", "..."]
}
```
npm package: @mischnic/parcel-resolver-root
Description: Change what `/` and `~` resolve to.
Latest version: 0.4.2

# `@mischnic/parcel-resolver-root`

Change what `/` and `~` resolve to.

## Usage:

Add a `.parcelrc` into your root directory (next to `package.json`):

```json
{
	"extends": "@parcel/config-default",
	"resolvers": ["@mischnic/parcel-resolver-root", "..."]
}
```

You can set what `~` and `/` resolve to like this:

```json
{
	"private": true,
	"name": "example",
	"version": "0.0.0",
	"scripts": {
		"build": "parcel build src/index.js"
	},
	"devDependencies": {
		"@mischnic/parcel-resolver-root": "^0.4.0",
		"parcel": "^2.0.0"
	},
	"@mischnic/parcel-resolver-root": {
		"/": "./src/a",
		"~": "./src/b"
	}
}
```

`./src/a` is relative to package.json.