open-index/open-npm huggingface dataset:
npm package: @onein-frontend/workflow-form-components
Description: 万应工厂表单设计器相关组件
Author: leekoho
Latest version: 0.3.63

# 组件列表
- 表单预览器(`generate-form`)
- 用户选择弹框(`user-picker-dialog`)
- 部门&用户选择弹框(`department-user-picker-dialog`)


# generate-form

### Props
| 参数 | 说明 | 类型 | 是否必传 | 默认值 |
| --- | --- | --- | --- | --- |
| widget-forms | 通过表单设计器生成的配置数据 | object | 是 | -- |
| proc-id | 流程ID | number &#124; string | 是 | -- |
| proc-instance-id | 流程实例ID | number &#124; string | 否 | -- |
| platform | 平台 | 'desktop' &#124; 'mobile' | 否 | mobile |
| editable | 是否可编辑 | boolean | 否 | true|
| auth-list | 权限列表 | Auth[] | 否 | [] |
| data-list | 默认数据列表 | Data[] | 否 | [] |
| on-file-click | 文件上传控件点击文件时的钩子 | Function | 否 | 下载文件 |

### 方法
通过 ref 可以获取到 GenerateForm 实例并调用实例方法

| 方法名 | 说明 | 参数 | 返回值 |
| --- | --- | --- | --- |
| getFormData | 获取表单填写的数据, 并整理成后台需要的格式 | - | 如果表单校验通过则返回: `[ { fieldUuid: '', fieldName: '', fieldValue: '', fieldAlias: '' } ]`, 未校验通过则会return new Error() |
npm package: @oneirosoft/elysia-results
Description: Return HTTP results from Elysia endpoints.
Author: Oneiro Contributor
Latest version: 0.5.0

# Elysia with Bun runtime

## Getting Started
To get started with this template, simply paste this command into your terminal:
```bash
bun create elysia ./elysia-example
```

## Development
To start the development server run:
```bash
bun run dev
```

Open http://localhost:3000/ with your browser to see the result.
npm package: @oneisland/gcode
Description: A simple library for generating G-Code in Javascript
Latest version: 0.0.2

<p align="center">
  <a href="https://github.com/oneislandearth/gcode" target="_blank">
    <img src="https://i.imgur.com/yRaNfsL.png">
  </a>
</p>

<p align="center">
  <a href="https://greenkeeper.io" target="_blank">
  <img src="https://badges.greenkeeper.io/oneislandearth/gcode.svg"></a>
  <a href="https://travis-ci.org" target="_blank">
  <img src="https://api.travis-ci.org/oneislandearth/gcode.svg?branch=master"></a>
  <a href="https://packagephobia.now.sh/result?p=@oneisland/gcode" target="_blank">
  <img src="https://packagephobia.now.sh/badge?p=@oneisland/gcode"></a>
  <a href="https://snyk.io/vuln/search?q=@oneisland/gcode&type=npm" target="_blank">
  <img src="https://img.shields.io/snyk/vulnerabilities/github/oneislandearth/gcode.svg"></a>
  <a href="https://www.npmjs.com/package/@oneisland/gcode" target="_blank">
  <img src="https://img.shields.io/npm/l/@oneisland/gcode.svg"></a>
</p>

***

A simple library for generating G-Code in Javascript

## Installation

