@seai/components 1.0.4 → 1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seai/components",
3
- "version": "1.0.4",
4
- "main": "./index.cjs.js",
5
- "module": "./index.esm.js",
6
- "types": "./index.d.ts"
3
+ "version": "1.0.6",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.esm.js",
6
+ "types": "./dist/index.d.ts"
7
7
  }
@@ -1,120 +0,0 @@
1
- const a = Object.prototype.toString;
2
- function m(n) {
3
- try {
4
- return JSON.parse(n), !0;
5
- } catch {
6
- return !1;
7
- }
8
- }
9
- function h(n) {
10
- return n ? n.startsWith("oldImages/storage") || n.startsWith("/oldImages/storage") : !1;
11
- }
12
- function y(n) {
13
- if (n && (n.startsWith("oldImages/storage") || n.startsWith("/oldImages/storage"))) {
14
- const e = n.split("/"), i = e[e.length - 1], [p, f] = i.split(".");
15
- return [
16
- {
17
- isOld: !0,
18
- // 或者你想改成 "image (1).png" 这种
19
- name: i,
20
- // 或者你想改成 "image (1).png" 这种
21
- fileId: i,
22
- // 直接用完整文件名作为 ID
23
- fileSize: null,
24
- // 无法获取大小,填 null
25
- fileExtension: f,
26
- fileVersionId: null,
27
- url: n
28
- // 拼成类似你给的 URL
29
- }
30
- ];
31
- }
32
- }
33
- function t(n, e) {
34
- return a.call(n) === `[object ${e}]`;
35
- }
36
- function c(n) {
37
- return typeof n < "u";
38
- }
39
- function u(n) {
40
- return !c(n);
41
- }
42
- function r(n) {
43
- return n !== null && t(n, "Object");
44
- }
45
- function w(n) {
46
- return d(n) || l(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : r(n) ? Object.keys(n).length === 0 : !1;
47
- }
48
- function O(n) {
49
- return t(n, "Date");
50
- }
51
- function o(n) {
52
- return n === null;
53
- }
54
- function S(n) {
55
- return u(n) && o(n);
56
- }
57
- function b(n) {
58
- return u(n) || o(n);
59
- }
60
- function N(n) {
61
- return t(n, "Number");
62
- }
63
- function I(n) {
64
- return t(n, "Promise") && r(n) && s(n.then) && s(n.catch);
65
- }
66
- function l(n) {
67
- return t(n, "String");
68
- }
69
- function s(n) {
70
- return typeof n == "function";
71
- }
72
- function j(n) {
73
- return t(n, "Boolean");
74
- }
75
- function D(n) {
76
- return t(n, "RegExp");
77
- }
78
- function d(n) {
79
- return n && Array.isArray(n);
80
- }
81
- function W(n) {
82
- return typeof window < "u" && t(n, "Window");
83
- }
84
- function x(n) {
85
- return r(n) && !!n.tagName;
86
- }
87
- function E(n) {
88
- return t(n, "Map");
89
- }
90
- const g = typeof window > "u", A = !g;
91
- function U(n) {
92
- return /^http(s)?:\/\/([\w-]+(\.)?)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(n);
93
- }
94
- export {
95
- h as a,
96
- t as b,
97
- c,
98
- u as d,
99
- r as e,
100
- w as f,
101
- O as g,
102
- o as h,
103
- m as i,
104
- S as j,
105
- b as k,
106
- N as l,
107
- I as m,
108
- l as n,
109
- y as o,
110
- s as p,
111
- j as q,
112
- D as r,
113
- d as s,
114
- W as t,
115
- x as u,
116
- E as v,
117
- g as w,
118
- A as x,
119
- U as y
120
- };