open-index/open-npm huggingface dataset:
npm package: @salernoelia/propa
Description: A lightweight framework with JSX support for vanilla TypeScript with Vite
Author: Elia Salerno
Latest version: 0.1.0

# Propa Framework

![Propa Logo](./docs/public/logo.png)

A lean and performant TypeScript framework for building reactive web applications with first-class WebAssembly and P5.js integration.

## Features

* **Zero Dependencies**: Pure TypeScript implementation for a minimal runtime footprint.
* **Smart Reactivity**: Efficient, batched DOM updates with automatic dependency tracking and subscription management.
* **WebAssembly Integration**: Seamless, type-safe loading and execution of WASM modules (e.g., Rust compiled to WASM).
* **P5.js Canvas**: A dedicated wrapper for embedding and managing p5.js sketches, perfect for creative coding and interactive visualizations.
* **Minimal Routing**: Hash-based routing with robust component lifecycle management for single-page applications.
* **JSX Support**: Compile-time JSX transformation into native DOM operations, offering a familiar declarative syntax without a virtual DOM.

## Installation

```bash
npm install @salernoelia/propa
```

## Quick Setup

To use `Propa` with JSX, configure your `vite.config.ts` and `tsconfig.json` files:

### `vite.config.ts`

```typescript
// vite.config.ts
import { defineConfig } from 'vite';

export default defineConfig({
  esbuild: {
    jsx: 'transform',
    jsxFactory: 'h',
    jsxFragment: 'Fragment',
  },
  // Other Vite configurations...
});
```

### `tsconfig.json`

```json
// tsconfig.json
{
  "compilerOptions": {
    "jsx": "react", // Or "react-jsx" if using new JSX transform
    "jsxFactory": "h",
    "jsxFragmentFactory": "Fragment",
    "lib": ["DOM", "ES2020"], // Ensure DOM library is included
    // ... other compiler options
  }
}
```
npm package: @salesduck/errors
Description: Extended errors
Author: dyrkow
Latest version: 1.1.0

# @salesduck/errors

Extended errors for your app

## Setup

Add to your project

```
yarn add @salesduck/errors
```

## Usage

Just import and create instance

```ts
import { ApplicationError } from '@salesduck/errors';

throw new ApplicationError();
```

Or with parameters

```ts
throw new ApplicationError({
    message: "User with email exists",
    code: 'USER_WITH_EMAIL_EXISTS',
    email: 'some@gmail.com' // Meta information, will be passed to stack trace
});
```

## Safety

Secure shipment to the customer

```ts
res.json(new ApplicationError({ message: 'Some error', code: 'USER_NOT_FOUND' }));
```

user will see this response

```json
{
    "message": "Some error",
    "code": "USER_NOT_FOUND"
}
```

## Logging

The error is easy to log

```ts
const error = new ApplicationError({
    cause: new ApplicationError({
        id: 'users'
    })
});

logger.error(error.toString());
```
In logs you see

```
 ApplicationError: Application Error
          at Object.<anonymous> (.../ApplicationError/spec.ts:35:30)
          at Object.asyncJestTest (.../node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:106:37)
          at .../node_modules/jest-jasmine2/build/queueRunner.js:45:12
          at new Promise (<anonymous>)
          at mapper (.../node_modules/jest-jasmine2/build/queueRunner.js:28:19)
          at .../node_modules/jest-jasmine2/build/queueRunner.js:75:41
          code UNKNOWN
      caused by ApplicationError: Application Error
          at Object.<anonymous> (.../ApplicationError/spec.ts:36:24)
          at Object.asyncJestTest (.../node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:106:37)
          at .../node_modules/jest-jasmine2/build/queueRunner.js:45:12
          at new Promise (<anonymous>)
          at mapper (.../node_modules/jest-jasmine2/build/queueRunner.js:28:19)
          at .../node_modules/jest-jasmine2/build/queueRunner.js:75:41
          by id "users"
          code UNKNOWN
```
npm package: @salesduck/format-json
Description: Transform log message to json format
Latest version: 4.0.0

# Format JSON

Converts log data into JSON format;

## Setup

Install package

```bash
yarn add @salesduck/format-json
```

## Usage

Just create and pass to transport

