open-index/open-npm huggingface dataset:
npm package: @muvehealth/fixins
Description: Component library for Muvehealth
Author: Muve Health
Latest version: 1.1.17

# Muve Fixins
The front-end component library.

The Muve Fixins is a [Create React App][cra] built with
[styleguidist][styleguidist].

## Development Requirements
For development, you will need [Node.js][node] installed on your machine. A
[Current or LTS version of Node.js][lts] should do the trick and gets installed
through [homebrew][brew].

```sh
brew install node
```

This project prefers [yarn][yarn] over [npm][npm] as it's package manager. You
can also install [yarn][yarn] through [homebrew][brew].

```sh
brew install yarn
```

Yay package management.

## Development Setup
First, install the project dependencies:

```sh
yarn install
```

Normal [Create React App scripts][cra_scripts] are now available:

```sh
yarn flow  # Runs the Flow type checker
yarn lint  # Lints the project using eslint-config-muvehealth
yarn styleguide # Starts the development environment
yarn styleguide:build # Creates the production build
yarn test  # Runs the Jest test suite
```

View the [package.json](package.json) file for a list of dependencies and
configuration options. To learn more about a dependency use npm's `home` command:

```sh
npm home styled-system
```

<!-- Links -->
[brew]: https://brew.sh
[cra]: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md
[cra_scripts]: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts
[lts]: https://github.com/nodejs/Release#nodejs-release-working-group
[node]: https://nodejs.org
[npm]: https://www.npmjs.com/get-npm
[yarn]: https://yarnpkg.com/en/
[styleguidist]: https://github.com/styleguidist/react-styleguidist
npm package: @muvon/delegate
Description: DOM event delegation library
Author: Muvon Un Limited
Latest version: 0.1.0

# delegate

A lightweight, dependency-free DOM event delegation library.

## Installation

Install the library using npm:

```bash
npm install @muvon/delegate
```

## Usage

Here's a simple example of how to use the @muvon/delegate library:

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>@muvon/delegate Example</title>
</head>
<body>
  <button class="js-button">Click me</button>

  <script type="module">
    import delegate from '@muvon/delegate';

    const d = delegate(document.body);

    d.on('click', '.js-button', (event, element) => {
      console.log('Button clicked!', element);
    });
  </script>
</body>
</html>
```

## API

### delegate(node)

Creates a new Delegate instance for the specified DOM node.

- `node`: The DOM node to attach the delegate to (e.g., `document.body`).

Returns a `Delegate` instance.

### Delegate Methods

#### on(event, selector, callback, useCapture)

Binds a new event listener to elements matching the selector.

- `event`: The JavaScript event to listen for (e.g., 'click', 'keyup').
- `selector`: A valid CSS selector string.
- `callback`: The function to call when the event occurs. Receives `event` and `element` as arguments.
- `useCapture`: (Optional) Whether to use event capturing. Default is `false`.

Return `false` from the callback to prevent default behavior and stop propagation.

#### off(event, selector)

Removes event listeners matching the specified event and selector.

- `event`: The JavaScript event to remove.
- `selector`: The CSS selector string to match.

## Features

- Lightweight and dependency-free
- Supports event delegation for dynamically added elements
- Works with both bubbling and capturing phases
- Easy to use API

## Browser Support

This library supports all modern browsers and IE11+.

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
npm package: @muvon/event
Description: Simple event emitter library
Author: Muvon Un Limited
Latest version: 0.1.0

# event

A lightweight and flexible event emitter library for JavaScript applications.

## Installation

```bash
npm install @muvon/event
```

## Usage

```javascript
import EventEmitter from '@muvon/event';

// Subscribe to a specific event
const unsubscribe = EventEmitter.on('userLoggedIn', (event, data, source) => {
  console.log(`User ${data.username} logged in`);
});

// Emit an event
EventEmitter.send('userLoggedIn', { username: 'john_doe' });

// Unsubscribe from the event
unsubscribe();

