open-index/open-npm huggingface dataset:
npm package: @kkt/pro
Description: kktp plugins
Author: SunLxy
Latest version: 1.1.5

包集成管理
====

1. 为了方便把自动生成文件内的数据导出使用
2. 根据使用的`plugin`，导出对应相关包内方法
3. 导出一部分自定义类型

## install

```bash
$ npm install @kkt/pro -D # yarn add @kkt/pro -D
```

## 类型

**KktproRoutesProps**

路由类型

```ts
export interface KktproRoutesProps extends Omit<RouteObject, 'children' | 'element'> {
  /** 名称 */
  name?: string;
  /**  图标 */
  icon?: string | React.ReactNode;
  /** 重定向  当 index===true生效 */
  redirect?: string;
  /** 页面权限, 用于页面校验权限 */
  roles?: string[];
  /** 隐藏主菜单 */
  hiddenMainMenu?: boolean;
  /** 是否隐藏菜单 */
  hideInMenu?: boolean;
  /** 自定义 跳转 */
  // navigate?: (navigate: NavigateFunction) => void;
  navigate?: string;
  /** 控制是否侧边只展示子路由 **/
  side?: boolean;
  /** 是否渲染当前路由 */
  hideRoute?: boolean;
  /** route component */
  element?: string | React.LazyExoticComponent<() => JSX.Element> | JSX.Element;
  /** 子集 路由 */
  children?: KktproRoutesProps[];
}
```

**KktproPageProps**

页面`props`类型

```ts
export interface KktproPageProps extends KktproIProps {
  /** 页面权限 */
  roles?: string;
  navigate: NavigateFunction;
  /** path="/" 路由下的子集路由集合 */ 
  routes: KktproRoutesProps[];
}
```

### Contributors

<a href="https://github.com/kktjs/kkt-pro/graphs/contributors">
  <img src="https://kktjs.github.io/kkt-pro/CONTRIBUTORS.svg" />
</a>

### License

Licensed under the MIT License.
npm package: @kkt/raw-modules
Description: Makes it easy to use the webpack raw-loader.
Author: Kenny Wong
Latest version: 7.5.5

<p align="center">
  <h1>@kkt/raw-modules</h1>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kkt/raw-modules">
    <img src="https://img.shields.io/npm/v/@kkt/raw-modules.svg" alt="npm version">
  </a>
</p>

Makes it easy to use the webpack raw-loader

### Installation

```bash
yarn add --dev @kkt/raw-modules
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/raw-modules
```

### Usage

In the `.kktrc.js` or `.kktrc.ts` you created for `kkt` add this code:

```js
import path from 'path';
import rawModules from '@kkt/raw-modules';

export default (conf, evn, options) => {
  return rawModules(conf, evn, options);
}
```

In `package.json`, add a separate npm script to build library

```js
{
  "scripts": {
    ...
    "build": "kkt build",
    "start": "kkt start",
    ...
  }
}
```

And you can now use CRA to build your library

### Configurations

```js
import path from 'path';
import rawModules from '@kkt/raw-modules';

export default (conf, evn, options) => {
  return rawModules(conf, evn, {
    /**
     * test @defalut /\.md$/i 
     **/
    test: /\.(txt|md)$/i,
    /**
     * esModule @defalut true 
     **/
    esModule: false,
  });
}
```

### License

Licensed under the MIT License
npm package: @kkt/react-library
Description: Use create-react-app to build react libraries.
Author: Kenny Wong
Latest version: 7.5.5

<p align="center">
  <h1>@kkt/react-library</h1>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kkt/react-library">
    <img src="https://img.shields.io/npm/v/@kkt/react-library.svg" alt="npm version">
  </a>
</p>

Use create-react-app to build react libraries. This gives you ability to reuse most of CRA setup for building your libraries.

### Installation

```bash
yarn add --dev @kkt/react-library
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/react-library
```

### Usage

In the `.kktrc.js` or `.kktrc.ts` you created for `kkt` add this code:

```js
import path from 'path';
import reactLibrary from '@kkt/react-library';

export default (conf, evn, options) => {
  const pkg = require(path.join(process.cwd(), 'package.json'));

  return reactLibrary(conf, evn, {
    ...options,
    ...pkg,
    // webpack externals options
    dependencies: {
      ...pkg.dependencies,
      "react-refresh": "0"
    }
  });
}
```