```ts
import { ConsoleTransport } from '@salesduck/transport-console';
import { JsonFormat } from '@salesduck/format-json';

const formatter = new JsonFormat();

const transport = new ConsoleTransport({ formatter });
```
npm package: @salesduck/format-logs
Description: Allows you to develop your own message format
Latest version: 4.0.0

# Format

Abstraction for representing log data in a specific format

## Setup

Install package

```bash
yarn add @salesduck/format
```

## Usage

You can develop a new format

You just need to create a new field where you can save the formatted
data that will be transferred to the transport

```ts
import { LogMessage, FormatterLogMessage, MESSAGE } from '@salesduck/symbols-logs';
import { Formatter } from '@salesduck/format-logs';

export class MyFormat extends Formatter {
    format(log: LogMessage): FormatterLogMessage {
        return {
            ...log,
            [MESSAGE]: log.message.toUpperCase()
        };
    }
}
```

You can specify log type

```ts
type MyLog = { orderId?: string }

export class MyFormat extends Formatter {
    format(log: LogMessage<MyLog>): FormatterLogMessage {
        return {
            ...log,
            [MESSAGE]: log.message.toUpperCase() + log.orderId
        };
    }
}
```
npm package: @salesduck/format-logstash
Description: Transform log message to logstash format
Latest version: 4.0.0

# Format Logstash

Converts log data into Logstash format

## Setup

Install package

```bash
yarn add @salesduck/format-logstash
```

## Usage

Just create and pass to transport

```ts
import { ConsoleTransport } from '@salesduck/transport-console';
import { LogstashFormat } from '@salesduck/format-logstash';

const formatter = new LogstashFormat();

const transport = new ConsoleTransport({ formatter });
```
npm package: @salesduck/format-simple
Description: Transform log to simple message
Latest version: 4.0.0

# Format Simple

Convert log data into simple console message

## Setup

Install package

```bash
yarn add @salesduck/format-simple
```

## Usage

Just create and pass to transport

```ts
import { ConsoleTransport } from '@salesduck/transport-console';
import { SimpleFormat } from '@salesduck/format-simple';

const formatter = new SimpleFormat();

const transport = new ConsoleTransport({ formatter });
```
npm package: @salesduck/iiko-cloud-api
Description: The library describes the available methods, request and response bodies, which allows you to make your own rest client based on it
Author: dyrkow
Latest version: 1.0.0

# iiko-cloud-api
The library describes the available methods, request and response bodies,<br> which allows you to make your own rest client based on it

