open-index/open-npm huggingface dataset:
npm package: @meodemsao/schedule
Description: Nest - modern, fast, powerful node.js web framework (@schedule)
Author: Kamil Mysliwiec
Latest version: 4.1.5

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /><a>
</p>

[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest

  <p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
    <p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
  <a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
  <a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

Schedule module for [Nest](https://github.com/nestjs/nest) based on the [cron](https://github.com/kelektiv/node-cron) package.

## Installation

```bash
$ npm install --save @nestjs/schedule
```

## Quick Start

[Overview & Tutorial](https://docs.nestjs.com/techniques/task-scheduling)

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).
npm package: @meogic/knex
Description: A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
Author: Tim Griesser
Latest version: 2.4.2-mod.5

# [knex.js](https://knex.github.io/documentation/)

[![npm version](http://img.shields.io/npm/v/knex.svg)](https://npmjs.org/package/knex)
[![npm downloads](https://img.shields.io/npm/dm/knex.svg)](https://npmjs.org/package/knex)
![](https://github.com/knex/knex/workflows/CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/knex/knex/badge.svg?branch=master)](https://coveralls.io/r/knex/knex?branch=master)
[![Dependencies Status](https://img.shields.io/librariesio/github/knex/knex)](https://libraries.io/npm/knex)
[![Gitter chat](https://badges.gitter.im/tgriesser/knex.svg)](https://gitter.im/tgriesser/knex)
[![Language Grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/knex/knex.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/knex/knex/context:javascript)


remove all db support but MySQL, SQLite3
npm package: @meogic/lexical-headless
Description: This package contains Headless helpers and functionality for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-headless`

This package allows you to interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its
main features like editor.update(), editor.registerNodeTransform(), editor.registerUpdateListener()
to create, update or traverse state.

Install `@meogic/lexical-headless`:

```
npm install --save @meogic/lexical-headless
```

```js
const { createHeadlessEditor } = require('@meogic/lexical-headless');

const editor = createHeadlessEditor({
  nodes: [],
  onError: () => {},
});

editor.update(() => {
  $getRoot().append(
    $createParagraphNode().append(
      $createTextNode('Hello world')
    )
  )
});
```

Any plugins that do not rely on DOM could also be used. Here's an example of how
you can convert lexical editor state to markdown on server:
```js
const { createHeadlessEditor } = require('@meogic/lexical-headless');
const { $convertToMarkdownString, TRANSFORMERS } = require('@meogic/lexical-markdown');

app.get('article/:id/markdown', await (req, res) => {
  const editor = createHeadlessEditor({
    nodes: [],
    onError: () => {},
  });

  const articleEditorStateJSON = await loadArticleBody(req.query.id);
  editor.setEditorState(editor.parseEditorState(articleEditorStateJSON));  

  editor.update(() => {
    const markdown = $convertToMarkdownString(TRANSFORMERS);
    res.send(markdown);
  });
});

```
npm package: @meogic/lexical-history
Description: This package contains selection history helpers for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-history`

This package contains history helpers for Lexical.

### Methods

#### `registerHistory`

Registers necessary listeners to manage undo/redo history stack and related editor commands. It returns `unregister` callback that cleans up all listeners and should be called on editor unmount.

```js
function registerHistory(
  editor: LexicalEditor,
  externalHistoryState: HistoryState,
  delay: number,
): () => void
```

### Commands

History package handles `UNDO_COMMAND`, `REDO_COMMAND` and `CLEAR_HISTORY_COMMAND` commands. It also triggers `CAN_UNDO_COMMAND` and `CAN_REDO_COMMAND` commands when history state is changed. These commands could be used to work with history state:

```jsx
import {UNDO_COMMAND, REDO_COMMAND} from '@meogic/lexical';

<Toolbar>
  <Button onClick={() => editor.dispatchCommand(UNDO_COMMAND)}>Undo</Button>
  <Button onClick={() => editor.dispatchCommand(REDO_COMMAND)}>Redo</Button>
</Toolbar>;
```
npm package: @meogic/lexical-html
Description: This package contains HTML helpers and functionality for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-html`

# HTML
This package exports utility functions for converting `Lexical` -> `HTML` and `HTML` -> `Lexical`. These same functions are also used in the `lexical-clipboard` package for copy and paste.

[Full documentation can be found here.](https://lexical.dev/docs/concepts/serialization)

### Exporting
```js
// When converting to HTML you can pass in a selection object to narrow it
// down to a certain part of the editor's contents.
const htmlString = $generateHtmlFromNodes(editor, selection | null);
```

### Importing
First we need to parse the HTML string into a DOM instance.
```js
// In the browser you can use the native DOMParser API to parse the HTML string.
const parser = new DOMParser();
const dom = parser.parseFromString(htmlString, textHtmlMimeType);

// In a headless environment you can use a package such as JSDom to parse the HTML string.
const dom = new JSDOM(htmlString);
```
And once you have the DOM instance.
```js
const nodes = $generateNodesFromDOM(editor, dom);

// Once you have the lexical nodes you can initialize an editor instance with the parsed nodes.
const editor = createEditor({ ...config, nodes });

// Or insert them at a selection.
$insertNodes(nodes);
```
npm package: @meogic/lexical-markdown
Description: This package contains Markdown helpers and functionality for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-markdown`

This package contains markdown helpers for Lexical: import, export and shortcuts.

## Import and export
```js
import {
  $convertFromMarkdownString,
  $convertToMarkdownString,
  TRANSFORMERS,
} from '@meogic/lexical-markdown';

editor.update(() => {
  const markdown = $convertToMarkdownString(TRANSFORMERS);
  ...
});

editor.update(() => {
  $convertFromMarkdownString(markdown, TRANSFORMERS);
});
```

It can also be used for initializing editor's state from markdown string. Here's an example with react `<RichTextPlugin>`
```jsx
<LexicalComposer initialConfig={{
  editorState: () => $convertFromMarkdownString(markdown, TRANSFORMERS)
}}>
  <RichTextPlugin />
</LexicalComposer>
```

## Shortcuts
Can use `<MarkdownShortcutPlugin>` if using React
```jsx
import { TRANSFORMERS } from '@meogic/lexical-markdown';
import {MarkdownShortcutPlugin} from '@meogic/lexical-react/LexicalMarkdownShortcutPlugin';

<LexicalComposer>
  <MarkdownShortcutPlugin transformers={TRANSFORMERS} />
</LexicalComposer>
```

Or `registerMarkdownShortcuts` to register it manually:
```js
import {
  registerMarkdownShortcuts,
  TRANSFORMERS,
} from '@meogic/lexical-markdown';

const editor = createEditor(...);
registerMarkdownShortcuts(editor, TRANSFORMERS);
```

## Transformers
Markdown functionality relies on transformers configuration. It's an array of objects that define how certain text or nodes
are processed during import, export or while typing. `@meogic/lexical-markdown` package provides set of built-in transformers:
```js
// Element transformers
UNORDERED_LIST
CODE
HEADING
ORDERED_LIST
QUOTE

// Text format transformers
BOLD_ITALIC_STAR
BOLD_ITALIC_UNDERSCORE
BOLD_STAR
BOLD_UNDERSCORE
INLINE_CODE
ITALIC_STAR
ITALIC_UNDERSCORE
STRIKETHROUGH

// Text match transformers
LINK
```

And bundles of commonly used transformers:
- `TRANSFORMERS` - all built-in transformers
- `ELEMENT_TRANSFORMERS` - all built-in element transformers
- `TEXT_FORMAT_TRANSFORMERS` - all built-in text format transformers
- `TEXT_MATCH_TRANSFORMERS` - all built-in text match transformers

Transformers are explicitly passed to markdown API allowing application-specific subset of markdown or custom transformers.

There're three types of transformers:

- **Element transformer** handles top level elements (lists, headings, quotes, tables or code blocks)
- **Text format transformer** applies text range formats defined in `TextFormatType` (bold, italic, underline, strikethrough, code, subscript and superscript)
- **Text match transformer** relies on matching leaf text node content

See `MarkdownTransformers.js` for transformer implementation examples
npm package: @meogic/lexical-plain-text
Description: This package contains plain text helpers for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-plain-text`

This package provides a starting point for Lexical users by registering listeners for a set of basic commands that cover simple text-editing behavior such as entering text, deleting characters, copy + paste, or changing the selection with arrow keys.

You can use this package as a starting point, and then add additional command listeners to customize the functionality of your editor. If you want to add rich-text features, such as headings, blockquotes, or formatted text, you may want to consider using [@meogic/lexical-rich-text](https://lexical.dev/docs/packages/lexical-rich-text) instead.
npm package: @meogic/lexical-react
Description: This package provides Lexical components and hooks for React applications.
Latest version: 0.11.1-mod8

# `@meogic/lexical-react`

This package provides a set of components and hooks for Lexical that allow for text editing in React applications.

## Getting started

Install `lexical` and `@meogic/lexical-react`:

```
npm install --save lexical @meogic/lexical-react
```

Below is an example of a basic plain text editor using `lexical` and `@meogic/lexical-react` ([try it yourself](https://codesandbox.io/s/lexical-plain-text-example-g932e)).

```jsx
import {$getRoot, $getSelection} from '@meogic/lexical';
import {useEffect} from 'react';

import {LexicalComposer} from '@meogic/lexical-react/LexicalComposer';
import {PlainTextPlugin} from '@meogic/lexical-react/LexicalPlainTextPlugin';
import {ContentEditable} from '@meogic/lexical-react/LexicalContentEditable';
import {HistoryPlugin} from '@meogic/lexical-react/LexicalHistoryPlugin';
import {OnChangePlugin} from '@meogic/lexical-react/LexicalOnChangePlugin';
import {useLexicalComposerContext} from '@meogic/lexical-react/LexicalComposerContext';

const theme = {
  // Theme styling goes here
  ...
}

// When the editor changes, you can get notified via the
// LexicalOnChangePlugin!
function onChange(editorState) {
  editorState.read(() => {
    // Read the contents of the EditorState here.
    const root = $getRoot();
    const selection = $getSelection();

    console.log(root, selection);
  });
}

// Lexical React plugins are React components, which makes them
// highly composable. Furthermore, you can lazy load plugins if
// desired, so you don't pay the cost for plugins until you
// actually use them.
function MyCustomAutoFocusPlugin() {
  const [editor] = useLexicalComposerContext();

  

useEffect(() => {
    // Focus the editor when the effect fires!
    editor.focus();
  }, [editor]);

  return null;
}

// Catch any errors that occur during Lexical updates and log them
// or throw them as needed. If you don't throw them, Lexical will
// try to recover gracefully without losing user data.
function onError(error) {
  throw error;
}

function Editor() {
  const initialConfig = {
    namespace: 'MyEditor',
    theme,
    onError,
  };

return (
    <LexicalComposer initialConfig={initialConfig}>
      <PlainTextPlugin
        contentEditable={<ContentEditable />}
        placeholder={<div>Enter some text...</div>}
      />
      <OnChangePlugin onChange={onChange} />
      <HistoryPlugin />
      <MyCustomAutoFocusPlugin />
    </LexicalComposer>
  );
}
```
npm package: @meogic/lexical-rich-text
Description: This package contains rich text helpers for Lexical.
Latest version: 0.11.1-mod8

# `@meogic/lexical-rich-text`

This package provides a starting point for Lexical users by registering listeners for a set of basic commands that cover simple text-editing behavior such as entering text, deleting characters, copy + paste, or changing the selection with arrow keys. It also provides default behavior for rich text features, such as headings, formatted, text and blockquotes.

You can use this package as a starting point, and then add additional command listeners to customize the functionality of your editor. If you don't want or need rich text functionality, you may want to consider using [@meogic/lexical-plain-text](https://lexical.dev/docs/packages/lexical-plain-text) instead.
npm package: @meogic/lexical-selection
Description: This package contains utilities and helpers for handling Lexical selection.
Latest version: 0.11.1-mod8

# `@meogic/lexical-selection`

This package contains selection helpers for Lexical.

### Methods

#### `getStyleObjectFromCSS`

Given a CSS string, returns an object from the style cache.

```ts
export function getStyleObjectFromCSS(css: string): {
  [key: string]: string;
} | null;
```

#### `$patchStyleText`

Applies the provided styles to the TextNodes in the provided Selection. Key names in the patch argument should be
the valid CSS properties (i.e., kebab-case).

```ts
export function $patchStyleText(
  selection: RangeSelection | GridSelection,
  patch: {
    [key: string]: string;
  },
): void;
```

#### `$getSelectionStyleValueForProperty`

Given a selection and a valid CSS property name, returns the current value of that property for TextNodes in the Selection, if set. If not set, it returns the defaultValue. If all TextNodes do not have the same value, it returns an empty string.

```ts
export function $getSelectionStyleValueForProperty(
  selection: RangeSelection,
  styleProperty: string,
  defaultValue: string,
): string;
```

#### `$moveCaretSelection`

Moves the selection according to the arguments.

```ts
export function $moveCaretSelection(
  selection: RangeSelection,
  isHoldingShift: boolean,
  isBackward: boolean,
  granularity: 'character' | 'word' | 'lineboundary',
): void;
```

#### `$isParentElementRTL`

Returns true if the parent of the Selection anchor node is in Right-To-Left mode, false if not.

```ts
export function $isParentElementRTL(selection: RangeSelection): boolean;
```

#### `$moveCharacter`

Wraps $moveCaretSelection, using character granularity and accounting for RTL mode.

```ts
export function $moveCharacter(
  selection: RangeSelection,
  isHoldingShift: boolean,
  isBackward: boolean,
): void;
```

#### `$selectAll`

Expands the current Selection to cover all of the content in the editor.

```ts
export function $selectAll(selection: RangeSelection): void;
```

#### `$setBlocksType`

Converts all nodes in the selection that are of one block type to another specified by parameter

```ts
export function $setBlocksType(
  selection: RangeSelection,
  createElement: () => ElementNode,
): void;
```

#### `$isAtNodeEnd`

Returns true if the provided point offset is in the last possible position.

```ts
export function $isAtNodeEnd(point: Point): boolean;
```

#### `$shouldOverrideDefaultCharacterSelection`

Returns true if default character selection should be overridden, false if not. Used with DecoratorNodes

```ts
export function $shouldOverrideDefaultCharacterSelection(
  selection: RangeSelection,
  isBackward: boolean,
): boolean;
```
npm package: @meogic/lexical-vue
Description: An extensible Vue 3 web text-editor based on Lexical.
Author: Robert Soriano
Latest version: 0.11.1-mod7

# Lexical Vue

An extensible Vue 3 web text-editor based on [Lexical](https://github.com/facebook/lexical).

For documentation and more information about Lexical, be sure to visit the [Lexical website](https://lexical.dev/).

Demo: https://lexical-vue-playground.vercel.app

## Getting started with Vue

> Requires Vue >= 3.2.0.

Install `lexical` and `lexical-vue`:

```bash
npm install lexical lexical-vue # or pnpm or yarn
```

Below is an example of a basic plain text editor using `lexical` and `lexical-vue`.

```vue
<script setup lang="ts">
import { $getRoot, $getSelection } from '@meogic/lexical'
import { ref } from 'vue'

import {
  LexicalAutoFocusPlugin,
  LexicalComposer,
  LexicalContentEditable,
  LexicalHistoryPlugin,
  LexicalOnChangePlugin,
  LexicalPlainTextPlugin,
} from 'lexical-vue'

const config = {
  editable: true,
  theme: {
    // Theme styling goes here
  },
}

function onError(error) {
  throw error
}

// When the editor changes, you can get notified via the
// LexicalOnChangePlugin!
function onChange(editorState) {
  editorState.read(() => {
    // Read the contents of the EditorState here.
    const root = $getRoot()
    const selection = $getSelection()

    console.log(root, selection)
  })
}
</script>

<template>
  <LexicalComposer :initial-config="config" @error="onError">
    <LexicalPlainTextPlugin>
      <template #contentEditable>
        <LexicalContentEditable />
      </template>
      <template #placeholder>
        <div>
          Enter some text...
        </div>
      </template>
    </LexicalPlainTextPlugin>
    <LexicalOnChangePlugin @change="onChange" />
    <LexicalHistoryPlugin />
    <LexicalAutoFocusPlugin />
  </LexicalComposer>
</template>
```

For a more complex example, check the [rich text editor playground](https://github.com/wobsoriano/lexical-vue/tree/master/packages/playground).

### Creating custom Lexical nodes with Vue

- [Creating custom decorator nodes](https://lexical-vue.vercel.app/docs/custom.html)

## Contributing

1. Create a new branch
   - `git checkout -b my-new-branch`
2. Commit your changes
   - `git commit -a -m 'Description of the changes'`
     - There are many ways of doing this and this is just a suggestion
3. Push your branch to GitHub
   - `git push origin my-new-branch`
4. Go to the repository page in GitHub and click on "Compare & pull request"
   - The [GitHub CLI](https://cli.github.com/manual/gh_pr_create) allows you to skip the web interface for this step (and much more)

## Documentation

https://lexical-vue.vercel.app

## Credits

- [Lexical](https://github.com/facebook/lexical)
- [Vite](https://vitejs.dev/)
- [Vercel](https://vercel.com/)

## License

MIT
npm package: @meojs/cfgs
Description: Meo's development configurations.
Author: SmallMain
Latest version: 2.0.64

<!-- <p align="center">
<img src="https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg" style="width:100px;" />
</p> -->

<h1 align="center">
@meojs/cfgs
</h1>

<p align="center">
Meo's development configurations.
</p>

<!-- <br>
<p align="center">
<a href="https://unocss.dev/">Documentation</a> |
<a href="https://unocss.dev/play/">Playground</a>
</p>
<br> -->

<br>
<p align="center">
<span>English</span> |
<a href="./README_zh-CN.md">简体中文</a>
</p>

## Introduction

```bash
npm i -D @meojs/cfgs
```

### TSConfig

```jsonc
{
  "extends": "@meojs/cfgs/ts/general.json",
  "include": ["src"],
}
```

- `@meojs/cfgs/ts/base.json` - Configuration with rules only.
- `@meojs/cfgs/ts/general.json` - Common configuration for ES modules.
- `@meojs/cfgs/ts/cocos.json` - Configuration for Cocos Creator projects.
- `@meojs/cfgs/ts/node.json` - Configuration for NodeJS projects.

### ESLint Config

```js
import { eslint } from "@xenon.js/configs";

export default eslint.config({
  // Whether to add `.gitignore` ignore, by default uses `cwd()` to find the `.gitignore` file path.
  gitignore?: boolean | string,
  // Ignore all `*.config` configuration files, such as `eslint.config.js`, default is `true`.
  ignoreConfigFiles?: boolean,
  // JSDoc inspection level, default is `loose`.
  jsdoc?: "none" | "loose" | "strict",
  // Include NodeJS related rules, default is `strict`.
  nodejs?: "none" | "loose" | "strict",
  // Include Web related rules, default is `true`.
  web?: boolean,
  // Additional allowed JSDoc tags.
  jsdocTags?: string[],
  // Whether to be compatible with reactive libraries, default is `true`.
  reactive?: boolean,
});
```

### Prettier Config

```js
import { prettier } from '@xenon.js/configs';

export default prettier.config({
  // Whether to use Tailwind CSS, default `false`.
  tailwindcss?: boolean;
});
```

### Editor Config

Please manually copy the files from the `editorconfig` directory.

### Repo Template

Please manually copy the files from the `repo` directory.

<!-- ## Documentation

Read the [documentation](https://unocss.dev/) for more details. -->

<!-- ## Contributing

To get started contributing to the project, see the [Contributing Guide](./CONTRIBUTING.md). -->

## Contributing

### Points to Consider

- After updating .editorconfig, the references in @meojs/utc need to be synchronized updated.

### Build & Publish

- Run `pnpm run build` to build the project.
- Run `pnpm run publish:version` to build and push a new version.

## License

[MIT @ SmallMain](./LICENSE)
npm package: @meojs/pkg-utils
Description: Utilities for handling projects and libraries themselves.
Author: SmallMain
Latest version: 1.0.40

<!-- <p align="center">
<img src="https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg" style="width:100px;" />
</p> -->

<h1 align="center">
@meojs/pkg-utils
</h1>

<p align="center">
Utilities for handling projects and libraries themselves.
</p>

<!-- <br>
<p align="center">
<a href="https://unocss.dev/">Documentation</a> |
<a href="https://unocss.dev/play/">Playground</a>
</p>
<br> -->

<br>
<p align="center">
<span>English</span> |
<a href="./README_zh-CN.md">简体中文</a>
</p>

## Introduction

```bash
npm i @meojs/pkg-utils
```

## Contributing

- Run `npm run build` to build the project.
- Run `npm run publish:version` to build and push a new version.

## License

[MIT @ SmallMain](./LICENSE)
npm package: @meojs/std
Description: A portable JavaScript standard library crafted for wide applicability.
Author: SmallMain
Latest version: 1.0.26

<!-- <p align="center">
<img src="https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg" style="width:100px;" />
</p> -->

<h1 align="center">
@meojs/std
</h1>

<p align="center">
A portable JavaScript standard library crafted for wide applicability.
</p>

<!-- <br>
<p align="center">
<a href="https://unocss.dev/">Documentation</a> |
<a href="https://unocss.dev/play/">Playground</a>
</p>
<br> -->

<br>
<p align="center">
<span>English</span> |
<a href="./README_zh-CN.md">简体中文</a>
</p>

## Introduction

```bash
npm i @meojs/std
```

## Contributing

- Run `npm run build` to build the project.
- Run `npm run publish:version` to build and push a new version.

## License

[MIT @ SmallMain](./LICENSE)
npm package: @meojs/types
Description: Some useful TypeScript types.
Author: SmallMain
Latest version: 1.0.1

<!-- <p align="center">
<img src="https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg" style="width:100px;" />
</p> -->

<h1 align="center">
@meojs/types
</h1>

<p align="center">
Some useful TypeScript types.
</p>

<!-- <br>
<p align="center">
<a href="https://unocss.dev/">Documentation</a> |
<a href="https://unocss.dev/play/">Playground</a>
</p>
<br> -->

<br>
<p align="center">
<span>English</span> |
<a href="./README_zh-CN.md">简体中文</a>
</p>

## Introduction

```bash
npm i @meojs/types
```

All type definitions can be used by adding the corresponding path to the `compilerOptions.types` field array in your project's `tsconfig.json` file:

```jsonc
{
  "compilerOptions": {
    "types": [
      "@meojs/types/xxx",
    ]
  }
}
```

### Cocos Creator Types

Although the official provides the type package [@cocos/creator-types](https://github.com/cocos/creator-types), there are the following issues:

- Not updated in a timely manner.
- Missing `cc/env` type file.

Import path list:

- v3.8.5
  - `@meojs/types/cocos-creator/3.8.5/editor`
  - `@meojs/types/cocos-creator/3.8.5/engine`

## Contributing

- Run `npm version patch && npm publish` to push a new version.

## License

[MIT @ SmallMain](./LICENSE)
npm package: @meojs/utc
Description: Meo's unified development toolchain.
Author: SmallMain
Latest version: 1.18.55

<!-- <p align="center">
<img src="https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg" style="width:100px;" />
</p> -->

<h1 align="center">
@meojs/utc
</h1>

<p align="center">
Meo's unified development toolchain.
</p>

<!-- <br>
<p align="center">
<a href="https://unocss.dev/">Documentation</a> |
<a href="https://unocss.dev/play/">Playground</a>
</p>
<br> -->

<br>
<p align="center">
<span>English</span> |
<a href="./README_zh-CN.md">简体中文</a>
</p>

## Introduction

```bash
npm i @meojs/utc
```

## Contributing

Install Bun.js, it will serve as the development runtime.

- Run `pnpm run build` to build the project.
- Run `pnpm run publish:version` to build and push a new version.

## License

[MIT @ SmallMain](./LICENSE)
npm package: @meom/accordion
Description: MEOM Accordion
Author: MEOM
Latest version: 0.1.0

# MEOM Accordion

MEOM accordion is a fork of 10up Accordion.

## Usage

If you’re using a bundler (such as Webpack or Rollup), you can install `@meom/accordion` through npm like any other dependency:

```bash
npm install @meom/accordion
```

Then you can import the library in your JavaScript and instantiate your accordion.

```js
import { Accordion } from '@meom/accordion';
```
npm package: @meom/block-components
Description: MEOM block components
Author: MEOM
Latest version: 1.3.0

# Block Components

> Reusable components, hooks and helper functions for the WordPress block editor.


## Introduction

The Block Editor Components package provides reusable components, hooks and helper functions to use with the WordPress block editor.
This is **not** a WordPress plugin or other production-use library.
Instead, the package is intended to be used as development-time dependency, contributing to your plugin or project codebase build.

## Installation

The recommended way to use the Block Components package is to install as a node dependency.


```shell
npm install @meom/block-components
```

**Note:** As the Block Editor Components package provides a variety of components, hooks and utils that you usually don't all need for a given project, the package does **not** declare any `@wordpress/*` dependencies.
This means that you need to ensure all dependency assets are declared and loaded.

One way to ensure all dependencies are loaded is to use the [`@wordpress/dependency-extraction-webpack-plugin`](https://github.com/WordPress/gutenberg/tree/trunk/packages/dependency-extraction-webpack-plugin) package.

## Components

- [`ImageSelect`](src/components/ImageSelect)
- [`PostSelect`](src/components/PostSelect)
- [`TermSelect`](src/components/TermSelect)
- [`VideoSelect`](src/components/VideoSelect)

## Contributing

See the [contribution guidelines](CONTRIBUTING.md) for more information.

## Inspiration and other block components

- [Human Made Block Editor Components](https://github.com/humanmade/block-editor-components/)
- [10up Block Components](https://github.com/10up/block-components/)
npm package: @meomeocoj/chrome-storage
Description: TKey Chrome Storage Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Chrome Storage Module

[![npm version](https://img.shields.io/npm/v/@meomeocoj/chrome-storage?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/chrome-storage/v/latest)                  [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/chrome-storage?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/chrome-storage@latest) 

The tKey Chrome Storage Module helps you store and recall key shares in the chrome extension storage. This module is the part of the [tKey SDK](https://github.com/tkey/tkey/).

## Installation

```shell
npm install --save @meomeocoj/chrome-storage
```

## Initialization

#### Import the `ChromeExtensionStorageModule` class from `@meomeocoj/chrome-storage`

```javascript
import ChromeExtensionStorageModule from "@meomeocoj/chrome-storage";
```

#### Assign the `ChromeExtensionStorageModule` class to a variable

```javascript
const chromeStorageModule = new ChromeExtensionStorageModule();
```

### Returns

The `ChromeExtensionStorageModule` class returns an object with the following properties:

```ts
class ChromeExtensionStorageModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  constructor();
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  storeDeviceShare(deviceShareStore: ShareStore, customDeviceInfo?: StringifiedType): Promise<void>;
  storeShareOnChromeExtensionStorage(share: ShareStore): Promise<void>;
  getStoreFromChromeExtensionStorage(): Promise<ShareStore>;
  inputShareFromChromeExtensionStorage(): Promise<void>;
}
```

## Usage

With the `ChromeExtensionStorageModule` , you've access to the following functions:

### Storing a Device Share

#### `storeDeviceShare(deviceShareStore, customDeviceInfo?)`

- `deviceShareStore`: The `ShareStore` object to store.
- `customDeviceInfo?`: Information about the device to store.

#### `ShareStore`

```ts
class ShareStore implements ISerializable {
  share: Share;
  polynomialID: PolynomialID;
  constructor(share: Share, polynomialID: PolynomialID);
  static fromJSON(value: StringifiedType): ShareStore;
  toJSON(): StringifiedType;
}
interface ISerializable {
  toJSON(): StringifiedType;
}
```

### Storing a Share on Chrome Extension Storage

#### `storeShareOnChromeExtensionStorage(share)`

- `share`: The [`ShareStore`](#sharestore) object to store.

### Get a ShareStore from Chrome Extension Storage

##### `getStoreFromChromeExtensionStorage()`

#### Return

- `Promise<ShareStore>`: The [`ShareStore`](#sharestore) object.
npm package: @meomeocoj/common-types
Description: TKey common types
Author: Torus Labs
Latest version: 1.0.10

# tKey Common Types

[![npm version](https://img.shields.io/npm/v/@meomeocoj/common-types?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/common-types/v/latest)                      [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/common-types?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/common-types@latest) 

Common Types in `tKey` is used to get the access to common types and interfaces of the `tKey` SDK. This comes in handy by providing you a standard way of importing the values you need to work with the SDKs. We highly recommend using it while working with `Typescript`.  

## Installation

```shell
npm install --save @meomeocoj/common-types
```

### Checkout the [tKey SDK](https://github.com/tkey/tkey)
npm package: @meomeocoj/private-keys
Description: TKey Private Keys Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Private Key Module

[![npm version](https://img.shields.io/npm/v/@meomeocoj/private-keys?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/private-keys/v/latest)                      [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/private-keys?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/private-keys@latest)    

The tKey Private Key Module helps you add or remove the and password as a share for tkey. This module is the part of the [tKey SDK](https://github.com/tkey/tkey/).

## Installation

```shell
npm install --save @meomeocoj/private-keys
```

## Initialization

#### Import the `PrivateKeyModule` class from `@meomeocoj/private-keys`

```javascript
import PrivateKeyModule from "@meomeocoj/private-keys";
```

#### Assign the `PrivateKeyModule` class to a variable

```javascript
const privateKeyModule = new PrivateKeyModule();
```

### Returns

The `PrivateKeyModule` class returns an object with the following properties:

```ts
declare class PrivateKeyModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  privateKeyFormats: IPrivateKeyFormat[];
  constructor(formats: IPrivateKeyFormat[]);
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  setPrivateKey(privateKeyType: string, privateKey?: BN): Promise<void>;
  getPrivateKeys(): Promise<IPrivateKeyStore[]>;
  getAccounts(): Promise<BN[]>;
}
```

## Usage

With the `PrivateKeyModule`, you've access to the following functions:

### Set Private Key

#### `setPrivateKey(privateKeyType: string, privateKey?: BN)`

- `privateKeyType`: The type of private key to set.
- `privateKey`: The private key to set.

### Get Private Keys

#### `getPrivateKeys()`

#### Return

- `Promise<IPrivateKeyStore[]>`- The private keys stored.
npm package: @meomeocoj/seed-phrase
Description: TKey Seed Phrase Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Seed Phrase Module

[![npm version](https://img.shields.io/npm/v/@meomeocoj/seed-phrase?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/seed-phrase/v/latest)                        [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/seed-phrase?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/seed-phrase@latest) 

The tKey Seed Phrase Module helps you add or remove the and password as a share for tkey. This module is the part of the [tKey SDK](https://github.com/tkey/tkey/).


## Installation

```shell
npm install --save @meomeocoj/seed-phrase
```

## Initialization

#### Import the `SeedPhraseModule` class from `@meomeocoj/seed-phrase`

```javascript
import SeedPhraseModule from "@meomeocoj/seed-phrase";
```

#### Assign the `SeedPhraseModule` class to a variable

```javascript
const seedPhraseModule = new SeedPhraseModule();
```

### Returns

The `SeedPhraseModule` class returns an object with the following properties:

```ts
declare class SeedPhraseModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  seedPhraseFormats: ISeedPhraseFormat[];
  constructor(formats: ISeedPhraseFormat[]);
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  setSeedPhrase(seedPhraseType: string, seedPhrase?: string): Promise<void>;
  setSeedPhraseStoreItem(partialStore: ISeedPhraseStore): Promise<void>;
  CRITICAL_changeSeedPhrase(oldSeedPhrase: string, newSeedPhrase: string): Promise<void>;
  getSeedPhrases(): Promise<ISeedPhraseStore[]>;
  getSeedPhrasesWithAccounts(): Promise<ISeedPhraseStoreWithKeys[]>;
  getAccounts(): Promise<BN[]>;
}
```

## Usage

With the `SeedPhraseModule`, you've access to the following functions:

### Set Seed Phrase

#### `setSeedPhrase(seedPhraseType: string, seedPhrase?: string)`

- `seedPhraseType`: The type of seed phrase to set.
- `seedPhrase`: The seed phrase to set.

### Set Seed Phrase Store Item

#### `setSeedPhraseStoreItem(partialStore: ISeedPhraseStore)`

- `partialStore`: The partial store to set.

### Get Seed Phrase

#### `getSeedPhrases()`

#### Return

- `Promise<ISeedPhraseStore[]>`: A list of seed phrases.

### Get Seed Phrase With Accounts

#### `getSeedPhrasesWithAccounts()`

#### Return

- `Promise<ISeedPhraseStoreWithKeys[]>`: A list of seed phrases with accounts.
npm package: @meomeocoj/service-provider-base
Description: TKey Base Service Provider Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Base Service Provider

[![npm version](https://img.shields.io/npm/v/@meomeocoj/service-provider-base?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/service-provider-base/v/latest) [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/service-provider-base?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/service-provider-base@latest)

Service Provider in `tKey` is used for generating a social login share of the private key share managed by a wallet service provider via
their own authentication flows. 

## Installation

```shell
npm install --save @meomeocoj/service-provider-base
```

### This is the base file for making a service provider. Checkout the [Torus Service Provider](https://web3auth.io/docs/sdk/self-host/service-provider) for more information.
npm package: @meomeocoj/service-provider-torus
Description: TKey Torus Service Provider Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Torus Service Provider

[![npm version](https://img.shields.io/npm/v/@meomeocoj/service-provider-torus?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/service-provider-torus/v/latest) [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/service-provider-torus?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/service-provider-torus@latest)

Service Provider in `tKey` is used for generating a social login share of the private key share managed by a wallet service provider via
their own authentication flows. 

## Installation

```shell
npm install --save @meomeocoj/service-provider-torus
```

### See the full [SDK Reference](https://web3auth.io/docs/sdk/self-host/service-provider) on the Web3Auth Documentation

## Example

``` js
import TorusServiceProvider from "@meomeocoj/service-provider-torus";

const customAuthParams = {
  baseUrl: `${window.location.origin}/serviceworker`,
  enableLogging: true,
  network: "testnet" as any,
};
const serviceProvider = new TorusServiceProvider({ customAuthParams });
```
npm package: @meomeocoj/share-serialization
Description: TKey share serialization module
Author: Torus Labs
Latest version: 1.0.10

# tKey Share Serialization Module

[![npm version](https://img.shields.io/npm/v/@meomeocoj/share-serialization?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/share-serialization/v/latest)        [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/share-serialization?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/share-serialization@latest)

The Share Serialization Module helps you add or remove the and password as a share for tkey. This module is the part of the [tKey SDK](https://github.com/tkey/tkey/).

## Installation

```shell
npm install --save @meomeocoj/share-serialization
```

## Initialization

#### Import the `ShareSerializationModule` class from `@meomeocoj/share-serialization`

```javascript
import ShareSerializationModule from "@meomeocoj/share-serialization";
```

#### Assign the `ShareSerializationModule` class to a variable

```javascript
const shareSerializationModule = new ShareSerializationModule();
```

### Returns

The `ShareSerializationModule` class returns an object with the following properties:

```ts
declare class ShareSerializationModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  constructor();
  static serializeMnemonic(share: BN): string;
  static deserializeMnemonic(share: string): BN;
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  serialize(share: BN, type: string): Promise<unknown>;
  deserialize(serializedShare: unknown, type: string): Promise<BN>;
}
```

## Usage

With the `ShareSerializationModule`, you've access to the following functions:

### Serialize a share

#### `serialize(share: BN, type: string)`

- `share`: The share to serialize.
- `type`: The type of share to serialize.

### Deserialize a share

#### `deserialize(serializedShare: unknown, type: string)`

#### Return

- `Promise<BN>`: The deserialized share.
npm package: @meomeocoj/storage-layer-torus
Description: TKey Torus Storage Layer Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Torus Storage Layer

[![npm version](https://img.shields.io/npm/v/@meomeocoj/storage-layer-torus?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/storage-layer-torus/v/latest)       [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/storage-layer-torus?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/storage-layer-torus@latest)

A storage layer is needed to store and recall the metadata information of the shares generated so as to be able to recover the private key from the
tKeys generated. This SDK gives you the ability to get and set the Metadata for the various shares generated.

## Installation

```shell
npm install --save @meomeocoj/storage-layer-torus
```

## Instantiation

#### Import the `TorusStorageLayer` class from `@meomeocoj/storage-layer-torus`

```javascript
import TorusStorageLayer from "@meomeocoj/storage-layer-torus";
```

#### Assign the `TorusStorageLayer` class to a variable

```javascript
const storageLayer = new TorusStorageLayer(TorusStorageLayerArgs);
```

### Parameters

```ts
declare type TorusStorageLayerArgs = {
  enableLogging?: boolean;
  hostUrl?: string; // use `https://metadata.social-login.orai.io` for connecting to the Torus Metadata Server
  serverTimeOffset?: number;
};
```

## Example

```js
import TorusStorageLayer from "@meomeocoj/storage-layer-torus";

const storageLayer = new TorusStorageLayer({ hostUrl: "https://metadata.social-login.orai.io" });
```
npm package: @meomeocoj/web-storage
Description: TKey Web Storage Module
Author: Torus Labs
Latest version: 1.0.10

# tKey Web Storage Module

[![npm version](https://img.shields.io/npm/v/@meomeocoj/web-storage?label=%22%22)](https://www.npmjs.com/package/@meomeocoj/web-storage/v/latest)                       [![minzip](https://img.shields.io/bundlephobia/minzip/@meomeocoj/web-storage?label=%22%22)](https://bundlephobia.com/result?p=@meomeocoj/web-storage@latest)

The tKey Web Storage Module helps you store and recall key shares in the from local and file storage. This module is the part of the [tKey SDK](https://github.com/tkey/tkey/).

## Installation

```shell
npm install --save @meomeocoj/web-storage
```

## Initialization

#### Import the `WebStorageModule` class from `@meomeocoj/web-storage`

```javascript
import WebStorageModule from "@meomeocoj/web-storage";
```

#### Assign the `WebStorageModule` class to a variable

```javascript
const webStorageModule = new WebStorageModule(params);
```

### Parameters

`params`

- `canUseFileStorage?`: `boolean`

### Returns

The `WebStorageModule` class returns an object with the following properties:

```ts
class WebStorageModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  canUseFileStorage: boolean;
  constructor(canUseFileStorage?: boolean);
  setFileStorageAccess(): Promise<void>;
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  storeDeviceShare(deviceShareStore: ShareStore, customDeviceInfo?: StringifiedType): Promise<void>;
  storeDeviceShareOnFileStorage(shareIndex: BNString): Promise<void>;
  getDeviceShare(): Promise<ShareStore>;
  inputShareFromWebStorage(): Promise<void>;
}
```

## Usage

With the `WebStorageModule`, you've access to the following functions:

### Store Device Share

#### `storeDeviceShare(deviceShareStore: ShareStore, customDeviceInfo?: StringifiedType)`

- `deviceShareStore`: The `ShareStore` object to store.
- `customDeviceInfo?`: Information about the device to store.

#### `ShareStore`

```ts
class ShareStore implements ISerializable {
  share: Share;
  polynomialID: PolynomialID;
  constructor(share: Share, polynomialID: PolynomialID);
  static fromJSON(value: StringifiedType): ShareStore;
  toJSON(): StringifiedType;
}
interface ISerializable {
  toJSON(): StringifiedType;
}
```

### Storing a Share on File Storage

#### `storeDeviceShareOnFileStorage(shareIndex)`

- `shareIndex`: The index of the share to store.

### Get a ShareStore from Storage

#### `getDeviceShare()`

#### Return

- `Promise<ShareStore>`: The [`ShareStore`](#sharestore) object.
npm package: @meorganiaztion/counters
Description: Package with two counters `Counter` and `DecreasingCounter` constructors.
Author: CodeRoad
Latest version: 1.0.1

# @coderoadpl/counters

Package with two counters `Counter` and `DecreasingCounter` constructors.

## Installation

```
npm install @coderoadpl/counters
```

## Usage

To run demo app clone this repo and simply run:

```
npm install
```

```
npm start
```

## API

Every counter gets one argument - selector of element to be rendered in.
Counter should be initialized after creation by calling `.init()` method.

```javascript
import { Counter, DecreasingCounter } from '@coderoadpl/counters'

const counter1 = new Counter('.counter-1')
counter1.init()

const counter2 = new DecreasingCounter('.counter-2')
counter2.init()
```
npm package: @meotimdihia/fastify-oauth2
Description: Perform login using oauth2 protocol
Author: Tommaso Allevi - @allevo
Latest version: 2.0.1

# fastify-oauth2

Wrap around [`simple-oauth2`](https://github.com/lelylan/simple-oauth2) library.

## Install

```
npm i --save fastify-oauth2
```

## Usage

```js
const fastify = require('fastify')({ logger: { level: 'trace' } })
const oauthPlugin = require('fastify-oauth2')


fastify.register(oauthPlugin, {
  name: 'facebookOAuth2',
  credentials: {
    client: {
      id: '<CLIENT_ID>',
      secret: '<CLIENT_SECRET>'
    },
    auth: oauthPlugin.FACEBOOK_CONFIGURATION
  },
  // register a fastify url to start the redirect flow
  startRedirectPath: '/login/facebook',
  // facebook redirect here after the user login
  callbackUri: 'http://localhost:3000/login/facebook/callback'
})

fastify.get('/login/facebook/callback', async function (request, reply) {
  const result = await this.getAccessTokenFromAuthorizationCodeFlow(request)

  console.log(result.access_token)

  reply.send({ access_token: result.access_token })
})
```

## Example

See [facebook example](./examples/facebook.js) for an example.

## Reference

This fastify plugin decorates the fastify instance with the [`simple-oauth2`](https://github.com/lelylan/simple-oauth2)
instance.

## License

Licensed under [MIT](./LICENSE).

*NB:* See [`simple-oauth2`](https://github.com/lelylan/simple-oauth2) license too