@steedos-widgets/antd 6.10.34-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022, Steedos Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Builder Widgets
2
+
3
+ Adds widgets for Steedos Page editing.
4
+
5
+ ## How to use it
6
+
7
+ 在华炎魔方项目中把开发好并发布到npm仓库的资产包地址配置到环境变量STEEDOS_PUBLIC_PAGE_ASSETURLS中即可。
8
+
9
+ ```bash
10
+ STEEDOS_PUBLIC_PAGE_ASSETURLS=https://unpkg.com/@steedos-widgets/example@0.0.4/dist/assets.json
11
+ ```
12
+
13
+ 资产包的地址只要可以访问即可,它可以是发布到npm的包(unpkg.com)地址,也可以是其他任何可以被当前服务访问的地址,比如在远程开发环境中公开的资产包地址。
14
+
15
+ 示例项目 [with-amis-custom-components](https://github.com/steedos/steedos-examples/tree/main/with-amis-custom-components) 完整演示了如何在魔方项目中引用自定义资产包来实现自定义 amis 组件。
16
+
17
+ ## 资产包开发
18
+
19
+ 资产包最终输出的是一个可访问的静态json文件,一般命名为 `assets.json`。
20
+
21
+ ### 资产包内容
22
+
23
+ 以下是一个引用了自定义组件的资产包内容示例。
24
+
25
+ ```json
26
+ // https://unpkg.com/@steedos-widgets/example@0.0.4/dist/assets.json
27
+ {
28
+ "packages": [
29
+ {
30
+ "package": "@steedos-widgets/example",
31
+ "urls": [
32
+ "https://unpkg.com/@steedos-widgets/example@0.0.6/dist/example.umd.min.js",
33
+ "https://unpkg.com/@steedos-widgets/example@0.0.6/dist/example.umd.css"
34
+ ],
35
+ "library": "BuilderExample"
36
+ }
37
+ ],
38
+ "components": [
39
+ {
40
+ "exportName": "BuilderExampleWidgetsMeta",
41
+ "npm": {
42
+ "package": "@steedos-widgets/example"
43
+ },
44
+ "url": "https://unpkg.com/@steedos-widgets/example@0.0.6/dist/meta.js",
45
+ "urls": {
46
+ "default": "https://unpkg.com/@steedos-widgets/example@0.0.6/dist/meta.js",
47
+ "design": "https://unpkg.com/@steedos-widgets/example@0.0.6/dist/meta.js"
48
+ }
49
+ }
50
+ ]
51
+ }
52
+ ```
53
+
54
+ 资产包分为组件本身和组件可配置属性(meta.js)两部分的资源地址,可以为它们配置npm包名称以及发布到npm仓库的静态访问地址,如果本地已经安装了npm包的话,默认会直接访问本地安装的npm包中的资源文件,否则将重定向到 `urls` 属性中配置的远程资源文件。
55
+
56
+ #### 输出自定义组件
57
+
58
+ 在 `packages` 节点配置的是自定义组件资源。
59
+ - package: 发布到npm仓库中的包名称。
60
+ - urls: 自定义组件发布到npm仓库后的地址,需要使用 [rollupjs](https://rollupjs.org/) 打包为 `umd` 格式的资源文件。
61
+ - library: 输出的全局变量名称,可以在`window`下访问到该变量。
62
+
63
+ #### 输出自定义组件可配置属性
64
+
65
+ 在 `components` 节点配置的是自定义组件在设计器中的可配置属性资源,用于把自定义组件集成到微页面引擎,比如amis中。
66
+ - exportName: 输出的全局变量名称,可以在`window`下访问到该变量。
67
+ - npm.package: 发布到npm仓库中的包名称。
68
+ - url: `meta.js` 发布到npm仓库后的地址,需要使用 [rollupjs](https://rollupjs.org/) 打包为 `umd` 格式的资源文件。
69
+ - urls: 同url,区分了设计器和渲染器地址,一般配置为url属性一样的地址。
70
+
71
+ ### 开发
72
+
73
+ 资产包开发主要是需要通过导出配置文件把自定义组件注册到微页面引擎,比如amis中。
74
+
75
+ 本示例中对应的配置文件源码在 `src/metas/Hello.ts`。
76
+
77
+ 关于如何配置相关属性请参考对应的微页面引擎官网文档,比如以下是配置amis引擎时的参考资料:
78
+
79
+ - https://github.com/aisuda/amis-editor-demo/blob/master/README.md
80
+ - https://github.com/aisuda/amis-widget/blob/master/README.md
81
+
82
+ ### 打包
83
+
84
+ 资产包开发最终输出的 `assets.json` 文件中引用的所有静态资源文件都需要打包为umd格式的模块,我们推荐使用工具 [rollupjs](https://rollupjs.org/)。
85
+
86
+ 本示例中只需要执行以下命令即可打包输出相关模块打包后的umd格式文件。
87
+
88
+ ```bash
89
+ yarn build
90
+ ```
91
+
92
+ ### 调式
93
+
94
+ 因为资产包最终输出的静态json文件需要发包到npm仓库后才可以被访问到,这意味着每次改动都需要重新发包才能测试,非常不方便。
95
+
96
+ 所以建议专门输出一个 `assets-dev.json` 文件用于调式,然后使用 `http-server` 这种工具把它公开为静态资源,这样环境变量 `STEEDOS_PUBLIC_PAGE_ASSETURLS` 就可以设置为这个静态资源来测试效果,测试通过后再发版本到npm仓库中。
97
+
98
+ 本示例项目中执行以下指令即可把 `assets-dev.json` 文件公开为可访问的静态资源了。
99
+
100
+ ```bash
101
+ yarn http
102
+ ```
103
+
104
+ ### 发包
105
+
106
+ 开发完成后,请执行 [npm publish](https://docs.npmjs.com/cli/v8/commands/npm-publish) 把打包后的资源文件发布为一个npm包到npm仓库中。
107
+
108
+ ## 组件开发
109
+
110
+ 本示例中开发了一个名为 `Hello` 的组件作为示例说明,为了方便演示示例效果,其源码就放在示例项目的 `src/components` 文件夹中,并且打包脚本会把其源码打包为umd格式的资源文件。
111
+
112
+ 但是我们并不推荐大家在实际项目开发中把组件源码与 widgets 项目源码放在一起,widgets 项目是用来把组件注册到微页面引擎中的,组件本身应该在独立的项目中进行开发、打包和发布,只要最终能像本示例一样通过类似 [rollupjs](https://rollupjs.org/) 的工具打包为umd格式的资源文件即可。
File without changes
@@ -0,0 +1,100 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ (function (global, factory) {
3
+ (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('antd')) : typeof define === 'function' && define.amd ? define(['exports', 'react', 'antd'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BuilderAntd = {}, global.React, global.antd));
4
+ })(this, function (exports, React, antd) {
5
+ var global = window;
6
+ function _interopDefaultLegacy(e) {
7
+ return e && _typeof(e) === 'object' && 'default' in e ? e : {
8
+ 'default': e
9
+ };
10
+ }
11
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
+
13
+ /******************************************************************************
14
+ Copyright (c) Microsoft Corporation.
15
+ Permission to use, copy, modify, and/or distribute this software for any
16
+ purpose with or without fee is hereby granted.
17
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
18
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
20
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
+ PERFORMANCE OF THIS SOFTWARE.
24
+ ***************************************************************************** */
25
+
26
+ var _assign = function __assign() {
27
+ _assign = Object.assign || function __assign(t) {
28
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
29
+ s = arguments[i];
30
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
31
+ }
32
+ return t;
33
+ };
34
+ return _assign.apply(this, arguments);
35
+ };
36
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
37
+ var e = new Error(message);
38
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
39
+ };
40
+
41
+ // 使用 Amis 的 FormItem HOC 包装,可以自动处理数据绑定
42
+ var AntdSelect = function AntdSelect(props) {
43
+ var value = props.value,
44
+ onChange = props.onChange,
45
+ amisOptions = props.options,
46
+ _a = props.placeholder,
47
+ placeholder = _a === void 0 ? '请选择' : _a,
48
+ _b = props.isLoading,
49
+ isLoading = _b === void 0 ? false : _b,
50
+ _c = props.selectProps,
51
+ selectProps = _c === void 0 ? {} : _c,
52
+ cx = props.classnames;
53
+ // 1. 格式化选项:将 Amis 的 Options 转换为 Antd Select 的 Options
54
+ // Amis Options 默认是 { label: string, value: any } 结构
55
+ var antdOptions = React.useMemo(function () {
56
+ return (amisOptions || []).map(function (item) {
57
+ return {
58
+ label: item.label,
59
+ value: item.value,
60
+ disabled: item.disabled
61
+ };
62
+ });
63
+ }, [amisOptions]);
64
+ // 2. 处理 loading 状态
65
+ if (isLoading) {
66
+ return React__default["default"].createElement(antd.Spin, {
67
+ style: {
68
+ width: '100%',
69
+ display: 'block'
70
+ }
71
+ });
72
+ }
73
+ // 3. 处理值变化
74
+ var handleChange = function handleChange(newValue) {
75
+ // 关键:通过 props.onChange 将值回传给 Amis 表单
76
+ onChange(newValue);
77
+ };
78
+ return React__default["default"].createElement("div", {
79
+ className: cx('AntdSelect-Wrapper', props.className)
80
+ }, React__default["default"].createElement(antd.Select
81
+ // 绑定值和 onChange 事件
82
+ , _assign({
83
+ // 绑定值和 onChange 事件
84
+ value: value,
85
+ onChange: handleChange,
86
+ // 渲染选项
87
+ options: antdOptions,
88
+ // antd Select 默认属性
89
+ placeholder: placeholder,
90
+ allowClear: true,
91
+ style: {
92
+ width: '100%'
93
+ }
94
+ }, selectProps)));
95
+ };
96
+ exports.AntdSelect = AntdSelect;
97
+ Object.defineProperty(exports, '__esModule', {
98
+ value: true
99
+ });
100
+ });
@@ -0,0 +1,39 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "dayjs",
5
+ "urls": [
6
+ "https://unpkg.steedos.cn/dayjs@1.11.19/dayjs.min.js"
7
+ ],
8
+ "library": "dayjs"
9
+ },
10
+ {
11
+ "package": "antd",
12
+ "urls": [
13
+ "https://unpkg.steedos.cn/antd@5.29.1/dist/antd.min.js"
14
+ ],
15
+ "library": "antd"
16
+ },
17
+ {
18
+ "package": "@steedos-widgets/antd",
19
+ "urls": [
20
+ "http://127.0.0.1:8080/@steedos-widgets/antd/dist/antd.umd.js",
21
+ "http://127.0.0.1:8080/@steedos-widgets/antd/dist/antd.umd.css"
22
+ ],
23
+ "library": "BuilderAntd"
24
+ }
25
+ ],
26
+ "components": [
27
+ {
28
+ "exportName": "BuilderAntdMeta",
29
+ "npm": {
30
+ "package": "@steedos-widgets/antd"
31
+ },
32
+ "url": "http://127.0.0.1:8080/@steedos-widgets/antd/dist/meta.js",
33
+ "urls": {
34
+ "default": "http://127.0.0.1:8080/@steedos-widgets/antd/dist/meta.js",
35
+ "design": "http://127.0.0.1:8080/@steedos-widgets/antd/dist/meta.js"
36
+ }
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "dayjs",
5
+ "urls": [
6
+ "https://unpkg.com/dayjs@1.11.19/dayjs.min.js"
7
+ ],
8
+ "library": "dayjs"
9
+ },
10
+ {
11
+ "package": "antd",
12
+ "urls": [
13
+ "https://unpkg.com/antd@5.29.1/dist/antd.min.js"
14
+ ],
15
+ "library": "antd"
16
+ },
17
+ {
18
+ "package": "@steedos-widgets/antd",
19
+ "urls": [
20
+ "https://unpkg.com/@steedos-widgets/antd@6.10.34-beta.10/dist/antd.umd.js",
21
+ "https://unpkg.com/@steedos-widgets/antd@6.10.34-beta.10/dist/antd.umd.css"
22
+ ],
23
+ "library": "BuilderAntd"
24
+ }
25
+ ],
26
+ "components": [
27
+ {
28
+ "exportName": "BuilderAntdMeta",
29
+ "npm": {
30
+ "package": "@steedos-widgets/antd"
31
+ },
32
+ "url": "https://unpkg.com/@steedos-widgets/antd@6.10.34-beta.10/dist/meta.js",
33
+ "urls": {
34
+ "default": "https://unpkg.com/@steedos-widgets/antd@6.10.34-beta.10/dist/meta.js",
35
+ "design": "https://unpkg.com/@steedos-widgets/antd@6.10.34-beta.10/dist/meta.js"
36
+ }
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './Select.css';
3
+ declare const AntdSelect: React.FC<any>;
4
+ export { AntdSelect };
@@ -0,0 +1 @@
1
+ export * from './Select';
@@ -0,0 +1 @@
1
+ export * from './components';
package/dist/meta.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ components: any[];
3
+ };
4
+ export default _default;
package/dist/meta.js ADDED
@@ -0,0 +1,181 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BuilderAntdMeta = factory());
5
+ })(this, (function () { 'use strict';
6
+
7
+ /******************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+
22
+ var __assign = function() {
23
+ __assign = Object.assign || function __assign(t) {
24
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
25
+ s = arguments[i];
26
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
27
+ }
28
+ return t;
29
+ };
30
+ return __assign.apply(this, arguments);
31
+ };
32
+
33
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
+ var e = new Error(message);
35
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
+ };
37
+
38
+ /*
39
+ * @Description: Configuration definition for the Antd Select Amis Custom Component.
40
+ */
41
+ // Removed i18next dependency (t function)
42
+ var config = {
43
+ // 1. Base Configuration
44
+ group: 'Antd',
45
+ componentName: "AntdSelect",
46
+ title: 'Select',
47
+ docUrl: "",
48
+ screenshot: "",
49
+ npm: {
50
+ package: "@steedos-widgets/antd", // Replace with your actual package name
51
+ version: "{{version}}",
52
+ exportName: "AntdSelect",
53
+ main: "",
54
+ destructuring: true,
55
+ subName: ""
56
+ },
57
+ preview: {
58
+ placeholder: "Please select",
59
+ options: [
60
+ { label: 'Option 1', value: '1' },
61
+ { label: 'Option 2', value: '2' },
62
+ ]
63
+ },
64
+ targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
65
+ engines: ["amis"],
66
+ // 2. Amis Core Configuration
67
+ amis: {
68
+ name: 'antd-select', // Amis Renderer Type Name
69
+ icon: "fa-fw fa fa-angle-down" // Icon for the component
70
+ }
71
+ };
72
+ var Select = __assign(__assign({}, config), {
73
+ // 3. Snippets Configuration
74
+ snippets: [
75
+ {
76
+ title: config.title,
77
+ screenshot: "",
78
+ schema: {
79
+ componentName: config.componentName,
80
+ props: config.preview
81
+ }
82
+ }
83
+ ],
84
+ // 4. Amis Renderer and Editor Plugin Configuration
85
+ amis: {
86
+ // Renderer Registration Info
87
+ render: {
88
+ type: config.amis.name,
89
+ usage: "formitem", // Declares this as a form item component
90
+ weight: 1,
91
+ framework: "react"
92
+ },
93
+ // Editor Plugin Configuration
94
+ plugin: {
95
+ rendererName: config.amis.name,
96
+ $schema: '/schemas/FormItem.json',
97
+ name: config.title,
98
+ description: config.title,
99
+ tags: [config.group],
100
+ order: -9999,
101
+ icon: config.amis.icon,
102
+ // Default scaffolding structure
103
+ scaffold: {
104
+ type: config.amis.name,
105
+ label: config.title,
106
+ options: [
107
+ { label: 'Option One', value: 'one' },
108
+ { label: 'Option Two', value: 'two' },
109
+ ]
110
+ },
111
+ previewSchema: { type: config.amis.name, label: 'Preview', placeholder: 'Please select' },
112
+ panelTitle: 'Select Dropdown Settings',
113
+ // Controls for the editor's right-side property panel
114
+ panelControls: [
115
+ // ====== Basic Properties ======
116
+ {
117
+ type: 'text',
118
+ name: 'label',
119
+ label: 'Label'
120
+ },
121
+ {
122
+ type: 'text',
123
+ name: 'name',
124
+ label: 'Field Name'
125
+ },
126
+ {
127
+ type: 'text',
128
+ name: 'placeholder',
129
+ label: 'Placeholder Text'
130
+ },
131
+ // ====== Options Configuration ======
132
+ {
133
+ type: 'combo',
134
+ name: 'options',
135
+ label: 'Options Configuration',
136
+ multiple: true,
137
+ items: [
138
+ { type: 'text', name: 'label', label: 'Display Value' },
139
+ { type: 'text', name: 'value', label: 'Actual Value' }
140
+ ]
141
+ },
142
+ {
143
+ type: 'switch',
144
+ name: 'selectProps.showSearch', // Maps to the selectProps object
145
+ label: 'Searchable',
146
+ pipeIn: function (value) { return value !== false; },
147
+ },
148
+ {
149
+ type: 'select',
150
+ name: 'selectProps.mode',
151
+ label: 'Selection Mode',
152
+ options: [
153
+ { label: 'Single Select (Default)', value: undefined },
154
+ { label: 'Multiple Select', value: 'multiple' },
155
+ { label: 'Tags', value: 'tags' }
156
+ ]
157
+ },
158
+ {
159
+ type: 'switch',
160
+ name: 'required', // Amis Form validation property
161
+ label: 'Is Required',
162
+ }
163
+ ]
164
+ }
165
+ } });
166
+
167
+ /*
168
+ * @Author: baozhoutao@steedos.com
169
+ * @Date: 2022-08-31 16:32:35
170
+ * @LastEditors: baozhoutao@steedos.com
171
+ * @LastEditTime: 2022-09-01 18:46:29
172
+ * @Description:
173
+ */
174
+ var components = [Select];
175
+ var meta = {
176
+ components: components
177
+ };
178
+
179
+ return meta;
180
+
181
+ }));
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './Select.css';
3
+ declare const AntdSelect: React.FC<any>;
4
+ export { AntdSelect };
@@ -0,0 +1 @@
1
+ export * from './Select';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ components: any[];
3
+ };
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@steedos-widgets/antd",
3
+ "private": false,
4
+ "version": "6.10.34-beta.10",
5
+ "main": "dist/antd.cjs.js",
6
+ "module": "dist/antd.esm.js",
7
+ "unpkg": "dist/antd.umd.js",
8
+ "typings": "dist/antd.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "prebuild": "rimraf dist",
14
+ "http": "npx http-server ../ --port 8080 --cors -c -1",
15
+ "build": "yarn build-types && yarn build-rollup",
16
+ "build-types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
17
+ "build-rollup": "rollup -c rollup.config.ts"
18
+ },
19
+ "license": "MIT",
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "devDependencies": {
24
+ "@rollup/plugin-babel": "^5.3.1",
25
+ "@rollup/plugin-commonjs": "^29.0.0",
26
+ "@rollup/plugin-node-resolve": "^13.1.3",
27
+ "@rollup/plugin-typescript": "^8.4.0",
28
+ "@types/react": "^18.0.8",
29
+ "@types/react-dom": "^18.0.6",
30
+ "react": "18.2.0",
31
+ "react-dom": "18.2.0",
32
+ "rollup": "^2.79.2",
33
+ "rollup-plugin-alias": "^2.2.0",
34
+ "rollup-plugin-external-globals": "^0.6.1",
35
+ "rollup-plugin-json": "^4.0.0",
36
+ "rollup-plugin-node-globals": "^1.4.0",
37
+ "rollup-plugin-node-resolve": "^5.2.0",
38
+ "rollup-plugin-polyfill-node": "^0.8.0",
39
+ "rollup-plugin-postcss": "^4.0.2",
40
+ "rollup-plugin-postcss-webpack-alias-less-loader": "^1.0.0",
41
+ "rollup-plugin-re": "^1.0.7",
42
+ "rollup-plugin-replace": "^2.0.0",
43
+ "rollup-plugin-sourcemaps": "^0.6.3",
44
+ "rollup-plugin-svg": "^2.0.0",
45
+ "rollup-plugin-terser": "^7.0.2",
46
+ "rollup-plugin-tslib-resolve-id": "^0.0.0",
47
+ "rollup-plugin-visualizer": "^5.8.0"
48
+ },
49
+ "gitHead": "71a0b8bd214c7820ea9046ee5610a4f5754cdbb0"
50
+ }