open-index/open-npm huggingface dataset:
npm package: @nattui/tailwind-theme-config
Description: Opinionated Tailwind theme configuration
Author: Natt Nguyen
Latest version: 0.0.1-alpha.14

# Tailwind theme config

Opinionated Tailwind theme configuration.

## Getting started

### Installation

```bash
npm install --save-dev @nattui/tailwind-theme-config
```

### Usage

`tailwind.config.ts`

```typescript
// Root font size 16px (default)
import {
  borderRadius,
  colors,
  fontFamily,
  fontSize,
  screens,
  spacing,
} from "@nattui/tailwind-theme-config"
import type { Config } from "tailwindcss"

const config: Config = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  darkMode: "class",
  theme: {
    borderRadius,
    colors,
    fontFamily,
    fontSize,
    fontWeight,
    screens,
    spacing,
  },
}

export default config
```

`tailwind.config.ts`

```typescript
// Root font size 10px
import {
  borderRadius10 as borderRadius,
  colors,
  fontFamily,
  fontSize10 as fontSize,
  screens,
  spacing10 as spacing,
} from "@nattui/tailwind-theme-config"
import type { Config } from "tailwindcss"

const config: Config = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  darkMode: "class",
  theme: {
    borderRadius,
    colors,
    fontFamily,
    fontSize,
    fontWeight,
    screens,
    spacing,
  },
}

export default config
```

### Root font size 10px

`apps/styles/global.css`

```css
html {
  font-size: 10px;
}
```

`.vscode/settings.json`

```json
{
  "tailwindCSS.rootFontSize": 10
}
```
npm package: @nattui/tailwind-tokenless
Description: Tailwind CSS without tokens
Author: Natt Nguyen
Latest version: 0.0.5

# Tailwind Tokenless

Tailwind CSS without tokens.

## Getting started

### Installation

```zsh
npm install @nattui/tailwind-tokenless
```

### Usage

#### Base 16

`styles/global.css`

```css
@import "tailwindcss";
@import "@nattui/tailwind-tokenless";
```

#### Base 10

`styles/global.css`

```css
@import "tailwindcss";
@import "@nattui/tailwind-tokenless/styles/10/index.css";

html {
  font-size: 10px;
}
```

`.vscode/settings.json`

```json
{
  "tailwindCSS.rootFontSize": 10
}
```

#### Colors

`styles/global.css`

```css
/* Order matters */
@import "tailwindcss";
@import "@nattui/tailwind-tokenless/styles/colors/reset.css";
@import "@nattui/tailwind-tokenless/styles/colors/gray/mauve.css";
@import "@nattui/tailwind-tokenless/styles/colors/gray/mauve-alpha.css";
@import "@nattui/tailwind-tokenless/styles/colors/primary/crimson.css";
```
npm package: @natuanorg/react-web-config
Description: react-native-config for web
Author: Nguyễn Anh Tuấn
Latest version: 1.1.0

# react-web-config