[GCode](https://github.com/oneislandearth/gcode) is available through the [npm registry](https://www.npmjs.com/package/@oneisland/gcode):

```bash
$ npm install @oneisland/gcode
```

## Usage

After installing GCode you can use the module like so:

###### example-usage.js
```js
// Import the library
import { GCode } from '@oneisland/gcode';

// Create a new code section
const code = new GCode({

  // Define the script name
  name: '123',

  // Define the scale to use (default is mm)
  units: 'cm',
  
  // Define the starting x and y position
  start: [0, 0],

  // Set the clearance height to 10cm
  clearance: 10,
});

// Start the spindle
code.startSpindle();

// Start the coolant
code.startCoolant();

// Drop the mill to the bottom of the board
code.dropMill();

// Cut lengthways 65.5cm
code.feedLinear([0, 65.5]);

// Cut sideways 23.4cm
code.feedLinear([23.4, 65.5]);

// Cut diagonally to a point (12.28cm sideways, midpoint lengthways)
code.feedLinear([12.8, (65.5 / 2)]);

// Cut back to the start lengthways
code.feedLinear([12.8, 0])

// Cut back to the starting point
code.feedLinear([0, 0]);

// Output the code to console
console.log(String(code));
```

Execute the example code:

```bash
$ node example-usage.js
```

Expected output:

```
%
O123
N001 G21
N002 G91
N003 G00 Z100 F500
N004 G00 X0 Y0 F500
N005 M03
N006 M07
N007 G00 Z0 F500
N008 G01 X0 Y655 F500
N009 G01 X234 Y655 F500
N010 G01 X128 Y327.5 F500
N011 G01 X128 Y0 F500
N012 G01 X0 Y0 F500
N013 M05
N014 M09
N015 G00 Z100 F500
N016 M30
%
```

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2019-present, OneIsland Limited
npm package: @oneisland/graphics
Description: A fast and lightweight 3D graphics engine for the web
Latest version: 0.0.1

<p align="center">
  <a href="https://github.com/oneislandearth/graphics" target="_blank">
    <img src="https://i.imgur.com/ykr34Oc.png">
  </a>
</p>

***

A fast and lightweight 3D graphics engine for the web

## Overview

- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [License](#license)

## Installation

[@oneisland/graphics](https://github.com/oneislandearth/graphics) is available through the [npm registry](https://www.npmjs.com/package/@oneisland/graphics):

```bash
$ npm install @onesland/graphics
```

## Usage

Creating a simple animation of a rotating cube:<br>

###### cube.js

```js
// Define the vertices for the cube
const vertices = [
  [-1, -1, 1],
  [ 1, -1, 1],
  [ 1, -1, -1],
  [-1, -1, -1],
  [-1, 1, 1],
  [ 1, 1, 1],
  [ 1, 1, -1],
  [-1, 1, -1]
];

// Define the faces for the cube
const faces = [
  [2, 3, 0],
  [0, 1, 2],
  [7, 3, 0],
  [0, 4, 7],
  [4, 0, 1],
  [1, 5, 4],
  [6, 2, 3],
  [3, 7, 6],
  [5, 1, 2],
  [2, 6, 5],
  [7, 4, 5],
  [5, 6, 7]
];
```

###### engine.js

```js
// Create the engine
const engine = new Engine('#engine', async({ canvas, context }) => {

  // Create a scene
  const scene = new Scene('scene', { canvas, context });

  // Create a cube
  const cube = new Mesh('cube', { vertices, faces, scene });

  // Create an animation to rotate the mesh
  const animation = new Animation('rotate', (mesh, delta) => mesh.rotate());

  // Add the animation to the cube
  cube.addAnimation(animation);

  // Return the scene
  return scene;
});

// Show the frames per second
engine.showFPS();
```

###### index.html

```html
<!doctype html>
<html lang="en">
  <head>    
    <meta charset="utf-8">
    <title>@oneisland/graphics</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Load the dependencies -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js" defer></script>

    <!-- Load the engine  -->
    <script src="./dist/bundle.js" defer></script>

    <!-- Define the cube data -->
    <script src="./cube.js" defer></script>

    <!-- Create an engine -->
    <script src="./engine.js" defer></script>

    <!-- Define the styling -->
    <style>
      html, body {
        width: 100vw;
        height: 100vh;
        padding: 0;
        margin: 0;
      }
      canvas {
        padding: 0;
        margin: 0;
      }
    </style>
  </head>
  <body>

    <!-- Define the element to bind the engine to -->
    <canvas id="engine"></canvas>
  </body>
</html>
```

[View this example live](https://oneislandearth.github.io/graphics/example/)

## Documentation

[Check out the full documentation](https://github.com/oneislandearth/graphics/blob/master/docs/README.md)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2021-present, OneIsland Limited
npm package: @oneisland/math
Description: A simple library which extends mathjs for doing math in JavaScript
Latest version: 0.0.4

<p align="center">
  <a href="https://github.com/oneislandearth/math" target="_blank">
    <img src="https://i.imgur.com/MEpwqAz.png">
  </a>
</p>

<p align="center">
  <a href="https://greenkeeper.io" target="_blank">
  <img src="https://badges.greenkeeper.io/oneislandearth/math.svg"></a>
  <a href="https://travis-ci.org" target="_blank">
  <img src="https://api.travis-ci.org/oneislandearth/math.svg?branch=master"></a>
  <a href="https://packagephobia.now.sh/result?p=@oneisland/math" target="_blank">
  <img src="https://packagephobia.now.sh/badge?p=@oneisland/math"></a>
  <a href="https://snyk.io/vuln/search?q=@oneisland/math&type=npm" target="_blank">
  <img src="https://img.shields.io/snyk/vulnerabilities/github/oneislandearth/math.svg"></a>
  <a href="https://www.npmjs.com/package/@oneisland/math" target="_blank">
  <img src="https://img.shields.io/npm/l/@oneisland/math.svg"></a>
</p>

***

A simple library which extends mathjs for doing math in JavaScript

## Documentation

[Check out the latest documentation](https://mathjs.org/docs/index.html)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2019-present, OneIsland Limited
npm package: @oneisland/mesh
Description: A simple library for creating and working with 3D meshes in Javascript
Latest version: 0.0.3

<p align="center">
  <a href="https://github.com/oneislandearth/mesh" target="_blank">
    <img src="https://i.imgur.com/4wlfmqJ.png">
  </a>
</p>

<p align="center">
  <a href="https://greenkeeper.io" target="_blank">
  <img src="https://badges.greenkeeper.io/oneislandearth/mesh.svg"></a>
  <a href="https://travis-ci.org" target="_blank">
  <img src="https://api.travis-ci.org/oneislandearth/mesh.svg?branch=master"></a>
  <a href="https://www.npmjs.com/package/@oneisland/mesh" target="_blank">
  <img src="https://img.shields.io/npm/l/@oneisland/mesh.svg"></a>
</p>

***

A simple library for creating and working with 3D meshes in Javascript

## Documentation

[Check out the latest documentation](https://github.com/oneislandearth/mesh/tree/master/docs)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2019-present, OneIsland Limited
npm package: @oneisland/module-packer
Description: Quick and easy packaging of libraries and modules
Latest version: 0.0.16

# @oneisland/module-packer

Quick and easy packaging of libraries and modules

## Installation

Install the package via npm

```bash
npm install @oneisland/module-packer
```

## Usage

Setup a new library or module

```bash
module-packer init [name]
```

Package up a library or module using `webpack`

```bash
module-packer build [webpack-cli-flags]
```

Package up and watch a library or module using `webpack -w`

```bash
module-packer watch [webpack-cli-flags]
```

Package up and serve a library or module using `webpack serve`

```bash
module-packer serve [webpack-cli-flags]
```

Execute any tests defined in the libary or module using [ava](https://github.com/avajs/ava/blob/main/docs/03-assertions.md)

```bash
module-packer test [ava-flags]
```
npm package: @oneisland/worker-module
Description: A simpler way of creating WebWorkers for any application
Latest version: 0.0.2

# @oneisland/worker-module

A simpler way of creating WebWorkers for any application

## Overview

Designed to make the process of creating applications using WebWorkers much easier when communicating between the main frame and the WebWorkers

It's time to say no more to `onmessage` and `postmessage` events and generate useful WebWorkers with ease

Simply [define your worker class](#defining-a-worker-with-workermodule) by extending `WorkerModule` and compile using the [webpack loader](#webpack-configuration)

You'll be able to [interact with your worker](#using-a-worker-from-within-an-app) as if it were any other class instantiation from within your application

## Installation

Install the package via npm

```bash
npm install @oneisland/worker-module
```

## Usage

### Defining a worker with WorkerModule

See [example/src/sqrt.worker.js](https://github.com/oneislandearth/worker-module/blob/main/example/src/sqrt.worker.js)

```js
// Import the worker module
import { WorkerModule } from '@oneisland/worker-module';

// Create a worker to solve square roots
export class SquareRootWorker extends WorkerModule {
  
  // Instantiate as a WorkerModule
  constructor() { super() }

  // Perform a calculation
  calculate(number) {
    return Math.sqrt(number).toFixed(2);
  }
}
```

### Using a worker from within an app

See [example/src/app.js](https://github.com/oneislandearth/worker-module/blob/main/example/src/app.js)

```js
// Import the worker
import { SquareRootWorker } from './sqrt.worker';

// Create an instance of the worker
const sqrt = new SquareRootWorker();

// Define the computation event
const render = async({ target }) => {

  // Compute the results
  const result = await sqrt.calculate(target.value);
  
  // Update the result
  document.querySelector('#output').innerHTML = `${result}<br>(rounded)`;
};

// Set the value to a random value
document.querySelector('#input').value = Math.floor(Math.random() * 10000 + 1)

// Bind the event listener
document.querySelector('#input').addEventListener('input', render);

// Trigger a rendering
document.querySelector('#input').dispatchEvent(new Event('input'));
```

### Webpack configuration

See [example/webpack.config.js](https://github.com/oneislandearth/worker-module/blob/main/example/webpack.config.js)

```js
// Webpack rules for building
module.exports = {
  entry: `${__dirname}/src/app.js`,
  output: {
    publicPath: `/`,
    path: `${__dirname}/dist/`,
    filename: `app.js`,
  },
  module: {
    rules: [{
      test: /(.*)(?:worker\.js)$/,
      loader: `@oneisland/worker-module/loader`,
      options: {
        publicPath: `/`,
        path: `${__dirname}/dist/`,
        filename: `[name].js`
      }
    }]
  },
  devServer: {
    contentBase: `${__dirname}/dist/`,
    compress: true,
    port: 8080
  }
};
```

### More details

See the [example directory](https://github.com/oneislandearth/worker-module/tree/main/example) for further information