light-chaser-util 0.0.6
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/dist/lib/AuthTools.d.ts +23 -0
- package/dist/lib/Base64Util.d.ts +4 -0
- package/dist/lib/ColorUtil.d.ts +37 -0
- package/dist/lib/ComponentUtil.d.ts +12 -0
- package/dist/lib/FileUtil.d.ts +4 -0
- package/dist/lib/IdGenerate.d.ts +4 -0
- package/dist/lib/ObjectUtil.d.ts +28 -0
- package/dist/lib/SafeEvalUtil.d.ts +19 -0
- package/dist/lib/URLUtil.d.ts +6 -0
- package/dist/lib/main.d.ts +10 -0
- package/dist/light-chaser-util.mjs +230 -0
- package/package.json +40 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface IUserInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
username: string;
|
|
5
|
+
avatar?: string;
|
|
6
|
+
token: string;
|
|
7
|
+
roles: RoleType[];
|
|
8
|
+
}
|
|
9
|
+
export declare enum RoleType {
|
|
10
|
+
SYSTEM_ADMIN = "ROLE_SYSTEM_ADMIN",
|
|
11
|
+
ADMIN = "ROLE_ADMIN",
|
|
12
|
+
USER = "ROLE_USER"
|
|
13
|
+
}
|
|
14
|
+
export declare const USER_INFO_KEY = "LIGHT_CHASER_USER_INFO";
|
|
15
|
+
export default class AuthTools {
|
|
16
|
+
private static userInfo;
|
|
17
|
+
private static flash;
|
|
18
|
+
static getToken(): string | null;
|
|
19
|
+
static removeUser(): void;
|
|
20
|
+
static getUserId(): string | null;
|
|
21
|
+
static setUserInfo(userInfo: IUserInfo, flash?: boolean): void;
|
|
22
|
+
static getUserInfo(): IUserInfo | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default class ColorUtil {
|
|
2
|
+
static colorConversion(color: string): {
|
|
3
|
+
hex: string;
|
|
4
|
+
rgba: string;
|
|
5
|
+
};
|
|
6
|
+
static hexToRgba(hex: string, alpha: number): string;
|
|
7
|
+
static rgbaToHex(rgba: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* 解析线性渐变颜色值数据
|
|
10
|
+
* 注:本解析函数仅适用于
|
|
11
|
+
* linear-gradient(90deg, #b66666 0%, #10a9ea 36%, #ea1010 78%, #000 100%)
|
|
12
|
+
* linear-gradient(90deg, rgba(182,102,102,1) 0%, rgba(16,169,234,1) 36%, rgba(234,16,16,1) 78%, rgba(0,0,0,1) 100%)
|
|
13
|
+
* 这特定的两种场景,对于其他形式的线性渐变,本函数不保证完全解析
|
|
14
|
+
* @param gradient
|
|
15
|
+
*/
|
|
16
|
+
static parseLinerGradient(gradient: string): {
|
|
17
|
+
mode: string;
|
|
18
|
+
angle: number;
|
|
19
|
+
rawValue: string;
|
|
20
|
+
posArr: number[];
|
|
21
|
+
colorArr: string[];
|
|
22
|
+
} | null;
|
|
23
|
+
/**
|
|
24
|
+
* 解析径向渐变颜色值数据
|
|
25
|
+
* 注:本解析函数仅适用于
|
|
26
|
+
* radial-gradient(#ffffffc9 4%, #000 100%)
|
|
27
|
+
* radial-gradient(rgba(255,255,255,0.79) 4%, rgba(0,0,0,0.79) 100%)
|
|
28
|
+
* 这特定的两种场景,对于其他形式的径向渐变,本函数不保证完全解析
|
|
29
|
+
* @param gradient
|
|
30
|
+
*/
|
|
31
|
+
static parseRadialGradient(gradient: string): {
|
|
32
|
+
mode: string;
|
|
33
|
+
rawValue: string;
|
|
34
|
+
posArr: number[];
|
|
35
|
+
colorArr: string[];
|
|
36
|
+
} | null;
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClassType } from 'react';
|
|
2
|
+
|
|
3
|
+
declare class ComponentUtil {
|
|
4
|
+
/**
|
|
5
|
+
* 创建并渲染组件
|
|
6
|
+
* @param container 组件容器
|
|
7
|
+
* @param Template 组件模板
|
|
8
|
+
* @param props 组件props参数
|
|
9
|
+
*/
|
|
10
|
+
static createAndRender<I, P = any>(container: HTMLElement, Template: ClassType<P, any, any>, props?: P): Promise<I | null>;
|
|
11
|
+
}
|
|
12
|
+
export default ComponentUtil;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 配置对象片段
|
|
3
|
+
*/
|
|
4
|
+
export interface ConfigureObjectFragments {
|
|
5
|
+
[key: string]: ConfigureObjectFragments | string | number | null | undefined;
|
|
6
|
+
}
|
|
7
|
+
export default class ObjectUtil {
|
|
8
|
+
/**
|
|
9
|
+
* 合并两个对象,将newData中的属性合并到originalData中
|
|
10
|
+
* @param originalData
|
|
11
|
+
* @param newData
|
|
12
|
+
*/
|
|
13
|
+
static merge(originalData: any, newData: any): any;
|
|
14
|
+
/**
|
|
15
|
+
* 获取原始对象中的属性值
|
|
16
|
+
*/
|
|
17
|
+
static getOriginValue(originObj: ConfigureObjectFragments, newObj: ConfigureObjectFragments): ConfigureObjectFragments;
|
|
18
|
+
/**
|
|
19
|
+
* 删除对象中的空值属性
|
|
20
|
+
* @param obj
|
|
21
|
+
*/
|
|
22
|
+
static removeEmptyKeys(obj: Record<string, any>): Record<string, any>;
|
|
23
|
+
/**
|
|
24
|
+
* 将 JS 对象转换为 JS 代码字符串(可在浏览器运行,保留函数原样)
|
|
25
|
+
* @param obj JS对象
|
|
26
|
+
*/
|
|
27
|
+
static objToCodeStr(obj: Record<string, any>): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SecureEvaluator - 安全表达式执行工具
|
|
3
|
+
* 支持:对象 / 函数 / 基础类型的安全执行与类型校验
|
|
4
|
+
*/
|
|
5
|
+
export interface SafeEvalOptions {
|
|
6
|
+
/** 出错时是否返回 null(否则抛出异常) */
|
|
7
|
+
returnNullOnError?: boolean;
|
|
8
|
+
/** 允许的返回类型 */
|
|
9
|
+
allowTypes?: Array<'object' | 'function' | 'string' | 'number' | 'boolean'>;
|
|
10
|
+
}
|
|
11
|
+
export declare class SafeEvalUtil {
|
|
12
|
+
/**
|
|
13
|
+
* 安全执行表达式
|
|
14
|
+
* @param expression - 要执行的字符串表达式
|
|
15
|
+
* @param options - 可选配置项
|
|
16
|
+
* @returns 执行结果或 null
|
|
17
|
+
*/
|
|
18
|
+
static run<T = unknown>(expression: unknown, options?: SafeEvalOptions): T | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as AuthTools } from './AuthTools';
|
|
2
|
+
export type { USER_INFO_KEY, RoleType, IUserInfo } from './AuthTools';
|
|
3
|
+
export { default as Base64Util } from './Base64Util';
|
|
4
|
+
export { default as ColorUtil } from './ColorUtil';
|
|
5
|
+
export { default as FileUtil } from './FileUtil';
|
|
6
|
+
export { default as IdGenerate } from './IdGenerate';
|
|
7
|
+
export { default as ObjectUtil } from './ObjectUtil';
|
|
8
|
+
export { default as URLUtil } from './URLUtil';
|
|
9
|
+
export { default as ComponentUtil } from './ComponentUtil';
|
|
10
|
+
export type { UrlParams } from './URLUtil';
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var y = (a, t, e) => t in a ? S(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var g = (a, t, e) => y(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { createElement as w } from "react";
|
|
5
|
+
import { createRoot as U } from "react-dom/client";
|
|
6
|
+
const p = "LIGHT_CHASER_USER_INFO", l = class l {
|
|
7
|
+
static getToken() {
|
|
8
|
+
if (l.userInfo !== null && !l.flash)
|
|
9
|
+
return l.userInfo.token;
|
|
10
|
+
const t = l.getUserInfo();
|
|
11
|
+
return t === null ? null : t.token;
|
|
12
|
+
}
|
|
13
|
+
static removeUser() {
|
|
14
|
+
localStorage.removeItem("token"), localStorage.removeItem(p), l.userInfo = null;
|
|
15
|
+
}
|
|
16
|
+
static getUserId() {
|
|
17
|
+
const t = l.getUserInfo();
|
|
18
|
+
return t === null ? null : t.id;
|
|
19
|
+
}
|
|
20
|
+
static setUserInfo(t, e) {
|
|
21
|
+
localStorage.setItem(p, JSON.stringify(t)), e && (l.flash = e);
|
|
22
|
+
}
|
|
23
|
+
static getUserInfo() {
|
|
24
|
+
if (l.userInfo !== null && !l.flash)
|
|
25
|
+
return l.userInfo;
|
|
26
|
+
const t = localStorage.getItem(p);
|
|
27
|
+
if (t === null)
|
|
28
|
+
return null;
|
|
29
|
+
const e = JSON.parse(t);
|
|
30
|
+
return l.userInfo = e, l.flash = !1, e;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
g(l, "userInfo", null), g(l, "flash", !1);
|
|
34
|
+
let h = l;
|
|
35
|
+
class C {
|
|
36
|
+
static toBase64(t) {
|
|
37
|
+
const e = new TextEncoder().encode(t);
|
|
38
|
+
let r = "";
|
|
39
|
+
return e.forEach((n) => {
|
|
40
|
+
r += String.fromCharCode(n);
|
|
41
|
+
}), btoa(r);
|
|
42
|
+
}
|
|
43
|
+
static fromBase64(t) {
|
|
44
|
+
const e = atob(t), r = new Uint8Array(e.length);
|
|
45
|
+
for (let n = 0; n < e.length; n++)
|
|
46
|
+
r[n] = e.charCodeAt(n);
|
|
47
|
+
return new TextDecoder().decode(r);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
class d {
|
|
51
|
+
static colorConversion(t) {
|
|
52
|
+
if (t.length >= 4 && t.length <= 9 && t[0] === "#") {
|
|
53
|
+
const e = d.hexToRgba(t, 1);
|
|
54
|
+
return { hex: t, rgba: e };
|
|
55
|
+
} else return t.includes("rgb") ? { hex: d.rgbaToHex(t), rgba: t } : (console.warn("color is not valid", t), { hex: "#000000", rgba: "rgba(0,0,0,1)" });
|
|
56
|
+
}
|
|
57
|
+
static hexToRgba(t, e) {
|
|
58
|
+
t = t.replace("#", "");
|
|
59
|
+
const r = parseInt(t.substring(0, 2), 16), n = parseInt(t.substring(2, 4), 16), s = parseInt(t.substring(4, 6), 16);
|
|
60
|
+
return `rgba(${r}, ${n}, ${s}, ${e})`;
|
|
61
|
+
}
|
|
62
|
+
static rgbaToHex(t) {
|
|
63
|
+
const e = t.substring(t.indexOf("(")).split(","), r = parseInt(e[0].substring(1).trim()), n = parseInt(e[1].trim()), s = parseInt(e[2].trim()), o = parseFloat(e[3] ? e[3].substring(0, e[3].length - 1).trim() : "1"), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), i = n.toString(16).length === 1 ? "0" + n.toString(16) : n.toString(16), u = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), f = Math.round(o * 255).toString(16).length === 1 ? "0" + Math.round(o * 255).toString(16) : Math.round(o * 255).toString(16);
|
|
64
|
+
return "#" + c + i + u + f;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 解析线性渐变颜色值数据
|
|
68
|
+
* 注:本解析函数仅适用于
|
|
69
|
+
* linear-gradient(90deg, #b66666 0%, #10a9ea 36%, #ea1010 78%, #000 100%)
|
|
70
|
+
* linear-gradient(90deg, rgba(182,102,102,1) 0%, rgba(16,169,234,1) 36%, rgba(234,16,16,1) 78%, rgba(0,0,0,1) 100%)
|
|
71
|
+
* 这特定的两种场景,对于其他形式的线性渐变,本函数不保证完全解析
|
|
72
|
+
* @param gradient
|
|
73
|
+
*/
|
|
74
|
+
static parseLinerGradient(t) {
|
|
75
|
+
if (!t || t.indexOf("linear-gradient") === -1)
|
|
76
|
+
return null;
|
|
77
|
+
const e = t.match(/-?\d+deg/), r = e ? parseInt(e[0]) : 0, o = t.substring(t.indexOf("(") + 1, t.lastIndexOf(")")).replace(/\d+deg,\s*/, "").split(","), c = [], i = [];
|
|
78
|
+
return o.forEach((u) => {
|
|
79
|
+
const f = u.trim().split(/\s+/g), I = f[0], b = parseFloat(f[1]);
|
|
80
|
+
c.push(b), i.push(I);
|
|
81
|
+
}), { mode: "linear", angle: r, rawValue: t, posArr: c, colorArr: i };
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 解析径向渐变颜色值数据
|
|
85
|
+
* 注:本解析函数仅适用于
|
|
86
|
+
* radial-gradient(#ffffffc9 4%, #000 100%)
|
|
87
|
+
* radial-gradient(rgba(255,255,255,0.79) 4%, rgba(0,0,0,0.79) 100%)
|
|
88
|
+
* 这特定的两种场景,对于其他形式的径向渐变,本函数不保证完全解析
|
|
89
|
+
* @param gradient
|
|
90
|
+
*/
|
|
91
|
+
static parseRadialGradient(t) {
|
|
92
|
+
if (!t || t.indexOf("radial-gradient") === -1)
|
|
93
|
+
return null;
|
|
94
|
+
t = t.substring(t.indexOf("(") + 1, t.lastIndexOf(")"));
|
|
95
|
+
const e = t.split(","), r = [], n = [];
|
|
96
|
+
return e.forEach((s) => {
|
|
97
|
+
const o = s.trim().split(/\s+/g), c = parseFloat(o[1]), i = o[0];
|
|
98
|
+
r.push(c), n.push(i);
|
|
99
|
+
}), { mode: "radial", rawValue: t, posArr: r, colorArr: n };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
class F {
|
|
103
|
+
static async blobToBase64(t) {
|
|
104
|
+
try {
|
|
105
|
+
const e = await fetch(t);
|
|
106
|
+
if (!e.ok)
|
|
107
|
+
return !1;
|
|
108
|
+
const r = await e.blob();
|
|
109
|
+
return await new Promise((n, s) => {
|
|
110
|
+
const o = new FileReader();
|
|
111
|
+
o.onloadend = () => n(o.result), o.onerror = () => s("Failed to convert Blob to Base64"), o.readAsDataURL(r);
|
|
112
|
+
});
|
|
113
|
+
} catch (e) {
|
|
114
|
+
return console.error(e), !1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static async base64ToBlob(t) {
|
|
118
|
+
return new Promise((e) => {
|
|
119
|
+
fetch(t).then((r) => {
|
|
120
|
+
if (r.ok)
|
|
121
|
+
return r.blob();
|
|
122
|
+
e(!1);
|
|
123
|
+
}).then((r) => {
|
|
124
|
+
r && e(URL.createObjectURL(r)), e(!1);
|
|
125
|
+
}).catch(() => {
|
|
126
|
+
e(!1);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
let A = (a) => crypto.getRandomValues(new Uint8Array(a)), O = (a, t, e) => {
|
|
132
|
+
let r = (2 << Math.log(a.length - 1) / Math.LN2) - 1, n = -~(1.6 * r * t / a.length);
|
|
133
|
+
return (s = t) => {
|
|
134
|
+
let o = "";
|
|
135
|
+
for (; ; ) {
|
|
136
|
+
let c = e(n), i = n | 0;
|
|
137
|
+
for (; i--; )
|
|
138
|
+
if (o += a[c[i] & r] || "", o.length === s) return o;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}, R = (a, t = 21) => O(a, t, A);
|
|
142
|
+
class L {
|
|
143
|
+
static generateId() {
|
|
144
|
+
return R("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 10)();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
class m {
|
|
148
|
+
/**
|
|
149
|
+
* 合并两个对象,将newData中的属性合并到originalData中
|
|
150
|
+
* @param originalData
|
|
151
|
+
* @param newData
|
|
152
|
+
*/
|
|
153
|
+
static merge(t, e) {
|
|
154
|
+
return !t && !e ? null : !t && e ? e : (t && !e || Object.keys(e).forEach((r) => {
|
|
155
|
+
const n = e[r];
|
|
156
|
+
Object.prototype.hasOwnProperty.call(t, r) ? Array.isArray(n) ? t[r] = n : n && typeof n == "object" && Object.keys(n).length > 0 && t[r] && typeof t[r] == "object" && t[r] ? m.merge(t[r], n) : t[r] = n : t[r] = n;
|
|
157
|
+
}), t);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 获取原始对象中的属性值
|
|
161
|
+
*/
|
|
162
|
+
static getOriginValue(t, e) {
|
|
163
|
+
function r(n, s) {
|
|
164
|
+
const o = {};
|
|
165
|
+
for (const c in s)
|
|
166
|
+
typeof s[c] == "object" && !Array.isArray(s[c]) && n[c] ? n[c] && (o[c] = r(n[c], s[c])) : o[c] = n[c];
|
|
167
|
+
return o;
|
|
168
|
+
}
|
|
169
|
+
return r(t, e);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 删除对象中的空值属性
|
|
173
|
+
* @param obj
|
|
174
|
+
*/
|
|
175
|
+
static removeEmptyKeys(t) {
|
|
176
|
+
return Object.keys(t).forEach((e) => {
|
|
177
|
+
(t[e] === null || t[e] === void 0 || t[e] === "" || typeof t[e] == "string" && t[e].trim() === "") && delete t[e];
|
|
178
|
+
}), t;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* 将 JS 对象转换为 JS 代码字符串(可在浏览器运行,保留函数原样)
|
|
182
|
+
* @param obj JS对象
|
|
183
|
+
*/
|
|
184
|
+
static objToCodeStr(t) {
|
|
185
|
+
let e = JSON.stringify(t, (r, n) => typeof n == "function" ? n.toString() : n, 2);
|
|
186
|
+
return e = e.replace(/(['"])([a-zA-Z_$][\w$]*)\1\s*:/g, "$2:"), e = e.replace(/(["'])(function\s*\w*\s*\([^)]*\)\s*\{[\s\S]*?}|\([^)]*\)\s*=>\s*\{[\s\S]*?})(["'])/g, (r, n, s, o) => s.replace(/\\n/g, `
|
|
187
|
+
`).replace(/\\r/g, "\r").replace(/\\t/g, " ").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\v/g, "\v").replace(/\\\\/g, "\\").replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\`/g, "`").replace(
|
|
188
|
+
/\\u([\dA-Fa-f]{4})/g,
|
|
189
|
+
(c, i) => String.fromCharCode(parseInt(i, 16))
|
|
190
|
+
).trim()), e;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
class B {
|
|
194
|
+
static parseUrlParams() {
|
|
195
|
+
const t = new URLSearchParams(window.location.search), e = {};
|
|
196
|
+
for (const [r, n] of t)
|
|
197
|
+
e[r] = n;
|
|
198
|
+
return e;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
class P {
|
|
202
|
+
/**
|
|
203
|
+
* 创建并渲染组件
|
|
204
|
+
* @param container 组件容器
|
|
205
|
+
* @param Template 组件模板
|
|
206
|
+
* @param props 组件props参数
|
|
207
|
+
*/
|
|
208
|
+
static async createAndRender(t, e, r) {
|
|
209
|
+
if (!t)
|
|
210
|
+
throw new Error("create react node failed, container is null");
|
|
211
|
+
return new Promise((n) => {
|
|
212
|
+
try {
|
|
213
|
+
const s = !(e.prototype && e.prototype.isReactComponent) && !(e.$$typeof && e.$$typeof === Symbol.for("react.forward_ref"));
|
|
214
|
+
s || (r = { ref: (o) => n(o), ...r }), U(t).render(w(e, { ...r })), s && n(null);
|
|
215
|
+
} catch (s) {
|
|
216
|
+
console.error("create react node failed ", s), n(null);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export {
|
|
222
|
+
h as AuthTools,
|
|
223
|
+
C as Base64Util,
|
|
224
|
+
d as ColorUtil,
|
|
225
|
+
P as ComponentUtil,
|
|
226
|
+
F as FileUtil,
|
|
227
|
+
L as IdGenerate,
|
|
228
|
+
m as ObjectUtil,
|
|
229
|
+
B as URLUtil
|
|
230
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "light-chaser-util",
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/light-chaser-util.mjs",
|
|
6
|
+
"types": "dist/lib/main.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"registry": "https://registry.npmjs.org/"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "node src/test.ts",
|
|
16
|
+
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
17
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
18
|
+
"check": "npx tsc --noEmit --watch"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"author": "DAGU",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"nanoid": "3"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "18.2.0",
|
|
28
|
+
"react-dom": "18.2.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/react": "^18.2.45",
|
|
32
|
+
"@types/react-dom": "^18.2.18",
|
|
33
|
+
"vite": "^5.0.7",
|
|
34
|
+
"vite-plugin-dts": "4.0.0-beta.1",
|
|
35
|
+
"@types/node": "^20.10.4",
|
|
36
|
+
"typescript": "^5.0.2",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
38
|
+
"@typescript-eslint/parser": "^6.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|