> All types were generated automatically based on the [iiko open api schema](https://api-ru.iiko.services/api/1) using [generator](https://www.npmjs.com/package/openapi-typescript)

## Setup

Add package to your typescript package
```
yarn add @salesduck/iiko-cloud-api
```

## Usage

### With openapi-fetch

```ts
import createClient from "openapi-fetch";

import { paths } from "@salesduck/iiko-cloud-api";

const { get, post, put, patch, del } = createClient<paths>({
  baseUrl: "https://myserver.com/api/v1/",
  headers: {
    Authorization: `Bearer token`,
  },
});
```

### Directly

1. Import schemas and paths
```ts
import { paths, schemas } from "@salesduck/iiko-cloud-api";
```
 2. Define alias for types
```ts
 export type getRegionsIikoParameters = paths["/api/1/regions"]["post"]["parameters"];

export type getRegionsIikoBody = schemas["iikoTransport.PublicApi.Contracts.Address.RegionsRequest"];

export type getRegionsIikoResponse = schemas["iikoTransport.PublicApi.Contracts.Address.RegionsResponse"];
 ```


3. Use types in your code
```ts
const getRegionsIiko = async (
  parameters: getRegionsIikoParameters,
  data: getRegionsIikoBody
): Promise<getRegionsIikoResponse> => {
 // ... your code
};
```

 Run your code with type safety
```ts
getRegionsIiko({ header: { Authorization: "token" } }, { organizationIds: [] })
  .then((response) => {
    console.log(response.regions);
    console.log(response.correlationId);
  })
  .catch(console.error);
```
npm package: @salesduck/kkmserver-types
Description: Type definitions for kkmserver.ru
Author: dyrkow
Latest version: 0.6.4

# kkmserver-types

Define types for kkmserver.ru

## Setup

Add to your project
```sh
yarn add -D @salesduck/kkmserver-types
```

## Usage

```ts
// 1. Import types
import type { CloseShiftCommandRequest, CloseShiftCommandResponse } from '@salesduck/kkmserver-types';

// 2. Define method using types
const closeShift = async (CashierName: string, CashierVATIN: string): Promise<CloseShiftCommandResponse> => {
    const command: CloseShiftCommandRequest = {
        Command: 'CloseShift',
        NumDevice: 1,
        CashierName,
        CashierVATIN
    };

    const response = await fetch('kkmserver:port/Execute', { body: JSON.stringify(command) });
    const json = await response.json();

    return json;
};

// 3. Use type-safe method
closeShift('Cashier Name', '430601071197').then(console.log).catch(console.error);
```

## TODO

1. Write tests
2. Not all methods have types
npm package: @salesduck/logger
Description: Allows you to record and transmit messages to the consumer
Latest version: 4.1.0

# Logger

Implements a logger that allows you to record messages at various levels

## Setup

Install package

```bash
yarn add @salesduck/logger
```

## Usage

You can develop new logger with custom levels

```ts
import { Logger } from '@salesduck/logger';

enum MyLevels = {
    CRITICAL,
    FATAL
};

class MyLogger extends Logger {
    critical(log: Log): void {
        return this.log({ name: 'critical', priority: MyLevels.CRITICAL }, log);
    }

    fatal(log: Log): void {
        return this.log({ name: 'fatal', priority: MyLevels.FATAL }, log);
    }
}
```

Or extends existing

```ts
import { DefaultLogger } from '@salesduck/logger';

class MyLogger extends DefaultLogger {
    warning(log: Log): void {
        return this.log({ name: 'fatal', priority: 1 }, log);
    }
}
```

You can specify log type
```ts
type MyLog = {
    orderId?: string;
    userId?: number;
}

const logger = new DefaultLogger<MyLog>;
```
npm package: @salesduck/symbols-logs
Description: Common types and symbols
Latest version: 4.0.0

# Symbols

The package stores common types and symbols

## Setup

Install package

```bash
yarn add @salesduck/symbols
```

## Usage

```ts
import { MESSAGE, LEVEL, LogLevel } from '@salesduck/symbols';

const level: LogLevel = {
    name: 'info',
    priority: 2
};

const log: FormatterLog = {
    [LEVEL]: LogLevel.INFO,
    [MESSAGE]: 'Hello World!'
};
```
npm package: @salesduck/transport-console
Description: Allows you to send log data to standard output
Latest version: 4.1.0

# Transport Console

Allows you to send log data to standard output

## Setup

Install package

```bash
yarn add @salesduck/transport-console
```

## Usage

Just create and pass to logger

```ts
import { ConsoleTransport } from '@salesduck/transport-console';
import { DefaultLogger } from '@salesduck/logger';

const transport = new ConsoleTransport();

const logger = new DefaultLogger({ transports: [transport] });
```
npm package: @salesduck/transport-fetch
Description: Allows you to send log data over the network to the consumer
Latest version: 4.1.0

# Transport Fetch

Allows you to send log data over the network to the consumer

## Setup

Install package

```bash
yarn add @salesduck/transport-fetch
```

## Usage

Just create and pass to logger

```ts
import { FetchTransport } from '@salesduck/transport-fetch';
import { DefaultLogger } from '@salesduck/logger';

const transport = new FetchTransport({ url: 'https://somewebsite.com' });

const logger = new DefaultLogger({ transports: [transport] });
```
npm package: @salesduck/transport-logs
Description: Allows you to develop your own transport
Latest version: 4.1.0

# Transport

Abstraction for sending log data to consumers

## Setup

Install package

```bash
yarn add @salesduck/transport-logs
```

## Usage

You can develop a new transport

Any transport must implement the method `log`, which will send the field `MESSAGE` to the consumer

```ts
import { FormatterLogMessage, MESSAGE } from '@salesduck/symbols-logs';
import { Transport } from '@salesduck/transport-logs';

export class MyTransport extends Transport {
    log(message: FormatterLogMessage): void {
        // NOTE: Abstract native sdk, for example Android
        NativeSDK.captureLog(message[MESSAGE]);
    }
}
```
npm package: @salesflare/fullcontact-node-sdk
Description: NodeJS SDK for FullContact APIs
Author: FullContact
Latest version: 1.2.1

[![Build Status](https://travis-ci.org/fullcontact/fullcontact-node-sdk.svg?branch=master)](https://travis-ci.org/fullcontact/fullcontact-node-sdk)
[![npm version](https://badge.fury.io/js/fullcontact-node-sdk.svg)](https://badge.fury.io/js/fullcontact-node-sdk)
[![Node version](https://img.shields.io/node/v/fullcontact-node-sdk.svg?style=flat)](http://nodejs.org/download/)

*IMPORTANT: This SDK should be used server-side only. Using it in a browser would expose your API Key.*

### Installation

`npm install fullcontact-node-sdk --save`

### Documentation

API Documentation can be found at [https://docs.fullcontact.com/](https://docs.fullcontact.com/)

JSDocs can be found in [docs.md](docs.md)

### Usage

##### Configuration
---

```
var fullcontact = require('fullcontact-node-sdk')({
	apiKey: '<API Key>',
	userAgent: '<AppName/Version>',
  returnFullResponse: true | false // Optional: when true, will return the full HTTP response, when false just the body. Defaults to false
});
```

##### Enrich APIs
---
All Enrich APIs can be found under the `enrich` property on the client.

```
const myLookup = async () => {
    try {
      const res = await fullcontact.enrich.person.enrich({ email: 'bart@fullcontact.com' })

      //do something with res
    } catch(e) {
      //handle error
    }
}
```

#### Tests
---

To run tests:

`npm test`
npm package: @salesflare/joi
Description: Salesflare's Joi
Author: Salesflare
Latest version: 5.2.1

# joi

Salesflare's Joi

[![Build Status](https://travis-ci.org/Salesflare/joi.svg?branch=master)](https://travis-ci.org/Salesflare/joi)
[![Greenkeeper badge](https://badges.greenkeeper.io/Salesflare/joi.svg)](https://greenkeeper.io/)
npm package: @salesflare/joi-date-string
Description: Date string validation rule for Joi
Author: Salesflare team
Latest version: 2.1.0

# joi-date-string

Date string validation rule for Joi

[![Build Status](https://travis-ci.org/Salesflare/joi-date-string.svg?branch=master)](https://travis-ci.org/Salesflare/joi-phone-number)
[![Greenkeeper badge](https://badges.greenkeeper.io/Salesflare/joi-date-string.svg)](https://greenkeeper.io/)

## What

Allows you to do `Joi.dateString()`.

Uses `moment` for validation.

## How

```js
const myCustomJoi = Joi.extend(require('joi-date-string'));

myCustomJoi.dateString().validate('2018-10-05'); // pass

myCustomJoi.dateString().validate('05-10-2018'); // fail
myCustomJoi.dateString().validate(new Date()); // fail
myCustomJoi.dateString().validate('2018-08-02T12:09:04.378Z'); // fail
myCustomJoi.dateString().validate('1'); // fail
myCustomJoi.dateString().validate(1); // fail
```
npm package: @salesflare/optimus
Description: Transformer for Salesflare filter rules
Author: Salesflare team
Latest version: 7.2.7

# Optimus

[![Greenkeeper badge](https://badges.greenkeeper.io/Salesflare/optimus.svg)](https://greenkeeper.io/)

Transformer for Salesflare filter rules.

Available as a plain transform function, hapi 19 helper functions or client transformer.

The client build supports last 2 versions according to browserslist, see [https://browserl.ist/?q=last+2+versions](https://browserl.ist/?q=last+2+versions).
The client build is transformed through Babel but does not come with polyfills, for that we recommend [https://polyfill.io](https://polyfill.io).
This means we can use object spread in our transformer, which will be transformed, but something like Set you will have to polyfill yourself.

```js
const Optimus = require('@salesflare/optimus');
const Hapi = require('@hapi/hapi');

const server = new Hapi.Server();

const transformedFilter = Optimus.transform(oldFilter); // plain

// in a route config
{
    ...,
    // this changes the rules in request.payload to the transformed rules
    pre: [Optimus.pre.transformInPlace('payload')],
    ...
}
```

```html
<script src="./node_modules/@salesflare/optimus/dist/optimus.min.js"></script>
<script>
    var transformedFilter = Optimus.transform(oldFilter);
</script>
```
npm package: @salesflare/planer
Description: Remove reply quotations from emails
Author: Leighton Wallace
Latest version: 2.0.0

# planer

Remove reply quotations from emails.

At [lever](https://github.com/lever) we are into simple machines.
A planer removes some material to flatten out a rough surface, which seemed appropriate for a module that smooths out an email to extract the actual message.

This is essentially a javascript port of Mailgun's awesome [`talon`](https://github.com/mailgun/talon) python library.
Planer does not do signatures, though there is a [node port](https://github.com/lmtm/node-talon) of that part of talon.

## Installation

Use npm to install planer (add `-g` if you would like it to be global):

`npm install planer`

## Usage

_Important_: planer accepts an injected [Document](https://developer.mozilla.org/en-US/docs/Web/API/Document) object to perform html parsing.
You can use `window.document` in a browser, or something akin to `jsdom` on the server.
We use `jsdom` in our test suite.

To extract the message from a plain text email:

```js
planer = require('planer');

msgBody = "Reply!\n\nOn 15-Dec-2011, at 6:54 PM, Sean Carter <s.carter@example.com> wrote:\n> It's the ROC!\n>-Sean";
actualMessage = planer.extractFrom(msgBody, 'text/plain');
console.log(actualMessage); # "Reply!"
```

To extract the message from an html email:

```js
planer = require('planer');

msgBody = 'Reply!\n<div>\nOn 11-Apr-2011, at 6:54 PM, Bob &lt;bob@example.com&gt; wrote:\n</div>\n<blockquote>\n<div>\nTest\n</div>\n</blockquote>';
actualMessage = planer.extractFrom(msgBody, 'text/html', window.document);
console.log(actualMessage) # "<html><body>Reply!\n</body></html>";
```

## Contributing

Contributions are of course encouraged.
Keep in mind that the source is the `coffee` files; the `js` files in `/lib` are kept around for convenience.

Write tests for any new functionality.
Run `npm run compile` to compile the source into javascript files before submitting a pull request.

## MIT Licence

Copyright (c) 2015 Leighton Wallace

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
npm package: @salesflare/social-profile-url-parser
Description: Node library to parse social profile urls out of text.
Author: Salesflare Team
Latest version: 2.2.0

# social-profile-url-parser

Node library to parse social profile urls out of text.

```js
const SocialProfileUrlParser = require('@salesflare/social-profile-url-parser');

const result = SocialProfileUrlParser.parse(`
    slack   angellist   https://angel.co/slack
    SlackHQ twitter     https://twitter.com/SlackHQ
`)
result === [
    {
        type: 'angellist',
        username: 'slack',
        url: 'https://angel.co/slack'
    },
    {
        type: 'twitter',
        username: 'SlackHQ',
        url: 'https://twitter.com/SlackHQ'
    }
];
```
npm package: @salesforce-ux/a11y-components
Description: Sample Accessible React Components
Latest version: 1.1.7

# The Accessibility Patterns Components

[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coveralls][coveralls-badge]][coveralls]

This repository includes:
- Accessibility Patterns Components (found in the `src/Components/`)
- A demo site (in `src/Pages/`)
- Tests for the Accessibility Patterns Components (in `src/Components/__tests__/`)
- Compiled versions of the repo:
	- in ES5 (in `lib/`)
	- in ES6 (in `es/`)

This repo is published to [NPM](https://www.npmjs.com/package/@salesforce-ux/a11y-components).

## Quick Start
1. `npm install`
2. `npm start`
Visit: http://localhost:3000/

## Updating and Publishing the Components
1. Change the components in `src/`
2. `npm run build` to compile the code
3. Update the version number in `package.json`
4. `npm publish` to publish the package

## Testing the Components
Testing with Karma with Enzyme and Expect in a headless PhantomJS browser (for more on that go [here](https://github.com/insin/nwb/blob/master/docs/guides/ReactComponents.md#testing))

Also using [expect-element](https://github.com/mjackson/expect-element) to check DOM. Not sure if needed, but [expect-enzyme](https://github.com/PsychoLlama/expect-enzyme) is also installed.

To run the tests:
- `npm run test`
- continuously: `npm run test:watch`
- check coverage: `npm run test:coverage`

__Note__: there's inline styles in `ListboxOption.js`, `Menu.js`, and `Tooltip.js` that should eventually be removed.

[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
[build]: https://travis-ci.org/user/repo

[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[npm]: https://www.npmjs.org/package/npm-package

[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
[coveralls]: https://coveralls.io/github/user/repo