xmirror-components 1.0.13 → 1.0.15
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/README.md +264 -52
- package/build/dist/index.cjs +16 -11
- package/build/dist/index.mjs +1000 -775
- package/build/es/components/AntdApp/index.d.ts +3 -4
- package/build/es/components/AntdApp/index.js +31 -3
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/lib/components/AntdApp/index.js +33 -2
- package/build/lib/index.d.ts +41 -0
- package/build/lib/index.js +3 -1
- package/build/package.json +4 -4
- package/build/types/components/AntdApp/index.d.ts +11 -0
- package/build/types/components/CheckboxValue/index.d.ts +40 -0
- package/build/types/components/IconButton/index.d.ts +42 -0
- package/build/types/components/IconFont/index.d.ts +21 -0
- package/build/types/components/SwitchValue/index.d.ts +30 -0
- package/build/types/hooks/useRequest/index.d.ts +19 -0
- package/build/types/index.d.ts +6 -0
- package/package.json +4 -4
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AppProps } from 'antd';
|
|
2
3
|
import { type MessageInstance } from 'antd/es/message/interface';
|
|
3
4
|
import { type NotificationInstance } from 'antd/es/notification/interface';
|
|
4
5
|
import { type ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
5
6
|
declare let message: MessageInstance;
|
|
6
7
|
declare let notification: NotificationInstance;
|
|
7
8
|
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
8
|
-
declare function Index({ children }:
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}): ReactNode;
|
|
9
|
+
declare function Index({ children, ...props }: AppProps): React.JSX.Element;
|
|
11
10
|
export { message, notification, modal };
|
|
12
11
|
export default Index;
|
|
@@ -1,14 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { App, message as AntdMessage, notification as AntdNotification, Modal as AntdModal } from 'antd';
|
|
2
25
|
var message = AntdMessage;
|
|
3
26
|
var notification = AntdNotification;
|
|
4
27
|
var modal = AntdModal;
|
|
5
|
-
function
|
|
28
|
+
function InitApp(_a) {
|
|
6
29
|
var children = _a.children;
|
|
7
30
|
var staticFunction = App.useApp();
|
|
8
31
|
message = staticFunction.message;
|
|
9
32
|
modal = staticFunction.modal;
|
|
10
33
|
notification = staticFunction.notification;
|
|
11
|
-
return children;
|
|
34
|
+
return children || '';
|
|
35
|
+
}
|
|
36
|
+
function Index(_a) {
|
|
37
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
38
|
+
return (React.createElement(App, __assign({}, props),
|
|
39
|
+
React.createElement(InitApp, null, children)));
|
|
12
40
|
}
|
|
13
41
|
export { message, notification, modal };
|
|
14
42
|
export default Index;
|
package/build/es/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export { default as App, message, notification, modal } from './components/AntdA
|
|
|
2
2
|
export { default as IconFont } from './components/IconFont';
|
|
3
3
|
export { default as CheckboxValue } from './components/CheckboxValue';
|
|
4
4
|
export { default as SwitchValue } from './components/SwitchValue';
|
|
5
|
+
export { default as IconButton } from './components/IconButton';
|
|
5
6
|
export { default as useRequest } from './hooks/useRequest';
|
package/build/es/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { default as App, message, notification, modal } from './components/AntdA
|
|
|
2
2
|
export { default as IconFont } from './components/IconFont';
|
|
3
3
|
export { default as CheckboxValue } from './components/CheckboxValue';
|
|
4
4
|
export { default as SwitchValue } from './components/SwitchValue';
|
|
5
|
+
export { default as IconButton } from './components/IconButton';
|
|
5
6
|
export { default as useRequest } from './hooks/useRequest';
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
2
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
28
|
exports.modal = exports.notification = exports.message = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
4
30
|
var antd_1 = require("antd");
|
|
5
31
|
var message = antd_1.message;
|
|
6
32
|
exports.message = message;
|
|
@@ -8,12 +34,17 @@ var notification = antd_1.notification;
|
|
|
8
34
|
exports.notification = notification;
|
|
9
35
|
var modal = antd_1.Modal;
|
|
10
36
|
exports.modal = modal;
|
|
11
|
-
function
|
|
37
|
+
function InitApp(_a) {
|
|
12
38
|
var children = _a.children;
|
|
13
39
|
var staticFunction = antd_1.App.useApp();
|
|
14
40
|
exports.message = message = staticFunction.message;
|
|
15
41
|
exports.modal = modal = staticFunction.modal;
|
|
16
42
|
exports.notification = notification = staticFunction.notification;
|
|
17
|
-
return children;
|
|
43
|
+
return children || '';
|
|
44
|
+
}
|
|
45
|
+
function Index(_a) {
|
|
46
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
47
|
+
return (react_1.default.createElement(antd_1.App, __assign({}, props),
|
|
48
|
+
react_1.default.createElement(InitApp, null, children)));
|
|
18
49
|
}
|
|
19
50
|
exports.default = Index;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -51,6 +51,47 @@ declare interface CheckboxValueProps<T = any, F = any> extends Omit<React_2.Comp
|
|
|
51
51
|
children?: React_2.ReactNode;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
export declare const IconButton: React_2.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React_2.RefAttributes<any>>;
|
|
55
|
+
|
|
56
|
+
declare interface IconButtonProps {
|
|
57
|
+
/**
|
|
58
|
+
* 图标
|
|
59
|
+
*/
|
|
60
|
+
icon?: React_2.ReactNode | string;
|
|
61
|
+
/**
|
|
62
|
+
* 是否禁用 tooltip
|
|
63
|
+
*/
|
|
64
|
+
tooltipDisabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 点击事件
|
|
67
|
+
*/
|
|
68
|
+
onClick?: (e: React_2.MouseEvent<HTMLElement>) => void;
|
|
69
|
+
/**
|
|
70
|
+
* 是否禁用
|
|
71
|
+
*/
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 大小
|
|
75
|
+
*/
|
|
76
|
+
size?: 'small' | 'middle' | 'large';
|
|
77
|
+
/**
|
|
78
|
+
* 样式
|
|
79
|
+
*/
|
|
80
|
+
style?: React_2.CSSProperties;
|
|
81
|
+
/**
|
|
82
|
+
* 类名
|
|
83
|
+
*/
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 是否加载中
|
|
87
|
+
*/
|
|
88
|
+
loading?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 其他属性
|
|
91
|
+
*/
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}
|
|
94
|
+
|
|
54
95
|
export declare const IconFont: React_2.ForwardRefExoticComponent<((IconFontCommonProps & React_2.HTMLAttributes<HTMLElement> & {
|
|
55
96
|
symbol?: false;
|
|
56
97
|
}) | Omit<IconFontCommonProps & React_2.SVGProps<SVGSVGElement> & {
|
package/build/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useRequest = exports.SwitchValue = exports.CheckboxValue = exports.IconFont = exports.modal = exports.notification = exports.message = exports.App = void 0;
|
|
6
|
+
exports.useRequest = exports.IconButton = exports.SwitchValue = exports.CheckboxValue = exports.IconFont = exports.modal = exports.notification = exports.message = exports.App = void 0;
|
|
7
7
|
var AntdApp_1 = require("./components/AntdApp");
|
|
8
8
|
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return __importDefault(AntdApp_1).default; } });
|
|
9
9
|
Object.defineProperty(exports, "message", { enumerable: true, get: function () { return AntdApp_1.message; } });
|
|
@@ -15,5 +15,7 @@ var CheckboxValue_1 = require("./components/CheckboxValue");
|
|
|
15
15
|
Object.defineProperty(exports, "CheckboxValue", { enumerable: true, get: function () { return __importDefault(CheckboxValue_1).default; } });
|
|
16
16
|
var SwitchValue_1 = require("./components/SwitchValue");
|
|
17
17
|
Object.defineProperty(exports, "SwitchValue", { enumerable: true, get: function () { return __importDefault(SwitchValue_1).default; } });
|
|
18
|
+
var IconButton_1 = require("./components/IconButton");
|
|
19
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return __importDefault(IconButton_1).default; } });
|
|
18
20
|
var useRequest_1 = require("./hooks/useRequest");
|
|
19
21
|
Object.defineProperty(exports, "useRequest", { enumerable: true, get: function () { return __importDefault(useRequest_1).default; } });
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"dev": "vite",
|
|
13
13
|
"build": "npm run build:types && npm run build:es && npm run build:lib && npm run build:dist && npm run build:copy-files",
|
|
14
14
|
"build:copy-files": "cp package.json LICENSE build/",
|
|
15
|
-
"build:types": "tsc -p tsconfig.build.json",
|
|
16
|
-
"build:es": "tsc -p tsconfig.build.json --outDir build/es --module ESNext",
|
|
17
|
-
"build:lib": "tsc -p tsconfig.build.json --outDir build/lib --module CommonJS",
|
|
15
|
+
"build:types": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly true --declarationDir build/types",
|
|
16
|
+
"build:es": "tsc -p tsconfig.build.json --outDir build/es --declaration --declarationDir build/es --module ESNext",
|
|
17
|
+
"build:lib": "tsc -p tsconfig.build.json --outDir build/lib --declaration --declarationDir build/lib --module CommonJS",
|
|
18
18
|
"build:dist": "vite build",
|
|
19
19
|
"lint": "eslint .",
|
|
20
20
|
"preview": "vite preview",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AppProps } from 'antd';
|
|
3
|
+
import { type MessageInstance } from 'antd/es/message/interface';
|
|
4
|
+
import { type NotificationInstance } from 'antd/es/notification/interface';
|
|
5
|
+
import { type ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
6
|
+
declare let message: MessageInstance;
|
|
7
|
+
declare let notification: NotificationInstance;
|
|
8
|
+
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
9
|
+
declare function Index({ children, ...props }: AppProps): React.JSX.Element;
|
|
10
|
+
export { message, notification, modal };
|
|
11
|
+
export default Index;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from 'antd';
|
|
3
|
+
import { type CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
4
|
+
/**
|
|
5
|
+
* checkbox 可自定义 value 和 label
|
|
6
|
+
* 使用场景:
|
|
7
|
+
* 1. 需要自定义 value 和 label
|
|
8
|
+
*/
|
|
9
|
+
interface CheckboxValueProps<T = any, F = any> extends Omit<React.ComponentProps<typeof Checkbox>, 'checked' | 'onChange'> {
|
|
10
|
+
/**
|
|
11
|
+
* 选中值
|
|
12
|
+
*/
|
|
13
|
+
trueValue?: T;
|
|
14
|
+
/**
|
|
15
|
+
* 未选中值
|
|
16
|
+
*/
|
|
17
|
+
falseValue?: F;
|
|
18
|
+
/**
|
|
19
|
+
* 选中值
|
|
20
|
+
*/
|
|
21
|
+
checked?: T | F;
|
|
22
|
+
/**
|
|
23
|
+
* 选中事件
|
|
24
|
+
*/
|
|
25
|
+
onChange?: (value: T | F, event: CheckboxChangeEvent) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 选中标签
|
|
28
|
+
*/
|
|
29
|
+
trueLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 未选中标签
|
|
32
|
+
*/
|
|
33
|
+
falseLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 子元素
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => React.JSX.Element;
|
|
40
|
+
export default CheckboxValue;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { type ForwardedRef } from 'react';
|
|
2
|
+
interface IconButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* 图标
|
|
5
|
+
*/
|
|
6
|
+
icon?: React.ReactNode | string;
|
|
7
|
+
/**
|
|
8
|
+
* 是否禁用 tooltip
|
|
9
|
+
*/
|
|
10
|
+
tooltipDisabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 点击事件
|
|
13
|
+
*/
|
|
14
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
15
|
+
/**
|
|
16
|
+
* 是否禁用
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 大小
|
|
21
|
+
*/
|
|
22
|
+
size?: 'small' | 'middle' | 'large';
|
|
23
|
+
/**
|
|
24
|
+
* 样式
|
|
25
|
+
*/
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
/**
|
|
28
|
+
* 类名
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 是否加载中
|
|
33
|
+
*/
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 其他属性
|
|
37
|
+
*/
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
export declare const Icon: (props: IconButtonProps, buttonRef: ForwardedRef<any>) => React.JSX.Element;
|
|
41
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<any>>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IconFontCommonProps {
|
|
3
|
+
/**
|
|
4
|
+
* 图标类型
|
|
5
|
+
*/
|
|
6
|
+
type: string;
|
|
7
|
+
/**
|
|
8
|
+
* 类名
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 是否使用 symbol 模式
|
|
13
|
+
*/
|
|
14
|
+
symbol?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const IconFont: React.ForwardRefExoticComponent<((IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
17
|
+
symbol?: false;
|
|
18
|
+
}) | Omit<IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
19
|
+
symbol: true;
|
|
20
|
+
}, "ref">) & React.RefAttributes<SVGSVGElement | HTMLElement>>;
|
|
21
|
+
export default IconFont;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SwitchProps } from 'antd/es/switch';
|
|
3
|
+
/**
|
|
4
|
+
* Switch 可自定义 value
|
|
5
|
+
* 使用场景:
|
|
6
|
+
* 1. 需要自定义 value 的 switch
|
|
7
|
+
*/
|
|
8
|
+
interface SwitchValueProps<T = boolean | string | number, F = boolean | string | number> extends Omit<SwitchProps, 'checked' | 'onChange'> {
|
|
9
|
+
/**
|
|
10
|
+
* 选中值
|
|
11
|
+
*/
|
|
12
|
+
trueValue?: T;
|
|
13
|
+
/**
|
|
14
|
+
* 未选中值
|
|
15
|
+
*/
|
|
16
|
+
falseValue?: F;
|
|
17
|
+
/**
|
|
18
|
+
* 选中值
|
|
19
|
+
*/
|
|
20
|
+
checked?: T | F;
|
|
21
|
+
/**
|
|
22
|
+
* 选中事件
|
|
23
|
+
*/
|
|
24
|
+
onChange?: (value: T | F, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Switch 可自定义 value
|
|
28
|
+
*/
|
|
29
|
+
declare const Index: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) => React.JSX.Element;
|
|
30
|
+
export default Index;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Options as OriginalOptions, Plugin, Service, Result as OriginalResult } from 'ahooks/lib/useRequest/src/types';
|
|
2
|
+
interface Options<TData, TParams extends unknown[]> extends OriginalOptions<TData, TParams> {
|
|
3
|
+
/**
|
|
4
|
+
* 是否显示错误信息
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
errorMessage?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface WrappedResult<TData, TParams extends unknown[]> extends Omit<OriginalResult<TData, TParams>, 'data'> {
|
|
10
|
+
/**
|
|
11
|
+
* 直接返回data,而不是返回 { code, data, success } 形式
|
|
12
|
+
* @default data
|
|
13
|
+
*/
|
|
14
|
+
data?: TData extends {
|
|
15
|
+
data: infer U;
|
|
16
|
+
} ? U : TData;
|
|
17
|
+
}
|
|
18
|
+
declare function useWrappedRequest<TData, TParams extends unknown[]>(service: Service<TData, TParams>, options?: Options<TData, TParams>, plugins?: Array<Plugin<TData, TParams>>): WrappedResult<TData, TParams>;
|
|
19
|
+
export default useWrappedRequest;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as App, message, notification, modal } from './components/AntdApp';
|
|
2
|
+
export { default as IconFont } from './components/IconFont';
|
|
3
|
+
export { default as CheckboxValue } from './components/CheckboxValue';
|
|
4
|
+
export { default as SwitchValue } from './components/SwitchValue';
|
|
5
|
+
export { default as IconButton } from './components/IconButton';
|
|
6
|
+
export { default as useRequest } from './hooks/useRequest';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"dev": "vite",
|
|
13
13
|
"build": "npm run build:types && npm run build:es && npm run build:lib && npm run build:dist && npm run build:copy-files",
|
|
14
14
|
"build:copy-files": "cp package.json LICENSE build/",
|
|
15
|
-
"build:types": "tsc -p tsconfig.build.json",
|
|
16
|
-
"build:es": "tsc -p tsconfig.build.json --outDir build/es --module ESNext",
|
|
17
|
-
"build:lib": "tsc -p tsconfig.build.json --outDir build/lib --module CommonJS",
|
|
15
|
+
"build:types": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly true --declarationDir build/types",
|
|
16
|
+
"build:es": "tsc -p tsconfig.build.json --outDir build/es --declaration --declarationDir build/es --module ESNext",
|
|
17
|
+
"build:lib": "tsc -p tsconfig.build.json --outDir build/lib --declaration --declarationDir build/lib --module CommonJS",
|
|
18
18
|
"build:dist": "vite build",
|
|
19
19
|
"lint": "eslint .",
|
|
20
20
|
"preview": "vite preview",
|