In `package.json`, add a separate npm script to build library

```js
{
  "scripts": {
    ...
    "bundle": "kkt build --bundle",
    "bundle:min": "kkt build --bundle --mini",
    ...
  }
}
```

And you can now use CRA to build your library

### Configurations

- name: name of the library / package. 
- module: name of entry file for webpack. 
- main: output file for webpack config. 
- dependencies: list of dependencies to be added as externals to webpack config.

Although you can pass these options via configuration, it is usually recommended to package the package json config as is. For example:

```js
import path from 'path';
import reactLibrary from '@kkt/react-library';

export default (conf, evn, options) => {
  const pkg = require(path.join(process.cwd(), 'package.json'));
  return reactLibrary(conf, evn, {
    ...options,
    ...pkg,
    // webpack externals options
    dependencies: {
      ...pkg.dependencies,
      "react-refresh": "0"
    }
  });
}
```

### License

Licensed under the MIT License
npm package: @kkt/resolve-fallback
Description: This will modify the CRA ModuleScopePlugin plugin that prevents to import modules from outside the `src` directory.
Author: Kenny Wong
Latest version: 7.4.18

<p align="center">
  <a href="https://github.com/kktjs/kkt">
    <img src="https://raw.githubusercontent.com/kktjs/kkt/d2bb00dc2d0bd9bb133f3a369d0ad2f5330ed4af/website/kkt.svg?sanitize=true" alt="KKT LOGO">
  </a>
</p>

<p align="center">
  <h1>@kkt/resolve-fallback</h1>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kkt/resolve-fallback">
    <img src="https://img.shields.io/npm/v/@kkt/resolve-fallback.svg" alt="npm version">
  </a>
</p>

fix: https://github.com/kktjs/kkt/issues/412

### License

Licensed under the MIT License
npm package: @kkt/scope-plugin-options
Description: This will modify the CRA ModuleScopePlugin plugin that prevents to import modules from outside the `src` directory.
Author: Kenny Wong
Latest version: 7.5.5

<p align="center">
  <h1>@kkt/scope-plugin-options</h1>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kkt/scope-plugin-options">
    <img src="https://img.shields.io/npm/v/@kkt/scope-plugin-options.svg" alt="npm version">
  </a>
</p>

This will modify the CRA ModuleScopePlugin plugin that prevents to import modules from outside the `src` directory, useful if you use a different directory.

This is the setting for the Plug-in `new ModuleScopePlugin`.

Prevents users from importing files from outside of src/ (or node_modules/). This often causes confusion because we only process files within src/ with babel. To fix this, we prevent you from importing files out of src/ -- if you'd like to, please link the files into your node_modules/ and let module-resolution kick in. Make sure your source files are compiled, as they will not be processed in any way.
 
### Installation

```bash
yarn add --dev @kkt/scope-plugin-options
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/scope-plugin-options
```

### Usage

In the `.kktrc.js` or `.kktrc.ts` you created for `kkt` add this code:

```js
import path from 'path';
import scopePluginOptions from '@kkt/scope-plugin-options';

export default (conf, evn, options) => {
  return scopePluginOptions(conf, evn, {
    allowedFiles: [
      path.resolve(process.cwd(), 'README.md')
    ]
  });
}
```

In `package.json`, add a separate npm script to build library

```js
{
  "scripts": {
    ...
    "build": "kkt build",
    "start": "kkt start",
    ...
  }
}
```

And you can now use CRA to build your library

### Configurations

```js
import path from 'path';
import scopePluginOptions from '@kkt/scope-plugin-options';

export default (conf, evn, options) => {
  return scopePluginOptions(conf, evn, false);
}
```

Disable scopePlugin

```js
import path from 'path';
import { disableScopePlugin } from '@kkt/scope-plugin-options';

export default (conf, evn, options) => {
  return disableScopePlugin(conf);
}
```

### API

