open-index/open-npm huggingface dataset:
npm package: @mozartspa/nexus-plugin-public
Description: Nexus schema plugin to deny access to all queries, mutations and subscriptions except those marked as public
Latest version: 0.1.2

# @mozartspa/nexus-plugin-public

A Nexus schema plugin to deny access to all queries, mutations and subscriptions except those marked as public.

## Install

```bash
# npm
npm i @mozartspa/nexus-plugin-public

# yarn
yarn add @mozartspa/nexus-plugin-public
```

> `nexus` and `graphql` are required, but if you are using Nexus then both of those should already be installed.

## Usage

Once installed you need to add the plugin to your nexus schema configuration:

```ts
import { makeSchema } from "nexus"
import { publicPlugin } from "@mozartspa/nexus-plugin-public"

const schema = makeSchema({
  // ...
  plugins: [
    // ...
    publicPlugin({
      isAuthenticated: async (root, args, ctx) => {
        // Place here your logic.
        // It should return `true` if authenticated, `false` otherwise.
        // It can be an async function.

        // In this case we simply check that a user object
        // is present in the context.
        return !!ctx.user
      },
      defaultError: new Error("Unauthorized!"),
      // ^--> Optional: errot that is thrown when not authorized.
    }),
  ],
})
```

Then mark as `public` the queries, mutations and subscriptions that don't need an authenticated user:

```ts
queryField("news", {
  type: list("News"),
  public: true, // <-- marked as public
  resolve: async (root, args, ctx) => {
    // ...
  },
})

mutationField("login", {
  type: "LoginOutput",
  public: true, // <-- marked as public
  args: {
    // ...
  },
  resolve: async (root, args, ctx) => {
    // ...
  },
})
```
npm package: @mozartspa/nivo-bar
Description: <a href="https://nivo.rocks"><img alt="nivo" src="https://raw.githubusercontent.com/plouc/nivo/master/nivo.png" width="216" height="68"/></a>
Author: Raphaël Benitte
Latest version: 0.79.1-fixed

<a href="https://nivo.rocks"><img alt="nivo" src="https://raw.githubusercontent.com/plouc/nivo/master/nivo.png" width="216" height="68"/></a>

# `@nivo/bar`

