sa2kit 1.6.9 → 1.6.11
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/ConfigService-BxK06xP6.d.mts +262 -0
- package/dist/ConfigService-BxK06xP6.d.ts +262 -0
- package/dist/UniversalFileService-BuHN-jrR.d.ts +515 -0
- package/dist/UniversalFileService-CGGzYeeF.d.mts +515 -0
- package/dist/analytics/index.d.mts +1084 -0
- package/dist/analytics/index.d.ts +1084 -0
- package/dist/analytics/server/index.d.mts +499 -0
- package/dist/analytics/server/index.d.ts +499 -0
- package/dist/api/index.d.mts +248 -0
- package/dist/api/index.d.ts +248 -0
- package/dist/audioDetection/index.d.mts +449 -0
- package/dist/audioDetection/index.d.ts +449 -0
- package/dist/auth/client/index.d.mts +32 -0
- package/dist/auth/client/index.d.ts +32 -0
- package/dist/auth/client/index.js +4 -4
- package/dist/auth/client/index.mjs +1 -1
- package/dist/auth/components/index.d.mts +227 -0
- package/dist/auth/components/index.d.ts +227 -0
- package/dist/auth/components/index.js +4 -4
- package/dist/auth/components/index.mjs +1 -1
- package/dist/auth/hooks/index.d.mts +31 -0
- package/dist/auth/hooks/index.d.ts +31 -0
- package/dist/auth/hooks/index.js +3 -3
- package/dist/auth/hooks/index.mjs +1 -1
- package/dist/auth/index.d.mts +41 -0
- package/dist/auth/index.d.ts +41 -0
- package/dist/auth/index.js +17 -36
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +3 -33
- package/dist/auth/index.mjs.map +1 -1
- package/dist/auth/middleware/index.d.mts +75 -0
- package/dist/auth/middleware/index.d.ts +75 -0
- package/dist/auth/routes/index.d.mts +261 -0
- package/dist/auth/routes/index.d.ts +261 -0
- package/dist/auth/schema/index.d.mts +789 -0
- package/dist/auth/schema/index.d.ts +789 -0
- package/dist/auth/services/index.d.mts +48 -0
- package/dist/auth/services/index.d.ts +48 -0
- package/dist/base-api-client-B-yUCal3.d.ts +103 -0
- package/dist/base-api-client-BQ8ZPZjk.d.mts +103 -0
- package/dist/calendar/index.d.mts +1197 -0
- package/dist/calendar/index.d.ts +1197 -0
- package/dist/calendar/index.js +8 -8
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/calendar/routes/index.d.mts +118 -0
- package/dist/calendar/routes/index.d.ts +118 -0
- package/dist/calendar/server.d.mts +1184 -0
- package/dist/calendar/server.d.ts +1184 -0
- package/dist/{chunk-ROEYW4A7.js → chunk-5QMBZP7S.js} +2 -2
- package/dist/chunk-5QMBZP7S.js.map +1 -0
- package/dist/chunk-6BZ3QFA5.mjs +33 -0
- package/dist/chunk-6BZ3QFA5.mjs.map +1 -0
- package/dist/{chunk-HEMA7SWK.mjs → chunk-6YKMCPQI.mjs} +2 -2
- package/dist/chunk-6YKMCPQI.mjs.map +1 -0
- package/dist/chunk-BH5TLVS5.mjs +1593 -0
- package/dist/chunk-BH5TLVS5.mjs.map +1 -0
- package/dist/chunk-E72D5KHY.js +1723 -0
- package/dist/chunk-E72D5KHY.js.map +1 -0
- package/dist/chunk-FAHLZIYQ.js +36 -0
- package/dist/chunk-FAHLZIYQ.js.map +1 -0
- package/dist/{chunk-KGRQNEIR.mjs → chunk-KW5JH6V6.mjs} +2 -2
- package/dist/chunk-KW5JH6V6.mjs.map +1 -0
- package/dist/{chunk-O26VCNS3.js → chunk-UOFTHYIH.js} +2 -2
- package/dist/chunk-UOFTHYIH.js.map +1 -0
- package/dist/config/index.d.mts +64 -0
- package/dist/config/index.d.ts +64 -0
- package/dist/config/server/index.d.mts +1533 -0
- package/dist/config/server/index.d.ts +1533 -0
- package/dist/drizzle-auth-service-Bxlovhv8.d.ts +145 -0
- package/dist/drizzle-auth-service-DZY2F1sv.d.mts +145 -0
- package/dist/drizzle-schema-BNhqj2AZ.d.mts +1114 -0
- package/dist/drizzle-schema-BNhqj2AZ.d.ts +1114 -0
- package/dist/enums-Dume-V5Y.d.mts +16 -0
- package/dist/enums-Dume-V5Y.d.ts +16 -0
- package/dist/i18n/index.d.mts +417 -0
- package/dist/i18n/index.d.ts +417 -0
- package/dist/imageCrop/index.d.mts +165 -0
- package/dist/imageCrop/index.d.ts +165 -0
- package/dist/index-DSel44Ke.d.mts +93 -0
- package/dist/index-DSel44Ke.d.ts +93 -0
- package/dist/index.d.mts +933 -0
- package/dist/index.d.ts +933 -0
- package/dist/index.js +1626 -2184
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +708 -1543
- package/dist/index.mjs.map +1 -1
- package/dist/logger/index.d.mts +125 -0
- package/dist/logger/index.d.ts +125 -0
- package/dist/mmd/admin/index.d.mts +487 -0
- package/dist/mmd/admin/index.d.ts +487 -0
- package/dist/mmd/index.d.mts +1412 -0
- package/dist/mmd/index.d.ts +1412 -0
- package/dist/mmd/index.js +2695 -625
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +2501 -448
- package/dist/mmd/index.mjs.map +1 -1
- package/dist/mmd/server/index.d.mts +138 -0
- package/dist/mmd/server/index.d.ts +138 -0
- package/dist/music/index.d.mts +74 -0
- package/dist/music/index.d.ts +74 -0
- package/dist/music/server/index.d.mts +1 -0
- package/dist/music/server/index.d.ts +1 -0
- package/dist/request/index.d.mts +51 -0
- package/dist/request/index.d.ts +51 -0
- package/dist/storage/index.d.mts +75 -0
- package/dist/storage/index.d.ts +75 -0
- package/dist/testYourself/admin/index.d.mts +58 -0
- package/dist/testYourself/admin/index.d.ts +58 -0
- package/dist/testYourself/index.d.mts +53 -0
- package/dist/testYourself/index.d.ts +53 -0
- package/dist/testYourself/server/index.d.mts +1029 -0
- package/dist/testYourself/server/index.d.ts +1029 -0
- package/dist/types-BB-7_WtE.d.mts +253 -0
- package/dist/types-BB-7_WtE.d.ts +253 -0
- package/dist/types-BINlP9MK.d.mts +286 -0
- package/dist/types-BINlP9MK.d.ts +286 -0
- package/dist/types-BaZccpvk.d.mts +48 -0
- package/dist/types-BaZccpvk.d.ts +48 -0
- package/dist/types-CK4We_aI.d.mts +270 -0
- package/dist/types-CK4We_aI.d.ts +270 -0
- package/dist/types-CbTsi9CZ.d.mts +31 -0
- package/dist/types-CbTsi9CZ.d.ts +31 -0
- package/dist/types-CiYK5Klf.d.mts +99 -0
- package/dist/types-D3R6GzOw.d.mts +70 -0
- package/dist/types-Dlu52uDy.d.ts +99 -0
- package/dist/types-iFeyR443.d.ts +70 -0
- package/dist/universalExport/index.d.mts +235 -0
- package/dist/universalExport/index.d.ts +235 -0
- package/dist/universalExport/server/index.d.mts +1270 -0
- package/dist/universalExport/server/index.d.ts +1270 -0
- package/dist/universalFile/index.d.mts +480 -0
- package/dist/universalFile/index.d.ts +480 -0
- package/dist/universalFile/server/index.d.mts +4516 -0
- package/dist/universalFile/server/index.d.ts +4516 -0
- package/dist/useElectronStorage-Dj0rcorG.d.mts +65 -0
- package/dist/useElectronStorage-DwnNfIhl.d.ts +65 -0
- package/dist/utils/index.d.mts +192 -0
- package/dist/utils/index.d.ts +192 -0
- package/package.json +2 -1
- package/dist/chunk-4FOBBWXW.mjs +0 -179
- package/dist/chunk-4FOBBWXW.mjs.map +0 -1
- package/dist/chunk-G6WRJ2H2.js +0 -187
- package/dist/chunk-G6WRJ2H2.js.map +0 -1
- package/dist/chunk-HEMA7SWK.mjs.map +0 -1
- package/dist/chunk-KGRQNEIR.mjs.map +0 -1
- package/dist/chunk-O26VCNS3.js.map +0 -1
- package/dist/chunk-ROEYW4A7.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,83 +1,48 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE72D5KHY_js = require('./chunk-E72D5KHY.js');
|
|
4
|
+
require('./chunk-FAHLZIYQ.js');
|
|
5
|
+
require('./chunk-CD77U7LZ.js');
|
|
6
|
+
require('./chunk-6W5BMXJG.js');
|
|
7
|
+
require('./chunk-UOFTHYIH.js');
|
|
8
|
+
var chunk5QMBZP7S_js = require('./chunk-5QMBZP7S.js');
|
|
9
|
+
require('./chunk-DUHZ7VZP.js');
|
|
10
|
+
require('./chunk-SVWQN2LR.js');
|
|
4
11
|
var chunk7Z5LLJ3A_js = require('./chunk-7Z5LLJ3A.js');
|
|
5
12
|
var chunkLX4XX6W7_js = require('./chunk-LX4XX6W7.js');
|
|
6
13
|
require('./chunk-QU5OT4DF.js');
|
|
7
14
|
var chunk6PRFP5EG_js = require('./chunk-6PRFP5EG.js');
|
|
8
15
|
require('./chunk-DGUM43GV.js');
|
|
9
|
-
var
|
|
16
|
+
var React12 = require('react');
|
|
10
17
|
var tesseract_js = require('tesseract.js');
|
|
11
18
|
var lucideReact = require('lucide-react');
|
|
12
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
13
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
14
|
-
var LabelPrimitive = require('@radix-ui/react-label');
|
|
15
|
-
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
16
|
-
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
17
|
-
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
18
|
-
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
19
|
-
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
20
|
-
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
21
|
-
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
22
|
-
var SelectPrimitive = require('@radix-ui/react-select');
|
|
23
|
-
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
24
|
-
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
25
|
-
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
26
|
-
var navigation = require('next/navigation');
|
|
27
19
|
var Link = require('next/link');
|
|
28
20
|
var reactDom = require('react-dom');
|
|
21
|
+
var core = require('@dnd-kit/core');
|
|
22
|
+
var sortable = require('@dnd-kit/sortable');
|
|
23
|
+
var utilities = require('@dnd-kit/utilities');
|
|
29
24
|
|
|
30
25
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
if (e && e.__esModule) return e;
|
|
34
|
-
var n = Object.create(null);
|
|
35
|
-
if (e) {
|
|
36
|
-
Object.keys(e).forEach(function (k) {
|
|
37
|
-
if (k !== 'default') {
|
|
38
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
39
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () { return e[k]; }
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
n.default = e;
|
|
47
|
-
return Object.freeze(n);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var React37__namespace = /*#__PURE__*/_interopNamespace(React37);
|
|
51
|
-
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
52
|
-
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
53
|
-
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
54
|
-
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
55
|
-
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
56
|
-
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
57
|
-
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
58
|
-
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
59
|
-
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
60
|
-
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
61
|
-
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
62
|
-
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
27
|
+
var React12__default = /*#__PURE__*/_interopDefault(React12);
|
|
63
28
|
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
64
29
|
|
|
65
30
|
var useOCR = (options = {}) => {
|
|
66
|
-
const [state, setState] =
|
|
31
|
+
const [state, setState] = React12.useState({
|
|
67
32
|
isProcessing: false,
|
|
68
33
|
progress: 0,
|
|
69
34
|
status: "idle",
|
|
70
35
|
error: null,
|
|
71
36
|
result: null
|
|
72
37
|
});
|
|
73
|
-
const workerRef =
|
|
74
|
-
const cleanup =
|
|
38
|
+
const workerRef = React12.useRef(null);
|
|
39
|
+
const cleanup = React12.useCallback(async () => {
|
|
75
40
|
if (workerRef.current) {
|
|
76
41
|
await workerRef.current.terminate();
|
|
77
42
|
workerRef.current = null;
|
|
78
43
|
}
|
|
79
44
|
}, []);
|
|
80
|
-
const recognize =
|
|
45
|
+
const recognize = React12.useCallback(
|
|
81
46
|
async (image) => {
|
|
82
47
|
setState((prev) => ({
|
|
83
48
|
...prev,
|
|
@@ -136,7 +101,7 @@ var useOCR = (options = {}) => {
|
|
|
136
101
|
},
|
|
137
102
|
[options]
|
|
138
103
|
);
|
|
139
|
-
|
|
104
|
+
React12.useEffect(() => {
|
|
140
105
|
return () => {
|
|
141
106
|
cleanup();
|
|
142
107
|
};
|
|
@@ -152,8 +117,8 @@ var OCRScanner = ({
|
|
|
152
117
|
className = "",
|
|
153
118
|
language = "eng"
|
|
154
119
|
}) => {
|
|
155
|
-
const [imagePreview, setImagePreview] =
|
|
156
|
-
const fileInputRef =
|
|
120
|
+
const [imagePreview, setImagePreview] = React12.useState(null);
|
|
121
|
+
const fileInputRef = React12.useRef(null);
|
|
157
122
|
const { recognize, isProcessing, progress, status, result, error } = useOCR({
|
|
158
123
|
language
|
|
159
124
|
});
|
|
@@ -189,43 +154,43 @@ var OCRScanner = ({
|
|
|
189
154
|
handleFileChange(mockEvent);
|
|
190
155
|
}
|
|
191
156
|
};
|
|
192
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
193
158
|
"div",
|
|
194
159
|
{
|
|
195
160
|
className: `p-6 border-2 border-dashed rounded-xl transition-all ${isProcessing ? "border-blue-400 bg-blue-50/10" : "border-gray-200 hover:border-blue-400"} ${className}`,
|
|
196
161
|
onDragOver: handleDragOver,
|
|
197
162
|
onDrop: handleDrop
|
|
198
163
|
},
|
|
199
|
-
!imagePreview ? /* @__PURE__ */
|
|
164
|
+
!imagePreview ? /* @__PURE__ */ React12__default.default.createElement(
|
|
200
165
|
"div",
|
|
201
166
|
{
|
|
202
167
|
className: "flex flex-col items-center justify-center cursor-pointer space-y-4",
|
|
203
168
|
onClick: () => fileInputRef.current?.click()
|
|
204
169
|
},
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
) : /* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "p-4 bg-blue-50 rounded-full text-blue-500" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Upload, { size: 32 })),
|
|
171
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "text-center" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-lg font-medium text-gray-700" }, "\u70B9\u51FB\u6216\u62D6\u62FD\u56FE\u7247\u8FDB\u884C OCR \u8BC6\u522B"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm text-gray-500" }, "\u652F\u6301 JPG, PNG, WebP"))
|
|
172
|
+
) : /* @__PURE__ */ React12__default.default.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative group rounded-lg overflow-hidden border border-gray-200" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
208
173
|
"img",
|
|
209
174
|
{
|
|
210
175
|
src: imagePreview,
|
|
211
176
|
alt: "Preview",
|
|
212
177
|
className: `max-h-64 mx-auto object-contain transition-opacity ${isProcessing ? "opacity-50" : "opacity-100"}`
|
|
213
178
|
}
|
|
214
|
-
), !isProcessing && /* @__PURE__ */
|
|
179
|
+
), !isProcessing && /* @__PURE__ */ React12__default.default.createElement(
|
|
215
180
|
"button",
|
|
216
181
|
{
|
|
217
182
|
onClick: reset,
|
|
218
183
|
className: "absolute top-2 right-2 p-1 bg-white/80 rounded-full hover:bg-white text-gray-600 shadow-sm"
|
|
219
184
|
},
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
), isProcessing && /* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ React12__default.default.createElement(lucideReact.X, { size: 18 })
|
|
186
|
+
), isProcessing && /* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-black/5" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Loader2, { className: "animate-spin text-blue-500 mb-2", size: 32 }), /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-48 bg-gray-200 rounded-full h-1.5 overflow-hidden" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
222
187
|
"div",
|
|
223
188
|
{
|
|
224
189
|
className: "bg-blue-500 h-full transition-all duration-300",
|
|
225
190
|
style: { width: `${progress * 100}%` }
|
|
226
191
|
}
|
|
227
|
-
)), /* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
192
|
+
)), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xs font-medium text-blue-600 mt-2" }, status === "initializing" ? "\u6B63\u5728\u52A0\u8F7D\u5F15\u64CE..." : `\u8BC6\u522B\u4E2D ${Math.round(progress * 100)}%`))), result && !isProcessing && /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-gray-50 p-4 rounded-lg border border-gray-100 animate-in fade-in slide-in-from-bottom-2" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center gap-2 mb-2 text-gray-600 font-medium" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.FileText, { size: 18 }), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u8BC6\u522B\u7ED3\u679C (\u7F6E\u4FE1\u5EA6: ", Math.round(result.confidence), "%)")), /* @__PURE__ */ React12__default.default.createElement("pre", { className: "text-sm text-gray-800 whitespace-pre-wrap font-sans" }, result.text)), error && /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u8BC6\u522B\u5931\u8D25: ", error.message)),
|
|
193
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
229
194
|
"input",
|
|
230
195
|
{
|
|
231
196
|
type: "file",
|
|
@@ -239,7 +204,7 @@ var OCRScanner = ({
|
|
|
239
204
|
);
|
|
240
205
|
};
|
|
241
206
|
var useBackgroundRemoval = (options = {}) => {
|
|
242
|
-
const [state, setState] =
|
|
207
|
+
const [state, setState] = React12.useState({
|
|
243
208
|
isProcessing: false,
|
|
244
209
|
progress: 0,
|
|
245
210
|
status: "idle",
|
|
@@ -247,7 +212,7 @@ var useBackgroundRemoval = (options = {}) => {
|
|
|
247
212
|
resultBlob: null,
|
|
248
213
|
resultUrl: null
|
|
249
214
|
});
|
|
250
|
-
const remove =
|
|
215
|
+
const remove = React12.useCallback(async (image) => {
|
|
251
216
|
setState((prev) => ({
|
|
252
217
|
...prev,
|
|
253
218
|
isProcessing: true,
|
|
@@ -326,12 +291,12 @@ var useBackgroundRemoval = (options = {}) => {
|
|
|
326
291
|
throw err;
|
|
327
292
|
}
|
|
328
293
|
}, [options]);
|
|
329
|
-
const cleanup =
|
|
294
|
+
const cleanup = React12.useCallback(() => {
|
|
330
295
|
if (state.resultUrl) {
|
|
331
296
|
URL.revokeObjectURL(state.resultUrl);
|
|
332
297
|
}
|
|
333
298
|
}, [state.resultUrl]);
|
|
334
|
-
|
|
299
|
+
React12.useEffect(() => {
|
|
335
300
|
return () => cleanup();
|
|
336
301
|
}, [cleanup]);
|
|
337
302
|
return {
|
|
@@ -344,8 +309,8 @@ var BackgroundRemover = ({
|
|
|
344
309
|
onResult,
|
|
345
310
|
className = ""
|
|
346
311
|
}) => {
|
|
347
|
-
const [imagePreview, setImagePreview] =
|
|
348
|
-
const fileInputRef =
|
|
312
|
+
const [imagePreview, setImagePreview] = React12.useState(null);
|
|
313
|
+
const fileInputRef = React12.useRef(null);
|
|
349
314
|
const { remove, isProcessing, progress, status, resultUrl, error } = useBackgroundRemoval();
|
|
350
315
|
const handleFileChange = async (e) => {
|
|
351
316
|
const file = e.target.files?.[0];
|
|
@@ -373,37 +338,37 @@ var BackgroundRemover = ({
|
|
|
373
338
|
a.download = "removed_background.png";
|
|
374
339
|
a.click();
|
|
375
340
|
};
|
|
376
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: `p-6 border-2 border-dashed rounded-xl transition-all ${isProcessing ? "border-purple-400 bg-purple-50/10" : "border-gray-200 hover:border-purple-400"} ${className}` }, !imagePreview ? /* @__PURE__ */ React12__default.default.createElement(
|
|
377
342
|
"div",
|
|
378
343
|
{
|
|
379
344
|
className: "flex flex-col items-center justify-center cursor-pointer space-y-4",
|
|
380
345
|
onClick: () => fileInputRef.current?.click()
|
|
381
346
|
},
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
) : /* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "p-4 bg-purple-50 rounded-full text-purple-500" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Eraser, { size: 32 })),
|
|
348
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "text-center" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-lg font-medium text-gray-700" }, "\u4E0A\u4F20\u56FE\u7247\u79FB\u9664\u80CC\u666F"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm text-gray-500" }, "\u5EFA\u8BAE\u4F7F\u7528\u4E3B\u4F53\u660E\u786E\u7684\u56FE\u7247"))
|
|
349
|
+
) : /* @__PURE__ */ React12__default.default.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider" }, "\u539F\u56FE"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative rounded-lg overflow-hidden border border-gray-200 bg-gray-50" }, /* @__PURE__ */ React12__default.default.createElement("img", { src: imagePreview, alt: "Original", className: "max-h-64 mx-auto object-contain" }))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider" }, "\u5904\u7406\u7ED3\u679C"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative rounded-lg overflow-hidden border border-gray-200 bg-grid-slate-100 bg-[size:20px_20px]" }, resultUrl ? /* @__PURE__ */ React12__default.default.createElement("img", { src: resultUrl, alt: "Result", className: "max-h-64 mx-auto object-contain animate-in fade-in zoom-in-95 duration-500" }) : /* @__PURE__ */ React12__default.default.createElement("div", { className: "h-64 flex flex-col items-center justify-center text-gray-400" }, isProcessing ? /* @__PURE__ */ React12__default.default.createElement(React12__default.default.Fragment, null, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Loader2, { className: "animate-spin text-purple-500 mb-2", size: 32 }), /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-32 bg-gray-200 rounded-full h-1.5 overflow-hidden" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
385
350
|
"div",
|
|
386
351
|
{
|
|
387
352
|
className: "bg-purple-500 h-full transition-all duration-300",
|
|
388
353
|
style: { width: `${progress * 100}%` }
|
|
389
354
|
}
|
|
390
|
-
)), /* @__PURE__ */
|
|
355
|
+
)), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-[10px] mt-2 font-mono uppercase" }, status.replace(/-/g, " "))) : /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-sm italic" }, "\u7B49\u5F85\u5904\u7406..."))))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex justify-between items-center pt-2" }, !isProcessing && /* @__PURE__ */ React12__default.default.createElement(
|
|
391
356
|
"button",
|
|
392
357
|
{
|
|
393
358
|
onClick: reset,
|
|
394
359
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
395
360
|
},
|
|
396
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ React12__default.default.createElement(lucideReact.X, { size: 16 }),
|
|
397
362
|
"\u91CD\u65B0\u5F00\u59CB"
|
|
398
|
-
), resultUrl && !isProcessing && /* @__PURE__ */
|
|
363
|
+
), resultUrl && !isProcessing && /* @__PURE__ */ React12__default.default.createElement(
|
|
399
364
|
"button",
|
|
400
365
|
{
|
|
401
366
|
onClick: downloadResult,
|
|
402
367
|
className: "flex items-center gap-2 px-6 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-lg shadow-sm transition-all"
|
|
403
368
|
},
|
|
404
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ React12__default.default.createElement(lucideReact.Download, { size: 16 }),
|
|
405
370
|
"\u4E0B\u8F7D PNG"
|
|
406
|
-
)), error && /* @__PURE__ */
|
|
371
|
+
)), error && /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u5904\u7406\u5931\u8D25: ", error.message)), /* @__PURE__ */ React12__default.default.createElement(
|
|
407
372
|
"input",
|
|
408
373
|
{
|
|
409
374
|
type: "file",
|
|
@@ -416,14 +381,14 @@ var BackgroundRemover = ({
|
|
|
416
381
|
));
|
|
417
382
|
};
|
|
418
383
|
var useSentimentAnalysis = (options = {}) => {
|
|
419
|
-
const [state, setState] =
|
|
384
|
+
const [state, setState] = React12.useState({
|
|
420
385
|
isProcessing: false,
|
|
421
386
|
status: "idle",
|
|
422
387
|
error: null,
|
|
423
388
|
result: null
|
|
424
389
|
});
|
|
425
|
-
const pipelineRef =
|
|
426
|
-
const analyze =
|
|
390
|
+
const pipelineRef = React12.useRef(null);
|
|
391
|
+
const analyze = React12.useCallback(async (text) => {
|
|
427
392
|
setState((prev) => ({
|
|
428
393
|
...prev,
|
|
429
394
|
isProcessing: true,
|
|
@@ -507,7 +472,7 @@ var SentimentAnalyzer = ({
|
|
|
507
472
|
className = "",
|
|
508
473
|
placeholder = "\u8F93\u5165\u4E00\u6BB5\u4E2D\u6587\u6216\u82F1\u6587\uFF0C\u5206\u6790\u5176\u60C5\u611F\u503E\u5411..."
|
|
509
474
|
}) => {
|
|
510
|
-
const [text, setText] =
|
|
475
|
+
const [text, setText] = React12.useState("");
|
|
511
476
|
const { analyze, isProcessing, status, result, error } = useSentimentAnalysis();
|
|
512
477
|
const handleAnalyze = async () => {
|
|
513
478
|
if (!text.trim() || isProcessing) return;
|
|
@@ -522,11 +487,11 @@ var SentimentAnalyzer = ({
|
|
|
522
487
|
if (!result) return null;
|
|
523
488
|
switch (result.sentiment) {
|
|
524
489
|
case "positive":
|
|
525
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ React12__default.default.createElement(lucideReact.Smile, { className: "text-green-500", size: 24 });
|
|
526
491
|
case "negative":
|
|
527
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ React12__default.default.createElement(lucideReact.Frown, { className: "text-red-500", size: 24 });
|
|
528
493
|
default:
|
|
529
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ React12__default.default.createElement(lucideReact.Meh, { className: "text-yellow-500", size: 24 });
|
|
530
495
|
}
|
|
531
496
|
};
|
|
532
497
|
const getSentimentColor = () => {
|
|
@@ -540,7 +505,7 @@ var SentimentAnalyzer = ({
|
|
|
540
505
|
return "bg-yellow-50 border-yellow-200 text-yellow-700";
|
|
541
506
|
}
|
|
542
507
|
};
|
|
543
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: `p-6 border rounded-xl bg-white dark:bg-gray-800 shadow-sm ${className}` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center gap-2 mb-4 text-gray-700 dark:text-gray-300 font-medium" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.MessageSquare, { size: 20 }), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u6587\u672C\u60C5\u611F\u5206\u6790")), /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
544
509
|
"textarea",
|
|
545
510
|
{
|
|
546
511
|
value: text,
|
|
@@ -549,25 +514,25 @@ var SentimentAnalyzer = ({
|
|
|
549
514
|
className: "w-full h-32 p-4 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all outline-none resize-none text-gray-800 dark:text-gray-200",
|
|
550
515
|
disabled: isProcessing
|
|
551
516
|
}
|
|
552
|
-
), /* @__PURE__ */
|
|
517
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
553
518
|
"button",
|
|
554
519
|
{
|
|
555
520
|
onClick: handleAnalyze,
|
|
556
521
|
disabled: !text.trim() || isProcessing,
|
|
557
522
|
className: "absolute bottom-3 right-3 p-2 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white rounded-md transition-colors shadow-sm"
|
|
558
523
|
},
|
|
559
|
-
isProcessing ? /* @__PURE__ */
|
|
560
|
-
)), isProcessing && /* @__PURE__ */
|
|
524
|
+
isProcessing ? /* @__PURE__ */ React12__default.default.createElement(lucideReact.Loader2, { className: "animate-spin", size: 18 }) : /* @__PURE__ */ React12__default.default.createElement(lucideReact.Send, { size: 18 })
|
|
525
|
+
)), isProcessing && /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-4 flex items-center gap-2 text-sm text-blue-600 animate-pulse" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Loader2, { size: 14, className: "animate-spin" }), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u6B63\u5728\u5206\u6790 (\u9996\u6B21\u8FD0\u884C\u5C06\u52A0\u8F7D\u6A21\u578B\u8D44\u6E90)...")), result && !isProcessing && /* @__PURE__ */ React12__default.default.createElement("div", { className: `mt-4 p-4 border rounded-lg flex items-center gap-4 animate-in fade-in slide-in-from-top-2 ${getSentimentColor()}` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-2 bg-white rounded-full shadow-sm" }, getSentimentIcon()), /* @__PURE__ */ React12__default.default.createElement("div", null, /* @__PURE__ */ React12__default.default.createElement("p", { className: "font-bold text-lg capitalize" }, result.sentiment), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm opacity-80" }, "\u7F6E\u4FE1\u5EA6: ", (result.score * 100).toFixed(1), "% (", result.label, ")"))), error && /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-4 p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u5206\u6790\u5931\u8D25: ", error.message));
|
|
561
526
|
};
|
|
562
527
|
var useTextGeneration = (options = {}) => {
|
|
563
|
-
const [state, setState] =
|
|
528
|
+
const [state, setState] = React12.useState({
|
|
564
529
|
isProcessing: false,
|
|
565
530
|
status: "idle",
|
|
566
531
|
error: null,
|
|
567
532
|
result: null
|
|
568
533
|
});
|
|
569
|
-
const pipelineRef =
|
|
570
|
-
const generate =
|
|
534
|
+
const pipelineRef = React12.useRef(null);
|
|
535
|
+
const generate = React12.useCallback(async (prompt) => {
|
|
571
536
|
console.log("[AI] Generating for prompt:", prompt);
|
|
572
537
|
setState((prev) => ({
|
|
573
538
|
...prev,
|
|
@@ -649,11 +614,11 @@ var useTextGeneration = (options = {}) => {
|
|
|
649
614
|
return { ...state, generate };
|
|
650
615
|
};
|
|
651
616
|
var SmartAssistant = ({ className = "" }) => {
|
|
652
|
-
const [input, setInput] =
|
|
653
|
-
const [chatHistory, setChatHistory] =
|
|
654
|
-
const scrollRef =
|
|
617
|
+
const [input, setInput] = React12.useState("");
|
|
618
|
+
const [chatHistory, setChatHistory] = React12.useState([]);
|
|
619
|
+
const scrollRef = React12.useRef(null);
|
|
655
620
|
const { generate, isProcessing: isGenerating, status: genStatus } = useTextGeneration();
|
|
656
|
-
|
|
621
|
+
React12.useEffect(() => {
|
|
657
622
|
if (scrollRef.current) {
|
|
658
623
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
659
624
|
}
|
|
@@ -697,7 +662,7 @@ AI\u56DE\u5E94\uFF1A\u201C`;
|
|
|
697
662
|
setChatHistory((prev) => [...prev, { role: "assistant", content: "\uFF08\u672C\u5730\u6A21\u578B\u601D\u8003\u8FC7\u5EA6\uFF0C\u6682\u65F6\u4F11\u606F\u4E2D...\uFF09" }]);
|
|
698
663
|
}
|
|
699
664
|
};
|
|
700
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: `flex flex-col h-[500px] bg-white dark:bg-gray-800 rounded-xl shadow-inner border border-gray-100 dark:border-gray-700 overflow-hidden ${className}` }, /* @__PURE__ */ React12__default.default.createElement("div", { ref: scrollRef, className: "flex-1 overflow-y-auto p-4 space-y-4 bg-gray-50/50 dark:bg-gray-900/50" }, chatHistory.length === 0 && /* @__PURE__ */ React12__default.default.createElement("div", { className: "h-full flex flex-col items-center justify-center text-gray-400 space-y-2" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Bot, { size: 48, className: "opacity-20" }), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm italic text-center px-8 text-gray-400 font-sans" }, "\u4F60\u597D\uFF01\u6211\u662F 100% \u672C\u5730\u8FD0\u884C\u7684 AI\u3002", /* @__PURE__ */ React12__default.default.createElement("br", null), "\u4F60\u53EF\u4EE5\u548C\u6211\u804A\u804A\u5929\uFF0C\u6211\u4F1A\u5C1D\u8BD5\u7406\u89E3\u4F60\u7684\u610F\u601D\u3002")), chatHistory.map((msg, i) => /* @__PURE__ */ React12__default.default.createElement("div", { key: i, className: `flex ${msg.role === "user" ? "justify-end" : "justify-start"} animate-in fade-in slide-in-from-bottom-2` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: `flex gap-3 max-w-[85%] ${msg.role === "user" ? "flex-row-reverse" : ""}` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: `p-2 rounded-lg h-fit ${msg.role === "user" ? "bg-blue-100 text-blue-600" : "bg-white dark:bg-gray-700 shadow-sm border border-gray-100 dark:border-gray-600 text-gray-400"}` }, msg.role === "user" ? /* @__PURE__ */ React12__default.default.createElement(lucideReact.User, { size: 18 }) : /* @__PURE__ */ React12__default.default.createElement(lucideReact.Bot, { size: 18 })), /* @__PURE__ */ React12__default.default.createElement("div", { className: `p-3 rounded-2xl shadow-sm text-sm ${msg.role === "user" ? "bg-blue-600 text-white rounded-tr-none" : "bg-white dark:bg-gray-700 text-gray-800 dark:text-gray-200 rounded-tl-none border border-gray-100 dark:border-gray-600 leading-relaxed"}` }, msg.content)))), isGenerating && /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex justify-start" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex gap-3 items-center bg-white dark:bg-gray-700 p-3 rounded-2xl rounded-tl-none border border-gray-100 dark:border-gray-600" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Loader2, { className: "animate-spin text-blue-500", size: 16 }), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-xs text-gray-500 font-medium" }, "\u601D\u8003\u4E2D..."), /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-[10px] text-blue-400 font-mono tracking-tighter" }, genStatus))))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-4 bg-white dark:bg-gray-800 border-t border-gray-100 dark:border-gray-700" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative flex items-center gap-2" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
701
666
|
"input",
|
|
702
667
|
{
|
|
703
668
|
type: "text",
|
|
@@ -708,2022 +673,600 @@ AI\u56DE\u5E94\uFF1A\u201C`;
|
|
|
708
673
|
className: "flex-1 bg-gray-50 dark:bg-gray-900 border-none rounded-full px-5 py-3 pr-12 text-sm focus:ring-2 focus:ring-blue-500 outline-none dark:text-white text-gray-800",
|
|
709
674
|
disabled: isGenerating
|
|
710
675
|
}
|
|
711
|
-
), /* @__PURE__ */
|
|
676
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
712
677
|
"button",
|
|
713
678
|
{
|
|
714
679
|
onClick: handleSend,
|
|
715
680
|
disabled: !input.trim() || isGenerating,
|
|
716
681
|
className: "absolute right-1 p-2.5 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white rounded-full transition-all shadow-md active:scale-95 flex items-center justify-center"
|
|
717
682
|
},
|
|
718
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ React12__default.default.createElement(lucideReact.Send, { size: 18 })
|
|
719
684
|
))));
|
|
720
685
|
};
|
|
721
|
-
var
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
);
|
|
746
|
-
var Button = React37__namespace.forwardRef(
|
|
747
|
-
({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => {
|
|
748
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
749
|
-
return /* @__PURE__ */ React37__namespace.createElement(
|
|
750
|
-
Comp,
|
|
686
|
+
var themeStyles = {
|
|
687
|
+
light: "",
|
|
688
|
+
dark: "bg-[#222] text-[#eee] border-[#444]",
|
|
689
|
+
blue: "bg-[#f0f8ff] border-[#1890ff]/20"
|
|
690
|
+
};
|
|
691
|
+
var ProfileModal = ({
|
|
692
|
+
isOpen,
|
|
693
|
+
onClose,
|
|
694
|
+
data,
|
|
695
|
+
showAvatar = true,
|
|
696
|
+
showContacts = true,
|
|
697
|
+
showSocial = true,
|
|
698
|
+
showBio = true,
|
|
699
|
+
avatarSize = 80,
|
|
700
|
+
onAvatarClick,
|
|
701
|
+
onSocialLinkClick,
|
|
702
|
+
onContactClick,
|
|
703
|
+
themeName = "light",
|
|
704
|
+
className
|
|
705
|
+
}) => {
|
|
706
|
+
const renderSocialLinks = () => {
|
|
707
|
+
if (!data.socialLinks || data.socialLinks.length === 0) return null;
|
|
708
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex gap-3 mt-2" }, data.socialLinks.map((link, index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
709
|
+
"a",
|
|
751
710
|
{
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}
|
|
779
|
-
));
|
|
780
|
-
CardHeader.displayName = "CardHeader";
|
|
781
|
-
var CardTitle = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
782
|
-
"div",
|
|
783
|
-
{
|
|
784
|
-
ref,
|
|
785
|
-
className: chunk7Z5LLJ3A_js.cn("font-semibold leading-none tracking-tight", className),
|
|
786
|
-
...props
|
|
787
|
-
}
|
|
788
|
-
));
|
|
789
|
-
CardTitle.displayName = "CardTitle";
|
|
790
|
-
var CardDescription = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
791
|
-
"div",
|
|
792
|
-
{
|
|
793
|
-
ref,
|
|
794
|
-
className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
|
|
795
|
-
...props
|
|
796
|
-
}
|
|
797
|
-
));
|
|
798
|
-
CardDescription.displayName = "CardDescription";
|
|
799
|
-
var CardContent = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement("div", { ref, className: chunk7Z5LLJ3A_js.cn("p-6 pt-0", className), ...props }));
|
|
800
|
-
CardContent.displayName = "CardContent";
|
|
801
|
-
var CardFooter = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
802
|
-
"div",
|
|
803
|
-
{
|
|
804
|
-
ref,
|
|
805
|
-
className: chunk7Z5LLJ3A_js.cn("flex items-center p-6 pt-0", className),
|
|
806
|
-
...props
|
|
807
|
-
}
|
|
808
|
-
));
|
|
809
|
-
CardFooter.displayName = "CardFooter";
|
|
810
|
-
var badgeVariants = classVarianceAuthority.cva(
|
|
811
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
812
|
-
{
|
|
813
|
-
variants: {
|
|
814
|
-
variant: {
|
|
815
|
-
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
816
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
817
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
818
|
-
outline: "text-foreground"
|
|
819
|
-
}
|
|
820
|
-
},
|
|
821
|
-
defaultVariants: {
|
|
822
|
-
variant: "default"
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
);
|
|
826
|
-
function Badge({ className, variant, ...props }) {
|
|
827
|
-
return /* @__PURE__ */ React37__namespace.createElement("div", { className: chunk7Z5LLJ3A_js.cn(badgeVariants({ variant }), className), ...props });
|
|
828
|
-
}
|
|
829
|
-
var Input = React37__namespace.forwardRef(
|
|
830
|
-
({ className, type, ...props }, ref) => {
|
|
831
|
-
return /* @__PURE__ */ React37__namespace.createElement(
|
|
832
|
-
"input",
|
|
711
|
+
key: index,
|
|
712
|
+
href: link.url,
|
|
713
|
+
className: chunk7Z5LLJ3A_js.cn(
|
|
714
|
+
"w-8 h-8 flex items-center justify-center rounded-full no-underline transition-all hover:-translate-y-0.5",
|
|
715
|
+
themeName === "dark" ? "bg-gray-800 text-gray-200 hover:bg-gray-700" : "bg-gray-100 text-gray-800 hover:bg-gray-200"
|
|
716
|
+
),
|
|
717
|
+
title: link.type,
|
|
718
|
+
target: "_blank",
|
|
719
|
+
rel: "noopener noreferrer",
|
|
720
|
+
onClick: (e) => {
|
|
721
|
+
if (onSocialLinkClick) {
|
|
722
|
+
e.preventDefault();
|
|
723
|
+
onSocialLinkClick(link.url, link.type);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
link.icon ? /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-base" }, link.icon) : /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-[10px] font-semibold" }, link.type)
|
|
728
|
+
)));
|
|
729
|
+
};
|
|
730
|
+
const renderContacts = () => {
|
|
731
|
+
if (!data.contacts || Object.keys(data.contacts).length === 0) return null;
|
|
732
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
733
|
+
"mt-4 border-t pt-4",
|
|
734
|
+
themeName === "dark" ? "border-gray-800" : "border-gray-100"
|
|
735
|
+
) }, Object.entries(data.contacts).map(([type, value], index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
736
|
+
"div",
|
|
833
737
|
{
|
|
834
|
-
|
|
738
|
+
key: index,
|
|
835
739
|
className: chunk7Z5LLJ3A_js.cn(
|
|
836
|
-
"flex
|
|
837
|
-
|
|
740
|
+
"flex mb-2 cursor-pointer py-1.5 px-2 rounded transition-colors",
|
|
741
|
+
themeName === "dark" ? "hover:bg-gray-800" : "hover:bg-gray-50"
|
|
838
742
|
),
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
)
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
)
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
...props
|
|
855
|
-
}
|
|
856
|
-
));
|
|
857
|
-
Label.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
858
|
-
var Tabs = TabsPrimitive__namespace.Root;
|
|
859
|
-
var TabsList = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
860
|
-
TabsPrimitive__namespace.List,
|
|
861
|
-
{
|
|
862
|
-
ref,
|
|
863
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
864
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
865
|
-
className
|
|
866
|
-
),
|
|
867
|
-
...props
|
|
868
|
-
}
|
|
869
|
-
));
|
|
870
|
-
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
871
|
-
var TabsTrigger = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
872
|
-
TabsPrimitive__namespace.Trigger,
|
|
873
|
-
{
|
|
874
|
-
ref,
|
|
875
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
876
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
877
|
-
className
|
|
878
|
-
),
|
|
879
|
-
...props
|
|
880
|
-
}
|
|
881
|
-
));
|
|
882
|
-
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
883
|
-
var TabsContent = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
884
|
-
TabsPrimitive__namespace.Content,
|
|
885
|
-
{
|
|
886
|
-
ref,
|
|
887
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
888
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
889
|
-
className
|
|
890
|
-
),
|
|
891
|
-
...props
|
|
892
|
-
}
|
|
893
|
-
));
|
|
894
|
-
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
895
|
-
var Dialog = DialogPrimitive__namespace.Root;
|
|
896
|
-
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
897
|
-
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
898
|
-
var DialogClose = DialogPrimitive__namespace.Close;
|
|
899
|
-
var DialogOverlay = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
900
|
-
DialogPrimitive__namespace.Overlay,
|
|
901
|
-
{
|
|
902
|
-
ref,
|
|
903
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
904
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
905
|
-
className
|
|
906
|
-
),
|
|
907
|
-
...props
|
|
908
|
-
}
|
|
909
|
-
));
|
|
910
|
-
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
911
|
-
var DialogContent = React37__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(DialogPortal, null, /* @__PURE__ */ React37__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React37__namespace.createElement(
|
|
912
|
-
DialogPrimitive__namespace.Content,
|
|
913
|
-
{
|
|
914
|
-
ref,
|
|
915
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
916
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
917
|
-
className
|
|
918
|
-
),
|
|
919
|
-
...props
|
|
920
|
-
},
|
|
921
|
-
children,
|
|
922
|
-
/* @__PURE__ */ React37__namespace.createElement(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ React37__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React37__namespace.createElement("span", { className: "sr-only" }, "Close"))
|
|
923
|
-
)));
|
|
924
|
-
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
925
|
-
var DialogHeader = ({
|
|
926
|
-
className,
|
|
927
|
-
...props
|
|
928
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
929
|
-
"div",
|
|
930
|
-
{
|
|
931
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
932
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
933
|
-
className
|
|
934
|
-
),
|
|
935
|
-
...props
|
|
936
|
-
}
|
|
937
|
-
);
|
|
938
|
-
DialogHeader.displayName = "DialogHeader";
|
|
939
|
-
var DialogFooter = ({
|
|
940
|
-
className,
|
|
941
|
-
...props
|
|
942
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
943
|
-
"div",
|
|
944
|
-
{
|
|
945
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
946
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
947
|
-
className
|
|
948
|
-
),
|
|
949
|
-
...props
|
|
950
|
-
}
|
|
951
|
-
);
|
|
952
|
-
DialogFooter.displayName = "DialogFooter";
|
|
953
|
-
var DialogTitle = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
954
|
-
DialogPrimitive__namespace.Title,
|
|
955
|
-
{
|
|
956
|
-
ref,
|
|
957
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
958
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
959
|
-
className
|
|
960
|
-
),
|
|
961
|
-
...props
|
|
962
|
-
}
|
|
963
|
-
));
|
|
964
|
-
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
965
|
-
var DialogDescription = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
966
|
-
DialogPrimitive__namespace.Description,
|
|
967
|
-
{
|
|
968
|
-
ref,
|
|
969
|
-
className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
|
|
970
|
-
...props
|
|
971
|
-
}
|
|
972
|
-
));
|
|
973
|
-
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
974
|
-
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
975
|
-
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
976
|
-
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
977
|
-
var AlertDialogOverlay = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
978
|
-
AlertDialogPrimitive__namespace.Overlay,
|
|
979
|
-
{
|
|
980
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
981
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
982
|
-
className
|
|
983
|
-
),
|
|
984
|
-
...props,
|
|
985
|
-
ref
|
|
986
|
-
}
|
|
987
|
-
));
|
|
988
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
989
|
-
var AlertDialogContent = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(AlertDialogPortal, null, /* @__PURE__ */ React37__namespace.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React37__namespace.createElement(
|
|
990
|
-
AlertDialogPrimitive__namespace.Content,
|
|
991
|
-
{
|
|
992
|
-
ref,
|
|
993
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
994
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
995
|
-
className
|
|
996
|
-
),
|
|
997
|
-
...props
|
|
998
|
-
}
|
|
999
|
-
)));
|
|
1000
|
-
AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
|
|
1001
|
-
var AlertDialogHeader = ({
|
|
1002
|
-
className,
|
|
1003
|
-
...props
|
|
1004
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1005
|
-
"div",
|
|
1006
|
-
{
|
|
1007
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1008
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1009
|
-
className
|
|
1010
|
-
),
|
|
1011
|
-
...props
|
|
1012
|
-
}
|
|
1013
|
-
);
|
|
1014
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
1015
|
-
var AlertDialogFooter = ({
|
|
1016
|
-
className,
|
|
1017
|
-
...props
|
|
1018
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1019
|
-
"div",
|
|
1020
|
-
{
|
|
1021
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1022
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1023
|
-
className
|
|
1024
|
-
),
|
|
1025
|
-
...props
|
|
1026
|
-
}
|
|
1027
|
-
);
|
|
1028
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
1029
|
-
var AlertDialogTitle = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1030
|
-
AlertDialogPrimitive__namespace.Title,
|
|
1031
|
-
{
|
|
1032
|
-
ref,
|
|
1033
|
-
className: chunk7Z5LLJ3A_js.cn("text-lg font-semibold", className),
|
|
1034
|
-
...props
|
|
1035
|
-
}
|
|
1036
|
-
));
|
|
1037
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
1038
|
-
var AlertDialogDescription = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1039
|
-
AlertDialogPrimitive__namespace.Description,
|
|
1040
|
-
{
|
|
1041
|
-
ref,
|
|
1042
|
-
className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
|
|
1043
|
-
...props
|
|
1044
|
-
}
|
|
1045
|
-
));
|
|
1046
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
1047
|
-
var AlertDialogAction = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1048
|
-
AlertDialogPrimitive__namespace.Action,
|
|
1049
|
-
{
|
|
1050
|
-
ref,
|
|
1051
|
-
className: chunk7Z5LLJ3A_js.cn(buttonVariants(), className),
|
|
1052
|
-
...props
|
|
1053
|
-
}
|
|
1054
|
-
));
|
|
1055
|
-
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
1056
|
-
var AlertDialogCancel = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1057
|
-
AlertDialogPrimitive__namespace.Cancel,
|
|
1058
|
-
{
|
|
1059
|
-
ref,
|
|
1060
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1061
|
-
buttonVariants({ variant: "outline" }),
|
|
1062
|
-
"mt-2 sm:mt-0",
|
|
1063
|
-
className
|
|
1064
|
-
),
|
|
1065
|
-
...props
|
|
1066
|
-
}
|
|
1067
|
-
));
|
|
1068
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
|
|
1069
|
-
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
1070
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
1071
|
-
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
1072
|
-
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
1073
|
-
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
1074
|
-
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
1075
|
-
var DropdownMenuSubTrigger = React37__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1076
|
-
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
1077
|
-
{
|
|
1078
|
-
ref,
|
|
1079
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1080
|
-
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1081
|
-
inset && "pl-8",
|
|
1082
|
-
className
|
|
1083
|
-
),
|
|
1084
|
-
...props
|
|
1085
|
-
},
|
|
1086
|
-
children,
|
|
1087
|
-
/* @__PURE__ */ React37__namespace.createElement(lucideReact.ChevronRight, { className: "ml-auto" })
|
|
1088
|
-
));
|
|
1089
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
1090
|
-
var DropdownMenuSubContent = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1091
|
-
DropdownMenuPrimitive__namespace.SubContent,
|
|
1092
|
-
{
|
|
1093
|
-
ref,
|
|
1094
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1095
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1096
|
-
className
|
|
1097
|
-
),
|
|
1098
|
-
...props
|
|
1099
|
-
}
|
|
1100
|
-
));
|
|
1101
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
1102
|
-
var DropdownMenuContent = React37__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React37__namespace.createElement(
|
|
1103
|
-
DropdownMenuPrimitive__namespace.Content,
|
|
1104
|
-
{
|
|
1105
|
-
ref,
|
|
1106
|
-
sideOffset,
|
|
1107
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1108
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1109
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1110
|
-
className
|
|
1111
|
-
),
|
|
1112
|
-
...props
|
|
1113
|
-
}
|
|
1114
|
-
)));
|
|
1115
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
1116
|
-
var DropdownMenuItem = React37__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1117
|
-
DropdownMenuPrimitive__namespace.Item,
|
|
1118
|
-
{
|
|
1119
|
-
ref,
|
|
1120
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1121
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1122
|
-
inset && "pl-8",
|
|
1123
|
-
className
|
|
1124
|
-
),
|
|
1125
|
-
...props
|
|
1126
|
-
}
|
|
1127
|
-
));
|
|
1128
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
1129
|
-
var DropdownMenuCheckboxItem = React37__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1130
|
-
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
1131
|
-
{
|
|
1132
|
-
ref,
|
|
1133
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1134
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1135
|
-
className
|
|
1136
|
-
),
|
|
1137
|
-
checked,
|
|
1138
|
-
...props
|
|
1139
|
-
},
|
|
1140
|
-
/* @__PURE__ */ React37__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React37__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React37__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }))),
|
|
1141
|
-
children
|
|
1142
|
-
));
|
|
1143
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
1144
|
-
var DropdownMenuRadioItem = React37__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1145
|
-
DropdownMenuPrimitive__namespace.RadioItem,
|
|
1146
|
-
{
|
|
1147
|
-
ref,
|
|
1148
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1149
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1150
|
-
className
|
|
1151
|
-
),
|
|
1152
|
-
...props
|
|
1153
|
-
},
|
|
1154
|
-
/* @__PURE__ */ React37__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React37__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React37__namespace.createElement(lucideReact.Circle, { className: "h-2 w-2 fill-current" }))),
|
|
1155
|
-
children
|
|
1156
|
-
));
|
|
1157
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
1158
|
-
var DropdownMenuLabel = React37__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1159
|
-
DropdownMenuPrimitive__namespace.Label,
|
|
1160
|
-
{
|
|
1161
|
-
ref,
|
|
1162
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1163
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
1164
|
-
inset && "pl-8",
|
|
1165
|
-
className
|
|
1166
|
-
),
|
|
1167
|
-
...props
|
|
1168
|
-
}
|
|
1169
|
-
));
|
|
1170
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
1171
|
-
var DropdownMenuSeparator = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1172
|
-
DropdownMenuPrimitive__namespace.Separator,
|
|
1173
|
-
{
|
|
1174
|
-
ref,
|
|
1175
|
-
className: chunk7Z5LLJ3A_js.cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1176
|
-
...props
|
|
1177
|
-
}
|
|
1178
|
-
));
|
|
1179
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
1180
|
-
var DropdownMenuShortcut = ({
|
|
1181
|
-
className,
|
|
1182
|
-
...props
|
|
1183
|
-
}) => {
|
|
1184
|
-
return /* @__PURE__ */ React37__namespace.createElement(
|
|
1185
|
-
"span",
|
|
743
|
+
onClick: () => onContactClick && onContactClick(type, value)
|
|
744
|
+
},
|
|
745
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
746
|
+
"font-medium w-[70px] shrink-0",
|
|
747
|
+
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
748
|
+
) }, type, ":"),
|
|
749
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: themeName === "dark" ? "text-gray-200" : "text-gray-800" }, value)
|
|
750
|
+
)));
|
|
751
|
+
};
|
|
752
|
+
return /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.DialogContent, { className: chunk7Z5LLJ3A_js.cn(
|
|
753
|
+
"sm:max-w-[500px] p-0 overflow-hidden border-none shadow-2xl",
|
|
754
|
+
themeStyles[themeName] || "",
|
|
755
|
+
className
|
|
756
|
+
) }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex gap-5 mb-5" }, showAvatar && /* @__PURE__ */ React12__default.default.createElement(
|
|
757
|
+
"div",
|
|
1186
758
|
{
|
|
1187
|
-
className:
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
759
|
+
className: "shrink-0",
|
|
760
|
+
onClick: onAvatarClick,
|
|
761
|
+
style: { cursor: onAvatarClick ? "pointer" : "default" }
|
|
762
|
+
},
|
|
763
|
+
/* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.Avatar, { className: "border-2 border-primary/10 shadow-sm", style: { width: avatarSize, height: avatarSize } }, data.avatar && /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.AvatarImage, { src: data.avatar, alt: data.name, className: "object-cover" }), /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.AvatarFallback, { className: "text-xl" }, data.name.substring(0, 2).toUpperCase()))
|
|
764
|
+
), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex-1 min-w-0 flex flex-col justify-center" }, /* @__PURE__ */ React12__default.default.createElement("h2", { className: chunk7Z5LLJ3A_js.cn(
|
|
765
|
+
"text-2xl font-bold m-0 mb-1",
|
|
766
|
+
themeName === "dark" ? "text-white" : "text-gray-900"
|
|
767
|
+
) }, data.name), data.title && /* @__PURE__ */ React12__default.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
768
|
+
"text-sm mb-2",
|
|
769
|
+
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
770
|
+
) }, data.title), showSocial && renderSocialLinks())), showBio && data.bio && /* @__PURE__ */ React12__default.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
771
|
+
"mb-5 leading-relaxed text-sm",
|
|
772
|
+
themeName === "dark" ? "text-gray-300" : "text-gray-600"
|
|
773
|
+
) }, /* @__PURE__ */ React12__default.default.createElement("p", null, data.bio)), showContacts && renderContacts(), data.customContent && /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-5" }, data.customContent))));
|
|
1191
774
|
};
|
|
1192
|
-
|
|
1193
|
-
var
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
{
|
|
1199
|
-
|
|
1200
|
-
align,
|
|
1201
|
-
sideOffset,
|
|
1202
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1203
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
1204
|
-
className
|
|
1205
|
-
),
|
|
1206
|
-
...props
|
|
1207
|
-
}
|
|
1208
|
-
)));
|
|
1209
|
-
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
1210
|
-
var Progress = React37__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1211
|
-
ProgressPrimitive__namespace.Root,
|
|
1212
|
-
{
|
|
1213
|
-
ref,
|
|
1214
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1215
|
-
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
1216
|
-
className
|
|
1217
|
-
),
|
|
1218
|
-
...props
|
|
1219
|
-
},
|
|
1220
|
-
/* @__PURE__ */ React37__namespace.createElement(
|
|
1221
|
-
ProgressPrimitive__namespace.Indicator,
|
|
1222
|
-
{
|
|
1223
|
-
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1224
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1225
|
-
}
|
|
1226
|
-
)
|
|
1227
|
-
));
|
|
1228
|
-
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
1229
|
-
var ScrollArea = React37__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1230
|
-
ScrollAreaPrimitive__namespace.Root,
|
|
1231
|
-
{
|
|
1232
|
-
ref,
|
|
1233
|
-
className: chunk7Z5LLJ3A_js.cn("relative overflow-hidden", className),
|
|
1234
|
-
...props
|
|
1235
|
-
},
|
|
1236
|
-
/* @__PURE__ */ React37__namespace.createElement(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
|
|
1237
|
-
/* @__PURE__ */ React37__namespace.createElement(ScrollBar, null),
|
|
1238
|
-
/* @__PURE__ */ React37__namespace.createElement(ScrollAreaPrimitive__namespace.Corner, null)
|
|
1239
|
-
));
|
|
1240
|
-
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
1241
|
-
var ScrollBar = React37__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1242
|
-
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
1243
|
-
{
|
|
1244
|
-
ref,
|
|
1245
|
-
orientation,
|
|
1246
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1247
|
-
"flex touch-none select-none transition-colors",
|
|
1248
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1249
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1250
|
-
className
|
|
1251
|
-
),
|
|
1252
|
-
...props
|
|
1253
|
-
},
|
|
1254
|
-
/* @__PURE__ */ React37__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1255
|
-
));
|
|
1256
|
-
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
1257
|
-
var Select = SelectPrimitive__namespace.Root;
|
|
1258
|
-
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
1259
|
-
var SelectValue = SelectPrimitive__namespace.Value;
|
|
1260
|
-
var SelectTrigger = React37__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1261
|
-
SelectPrimitive__namespace.Trigger,
|
|
1262
|
-
{
|
|
1263
|
-
ref,
|
|
1264
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1265
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1266
|
-
className
|
|
1267
|
-
),
|
|
1268
|
-
...props
|
|
1269
|
-
},
|
|
1270
|
-
children,
|
|
1271
|
-
/* @__PURE__ */ React37__namespace.createElement(SelectPrimitive__namespace.Icon, { asChild: true }, /* @__PURE__ */ React37__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }))
|
|
1272
|
-
));
|
|
1273
|
-
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
1274
|
-
var SelectScrollUpButton = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1275
|
-
SelectPrimitive__namespace.ScrollUpButton,
|
|
1276
|
-
{
|
|
1277
|
-
ref,
|
|
1278
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1279
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1280
|
-
className
|
|
1281
|
-
),
|
|
1282
|
-
...props
|
|
1283
|
-
},
|
|
1284
|
-
/* @__PURE__ */ React37__namespace.createElement(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
1285
|
-
));
|
|
1286
|
-
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
1287
|
-
var SelectScrollDownButton = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1288
|
-
SelectPrimitive__namespace.ScrollDownButton,
|
|
1289
|
-
{
|
|
1290
|
-
ref,
|
|
1291
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1292
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1293
|
-
className
|
|
1294
|
-
),
|
|
1295
|
-
...props
|
|
1296
|
-
},
|
|
1297
|
-
/* @__PURE__ */ React37__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
1298
|
-
));
|
|
1299
|
-
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
1300
|
-
var SelectContent = React37__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React37__namespace.createElement(
|
|
1301
|
-
SelectPrimitive__namespace.Content,
|
|
1302
|
-
{
|
|
1303
|
-
ref,
|
|
1304
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1305
|
-
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
1306
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1307
|
-
className
|
|
1308
|
-
),
|
|
1309
|
-
position,
|
|
1310
|
-
...props
|
|
1311
|
-
},
|
|
1312
|
-
/* @__PURE__ */ React37__namespace.createElement(SelectScrollUpButton, null),
|
|
1313
|
-
/* @__PURE__ */ React37__namespace.createElement(
|
|
1314
|
-
SelectPrimitive__namespace.Viewport,
|
|
775
|
+
var ProfileModal_default = ProfileModal;
|
|
776
|
+
var BadgeList = ({
|
|
777
|
+
badges,
|
|
778
|
+
className = ""
|
|
779
|
+
}) => {
|
|
780
|
+
if (!badges || badges.length === 0) return null;
|
|
781
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex flex-wrap gap-2 mt-4", className) }, badges.map((badge, index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
782
|
+
chunkE72D5KHY_js.Badge,
|
|
1315
783
|
{
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1319
|
-
)
|
|
784
|
+
key: index,
|
|
785
|
+
variant: badge.type === "default" ? "default" : badge.type
|
|
1320
786
|
},
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
));
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
787
|
+
badge.icon && /* @__PURE__ */ React12__default.default.createElement("span", { className: "mr-1" }, badge.icon),
|
|
788
|
+
badge.label
|
|
789
|
+
)));
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
// src/profile/internal/Stat.tsx
|
|
793
|
+
var Stat = ({
|
|
794
|
+
label,
|
|
795
|
+
value,
|
|
796
|
+
icon,
|
|
797
|
+
className = ""
|
|
798
|
+
}) => {
|
|
799
|
+
return /* @__PURE__ */ React.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex flex-col items-center flex-1 text-center", className) }, icon && /* @__PURE__ */ React.createElement("span", { className: "mb-2 text-2xl text-gray-400" }, icon), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-lg font-semibold text-gray-800" }, value), /* @__PURE__ */ React.createElement("div", { className: "text-xs text-gray-400 mt-1" }, label)));
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
// src/profile/internal/StatList.tsx
|
|
803
|
+
var StatList = ({
|
|
804
|
+
stats,
|
|
805
|
+
className = ""
|
|
806
|
+
}) => {
|
|
807
|
+
if (!stats || stats.length === 0) return null;
|
|
808
|
+
return /* @__PURE__ */ React.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex justify-between mt-4 pt-4 border-t border-gray-100", className) }, stats.map((stat, index) => /* @__PURE__ */ React.createElement(Stat, { key: index, ...stat })));
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/profile/ProfileButton.tsx
|
|
812
|
+
var exampleProfileData = {
|
|
813
|
+
name: "\u5F20\u4E09",
|
|
814
|
+
avatar: "https://randomuser.me/api/portraits/men/32.jpg",
|
|
815
|
+
title: "\u9AD8\u7EA7\u524D\u7AEF\u5DE5\u7A0B\u5E08",
|
|
816
|
+
bio: "\u4E13\u6CE8\u4E8EReact\u548CNext.js\u5F00\u53D1\u7684\u524D\u7AEF\u5DE5\u7A0B\u5E08\uFF0C\u67095\u5E74\u5DE5\u4F5C\u7ECF\u9A8C\u3002\u70ED\u7231\u5F00\u6E90\uFF0C\u559C\u6B22\u5206\u4EAB\u6280\u672F\u7ECF\u9A8C\u3002",
|
|
817
|
+
contacts: {
|
|
818
|
+
"\u90AE\u7BB1": "zhangsan@example.com",
|
|
819
|
+
"\u7535\u8BDD": "138-8888-8888",
|
|
820
|
+
"\u5730\u5740": "\u4E0A\u6D77\u5E02\u6D66\u4E1C\u65B0\u533A"
|
|
1344
821
|
},
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
)
|
|
1373
|
-
);
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
var SheetOverlay = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1380
|
-
DialogPrimitive__namespace.Overlay,
|
|
1381
|
-
{
|
|
1382
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1383
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1384
|
-
className
|
|
1385
|
-
),
|
|
1386
|
-
...props,
|
|
1387
|
-
ref
|
|
1388
|
-
}
|
|
1389
|
-
));
|
|
1390
|
-
SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1391
|
-
var sheetVariants = classVarianceAuthority.cva(
|
|
1392
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1393
|
-
{
|
|
1394
|
-
variants: {
|
|
1395
|
-
side: {
|
|
1396
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1397
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1398
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1399
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1400
|
-
}
|
|
1401
|
-
},
|
|
1402
|
-
defaultVariants: {
|
|
1403
|
-
side: "right"
|
|
822
|
+
socialLinks: [
|
|
823
|
+
{ type: "GitHub", url: "https://github.com/zhangsan", icon: "\u2605" },
|
|
824
|
+
{ type: "Twitter", url: "https://twitter.com/zhangsan", icon: "\u2726" },
|
|
825
|
+
{ type: "LinkedIn", url: "https://linkedin.com/in/zhangsan", icon: "\u272A" }
|
|
826
|
+
],
|
|
827
|
+
badges: [
|
|
828
|
+
{ label: "React", type: "primary" },
|
|
829
|
+
{ label: "Next.js", type: "success" },
|
|
830
|
+
{ label: "TypeScript", type: "info" },
|
|
831
|
+
{ label: "CSS", type: "default" }
|
|
832
|
+
],
|
|
833
|
+
stats: [
|
|
834
|
+
{ label: "\u9879\u76EE", value: 42 },
|
|
835
|
+
{ label: "\u7C89\u4E1D", value: 1024 },
|
|
836
|
+
{ label: "\u8BC4\u5206", value: "4.9" }
|
|
837
|
+
],
|
|
838
|
+
customContent: /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-5 border-t border-gray-100 pt-4" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-sm font-semibold mb-2" }, "\u4E13\u4E1A\u6280\u80FD"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm text-gray-600 leading-relaxed" }, "\u7CBE\u901AReact\u3001Vue\u3001Angular\u7B49\u524D\u7AEF\u6846\u67B6\uFF0C\u719F\u6089TypeScript\u3001JavaScript\u3001CSS3\u3001HTML5\u7B49\u524D\u7AEF\u6280\u672F\u3002 \u6709\u4E30\u5BCC\u7684\u5927\u578B\u9879\u76EE\u5F00\u53D1\u7ECF\u9A8C\uFF0C\u80FD\u72EC\u7ACB\u8D1F\u8D23\u524D\u7AEF\u67B6\u6784\u8BBE\u8BA1\u3002"))
|
|
839
|
+
};
|
|
840
|
+
var ProfileButton = ({
|
|
841
|
+
data = exampleProfileData,
|
|
842
|
+
buttonText = "\u67E5\u770B\u4E2A\u4EBA\u4FE1\u606F",
|
|
843
|
+
variant = "default",
|
|
844
|
+
size = "default",
|
|
845
|
+
className = "",
|
|
846
|
+
modalTheme = "light"
|
|
847
|
+
}) => {
|
|
848
|
+
const [isModalOpen, setIsModalOpen] = React12.useState(false);
|
|
849
|
+
const openModal = () => setIsModalOpen(true);
|
|
850
|
+
const closeModal = () => setIsModalOpen(false);
|
|
851
|
+
const handleContactClick = (type, value) => {
|
|
852
|
+
if (type === "\u90AE\u7BB1") {
|
|
853
|
+
window.open(`mailto:${value}`);
|
|
854
|
+
} else if (type === "\u7535\u8BDD") {
|
|
855
|
+
window.open(`tel:${value}`);
|
|
1404
856
|
}
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
DialogPrimitive__namespace.Content,
|
|
1409
|
-
{
|
|
1410
|
-
ref,
|
|
1411
|
-
className: chunk7Z5LLJ3A_js.cn(sheetVariants({ side }), className),
|
|
1412
|
-
...props
|
|
1413
|
-
},
|
|
1414
|
-
/* @__PURE__ */ React37__namespace.createElement(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" }, /* @__PURE__ */ React37__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React37__namespace.createElement("span", { className: "sr-only" }, "Close")),
|
|
1415
|
-
children
|
|
1416
|
-
)));
|
|
1417
|
-
SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1418
|
-
var SheetHeader = ({
|
|
1419
|
-
className,
|
|
1420
|
-
...props
|
|
1421
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1422
|
-
"div",
|
|
1423
|
-
{
|
|
1424
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1425
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1426
|
-
className
|
|
1427
|
-
),
|
|
1428
|
-
...props
|
|
1429
|
-
}
|
|
1430
|
-
);
|
|
1431
|
-
SheetHeader.displayName = "SheetHeader";
|
|
1432
|
-
var SheetFooter = ({
|
|
1433
|
-
className,
|
|
1434
|
-
...props
|
|
1435
|
-
}) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1436
|
-
"div",
|
|
1437
|
-
{
|
|
1438
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1439
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1440
|
-
className
|
|
1441
|
-
),
|
|
1442
|
-
...props
|
|
1443
|
-
}
|
|
1444
|
-
);
|
|
1445
|
-
SheetFooter.displayName = "SheetFooter";
|
|
1446
|
-
var SheetTitle = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1447
|
-
DialogPrimitive__namespace.Title,
|
|
1448
|
-
{
|
|
1449
|
-
ref,
|
|
1450
|
-
className: chunk7Z5LLJ3A_js.cn("text-lg font-semibold text-foreground", className),
|
|
1451
|
-
...props
|
|
1452
|
-
}
|
|
1453
|
-
));
|
|
1454
|
-
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1455
|
-
var SheetDescription = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1456
|
-
DialogPrimitive__namespace.Description,
|
|
1457
|
-
{
|
|
1458
|
-
ref,
|
|
1459
|
-
className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
|
|
1460
|
-
...props
|
|
1461
|
-
}
|
|
1462
|
-
));
|
|
1463
|
-
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
1464
|
-
var Textarea = React37__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1465
|
-
return /* @__PURE__ */ React37__namespace.createElement(
|
|
1466
|
-
"textarea",
|
|
857
|
+
};
|
|
858
|
+
return /* @__PURE__ */ React12__default.default.createElement(React12__default.default.Fragment, null, /* @__PURE__ */ React12__default.default.createElement(
|
|
859
|
+
chunkE72D5KHY_js.Button,
|
|
1467
860
|
{
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
),
|
|
1472
|
-
ref,
|
|
1473
|
-
...props
|
|
1474
|
-
}
|
|
1475
|
-
);
|
|
1476
|
-
});
|
|
1477
|
-
Textarea.displayName = "Textarea";
|
|
1478
|
-
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
1479
|
-
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
1480
|
-
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
1481
|
-
var TooltipContent = React37__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(TooltipPrimitive__namespace.Portal, null, /* @__PURE__ */ React37__namespace.createElement(
|
|
1482
|
-
TooltipPrimitive__namespace.Content,
|
|
1483
|
-
{
|
|
1484
|
-
ref,
|
|
1485
|
-
sideOffset,
|
|
1486
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1487
|
-
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
|
|
1488
|
-
className
|
|
1489
|
-
),
|
|
1490
|
-
...props
|
|
1491
|
-
}
|
|
1492
|
-
)));
|
|
1493
|
-
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
1494
|
-
var Avatar = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1495
|
-
AvatarPrimitive__namespace.Root,
|
|
1496
|
-
{
|
|
1497
|
-
ref,
|
|
1498
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1499
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
1500
|
-
className
|
|
1501
|
-
),
|
|
1502
|
-
...props
|
|
1503
|
-
}
|
|
1504
|
-
));
|
|
1505
|
-
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
1506
|
-
var AvatarImage = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1507
|
-
AvatarPrimitive__namespace.Image,
|
|
1508
|
-
{
|
|
1509
|
-
ref,
|
|
1510
|
-
className: chunk7Z5LLJ3A_js.cn("aspect-square h-full w-full", className),
|
|
1511
|
-
...props
|
|
1512
|
-
}
|
|
1513
|
-
));
|
|
1514
|
-
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
1515
|
-
var AvatarFallback = React37__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37__namespace.createElement(
|
|
1516
|
-
AvatarPrimitive__namespace.Fallback,
|
|
1517
|
-
{
|
|
1518
|
-
ref,
|
|
1519
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
1520
|
-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
861
|
+
variant,
|
|
862
|
+
size,
|
|
863
|
+
onClick: openModal,
|
|
1521
864
|
className
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
1527
|
-
function buildGridColsClasses(columns) {
|
|
1528
|
-
return [
|
|
1529
|
-
"grid-cols-1",
|
|
1530
|
-
// 默认单列
|
|
1531
|
-
columns.sm ? `sm:grid-cols-${columns.sm}` : "",
|
|
1532
|
-
columns.md ? `md:grid-cols-${columns.md}` : "md:grid-cols-2",
|
|
1533
|
-
columns.lg ? `lg:grid-cols-${columns.lg}` : "lg:grid-cols-3",
|
|
1534
|
-
columns.xl ? `xl:grid-cols-${columns.xl}` : ""
|
|
1535
|
-
].filter(Boolean).join(" ");
|
|
1536
|
-
}
|
|
1537
|
-
function getGapClassName(gap) {
|
|
1538
|
-
const gapClasses = {
|
|
1539
|
-
sm: "gap-3",
|
|
1540
|
-
md: "gap-6",
|
|
1541
|
-
lg: "gap-8",
|
|
1542
|
-
xl: "gap-10"
|
|
1543
|
-
};
|
|
1544
|
-
return gapClasses[gap];
|
|
1545
|
-
}
|
|
1546
|
-
function Grid({
|
|
1547
|
-
items,
|
|
1548
|
-
renderItem,
|
|
1549
|
-
columns = { md: 2, lg: 3 },
|
|
1550
|
-
gap = "md",
|
|
1551
|
-
className = "",
|
|
1552
|
-
style
|
|
1553
|
-
}) {
|
|
1554
|
-
const gridColsClasses = buildGridColsClasses(columns);
|
|
1555
|
-
const gapClass = getGapClassName(gap);
|
|
1556
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
1557
|
-
"div",
|
|
865
|
+
},
|
|
866
|
+
buttonText
|
|
867
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
868
|
+
ProfileModal_default,
|
|
1558
869
|
{
|
|
1559
|
-
|
|
1560
|
-
|
|
870
|
+
isOpen: isModalOpen,
|
|
871
|
+
onClose: closeModal,
|
|
872
|
+
data,
|
|
873
|
+
themeName: modalTheme,
|
|
874
|
+
onContactClick: handleContactClick,
|
|
875
|
+
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
1561
876
|
},
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
if (!items || items.length === 0) {
|
|
1567
|
-
return null;
|
|
1568
|
-
}
|
|
1569
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React37__namespace.default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute left-0 w-8 h-8 rounded-full bg-blue-500 border-4 border-white shadow-md flex items-center justify-center" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React37__namespace.default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-gray-600" }, item.description)))));
|
|
877
|
+
data.customContent,
|
|
878
|
+
data.badges && /* @__PURE__ */ React12__default.default.createElement(BadgeList, { badges: data.badges }),
|
|
879
|
+
data.stats && /* @__PURE__ */ React12__default.default.createElement(StatList, { stats: data.stats })
|
|
880
|
+
));
|
|
1570
881
|
};
|
|
1571
|
-
var
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
882
|
+
var AutoOpenModal = ({
|
|
883
|
+
data,
|
|
884
|
+
delay = 500,
|
|
885
|
+
// 默认延迟500毫秒
|
|
886
|
+
themeName = "light",
|
|
887
|
+
onClose
|
|
1577
888
|
}) => {
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
console.error("Container or canvas not found");
|
|
1590
|
-
return;
|
|
1591
|
-
}
|
|
1592
|
-
const containerWidth = container.clientWidth;
|
|
1593
|
-
const containerHeight = container.clientHeight;
|
|
1594
|
-
console.log("Container size:", { containerWidth, containerHeight });
|
|
1595
|
-
canvas.width = containerWidth;
|
|
1596
|
-
canvas.height = containerHeight;
|
|
1597
|
-
canvas.style.width = `${containerWidth}px`;
|
|
1598
|
-
canvas.style.height = `${containerHeight}px`;
|
|
1599
|
-
console.log("Canvas size updated:", {
|
|
1600
|
-
width: canvas.width,
|
|
1601
|
-
height: canvas.height,
|
|
1602
|
-
containerWidth,
|
|
1603
|
-
containerHeight
|
|
1604
|
-
});
|
|
1605
|
-
};
|
|
1606
|
-
const initBalls = () => {
|
|
1607
|
-
const canvas = canvasRef.current;
|
|
1608
|
-
if (!canvas) {
|
|
1609
|
-
console.error("Canvas not found during ball initialization");
|
|
1610
|
-
return [];
|
|
1611
|
-
}
|
|
1612
|
-
console.log("Initializing balls with canvas size:", {
|
|
1613
|
-
width: canvas.width,
|
|
1614
|
-
height: canvas.height
|
|
1615
|
-
});
|
|
1616
|
-
return balls.map((ballConfig) => ({
|
|
1617
|
-
x: Math.random() * (canvas.width - 100) + 50,
|
|
1618
|
-
y: Math.random() * (canvas.height - 100) + 50,
|
|
1619
|
-
vx: (Math.random() - 0.5) * 4,
|
|
1620
|
-
vy: (Math.random() - 0.5) * 4,
|
|
1621
|
-
radius: ballConfig.size,
|
|
1622
|
-
color: ballConfig.color,
|
|
1623
|
-
text: ballConfig.label,
|
|
1624
|
-
isDragging: false
|
|
1625
|
-
}));
|
|
1626
|
-
};
|
|
1627
|
-
React37.useEffect(() => {
|
|
1628
|
-
const handleResize = () => {
|
|
1629
|
-
console.log("Window resized");
|
|
1630
|
-
updateCanvasSize();
|
|
1631
|
-
};
|
|
1632
|
-
if (typeof window !== "undefined") {
|
|
1633
|
-
window.addEventListener("resize", handleResize);
|
|
1634
|
-
updateCanvasSize();
|
|
1635
|
-
}
|
|
1636
|
-
return () => {
|
|
1637
|
-
if (typeof window !== "undefined") {
|
|
1638
|
-
window.removeEventListener("resize", handleResize);
|
|
1639
|
-
}
|
|
1640
|
-
};
|
|
1641
|
-
}, []);
|
|
1642
|
-
React37.useEffect(() => {
|
|
1643
|
-
const canvas = canvasRef.current;
|
|
1644
|
-
if (!canvas) {
|
|
1645
|
-
console.error("Canvas element not found");
|
|
1646
|
-
return;
|
|
1647
|
-
}
|
|
1648
|
-
const ctx = canvas.getContext("2d");
|
|
1649
|
-
if (!ctx) {
|
|
1650
|
-
console.error("Failed to get canvas context");
|
|
1651
|
-
return;
|
|
889
|
+
const [isModalOpen, setIsModalOpen] = React12.useState(false);
|
|
890
|
+
React12.useEffect(() => {
|
|
891
|
+
const timer = setTimeout(() => {
|
|
892
|
+
setIsModalOpen(true);
|
|
893
|
+
}, delay);
|
|
894
|
+
return () => clearTimeout(timer);
|
|
895
|
+
}, [delay]);
|
|
896
|
+
const handleClose = () => {
|
|
897
|
+
setIsModalOpen(false);
|
|
898
|
+
if (onClose) {
|
|
899
|
+
onClose();
|
|
1652
900
|
}
|
|
1653
|
-
console.log("Starting animation setup...");
|
|
1654
|
-
updateCanvasSize();
|
|
1655
|
-
ballsRef.current = initBalls();
|
|
1656
|
-
console.log("Balls initialized:", ballsRef.current);
|
|
1657
|
-
let lastTime = performance.now();
|
|
1658
|
-
let frameCount = 0;
|
|
1659
|
-
const animate = (currentTime) => {
|
|
1660
|
-
try {
|
|
1661
|
-
frameCount++;
|
|
1662
|
-
if (currentTime - lastTime >= 1e3) {
|
|
1663
|
-
console.log(`FPS: ${frameCount}`);
|
|
1664
|
-
frameCount = 0;
|
|
1665
|
-
lastTime = currentTime;
|
|
1666
|
-
}
|
|
1667
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
1668
|
-
ballsRef.current.forEach((ball) => {
|
|
1669
|
-
if (!ball.isDragging) {
|
|
1670
|
-
updatePosition(ball, canvas.width, canvas.height);
|
|
1671
|
-
}
|
|
1672
|
-
for (let i = 0; i < ballsRef.current.length; i++) {
|
|
1673
|
-
for (let j = i + 1; j < ballsRef.current.length; j++) {
|
|
1674
|
-
const ball1 = ballsRef.current[i];
|
|
1675
|
-
const ball2 = ballsRef.current[j];
|
|
1676
|
-
if (ball1 && ball2) {
|
|
1677
|
-
checkCollision(ball1, ball2);
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
draw(ctx, ball);
|
|
1682
|
-
});
|
|
1683
|
-
animationRef.current = requestAnimationFrame(animate);
|
|
1684
|
-
} catch (error) {
|
|
1685
|
-
console.error("Animation error:", error);
|
|
1686
|
-
}
|
|
1687
|
-
};
|
|
1688
|
-
console.log("Starting animation loop...");
|
|
1689
|
-
animationRef.current = requestAnimationFrame(animate);
|
|
1690
|
-
return () => {
|
|
1691
|
-
console.log("Cleaning up animation...");
|
|
1692
|
-
if (animationRef.current) {
|
|
1693
|
-
cancelAnimationFrame(animationRef.current);
|
|
1694
|
-
animationRef.current = null;
|
|
1695
|
-
}
|
|
1696
|
-
};
|
|
1697
|
-
}, []);
|
|
1698
|
-
const shake = () => {
|
|
1699
|
-
setIsShaking(true);
|
|
1700
|
-
ballsRef.current.forEach((ball) => {
|
|
1701
|
-
ball.vx = (Math.random() - 0.5) * 10;
|
|
1702
|
-
ball.vy = (Math.random() - 0.5) * 10;
|
|
1703
|
-
});
|
|
1704
|
-
setTimeout(() => setIsShaking(false), 200);
|
|
1705
|
-
};
|
|
1706
|
-
const slowdown = () => {
|
|
1707
|
-
setIsShaking(true);
|
|
1708
|
-
ballsRef.current.forEach((ball) => {
|
|
1709
|
-
ball.vx = ball.vx * 0.5;
|
|
1710
|
-
ball.vy = ball.vy * 0.5;
|
|
1711
|
-
});
|
|
1712
|
-
setTimeout(() => setIsShaking(false), 200);
|
|
1713
901
|
};
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
const angle = Math.atan2(dy, dx);
|
|
1720
|
-
const overlap = (ball1.radius + ball2.radius - distance) / 2;
|
|
1721
|
-
if (ball1.isDragging || ball2.isDragging) {
|
|
1722
|
-
const draggedBall2 = ball1.isDragging ? ball1 : ball2;
|
|
1723
|
-
const otherBall = ball1.isDragging ? ball2 : ball1;
|
|
1724
|
-
otherBall.x += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.cos(angle);
|
|
1725
|
-
otherBall.y += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.sin(angle);
|
|
1726
|
-
const pushForce = 2;
|
|
1727
|
-
otherBall.vx = (draggedBall2 === ball1 ? -1 : 1) * Math.cos(angle) * pushForce;
|
|
1728
|
-
otherBall.vy = (draggedBall2 === ball1 ? -1 : 1) * Math.sin(angle) * pushForce;
|
|
1729
|
-
return;
|
|
1730
|
-
}
|
|
1731
|
-
const sin = Math.sin(angle);
|
|
1732
|
-
const cos = Math.cos(angle);
|
|
1733
|
-
const vx1 = ball1.vx * cos + ball1.vy * sin;
|
|
1734
|
-
const vy1 = ball1.vy * cos - ball1.vx * sin;
|
|
1735
|
-
const vx2 = ball2.vx * cos + ball2.vy * sin;
|
|
1736
|
-
const vy2 = ball2.vy * cos - ball2.vx * sin;
|
|
1737
|
-
const newVx1 = vx2;
|
|
1738
|
-
const newVx2 = vx1;
|
|
1739
|
-
ball1.vx = newVx1 * cos - vy1 * sin;
|
|
1740
|
-
ball1.vy = vy1 * cos + newVx1 * sin;
|
|
1741
|
-
ball2.vx = newVx2 * cos - vy2 * sin;
|
|
1742
|
-
ball2.vy = vy2 * cos + newVx2 * sin;
|
|
1743
|
-
ball1.x -= overlap * Math.cos(angle);
|
|
1744
|
-
ball1.y -= overlap * Math.sin(angle);
|
|
1745
|
-
ball2.x += overlap * Math.cos(angle);
|
|
1746
|
-
ball2.y += overlap * Math.sin(angle);
|
|
902
|
+
const handleContactClick = (type, value) => {
|
|
903
|
+
if (type === "\u90AE\u7BB1") {
|
|
904
|
+
window.open(`mailto:${value}`);
|
|
905
|
+
} else if (type === "\u7535\u8BDD") {
|
|
906
|
+
window.open(`tel:${value}`);
|
|
1747
907
|
}
|
|
1748
908
|
};
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
909
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
910
|
+
ProfileModal_default,
|
|
911
|
+
{
|
|
912
|
+
isOpen: isModalOpen,
|
|
913
|
+
onClose: handleClose,
|
|
914
|
+
data,
|
|
915
|
+
themeName,
|
|
916
|
+
onContactClick: handleContactClick,
|
|
917
|
+
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
918
|
+
},
|
|
919
|
+
data.badges && /* @__PURE__ */ React12__default.default.createElement(BadgeList, { badges: data.badges }),
|
|
920
|
+
data.stats && /* @__PURE__ */ React12__default.default.createElement(StatList, { stats: data.stats })
|
|
921
|
+
);
|
|
922
|
+
};
|
|
923
|
+
var sizeMap = {
|
|
924
|
+
small: "h-8 w-8",
|
|
925
|
+
medium: "h-12 w-12",
|
|
926
|
+
large: "h-16 w-16"
|
|
927
|
+
};
|
|
928
|
+
var moodColors = {
|
|
929
|
+
online: "bg-green-500",
|
|
930
|
+
offline: "bg-gray-500",
|
|
931
|
+
away: "bg-yellow-500"
|
|
932
|
+
};
|
|
933
|
+
var EnhancedAvatar = ({
|
|
934
|
+
src,
|
|
935
|
+
name,
|
|
936
|
+
size = "medium",
|
|
937
|
+
mood = "online",
|
|
938
|
+
statusText,
|
|
939
|
+
onClick,
|
|
940
|
+
className
|
|
941
|
+
}) => {
|
|
942
|
+
const sizeClass = typeof size === "string" ? sizeMap[size] : "";
|
|
943
|
+
const customSizeStyle = typeof size === "number" ? { width: size, height: size } : {};
|
|
944
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("relative inline-block", className), onClick }, /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.Avatar, { className: chunk7Z5LLJ3A_js.cn(sizeClass, onClick && "cursor-pointer hover:ring-2 hover:ring-blue-500 transition-all"), style: customSizeStyle }, src && /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.AvatarImage, { src, alt: name || "Avatar", className: "object-cover" }), /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.AvatarFallback, { className: "bg-primary/10 text-primary-foreground" }, name ? name.substring(0, 2).toUpperCase() : "??")), mood && /* @__PURE__ */ React12__default.default.createElement(
|
|
945
|
+
"div",
|
|
946
|
+
{
|
|
947
|
+
className: chunk7Z5LLJ3A_js.cn(
|
|
948
|
+
"absolute bottom-0 right-0 rounded-full border-2 border-white",
|
|
949
|
+
moodColors[mood],
|
|
950
|
+
typeof size === "number" ? size > 60 ? "h-4 w-4" : "h-3 w-3" : size === "large" ? "h-4 w-4" : "h-3 w-3"
|
|
951
|
+
)
|
|
1791
952
|
}
|
|
953
|
+
), statusText && /* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute -bottom-6 left-1/2 transform -translate-x-1/2 whitespace-nowrap" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-xs text-muted-foreground" }, statusText)));
|
|
954
|
+
};
|
|
955
|
+
var About = ({
|
|
956
|
+
timelineConfig,
|
|
957
|
+
collisionBallsConfig
|
|
958
|
+
}) => {
|
|
959
|
+
return /* @__PURE__ */ React12__default.default.createElement("section", { id: "about", className: "py-16 bg-white" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React12__default.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12" }, "\u5173\u4E8E\u6211"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u4E2A\u4EBA\u7ECF\u5386"), /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.Timeline, { items: timelineConfig.items })), /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u6280\u80FD\u5C55\u793A"), /* @__PURE__ */ React12__default.default.createElement("div", { style: { height: "400px", position: "relative" } }, /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.CollisionBalls, { collisionBallsConfig }))))));
|
|
960
|
+
};
|
|
961
|
+
var About_default = About;
|
|
962
|
+
var Contact = () => {
|
|
963
|
+
const [formData, setFormData] = React12.useState({
|
|
964
|
+
name: "",
|
|
965
|
+
email: "",
|
|
966
|
+
message: ""
|
|
967
|
+
});
|
|
968
|
+
const [isSubmitting, setIsSubmitting] = React12.useState(false);
|
|
969
|
+
const [submitStatus, setSubmitStatus] = React12.useState("idle");
|
|
970
|
+
const handleChange = (e) => {
|
|
971
|
+
const { name, value } = e.target;
|
|
972
|
+
setFormData((prev) => ({
|
|
973
|
+
...prev,
|
|
974
|
+
[name]: value
|
|
975
|
+
}));
|
|
1792
976
|
};
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
977
|
+
const handleSubmit = async (e) => {
|
|
978
|
+
e.preventDefault();
|
|
979
|
+
setIsSubmitting(true);
|
|
980
|
+
setSubmitStatus("idle");
|
|
981
|
+
try {
|
|
982
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
983
|
+
setSubmitStatus("success");
|
|
984
|
+
setFormData({ name: "", email: "", message: "" });
|
|
985
|
+
} catch (error) {
|
|
986
|
+
setSubmitStatus("error");
|
|
987
|
+
} finally {
|
|
988
|
+
setIsSubmitting(false);
|
|
1803
989
|
}
|
|
1804
990
|
};
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
991
|
+
return /* @__PURE__ */ React12__default.default.createElement("section", { id: "contact", className: "py-16 bg-gray-50" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "text-center mb-12" }, /* @__PURE__ */ React12__default.default.createElement("h2", { className: "text-3xl font-bold text-gray-900 sm:text-4xl" }, "\u8054\u7CFB\u6211"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-4 text-lg text-gray-600" }, "\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF1F\u8BF7\u968F\u65F6\u8054\u7CFB\u6211")), /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-xl p-6 sm:p-8" }, /* @__PURE__ */ React12__default.default.createElement("form", { onSubmit: handleSubmit, className: "space-y-6" }, /* @__PURE__ */ React12__default.default.createElement("div", null, /* @__PURE__ */ React12__default.default.createElement("label", { htmlFor: "name", className: "block text-sm font-medium text-gray-700" }, "\u59D3\u540D"), /* @__PURE__ */ React12__default.default.createElement(
|
|
992
|
+
"input",
|
|
993
|
+
{
|
|
994
|
+
type: "text",
|
|
995
|
+
name: "name",
|
|
996
|
+
id: "name",
|
|
997
|
+
value: formData.name,
|
|
998
|
+
onChange: handleChange,
|
|
999
|
+
required: true,
|
|
1000
|
+
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
1001
|
+
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u59D3\u540D"
|
|
1813
1002
|
}
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1003
|
+
)), /* @__PURE__ */ React12__default.default.createElement("div", null, /* @__PURE__ */ React12__default.default.createElement("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700" }, "\u90AE\u7BB1"), /* @__PURE__ */ React12__default.default.createElement(
|
|
1004
|
+
"input",
|
|
1005
|
+
{
|
|
1006
|
+
type: "email",
|
|
1007
|
+
name: "email",
|
|
1008
|
+
id: "email",
|
|
1009
|
+
value: formData.email,
|
|
1010
|
+
onChange: handleChange,
|
|
1011
|
+
required: true,
|
|
1012
|
+
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
1013
|
+
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"
|
|
1819
1014
|
}
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
const canvas = canvasRef.current;
|
|
1823
|
-
if (!canvas) return { x: 0, y: 0 };
|
|
1824
|
-
const rect = canvas.getBoundingClientRect();
|
|
1825
|
-
const scaleX = canvas.width / rect.width;
|
|
1826
|
-
const scaleY = canvas.height / rect.height;
|
|
1827
|
-
return {
|
|
1828
|
-
x: (event.clientX - rect.left) * scaleX,
|
|
1829
|
-
y: (event.clientY - rect.top) * scaleY
|
|
1830
|
-
};
|
|
1831
|
-
};
|
|
1832
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React37__namespace.default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React37__namespace.default.createElement(
|
|
1833
|
-
"canvas",
|
|
1015
|
+
)), /* @__PURE__ */ React12__default.default.createElement("div", null, /* @__PURE__ */ React12__default.default.createElement("label", { htmlFor: "message", className: "block text-sm font-medium text-gray-700" }, "\u6D88\u606F"), /* @__PURE__ */ React12__default.default.createElement(
|
|
1016
|
+
"textarea",
|
|
1834
1017
|
{
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
onMouseMove: handleMouseMove,
|
|
1844
|
-
onMouseUp: handleMouseUp,
|
|
1845
|
-
onMouseLeave: handleMouseUp
|
|
1018
|
+
name: "message",
|
|
1019
|
+
id: "message",
|
|
1020
|
+
rows: 4,
|
|
1021
|
+
value: formData.message,
|
|
1022
|
+
onChange: handleChange,
|
|
1023
|
+
required: true,
|
|
1024
|
+
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
1025
|
+
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6D88\u606F"
|
|
1846
1026
|
}
|
|
1847
|
-
)), /* @__PURE__ */
|
|
1027
|
+
)), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-end" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
1848
1028
|
"button",
|
|
1849
1029
|
{
|
|
1850
|
-
|
|
1851
|
-
|
|
1030
|
+
type: "submit",
|
|
1031
|
+
disabled: isSubmitting,
|
|
1032
|
+
className: `inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white
|
|
1033
|
+
${isSubmitting ? "bg-blue-400 cursor-not-allowed" : "bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"}`
|
|
1852
1034
|
},
|
|
1853
|
-
"\
|
|
1854
|
-
), /* @__PURE__ */
|
|
1855
|
-
"button",
|
|
1856
|
-
{
|
|
1857
|
-
onClick: slowdown,
|
|
1858
|
-
className: `px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
|
|
1859
|
-
},
|
|
1860
|
-
"\u51CF\u901F"
|
|
1861
|
-
)));
|
|
1035
|
+
isSubmitting ? "\u53D1\u9001\u4E2D..." : "\u53D1\u9001\u6D88\u606F"
|
|
1036
|
+
)), submitStatus === "success" && /* @__PURE__ */ React12__default.default.createElement("div", { className: "rounded-md bg-green-50 p-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React12__default.default.createElement("svg", { className: "h-5 w-5 text-green-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm font-medium text-green-800" }, "\u6D88\u606F\u5DF2\u6210\u529F\u53D1\u9001\uFF01")))), submitStatus === "error" && /* @__PURE__ */ React12__default.default.createElement("div", { className: "rounded-md bg-red-50 p-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React12__default.default.createElement("svg", { className: "h-5 w-5 text-red-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm font-medium text-red-800" }, "\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")))))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12__default.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }))), /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u90AE\u7BB1"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-2 text-gray-600" }, "your.email@example.com")), /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12__default.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }))), /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u7535\u8BDD"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-2 text-gray-600" }, "+86 123 4567 8900")), /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12__default.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }), /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }))), /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u5730\u5740"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-2 text-gray-600" }, "\u4E2D\u56FD\uFF0C\u5317\u4EAC")))));
|
|
1862
1037
|
};
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
const [loading, setLoading] = React37.useState(true);
|
|
1876
|
-
const [saving, setSaving] = React37.useState(false);
|
|
1877
|
-
const [error, setError] = React37.useState(null);
|
|
1878
|
-
const [hasChanges, setHasChanges] = React37.useState(false);
|
|
1879
|
-
const [draggedItem, setDraggedItem] = React37.useState(null);
|
|
1880
|
-
const loadItems = React37.useCallback(async () => {
|
|
1881
|
-
try {
|
|
1882
|
-
setLoading(true);
|
|
1883
|
-
setError(null);
|
|
1884
|
-
const data = await operations.loadItems();
|
|
1885
|
-
setItems(data);
|
|
1886
|
-
setOriginalOrder([...data]);
|
|
1887
|
-
setHasChanges(false);
|
|
1888
|
-
} catch (err) {
|
|
1889
|
-
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u52A0\u8F7D\u6570\u636E\u9519\u8BEF:", err);
|
|
1890
|
-
setError(err instanceof Error ? err.message : "\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
|
|
1891
|
-
} finally {
|
|
1892
|
-
setLoading(false);
|
|
1893
|
-
}
|
|
1894
|
-
}, [operations]);
|
|
1895
|
-
React37.useEffect(() => {
|
|
1896
|
-
loadItems();
|
|
1897
|
-
}, [loadItems]);
|
|
1898
|
-
React37.useEffect(() => {
|
|
1899
|
-
const hasOrderChanged = items.some(
|
|
1900
|
-
(item, index) => originalOrder[index]?.id !== item.id
|
|
1901
|
-
);
|
|
1902
|
-
setHasChanges(hasOrderChanged);
|
|
1903
|
-
}, [items, originalOrder]);
|
|
1904
|
-
const handleMoveUp = async (itemId) => {
|
|
1905
|
-
try {
|
|
1906
|
-
setError(null);
|
|
1907
|
-
const currentIndex = items.findIndex((item) => item.id === itemId);
|
|
1908
|
-
if (currentIndex === -1) {
|
|
1909
|
-
setError("\u9879\u76EE\u4E0D\u5B58\u5728");
|
|
1910
|
-
return;
|
|
1911
|
-
}
|
|
1912
|
-
if (currentIndex === 0) {
|
|
1913
|
-
setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u524D\u9762\uFF0C\u65E0\u6CD5\u4E0A\u79FB");
|
|
1914
|
-
return;
|
|
1915
|
-
}
|
|
1916
|
-
await operations.moveItemUp(itemId);
|
|
1917
|
-
await loadItems();
|
|
1918
|
-
onOrderChanged?.();
|
|
1919
|
-
} catch (err) {
|
|
1920
|
-
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0A\u79FB\u9879\u76EE\u9519\u8BEF:", err);
|
|
1921
|
-
setError(err instanceof Error ? err.message : "\u4E0A\u79FB\u5931\u8D25");
|
|
1038
|
+
var Contact_default = Contact;
|
|
1039
|
+
var Home = ({ homeConfig, className }) => {
|
|
1040
|
+
const { title, subtitle, buttons, imageSrc } = homeConfig;
|
|
1041
|
+
const [displayText, setDisplayText] = React12.useState("");
|
|
1042
|
+
const [currentIndex, setCurrentIndex] = React12.useState(0);
|
|
1043
|
+
React12.useEffect(() => {
|
|
1044
|
+
if (currentIndex < title.length) {
|
|
1045
|
+
const timer = setTimeout(() => {
|
|
1046
|
+
setDisplayText((prev) => prev + title[currentIndex]);
|
|
1047
|
+
setCurrentIndex((prev) => prev + 1);
|
|
1048
|
+
}, 150);
|
|
1049
|
+
return () => clearTimeout(timer);
|
|
1922
1050
|
}
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1051
|
+
return () => {
|
|
1052
|
+
setDisplayText("");
|
|
1053
|
+
setCurrentIndex(0);
|
|
1054
|
+
};
|
|
1055
|
+
}, [currentIndex, title]);
|
|
1056
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1057
|
+
"section",
|
|
1058
|
+
{
|
|
1059
|
+
id: "home",
|
|
1060
|
+
className: chunk7Z5LLJ3A_js.cn("min-h-screen flex items-center justify-center py-16 bg-gradient-to-b from-white to-gray-50", className)
|
|
1061
|
+
},
|
|
1062
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-col md:flex-row items-center gap-12" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex-1 text-center md:text-left" }, /* @__PURE__ */ React12__default.default.createElement("h1", { className: "text-4xl md:text-6xl font-bold mb-6 text-gray-900" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "inline-block" }, displayText), /* @__PURE__ */ React12__default.default.createElement("span", { className: "animate-pulse ml-1 text-blue-500" }, "|")), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xl md:text-2xl text-gray-600 mb-8" }, subtitle), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-wrap gap-4 justify-center md:justify-start" }, buttons.map((button) => /* @__PURE__ */ React12__default.default.createElement(
|
|
1063
|
+
"a",
|
|
1064
|
+
{
|
|
1065
|
+
key: button.link,
|
|
1066
|
+
href: button.link,
|
|
1067
|
+
className: "px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-300 shadow-md hover:shadow-lg font-medium"
|
|
1068
|
+
},
|
|
1069
|
+
button.text
|
|
1070
|
+
)))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative group" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg blur opacity-25 group-hover:opacity-50 transition duration-1000 group-hover:duration-200" }), /* @__PURE__ */ React12__default.default.createElement(
|
|
1071
|
+
"img",
|
|
1072
|
+
{
|
|
1073
|
+
src: imageSrc,
|
|
1074
|
+
alt: "Profile",
|
|
1075
|
+
className: "relative w-full max-w-md mx-auto rounded-lg shadow-xl transform hover:scale-[1.02] transition-transform duration-300 bg-white"
|
|
1935
1076
|
}
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
e.preventDefault();
|
|
1954
|
-
if (draggedItem === null || draggedItem === dropIndex) {
|
|
1955
|
-
setDraggedItem(null);
|
|
1956
|
-
return;
|
|
1957
|
-
}
|
|
1077
|
+
)))))
|
|
1078
|
+
);
|
|
1079
|
+
};
|
|
1080
|
+
var Home_default = Home;
|
|
1081
|
+
var ExperimentCard = ({
|
|
1082
|
+
href,
|
|
1083
|
+
title,
|
|
1084
|
+
description,
|
|
1085
|
+
tags,
|
|
1086
|
+
category,
|
|
1087
|
+
isCompleted,
|
|
1088
|
+
updatedAt,
|
|
1089
|
+
createdAt,
|
|
1090
|
+
className
|
|
1091
|
+
}) => {
|
|
1092
|
+
const formatDate = (dateString) => {
|
|
1093
|
+
if (!dateString) return "";
|
|
1958
1094
|
try {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
order: index
|
|
1968
|
-
}));
|
|
1969
|
-
await operations.updateItemOrder(itemOrders);
|
|
1970
|
-
await loadItems();
|
|
1971
|
-
onOrderChanged?.();
|
|
1972
|
-
} catch (err) {
|
|
1973
|
-
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u62D6\u62FD\u6392\u5E8F\u9519\u8BEF:", err);
|
|
1974
|
-
setError(err instanceof Error ? err.message : "\u6392\u5E8F\u5931\u8D25");
|
|
1975
|
-
} finally {
|
|
1976
|
-
setDraggedItem(null);
|
|
1095
|
+
const date = new Date(dateString);
|
|
1096
|
+
return date.toLocaleDateString("zh-CN", {
|
|
1097
|
+
year: "numeric",
|
|
1098
|
+
month: "2-digit",
|
|
1099
|
+
day: "2-digit"
|
|
1100
|
+
});
|
|
1101
|
+
} catch (e) {
|
|
1102
|
+
return dateString;
|
|
1977
1103
|
}
|
|
1978
1104
|
};
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1105
|
+
return /* @__PURE__ */ React12__default.default.createElement(Link__default.default, { href, className: chunk7Z5LLJ3A_js.cn("block group", className) }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-full h-full bg-white rounded-2xl overflow-hidden shadow-md hover:shadow-2xl transition-all duration-300 transform group-hover:-translate-y-1 border border-gray-100 hover:border-gray-200" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-start justify-between mb-4" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-xl font-semibold text-gray-900 flex-1 pr-4 leading-tight" }, title), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-col gap-2 flex-shrink-0" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
1106
|
+
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm",
|
|
1107
|
+
category === "utility" ? "bg-gradient-to-r from-green-50 to-green-100 text-green-700 border border-green-200" : "bg-gradient-to-r from-purple-50 to-purple-100 text-purple-700 border border-purple-200"
|
|
1108
|
+
) }, category === "utility" ? "\u{1F527} \u5B9E\u7528\u5DE5\u5177" : "\u{1F3AE} \u4F11\u95F2\u5A31\u4E50"), /* @__PURE__ */ React12__default.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
1109
|
+
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm border",
|
|
1110
|
+
isCompleted ? "bg-gradient-to-r from-emerald-50 to-emerald-100 text-emerald-700 border border-emerald-200" : "bg-gradient-to-r from-orange-50 to-orange-100 text-orange-700 border border-orange-200"
|
|
1111
|
+
) }, isCompleted ? "\u2705 \u5DF2\u5B8C\u6210" : "\u{1F6A7} \u8FDB\u884C\u4E2D"))), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-gray-600 mb-4" }, description), updatedAt && /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center gap-1 mb-3 text-xs text-gray-500" }, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u66F4\u65B0\u4E8E: ", formatDate(updatedAt)), createdAt && createdAt !== updatedAt && /* @__PURE__ */ React12__default.default.createElement("span", { className: "ml-2 text-gray-400" }, "\u521B\u5EFA\u4E8E: ", formatDate(createdAt))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-wrap gap-2" }, tags.map((tag) => /* @__PURE__ */ React12__default.default.createElement(
|
|
1112
|
+
"span",
|
|
1113
|
+
{
|
|
1114
|
+
key: tag,
|
|
1115
|
+
className: "px-3 py-1.5 text-xs font-medium bg-gradient-to-r from-gray-50 to-gray-100 text-gray-700 rounded-full border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200"
|
|
1116
|
+
},
|
|
1117
|
+
"#",
|
|
1118
|
+
tag
|
|
1119
|
+
))))));
|
|
1120
|
+
};
|
|
1121
|
+
var ProjectCarousel = ({ projects, className }) => {
|
|
1122
|
+
const [currentIndex, setCurrentIndex] = React12.useState(0);
|
|
1123
|
+
const nextSlide = () => {
|
|
1124
|
+
setCurrentIndex(
|
|
1125
|
+
(prevIndex) => prevIndex === projects.length - 1 ? 0 : prevIndex + 1
|
|
1126
|
+
);
|
|
1998
1127
|
};
|
|
1999
|
-
const
|
|
2000
|
-
|
|
1128
|
+
const prevSlide = () => {
|
|
1129
|
+
setCurrentIndex(
|
|
1130
|
+
(prevIndex) => prevIndex === 0 ? projects.length - 1 : prevIndex - 1
|
|
1131
|
+
);
|
|
2001
1132
|
};
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
}
|
|
2005
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4 pb-3 border-b border-gray-100 sm:flex-row flex-col sm:items-center items-start gap-4" }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React37__namespace.default.createElement(React37__namespace.default.Fragment, null, /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2006
|
-
"button",
|
|
1133
|
+
return /* @__PURE__ */ React12__default.default.createElement("section", { id: "projects", className: chunk7Z5LLJ3A_js.cn("py-16 bg-gray-50", className) }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React12__default.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12 text-gray-900" }, "\u9879\u76EE\u5C55\u793A"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative max-w-4xl mx-auto" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "relative h-[400px] overflow-hidden rounded-lg shadow-xl" }, projects.map((project, index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
1134
|
+
"div",
|
|
2007
1135
|
{
|
|
2008
|
-
|
|
2009
|
-
className:
|
|
2010
|
-
|
|
1136
|
+
key: project.id,
|
|
1137
|
+
className: chunk7Z5LLJ3A_js.cn(
|
|
1138
|
+
"absolute w-full h-full transition-all duration-500 transform",
|
|
1139
|
+
index === currentIndex ? "translate-x-0 opacity-100" : index < currentIndex ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
1140
|
+
)
|
|
2011
1141
|
},
|
|
2012
|
-
/* @__PURE__ */
|
|
2013
|
-
|
|
2014
|
-
|
|
1142
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1143
|
+
ExperimentCard,
|
|
1144
|
+
{
|
|
1145
|
+
href: project.link || "#",
|
|
1146
|
+
title: project.title,
|
|
1147
|
+
description: project.description,
|
|
1148
|
+
tags: project.tags,
|
|
1149
|
+
category: "utility"
|
|
1150
|
+
}
|
|
1151
|
+
)
|
|
1152
|
+
))), /* @__PURE__ */ React12__default.default.createElement(
|
|
2015
1153
|
"button",
|
|
2016
1154
|
{
|
|
2017
|
-
onClick:
|
|
2018
|
-
|
|
2019
|
-
className: "flex items-center gap-2 bg-blue-500 hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed text-white px-4 py-2 rounded-lg font-medium transition-colors",
|
|
2020
|
-
title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
|
|
2021
|
-
},
|
|
2022
|
-
/* @__PURE__ */ React37__namespace.default.createElement(lucideReact.Save, { size: 16 }),
|
|
2023
|
-
saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
|
|
2024
|
-
)))), error && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center gap-2 bg-red-50 text-red-600 p-3 rounded-lg mb-4 border border-red-200" }, /* @__PURE__ */ React37__namespace.default.createElement(lucideReact.AlertCircle, { size: 16 }), /* @__PURE__ */ React37__namespace.default.createElement("span", null, error)), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React37__namespace.default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React37__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React37__namespace.default.createElement(lucideReact.GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React37__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React37__namespace.default.createElement(lucideReact.ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React37__namespace.default.createElement(lucideReact.ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React37__namespace.default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2025
|
-
"div",
|
|
2026
|
-
{
|
|
2027
|
-
key: item.id,
|
|
2028
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2029
|
-
"flex items-center gap-3 p-4 bg-gray-50 border-2 border-gray-200 rounded-lg transition-all hover:border-gray-300 hover:shadow-sm",
|
|
2030
|
-
draggedItem === index && "opacity-50 rotate-2 border-blue-500"
|
|
2031
|
-
),
|
|
2032
|
-
draggable: true,
|
|
2033
|
-
onDragStart: (e) => handleDragStart(e, index),
|
|
2034
|
-
onDragOver: (e) => handleDragOver(e),
|
|
2035
|
-
onDrop: (e) => handleDrop(e, index)
|
|
1155
|
+
onClick: prevSlide,
|
|
1156
|
+
className: "absolute left-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
2036
1157
|
},
|
|
2037
|
-
/* @__PURE__ */
|
|
2038
|
-
|
|
2039
|
-
/* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "flex items-center justify-center w-8 h-8 bg-blue-500 text-white text-sm font-semibold rounded-full sm:w-8 sm:h-8 w-7 h-7 sm:text-sm text-xs" }, "#", index + 1)),
|
|
2040
|
-
/* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2041
|
-
"button",
|
|
1158
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1159
|
+
"svg",
|
|
2042
1160
|
{
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1161
|
+
className: "w-6 h-6 text-gray-600",
|
|
1162
|
+
fill: "none",
|
|
1163
|
+
stroke: "currentColor",
|
|
1164
|
+
viewBox: "0 0 24 24"
|
|
2047
1165
|
},
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
|
|
2050
|
-
|
|
1166
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1167
|
+
"path",
|
|
1168
|
+
{
|
|
1169
|
+
strokeLinecap: "round",
|
|
1170
|
+
strokeLinejoin: "round",
|
|
1171
|
+
strokeWidth: 2,
|
|
1172
|
+
d: "M15 19l-7-7 7-7"
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
)
|
|
1176
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
1177
|
+
"button",
|
|
1178
|
+
{
|
|
1179
|
+
onClick: nextSlide,
|
|
1180
|
+
className: "absolute right-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
1181
|
+
},
|
|
1182
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1183
|
+
"svg",
|
|
2051
1184
|
{
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
1185
|
+
className: "w-6 h-6 text-gray-600",
|
|
1186
|
+
fill: "none",
|
|
1187
|
+
stroke: "currentColor",
|
|
1188
|
+
viewBox: "0 0 24 24"
|
|
2056
1189
|
},
|
|
2057
|
-
/* @__PURE__ */
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
}
|
|
2069
|
-
};
|
|
2070
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
1190
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1191
|
+
"path",
|
|
1192
|
+
{
|
|
1193
|
+
strokeLinecap: "round",
|
|
1194
|
+
strokeLinejoin: "round",
|
|
1195
|
+
strokeWidth: 2,
|
|
1196
|
+
d: "M9 5l7 7-7 7"
|
|
1197
|
+
}
|
|
1198
|
+
)
|
|
1199
|
+
)
|
|
1200
|
+
), /* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 z-10" }, projects.map((_, index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
2071
1201
|
"button",
|
|
2072
1202
|
{
|
|
2073
|
-
|
|
1203
|
+
key: index,
|
|
1204
|
+
onClick: () => setCurrentIndex(index),
|
|
2074
1205
|
className: chunk7Z5LLJ3A_js.cn(
|
|
2075
|
-
"
|
|
2076
|
-
|
|
1206
|
+
"w-2 h-2 rounded-full transition-all duration-300",
|
|
1207
|
+
index === currentIndex ? "bg-blue-500 w-4" : "bg-gray-300"
|
|
2077
1208
|
)
|
|
1209
|
+
}
|
|
1210
|
+
))))));
|
|
1211
|
+
};
|
|
1212
|
+
var NavigationItemComponent = ({
|
|
1213
|
+
item,
|
|
1214
|
+
direction,
|
|
1215
|
+
isActive,
|
|
1216
|
+
onClick
|
|
1217
|
+
}) => {
|
|
1218
|
+
const handleClick = (e) => {
|
|
1219
|
+
e.preventDefault();
|
|
1220
|
+
onClick(item);
|
|
1221
|
+
};
|
|
1222
|
+
const getItemClasses = () => {
|
|
1223
|
+
const baseClasses = `
|
|
1224
|
+
group relative flex items-center gap-3
|
|
1225
|
+
transition-all duration-300 ease-in-out
|
|
1226
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
1227
|
+
rounded-lg
|
|
1228
|
+
`;
|
|
1229
|
+
const directionClasses = direction === "vertical" ? "px-4 py-3 w-full justify-start" : "px-3 py-2 justify-center";
|
|
1230
|
+
const stateClasses = isActive ? "bg-blue-500 text-white shadow-lg" : item.isExternal ? "text-gray-700 hover:bg-purple-50 hover:text-purple-600 border border-purple-200" : "text-gray-700 hover:bg-blue-50 hover:text-blue-600";
|
|
1231
|
+
return `${baseClasses} ${directionClasses} ${stateClasses}`;
|
|
1232
|
+
};
|
|
1233
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1234
|
+
"a",
|
|
1235
|
+
{
|
|
1236
|
+
href: item.href,
|
|
1237
|
+
onClick: handleClick,
|
|
1238
|
+
target: item.target,
|
|
1239
|
+
rel: item.isExternal ? "noopener noreferrer" : void 0,
|
|
1240
|
+
className: getItemClasses()
|
|
2078
1241
|
},
|
|
2079
|
-
/* @__PURE__ */
|
|
1242
|
+
item.icon && /* @__PURE__ */ React12__default.default.createElement("span", { className: "flex-shrink-0" }, item.icon),
|
|
1243
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: `font-medium ${direction === "vertical" ? "text-sm" : "text-xs"}` }, item.label),
|
|
1244
|
+
item.isExternal && /* @__PURE__ */ React12__default.default.createElement(
|
|
2080
1245
|
"svg",
|
|
2081
1246
|
{
|
|
2082
|
-
className: "w-
|
|
1247
|
+
className: "w-3 h-3 opacity-60 group-hover:opacity-100 transition-opacity",
|
|
2083
1248
|
fill: "none",
|
|
2084
1249
|
stroke: "currentColor",
|
|
2085
1250
|
viewBox: "0 0 24 24"
|
|
2086
1251
|
},
|
|
2087
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
2088
1253
|
"path",
|
|
2089
1254
|
{
|
|
2090
1255
|
strokeLinecap: "round",
|
|
2091
1256
|
strokeLinejoin: "round",
|
|
2092
1257
|
strokeWidth: 2,
|
|
2093
|
-
d: "M10
|
|
1258
|
+
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
2094
1259
|
}
|
|
2095
1260
|
)
|
|
2096
1261
|
),
|
|
2097
|
-
"
|
|
1262
|
+
direction === "vertical" && isActive && /* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute left-1 top-1/2 transform -translate-y-1/2 w-1 h-6 bg-white rounded-full" })
|
|
2098
1263
|
);
|
|
2099
1264
|
};
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
"bg-purple-500": "#8b5cf6",
|
|
2106
|
-
"bg-slate-500": "#64748b",
|
|
2107
|
-
"bg-emerald-500": "#10b981",
|
|
2108
|
-
"bg-orange-500": "#f97316"
|
|
2109
|
-
};
|
|
2110
|
-
return colorMap[bgClass] || "#3b82f6";
|
|
2111
|
-
}
|
|
2112
|
-
function FilterButtonGroup({
|
|
2113
|
-
label,
|
|
2114
|
-
value,
|
|
2115
|
-
options,
|
|
2116
|
-
onChange,
|
|
2117
|
-
className
|
|
2118
|
-
}) {
|
|
2119
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("space-y-4", className) }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
|
|
2120
|
-
const isActive = value === option.value;
|
|
2121
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2122
|
-
"button",
|
|
2123
|
-
{
|
|
2124
|
-
key: option.value,
|
|
2125
|
-
onClick: () => onChange(option.value),
|
|
2126
|
-
style: isActive ? { backgroundColor: getColorValue(option.activeColor.bg) } : void 0,
|
|
2127
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2128
|
-
"flex-1 h-12 rounded-lg font-medium text-sm transition-all duration-200 ease-out focus:outline-none focus:ring-2 focus:ring-opacity-50 border",
|
|
2129
|
-
isActive ? "text-white border-transparent shadow-md focus:ring-white" : "bg-white text-gray-700 border-gray-200 shadow-sm hover:bg-gray-50 hover:border-gray-300 hover:shadow focus:ring-blue-300"
|
|
2130
|
-
)
|
|
2131
|
-
},
|
|
2132
|
-
/* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React37__namespace.default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React37__namespace.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
2133
|
-
"text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
|
|
2134
|
-
isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
|
|
2135
|
-
) }, option.count))
|
|
2136
|
-
);
|
|
2137
|
-
})));
|
|
2138
|
-
}
|
|
2139
|
-
function SearchResultHint({ searchQuery, resultCount, className }) {
|
|
2140
|
-
if (!searchQuery) return null;
|
|
2141
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
|
|
2142
|
-
}
|
|
2143
|
-
var themeStyles = {
|
|
2144
|
-
light: "",
|
|
2145
|
-
dark: "bg-[#222] text-[#eee] border-[#444]",
|
|
2146
|
-
blue: "bg-[#f0f8ff] border-[#1890ff]/20"
|
|
2147
|
-
};
|
|
2148
|
-
var ProfileModal = ({
|
|
2149
|
-
isOpen,
|
|
2150
|
-
onClose,
|
|
2151
|
-
data,
|
|
2152
|
-
showAvatar = true,
|
|
2153
|
-
showContacts = true,
|
|
2154
|
-
showSocial = true,
|
|
2155
|
-
showBio = true,
|
|
2156
|
-
avatarSize = 80,
|
|
2157
|
-
onAvatarClick,
|
|
2158
|
-
onSocialLinkClick,
|
|
2159
|
-
onContactClick,
|
|
2160
|
-
themeName = "light",
|
|
2161
|
-
className
|
|
2162
|
-
}) => {
|
|
2163
|
-
const renderSocialLinks = () => {
|
|
2164
|
-
if (!data.socialLinks || data.socialLinks.length === 0) return null;
|
|
2165
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex gap-3 mt-2" }, data.socialLinks.map((link, index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2166
|
-
"a",
|
|
2167
|
-
{
|
|
2168
|
-
key: index,
|
|
2169
|
-
href: link.url,
|
|
2170
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2171
|
-
"w-8 h-8 flex items-center justify-center rounded-full no-underline transition-all hover:-translate-y-0.5",
|
|
2172
|
-
themeName === "dark" ? "bg-gray-800 text-gray-200 hover:bg-gray-700" : "bg-gray-100 text-gray-800 hover:bg-gray-200"
|
|
2173
|
-
),
|
|
2174
|
-
title: link.type,
|
|
2175
|
-
target: "_blank",
|
|
2176
|
-
rel: "noopener noreferrer",
|
|
2177
|
-
onClick: (e) => {
|
|
2178
|
-
if (onSocialLinkClick) {
|
|
2179
|
-
e.preventDefault();
|
|
2180
|
-
onSocialLinkClick(link.url, link.type);
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
},
|
|
2184
|
-
link.icon ? /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "text-base" }, link.icon) : /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "text-[10px] font-semibold" }, link.type)
|
|
2185
|
-
)));
|
|
2186
|
-
};
|
|
2187
|
-
const renderContacts = () => {
|
|
2188
|
-
if (!data.contacts || Object.keys(data.contacts).length === 0) return null;
|
|
2189
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
2190
|
-
"mt-4 border-t pt-4",
|
|
2191
|
-
themeName === "dark" ? "border-gray-800" : "border-gray-100"
|
|
2192
|
-
) }, Object.entries(data.contacts).map(([type, value], index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2193
|
-
"div",
|
|
2194
|
-
{
|
|
2195
|
-
key: index,
|
|
2196
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2197
|
-
"flex mb-2 cursor-pointer py-1.5 px-2 rounded transition-colors",
|
|
2198
|
-
themeName === "dark" ? "hover:bg-gray-800" : "hover:bg-gray-50"
|
|
2199
|
-
),
|
|
2200
|
-
onClick: () => onContactClick && onContactClick(type, value)
|
|
2201
|
-
},
|
|
2202
|
-
/* @__PURE__ */ React37__namespace.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
2203
|
-
"font-medium w-[70px] shrink-0",
|
|
2204
|
-
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
2205
|
-
) }, type, ":"),
|
|
2206
|
-
/* @__PURE__ */ React37__namespace.default.createElement("span", { className: themeName === "dark" ? "text-gray-200" : "text-gray-800" }, value)
|
|
2207
|
-
)));
|
|
2208
|
-
};
|
|
2209
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React37__namespace.default.createElement(DialogContent, { className: chunk7Z5LLJ3A_js.cn(
|
|
2210
|
-
"sm:max-w-[500px] p-0 overflow-hidden border-none shadow-2xl",
|
|
2211
|
-
themeStyles[themeName] || "",
|
|
2212
|
-
className
|
|
2213
|
-
) }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex gap-5 mb-5" }, showAvatar && /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2214
|
-
"div",
|
|
2215
|
-
{
|
|
2216
|
-
className: "shrink-0",
|
|
2217
|
-
onClick: onAvatarClick,
|
|
2218
|
-
style: { cursor: onAvatarClick ? "pointer" : "default" }
|
|
2219
|
-
},
|
|
2220
|
-
/* @__PURE__ */ React37__namespace.default.createElement(Avatar, { className: "border-2 border-primary/10 shadow-sm", style: { width: avatarSize, height: avatarSize } }, data.avatar && /* @__PURE__ */ React37__namespace.default.createElement(AvatarImage, { src: data.avatar, alt: data.name, className: "object-cover" }), /* @__PURE__ */ React37__namespace.default.createElement(AvatarFallback, { className: "text-xl" }, data.name.substring(0, 2).toUpperCase()))
|
|
2221
|
-
), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex-1 min-w-0 flex flex-col justify-center" }, /* @__PURE__ */ React37__namespace.default.createElement("h2", { className: chunk7Z5LLJ3A_js.cn(
|
|
2222
|
-
"text-2xl font-bold m-0 mb-1",
|
|
2223
|
-
themeName === "dark" ? "text-white" : "text-gray-900"
|
|
2224
|
-
) }, data.name), data.title && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
2225
|
-
"text-sm mb-2",
|
|
2226
|
-
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
2227
|
-
) }, data.title), showSocial && renderSocialLinks())), showBio && data.bio && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn(
|
|
2228
|
-
"mb-5 leading-relaxed text-sm",
|
|
2229
|
-
themeName === "dark" ? "text-gray-300" : "text-gray-600"
|
|
2230
|
-
) }, /* @__PURE__ */ React37__namespace.default.createElement("p", null, data.bio)), showContacts && renderContacts(), data.customContent && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "mt-5" }, data.customContent))));
|
|
2231
|
-
};
|
|
2232
|
-
var ProfileModal_default = ProfileModal;
|
|
2233
|
-
var BadgeList = ({
|
|
2234
|
-
badges,
|
|
2235
|
-
className = ""
|
|
2236
|
-
}) => {
|
|
2237
|
-
if (!badges || badges.length === 0) return null;
|
|
2238
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex flex-wrap gap-2 mt-4", className) }, badges.map((badge, index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2239
|
-
Badge,
|
|
2240
|
-
{
|
|
2241
|
-
key: index,
|
|
2242
|
-
variant: badge.type === "default" ? "default" : badge.type
|
|
2243
|
-
},
|
|
2244
|
-
badge.icon && /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "mr-1" }, badge.icon),
|
|
2245
|
-
badge.label
|
|
2246
|
-
)));
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
// src/profile/internal/Stat.tsx
|
|
2250
|
-
var Stat = ({
|
|
2251
|
-
label,
|
|
2252
|
-
value,
|
|
2253
|
-
icon,
|
|
2254
|
-
className = ""
|
|
2255
|
-
}) => {
|
|
2256
|
-
return /* @__PURE__ */ React.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex flex-col items-center flex-1 text-center", className) }, icon && /* @__PURE__ */ React.createElement("span", { className: "mb-2 text-2xl text-gray-400" }, icon), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-lg font-semibold text-gray-800" }, value), /* @__PURE__ */ React.createElement("div", { className: "text-xs text-gray-400 mt-1" }, label)));
|
|
2257
|
-
};
|
|
2258
|
-
|
|
2259
|
-
// src/profile/internal/StatList.tsx
|
|
2260
|
-
var StatList = ({
|
|
2261
|
-
stats,
|
|
2262
|
-
className = ""
|
|
2263
|
-
}) => {
|
|
2264
|
-
if (!stats || stats.length === 0) return null;
|
|
2265
|
-
return /* @__PURE__ */ React.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex justify-between mt-4 pt-4 border-t border-gray-100", className) }, stats.map((stat, index) => /* @__PURE__ */ React.createElement(Stat, { key: index, ...stat })));
|
|
2266
|
-
};
|
|
2267
|
-
|
|
2268
|
-
// src/profile/ProfileButton.tsx
|
|
2269
|
-
var exampleProfileData = {
|
|
2270
|
-
name: "\u5F20\u4E09",
|
|
2271
|
-
avatar: "https://randomuser.me/api/portraits/men/32.jpg",
|
|
2272
|
-
title: "\u9AD8\u7EA7\u524D\u7AEF\u5DE5\u7A0B\u5E08",
|
|
2273
|
-
bio: "\u4E13\u6CE8\u4E8EReact\u548CNext.js\u5F00\u53D1\u7684\u524D\u7AEF\u5DE5\u7A0B\u5E08\uFF0C\u67095\u5E74\u5DE5\u4F5C\u7ECF\u9A8C\u3002\u70ED\u7231\u5F00\u6E90\uFF0C\u559C\u6B22\u5206\u4EAB\u6280\u672F\u7ECF\u9A8C\u3002",
|
|
2274
|
-
contacts: {
|
|
2275
|
-
"\u90AE\u7BB1": "zhangsan@example.com",
|
|
2276
|
-
"\u7535\u8BDD": "138-8888-8888",
|
|
2277
|
-
"\u5730\u5740": "\u4E0A\u6D77\u5E02\u6D66\u4E1C\u65B0\u533A"
|
|
2278
|
-
},
|
|
2279
|
-
socialLinks: [
|
|
2280
|
-
{ type: "GitHub", url: "https://github.com/zhangsan", icon: "\u2605" },
|
|
2281
|
-
{ type: "Twitter", url: "https://twitter.com/zhangsan", icon: "\u2726" },
|
|
2282
|
-
{ type: "LinkedIn", url: "https://linkedin.com/in/zhangsan", icon: "\u272A" }
|
|
2283
|
-
],
|
|
2284
|
-
badges: [
|
|
2285
|
-
{ label: "React", type: "primary" },
|
|
2286
|
-
{ label: "Next.js", type: "success" },
|
|
2287
|
-
{ label: "TypeScript", type: "info" },
|
|
2288
|
-
{ label: "CSS", type: "default" }
|
|
2289
|
-
],
|
|
2290
|
-
stats: [
|
|
2291
|
-
{ label: "\u9879\u76EE", value: 42 },
|
|
2292
|
-
{ label: "\u7C89\u4E1D", value: 1024 },
|
|
2293
|
-
{ label: "\u8BC4\u5206", value: "4.9" }
|
|
2294
|
-
],
|
|
2295
|
-
customContent: /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "mt-5 border-t border-gray-100 pt-4" }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-sm font-semibold mb-2" }, "\u4E13\u4E1A\u6280\u80FD"), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-sm text-gray-600 leading-relaxed" }, "\u7CBE\u901AReact\u3001Vue\u3001Angular\u7B49\u524D\u7AEF\u6846\u67B6\uFF0C\u719F\u6089TypeScript\u3001JavaScript\u3001CSS3\u3001HTML5\u7B49\u524D\u7AEF\u6280\u672F\u3002 \u6709\u4E30\u5BCC\u7684\u5927\u578B\u9879\u76EE\u5F00\u53D1\u7ECF\u9A8C\uFF0C\u80FD\u72EC\u7ACB\u8D1F\u8D23\u524D\u7AEF\u67B6\u6784\u8BBE\u8BA1\u3002"))
|
|
2296
|
-
};
|
|
2297
|
-
var ProfileButton = ({
|
|
2298
|
-
data = exampleProfileData,
|
|
2299
|
-
buttonText = "\u67E5\u770B\u4E2A\u4EBA\u4FE1\u606F",
|
|
2300
|
-
variant = "default",
|
|
2301
|
-
size = "default",
|
|
2302
|
-
className = "",
|
|
2303
|
-
modalTheme = "light"
|
|
2304
|
-
}) => {
|
|
2305
|
-
const [isModalOpen, setIsModalOpen] = React37.useState(false);
|
|
2306
|
-
const openModal = () => setIsModalOpen(true);
|
|
2307
|
-
const closeModal = () => setIsModalOpen(false);
|
|
2308
|
-
const handleContactClick = (type, value) => {
|
|
2309
|
-
if (type === "\u90AE\u7BB1") {
|
|
2310
|
-
window.open(`mailto:${value}`);
|
|
2311
|
-
} else if (type === "\u7535\u8BDD") {
|
|
2312
|
-
window.open(`tel:${value}`);
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(React37__namespace.default.Fragment, null, /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2316
|
-
Button,
|
|
2317
|
-
{
|
|
2318
|
-
variant,
|
|
2319
|
-
size,
|
|
2320
|
-
onClick: openModal,
|
|
2321
|
-
className
|
|
2322
|
-
},
|
|
2323
|
-
buttonText
|
|
2324
|
-
), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2325
|
-
ProfileModal_default,
|
|
2326
|
-
{
|
|
2327
|
-
isOpen: isModalOpen,
|
|
2328
|
-
onClose: closeModal,
|
|
2329
|
-
data,
|
|
2330
|
-
themeName: modalTheme,
|
|
2331
|
-
onContactClick: handleContactClick,
|
|
2332
|
-
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
2333
|
-
},
|
|
2334
|
-
data.customContent,
|
|
2335
|
-
data.badges && /* @__PURE__ */ React37__namespace.default.createElement(BadgeList, { badges: data.badges }),
|
|
2336
|
-
data.stats && /* @__PURE__ */ React37__namespace.default.createElement(StatList, { stats: data.stats })
|
|
2337
|
-
));
|
|
2338
|
-
};
|
|
2339
|
-
var AutoOpenModal = ({
|
|
2340
|
-
data,
|
|
2341
|
-
delay = 500,
|
|
2342
|
-
// 默认延迟500毫秒
|
|
2343
|
-
themeName = "light",
|
|
2344
|
-
onClose
|
|
2345
|
-
}) => {
|
|
2346
|
-
const [isModalOpen, setIsModalOpen] = React37.useState(false);
|
|
2347
|
-
React37.useEffect(() => {
|
|
2348
|
-
const timer = setTimeout(() => {
|
|
2349
|
-
setIsModalOpen(true);
|
|
2350
|
-
}, delay);
|
|
2351
|
-
return () => clearTimeout(timer);
|
|
2352
|
-
}, [delay]);
|
|
2353
|
-
const handleClose = () => {
|
|
2354
|
-
setIsModalOpen(false);
|
|
2355
|
-
if (onClose) {
|
|
2356
|
-
onClose();
|
|
2357
|
-
}
|
|
2358
|
-
};
|
|
2359
|
-
const handleContactClick = (type, value) => {
|
|
2360
|
-
if (type === "\u90AE\u7BB1") {
|
|
2361
|
-
window.open(`mailto:${value}`);
|
|
2362
|
-
} else if (type === "\u7535\u8BDD") {
|
|
2363
|
-
window.open(`tel:${value}`);
|
|
2364
|
-
}
|
|
2365
|
-
};
|
|
2366
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2367
|
-
ProfileModal_default,
|
|
2368
|
-
{
|
|
2369
|
-
isOpen: isModalOpen,
|
|
2370
|
-
onClose: handleClose,
|
|
2371
|
-
data,
|
|
2372
|
-
themeName,
|
|
2373
|
-
onContactClick: handleContactClick,
|
|
2374
|
-
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
2375
|
-
},
|
|
2376
|
-
data.badges && /* @__PURE__ */ React37__namespace.default.createElement(BadgeList, { badges: data.badges }),
|
|
2377
|
-
data.stats && /* @__PURE__ */ React37__namespace.default.createElement(StatList, { stats: data.stats })
|
|
2378
|
-
);
|
|
2379
|
-
};
|
|
2380
|
-
var sizeMap = {
|
|
2381
|
-
small: "h-8 w-8",
|
|
2382
|
-
medium: "h-12 w-12",
|
|
2383
|
-
large: "h-16 w-16"
|
|
2384
|
-
};
|
|
2385
|
-
var moodColors = {
|
|
2386
|
-
online: "bg-green-500",
|
|
2387
|
-
offline: "bg-gray-500",
|
|
2388
|
-
away: "bg-yellow-500"
|
|
2389
|
-
};
|
|
2390
|
-
var EnhancedAvatar = ({
|
|
2391
|
-
src,
|
|
2392
|
-
name,
|
|
2393
|
-
size = "medium",
|
|
2394
|
-
mood = "online",
|
|
2395
|
-
statusText,
|
|
2396
|
-
onClick,
|
|
2397
|
-
className
|
|
2398
|
-
}) => {
|
|
2399
|
-
const sizeClass = typeof size === "string" ? sizeMap[size] : "";
|
|
2400
|
-
const customSizeStyle = typeof size === "number" ? { width: size, height: size } : {};
|
|
2401
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("relative inline-block", className), onClick }, /* @__PURE__ */ React37__namespace.default.createElement(Avatar, { className: chunk7Z5LLJ3A_js.cn(sizeClass, onClick && "cursor-pointer hover:ring-2 hover:ring-blue-500 transition-all"), style: customSizeStyle }, src && /* @__PURE__ */ React37__namespace.default.createElement(AvatarImage, { src, alt: name || "Avatar", className: "object-cover" }), /* @__PURE__ */ React37__namespace.default.createElement(AvatarFallback, { className: "bg-primary/10 text-primary-foreground" }, name ? name.substring(0, 2).toUpperCase() : "??")), mood && /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2402
|
-
"div",
|
|
2403
|
-
{
|
|
2404
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2405
|
-
"absolute bottom-0 right-0 rounded-full border-2 border-white",
|
|
2406
|
-
moodColors[mood],
|
|
2407
|
-
typeof size === "number" ? size > 60 ? "h-4 w-4" : "h-3 w-3" : size === "large" ? "h-4 w-4" : "h-3 w-3"
|
|
2408
|
-
)
|
|
2409
|
-
}
|
|
2410
|
-
), statusText && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute -bottom-6 left-1/2 transform -translate-x-1/2 whitespace-nowrap" }, /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "text-xs text-muted-foreground" }, statusText)));
|
|
2411
|
-
};
|
|
2412
|
-
var About = ({
|
|
2413
|
-
timelineConfig,
|
|
2414
|
-
collisionBallsConfig
|
|
2415
|
-
}) => {
|
|
2416
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("section", { id: "about", className: "py-16 bg-white" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__namespace.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12" }, "\u5173\u4E8E\u6211"), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u4E2A\u4EBA\u7ECF\u5386"), /* @__PURE__ */ React37__namespace.default.createElement(Timeline, { items: timelineConfig.items })), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u6280\u80FD\u5C55\u793A"), /* @__PURE__ */ React37__namespace.default.createElement("div", { style: { height: "400px", position: "relative" } }, /* @__PURE__ */ React37__namespace.default.createElement(CollisionBalls, { collisionBallsConfig }))))));
|
|
2417
|
-
};
|
|
2418
|
-
var About_default = About;
|
|
2419
|
-
var Contact = () => {
|
|
2420
|
-
const [formData, setFormData] = React37.useState({
|
|
2421
|
-
name: "",
|
|
2422
|
-
email: "",
|
|
2423
|
-
message: ""
|
|
2424
|
-
});
|
|
2425
|
-
const [isSubmitting, setIsSubmitting] = React37.useState(false);
|
|
2426
|
-
const [submitStatus, setSubmitStatus] = React37.useState("idle");
|
|
2427
|
-
const handleChange = (e) => {
|
|
2428
|
-
const { name, value } = e.target;
|
|
2429
|
-
setFormData((prev) => ({
|
|
2430
|
-
...prev,
|
|
2431
|
-
[name]: value
|
|
2432
|
-
}));
|
|
2433
|
-
};
|
|
2434
|
-
const handleSubmit = async (e) => {
|
|
2435
|
-
e.preventDefault();
|
|
2436
|
-
setIsSubmitting(true);
|
|
2437
|
-
setSubmitStatus("idle");
|
|
2438
|
-
try {
|
|
2439
|
-
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
2440
|
-
setSubmitStatus("success");
|
|
2441
|
-
setFormData({ name: "", email: "", message: "" });
|
|
2442
|
-
} catch (error) {
|
|
2443
|
-
setSubmitStatus("error");
|
|
2444
|
-
} finally {
|
|
2445
|
-
setIsSubmitting(false);
|
|
2446
|
-
}
|
|
2447
|
-
};
|
|
2448
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("section", { id: "contact", className: "py-16 bg-gray-50" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "text-center mb-12" }, /* @__PURE__ */ React37__namespace.default.createElement("h2", { className: "text-3xl font-bold text-gray-900 sm:text-4xl" }, "\u8054\u7CFB\u6211"), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "mt-4 text-lg text-gray-600" }, "\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF1F\u8BF7\u968F\u65F6\u8054\u7CFB\u6211")), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-xl p-6 sm:p-8" }, /* @__PURE__ */ React37__namespace.default.createElement("form", { onSubmit: handleSubmit, className: "space-y-6" }, /* @__PURE__ */ React37__namespace.default.createElement("div", null, /* @__PURE__ */ React37__namespace.default.createElement("label", { htmlFor: "name", className: "block text-sm font-medium text-gray-700" }, "\u59D3\u540D"), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2449
|
-
"input",
|
|
2450
|
-
{
|
|
2451
|
-
type: "text",
|
|
2452
|
-
name: "name",
|
|
2453
|
-
id: "name",
|
|
2454
|
-
value: formData.name,
|
|
2455
|
-
onChange: handleChange,
|
|
2456
|
-
required: true,
|
|
2457
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2458
|
-
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u59D3\u540D"
|
|
2459
|
-
}
|
|
2460
|
-
)), /* @__PURE__ */ React37__namespace.default.createElement("div", null, /* @__PURE__ */ React37__namespace.default.createElement("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700" }, "\u90AE\u7BB1"), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2461
|
-
"input",
|
|
2462
|
-
{
|
|
2463
|
-
type: "email",
|
|
2464
|
-
name: "email",
|
|
2465
|
-
id: "email",
|
|
2466
|
-
value: formData.email,
|
|
2467
|
-
onChange: handleChange,
|
|
2468
|
-
required: true,
|
|
2469
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2470
|
-
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"
|
|
2471
|
-
}
|
|
2472
|
-
)), /* @__PURE__ */ React37__namespace.default.createElement("div", null, /* @__PURE__ */ React37__namespace.default.createElement("label", { htmlFor: "message", className: "block text-sm font-medium text-gray-700" }, "\u6D88\u606F"), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2473
|
-
"textarea",
|
|
2474
|
-
{
|
|
2475
|
-
name: "message",
|
|
2476
|
-
id: "message",
|
|
2477
|
-
rows: 4,
|
|
2478
|
-
value: formData.message,
|
|
2479
|
-
onChange: handleChange,
|
|
2480
|
-
required: true,
|
|
2481
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2482
|
-
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6D88\u606F"
|
|
2483
|
-
}
|
|
2484
|
-
)), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center justify-end" }, /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2485
|
-
"button",
|
|
2486
|
-
{
|
|
2487
|
-
type: "submit",
|
|
2488
|
-
disabled: isSubmitting,
|
|
2489
|
-
className: `inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white
|
|
2490
|
-
${isSubmitting ? "bg-blue-400 cursor-not-allowed" : "bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"}`
|
|
2491
|
-
},
|
|
2492
|
-
isSubmitting ? "\u53D1\u9001\u4E2D..." : "\u53D1\u9001\u6D88\u606F"
|
|
2493
|
-
)), submitStatus === "success" && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "rounded-md bg-green-50 p-4" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { className: "h-5 w-5 text-green-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-sm font-medium text-green-800" }, "\u6D88\u606F\u5DF2\u6210\u529F\u53D1\u9001\uFF01")))), submitStatus === "error" && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "rounded-md bg-red-50 p-4" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { className: "h-5 w-5 text-red-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-sm font-medium text-red-800" }, "\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")))))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }))), /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u90AE\u7BB1"), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "your.email@example.com")), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }))), /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u7535\u8BDD"), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "+86 123 4567 8900")), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }), /* @__PURE__ */ React37__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }))), /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u5730\u5740"), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "\u4E2D\u56FD\uFF0C\u5317\u4EAC")))));
|
|
2494
|
-
};
|
|
2495
|
-
var Contact_default = Contact;
|
|
2496
|
-
var Home = ({ homeConfig, className }) => {
|
|
2497
|
-
const { title, subtitle, buttons, imageSrc } = homeConfig;
|
|
2498
|
-
const [displayText, setDisplayText] = React37.useState("");
|
|
2499
|
-
const [currentIndex, setCurrentIndex] = React37.useState(0);
|
|
2500
|
-
React37.useEffect(() => {
|
|
2501
|
-
if (currentIndex < title.length) {
|
|
2502
|
-
const timer = setTimeout(() => {
|
|
2503
|
-
setDisplayText((prev) => prev + title[currentIndex]);
|
|
2504
|
-
setCurrentIndex((prev) => prev + 1);
|
|
2505
|
-
}, 150);
|
|
2506
|
-
return () => clearTimeout(timer);
|
|
2507
|
-
}
|
|
2508
|
-
return () => {
|
|
2509
|
-
setDisplayText("");
|
|
2510
|
-
setCurrentIndex(0);
|
|
2511
|
-
};
|
|
2512
|
-
}, [currentIndex, title]);
|
|
2513
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2514
|
-
"section",
|
|
2515
|
-
{
|
|
2516
|
-
id: "home",
|
|
2517
|
-
className: chunk7Z5LLJ3A_js.cn("min-h-screen flex items-center justify-center py-16 bg-gradient-to-b from-white to-gray-50", className)
|
|
2518
|
-
},
|
|
2519
|
-
/* @__PURE__ */ React37__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-col md:flex-row items-center gap-12" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex-1 text-center md:text-left" }, /* @__PURE__ */ React37__namespace.default.createElement("h1", { className: "text-4xl md:text-6xl font-bold mb-6 text-gray-900" }, /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "inline-block" }, displayText), /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "animate-pulse ml-1 text-blue-500" }, "|")), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-xl md:text-2xl text-gray-600 mb-8" }, subtitle), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-wrap gap-4 justify-center md:justify-start" }, buttons.map((button) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2520
|
-
"a",
|
|
2521
|
-
{
|
|
2522
|
-
key: button.link,
|
|
2523
|
-
href: button.link,
|
|
2524
|
-
className: "px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-300 shadow-md hover:shadow-lg font-medium"
|
|
2525
|
-
},
|
|
2526
|
-
button.text
|
|
2527
|
-
)))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "relative group" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg blur opacity-25 group-hover:opacity-50 transition duration-1000 group-hover:duration-200" }), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2528
|
-
"img",
|
|
2529
|
-
{
|
|
2530
|
-
src: imageSrc,
|
|
2531
|
-
alt: "Profile",
|
|
2532
|
-
className: "relative w-full max-w-md mx-auto rounded-lg shadow-xl transform hover:scale-[1.02] transition-transform duration-300 bg-white"
|
|
2533
|
-
}
|
|
2534
|
-
)))))
|
|
2535
|
-
);
|
|
2536
|
-
};
|
|
2537
|
-
var Home_default = Home;
|
|
2538
|
-
var ExperimentCard = ({
|
|
2539
|
-
href,
|
|
2540
|
-
title,
|
|
2541
|
-
description,
|
|
2542
|
-
tags,
|
|
2543
|
-
category,
|
|
2544
|
-
isCompleted,
|
|
2545
|
-
updatedAt,
|
|
2546
|
-
createdAt,
|
|
2547
|
-
className
|
|
2548
|
-
}) => {
|
|
2549
|
-
const formatDate = (dateString) => {
|
|
2550
|
-
if (!dateString) return "";
|
|
2551
|
-
try {
|
|
2552
|
-
const date = new Date(dateString);
|
|
2553
|
-
return date.toLocaleDateString("zh-CN", {
|
|
2554
|
-
year: "numeric",
|
|
2555
|
-
month: "2-digit",
|
|
2556
|
-
day: "2-digit"
|
|
2557
|
-
});
|
|
2558
|
-
} catch (e) {
|
|
2559
|
-
return dateString;
|
|
2560
|
-
}
|
|
2561
|
-
};
|
|
2562
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(Link__default.default, { href, className: chunk7Z5LLJ3A_js.cn("block group", className) }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "w-full h-full bg-white rounded-2xl overflow-hidden shadow-md hover:shadow-2xl transition-all duration-300 transform group-hover:-translate-y-1 border border-gray-100 hover:border-gray-200" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-start justify-between mb-4" }, /* @__PURE__ */ React37__namespace.default.createElement("h3", { className: "text-xl font-semibold text-gray-900 flex-1 pr-4 leading-tight" }, title), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-col gap-2 flex-shrink-0" }, /* @__PURE__ */ React37__namespace.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
2563
|
-
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm",
|
|
2564
|
-
category === "utility" ? "bg-gradient-to-r from-green-50 to-green-100 text-green-700 border border-green-200" : "bg-gradient-to-r from-purple-50 to-purple-100 text-purple-700 border border-purple-200"
|
|
2565
|
-
) }, category === "utility" ? "\u{1F527} \u5B9E\u7528\u5DE5\u5177" : "\u{1F3AE} \u4F11\u95F2\u5A31\u4E50"), /* @__PURE__ */ React37__namespace.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
|
|
2566
|
-
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm border",
|
|
2567
|
-
isCompleted ? "bg-gradient-to-r from-emerald-50 to-emerald-100 text-emerald-700 border border-emerald-200" : "bg-gradient-to-r from-orange-50 to-orange-100 text-orange-700 border border-orange-200"
|
|
2568
|
-
) }, isCompleted ? "\u2705 \u5DF2\u5B8C\u6210" : "\u{1F6A7} \u8FDB\u884C\u4E2D"))), /* @__PURE__ */ React37__namespace.default.createElement("p", { className: "text-gray-600 mb-4" }, description), updatedAt && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex items-center gap-1 mb-3 text-xs text-gray-500" }, /* @__PURE__ */ React37__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React37__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React37__namespace.default.createElement("span", null, "\u66F4\u65B0\u4E8E: ", formatDate(updatedAt)), createdAt && createdAt !== updatedAt && /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "ml-2 text-gray-400" }, "\u521B\u5EFA\u4E8E: ", formatDate(createdAt))), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "flex flex-wrap gap-2" }, tags.map((tag) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2569
|
-
"span",
|
|
2570
|
-
{
|
|
2571
|
-
key: tag,
|
|
2572
|
-
className: "px-3 py-1.5 text-xs font-medium bg-gradient-to-r from-gray-50 to-gray-100 text-gray-700 rounded-full border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200"
|
|
2573
|
-
},
|
|
2574
|
-
"#",
|
|
2575
|
-
tag
|
|
2576
|
-
))))));
|
|
2577
|
-
};
|
|
2578
|
-
var ProjectCarousel = ({ projects, className }) => {
|
|
2579
|
-
const [currentIndex, setCurrentIndex] = React37.useState(0);
|
|
2580
|
-
const nextSlide = () => {
|
|
2581
|
-
setCurrentIndex(
|
|
2582
|
-
(prevIndex) => prevIndex === projects.length - 1 ? 0 : prevIndex + 1
|
|
2583
|
-
);
|
|
2584
|
-
};
|
|
2585
|
-
const prevSlide = () => {
|
|
2586
|
-
setCurrentIndex(
|
|
2587
|
-
(prevIndex) => prevIndex === 0 ? projects.length - 1 : prevIndex - 1
|
|
2588
|
-
);
|
|
2589
|
-
};
|
|
2590
|
-
return /* @__PURE__ */ React37__namespace.default.createElement("section", { id: "projects", className: chunk7Z5LLJ3A_js.cn("py-16 bg-gray-50", className) }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__namespace.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12 text-gray-900" }, "\u9879\u76EE\u5C55\u793A"), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "relative max-w-4xl mx-auto" }, /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "relative h-[400px] overflow-hidden rounded-lg shadow-xl" }, projects.map((project, index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2591
|
-
"div",
|
|
2592
|
-
{
|
|
2593
|
-
key: project.id,
|
|
2594
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2595
|
-
"absolute w-full h-full transition-all duration-500 transform",
|
|
2596
|
-
index === currentIndex ? "translate-x-0 opacity-100" : index < currentIndex ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
2597
|
-
)
|
|
2598
|
-
},
|
|
2599
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2600
|
-
ExperimentCard,
|
|
2601
|
-
{
|
|
2602
|
-
href: project.link || "#",
|
|
2603
|
-
title: project.title,
|
|
2604
|
-
description: project.description,
|
|
2605
|
-
tags: project.tags,
|
|
2606
|
-
category: "utility"
|
|
2607
|
-
}
|
|
2608
|
-
)
|
|
2609
|
-
))), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2610
|
-
"button",
|
|
2611
|
-
{
|
|
2612
|
-
onClick: prevSlide,
|
|
2613
|
-
className: "absolute left-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
2614
|
-
},
|
|
2615
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2616
|
-
"svg",
|
|
2617
|
-
{
|
|
2618
|
-
className: "w-6 h-6 text-gray-600",
|
|
2619
|
-
fill: "none",
|
|
2620
|
-
stroke: "currentColor",
|
|
2621
|
-
viewBox: "0 0 24 24"
|
|
2622
|
-
},
|
|
2623
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2624
|
-
"path",
|
|
2625
|
-
{
|
|
2626
|
-
strokeLinecap: "round",
|
|
2627
|
-
strokeLinejoin: "round",
|
|
2628
|
-
strokeWidth: 2,
|
|
2629
|
-
d: "M15 19l-7-7 7-7"
|
|
2630
|
-
}
|
|
2631
|
-
)
|
|
2632
|
-
)
|
|
2633
|
-
), /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2634
|
-
"button",
|
|
2635
|
-
{
|
|
2636
|
-
onClick: nextSlide,
|
|
2637
|
-
className: "absolute right-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
2638
|
-
},
|
|
2639
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2640
|
-
"svg",
|
|
2641
|
-
{
|
|
2642
|
-
className: "w-6 h-6 text-gray-600",
|
|
2643
|
-
fill: "none",
|
|
2644
|
-
stroke: "currentColor",
|
|
2645
|
-
viewBox: "0 0 24 24"
|
|
2646
|
-
},
|
|
2647
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2648
|
-
"path",
|
|
2649
|
-
{
|
|
2650
|
-
strokeLinecap: "round",
|
|
2651
|
-
strokeLinejoin: "round",
|
|
2652
|
-
strokeWidth: 2,
|
|
2653
|
-
d: "M9 5l7 7-7 7"
|
|
2654
|
-
}
|
|
2655
|
-
)
|
|
2656
|
-
)
|
|
2657
|
-
), /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 z-10" }, projects.map((_, index) => /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2658
|
-
"button",
|
|
2659
|
-
{
|
|
2660
|
-
key: index,
|
|
2661
|
-
onClick: () => setCurrentIndex(index),
|
|
2662
|
-
className: chunk7Z5LLJ3A_js.cn(
|
|
2663
|
-
"w-2 h-2 rounded-full transition-all duration-300",
|
|
2664
|
-
index === currentIndex ? "bg-blue-500 w-4" : "bg-gray-300"
|
|
2665
|
-
)
|
|
2666
|
-
}
|
|
2667
|
-
))))));
|
|
2668
|
-
};
|
|
2669
|
-
var NavigationItemComponent = ({
|
|
2670
|
-
item,
|
|
2671
|
-
direction,
|
|
2672
|
-
isActive,
|
|
2673
|
-
onClick
|
|
2674
|
-
}) => {
|
|
2675
|
-
const handleClick = (e) => {
|
|
2676
|
-
e.preventDefault();
|
|
2677
|
-
onClick(item);
|
|
2678
|
-
};
|
|
2679
|
-
const getItemClasses = () => {
|
|
2680
|
-
const baseClasses = `
|
|
2681
|
-
group relative flex items-center gap-3
|
|
2682
|
-
transition-all duration-300 ease-in-out
|
|
2683
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
2684
|
-
rounded-lg
|
|
2685
|
-
`;
|
|
2686
|
-
const directionClasses = direction === "vertical" ? "px-4 py-3 w-full justify-start" : "px-3 py-2 justify-center";
|
|
2687
|
-
const stateClasses = isActive ? "bg-blue-500 text-white shadow-lg" : item.isExternal ? "text-gray-700 hover:bg-purple-50 hover:text-purple-600 border border-purple-200" : "text-gray-700 hover:bg-blue-50 hover:text-blue-600";
|
|
2688
|
-
return `${baseClasses} ${directionClasses} ${stateClasses}`;
|
|
2689
|
-
};
|
|
2690
|
-
return /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2691
|
-
"a",
|
|
2692
|
-
{
|
|
2693
|
-
href: item.href,
|
|
2694
|
-
onClick: handleClick,
|
|
2695
|
-
target: item.target,
|
|
2696
|
-
rel: item.isExternal ? "noopener noreferrer" : void 0,
|
|
2697
|
-
className: getItemClasses()
|
|
2698
|
-
},
|
|
2699
|
-
item.icon && /* @__PURE__ */ React37__namespace.default.createElement("span", { className: "flex-shrink-0" }, item.icon),
|
|
2700
|
-
/* @__PURE__ */ React37__namespace.default.createElement("span", { className: `font-medium ${direction === "vertical" ? "text-sm" : "text-xs"}` }, item.label),
|
|
2701
|
-
item.isExternal && /* @__PURE__ */ React37__namespace.default.createElement(
|
|
2702
|
-
"svg",
|
|
2703
|
-
{
|
|
2704
|
-
className: "w-3 h-3 opacity-60 group-hover:opacity-100 transition-opacity",
|
|
2705
|
-
fill: "none",
|
|
2706
|
-
stroke: "currentColor",
|
|
2707
|
-
viewBox: "0 0 24 24"
|
|
2708
|
-
},
|
|
2709
|
-
/* @__PURE__ */ React37__namespace.default.createElement(
|
|
2710
|
-
"path",
|
|
2711
|
-
{
|
|
2712
|
-
strokeLinecap: "round",
|
|
2713
|
-
strokeLinejoin: "round",
|
|
2714
|
-
strokeWidth: 2,
|
|
2715
|
-
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
2716
|
-
}
|
|
2717
|
-
)
|
|
2718
|
-
),
|
|
2719
|
-
direction === "vertical" && isActive && /* @__PURE__ */ React37__namespace.default.createElement("div", { className: "absolute left-1 top-1/2 transform -translate-y-1/2 w-1 h-6 bg-white rounded-full" })
|
|
2720
|
-
);
|
|
2721
|
-
};
|
|
2722
|
-
var NavigationItem_default = NavigationItemComponent;
|
|
2723
|
-
|
|
2724
|
-
// src/navigation/Navigation.tsx
|
|
2725
|
-
var Navigation = ({
|
|
2726
|
-
config,
|
|
1265
|
+
var NavigationItem_default = NavigationItemComponent;
|
|
1266
|
+
|
|
1267
|
+
// src/navigation/Navigation.tsx
|
|
1268
|
+
var Navigation = ({
|
|
1269
|
+
config,
|
|
2727
1270
|
isOpen,
|
|
2728
1271
|
activeItemId,
|
|
2729
1272
|
onItemClick,
|
|
@@ -2776,14 +1319,14 @@ var Navigation = ({
|
|
|
2776
1319
|
onItemClick?.(item);
|
|
2777
1320
|
};
|
|
2778
1321
|
if (!isOpen) return null;
|
|
2779
|
-
return /* @__PURE__ */
|
|
1322
|
+
return /* @__PURE__ */ React12__default.default.createElement("nav", { className: `${getContainerClasses()} ${className}` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: getContentClasses() }, logo && /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center mb-4" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2780
1323
|
"img",
|
|
2781
1324
|
{
|
|
2782
1325
|
src: logo.src,
|
|
2783
1326
|
alt: logo.alt || "Logo",
|
|
2784
1327
|
className: "h-8 w-auto"
|
|
2785
1328
|
}
|
|
2786
|
-
)), direction === "vertical" && /* @__PURE__ */
|
|
1329
|
+
)), direction === "vertical" && /* @__PURE__ */ React12__default.default.createElement("div", { className: "h-12 flex-shrink-0" }), /* @__PURE__ */ React12__default.default.createElement("div", { className: getItemsListClasses() }, items.map((item) => /* @__PURE__ */ React12__default.default.createElement(
|
|
2787
1330
|
NavigationItem_default,
|
|
2788
1331
|
{
|
|
2789
1332
|
key: item.id,
|
|
@@ -2792,14 +1335,14 @@ var Navigation = ({
|
|
|
2792
1335
|
isActive: activeItemId === item.id,
|
|
2793
1336
|
onClick: handleItemClick
|
|
2794
1337
|
}
|
|
2795
|
-
))), avatar && direction === "vertical" && /* @__PURE__ */
|
|
1338
|
+
))), avatar && direction === "vertical" && /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center mt-auto pt-4" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2796
1339
|
"img",
|
|
2797
1340
|
{
|
|
2798
1341
|
src: avatar.src,
|
|
2799
1342
|
alt: avatar.alt || "Avatar",
|
|
2800
1343
|
className: "w-10 h-10 rounded-full border-2 border-gray-200"
|
|
2801
1344
|
}
|
|
2802
|
-
)), avatar && direction === "horizontal" && /* @__PURE__ */
|
|
1345
|
+
)), avatar && direction === "horizontal" && /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2803
1346
|
"img",
|
|
2804
1347
|
{
|
|
2805
1348
|
src: avatar.src,
|
|
@@ -2828,7 +1371,7 @@ var NavigationToggle = ({
|
|
|
2828
1371
|
return "top-4 left-4";
|
|
2829
1372
|
}
|
|
2830
1373
|
};
|
|
2831
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
2832
1375
|
"button",
|
|
2833
1376
|
{
|
|
2834
1377
|
onClick,
|
|
@@ -2844,7 +1387,7 @@ var NavigationToggle = ({
|
|
|
2844
1387
|
`,
|
|
2845
1388
|
"aria-label": isOpen ? "\u5173\u95ED\u5BFC\u822A\u680F" : "\u6253\u5F00\u5BFC\u822A\u680F"
|
|
2846
1389
|
},
|
|
2847
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "w-5 h-5 flex flex-col justify-center items-center" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2848
1391
|
"span",
|
|
2849
1392
|
{
|
|
2850
1393
|
className: `
|
|
@@ -2853,7 +1396,7 @@ var NavigationToggle = ({
|
|
|
2853
1396
|
${isOpen ? "rotate-45 translate-y-0.5" : ""}
|
|
2854
1397
|
`
|
|
2855
1398
|
}
|
|
2856
|
-
), /* @__PURE__ */
|
|
1399
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
2857
1400
|
"span",
|
|
2858
1401
|
{
|
|
2859
1402
|
className: `
|
|
@@ -2862,7 +1405,7 @@ var NavigationToggle = ({
|
|
|
2862
1405
|
${isOpen ? "opacity-0 scale-0" : "opacity-100 scale-100"}
|
|
2863
1406
|
`
|
|
2864
1407
|
}
|
|
2865
|
-
), /* @__PURE__ */
|
|
1408
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
2866
1409
|
"span",
|
|
2867
1410
|
{
|
|
2868
1411
|
className: `
|
|
@@ -2885,21 +1428,21 @@ var FloatingMenu = ({
|
|
|
2885
1428
|
triggerClassName = "",
|
|
2886
1429
|
zIndex = 1e3
|
|
2887
1430
|
}) => {
|
|
2888
|
-
const [position, setPosition] =
|
|
2889
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
2890
|
-
const [menuDirection, setMenuDirection] =
|
|
2891
|
-
const [isDragging, setIsDragging] =
|
|
2892
|
-
const [dragOffset, setDragOffset] =
|
|
2893
|
-
const containerRef =
|
|
2894
|
-
const [mounted, setMounted] =
|
|
2895
|
-
const [hasDragged, setHasDragged] =
|
|
2896
|
-
const dragTimerRef =
|
|
2897
|
-
const mouseDownPosRef =
|
|
2898
|
-
|
|
1431
|
+
const [position, setPosition] = React12.useState(initialPosition);
|
|
1432
|
+
const [isMenuOpen, setIsMenuOpen] = React12.useState(defaultOpen);
|
|
1433
|
+
const [menuDirection, setMenuDirection] = React12.useState("right");
|
|
1434
|
+
const [isDragging, setIsDragging] = React12.useState(false);
|
|
1435
|
+
const [dragOffset, setDragOffset] = React12.useState({ x: 0, y: 0 });
|
|
1436
|
+
const containerRef = React12.useRef(null);
|
|
1437
|
+
const [mounted, setMounted] = React12.useState(false);
|
|
1438
|
+
const [hasDragged, setHasDragged] = React12.useState(false);
|
|
1439
|
+
const dragTimerRef = React12.useRef(null);
|
|
1440
|
+
const mouseDownPosRef = React12.useRef(null);
|
|
1441
|
+
React12.useEffect(() => {
|
|
2899
1442
|
setMounted(true);
|
|
2900
1443
|
return () => setMounted(false);
|
|
2901
1444
|
}, []);
|
|
2902
|
-
|
|
1445
|
+
React12.useEffect(() => {
|
|
2903
1446
|
if (!mounted || !containerRef.current) return;
|
|
2904
1447
|
const updateMenuDirection = () => {
|
|
2905
1448
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
@@ -2928,7 +1471,7 @@ var FloatingMenu = ({
|
|
|
2928
1471
|
setHasDragged(false);
|
|
2929
1472
|
setIsDragging(true);
|
|
2930
1473
|
};
|
|
2931
|
-
|
|
1474
|
+
React12.useEffect(() => {
|
|
2932
1475
|
if (!isDragging) return;
|
|
2933
1476
|
const handleMouseMove = (e) => {
|
|
2934
1477
|
if (mouseDownPosRef.current) {
|
|
@@ -2964,7 +1507,7 @@ var FloatingMenu = ({
|
|
|
2964
1507
|
document.removeEventListener("mouseup", handleMouseUp);
|
|
2965
1508
|
};
|
|
2966
1509
|
}, [isDragging, dragOffset]);
|
|
2967
|
-
|
|
1510
|
+
React12.useEffect(() => {
|
|
2968
1511
|
return () => {
|
|
2969
1512
|
if (dragTimerRef.current) {
|
|
2970
1513
|
window.clearTimeout(dragTimerRef.current);
|
|
@@ -2978,7 +1521,7 @@ var FloatingMenu = ({
|
|
|
2978
1521
|
}
|
|
2979
1522
|
setIsMenuOpen(!isMenuOpen);
|
|
2980
1523
|
};
|
|
2981
|
-
|
|
1524
|
+
React12.useEffect(() => {
|
|
2982
1525
|
if (!isMenuOpen) return;
|
|
2983
1526
|
const handleClickOutside = (e) => {
|
|
2984
1527
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -2990,7 +1533,7 @@ var FloatingMenu = ({
|
|
|
2990
1533
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2991
1534
|
};
|
|
2992
1535
|
}, [isMenuOpen]);
|
|
2993
|
-
|
|
1536
|
+
React12.useEffect(() => {
|
|
2994
1537
|
if (!mounted) return;
|
|
2995
1538
|
const checkBoundaries = () => {
|
|
2996
1539
|
const windowWidth = window.innerWidth;
|
|
@@ -3011,7 +1554,7 @@ var FloatingMenu = ({
|
|
|
3011
1554
|
}, [mounted]);
|
|
3012
1555
|
if (!mounted) return null;
|
|
3013
1556
|
return reactDom.createPortal(
|
|
3014
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
3015
1558
|
"div",
|
|
3016
1559
|
{
|
|
3017
1560
|
ref: containerRef,
|
|
@@ -3022,7 +1565,7 @@ var FloatingMenu = ({
|
|
|
3022
1565
|
zIndex
|
|
3023
1566
|
}
|
|
3024
1567
|
},
|
|
3025
|
-
/* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
3026
1569
|
"div",
|
|
3027
1570
|
{
|
|
3028
1571
|
className: `
|
|
@@ -3040,7 +1583,7 @@ var FloatingMenu = ({
|
|
|
3040
1583
|
},
|
|
3041
1584
|
trigger
|
|
3042
1585
|
),
|
|
3043
|
-
isMenuOpen && /* @__PURE__ */
|
|
1586
|
+
isMenuOpen && /* @__PURE__ */ React12__default.default.createElement(
|
|
3044
1587
|
"div",
|
|
3045
1588
|
{
|
|
3046
1589
|
className: `
|
|
@@ -3070,8 +1613,8 @@ var FloatingMenu = ({
|
|
|
3070
1613
|
};
|
|
3071
1614
|
var FloatingMenu_default = FloatingMenu;
|
|
3072
1615
|
var FloatingMenuExample = () => {
|
|
3073
|
-
const [windowWidth, setWindowWidth] =
|
|
3074
|
-
|
|
1616
|
+
const [windowWidth, setWindowWidth] = React12.useState(0);
|
|
1617
|
+
React12.useEffect(() => {
|
|
3075
1618
|
setWindowWidth(window.innerWidth);
|
|
3076
1619
|
const handleResize = () => setWindowWidth(window.innerWidth);
|
|
3077
1620
|
window.addEventListener("resize", handleResize);
|
|
@@ -3087,51 +1630,1023 @@ var FloatingMenuExample = () => {
|
|
|
3087
1630
|
const handleMenuItemClick = (id) => {
|
|
3088
1631
|
console.log(`\u70B9\u51FB\u4E86\u83DC\u5355\u9879: ${id}`);
|
|
3089
1632
|
};
|
|
3090
|
-
return /* @__PURE__ */
|
|
1633
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-full h-screen bg-gray-100 relative p-8" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "max-w-2xl mx-auto bg-white rounded-2xl shadow-sm p-8 mt-12" }, /* @__PURE__ */ React12__default.default.createElement("h1", { className: "text-3xl font-bold mb-4 text-gray-900" }, "\u60AC\u6D6E\u83DC\u5355\u793A\u4F8B"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-gray-600 leading-relaxed mb-6" }, "\u8FD9\u662F\u4E00\u4E2A\u53EF\u62D6\u62FD\u7684\u60AC\u6D6E\u83DC\u5355\u7EC4\u4EF6\u793A\u4F8B\u3002\u4F60\u53EF\u4EE5\u5C1D\u8BD5\u62D6\u52A8\u4E0B\u65B9\u7684 ", /* @__PURE__ */ React12__default.default.createElement("span", { className: "font-bold text-blue-600" }, "\u84DD\u8272\u6309\u94AE"), " \u5230\u5904\u79FB\u52A8\u3002"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-blue-50 border-l-4 border-blue-500 p-4 mb-6" }, /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-sm text-blue-700" }, /* @__PURE__ */ React12__default.default.createElement("strong", null, "\u667A\u80FD\u5B9A\u4F4D\uFF1A"), " \u83DC\u5355\u4F1A\u6839\u636E\u6309\u94AE\u5728\u5C4F\u5E55\u4E0A\u7684\u4F4D\u7F6E\u81EA\u52A8\u8C03\u6574\u5F39\u51FA\u65B9\u5411\uFF08\u5411\u5DE6\u6216\u5411\u53F3\uFF09\u3002"))), /* @__PURE__ */ React12__default.default.createElement(
|
|
3091
1634
|
FloatingMenu_default,
|
|
3092
1635
|
{
|
|
3093
|
-
trigger: /* @__PURE__ */
|
|
3094
|
-
menu: /* @__PURE__ */
|
|
1636
|
+
trigger: /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-12 h-12 bg-blue-600 rounded-full flex items-center justify-center text-white shadow-lg cursor-pointer" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-xl" }, "\u2795")),
|
|
1637
|
+
menu: /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-48 bg-white rounded-xl shadow-xl border border-gray-100 overflow-hidden" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "px-4 py-3 border-b border-gray-100" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-sm font-bold text-gray-900" }, "\u5FEB\u6377\u83DC\u5355")), /* @__PURE__ */ React12__default.default.createElement("ul", { className: "py-1" }, menuItems.map((item) => /* @__PURE__ */ React12__default.default.createElement(
|
|
3095
1638
|
"li",
|
|
3096
1639
|
{
|
|
3097
1640
|
key: item.id,
|
|
3098
1641
|
className: "flex items-center gap-3 px-4 py-2.5 hover:bg-blue-50 text-gray-700 hover:text-blue-600 cursor-pointer transition-colors text-sm",
|
|
3099
1642
|
onClick: () => handleMenuItemClick(item.id)
|
|
3100
1643
|
},
|
|
3101
|
-
/* @__PURE__ */
|
|
3102
|
-
/* @__PURE__ */
|
|
3103
|
-
)))),
|
|
3104
|
-
initialPosition: { x: 100, y: 100 }
|
|
1644
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: "text-lg" }, item.icon),
|
|
1645
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: "font-medium" }, item.label)
|
|
1646
|
+
)))),
|
|
1647
|
+
initialPosition: { x: 100, y: 100 }
|
|
1648
|
+
}
|
|
1649
|
+
), windowWidth > 0 && /* @__PURE__ */ React12__default.default.createElement(
|
|
1650
|
+
FloatingMenu_default,
|
|
1651
|
+
{
|
|
1652
|
+
trigger: /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-12 h-12 bg-purple-600 rounded-full flex items-center justify-center text-white shadow-lg cursor-pointer" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-xl" }, "\u{1F50D}")),
|
|
1653
|
+
menu: /* @__PURE__ */ React12__default.default.createElement("div", { className: "w-64 bg-white rounded-xl shadow-xl border border-gray-100 p-4" }, /* @__PURE__ */ React12__default.default.createElement("h3", { className: "text-sm font-bold text-gray-900 mb-3" }, "\u5FEB\u901F\u641C\u7D22"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
1654
|
+
"input",
|
|
1655
|
+
{
|
|
1656
|
+
type: "text",
|
|
1657
|
+
placeholder: "\u8F93\u5165\u5173\u952E\u5B57...",
|
|
1658
|
+
className: "w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent outline-none"
|
|
1659
|
+
}
|
|
1660
|
+
), /* @__PURE__ */ React12__default.default.createElement("button", { className: "w-full bg-purple-600 text-white py-2 rounded-lg text-sm font-medium hover:bg-purple-700 transition-colors" }, "\u641C\u7D22"))),
|
|
1661
|
+
initialPosition: { x: windowWidth - 100, y: 100 }
|
|
1662
|
+
}
|
|
1663
|
+
));
|
|
1664
|
+
};
|
|
1665
|
+
var FloatingMenuExample_default = FloatingMenuExample;
|
|
1666
|
+
|
|
1667
|
+
// src/testField/utils/index.ts
|
|
1668
|
+
function filterExperiments(experiments, config) {
|
|
1669
|
+
const {
|
|
1670
|
+
viewMode = "all",
|
|
1671
|
+
searchQuery = "",
|
|
1672
|
+
completionFilter = "all"
|
|
1673
|
+
} = config;
|
|
1674
|
+
return experiments.filter((experiment) => {
|
|
1675
|
+
const matchesViewMode = viewMode === "all" || experiment.category === viewMode;
|
|
1676
|
+
const query = searchQuery.toLowerCase();
|
|
1677
|
+
const matchesSearch = !query || experiment.title.toLowerCase().includes(query) || experiment.description.toLowerCase().includes(query) || experiment.tags.some((tag) => tag.toLowerCase().includes(query));
|
|
1678
|
+
const matchesCompletion = (() => {
|
|
1679
|
+
switch (completionFilter) {
|
|
1680
|
+
case "completed":
|
|
1681
|
+
return experiment.isCompleted === true;
|
|
1682
|
+
case "incomplete":
|
|
1683
|
+
return experiment.isCompleted !== true;
|
|
1684
|
+
case "all":
|
|
1685
|
+
default:
|
|
1686
|
+
return true;
|
|
1687
|
+
}
|
|
1688
|
+
})();
|
|
1689
|
+
return matchesViewMode && matchesSearch && matchesCompletion;
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
function sortExperiments(experiments, sortBy = "title", sortOrder = "asc") {
|
|
1693
|
+
return [...experiments].sort((a, b) => {
|
|
1694
|
+
let comparison = 0;
|
|
1695
|
+
switch (sortBy) {
|
|
1696
|
+
case "title":
|
|
1697
|
+
comparison = a.title.localeCompare(b.title);
|
|
1698
|
+
break;
|
|
1699
|
+
case "category":
|
|
1700
|
+
comparison = a.category.localeCompare(b.category);
|
|
1701
|
+
break;
|
|
1702
|
+
case "completion":
|
|
1703
|
+
const aCompleted = a.isCompleted ? 1 : 0;
|
|
1704
|
+
const bCompleted = b.isCompleted ? 1 : 0;
|
|
1705
|
+
comparison = bCompleted - aCompleted;
|
|
1706
|
+
break;
|
|
1707
|
+
case "createdAt":
|
|
1708
|
+
if (!a.createdAt && !b.createdAt) {
|
|
1709
|
+
comparison = 0;
|
|
1710
|
+
} else if (!a.createdAt) {
|
|
1711
|
+
comparison = 1;
|
|
1712
|
+
} else if (!b.createdAt) {
|
|
1713
|
+
comparison = -1;
|
|
1714
|
+
} else {
|
|
1715
|
+
comparison = new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime();
|
|
1716
|
+
}
|
|
1717
|
+
break;
|
|
1718
|
+
case "updatedAt":
|
|
1719
|
+
if (!a.updatedAt && !b.updatedAt) {
|
|
1720
|
+
comparison = 0;
|
|
1721
|
+
} else if (!a.updatedAt) {
|
|
1722
|
+
comparison = 1;
|
|
1723
|
+
} else if (!b.updatedAt) {
|
|
1724
|
+
comparison = -1;
|
|
1725
|
+
} else {
|
|
1726
|
+
comparison = new Date(a.updatedAt).getTime() - new Date(b.updatedAt).getTime();
|
|
1727
|
+
}
|
|
1728
|
+
break;
|
|
1729
|
+
default:
|
|
1730
|
+
comparison = 0;
|
|
1731
|
+
}
|
|
1732
|
+
if (comparison === 0) {
|
|
1733
|
+
comparison = a.id.localeCompare(b.id);
|
|
1734
|
+
}
|
|
1735
|
+
return sortOrder === "asc" ? comparison : -comparison;
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
function getAllTags(experiments) {
|
|
1739
|
+
const allTags = experiments.flatMap((experiment) => experiment.tags);
|
|
1740
|
+
return Array.from(new Set(allTags)).sort();
|
|
1741
|
+
}
|
|
1742
|
+
function getExperimentCounts(experiments) {
|
|
1743
|
+
const counts = {
|
|
1744
|
+
all: experiments.length,
|
|
1745
|
+
utility: 0,
|
|
1746
|
+
leisure: 0,
|
|
1747
|
+
completed: 0,
|
|
1748
|
+
inProgress: 0
|
|
1749
|
+
};
|
|
1750
|
+
experiments.forEach((experiment) => {
|
|
1751
|
+
if (experiment.category === "utility") {
|
|
1752
|
+
counts.utility++;
|
|
1753
|
+
} else if (experiment.category === "leisure") {
|
|
1754
|
+
counts.leisure++;
|
|
1755
|
+
}
|
|
1756
|
+
if (experiment.isCompleted) {
|
|
1757
|
+
counts.completed++;
|
|
1758
|
+
} else {
|
|
1759
|
+
counts.inProgress++;
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
return counts;
|
|
1763
|
+
}
|
|
1764
|
+
function validateExperiment(experiment) {
|
|
1765
|
+
return !!(experiment.id && experiment.title && experiment.description && experiment.path && experiment.category && Array.isArray(experiment.tags));
|
|
1766
|
+
}
|
|
1767
|
+
function getCategoryDisplayName(category) {
|
|
1768
|
+
switch (category) {
|
|
1769
|
+
case "utility":
|
|
1770
|
+
return "\u5B9E\u7528\u5DE5\u5177";
|
|
1771
|
+
case "leisure":
|
|
1772
|
+
return "\u4F11\u95F2\u5A31\u4E50";
|
|
1773
|
+
case "all":
|
|
1774
|
+
default:
|
|
1775
|
+
return "\u5168\u90E8";
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
function getCategoryColor(category) {
|
|
1779
|
+
switch (category) {
|
|
1780
|
+
case "utility":
|
|
1781
|
+
return "bg-blue-100 text-blue-800 border-blue-200";
|
|
1782
|
+
case "leisure":
|
|
1783
|
+
return "bg-purple-100 text-purple-800 border-purple-200";
|
|
1784
|
+
default:
|
|
1785
|
+
return "bg-gray-100 text-gray-800 border-gray-200";
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
function getCompletionFilterDisplayName(filter) {
|
|
1789
|
+
switch (filter) {
|
|
1790
|
+
case "completed":
|
|
1791
|
+
return "\u5DF2\u5B8C\u6210";
|
|
1792
|
+
case "incomplete":
|
|
1793
|
+
return "\u8FDB\u884C\u4E2D";
|
|
1794
|
+
case "all":
|
|
1795
|
+
default:
|
|
1796
|
+
return "\u5168\u90E8\u72B6\u6001";
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
function getCompletionStatusColor(isCompleted) {
|
|
1800
|
+
if (isCompleted) {
|
|
1801
|
+
return "bg-green-100 text-green-800 border-green-200";
|
|
1802
|
+
}
|
|
1803
|
+
return "bg-yellow-100 text-yellow-800 border-yellow-200";
|
|
1804
|
+
}
|
|
1805
|
+
function getCompletionStatusText(isCompleted) {
|
|
1806
|
+
return isCompleted ? "\u5DF2\u5B8C\u6210" : "\u8FDB\u884C\u4E2D";
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// src/testField/components/CategoryFilter.tsx
|
|
1810
|
+
var CategoryFilter = ({
|
|
1811
|
+
viewMode,
|
|
1812
|
+
onViewModeChange,
|
|
1813
|
+
counts,
|
|
1814
|
+
className
|
|
1815
|
+
}) => {
|
|
1816
|
+
const options = [
|
|
1817
|
+
{
|
|
1818
|
+
value: "all",
|
|
1819
|
+
label: getCategoryDisplayName("all"),
|
|
1820
|
+
icon: "\u{1F4CA}",
|
|
1821
|
+
activeColor: {
|
|
1822
|
+
bg: "bg-blue-500",
|
|
1823
|
+
shadow: "shadow-blue-200"
|
|
1824
|
+
},
|
|
1825
|
+
showCount: false
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
value: "utility",
|
|
1829
|
+
label: getCategoryDisplayName("utility"),
|
|
1830
|
+
icon: "\u{1F527}",
|
|
1831
|
+
activeColor: {
|
|
1832
|
+
bg: "bg-green-500",
|
|
1833
|
+
shadow: "shadow-green-200"
|
|
1834
|
+
},
|
|
1835
|
+
count: counts.utility,
|
|
1836
|
+
showCount: true
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
value: "leisure",
|
|
1840
|
+
label: getCategoryDisplayName("leisure"),
|
|
1841
|
+
icon: "\u{1F3AE}",
|
|
1842
|
+
activeColor: {
|
|
1843
|
+
bg: "bg-purple-500",
|
|
1844
|
+
shadow: "shadow-purple-200"
|
|
1845
|
+
},
|
|
1846
|
+
count: counts.leisure,
|
|
1847
|
+
showCount: true
|
|
1848
|
+
}
|
|
1849
|
+
];
|
|
1850
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1851
|
+
chunkE72D5KHY_js.FilterButtonGroup,
|
|
1852
|
+
{
|
|
1853
|
+
label: "\u9879\u76EE\u7C7B\u522B",
|
|
1854
|
+
value: viewMode,
|
|
1855
|
+
options,
|
|
1856
|
+
onChange: onViewModeChange,
|
|
1857
|
+
className
|
|
1858
|
+
}
|
|
1859
|
+
);
|
|
1860
|
+
};
|
|
1861
|
+
var CompletionFilterComponent = ({
|
|
1862
|
+
completionFilter,
|
|
1863
|
+
onCompletionFilterChange,
|
|
1864
|
+
counts,
|
|
1865
|
+
className
|
|
1866
|
+
}) => {
|
|
1867
|
+
const options = [
|
|
1868
|
+
{
|
|
1869
|
+
value: "all",
|
|
1870
|
+
label: getCompletionFilterDisplayName("all"),
|
|
1871
|
+
icon: "\u{1F4CA}",
|
|
1872
|
+
activeColor: {
|
|
1873
|
+
bg: "bg-slate-500",
|
|
1874
|
+
shadow: "shadow-slate-200"
|
|
1875
|
+
},
|
|
1876
|
+
count: counts.all,
|
|
1877
|
+
showCount: true
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
value: "completed",
|
|
1881
|
+
label: getCompletionFilterDisplayName("completed"),
|
|
1882
|
+
icon: "\u2705",
|
|
1883
|
+
activeColor: {
|
|
1884
|
+
bg: "bg-emerald-500",
|
|
1885
|
+
shadow: "shadow-emerald-200"
|
|
1886
|
+
},
|
|
1887
|
+
count: counts.completed,
|
|
1888
|
+
showCount: true
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
value: "incomplete",
|
|
1892
|
+
label: getCompletionFilterDisplayName("incomplete"),
|
|
1893
|
+
icon: "\u{1F6A7}",
|
|
1894
|
+
activeColor: {
|
|
1895
|
+
bg: "bg-orange-500",
|
|
1896
|
+
shadow: "shadow-orange-200"
|
|
1897
|
+
},
|
|
1898
|
+
count: counts.inProgress,
|
|
1899
|
+
showCount: true
|
|
1900
|
+
}
|
|
1901
|
+
];
|
|
1902
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1903
|
+
chunkE72D5KHY_js.FilterButtonGroup,
|
|
1904
|
+
{
|
|
1905
|
+
label: "\u5B8C\u6210\u72B6\u6001",
|
|
1906
|
+
value: completionFilter,
|
|
1907
|
+
options,
|
|
1908
|
+
onChange: onCompletionFilterChange,
|
|
1909
|
+
className
|
|
1910
|
+
}
|
|
1911
|
+
);
|
|
1912
|
+
};
|
|
1913
|
+
var PageHeader = ({ counts, className }) => {
|
|
1914
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React12__default.default.createElement(chunkE72D5KHY_js.BackButton, null)), /* @__PURE__ */ React12__default.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React12__default.default.createElement("h1", { className: "text-3xl font-bold text-gray-900" }, "\u5B9E\u9A8C\u7530"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-2 text-sm text-gray-600" }, "\u5728\u8FD9\u91CC\uFF0C\u4F60\u53EF\u4EE5\u5C1D\u8BD5\u5404\u79CD\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\u548C\u9879\u76EE"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-4 flex flex-wrap gap-4 text-sm text-gray-500" }, /* @__PURE__ */ React12__default.default.createElement("span", null, "\u603B\u8BA1: ", counts.all, " \u4E2A\u9879\u76EE"), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u5B9E\u7528\u5DE5\u5177: ", counts.utility, " \u4E2A"), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u4F11\u95F2\u5A31\u4E50: ", counts.leisure, " \u4E2A"), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u5DF2\u5B8C\u6210: ", counts.completed, " \u4E2A"))));
|
|
1915
|
+
};
|
|
1916
|
+
function defaultExperimentRenderer(item) {
|
|
1917
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1918
|
+
ExperimentCard,
|
|
1919
|
+
{
|
|
1920
|
+
href: item.path,
|
|
1921
|
+
title: item.title,
|
|
1922
|
+
description: item.description,
|
|
1923
|
+
tags: item.tags,
|
|
1924
|
+
category: item.category,
|
|
1925
|
+
isCompleted: item.isCompleted,
|
|
1926
|
+
updatedAt: item.updatedAt,
|
|
1927
|
+
createdAt: item.createdAt
|
|
1928
|
+
}
|
|
1929
|
+
);
|
|
1930
|
+
}
|
|
1931
|
+
function ExperimentGrid({
|
|
1932
|
+
items,
|
|
1933
|
+
renderItem,
|
|
1934
|
+
columns = { sm: 1, md: 2, lg: 3, xl: 4 },
|
|
1935
|
+
gap = "md",
|
|
1936
|
+
className = ""
|
|
1937
|
+
}) {
|
|
1938
|
+
const itemRenderer = renderItem || ((item) => defaultExperimentRenderer(item));
|
|
1939
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
1940
|
+
chunkE72D5KHY_js.Grid,
|
|
1941
|
+
{
|
|
1942
|
+
items,
|
|
1943
|
+
renderItem: itemRenderer,
|
|
1944
|
+
columns,
|
|
1945
|
+
gap,
|
|
1946
|
+
className
|
|
1947
|
+
}
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
function ExperimentItemGrid({
|
|
1951
|
+
experiments,
|
|
1952
|
+
...props
|
|
1953
|
+
}) {
|
|
1954
|
+
return /* @__PURE__ */ React12__default.default.createElement(ExperimentGrid, { items: experiments, ...props });
|
|
1955
|
+
}
|
|
1956
|
+
var EmptyState = ({ searchQuery, onClearSearch, className }) => {
|
|
1957
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: `text-center py-12 ${className}` }, /* @__PURE__ */ React12__default.default.createElement(
|
|
1958
|
+
"svg",
|
|
1959
|
+
{
|
|
1960
|
+
className: "mx-auto h-12 w-12 text-gray-400",
|
|
1961
|
+
fill: "none",
|
|
1962
|
+
stroke: "currentColor",
|
|
1963
|
+
viewBox: "0 0 24 24"
|
|
1964
|
+
},
|
|
1965
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
1966
|
+
"path",
|
|
1967
|
+
{
|
|
1968
|
+
strokeLinecap: "round",
|
|
1969
|
+
strokeLinejoin: "round",
|
|
1970
|
+
strokeWidth: 2,
|
|
1971
|
+
d: "M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.47.904-6.06 2.384"
|
|
1972
|
+
}
|
|
1973
|
+
)
|
|
1974
|
+
), /* @__PURE__ */ React12__default.default.createElement("h3", { className: "mt-2 text-sm font-medium text-gray-900" }, "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5B9E\u9A8C\u9879\u76EE"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "mt-1 text-sm text-gray-500" }, searchQuery ? "\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u5173\u952E\u8BCD\u6216\u7B5B\u9009\u6761\u4EF6" : "\u5F53\u524D\u5206\u7C7B\u4E0B\u6682\u65E0\u5B9E\u9A8C\u9879\u76EE"), searchQuery && /* @__PURE__ */ React12__default.default.createElement("div", { className: "mt-4" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
1975
|
+
"button",
|
|
1976
|
+
{
|
|
1977
|
+
onClick: onClearSearch,
|
|
1978
|
+
className: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-blue-700 bg-blue-100 hover:bg-blue-200"
|
|
1979
|
+
},
|
|
1980
|
+
"\u6E05\u9664\u641C\u7D22"
|
|
1981
|
+
)));
|
|
1982
|
+
};
|
|
1983
|
+
var SortControl = ({
|
|
1984
|
+
sortBy,
|
|
1985
|
+
sortOrder,
|
|
1986
|
+
onSortByChange,
|
|
1987
|
+
onSortOrderChange
|
|
1988
|
+
}) => {
|
|
1989
|
+
const sortOptions = [
|
|
1990
|
+
{ value: "title", label: "\u540D\u79F0" },
|
|
1991
|
+
{ value: "updatedAt", label: "\u66F4\u65B0\u65F6\u95F4" },
|
|
1992
|
+
{ value: "createdAt", label: "\u521B\u5EFA\u65F6\u95F4" },
|
|
1993
|
+
{ value: "category", label: "\u7C7B\u522B" },
|
|
1994
|
+
{ value: "completion", label: "\u5B8C\u6210\u72B6\u6001" }
|
|
1995
|
+
];
|
|
1996
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4 p-4 bg-white rounded-lg shadow-sm border border-gray-100" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "text-sm font-medium text-gray-700" }, "\u6392\u5E8F\u65B9\u5F0F\uFF1A"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-wrap gap-2" }, sortOptions.map((option) => /* @__PURE__ */ React12__default.default.createElement(
|
|
1997
|
+
"button",
|
|
1998
|
+
{
|
|
1999
|
+
key: option.value,
|
|
2000
|
+
className: `px-3 py-1.5 text-sm rounded-full transition-colors ${sortBy === option.value ? "bg-blue-100 text-blue-700 font-medium" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
|
|
2001
|
+
onClick: () => onSortByChange(option.value)
|
|
2002
|
+
},
|
|
2003
|
+
option.label
|
|
2004
|
+
))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "ml-auto flex items-center" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2005
|
+
"button",
|
|
2006
|
+
{
|
|
2007
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-sm rounded-full bg-gray-100 hover:bg-gray-200",
|
|
2008
|
+
onClick: () => onSortOrderChange(sortOrder === "asc" ? "desc" : "asc")
|
|
2009
|
+
},
|
|
2010
|
+
sortOrder === "asc" ? /* @__PURE__ */ React12__default.default.createElement(React12__default.default.Fragment, null, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12" })), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u5347\u5E8F")) : /* @__PURE__ */ React12__default.default.createElement(React12__default.default.Fragment, null, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" })), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u964D\u5E8F"))
|
|
2011
|
+
)));
|
|
2012
|
+
};
|
|
2013
|
+
var SortModeToggle = ({ sortMode, onSortModeChange }) => {
|
|
2014
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 bg-white p-4 rounded-lg shadow-sm border border-gray-100" }, /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-sm font-medium text-gray-700" }, "\u6392\u5E8F\u6A21\u5F0F\uFF1A"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex w-full sm:w-auto p-1 bg-gray-100 rounded-lg" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2015
|
+
"button",
|
|
2016
|
+
{
|
|
2017
|
+
className: `flex-1 sm:flex-initial px-3 py-1.5 text-sm rounded-md transition-colors ${sortMode === "auto" ? "bg-white text-blue-700 font-medium shadow-sm" : "text-gray-600 hover:bg-gray-200"}`,
|
|
2018
|
+
onClick: () => onSortModeChange("auto")
|
|
2019
|
+
},
|
|
2020
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center sm:justify-start space-x-1" }, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" })), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u81EA\u52A8\u6392\u5E8F"))
|
|
2021
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
2022
|
+
"button",
|
|
2023
|
+
{
|
|
2024
|
+
className: `flex-1 sm:flex-initial px-3 py-1.5 text-sm rounded-md transition-colors ${sortMode === "manual" ? "bg-white text-blue-700 font-medium shadow-sm" : "text-gray-600 hover:bg-gray-200"}`,
|
|
2025
|
+
onClick: () => onSortModeChange("manual")
|
|
2026
|
+
},
|
|
2027
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center sm:justify-start space-x-1" }, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 11.5V14m0-2.5v-6a1.5 1.5 0 113 0m-3 6a1.5 1.5 0 00-3 0v2a7.5 7.5 0 0015 0v-5a1.5 1.5 0 013 0m-6-3V11m0-5.5v-1a1.5 1.5 0 013 0v1m0 0V11m0-5.5a1.5 1.5 0 013 0v3m0 0V11" })), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u624B\u52A8\u6392\u5E8F"))
|
|
2028
|
+
)));
|
|
2029
|
+
};
|
|
2030
|
+
var SortableExperimentItem = ({
|
|
2031
|
+
item,
|
|
2032
|
+
onMoveUp,
|
|
2033
|
+
onMoveDown,
|
|
2034
|
+
isFirst,
|
|
2035
|
+
isLast
|
|
2036
|
+
}) => {
|
|
2037
|
+
const {
|
|
2038
|
+
attributes,
|
|
2039
|
+
listeners,
|
|
2040
|
+
setNodeRef,
|
|
2041
|
+
transform,
|
|
2042
|
+
transition,
|
|
2043
|
+
isDragging
|
|
2044
|
+
} = sortable.useSortable({ id: item.id });
|
|
2045
|
+
const style = {
|
|
2046
|
+
transform: utilities.CSS.Transform.toString(transform),
|
|
2047
|
+
transition,
|
|
2048
|
+
zIndex: isDragging ? 100 : 1,
|
|
2049
|
+
opacity: isDragging ? 0.8 : 1,
|
|
2050
|
+
position: "relative"
|
|
2051
|
+
};
|
|
2052
|
+
return /* @__PURE__ */ React12__default.default.createElement(
|
|
2053
|
+
"div",
|
|
2054
|
+
{
|
|
2055
|
+
ref: setNodeRef,
|
|
2056
|
+
style,
|
|
2057
|
+
className: "relative group"
|
|
2058
|
+
},
|
|
2059
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
2060
|
+
"div",
|
|
2061
|
+
{
|
|
2062
|
+
...attributes,
|
|
2063
|
+
...listeners,
|
|
2064
|
+
className: "absolute right-2 top-2 w-8 h-8 bg-white/80 hover:bg-white rounded-full flex items-center justify-center shadow-md z-10\n hidden sm:flex\n opacity-0 group-hover:opacity-100 transition-opacity\n cursor-grab active:cursor-grabbing\n touch-action-none",
|
|
2065
|
+
onClick: (e) => e.stopPropagation(),
|
|
2066
|
+
"aria-label": "\u62D6\u52A8\u6392\u5E8F"
|
|
2067
|
+
},
|
|
2068
|
+
/* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5 text-gray-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 8h16M4 16h16" })),
|
|
2069
|
+
/* @__PURE__ */ React12__default.default.createElement("span", { className: "absolute top-full mt-1 left-1/2 transform -translate-x-1/2 text-xs bg-gray-800 text-white px-2 py-1 rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity" }, "\u62D6\u52A8\u6392\u5E8F")
|
|
2070
|
+
),
|
|
2071
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: "absolute right-2 top-2 flex flex-col gap-2 sm:hidden z-10" }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2072
|
+
"button",
|
|
2073
|
+
{
|
|
2074
|
+
onClick: (e) => {
|
|
2075
|
+
e.stopPropagation();
|
|
2076
|
+
onMoveUp?.();
|
|
2077
|
+
},
|
|
2078
|
+
disabled: isFirst,
|
|
2079
|
+
className: `w-8 h-8 rounded-full flex items-center justify-center shadow-md
|
|
2080
|
+
${isFirst ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"}`,
|
|
2081
|
+
"aria-label": "\u5411\u4E0A\u79FB\u52A8"
|
|
2082
|
+
},
|
|
2083
|
+
/* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: `h-5 w-5 ${isFirst ? "text-gray-400" : "text-gray-500"}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 15l7-7 7 7" }))
|
|
2084
|
+
), /* @__PURE__ */ React12__default.default.createElement(
|
|
2085
|
+
"button",
|
|
2086
|
+
{
|
|
2087
|
+
onClick: (e) => {
|
|
2088
|
+
e.stopPropagation();
|
|
2089
|
+
onMoveDown?.();
|
|
2090
|
+
},
|
|
2091
|
+
disabled: isLast,
|
|
2092
|
+
className: `w-8 h-8 rounded-full flex items-center justify-center shadow-md
|
|
2093
|
+
${isLast ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"}`,
|
|
2094
|
+
"aria-label": "\u5411\u4E0B\u79FB\u52A8"
|
|
2095
|
+
},
|
|
2096
|
+
/* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: `h-5 w-5 ${isLast ? "text-gray-400" : "text-gray-500"}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
2097
|
+
)),
|
|
2098
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: `transition-all ${isDragging ? "scale-105 shadow-xl" : ""}` }, /* @__PURE__ */ React12__default.default.createElement(
|
|
2099
|
+
ExperimentCard,
|
|
2100
|
+
{
|
|
2101
|
+
href: item.path,
|
|
2102
|
+
title: item.title,
|
|
2103
|
+
description: item.description,
|
|
2104
|
+
tags: item.tags,
|
|
2105
|
+
category: item.category,
|
|
2106
|
+
isCompleted: item.isCompleted,
|
|
2107
|
+
updatedAt: item.updatedAt,
|
|
2108
|
+
createdAt: item.createdAt
|
|
2109
|
+
}
|
|
2110
|
+
))
|
|
2111
|
+
);
|
|
2112
|
+
};
|
|
2113
|
+
|
|
2114
|
+
// src/testField/components/DraggableExperimentGrid.tsx
|
|
2115
|
+
var DraggableExperimentGrid = ({
|
|
2116
|
+
items: initialItems,
|
|
2117
|
+
onOrderChange,
|
|
2118
|
+
className = ""
|
|
2119
|
+
}) => {
|
|
2120
|
+
const [items, setItems] = React12.useState(initialItems);
|
|
2121
|
+
const [isDragging, setIsDragging] = React12.useState(false);
|
|
2122
|
+
const sensors = core.useSensors(
|
|
2123
|
+
core.useSensor(core.PointerSensor, {
|
|
2124
|
+
activationConstraint: {
|
|
2125
|
+
distance: 8
|
|
2126
|
+
// 需要拖动8px才激活,避免意外触发
|
|
2127
|
+
}
|
|
2128
|
+
}),
|
|
2129
|
+
core.useSensor(core.TouchSensor, {
|
|
2130
|
+
activationConstraint: {
|
|
2131
|
+
delay: 250,
|
|
2132
|
+
// 触摸需要按住250ms才激活,避免与点击冲突
|
|
2133
|
+
tolerance: 5
|
|
2134
|
+
// 允许的移动容差
|
|
2135
|
+
}
|
|
2136
|
+
}),
|
|
2137
|
+
core.useSensor(core.KeyboardSensor, {
|
|
2138
|
+
coordinateGetter: sortable.sortableKeyboardCoordinates
|
|
2139
|
+
})
|
|
2140
|
+
);
|
|
2141
|
+
function handleDragStart() {
|
|
2142
|
+
setIsDragging(true);
|
|
2143
|
+
}
|
|
2144
|
+
function handleDragEnd(event) {
|
|
2145
|
+
setIsDragging(false);
|
|
2146
|
+
const { active, over } = event;
|
|
2147
|
+
if (over && active.id !== over.id) {
|
|
2148
|
+
setItems((currentItems) => {
|
|
2149
|
+
const oldIndex = currentItems.findIndex((item) => item.id === active.id);
|
|
2150
|
+
const newIndex = currentItems.findIndex((item) => item.id === over.id);
|
|
2151
|
+
const newItems = sortable.arrayMove(currentItems, oldIndex, newIndex);
|
|
2152
|
+
if (onOrderChange) {
|
|
2153
|
+
onOrderChange(newItems);
|
|
2154
|
+
}
|
|
2155
|
+
return newItems;
|
|
2156
|
+
});
|
|
3105
2157
|
}
|
|
3106
|
-
|
|
3107
|
-
|
|
2158
|
+
}
|
|
2159
|
+
const handleMoveUp = (index) => {
|
|
2160
|
+
if (index > 0) {
|
|
2161
|
+
setItems((currentItems) => {
|
|
2162
|
+
const newItems = sortable.arrayMove(currentItems, index, index - 1);
|
|
2163
|
+
onOrderChange?.(newItems);
|
|
2164
|
+
return newItems;
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
};
|
|
2168
|
+
const handleMoveDown = (index) => {
|
|
2169
|
+
if (index < items.length - 1) {
|
|
2170
|
+
setItems((currentItems) => {
|
|
2171
|
+
const newItems = sortable.arrayMove(currentItems, index, index + 1);
|
|
2172
|
+
onOrderChange?.(newItems);
|
|
2173
|
+
return newItems;
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
};
|
|
2177
|
+
React12__default.default.useEffect(() => {
|
|
2178
|
+
setItems(initialItems);
|
|
2179
|
+
}, [initialItems]);
|
|
2180
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: `relative ${className}` }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "mb-4 px-4 py-3 bg-blue-50 text-blue-700 rounded-lg border border-blue-200 text-sm" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-start sm:items-center" }, /* @__PURE__ */ React12__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5 mr-2 flex-shrink-0 mt-0.5 sm:mt-0", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React12__default.default.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" })), /* @__PURE__ */ React12__default.default.createElement("div", null, /* @__PURE__ */ React12__default.default.createElement("p", { className: "mb-1" }, "\u62D6\u62FD\u5361\u7247\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6392\u5E8F\u3002\u70B9\u51FB\u5361\u7247\u53EF\u4EE5\u8BBF\u95EE\u5BF9\u5E94\u7684\u5B9E\u9A8C\u9879\u76EE\u3002"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xs text-blue-600 sm:hidden" }, "\u70B9\u51FB\u5361\u7247\u53F3\u4E0A\u89D2\u7684\u4E0A\u4E0B\u7BAD\u5934\u6309\u94AE\u8C03\u6574\u987A\u5E8F"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-xs text-blue-600 hidden sm:block" }, "\u957F\u6309\u5361\u7247\u53F3\u4E0A\u89D2\u7684\u62D6\u52A8\u56FE\u6807\u8FDB\u884C\u6392\u5E8F")))), /* @__PURE__ */ React12__default.default.createElement(
|
|
2181
|
+
core.DndContext,
|
|
3108
2182
|
{
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
2183
|
+
sensors,
|
|
2184
|
+
collisionDetection: core.closestCenter,
|
|
2185
|
+
onDragStart: handleDragStart,
|
|
2186
|
+
onDragEnd: handleDragEnd
|
|
2187
|
+
},
|
|
2188
|
+
/* @__PURE__ */ React12__default.default.createElement(
|
|
2189
|
+
sortable.SortableContext,
|
|
2190
|
+
{
|
|
2191
|
+
items: items.map((item) => item.id),
|
|
2192
|
+
strategy: sortable.rectSortingStrategy
|
|
2193
|
+
},
|
|
2194
|
+
/* @__PURE__ */ React12__default.default.createElement("div", { className: `
|
|
2195
|
+
grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 md:gap-6
|
|
2196
|
+
${isDragging ? "cursor-grabbing" : ""}
|
|
2197
|
+
` }, items.map((item, index) => /* @__PURE__ */ React12__default.default.createElement(
|
|
2198
|
+
SortableExperimentItem,
|
|
3112
2199
|
{
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
2200
|
+
key: item.id,
|
|
2201
|
+
item,
|
|
2202
|
+
onMoveUp: () => handleMoveUp(index),
|
|
2203
|
+
onMoveDown: () => handleMoveDown(index),
|
|
2204
|
+
isFirst: index === 0,
|
|
2205
|
+
isLast: index === items.length - 1
|
|
3116
2206
|
}
|
|
3117
|
-
)
|
|
3118
|
-
|
|
3119
|
-
}
|
|
2207
|
+
)))
|
|
2208
|
+
)
|
|
3120
2209
|
));
|
|
3121
2210
|
};
|
|
3122
|
-
var
|
|
2211
|
+
var PermissionGuard = ({
|
|
2212
|
+
apiClient,
|
|
2213
|
+
children,
|
|
2214
|
+
fallback
|
|
2215
|
+
}) => {
|
|
2216
|
+
const { user, isLoggedIn } = chunk5QMBZP7S_js.useAuth(apiClient);
|
|
2217
|
+
const hasPermission = () => {
|
|
2218
|
+
if (!isLoggedIn || !user) {
|
|
2219
|
+
return false;
|
|
2220
|
+
}
|
|
2221
|
+
return true;
|
|
2222
|
+
};
|
|
2223
|
+
if (!hasPermission()) {
|
|
2224
|
+
return fallback || /* @__PURE__ */ React12__default.default.createElement("div", { className: "min-h-screen bg-gray-50 flex items-center justify-center" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center mb-4" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.Shield, { className: "w-12 h-12 text-red-500" })), /* @__PURE__ */ React12__default.default.createElement("h2", { className: "text-xl font-semibold text-gray-900 mb-2" }, "\u9700\u8981\u767B\u5F55"), /* @__PURE__ */ React12__default.default.createElement("p", { className: "text-gray-600 mb-4" }, "\u8BF7\u5148\u767B\u5F55\u4EE5\u8BBF\u95EE\u5B9E\u9A8C\u7530\u529F\u80FD\u3002"), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-center text-sm text-gray-500 mb-4" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.AlertTriangle, { className: "w-4 h-4 mr-1" }), "\u5B9E\u9A8C\u7530\u5BF9\u6240\u6709\u6CE8\u518C\u7528\u6237\u5F00\u653E"), /* @__PURE__ */ React12__default.default.createElement(
|
|
2225
|
+
"button",
|
|
2226
|
+
{
|
|
2227
|
+
onClick: () => window.history.back(),
|
|
2228
|
+
className: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700"
|
|
2229
|
+
},
|
|
2230
|
+
"\u8FD4\u56DE\u4E0A\u4E00\u9875"
|
|
2231
|
+
)));
|
|
2232
|
+
}
|
|
2233
|
+
return /* @__PURE__ */ React12__default.default.createElement(React12__default.default.Fragment, null, children);
|
|
2234
|
+
};
|
|
2235
|
+
var UserInfoBar = ({ apiClient }) => {
|
|
2236
|
+
const { user, logout, isLoggedIn } = chunk5QMBZP7S_js.useAuth(apiClient);
|
|
2237
|
+
const handleLogout = async () => {
|
|
2238
|
+
try {
|
|
2239
|
+
await logout();
|
|
2240
|
+
window.location.href = "/";
|
|
2241
|
+
} catch (error) {
|
|
2242
|
+
console.error("\u767B\u51FA\u5931\u8D25:", error);
|
|
2243
|
+
}
|
|
2244
|
+
};
|
|
2245
|
+
if (!isLoggedIn || !user) {
|
|
2246
|
+
return null;
|
|
2247
|
+
}
|
|
2248
|
+
return /* @__PURE__ */ React12__default.default.createElement("div", { className: "bg-white border-b border-gray-200 px-4 py-3" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center space-x-3" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center space-x-2" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.User, { className: "w-5 h-5 text-gray-600" }), /* @__PURE__ */ React12__default.default.createElement("span", { className: "text-sm font-medium text-gray-900" }, user.name || user.email || "\u7528\u6237"), user.role && /* @__PURE__ */ React12__default.default.createElement("span", { className: "inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800" }, user.role))), /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center space-x-2" }, /* @__PURE__ */ React12__default.default.createElement("div", { className: "flex items-center space-x-1 text-sm text-gray-500" }, /* @__PURE__ */ React12__default.default.createElement(lucideReact.FlaskConical, { className: "w-4 h-4" }), /* @__PURE__ */ React12__default.default.createElement("span", null, "\u5B9E\u9A8C\u7530")), /* @__PURE__ */ React12__default.default.createElement(
|
|
2249
|
+
"button",
|
|
2250
|
+
{
|
|
2251
|
+
onClick: handleLogout,
|
|
2252
|
+
className: "inline-flex items-center px-3 py-1.5 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
|
|
2253
|
+
},
|
|
2254
|
+
/* @__PURE__ */ React12__default.default.createElement(lucideReact.LogOut, { className: "w-4 h-4 mr-1" }),
|
|
2255
|
+
"\u767B\u51FA"
|
|
2256
|
+
))));
|
|
2257
|
+
};
|
|
3123
2258
|
|
|
2259
|
+
Object.defineProperty(exports, "AlertDialog", {
|
|
2260
|
+
enumerable: true,
|
|
2261
|
+
get: function () { return chunkE72D5KHY_js.AlertDialog; }
|
|
2262
|
+
});
|
|
2263
|
+
Object.defineProperty(exports, "AlertDialogAction", {
|
|
2264
|
+
enumerable: true,
|
|
2265
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogAction; }
|
|
2266
|
+
});
|
|
2267
|
+
Object.defineProperty(exports, "AlertDialogCancel", {
|
|
2268
|
+
enumerable: true,
|
|
2269
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogCancel; }
|
|
2270
|
+
});
|
|
2271
|
+
Object.defineProperty(exports, "AlertDialogContent", {
|
|
2272
|
+
enumerable: true,
|
|
2273
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogContent; }
|
|
2274
|
+
});
|
|
2275
|
+
Object.defineProperty(exports, "AlertDialogDescription", {
|
|
2276
|
+
enumerable: true,
|
|
2277
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogDescription; }
|
|
2278
|
+
});
|
|
2279
|
+
Object.defineProperty(exports, "AlertDialogFooter", {
|
|
2280
|
+
enumerable: true,
|
|
2281
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogFooter; }
|
|
2282
|
+
});
|
|
2283
|
+
Object.defineProperty(exports, "AlertDialogHeader", {
|
|
2284
|
+
enumerable: true,
|
|
2285
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogHeader; }
|
|
2286
|
+
});
|
|
2287
|
+
Object.defineProperty(exports, "AlertDialogOverlay", {
|
|
2288
|
+
enumerable: true,
|
|
2289
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogOverlay; }
|
|
2290
|
+
});
|
|
2291
|
+
Object.defineProperty(exports, "AlertDialogPortal", {
|
|
2292
|
+
enumerable: true,
|
|
2293
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogPortal; }
|
|
2294
|
+
});
|
|
2295
|
+
Object.defineProperty(exports, "AlertDialogTitle", {
|
|
2296
|
+
enumerable: true,
|
|
2297
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogTitle; }
|
|
2298
|
+
});
|
|
2299
|
+
Object.defineProperty(exports, "AlertDialogTrigger", {
|
|
2300
|
+
enumerable: true,
|
|
2301
|
+
get: function () { return chunkE72D5KHY_js.AlertDialogTrigger; }
|
|
2302
|
+
});
|
|
2303
|
+
Object.defineProperty(exports, "Avatar", {
|
|
2304
|
+
enumerable: true,
|
|
2305
|
+
get: function () { return chunkE72D5KHY_js.Avatar; }
|
|
2306
|
+
});
|
|
2307
|
+
Object.defineProperty(exports, "AvatarFallback", {
|
|
2308
|
+
enumerable: true,
|
|
2309
|
+
get: function () { return chunkE72D5KHY_js.AvatarFallback; }
|
|
2310
|
+
});
|
|
2311
|
+
Object.defineProperty(exports, "AvatarImage", {
|
|
2312
|
+
enumerable: true,
|
|
2313
|
+
get: function () { return chunkE72D5KHY_js.AvatarImage; }
|
|
2314
|
+
});
|
|
2315
|
+
Object.defineProperty(exports, "BackButton", {
|
|
2316
|
+
enumerable: true,
|
|
2317
|
+
get: function () { return chunkE72D5KHY_js.BackButton; }
|
|
2318
|
+
});
|
|
2319
|
+
Object.defineProperty(exports, "Badge", {
|
|
2320
|
+
enumerable: true,
|
|
2321
|
+
get: function () { return chunkE72D5KHY_js.Badge; }
|
|
2322
|
+
});
|
|
2323
|
+
Object.defineProperty(exports, "Button", {
|
|
2324
|
+
enumerable: true,
|
|
2325
|
+
get: function () { return chunkE72D5KHY_js.Button; }
|
|
2326
|
+
});
|
|
2327
|
+
Object.defineProperty(exports, "Card", {
|
|
2328
|
+
enumerable: true,
|
|
2329
|
+
get: function () { return chunkE72D5KHY_js.Card; }
|
|
2330
|
+
});
|
|
2331
|
+
Object.defineProperty(exports, "CardContent", {
|
|
2332
|
+
enumerable: true,
|
|
2333
|
+
get: function () { return chunkE72D5KHY_js.CardContent; }
|
|
2334
|
+
});
|
|
2335
|
+
Object.defineProperty(exports, "CardDescription", {
|
|
2336
|
+
enumerable: true,
|
|
2337
|
+
get: function () { return chunkE72D5KHY_js.CardDescription; }
|
|
2338
|
+
});
|
|
2339
|
+
Object.defineProperty(exports, "CardFooter", {
|
|
2340
|
+
enumerable: true,
|
|
2341
|
+
get: function () { return chunkE72D5KHY_js.CardFooter; }
|
|
2342
|
+
});
|
|
2343
|
+
Object.defineProperty(exports, "CardHeader", {
|
|
2344
|
+
enumerable: true,
|
|
2345
|
+
get: function () { return chunkE72D5KHY_js.CardHeader; }
|
|
2346
|
+
});
|
|
2347
|
+
Object.defineProperty(exports, "CardTitle", {
|
|
2348
|
+
enumerable: true,
|
|
2349
|
+
get: function () { return chunkE72D5KHY_js.CardTitle; }
|
|
2350
|
+
});
|
|
2351
|
+
Object.defineProperty(exports, "CollisionBalls", {
|
|
2352
|
+
enumerable: true,
|
|
2353
|
+
get: function () { return chunkE72D5KHY_js.CollisionBalls; }
|
|
2354
|
+
});
|
|
3124
2355
|
Object.defineProperty(exports, "ConfirmModal", {
|
|
3125
2356
|
enumerable: true,
|
|
3126
|
-
get: function () { return
|
|
2357
|
+
get: function () { return chunkE72D5KHY_js.ConfirmModal; }
|
|
2358
|
+
});
|
|
2359
|
+
Object.defineProperty(exports, "Dialog", {
|
|
2360
|
+
enumerable: true,
|
|
2361
|
+
get: function () { return chunkE72D5KHY_js.Dialog; }
|
|
2362
|
+
});
|
|
2363
|
+
Object.defineProperty(exports, "DialogClose", {
|
|
2364
|
+
enumerable: true,
|
|
2365
|
+
get: function () { return chunkE72D5KHY_js.DialogClose; }
|
|
2366
|
+
});
|
|
2367
|
+
Object.defineProperty(exports, "DialogContent", {
|
|
2368
|
+
enumerable: true,
|
|
2369
|
+
get: function () { return chunkE72D5KHY_js.DialogContent; }
|
|
2370
|
+
});
|
|
2371
|
+
Object.defineProperty(exports, "DialogDescription", {
|
|
2372
|
+
enumerable: true,
|
|
2373
|
+
get: function () { return chunkE72D5KHY_js.DialogDescription; }
|
|
2374
|
+
});
|
|
2375
|
+
Object.defineProperty(exports, "DialogFooter", {
|
|
2376
|
+
enumerable: true,
|
|
2377
|
+
get: function () { return chunkE72D5KHY_js.DialogFooter; }
|
|
2378
|
+
});
|
|
2379
|
+
Object.defineProperty(exports, "DialogHeader", {
|
|
2380
|
+
enumerable: true,
|
|
2381
|
+
get: function () { return chunkE72D5KHY_js.DialogHeader; }
|
|
2382
|
+
});
|
|
2383
|
+
Object.defineProperty(exports, "DialogOverlay", {
|
|
2384
|
+
enumerable: true,
|
|
2385
|
+
get: function () { return chunkE72D5KHY_js.DialogOverlay; }
|
|
2386
|
+
});
|
|
2387
|
+
Object.defineProperty(exports, "DialogPortal", {
|
|
2388
|
+
enumerable: true,
|
|
2389
|
+
get: function () { return chunkE72D5KHY_js.DialogPortal; }
|
|
2390
|
+
});
|
|
2391
|
+
Object.defineProperty(exports, "DialogTitle", {
|
|
2392
|
+
enumerable: true,
|
|
2393
|
+
get: function () { return chunkE72D5KHY_js.DialogTitle; }
|
|
2394
|
+
});
|
|
2395
|
+
Object.defineProperty(exports, "DialogTrigger", {
|
|
2396
|
+
enumerable: true,
|
|
2397
|
+
get: function () { return chunkE72D5KHY_js.DialogTrigger; }
|
|
2398
|
+
});
|
|
2399
|
+
Object.defineProperty(exports, "DropdownMenu", {
|
|
2400
|
+
enumerable: true,
|
|
2401
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenu; }
|
|
2402
|
+
});
|
|
2403
|
+
Object.defineProperty(exports, "DropdownMenuCheckboxItem", {
|
|
2404
|
+
enumerable: true,
|
|
2405
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuCheckboxItem; }
|
|
2406
|
+
});
|
|
2407
|
+
Object.defineProperty(exports, "DropdownMenuContent", {
|
|
2408
|
+
enumerable: true,
|
|
2409
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuContent; }
|
|
2410
|
+
});
|
|
2411
|
+
Object.defineProperty(exports, "DropdownMenuGroup", {
|
|
2412
|
+
enumerable: true,
|
|
2413
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuGroup; }
|
|
2414
|
+
});
|
|
2415
|
+
Object.defineProperty(exports, "DropdownMenuItem", {
|
|
2416
|
+
enumerable: true,
|
|
2417
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuItem; }
|
|
2418
|
+
});
|
|
2419
|
+
Object.defineProperty(exports, "DropdownMenuLabel", {
|
|
2420
|
+
enumerable: true,
|
|
2421
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuLabel; }
|
|
2422
|
+
});
|
|
2423
|
+
Object.defineProperty(exports, "DropdownMenuPortal", {
|
|
2424
|
+
enumerable: true,
|
|
2425
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuPortal; }
|
|
2426
|
+
});
|
|
2427
|
+
Object.defineProperty(exports, "DropdownMenuRadioGroup", {
|
|
2428
|
+
enumerable: true,
|
|
2429
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuRadioGroup; }
|
|
2430
|
+
});
|
|
2431
|
+
Object.defineProperty(exports, "DropdownMenuRadioItem", {
|
|
2432
|
+
enumerable: true,
|
|
2433
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuRadioItem; }
|
|
2434
|
+
});
|
|
2435
|
+
Object.defineProperty(exports, "DropdownMenuSeparator", {
|
|
2436
|
+
enumerable: true,
|
|
2437
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuSeparator; }
|
|
2438
|
+
});
|
|
2439
|
+
Object.defineProperty(exports, "DropdownMenuShortcut", {
|
|
2440
|
+
enumerable: true,
|
|
2441
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuShortcut; }
|
|
2442
|
+
});
|
|
2443
|
+
Object.defineProperty(exports, "DropdownMenuSub", {
|
|
2444
|
+
enumerable: true,
|
|
2445
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuSub; }
|
|
2446
|
+
});
|
|
2447
|
+
Object.defineProperty(exports, "DropdownMenuSubContent", {
|
|
2448
|
+
enumerable: true,
|
|
2449
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuSubContent; }
|
|
2450
|
+
});
|
|
2451
|
+
Object.defineProperty(exports, "DropdownMenuSubTrigger", {
|
|
2452
|
+
enumerable: true,
|
|
2453
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuSubTrigger; }
|
|
2454
|
+
});
|
|
2455
|
+
Object.defineProperty(exports, "DropdownMenuTrigger", {
|
|
2456
|
+
enumerable: true,
|
|
2457
|
+
get: function () { return chunkE72D5KHY_js.DropdownMenuTrigger; }
|
|
2458
|
+
});
|
|
2459
|
+
Object.defineProperty(exports, "FilterButtonGroup", {
|
|
2460
|
+
enumerable: true,
|
|
2461
|
+
get: function () { return chunkE72D5KHY_js.FilterButtonGroup; }
|
|
2462
|
+
});
|
|
2463
|
+
Object.defineProperty(exports, "GenericOrderManager", {
|
|
2464
|
+
enumerable: true,
|
|
2465
|
+
get: function () { return chunkE72D5KHY_js.GenericOrderManager; }
|
|
2466
|
+
});
|
|
2467
|
+
Object.defineProperty(exports, "Grid", {
|
|
2468
|
+
enumerable: true,
|
|
2469
|
+
get: function () { return chunkE72D5KHY_js.Grid; }
|
|
2470
|
+
});
|
|
2471
|
+
Object.defineProperty(exports, "Input", {
|
|
2472
|
+
enumerable: true,
|
|
2473
|
+
get: function () { return chunkE72D5KHY_js.Input; }
|
|
2474
|
+
});
|
|
2475
|
+
Object.defineProperty(exports, "Label", {
|
|
2476
|
+
enumerable: true,
|
|
2477
|
+
get: function () { return chunkE72D5KHY_js.Label; }
|
|
3127
2478
|
});
|
|
3128
2479
|
Object.defineProperty(exports, "Modal", {
|
|
3129
2480
|
enumerable: true,
|
|
3130
|
-
get: function () { return
|
|
2481
|
+
get: function () { return chunkE72D5KHY_js.Modal; }
|
|
2482
|
+
});
|
|
2483
|
+
Object.defineProperty(exports, "Popover", {
|
|
2484
|
+
enumerable: true,
|
|
2485
|
+
get: function () { return chunkE72D5KHY_js.Popover; }
|
|
2486
|
+
});
|
|
2487
|
+
Object.defineProperty(exports, "PopoverAnchor", {
|
|
2488
|
+
enumerable: true,
|
|
2489
|
+
get: function () { return chunkE72D5KHY_js.PopoverAnchor; }
|
|
2490
|
+
});
|
|
2491
|
+
Object.defineProperty(exports, "PopoverContent", {
|
|
2492
|
+
enumerable: true,
|
|
2493
|
+
get: function () { return chunkE72D5KHY_js.PopoverContent; }
|
|
2494
|
+
});
|
|
2495
|
+
Object.defineProperty(exports, "PopoverTrigger", {
|
|
2496
|
+
enumerable: true,
|
|
2497
|
+
get: function () { return chunkE72D5KHY_js.PopoverTrigger; }
|
|
2498
|
+
});
|
|
2499
|
+
Object.defineProperty(exports, "Progress", {
|
|
2500
|
+
enumerable: true,
|
|
2501
|
+
get: function () { return chunkE72D5KHY_js.Progress; }
|
|
2502
|
+
});
|
|
2503
|
+
Object.defineProperty(exports, "ScrollArea", {
|
|
2504
|
+
enumerable: true,
|
|
2505
|
+
get: function () { return chunkE72D5KHY_js.ScrollArea; }
|
|
2506
|
+
});
|
|
2507
|
+
Object.defineProperty(exports, "ScrollBar", {
|
|
2508
|
+
enumerable: true,
|
|
2509
|
+
get: function () { return chunkE72D5KHY_js.ScrollBar; }
|
|
3131
2510
|
});
|
|
3132
2511
|
Object.defineProperty(exports, "SearchBox", {
|
|
3133
2512
|
enumerable: true,
|
|
3134
|
-
get: function () { return
|
|
2513
|
+
get: function () { return chunkE72D5KHY_js.SearchBox; }
|
|
2514
|
+
});
|
|
2515
|
+
Object.defineProperty(exports, "SearchResultHint", {
|
|
2516
|
+
enumerable: true,
|
|
2517
|
+
get: function () { return chunkE72D5KHY_js.SearchResultHint; }
|
|
2518
|
+
});
|
|
2519
|
+
Object.defineProperty(exports, "Select", {
|
|
2520
|
+
enumerable: true,
|
|
2521
|
+
get: function () { return chunkE72D5KHY_js.Select; }
|
|
2522
|
+
});
|
|
2523
|
+
Object.defineProperty(exports, "SelectContent", {
|
|
2524
|
+
enumerable: true,
|
|
2525
|
+
get: function () { return chunkE72D5KHY_js.SelectContent; }
|
|
2526
|
+
});
|
|
2527
|
+
Object.defineProperty(exports, "SelectGroup", {
|
|
2528
|
+
enumerable: true,
|
|
2529
|
+
get: function () { return chunkE72D5KHY_js.SelectGroup; }
|
|
2530
|
+
});
|
|
2531
|
+
Object.defineProperty(exports, "SelectItem", {
|
|
2532
|
+
enumerable: true,
|
|
2533
|
+
get: function () { return chunkE72D5KHY_js.SelectItem; }
|
|
2534
|
+
});
|
|
2535
|
+
Object.defineProperty(exports, "SelectLabel", {
|
|
2536
|
+
enumerable: true,
|
|
2537
|
+
get: function () { return chunkE72D5KHY_js.SelectLabel; }
|
|
2538
|
+
});
|
|
2539
|
+
Object.defineProperty(exports, "SelectScrollDownButton", {
|
|
2540
|
+
enumerable: true,
|
|
2541
|
+
get: function () { return chunkE72D5KHY_js.SelectScrollDownButton; }
|
|
2542
|
+
});
|
|
2543
|
+
Object.defineProperty(exports, "SelectScrollUpButton", {
|
|
2544
|
+
enumerable: true,
|
|
2545
|
+
get: function () { return chunkE72D5KHY_js.SelectScrollUpButton; }
|
|
2546
|
+
});
|
|
2547
|
+
Object.defineProperty(exports, "SelectSeparator", {
|
|
2548
|
+
enumerable: true,
|
|
2549
|
+
get: function () { return chunkE72D5KHY_js.SelectSeparator; }
|
|
2550
|
+
});
|
|
2551
|
+
Object.defineProperty(exports, "SelectTrigger", {
|
|
2552
|
+
enumerable: true,
|
|
2553
|
+
get: function () { return chunkE72D5KHY_js.SelectTrigger; }
|
|
2554
|
+
});
|
|
2555
|
+
Object.defineProperty(exports, "SelectValue", {
|
|
2556
|
+
enumerable: true,
|
|
2557
|
+
get: function () { return chunkE72D5KHY_js.SelectValue; }
|
|
2558
|
+
});
|
|
2559
|
+
Object.defineProperty(exports, "Separator", {
|
|
2560
|
+
enumerable: true,
|
|
2561
|
+
get: function () { return chunkE72D5KHY_js.Separator; }
|
|
2562
|
+
});
|
|
2563
|
+
Object.defineProperty(exports, "Sheet", {
|
|
2564
|
+
enumerable: true,
|
|
2565
|
+
get: function () { return chunkE72D5KHY_js.Sheet; }
|
|
2566
|
+
});
|
|
2567
|
+
Object.defineProperty(exports, "SheetClose", {
|
|
2568
|
+
enumerable: true,
|
|
2569
|
+
get: function () { return chunkE72D5KHY_js.SheetClose; }
|
|
2570
|
+
});
|
|
2571
|
+
Object.defineProperty(exports, "SheetContent", {
|
|
2572
|
+
enumerable: true,
|
|
2573
|
+
get: function () { return chunkE72D5KHY_js.SheetContent; }
|
|
2574
|
+
});
|
|
2575
|
+
Object.defineProperty(exports, "SheetDescription", {
|
|
2576
|
+
enumerable: true,
|
|
2577
|
+
get: function () { return chunkE72D5KHY_js.SheetDescription; }
|
|
2578
|
+
});
|
|
2579
|
+
Object.defineProperty(exports, "SheetFooter", {
|
|
2580
|
+
enumerable: true,
|
|
2581
|
+
get: function () { return chunkE72D5KHY_js.SheetFooter; }
|
|
2582
|
+
});
|
|
2583
|
+
Object.defineProperty(exports, "SheetHeader", {
|
|
2584
|
+
enumerable: true,
|
|
2585
|
+
get: function () { return chunkE72D5KHY_js.SheetHeader; }
|
|
2586
|
+
});
|
|
2587
|
+
Object.defineProperty(exports, "SheetOverlay", {
|
|
2588
|
+
enumerable: true,
|
|
2589
|
+
get: function () { return chunkE72D5KHY_js.SheetOverlay; }
|
|
2590
|
+
});
|
|
2591
|
+
Object.defineProperty(exports, "SheetPortal", {
|
|
2592
|
+
enumerable: true,
|
|
2593
|
+
get: function () { return chunkE72D5KHY_js.SheetPortal; }
|
|
2594
|
+
});
|
|
2595
|
+
Object.defineProperty(exports, "SheetTitle", {
|
|
2596
|
+
enumerable: true,
|
|
2597
|
+
get: function () { return chunkE72D5KHY_js.SheetTitle; }
|
|
2598
|
+
});
|
|
2599
|
+
Object.defineProperty(exports, "SheetTrigger", {
|
|
2600
|
+
enumerable: true,
|
|
2601
|
+
get: function () { return chunkE72D5KHY_js.SheetTrigger; }
|
|
2602
|
+
});
|
|
2603
|
+
Object.defineProperty(exports, "Tabs", {
|
|
2604
|
+
enumerable: true,
|
|
2605
|
+
get: function () { return chunkE72D5KHY_js.Tabs; }
|
|
2606
|
+
});
|
|
2607
|
+
Object.defineProperty(exports, "TabsContent", {
|
|
2608
|
+
enumerable: true,
|
|
2609
|
+
get: function () { return chunkE72D5KHY_js.TabsContent; }
|
|
2610
|
+
});
|
|
2611
|
+
Object.defineProperty(exports, "TabsList", {
|
|
2612
|
+
enumerable: true,
|
|
2613
|
+
get: function () { return chunkE72D5KHY_js.TabsList; }
|
|
2614
|
+
});
|
|
2615
|
+
Object.defineProperty(exports, "TabsTrigger", {
|
|
2616
|
+
enumerable: true,
|
|
2617
|
+
get: function () { return chunkE72D5KHY_js.TabsTrigger; }
|
|
2618
|
+
});
|
|
2619
|
+
Object.defineProperty(exports, "Textarea", {
|
|
2620
|
+
enumerable: true,
|
|
2621
|
+
get: function () { return chunkE72D5KHY_js.Textarea; }
|
|
2622
|
+
});
|
|
2623
|
+
Object.defineProperty(exports, "Timeline", {
|
|
2624
|
+
enumerable: true,
|
|
2625
|
+
get: function () { return chunkE72D5KHY_js.Timeline; }
|
|
2626
|
+
});
|
|
2627
|
+
Object.defineProperty(exports, "Tooltip", {
|
|
2628
|
+
enumerable: true,
|
|
2629
|
+
get: function () { return chunkE72D5KHY_js.Tooltip; }
|
|
2630
|
+
});
|
|
2631
|
+
Object.defineProperty(exports, "TooltipContent", {
|
|
2632
|
+
enumerable: true,
|
|
2633
|
+
get: function () { return chunkE72D5KHY_js.TooltipContent; }
|
|
2634
|
+
});
|
|
2635
|
+
Object.defineProperty(exports, "TooltipProvider", {
|
|
2636
|
+
enumerable: true,
|
|
2637
|
+
get: function () { return chunkE72D5KHY_js.TooltipProvider; }
|
|
2638
|
+
});
|
|
2639
|
+
Object.defineProperty(exports, "TooltipTrigger", {
|
|
2640
|
+
enumerable: true,
|
|
2641
|
+
get: function () { return chunkE72D5KHY_js.TooltipTrigger; }
|
|
2642
|
+
});
|
|
2643
|
+
Object.defineProperty(exports, "badgeVariants", {
|
|
2644
|
+
enumerable: true,
|
|
2645
|
+
get: function () { return chunkE72D5KHY_js.badgeVariants; }
|
|
2646
|
+
});
|
|
2647
|
+
Object.defineProperty(exports, "buttonVariants", {
|
|
2648
|
+
enumerable: true,
|
|
2649
|
+
get: function () { return chunkE72D5KHY_js.buttonVariants; }
|
|
3135
2650
|
});
|
|
3136
2651
|
Object.defineProperty(exports, "arrayUtils", {
|
|
3137
2652
|
enumerable: true,
|
|
@@ -3210,121 +2725,48 @@ Object.defineProperty(exports, "logger", {
|
|
|
3210
2725
|
get: function () { return chunk6PRFP5EG_js.logger; }
|
|
3211
2726
|
});
|
|
3212
2727
|
exports.About = About_default;
|
|
3213
|
-
exports.AlertDialog = AlertDialog;
|
|
3214
|
-
exports.AlertDialogAction = AlertDialogAction;
|
|
3215
|
-
exports.AlertDialogCancel = AlertDialogCancel;
|
|
3216
|
-
exports.AlertDialogContent = AlertDialogContent;
|
|
3217
|
-
exports.AlertDialogDescription = AlertDialogDescription;
|
|
3218
|
-
exports.AlertDialogFooter = AlertDialogFooter;
|
|
3219
|
-
exports.AlertDialogHeader = AlertDialogHeader;
|
|
3220
|
-
exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
3221
|
-
exports.AlertDialogPortal = AlertDialogPortal;
|
|
3222
|
-
exports.AlertDialogTitle = AlertDialogTitle;
|
|
3223
|
-
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
3224
2728
|
exports.AutoOpenModal = AutoOpenModal;
|
|
3225
|
-
exports.Avatar = Avatar;
|
|
3226
|
-
exports.AvatarFallback = AvatarFallback;
|
|
3227
|
-
exports.AvatarImage = AvatarImage;
|
|
3228
|
-
exports.BackButton = BackButton;
|
|
3229
2729
|
exports.BackgroundRemover = BackgroundRemover;
|
|
3230
|
-
exports.
|
|
3231
|
-
exports.
|
|
3232
|
-
exports.Card = Card;
|
|
3233
|
-
exports.CardContent = CardContent;
|
|
3234
|
-
exports.CardDescription = CardDescription;
|
|
3235
|
-
exports.CardFooter = CardFooter;
|
|
3236
|
-
exports.CardHeader = CardHeader;
|
|
3237
|
-
exports.CardTitle = CardTitle;
|
|
3238
|
-
exports.CollisionBalls = CollisionBalls;
|
|
2730
|
+
exports.CategoryFilter = CategoryFilter;
|
|
2731
|
+
exports.CompletionFilterComponent = CompletionFilterComponent;
|
|
3239
2732
|
exports.Contact = Contact_default;
|
|
3240
|
-
exports.
|
|
3241
|
-
exports.
|
|
3242
|
-
exports.DialogContent = DialogContent;
|
|
3243
|
-
exports.DialogDescription = DialogDescription;
|
|
3244
|
-
exports.DialogFooter = DialogFooter;
|
|
3245
|
-
exports.DialogHeader = DialogHeader;
|
|
3246
|
-
exports.DialogOverlay = DialogOverlay;
|
|
3247
|
-
exports.DialogPortal = DialogPortal;
|
|
3248
|
-
exports.DialogTitle = DialogTitle;
|
|
3249
|
-
exports.DialogTrigger = DialogTrigger;
|
|
3250
|
-
exports.DropdownMenu = DropdownMenu;
|
|
3251
|
-
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
3252
|
-
exports.DropdownMenuContent = DropdownMenuContent;
|
|
3253
|
-
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
3254
|
-
exports.DropdownMenuItem = DropdownMenuItem;
|
|
3255
|
-
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
3256
|
-
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
3257
|
-
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
3258
|
-
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
3259
|
-
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
3260
|
-
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
3261
|
-
exports.DropdownMenuSub = DropdownMenuSub;
|
|
3262
|
-
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3263
|
-
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3264
|
-
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
2733
|
+
exports.DraggableExperimentGrid = DraggableExperimentGrid;
|
|
2734
|
+
exports.EmptyState = EmptyState;
|
|
3265
2735
|
exports.EnhancedAvatar = EnhancedAvatar;
|
|
3266
2736
|
exports.ExperimentCard = ExperimentCard;
|
|
3267
|
-
exports.
|
|
2737
|
+
exports.ExperimentGrid = ExperimentGrid;
|
|
2738
|
+
exports.ExperimentItemGrid = ExperimentItemGrid;
|
|
3268
2739
|
exports.FloatingMenu = FloatingMenu_default;
|
|
3269
2740
|
exports.FloatingMenuExample = FloatingMenuExample_default;
|
|
3270
|
-
exports.GenericOrderManager = GenericOrderManager;
|
|
3271
|
-
exports.Grid = Grid;
|
|
3272
2741
|
exports.Home = Home_default;
|
|
3273
|
-
exports.Input = Input;
|
|
3274
|
-
exports.Label = Label;
|
|
3275
2742
|
exports.Navigation = Navigation_default;
|
|
3276
2743
|
exports.NavigationItem = NavigationItem_default;
|
|
3277
2744
|
exports.NavigationToggle = NavigationToggle_default;
|
|
3278
2745
|
exports.OCRScanner = OCRScanner;
|
|
3279
|
-
exports.
|
|
3280
|
-
exports.
|
|
3281
|
-
exports.PopoverContent = PopoverContent;
|
|
3282
|
-
exports.PopoverTrigger = PopoverTrigger;
|
|
2746
|
+
exports.PageHeader = PageHeader;
|
|
2747
|
+
exports.PermissionGuard = PermissionGuard;
|
|
3283
2748
|
exports.ProfileButton = ProfileButton;
|
|
3284
2749
|
exports.ProfileModal = ProfileModal;
|
|
3285
|
-
exports.Progress = Progress;
|
|
3286
2750
|
exports.ProjectCarousel = ProjectCarousel;
|
|
3287
|
-
exports.ScrollArea = ScrollArea;
|
|
3288
|
-
exports.ScrollBar = ScrollBar;
|
|
3289
|
-
exports.SearchResultHint = SearchResultHint;
|
|
3290
|
-
exports.Select = Select;
|
|
3291
|
-
exports.SelectContent = SelectContent;
|
|
3292
|
-
exports.SelectGroup = SelectGroup;
|
|
3293
|
-
exports.SelectItem = SelectItem;
|
|
3294
|
-
exports.SelectLabel = SelectLabel;
|
|
3295
|
-
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
3296
|
-
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
3297
|
-
exports.SelectSeparator = SelectSeparator;
|
|
3298
|
-
exports.SelectTrigger = SelectTrigger;
|
|
3299
|
-
exports.SelectValue = SelectValue;
|
|
3300
2751
|
exports.SentimentAnalyzer = SentimentAnalyzer;
|
|
3301
|
-
exports.Separator = Separator3;
|
|
3302
|
-
exports.Sheet = Sheet;
|
|
3303
|
-
exports.SheetClose = SheetClose;
|
|
3304
|
-
exports.SheetContent = SheetContent;
|
|
3305
|
-
exports.SheetDescription = SheetDescription;
|
|
3306
|
-
exports.SheetFooter = SheetFooter;
|
|
3307
|
-
exports.SheetHeader = SheetHeader;
|
|
3308
|
-
exports.SheetOverlay = SheetOverlay;
|
|
3309
|
-
exports.SheetPortal = SheetPortal;
|
|
3310
|
-
exports.SheetTitle = SheetTitle;
|
|
3311
|
-
exports.SheetTrigger = SheetTrigger;
|
|
3312
2752
|
exports.SmartAssistant = SmartAssistant;
|
|
3313
|
-
exports.
|
|
3314
|
-
exports.
|
|
3315
|
-
exports.
|
|
3316
|
-
exports.
|
|
3317
|
-
exports.
|
|
3318
|
-
exports.
|
|
3319
|
-
exports.
|
|
3320
|
-
exports.
|
|
3321
|
-
exports.
|
|
3322
|
-
exports.
|
|
3323
|
-
exports.
|
|
3324
|
-
exports.
|
|
2753
|
+
exports.SortControl = SortControl;
|
|
2754
|
+
exports.SortModeToggle = SortModeToggle;
|
|
2755
|
+
exports.SortableExperimentItem = SortableExperimentItem;
|
|
2756
|
+
exports.UserInfoBar = UserInfoBar;
|
|
2757
|
+
exports.filterExperiments = filterExperiments;
|
|
2758
|
+
exports.getAllTags = getAllTags;
|
|
2759
|
+
exports.getCategoryColor = getCategoryColor;
|
|
2760
|
+
exports.getCategoryDisplayName = getCategoryDisplayName;
|
|
2761
|
+
exports.getCompletionFilterDisplayName = getCompletionFilterDisplayName;
|
|
2762
|
+
exports.getCompletionStatusColor = getCompletionStatusColor;
|
|
2763
|
+
exports.getCompletionStatusText = getCompletionStatusText;
|
|
2764
|
+
exports.getExperimentCounts = getExperimentCounts;
|
|
2765
|
+
exports.sortExperiments = sortExperiments;
|
|
3325
2766
|
exports.useBackgroundRemoval = useBackgroundRemoval;
|
|
3326
2767
|
exports.useOCR = useOCR;
|
|
3327
2768
|
exports.useSentimentAnalysis = useSentimentAnalysis;
|
|
3328
2769
|
exports.useTextGeneration = useTextGeneration;
|
|
2770
|
+
exports.validateExperiment = validateExperiment;
|
|
3329
2771
|
//# sourceMappingURL=index.js.map
|
|
3330
2772
|
//# sourceMappingURL=index.js.map
|