// Subscribe to all events
EventEmitter.all((event, data, source) => {
  console.log(`Event ${event} was triggered`);
});
```

## API

### `on(event, callback)`

Subscribe to a specific event.

- `event`: String - The name of the event to subscribe to.
- `callback`: Function - The function to be called when the event is emitted.
- Returns: Function - A function that can be called to unsubscribe from the event.

### `off(callback)`

Unsubscribe from all events for a specific callback.

- `callback`: Function - The callback function to unsubscribe.

### `all(callback)`

Subscribe to all events.

- `callback`: Function - The function to be called for all events.
- Returns: Function - A function that can be called to unsubscribe from all events.

### `send(event, data, source)`

Emit an event.

- `event`: String - The name of the event to emit.
- `data`: Any - The data to pass to the event subscribers.
- `source`: Any - The source of the event (optional).

## Features

- Lightweight and dependency-free
- Support for event namespacing
- Easy subscription and unsubscription
- Ability to listen to all events

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
npm package: @muvon/viewport
Description: Viewport management library
Author: Muvon Un Limited
Latest version: 0.1.0

# viewport

A lightweight JavaScript library for smooth scrolling and viewport operations in the browser.

## Installation

```bash
npm install @muvon/viewport
```

## Usage

Import the functions you need from the library:

```javascript
import { scrollTo, scrollTop, isIn, width, height } from '@muvon/viewport';
```

### Smooth Scrolling

Scroll to a specific element:

```javascript
const element = document.querySelector('#some-element-id');
scrollTo(element);
```

Scroll to a specific offset from the top:

```javascript
scrollTop(500, 1000); // Scroll to 500px from top over 1000ms
```

### Viewport Detection

Check if an element is visible in the current viewport:

```javascript
const element = document.querySelector('#some-element-id');
if (isIn(element)) {
  console.log('Element is in viewport');
}
```

### Viewport Dimensions

Get the current viewport width and height:

```javascript
const viewportWidth = width();
const viewportHeight = height();
```

## API

### scrollTo(element)

Smoothly scrolls to the specified element with a duration of 1000ms.

- `element`: DOM element to scroll to

### scrollTop(to, duration)

Performs smooth scrolling to a specific offset from the top of the page.

- `to`: Number of pixels to scroll from the top
- `duration`: Duration of the scroll animation in milliseconds

### isIn(element)

Checks if the specified element is visible in the current viewport.

- `element`: DOM element to check
- Returns: `boolean`

### width()

Returns the current viewport width.

### height()

Returns the current viewport height.

## License

[MIT License](LICENSE)
npm package: @muvon/yate
Description: Yet Another Template Engine
Author: Muvon Un Limited
Latest version: 0.1.0

# YATE - Yet Another Template Engine

YATE is a lightweight and efficient template engine for JavaScript applications. It allows you to compile HTML-based templates into JavaScript functions for fast rendering.

## Features

- HTML-based template syntax
- Compiles templates to JavaScript functions
- Supports both browser and Node.js environments
- Asynchronous file processing
- Modular output for easy integration

## Installation

```bash
npm install yate
```

## Usage

### Node.js

```javascript
const yate = require('yate');
const compile = require('yate/compile');

// Compile templates
compile(['template1.html', 'template2.html'], true)
  .then((compiledTemplates) => {
    // Use compiled templates
    const templates = yate.pool(compiledTemplates);
    const result = templates.template1({ data: 'example' });
    console.log(result);
  })
  .catch((error) => {
    console.error('Compilation error:', error);
  });
```

### Browser

```html
<script src="yate.js"></script>
<script src="compiled-templates.js"></script>
<script>
  // Use compiled templates
  const result = window.templates.template1({ data: 'example' });
  console.log(result);
</script>
```

## API

### `compile(files, asModule)`

Compiles the specified template files.

- `files`: A single file path or an array of file paths to compile.
- `asModule`: Boolean indicating whether to output as a Node.js module (true) or browser-ready code (false).

Returns a Promise that resolves to the compiled template code.

### `yate.pool(templateList)`

Creates a pool of compiled templates.

- `templateList`: An object containing compiled template functions.

Returns an object with methods to render the compiled templates.

## Template Syntax

YATE uses HTML-based syntax for templates. Detailed documentation on the template syntax will be provided separately.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the [MIT License](LICENSE).