```ts
import { Configuration } from 'webpack';
import { LoaderConfOptions } from 'kkt';
export declare type ReactLibraryOptions = LoaderConfOptions & {
  allowedFiles?: ReadonlyArray<string>;
  allowedPaths?: ReadonlyArray<string>;
  appSrcs?: string | ReadonlyArray<string>;
};
export declare function disableScopePlugin(conf: Configuration): Configuration;
export default function scopePluginOptions(conf: Configuration, env: string, options: ReactLibraryOptions): Configuration;
```

### License

Licensed under the MIT License
npm package: @kkt/stylus-modules
Description: Support for regular stylus files and *.module.styl files.
Author: Kenny Wong
Latest version: 7.5.5

<p align="center">
  <h1>@kkt/stylus-modules</h1>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kkt/stylus-modules">
    <img src="https://img.shields.io/npm/v/@kkt/stylus-modules.svg" alt="npm version">
  </a>
</p>

Use create-react-app to build react libraries. Support for regular `styl` files and `*.module.styl` files. This package contains a plugin for using [stylus](https://github.com/stylus/stylus/) with [kkt](https://github.com/kktjs/kkt).

### Installation

```bash
yarn add --dev @kkt/stylus-modules
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/stylus-modules
```

### Usage

In the `.kktrc.js` or `.kktrc.ts` you created for `kkt` add this code:

```js
import stylusModules from '@kkt/stylus-modules';

export default (conf, evn, options) => {
  conf = stylusModules(conf, evn, options);
  return conf;
}
```

In `package.json`, add a separate npm script to build library

```js
{
  "scripts": {
    ...
    "bundle": "kkt build --bundle",
    "bundle:min": "kkt build --bundle --mini",
    ...
  }
}
```

And you can now use CRA to build your library

### Configurations

```js
import stylusModules from '@kkt/stylus-modules';

export default (conf, evn, options) => {

  // with loaderOptions
  conf = stylusModules.withLoaderOptions({
    stylusOptions: {
      // Specify the path. where to find files
      paths: ["node_modules/vars"],
    },
  })(conf, env, options);

  return conf;
}
```

### License

Licensed under the MIT License
npm package: @kkuffour/solid-moderation-plugin
Description: Content moderation plugin for Community Solid Server
Latest version: 0.3.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @kkuffour/solid-moderation-plugin

Content moderation plugin for Community Solid Server using SightEngine API.

## Status

✅ **Functional** - Uses CSS ExtensionHandler pattern (v0.3.0+)

## Installation

```bash
npm install @solid/community-server
npm install @kkuffour/solid-moderation-plugin
```

## Configuration

Set environment variables:

```bash
export SIGHTENGINE_API_USER="your_api_user"
export SIGHTENGINE_API_SECRET="your_api_secret"
```

Run CSS with the plugin:

```bash
npx community-solid-server \
  -c @css:config/file.json \
  -c @kkuffour/solid-moderation-plugin:config/default.json \
  -f data/ -p 3000
```

## How It Works

The plugin uses CSS's `ExtensionHandler` pattern to intercept POST/PUT/PATCH operations before they reach storage:

1. Handler runs first in the operation chain
2. Moderates image/video/text content using SightEngine API
3. Blocks inappropriate content with 403 Forbidden
4. Passes approved content to standard handlers

## Components

- `ModerationHandler` - OperationHandler that moderates POST/PUT/PATCH operations
- `SightEngineProvider` - SightEngine API client

## License

MIT
npm package: @kkurko/react-native-session-stats
Description: Package provides context with info about your sessions
Author: Kirill Kurko
Latest version: 1.2.2

# react-native-session-stats

Package provides context that stores information about user session. Next information is available - `timeSpent`, `sessionCount` and `lastSessionEnd`. Package can be used for internal analytics, as well as for implementing UI user will interact with. Some possible use cases are:
- show user session time;
- show popup, based on session count or session time;
- log out user after specified session time;
- send warning push notifications on session end.

## Install

```
// npm usage
npm i @kkurko/react-native-session-stats

// yarn usage
yarn add @kkurko/react-native-session-stats
```

## Usage

The `SessionStats` component takes two props: `onSessionStart` is fired when the app's state changes to `active`, `onSessionEnd`, when it changes to `inactive` or `background`.

```javascript
import SessionStats from '@kkurko/react-native-session-stats';

// ...

<SessionStats
  onSessionStart={({
    timeSpent, // total time spent, in seconds
    sessionCount, // number of sessions as of at opening the app
    lastSessionEnd, // timestamp of the last session end
  }) => { /* ... */ }}
  onSessionEnd={({
    timeSpent, // total time spent in seconds
    sessionCount, // and number of sessions as of at closing the app
    lastSessionEnd, // timestamp of the last session end
    sessionDuration, // the length of the ending session, in seconds
  }) => { /* ... */ }}
/>
```
 
`SessionStats` is used as a context provider

```javascript
import SessionStats from '@kkurko/react-native-session-stats';

// ...

<SessionStats>
  <App />
<SessionStats/>
```

Values are available via `useSessionStats` hook:

```javascript
import { useSessionStats } from '@kkurko/react-native-session-stats';

const SomeComponent = () => {
    const { timeSpent, sessionCount, lastSessionEnd } = useSessionStats();
    //...
};
```


or via `sessionStatsContext` and `useContext` hook:

```javascript
import { useContext } from 'react';
import { sessionStatsContext } from '@kkurko/react-native-session-stats';

const SomeComponent = () => {
    const { timeSpent, sessionCount, lastSessionEnd } = useContext(sessionStatsContext);
    //...
};
```
npm package: @kkurko/storybook-react-svgr
Description: Storybook SVGR plugin for react to allow imports of .svg files
Author: Kirill Kurko
Latest version: 1.1.0

# Storybook React SVGR
This plugin will add the same CRA useful behaviour on storybook regarding SVG.

For using it:
1. run `npm install -D @kkurko/storybook-react-svgr` or `yarn add -D @kkurko/storybook-react-svgr`.
   1.just add the following plugin on your `./storybook/main.js`:

```diff
  module.exports = {
    addons: [
+     '@kkurko/storybook-react-svgr',
    ]
  }
```
npm package: @kkx-org/args
Description: Parse CLI arguments, create CLI apps
Author: 33KK
Latest version: 0.0.5

# `@kkx-org/args`

Parse CLI arguments, create CLI apps.

## Installation

```bash
npm install @kkx-org/args
```

## Usage

```typescript
import { App, HelpGenerators } from "@kkx-org/args";

const app = new App({
	id: "test-app",
	description: "test app",
	flags: [
		{
			id: "test",
			description: "test option",
			options: ["true"],
			keys: ["-t", "--test"],
			acceptsValue: false,
		},
	],
	positional: [
		{
			id: "message",
		},
	],
	subcommands: [
		{
			id: "test",
			description: "test subcommand",
			keys: ["test", "t"],
		},
	],
});

// Automatically add options for --help and -h
app.autoHelp();

const helpGen = HelpGenerators.DefaultHelpGenerator();

app.run((cmd) => {
	let { message } = cmd.positional;

	cmd.matchCommand({
		_default: (cmd) => {
			if (cmd.flags.help) {
				console.log("help");
			}
		},
		_help: (cmd) => {
			console.log(helpGen.generate(cmd));
		},
		test: (cmd) => {
			cmd.matchCommand({
				_default: (cmd) => {
					console.log(message ? message[0] : "no message passed in");
				},
				_help: (cmd) => {
					console.log(helpGen.generate(cmd));
				},
			});
		},
	});
});
```
npm package: @kl-kim/ali-lowcode-components
Description: @kl-kim/ali-lowcode-components
Author: fusion-team
Latest version: 0.0.1

# @kl-kim/ali-lowcode-components

一个面向 PC 的业务组件库

## 调试
启动调试

```
npm run lowcode:dev             # 打开开发环境，运行所有组件
```

构建

```
npm run lowcode:build
```
npm package: @kl-kim/my-components
Description: my-components
Author: fusion-team
Latest version: 0.1.3

# my-components

一个面向 PC 的业务组件库

## 调试
启动调试

```
npm run lowcode:dev             # 打开开发环境，运行所有组件
```

构建

```
npm run lowcode:build
```
npm package: @kl-kim/vue-components
Description: A collection of Vue 3 components including CommonTable, BusinessForm, and BusinessFormItem
Author: klkim
Latest version: 0.0.8

# my-vue-components

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

## Customize configuration

See [Vite Configuration Reference](https://vite.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Compile and Minify for Production

```sh
npm run build
```