open-index/open-npm huggingface dataset:
npm package: @mkdocs-ts/notebook
Description: Notebook plugins for mkdocs-ts.
Author: reinisch.gui@gmail.com
Latest version: 0.1.8

# @mkdocs-ts/notebook

Notebook plugins for mkdocs-ts.

## Links 


## Installation, Build, Test

To install the required dependencies:

```shell
yarn
```

---

To build for development:

```shell
yarn build:dev
```

To build for production:

```shell
yarn build:prod
```

---

To run tests:

```shell
yarn test
```

To measure test coverage:

```shell
yarn test-coverage
```

---

To generate code's documentation:

```shell
yarn doc
```
npm package: @mkeeorg/postcss-prefixer
Description: postcss plugin to prefix all css selector classes and ids
Latest version: 2.1.3

# postcss-prefixer
[![Build Status](https://travis-ci.org/marceloucker/postcss-prefixer.svg?branch=master)](https://travis-ci.org/marceloucker/postcss-prefixer) [![dependencies Status](https://david-dm.org/marceloucker/postcss-prefixer/status.svg)](https://david-dm.org/marceloucker/postcss-prefixer) [![devDependencies Status](https://david-dm.org/marceloucker/postcss-prefixer/dev-status.svg)](https://david-dm.org/marceloucker/postcss-prefixer?type=dev)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

[PostCSS]: https://github.com/postcss/postcss
[PostCSS Usage]: https://github.com/postcss/postcss#usage

A [PostCSS] plugin to prefix css selectors.

````css
/* source css file */

#selector { /* content */ }

.selector { /* content */ }

.selector:hover { /* content */ }

.selector__element { /* content */ }
````

````css
/* output css file prefixed with "prfx__" */

#prfx__selector { /* content */ }

.prfx__selector { /* content */ }

.prfx__selector:hover { /* content */ }

.prfx__selector__element { /* content */ }
````

## Usage

`npm i -D postcss postcss-prefixer` or `yarn add -D postcss postcss-prefixer`

create a `postcss.config.js` with:
```js
module.exports = {
  plugins: [
    require('postcss-prefixer')({ /* options */ })
  ]
}
```

> Refer to [PostCSS Usage] on how to use it with your preferred build tool.

#### Example
```js
const postcss = require('postcss');
const prefixer = require('postcss-prefixer');

const input = fs.readFileSync('path/to/file.css',  'utf-8');

const output = postcss([
  prefixer({
        prefix: 'prefix-',
        ignore: [ /selector-/, '.ignore', '#ignore' ]
    })
]).process(input);
```

#### Options
| Name           | Description                                |
|------------------|--------------------------------------------|
|`prefix` (string) | prefix value to be used                    |
|`ignore` (array)  | list of selectors to ignore, accepts regex |


## Credits

 Plugin based on [postcss-class-prefix](https://github.com/thompsongl/postcss-class-prefix) create by [thompsongl](https://github.com/thompsongl).
npm package: @mkeeorg/tsup
Description: [![npm version](https://badgen.net/npm/v/tsup)](https://npm.im/tsup) [![npm downloads](https://badgen.net/npm/dm/tsup)](https://npm.im/tsup)
Author: EGOIST
Latest version: 4.12.8

# tsup

[![npm version](https://badgen.net/npm/v/tsup)](https://npm.im/tsup) [![npm downloads](https://badgen.net/npm/dm/tsup)](https://npm.im/tsup)

Bundle your TypeScript library with no config, powered by [esbuild](https://github.com/evanw/esbuild).

## What can it bundle?

Anything that's supported by Node.js natively, namely `.js`, `.json`, `.mjs`. And TypeScript `.ts`, `.tsx`. [CSS support is experimental](#css-support).

## Install

Install it locally in your project folder:

```bash
npm i tsup -D
# Or Yarn
yarn add tsup --dev
```

You can also install it globally but it's not recommended.

## Usage

### Bundle files

```bash
tsup [...files]
```

Files are written into `./dist`.

You can bundle multiple files in one go:

```bash
tsup src/index.ts src/cli.ts
```

This will output `dist/index.js` and `dist/cli.js`.

Code splitting is enabled by default and supported in `cjs` and `esm` format.

## Documentation

For complete usages, please dive into the [docs](https://tsup.egoist.sh).

## License

MIT &copy; [EGOIST](https://github.com/sponsors/egoist)
npm package: @mkellsy/baf-client
Description: Discovers and publishes Big Ass Fan controls.
Author: Michael Kellsy
Latest version: 1.7.3

# Big Ass Fans Client

Discovers and publishes Big Ass Fan controls.

## API

[**API Documentation**](docs/README.md)

This client will automatically find and connect to any Big Ass Fan on your network. When devices are found they will be exposed via events.

```js
import * as Baf from "@mkellsy/baf-client";
import * as Interfaces from "@mkellsy/hap-device";

const location = Baf.connect();

location.on("Available", (devices: Interrface.Device[]): void => {
    // event fired when all devices are available
});

location.on("Update", (
    device: Interrface.Device,
    state: Interrface.DeviceState
): void => {
    // event fired when the device state updates
});
```

You can map devices once they become available.

```js
function onAvailable(devices: Interfaces.Device[]): void {
    for (const device of devices) {
        // interact with device
    }
};
```

This will send updates when states change.

```js
function onUpdate(
    device: Interfaces.Device,
    state: Interfaces.DeviceState
): void {
    // fetch device locally and update state
};
```

Once you have a reference to a device, you can control the device with the set function.

```js
device.set({
    state: "On",
    speed: 5,
    whoosh: "On",
    auto: "Off",
    eco: "On",
});
```
npm package: @mkellsy/event-emitter
Description: Strictly typed event emitter
Author: Michael Kellsy
Latest version: 1.5.3

# Event Emitter

Strictly typed event emitter.

## API

```js
import EventEmitter from "@mkellsy/event-emitter";

interface Payload {
    Headers: Headers;
    Body: string;
}

type Events = {
    Error: (error: Error) => void;
    Message: (body: string) => void;
    Response: (payload: Payload) => void;
}

const eventEmitter = new EventEmitter<Events>();
```

Synchronously calls each of the listeners registered for the event named `event`, in the order they were registered, passing the supplied arguments to each.

```js
eventEmitter.emit("Response", {
    Headers: new Headers(),
    Body: "string response",
});
```

Adds the `listener` function to the end of the listeners array for the event named `event`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `event`and `listener` will result in the `listener` being added, and called, multiple times.

```js
eventEmitter.on("Response", (payload) => {
    console.log(payload.Body);
});
```

Add the callback to the begining of the call stack.

```js
eventEmitter.on(
    "Response",
    (payload) => {
        console.log(payload.Body);
    },
    true,
);
```

Adds a **one-time** `listener` function for the event named `event`. The next time `event` is triggered, this listener is removed and then invoked.

```js
eventEmitter.once("Response", (payload) => {
    console.log(payload.Body);
});
```

Add the callback to the begining of the call stack.

```js
eventEmitter.once(
    "Response",
    (payload) => {
        console.log(payload.Body);
    },
    true,
);
```

Removes all listeners or the specified `listener` from the listener array for the event named `event`.

```js
const printResponse = (payload: Payload) => {
    console.log(payload.Body);
};

eventEmitter.on("Response", printResponse);
eventEmitter.off("Response", printResponse);
```

Removing a all listeners for a given `event``.

> It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams).

```js
eventEmitter.on("Response", (payload: Payload) => {
    console.log(payload.Body);
});

eventEmitter.off("Response");
```

Returns a copy of the array of listeners for the `event`.

```js
if (eventEmitter.listeners("Response").length > 0) {
    console.log("Response listeners exist");
}
```

Returns an array listing the events for which the emitter has registered listeners. The values in the array are of type `string` or `symbol`.

```js
if (eventEmitter.events().indexOf("Response") >= 0) {
    console.log("Response listeners exist");
}
```
npm package: @mkellsy/homebridge-haiku
Description: This is a plugin that exposes Big Ass Fans Haiku and i6 fans to Homebridge.
Author: Michael Kellsy
Latest version: 1.7.14

# Homebridge Haiku

This is a plugin that exposes Big Ass Fans Haiku and i6 fans to Homebridge.

## Getting Started

This plugin supports both the Homebridge UI and CLI. You can install and configure depending on your needs.

-   **[Getting Started](https://github.com/mkellsy/homebridge-haiku/blob/main/docs/ui.md)**
-   **[Getting Started (Manual)](https://github.com/mkellsy/homebridge-haiku/blob/main/docs/cli.md)**

## Storage

This plugin has its own storage folder. Each file is explained in the **[storage](https://github.com/mkellsy/homebridge-haiku/blob/main/docs/storage.md)** documentation.

## Support

I offer no support for this plugin, it is published only for personal use.
npm package: @mkellsy/homebridge-lutron
Description: This is a plugin that exposes Lutron LEAP devices to Homebridge.
Author: Michael Kellsy
Latest version: 1.7.21

# Homebridge Lutron

This is a plugin that exposes Lutron Caseta and Radio RA3 devices to Homebridge.

## Getting Started

This plugin supports both the Homebridge UI and CLI. You can install and configure depending on your needs.

-   **[Getting Started](https://github.com/mkellsy/homebridge-lutron/blob/main/docs/ui.md)**
-   **[Getting Started (Manual)](https://github.com/mkellsy/homebridge-lutron/blob/main/docs/cli.md)**

## Devices

This pulgin supports most of the devices available in Caseta and RA3. By default, only devices that are not nativally supported are exposed to Homebridge. These are the devices this plugin supports.

-   Pico Remotes (All types are aupported, including 4 button scene remotes)
-   Sunnata Keypads (All types, including both hybrid & non-hybrid)
-   Sunnata, Caseta & Maestro Dimmers
-   Sunnata, Caseta & Maestro Switches
-   Sunnata, Caseta & Maestro Fan Controllers
-   CCO Modules (Including Vive)
-   Switch Modules (Including Vive)
-   0-10v Dimmer Modules (Including Vive)
-   Triathlon, Sivoia & Serena Window Coverings
-   Lumaris LED Light Strips (Tunable White Tape Only)
-   Occupancy Sensors
-   Motion Sensors
-   Timeclocks

## Timeclocks

Timeclocks are a feature of RA3. They are programmed via the Lutron Designer. These are exposed as switches in Homebridge, and allow you to intergrate Lutron Timeclocks into HomeKit Automations.

## Keypads

Sunnata keypads are a feature of RA3. They behave similar to Pico remotes, but since they do not emit a release event, HomeKit double presses and long presses are not supported.

## Storage

This plugin has its own storage folder. Each file is explained in the **[storage](https://github.com/mkellsy/homebridge-lutron/blob/main/docs/storage.md)** documentation.

## Support

I offer no support for this plugin, it is published only for personal use.
npm package: @mkellsy/leap-client
Description: Publishes device states using the Lutron LEAP protocol
Author: Michael Kellsy
Latest version: 1.7.8

# Lutron LEAP Client

Publishes devices, states and actions to an event emitter using the Lutron LEAP protocol.

## API

[**API Documentation**](docs/README.md)

Pairing a processor or bridge

```js
import { pair } from "@mkellsy/leap-client";

console.log("Press the pairing button on the main processor or smart bridge");

await pair();
```

This will autopmatically discover processors. You will need to press the pairing button on your processor or bridge.

If you have multiple systems Caseta and RA3, you can pair other processors or bridges by runnging the pair command again, and pressing the pairing button on the other device.

> Systems that have more than one processor, such as RA3, you will only need to pair the first bridge. Devices programed for other bridges are vended from all processors.

After you have a processor or bridge paired, you can connect.

```js
import { connect } from "@mkellsy/leap-client";

const location = connect();

location.on("Available", (processor): void => {
    // event fired when all devices are available
});

location.on("Update", (device, state): void => {
    // event fired when the device state updates
});

location.on("Action", (device, button, action): void => {
    // event fired when a device action occurs
});
```

> The processor will cache slow changing data, to refresh the areas, zones, remotes, etc... you can set the refresh flag when calling connect `connect(true)`.

Fetch a list of processors.

```js
for (const id of location.processors) {
    // the id is the processor id string
}
```

Accessing the processor

```js
const processor = location.processor(id);
```

Pinging the a processor or bridge

```js
const response = await processor.ping();
```

Processor details.

```js
const system = await processor.system();
const project = await processor.project();
```

Fetch a list of areas

```js
const areas = await processor.areas();
```

Fetch all statuses

```js
const statuses = await processor.statuses();
```

Fetch zones in an area

```js
const zones = await processor.zones(area);
```

Fetch a zone or area status

```js
const areaStatus = await processor.status(area);
const zoneStatus = await processor.status(zone);
```

Fetch an area's controls

```js
const controls = await processor.controls(area);
```

Fetching ganged controls

```js
const controls = await processor.controls(area);

for (const gangedDevice of control.AssociatedGangedDevices) {
    const address = gangedDevice.Device;

    // the the address can be used to fetch the pico remote, sensor, keypad
}
```

Fetching a device

```js
const device = await processor.device(address);
```

Fetching a devices buttons

```js
const buttons = await processor.buttons(device);
```

Executing a command

```js
await processor.command(deviceOrZone, commandObject);
```

Fetching a discovered device

```js
const device = processor.devices.get(id);
```

Update the status of a device

```js
device.update(state);
```

Set a property(s) of a device

```js
device.set(state);
```