[![npm version](https://badge.fury.io/js/react-web-config.svg)](https://badge.fury.io/js/react-web-config)
[![Donate](https://img.shields.io/gratipay/user/tanhauhau.svg)](https://gratipay.com/~tanhauhau/)

[react-native-config](https://github.com/luggit/react-native-config) for Web.
Config variables for React Native apps *and React Native Web apps*

Module to expose config variables to your javascript code in React Native, supporting both iOS and Android *and web*.

### Overview

[react-native-web](https://github.com/necolas/react-native-web) is a project to bring [react-native](https://github.com/facebook/react-native) to the web. [Read more](https://github.com/necolas/react-native-web#why).

`react-native-web` lets us to write a single app that runs on mobile platform, ie iOS and Android, as well as browser, however, a typical `react-native` project will use libraries such as `react-native-config` that works perfectly on `react-native` but not on `react-native-web`. `react-web-config` allows you to continue using `react-native-config` seamlessly on the web by adding a few lines in your webpack config.

### Usage

Step 1 and 2 is what you have done if you follow the [guides](https://github.com/luggit/react-native-config#usage) from react-native-config.


1) Create a new file `.env` in the root of your React Native app:

```js
// .env

API_URL=https://myapi.com
GOOGLE_MAPS_API_KEY=abcdefgh
```

2) Then access variables defined there from your app:

```js
  // app.js
  import Config from 'react-native-config'
  Config.API_URL  // 'https://myapi.com'
```


However if you want to have Step 2 to work on a `react-native-web` project, you will need to configure the following in your `webpack.config.js`:

```diff
  // webpack.config.js

  const webpack = require('webpack');
+ const ReactWebConfig = require('react-web-config/lib/ReactWebConfig').ReactWebConfig;
+ const path = require('path');

+ const envFilePath = path.resolve(__dirname, '.env');

  module.exports = {
    ...
    plugins: [
      ...
+     /* define __REACT_WEB_CONFIG__ */
+     ReactWebConfig(envFilePath)
    ],
    resolve: [
      alias: [
        ...
+       /* set alias from react-native-config to react-web-config */
+       'react-native-config': 'react-web-config',
        'react-native': 'react-native-web'
      ]
    ]
  }
```

### License

MIT
npm package: @natuanorg/rn-custom-keyboard
Description: TODO
Author: Nguyen Anh Tuan
Latest version: 1.5.6

## react-native-natuan-custom-keyboard
Inspired by [lyxia/react-native-yusha-customKeyboard](https://github.com/lyxia/react-native-yusha-customKeyboard)

### Installation

```
yarn add react-native-natuan-custom-keyboard
react-native link react-native-natuan-custom-keyboard
```

### Usage
```javascript
import CustomKeyboard from 'react-native-natuan-custom-keyboard';

// TODO: What to do with the module?
CustomKeyboard;
```
npm package: @naturacosmeticos/api-linter
Description: A comprehensive API linter for swagger files following Natura Cosmeticos best practices
Author: Natura Cosméticos
Latest version: 1.4.6

# @naturacosmeticos/api-linter

[![Build Status](https://travis-ci.org/natura-cosmeticos/api-linter.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/api-linter) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) ![NPM](https://img.shields.io/npm/l/@naturacosmeticos/api-linter) [![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/api-linter/badge.svg)](https://snyk.io/test/github/natura-cosmeticos/api-linter)

A comprehensive API linter for swagger files using OpenAPI 3.0 following Natura Cosmeticos best practices

## Installation

```sh
# with npm
npm install --save @naturacosmeticos/api-linter

# with yarn
yarn add @naturacosmeticos/api-linter
```

## Usage

```javascript
const path = require('path');
const { validate } = require('@naturacosmeticos/api-linter');

const swaggerFile = path.join('path', 'to', 'swagger', 'file.yml');

/**
 * Optional rules object for disabling/enabling rules
 */
const options = {
  "must-contain-port": true,
  "must-contain-server-url": true,
  "no-singular-resource": true,
  "must-contain-version": true,
  "must-contain-domain-and-context": true,
  "resource-spinal-case": true,
  "no-custom-media-type": true,
  "must-contain-media-type-version": true
};

const promise = validate(swaggerFile, options);

promise.then(faults => {
  console.log(faults);
}).catch(err => {
  console.error(err);
});
```

## CLI

```sh
$ npm install -g @naturacosmeticos/api-linter

$ api-linter --help ## For options

$ api-linter --file=/path/to/swagger.yml ## Basic usage
```

## Rules

These are the rules checked by the linter

```javascript
{
  /**
   * Checks for missing port number on server url, defaults to `true`
   */
  "must-contain-port": boolean;
  /**
   * Checks for server url properties, defaults to true
   */
  "must-contain-server-url": boolean;
  /**
   * Allow resource names in singular, defaults to `true`
   */
  "no-singular-resource": boolean;
  /**
   * Checks for missing version number on server url, defaults to `true`
   */
  "must-contain-version": boolean;
  /**
   * Checks for missing `/domain/context` on server url, defaults to `true`
   */
  "must-contain-domain-and-context": boolean;
  /**
   * Checks for resources not using spinal case
   */
  "resource-spinal-case"?: boolean;
  /**
   * Checks for main media types defined in RFC 6838, defaults to `true`
   */
  "no-custom-media-type"?: boolean;
  /**
   * Checks for the presence of version parameter on vendor specific media types
   */
  "must-contain-media-type-version"?: boolean;
}
```
npm package: @naturacosmeticos/eslint-config-natura
Description: [ESLint](https://eslint.org/) rules to achieve better code, using Airbnb styles rules.
Author: Natura Cosméticos
Latest version: 2.0.2

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/693bdf5edeec45c6b410be4e7418eda8)](https://www.codacy.com/app/handrus_1938/eslint-config-natura?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=natura-cosmeticos/eslint-config-natura&amp;utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/natura-cosmeticos/eslint-config-natura.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/eslint-config-natura)
[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/eslint-config-natura/badge.svg?targetFile=package.json)](https://snyk.io/test/github/natura-cosmeticos/eslint-config-natura?targetFile=package.json)

# Natura ESLint Configuration

## What for

[ESLint](https://eslint.org/) rules to achieve better code, using Airbnb styles rules.

The Natura ESLint configuration extends the
[Airbnb](https://github.com/airbnb/javascript) configuration. While Airbnb
provides a decent style configuration it does not use all the available rules to
help enhance code quality like the following ones among others:

- [max-depth](https://eslint.org/docs/rules/max-depth)
- [max-lines-per-function](https://eslint.org/docs/rules/max-lines-per-function)
- [complexity](https://eslint.org/docs/rules/complexity)

### Why a new eslint-config?

This project helps achieve the `good maintainability` need, offering a default lint for all Node.js projects.

## How to use

To use this configuration install the package on your project using either npm or yarn:

```bash
npm i --save-dev '@naturacosmeticos/eslint-config-natura'

yarn add -D '@naturacosmeticos/eslint-config-natura'
```

We recommend you to install accepting only new patch releases (ex: `~2.0.0`), once new minor releases could add new rules that can broke your pipeline.

Add `@naturacosmeticos/natura` to the eslint `extends` option in the `.eslintrc` file:

```
{
  "env": {
    "es6": true,
    "mocha": true,
    "node": true
  },
  "extends": ["@naturacosmeticos/natura"],
  "parserOptions": {
    "ecmaVersion": 2017
  },
  "settings": {
    "import/resolver": {
      "node": {
        "paths": ["src", "test"]
      }
    }
  }
}
```

Airbnb-base is already included, no need to add it.

## How to contribute

You can contribute submitting [pull requests](https://github.com/natura-cosmeticos/eslint-config-natura/pulls).

### Setup

Run `yarn` or if your use npm `npm i`.
npm package: @naturacosmeticos/eslint-plugin-i18n-checker
Description: Helps you identify what locales keys are not included in your locales files
Author: Natura Cosméticos
Latest version: 1.0.1

# eslint-plugin-i18n-checker
[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/eslint-plugin-i18n-checker/badge.svg)](https://snyk.io/test/github/natura-cosmeticos/eslint-plugin-i18n-checker)
[![Build Status](https://api.travis-ci.org/natura-cosmeticos/eslint-plugin-i18n-checker.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/eslint-plugin-i18n-checker)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9ee01fcbab76443393f4e01d9711cf6f)](https://www.codacy.com/app/fabricioffc/eslint-plugin-i18n-checker?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=natura-cosmeticos/eslint-plugin-i18n-checker&amp;utm_campaign=Badge_Grade)

This eslint plugin helps you identify what locales keys are not included in your locales files.

Considering the follow scenario:

```
--locales/
----en-us.json
----es-pe.json
----pt-br.json
--src/
-----components/
-------header.js
```

In your `header.js` you have a call to your `i18n` function to get the localized value of the string *logout*: `translate('logout')`

The `i18n-checker` will verify if the `logout` is defined in each locale file you have.

# How to use

## Installation

```bash
npm i --save-dev '@naturacosmeticos/eslint-plugin-i18n-checker'

yarn add -D '@naturacosmeticos/eslint-plugin-i18n-checker'
```

## Configuration

In your eslintrc file you need to add `@naturacosmeticos/i18n-checker` in the `plugins` section.

### Options

You can configure the following options:

* **localesPath** - *string* - your locales relative path (*default is `/locales/`*)
* **messagesBasePath** - *string* - if your locales files has a base path you can pass it (*default is undefined*)
* **translationFunctionName** - *string* - the name of your translation function (*default is `translate`*)

Example:

```
"@naturacosmeticos/i18n-checker/path-in-locales": ['error',
  {
    localesPath: 'public/locales/',
    messagesBasePath: 'translations',
    translationFunctionName: 't'
  }
]
```

# Contributing

You can contribute submitting [pull requests](https://github.com/natura-cosmeticos/eslint-plugin-i18n-checker/pulls).

## Setup

Install the dependencies running `yarn` in the project folder.

## Lint

Just run `yarn lint`

## Tests

You can run the following commands:

* `yarn test`
* `yarn test:watch`
npm package: @naturacosmeticos/iris-nodejs-messenger-kafka
Description: Utilities to ease the communication with Apache Kafka
Author: Natura Cosméticos
Latest version: 1.1.0

# @naturacosmeticos/iris-nodejs-messenger-kafka

[![Build Status](https://travis-ci.org/natura-cosmeticos/iris-nodejs-messenger-kafka.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/iris-nodejs-messenger-kafka) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) ![NPM](https://img.shields.io/npm/l/@naturacosmeticos/api-linter)

Utilities to ease the communication with Apache Kafka

## Installation

```sh
# with npm
npm install --save @naturacosmeticos/iris-nodejs-messenger-kafka

# with yarn
yarn add @naturacosmeticos/iris-nodejs-messenger-kafka
```

## How to Use

Set the following environment variable beforehand

- `KAFKA_HOST` (host to specific kafka broker instance. Default: 0.0.0.0:9092)
- `KAFKA_CLIENT_ID` (an id to representing kafka instance. Default: Iris)
- `KAFKA_LOG_LEVEL` (log level of the log entry. Default: 0. Possible values: NOTHING=0, ERROR=1, WARN=2, INFO=4, DEBUG=5)
- `KAFKA_INITIAL_RETRY_TIME` (initial value used to calculate the retry in milliseconds. Default: 300)
- `KAFKA_RETRIES` (max number of retries per call. Default: 5)

To local docker test, following the commands on the root repository

```sh
docker-compose up -d
```

To release local test, we use [Verdaccio](https://github.com/verdaccio/verdaccio):

> After installing Verdaccio, on a terminal/console, start `verdaccio` process.<br/>
> At another terminal/console, run the command `yarn release:local`. This will publish the packages locally (http://localhost:4873), which may include the dependency required for other projects, e.g.: `yarn add @naturacosmeticos/iris-nodejs-messenger-kafka --registry=http://localhost:4873`.

To make it easier, we use [Conduktor](https://www.conduktor.io/) dashboard desktop client to manage Kafka instances.
npm package: @naturacosmeticos/node-base
Description: [![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/node-base/badge.svg)](https://snyk.io/test/github/natura-cosmeticos/node-base) [![Build Status](https://api.travis-ci.org/natura-cosmeticos/node-base.svg?branch=master)](https://travi
Author: Natura Cosméticos
Latest version: 3.1.2
npm package: @naturacosmeticos/node-base-koa
Description: [![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/node-base-koa/badge.svg)](https://snyk.io/test/github/natura-cosmeticos/node-base-koa) [![Build Status](https://api.travis-ci.org/natura-cosmeticos/node-base-koa.svg?branch=master)](h
Author: Natura Cosméticos
Latest version: 1.0.0

# node-base-koa
[![Known Vulnerabilities](https://snyk.io/test/github/natura-cosmeticos/node-base-koa/badge.svg)](https://snyk.io/test/github/natura-cosmeticos/node-base-koa)
[![Build Status](https://api.travis-ci.org/natura-cosmeticos/node-base-koa.svg?branch=master)](https://travis-ci.org/natura-cosmeticos/node-base-koa)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9ee01fcbab76443393f4e01d9711cf6f)](https://www.codacy.com/app/fabricioffc/node-base-koa?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=natura-cosmeticos/node-base-koa&amp;utm_campaign=Badge_Grade)

## What for

The Node Base offers an easier way to implement the coding practices recommended by Natura Architecture Team.

## What it's included

* Docker environment
* Isomorphic code, capable to run in local environment, lambda and kubernetes
* Logging using the structure recommended
  * Logger module supporting with correlation id, session id, etc
  * Logging middleware to log input and output data
  * TypeORM logger module using the logger module
* Tests helpers to improve productivity
* Abstraction to use code practices recommended
  * Base Command to create events based commands
  * Koa Handler to create the interface between your domain and the Koa
  * Environment variables from AWS SSM
* Debug mode for development and tests

## How to contribute

You can contribute submitting [pull requests](https://github.com/natura-cosmeticos/node-base-koa/pulls).


### Setup

Run `npm install`.

### Testing

Just run `npm test`.


### Lint

To verify if any lint rule was broken run: `npm run lint`.

### Update docs

Run `npm run docs` to generate a new documentation version.
npm package: @naturacosmeticos/oas3-tools
Description: Swagger-UI and API Rest Routing for Open API v3.
Author: Hugo Mercado
Latest version: 1.0.3

This is a forked project from https://github.com/apigee-127/swagger-tools with an attemp to add Open API 3 support. :)

## Warning
This package was generated due to slowness of PR merging in original repo [bug-hunters/oas3-tools](https://github.com/bug-hunters/oas3-tools).

We needed some extra features so we've forked temporarly.

We do not encourage using this package, cause it can be deleted overnight.

## Features included in this package (since fork)
* [feat(custom-middleware): added support of custom middlewares binding #47
](https://github.com/bug-hunters/oas3-tools/pull/47)

* [feat(entity-too-large): Fixed request entity too large #2
](https://github.com/paxet-io/oas3-tools/pull/2)
npm package: @natural-forms/input
Description: Unstyled input component with built-in validation.
Author: Douglas Moura
Latest version: 1.0.10

# Input

A input component with built-in validation that fires on the [`blur`](https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event)
event.

## Features

- Input validation that uses the [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) interface;
- Custom validation using a validator function passed to the `custom` prop;
- Applies a mask to the input using a custom function passed to the `mask` prop;
- Fires a `onError` event when the input is invalid;
- Fires a `onValidate` event when the input is valid;
- Input's `name` and `id` attributes are automatically generated when not provided;
- Compatible with any styling mwthod, as it exposes the HTML elements directly.

## Installation

Install with your preferred package manager:

```
npm install @natural-forms/input
```

or

```
yarn add @natural-forms/input
```

## Anatomy

```tsx
import * as InputPrimitive from '@natural-forms/input'

export default () => {
  <InputPrimitive.Root>
    <InputPrimitive.Label />
    <InputPrimitive.Input />
    <InputPrimitive.Error />
  </InputPrimitive.Root>
}
```

Please refer to the [tests](https://github.com/DouglasdeMoura/natural-forms/blob/main/packages/input/src/input.spec.tsx) file
in order to se a more complete example.

## API reference

### Root

The `div` element that should wrap the input, label and error components,
in order to provide the context that shared the `input`'s id with the `label`.

Accepts all props of a `div` element.

### Label

The `label` element that should be used to describe the input. Its text is used
to generate the `input`'s `id` and `name` attributes.

Accepts all props of a `label` element.

### Input

The `input` element that should be used to capture the user's input. If no `id`
is provided, "camelcasify" the `label`'s text and use it as the `id` attribute.
If no `name` is provided, use the `id` attribute.

Besides the props of the `input` element, it accepts the following props:

- `onError`: receives a function that is called when the input is invalid, which receives the current input value and the list of erros;
- `onValidate`: receives a function that is called when the input is valid;
- `custom`: receives a custom validation function that will be applied to the stack of validators;
- `mask`: receives a function that applies a mask to the input's value.

### Error

A `p` element that shows the first error message from the list of errors.

## Styling

When the data is invalid, all the elemente receive an attribute `data-invalid`
with the value `true`. Therefore, you will be able to style all the elements
like the example below:

```css
[data-invalid="true"] {
  color: red;
}
```

The error message container element has a `data-error` attribute. Therefore,
you can style it like the example below:

```css
[data-error] {
  color: red;
}
```
npm package: @natural-script/natural-script
Description: Natural Script programming
Latest version: 0.1.7

# NaturalScript

LLMを使うと自然言語でプログラミングができるが、プロンプトエンジニアリングには限界があるため、抽象化してフレームワークでプロンプトの生成をしたい。

## 目指すところ

* Markdownを記述することでLLMを扱うためのフレームワークを提供する
* Markdownのコードブロックで、プロンプトとロジックを指定できるようにする
* Markdownを使った文芸的プログラミング
* ロジックをTypeScriptで記述し、メタプロを駆使して、実際にLLMに埋め込むロジックに変換する
* 実際にどういう変換が有効か、実際に投げまくって検証できる仕組みを作る
* 試行錯誤をJSONに落とし込みたい

### モチベーション

プロンプトにプログラム的な仕組みを導入する試みがあるが、自然言語でそれを実現するのは、記述が高度になればなるほど面倒臭いのと、再現性に難があるので使い物にならない。

そもそもLLMの種類やバージョンが異なると、そのノウハウは使えなくなる可能性が極めて高い。

自然言語 + 形式言語というやり方で、記述が楽になったり、再現性を高めることが期待できるが、本当にそれで再現性が高まるとも限らない。

## 一番簡単な使い方

コードブロックでプロンプトを指定する。

````
```system
日本の経済低迷について教えてください。
```
````

### CLIとして使う

```sh
deno run --allow-net --allow-env --allow-read src/cli.ts examples/simple.md
```

## 変数

コードブロックで`:hoge`のようにコロンで始まる名前をつけた場合、変数として登録される。

````md
```:hoge
ほげ
```

```plaintext :fuga
ふが
```
````

これらは、それぞれ `hoge` と `fuga` という変数名で登録される。

変数は `{hoge}` `{fuga}` のような記法で展開が可能である。

````md
```system
{hoge}
{fuga}
```
````

## フロントマター

Markdownの先頭にフロントマターを記述できる。

````md
---
output: "result"
json:
  output: "base.json"
---

```system
日本の経済低迷について教えてください。
```
````

このようなMarkdownを実行した場合、LLMの実行結果が `base.json` の `result` という項目に出力される。

変数は Markdown の中で定義が可能だが、JSONファイルから読み込むことも可能である。

```json
{
  "hoge": "ほげ"
}
```

というような JSON ファイルが `base.json` という名前で存在する場合

````md
```system
{hoge}
```
````

の `{hoge}` は JSON ファイルから読み取った `ほげ` に展開される。

### デフォルト値

```yaml
json:
  output: "base.json"
  input: "base.json"
```

がデフォルト値として指定されている。