[![version](https://img.shields.io/npm/v/@nivo/bar?style=for-the-badge)](https://www.npmjs.com/package/@nivo/bar)
[![downloads](https://img.shields.io/npm/dm/@nivo/bar?style=for-the-badge)](https://www.npmjs.com/package/@nivo/bar)

## Bar

[documentation](http://nivo.rocks/bar/)

![Bar](https://raw.githubusercontent.com/plouc/nivo/master/website/src/assets/captures/bar.png)

## BarCanvas

[documentation](http://nivo.rocks/bar/canvas/)

![BarCanvas](https://raw.githubusercontent.com/plouc/nivo/master/website/src/assets/captures/bar-canvas.png)
npm package: @mozayk/eslint-config-base
Description: Mozayk ESLint configuration for JavaScript
Author: José Lucas Oliveira
Latest version: 1.0.0

# @mozayk/eslint-config-base

Mozayk ESLint configuration for JavaScript projects. This package provides a set of rules for maintaining consistent code quality across JavaScript projects following the [Mozayk TypeScript Style Guide](https://github.com/mozayk/typescript-style-guide#readme).

## Installation

```bash
npm install --save-dev \
  @mozayk/eslint-config-base \
  eslint@^9.7 \
  eslint-plugin-import@^2.31
```

or

```bash
yarn add --dev \
  @mozayk/eslint-config-base \
  eslint@^9.7 \
  eslint-plugin-import@^2.31
```

## Usage

1. Create or update your `eslint.config.js`:

```javascript
import { configs as mozaykBaseConfigs } from '@mozayk/eslint-config-base';

/** @type {import("eslint").Linter.Config[]} */
export default [...mozaykBaseConfigs.js];
```

2. Add scripts to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint . --max-warnings 0"
  }
}
```

## Extending the Configuration

You can extend the base configuration and add your own rules:

```javascript
import { configs as mozaykBaseConfigs } from '@mozayk/eslint-config-base';

/** @type {import("eslint").Linter.Config[]} */
export default [
  ...mozaykBaseConfigs.js,
  {
    rules: {
      // Your custom rules here
    },
  },
];
```

## Other Packages

- [`@mozayk/eslint-config-typescript`](https://www.npmjs.com/package/@mozayk/eslint-config-typescript) for TypeScript support.
- [`@mozayk/eslint-config-react`](https://www.npmjs.com/package/@mozayk/eslint-config-react) adds React and JSX rules.
- [`@mozayk/prettier-config`](https://www.npmjs.com/package/@mozayk/prettier-config) for Prettier configuration.
npm package: @mozayk/eslint-config-react
Description: Mozayk ESLint configurations for React
Author: José Lucas Oliveira
Latest version: 1.0.0

# @mozayk/eslint-config-react

Mozayk ESLint configuration that adds React and JSX rules. This package provides a set of rules for maintaining consistent code quality across React projects following the [Mozayk TypeScript Style Guide](https://github.com/mozayk/typescript-style-guide#readme).

## Installation

```bash
npm install --save-dev \
  @mozayk/eslint-config-react \
  eslint@^9.7 \
  eslint-plugin-jsx-a11y@^6.10 \
  eslint-plugin-react@^7.35 \
  eslint-plugin-react-hooks@^5
```

or

```bash
yarn add --dev \
  @mozayk/eslint-config-react \
  eslint@^9.7 \
  eslint-plugin-jsx-a11y@^6.10 \
  eslint-plugin-react@^7.35 \
  eslint-plugin-react-hooks@^5
```

## Usage

1. Create or update your `eslint.config.js`:

```javascript
import { configs as mozaykReactConfigs } from '@mozayk/eslint-config-react';

/** @type {import("eslint").Linter.Config[]} */
export default [...mozaykReactConfigs.react];
```

2. Add scripts to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint . --max-warnings 0"
  }
}
```

## Extending the Configuration

You can extend the base configuration and add your own rules:

```javascript
import { configs as mozaykBaseConfigs } from '@mozayk/eslint-config-base';
import { configs as mozaykTypeScriptConfigs } from '@mozayk/eslint-config-typescript';
import { configs as mozaykReactConfigs } from '@mozayk/eslint-config-react';
import * as typescriptParser from '@typescript-eslint/parser';
import globals from 'globals';

/** @type {import("eslint").Linter.Config[]} */
export default [
  ...mozaykBaseConfigs.js,
  ...mozaykTypeScriptConfigs.ts,
  ...mozaykReactConfigs.react,
  {
    languageOptions: {
      parser: typescriptParser,
      parserOptions: {
        ecmaFeatures: { jsx: true },
        jsxPragma: null,
        sourceType: 'module',
        projectService: true,
      },
      globals: {
        ...globals.browser,
        ...globals.es2022,
        ...globals.node,
        React: 'writable',
        JSX: 'readonly',
      },
    },
    rules: {
      // Your custom rules here
    },
  },
];
```

## Other Packages

- [`@mozayk/eslint-config-base`](https://www.npmjs.com/package/@mozayk/eslint-config-base) for JavaScript projects.
- [`@mozayk/eslint-config-typescript`](https://www.npmjs.com/package/@mozayk/eslint-config-typescript) for TypeScript support.
- [`@mozayk/prettier-config`](https://www.npmjs.com/package/@mozayk/prettier-config) for Prettier configuration.
npm package: @mozayk/eslint-config-typescript
Description: Mozayk ESLint configuration for TypeScript
Author: José Lucas Oliveira
Latest version: 1.0.0

# @mozayk/eslint-config-typescript

Mozayk ESLint configuration for TypeScript support. This package provides a set of rules for maintaining consistent code quality across TypeScript projects following the [Mozayk TypeScript Style Guide](https://github.com/mozayk/typescript-style-guide#readme).

## Installation

```bash
npm install --save-dev \
  @mozayk/eslint-config-typescript \
  @typescript-eslint/eslint-plugin@^8 \
  @typescript-eslint/parser@^8 \
  eslint@^9.7 \
  eslint-import-resolver-typescript@^4 \
  eslint-plugin-import@^2.31 \
  typescript@^5.8
```

or

```bash
yarn add --dev \
  @mozayk/eslint-config-typescript \
  @typescript-eslint/eslint-plugin@^8 \
  @typescript-eslint/parser@^8 \
  eslint@^9.7 \
  eslint-import-resolver-typescript@^4 \
  eslint-plugin-import@^2.31 \
  typescript@^5.8
```

## Usage

1. Create or update your `eslint.config.js`:

```javascript
import { configs as mozaykTypeScriptConfigs } from '@mozayk/eslint-config-typescript';

/** @type {import("eslint").Linter.Config[]} */
export default [...mozaykTypeScriptConfigs.ts];
```

2. Add scripts to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint . --max-warnings 0"
  }
}
```

## Extending the Configuration

You can extend the base configuration and add your own rules:

```javascript
import { configs as mozaykBaseConfigs } from '@mozayk/eslint-config-base';
import { configs as mozaykTypeScriptConfigs } from '@mozayk/eslint-config-typescript';

/** @type {import("eslint").Linter.Config[]} */
export default [
  ...mozaykBaseConfigs.js,
  ...mozaykTypeScriptConfigs.ts,
  {
    rules: {
      // Your custom rules here
    },
  },
];
```

## Other Packages

- [`@mozayk/eslint-config-base`](https://www.npmjs.com/package/@mozayk/eslint-config-base) for JavaScript projects.
- [`@mozayk/eslint-config-react`](https://www.npmjs.com/package/@mozayk/eslint-config-react) adds React and JSX rules.
- [`@mozayk/prettier-config`](https://www.npmjs.com/package/@mozayk/prettier-config) for Prettier configuration.
npm package: @mozayk/prettier-config
Description: Mozayk Prettier configuration
Author: José Lucas Oliveira
Latest version: 1.0.0

# @mozayk/prettier-config

Mozayk Prettier configuration. This package provides a set of rules for maintaining consistent code quality across projects following the [Mozayk TypeScript Style Guide](https://github.com/mozayk/typescript-style-guide#readme).

## Installation

```bash
npm install --save-dev \
  @mozayk/prettier-config \
  prettier@^3
```

or

```bash
yarn add --dev \
  @mozayk/prettier-config \
  prettier@^3
```

## Usage

1. Create or update your `prettier.config.js`:

```javascript
import mozaykPrettierConfig from '@mozayk/prettier-config';

/** @type {import("prettier").Config} */
export default { ...mozaykPrettierConfig };
```

2. Add scripts to your `package.json`:

```json
{
  "scripts": {
    "format": "prettier . --write"
  }
}
```

## Extending the Configuration

You can extend the base configuration and add your own rules:

```javascript
import mozaykPrettierConfig from '@mozayk/prettier-config';

/** @type {import("prettier").Config} */
export default {
  ...mozaykPrettierConfig,
  // Your custom rules here
};
```

## Other Packages

- [`@mozayk/eslint-config-base`](https://www.npmjs.com/package/@mozayk/eslint-config-base) for JavaScript projects.
- [`@mozayk/eslint-config-typescript`](https://www.npmjs.com/package/@mozayk/eslint-config-typescript) for TypeScript support.
- [`@mozayk/eslint-config-react`](https://www.npmjs.com/package/@mozayk/eslint-config-react) adds React and JSX rules.
npm package: @mozeyinedu/check
Description: @mozeyinedu/check is a package that contains functions that check some conditions just to preserve time for other stuff
Author: mozey
Latest version: 2.0.0

# domcleanup
This package purifies the dom against XSS attacks. It is built on top of JSDOM and dompurify

# Exmaples

### Installation

`npm i @mozeyinedu/domcleanup`

### Usage
```
    const domcleanup = require('@mozeyinedu/domcleanup)
    
    console.log(domcleanup('<b>hello there</b>'))
```
npm package: @mozeyinedu/domcleanup
Description: it purifies the dom against XSS attacks. It is built on top of JSDOM and dompurify
Author: drmo
Latest version: 0.3.0

# domcleanup
This package purifies the dom against XSS attacks. It is built on top of JSDOM and dompurify

# Exmaples

### Installation

`npm i @mozeyinedu/domcleanup`

### Usage
```
    const domcleanup = require('@mozeyinedu/domcleanup)
    
    console.log(domcleanup('<b>hello there</b>'))
```
npm package: @mozeyinedu/mover
Description: moves element in the browser
Author: mozey
Latest version: 1.1.1

### useMover
##### Description

* useMover is a hook that works both in react and vanilla javascript
* It contains two functions; drag and resize


##### Installation

```
npm i "@mozeyinedu/mover"
```

#### drag()

##### Usage 

##### Usage in Vanilla Javascript

```
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <div id="div1" style="width: 100px; height: 70px; background: red">drag div 1</div>

        <div id="div2" style="width: 100px; height: 70px; background: red; top: 100px">drag div 2</div>

        <script src="https://unpkg.com/@mozeyinedu/mover@1.0.0/dist/index.js"></script>
        <!-- make sure you use the most current version -->

        <script>
            const div1 = document.getElementById('div1')
            const div2 = document.getElementById('div2')

            const { drag, resize } = useMover()

            drag(div1);

            drag(div2, '10px solid teal'); //the second parameter is border during drag
        </script>
    </body>
    </html>

```

##### Usage in React

```
    import React, {useRef, useEffect} = "react";
    import {useMover} = "@mozeyinedu/mover";

    function App(){

        const el1 = useRef(null);
        const el2 = useRef(null);
        const { drag, resize } useMover();

        useEffect(()=>{
            drag(el1);

            drag(el2, "2px dotted gold");

        }, [])
        
        return (
            <div ref={el1} style={{
                width: 100px;
                height: 70px;
                background: red}}
            >
                Drag Me
            </div>
            <div ref={el2} style={{
                width: 100px;
                height: 70px;
                top: 100px;
                background: teal}}
            >
                Drag Me
            </div>
        )
    }

    export default App;
    
```

#### resize()

##### Usage 

##### Usage in Vanilla Javascript

......
......

##### Usage in Vanilla React
npm package: @mozeyinedu/wysiwyg
Description: text formater
Author: mozey
Latest version: 1.0.0

### wysiwyg

##### Description
Formate text

##### Installation
```
npm i #mozeyinedu/wysiwyg
```

##### Usage
* use only in vanilla.
* Can also be used in react
* wysiwyg() receives two arguments; An object with 3 key-value pair items and a callback
    ```
        const obtion = {
            selector: ',
            textFormat: ''
            clear: true
        }
    ```
* selector selects the textarea
* textFormat: value is a string (innerText, textContent or innerHTML). Default(if not specified) is innerHTML; in this case the formated text will be received just the way it is in the wysiwyg.
* clear: value is boolean (true or false). default is true; It tell the wysiwyg to either clear the textarea or not after submitted

* The callback function returns the wysiwyg data depending on the textFormat.

##### examples

```
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        
        <style>
            #txt{
                width:95vw;
                max-width: 900px;
                height: 90vh;
                margin: auto;
            };
            #result{
                color: #000;
            }
        </style>
    </head>
    <body>
        
        <textarea id="txt"></textarea>
        <div id="result"></div>
        <script src="../src/wysiwyg.js" ></script>

        <script>
            const result = document.querySelector("#result");
            wysiwyg({
                selector: document.querySelector("#txt"),
            }, (err, data)=>{
                if(err){
                    console.log(err)
                }else{
                    result.innerHTML = data;
                }

            })

        </script>
    </body>
    </html>
```

```
    wysiwyg({
        selector: document.querySelector("#txt"),
        clear: false,
        textFormat: 'innerText'

    }, (err, data)=>{
        if(err){
            console.log(err)
        }else{
            result.innerHTML = data;
        }
    })
```
npm package: @mozheng-neal/postcss-bem
Description: 支持bem语法的postcss插件
Author: NealST
Latest version: 1.0.2

# Description  
This is a postcss plugin for supportting bem syntax in the process of writing css or pcss. 

# Usage  
## Install && use
If you want to use this tool,the first step is installing it through npm.
```
npm i @mozheng-neal/postcss-bem --save-dev
```  
After installing it,this plugin can be used in multiple ways, such as webpack, gulp and so on, you could acquire the detail information at [how to use postcss](https://github.com/postcss/postcss)
## Example
The supported css bem syntax contains mainly @component, @descendent @modifier @when. A usage example as follows:  
```css  
html
<div class="container">
  <div class="container-child">
  </div>
  <div class="container--des">
  </div>
  <div class="container_state">
  </div>
</div>  

css/pcss
@component container {
  color: red;
  @descendent child {
    color: yellow
  }
  @modifier des {
    color: gray;
  }
  @when state {
    color: green;
  }
}
```
npm package: @mozhou-tech/vue3-baidumap
Description: vue-baidu-map的vue3版本（支持v2.0、v3.0和webGl api）。Baidu Map Component for Vue 3.0 (support v2.0 、 v3.0 and webGl api)
Author: YangJianFei
Latest version: 1.0.0

npm install @mozyun/vue3-baidu-map
npm package: @mozia/js
Description: Mozia JavaScript/TypeScript SDK for MBaaS
Latest version: 0.2.0

# @mozia/js

Mozia JavaScript/TypeScript SDK for MBaaS — a thin wrapper around the Mozia API.

## Installation

```bash
npm install @mozia/js
```

## Quick Start

```ts
import { Mozia } from '@mozia/js';

const mozia = new Mozia({
  serverURL: 'https://your-mozia-server.com',
  appKey: 'your-app-key',
});

// Auth
const { data } = await mozia.auth.login(appId, {
  email: 'user@example.com',
  password: 'secret',
});
const client = mozia.withSession(data.session_token);

// Records
const { data: records } = await client.records.query(appId, collectionId, {
  where: { status: 'active' },
  limit: 10,
});
await client.records.create(appId, collectionId, { title: 'Hello' });
await client.records.patch(appId, collectionId, recordId, { status: 'archived' });

// Files
await client.files.upload(appId, fileBlob, 'photo.jpg');

// Push
await client.push.send(appId, { title: 'Hi', body: 'Hello!' });
await client.push.register(appId, {
  device_token: 'fcm-token',
  device_type: 'android',
});

// Cloud Functions
await client.functions.invoke(appId, 'myFunction', { foo: 'bar' });

// LiveQuery (realtime)
const unsubscribe = await mozia.livequery.subscribe(
  appId,
  'posts',
  { where: { status: 'published' }, order: '-created_at' },
  {
    onEnter: (r) => console.log('created', r),
    onUpdate: (r) => console.log('updated', r),
    onLeave: (r) => console.log('deleted', r),
  }
);
// later: await unsubscribe();
```

## API

- **Auth**: `signup`, `login`, `logout`, `me`, `withSession`
- **Records**: `query`, `get`, `create`, `update`, `patch`, `delete`
- **Files**: `list`, `upload`, `getUrl`, `delete`
- **Push**: `send`, `register`
- **Functions**: `invoke`
- **LiveQuery**: `subscribe` (realtime record events)

### LiveQuery config

For WebSocket connection, pass Reverb/Pusher options:

```ts
const mozia = new Mozia({
  serverURL: 'https://api.mozia.io',
  appKey: 'your-app-key',
  reverbKey: 'your-reverb-key',
  reverbHost: 'reverb.mozia.io',
  reverbPort: 443,
  reverbSecure: true,
});
```
npm package: @mozilla/jest-puppeteer
Description: Run your tests using Jest & Puppeteer.
Author: Greg Bergé
Latest version: 4.5.2

# jest-puppeteer

[![Build Status][build-badge]][build]
[![version][version-badge]][package]
[![MIT License][license-badge]][license]

Jest preset containing all required configuration for writing integration tests using Puppeteer.

```
npm install jest-puppeteer puppeteer
```

## Usage

```js
// jest.config.js
module.exports = {
  preset: 'jest-puppeteer',
}
```

## License

MIT

[build-badge]: https://img.shields.io/travis/smooth-code/jest-puppeteer.svg?style=flat-square
[build]: https://travis-ci.org/smooth-code/jest-puppeteer
[version-badge]: https://img.shields.io/npm/v/jest-puppeteer-preset.svg?style=flat-square
[package]: https://www.npmjs.com/package/jest-puppeteer-preset
[license-badge]: https://img.shields.io/npm/l/jest-puppeteer-preset.svg?style=flat-square
[license]: https://github.com/smooth-code/jest-puppeteer/blob/master/LICENSE
npm package: @mozilla/jest-puppeteer-preset
Description: Run your tests using Jest & Puppeteer.
Author: Greg Bergé
Latest version: 4.5.2

# jest-puppeteer-preset

[![Build Status][build-badge]][build]
[![version][version-badge]][package]
[![MIT License][license-badge]][license]

Jest preset containing all required configuration for writing integration tests using Puppeteer.

```
npm install jest-puppeteer-preset puppeteer
```

## Usage

```js
// jest.config.js
module.exports = {
  preset: 'jest-puppeteer-preset',
}
```

## License

MIT

[build-badge]: https://img.shields.io/travis/smooth-code/jest-puppeteer.svg?style=flat-square
[build]: https://travis-ci.org/smooth-code/jest-puppeteer
[version-badge]: https://img.shields.io/npm/v/jest-puppeteer-preset.svg?style=flat-square
[package]: https://www.npmjs.com/package/jest-puppeteer-preset
[license-badge]: https://img.shields.io/npm/l/jest-puppeteer-preset.svg?style=flat-square
[license]: https://github.com/smooth-code/jest-puppeteer/blob/master/LICENSE