sa2kit 1.6.29 → 1.6.31
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/AliyunOSSProvider-P6TOVKMM.mjs +6 -0
- package/dist/{AliyunOSSProvider-I7I5YGLB.mjs.map → AliyunOSSProvider-P6TOVKMM.mjs.map} +1 -1
- package/dist/AliyunOSSProvider-Z5BRBCG6.js +15 -0
- package/dist/{AliyunOSSProvider-L7JWMKS4.js.map → AliyunOSSProvider-Z5BRBCG6.js.map} +1 -1
- package/dist/ConfigService-3DIC6C3Q.js +21 -0
- package/dist/{ConfigService-7MEZXKJ5.js.map → ConfigService-3DIC6C3Q.js.map} +1 -1
- package/dist/ConfigService-V6ZK273Z.mjs +4 -0
- package/dist/{ConfigService-BV57YYFW.mjs.map → ConfigService-V6ZK273Z.mjs.map} +1 -1
- package/dist/LocalStorageProvider-3RVPCQB3.mjs +6 -0
- package/dist/{LocalStorageProvider-FVLLHBHO.mjs.map → LocalStorageProvider-3RVPCQB3.mjs.map} +1 -1
- package/dist/LocalStorageProvider-PP7MA5OT.js +15 -0
- package/dist/{LocalStorageProvider-NBNHHWLY.js.map → LocalStorageProvider-PP7MA5OT.js.map} +1 -1
- package/dist/PMXParser-2VTA737I.js +13 -0
- package/dist/{PMXParser-YBS3B6HM.js.map → PMXParser-2VTA737I.js.map} +1 -1
- package/dist/PMXParser-RNVQL76A.mjs +4 -0
- package/dist/{PMXParser-L6IWHL4I.mjs.map → PMXParser-RNVQL76A.mjs.map} +1 -1
- package/dist/analytics/index.js +46 -45
- package/dist/analytics/index.js.map +1 -1
- package/dist/analytics/index.mjs +45 -44
- package/dist/analytics/index.mjs.map +1 -1
- package/dist/analytics/server/index.js +4 -4
- package/dist/analytics/server/index.js.map +1 -1
- package/dist/analytics/server/index.mjs +4 -4
- package/dist/analytics/server/index.mjs.map +1 -1
- package/dist/api/index.js +5 -5
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +5 -5
- package/dist/api/index.mjs.map +1 -1
- package/dist/audioDetection/index.js +17 -16
- package/dist/audioDetection/index.js.map +1 -1
- package/dist/audioDetection/index.mjs +17 -16
- package/dist/audioDetection/index.mjs.map +1 -1
- package/dist/auth/client/index.js +4 -4
- package/dist/auth/client/index.mjs +1 -1
- package/dist/auth/components/index.js +3 -3
- package/dist/auth/components/index.js.map +1 -1
- package/dist/auth/components/index.mjs +3 -3
- package/dist/auth/components/index.mjs.map +1 -1
- package/dist/auth/index.js +29 -29
- package/dist/auth/index.mjs +5 -5
- package/dist/auth/middleware/index.js +3 -3
- package/dist/auth/middleware/index.mjs +2 -2
- package/dist/auth/routes/index.js +14 -14
- package/dist/auth/routes/index.mjs +2 -2
- package/dist/auth/services/index.js +7 -7
- package/dist/auth/services/index.mjs +1 -1
- package/dist/calendar/index.js +146 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +139 -175
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/calendar/routes/index.js +1 -1
- package/dist/calendar/routes/index.js.map +1 -1
- package/dist/calendar/routes/index.mjs +1 -1
- package/dist/calendar/routes/index.mjs.map +1 -1
- package/dist/{chunk-5YQ5B7IZ.js → chunk-24HGREE6.js} +5 -5
- package/dist/{chunk-5YQ5B7IZ.js.map → chunk-24HGREE6.js.map} +1 -1
- package/dist/{chunk-6PRFP5EG.js → chunk-25OFOKNF.js} +6 -6
- package/dist/chunk-25OFOKNF.js.map +1 -0
- package/dist/{chunk-KQGP6BTS.mjs → chunk-3DXPQ4YV.mjs} +6 -6
- package/dist/chunk-3DXPQ4YV.mjs.map +1 -0
- package/dist/{chunk-3BGPZN4X.mjs → chunk-3NHAT7D4.mjs} +12 -12
- package/dist/chunk-3NHAT7D4.mjs.map +1 -0
- package/dist/{chunk-MW4BCIZC.mjs → chunk-4HC6M7FK.mjs} +3 -3
- package/dist/chunk-4HC6M7FK.mjs.map +1 -0
- package/dist/{chunk-ESRCX5TQ.mjs → chunk-52TN2QSS.mjs} +3 -3
- package/dist/{chunk-ESRCX5TQ.mjs.map → chunk-52TN2QSS.mjs.map} +1 -1
- package/dist/{chunk-DW2ZTOCV.js → chunk-5A7ERLKK.js} +105 -106
- package/dist/chunk-5A7ERLKK.js.map +1 -0
- package/dist/{chunk-CNTILN5J.mjs → chunk-5YQ62BKX.mjs} +20 -19
- package/dist/chunk-5YQ62BKX.mjs.map +1 -0
- package/dist/{chunk-6W5BMXJG.js → chunk-6OWNMJKG.js} +4 -4
- package/dist/{chunk-6W5BMXJG.js.map → chunk-6OWNMJKG.js.map} +1 -1
- package/dist/{chunk-WSNM4EU5.mjs → chunk-77M5AQG3.mjs} +37 -41
- package/dist/chunk-77M5AQG3.mjs.map +1 -0
- package/dist/{chunk-DUHZ7VZP.js → chunk-7VRT55ZD.js} +3 -3
- package/dist/chunk-7VRT55ZD.js.map +1 -0
- package/dist/{chunk-LX4XX6W7.js → chunk-C54W2CMK.js} +16 -16
- package/dist/chunk-C54W2CMK.js.map +1 -0
- package/dist/{chunk-3WOAPLEG.mjs → chunk-EB4NR623.mjs} +27 -26
- package/dist/chunk-EB4NR623.mjs.map +1 -0
- package/dist/{chunk-CD77U7LZ.js → chunk-GBPLX42J.js} +9 -9
- package/dist/chunk-GBPLX42J.js.map +1 -0
- package/dist/{chunk-TFQF2HDO.mjs → chunk-HDEOCX2L.mjs} +12 -12
- package/dist/chunk-HDEOCX2L.mjs.map +1 -0
- package/dist/{chunk-LFG6FPM5.mjs → chunk-KIP2CERU.mjs} +37 -38
- package/dist/chunk-KIP2CERU.mjs.map +1 -0
- package/dist/{chunk-6YKMCPQI.mjs → chunk-KZKIH4AS.mjs} +4 -4
- package/dist/chunk-KZKIH4AS.mjs.map +1 -0
- package/dist/{chunk-6MQUBPKB.mjs → chunk-LJ4CCSSY.mjs} +3 -3
- package/dist/{chunk-6MQUBPKB.mjs.map → chunk-LJ4CCSSY.mjs.map} +1 -1
- package/dist/{chunk-TOC5FSHP.js → chunk-NJ2SNXBJ.js} +12 -12
- package/dist/chunk-NJ2SNXBJ.js.map +1 -0
- package/dist/{chunk-OCR5DS4C.mjs → chunk-PE5EAHZK.mjs} +3 -3
- package/dist/chunk-PE5EAHZK.mjs.map +1 -0
- package/dist/{chunk-TKCYPDWU.js → chunk-Q5EDCKQA.js} +27 -29
- package/dist/chunk-Q5EDCKQA.js.map +1 -0
- package/dist/{chunk-CLKKZSPZ.js → chunk-RBKGYWME.js} +20 -19
- package/dist/chunk-RBKGYWME.js.map +1 -0
- package/dist/{chunk-VRTRSEEH.mjs → chunk-RSJSZ7QH.mjs} +11 -11
- package/dist/chunk-RSJSZ7QH.mjs.map +1 -0
- package/dist/{chunk-E7RGBAYJ.js → chunk-TDCDEBGP.js} +30 -29
- package/dist/chunk-TDCDEBGP.js.map +1 -0
- package/dist/{chunk-T5OZHYVM.mjs → chunk-TVROG2Q4.mjs} +15 -15
- package/dist/chunk-TVROG2Q4.mjs.map +1 -0
- package/dist/{chunk-JZXJQMVE.js → chunk-UIFFDRTE.js} +11 -11
- package/dist/chunk-UIFFDRTE.js.map +1 -0
- package/dist/{chunk-UOFTHYIH.js → chunk-UL6XJGUZ.js} +4 -4
- package/dist/chunk-UL6XJGUZ.js.map +1 -0
- package/dist/{chunk-A3UP56MS.js → chunk-WA67GZSZ.js} +3 -3
- package/dist/chunk-WA67GZSZ.js.map +1 -0
- package/dist/{chunk-OLHGZXN3.mjs → chunk-WEEXCPSE.mjs} +5 -5
- package/dist/chunk-WEEXCPSE.mjs.map +1 -0
- package/dist/{chunk-5GCHAXY5.js → chunk-X3UU7JHT.js} +38 -42
- package/dist/chunk-X3UU7JHT.js.map +1 -0
- package/dist/{chunk-QU5OT4DF.js → chunk-XJ7ZAGC5.js} +5 -5
- package/dist/chunk-XJ7ZAGC5.js.map +1 -0
- package/dist/{chunk-GSTLV3MB.mjs → chunk-YOTQG4NP.mjs} +26 -28
- package/dist/chunk-YOTQG4NP.mjs.map +1 -0
- package/dist/{chunk-QAT2RWAO.mjs → chunk-Z36R3P62.mjs} +7 -7
- package/dist/chunk-Z36R3P62.mjs.map +1 -0
- package/dist/{chunk-7Z5LLJ3A.js → chunk-ZWQJSZEY.js} +13 -13
- package/dist/chunk-ZWQJSZEY.js.map +1 -0
- package/dist/config/index.js +6 -6
- package/dist/config/index.js.map +1 -1
- package/dist/config/index.mjs +6 -6
- package/dist/config/index.mjs.map +1 -1
- package/dist/config/server/index.js +37 -37
- package/dist/config/server/index.js.map +1 -1
- package/dist/config/server/index.mjs +37 -37
- package/dist/config/server/index.mjs.map +1 -1
- package/dist/i18n/index.d.mts +2 -2
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +16 -17
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/index.mjs +16 -17
- package/dist/i18n/index.mjs.map +1 -1
- package/dist/imageCrop/index.js +11 -10
- package/dist/imageCrop/index.js.map +1 -1
- package/dist/imageCrop/index.mjs +11 -10
- package/dist/imageCrop/index.mjs.map +1 -1
- package/dist/index.js +221 -246
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -104
- package/dist/index.mjs.map +1 -1
- package/dist/logger/index.js +6 -6
- package/dist/logger/index.mjs +1 -1
- package/dist/mmd/admin/index.js +11 -10
- package/dist/mmd/admin/index.js.map +1 -1
- package/dist/mmd/admin/index.mjs +11 -10
- package/dist/mmd/admin/index.mjs.map +1 -1
- package/dist/mmd/index.js +223 -241
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +220 -238
- package/dist/mmd/index.mjs.map +1 -1
- package/dist/mmd/server/index.js +6 -6
- package/dist/mmd/server/index.js.map +1 -1
- package/dist/mmd/server/index.mjs +6 -6
- package/dist/mmd/server/index.mjs.map +1 -1
- package/dist/music/index.js +16 -16
- package/dist/music/index.mjs +2 -2
- package/dist/music/server/index.js +8 -8
- package/dist/music/server/index.mjs +1 -1
- package/dist/request/index.js +2 -2
- package/dist/request/index.js.map +1 -1
- package/dist/request/index.mjs +2 -2
- package/dist/request/index.mjs.map +1 -1
- package/dist/storage/index.js +11 -11
- package/dist/storage/index.mjs +2 -2
- package/dist/testYourself/admin/index.js +3 -3
- package/dist/testYourself/admin/index.mjs +1 -1
- package/dist/testYourself/index.js +22 -22
- package/dist/testYourself/index.js.map +1 -1
- package/dist/testYourself/index.mjs +14 -14
- package/dist/testYourself/index.mjs.map +1 -1
- package/dist/testYourself/server/index.js +4 -4
- package/dist/testYourself/server/index.mjs +1 -1
- package/dist/universalExport/index.d.mts +3 -3
- package/dist/universalExport/index.d.ts +3 -3
- package/dist/universalExport/index.js +48 -47
- package/dist/universalExport/index.js.map +1 -1
- package/dist/universalExport/index.mjs +48 -47
- package/dist/universalExport/index.mjs.map +1 -1
- package/dist/universalExport/server/index.js +29 -29
- package/dist/universalExport/server/index.js.map +1 -1
- package/dist/universalExport/server/index.mjs +28 -28
- package/dist/universalExport/server/index.mjs.map +1 -1
- package/dist/universalFile/index.d.mts +3 -3
- package/dist/universalFile/index.d.ts +3 -3
- package/dist/universalFile/index.js +73 -72
- package/dist/universalFile/index.js.map +1 -1
- package/dist/universalFile/index.mjs +73 -72
- package/dist/universalFile/index.mjs.map +1 -1
- package/dist/universalFile/server/index.js +258 -260
- package/dist/universalFile/server/index.js.map +1 -1
- package/dist/universalFile/server/index.mjs +244 -246
- package/dist/universalFile/server/index.mjs.map +1 -1
- package/dist/utils/index.js +11 -11
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/AliyunOSSProvider-I7I5YGLB.mjs +0 -6
- package/dist/AliyunOSSProvider-L7JWMKS4.js +0 -15
- package/dist/ConfigService-7MEZXKJ5.js +0 -21
- package/dist/ConfigService-BV57YYFW.mjs +0 -4
- package/dist/LocalStorageProvider-FVLLHBHO.mjs +0 -6
- package/dist/LocalStorageProvider-NBNHHWLY.js +0 -15
- package/dist/PMXParser-L6IWHL4I.mjs +0 -4
- package/dist/PMXParser-YBS3B6HM.js +0 -13
- package/dist/chunk-3BGPZN4X.mjs.map +0 -1
- package/dist/chunk-3WOAPLEG.mjs.map +0 -1
- package/dist/chunk-5GCHAXY5.js.map +0 -1
- package/dist/chunk-6PRFP5EG.js.map +0 -1
- package/dist/chunk-6YKMCPQI.mjs.map +0 -1
- package/dist/chunk-7Z5LLJ3A.js.map +0 -1
- package/dist/chunk-A3UP56MS.js.map +0 -1
- package/dist/chunk-CD77U7LZ.js.map +0 -1
- package/dist/chunk-CLKKZSPZ.js.map +0 -1
- package/dist/chunk-CNTILN5J.mjs.map +0 -1
- package/dist/chunk-DUHZ7VZP.js.map +0 -1
- package/dist/chunk-DW2ZTOCV.js.map +0 -1
- package/dist/chunk-E7RGBAYJ.js.map +0 -1
- package/dist/chunk-GSTLV3MB.mjs.map +0 -1
- package/dist/chunk-JZXJQMVE.js.map +0 -1
- package/dist/chunk-KQGP6BTS.mjs.map +0 -1
- package/dist/chunk-LFG6FPM5.mjs.map +0 -1
- package/dist/chunk-LX4XX6W7.js.map +0 -1
- package/dist/chunk-MW4BCIZC.mjs.map +0 -1
- package/dist/chunk-OCR5DS4C.mjs.map +0 -1
- package/dist/chunk-OLHGZXN3.mjs.map +0 -1
- package/dist/chunk-QAT2RWAO.mjs.map +0 -1
- package/dist/chunk-QU5OT4DF.js.map +0 -1
- package/dist/chunk-T5OZHYVM.mjs.map +0 -1
- package/dist/chunk-TFQF2HDO.mjs.map +0 -1
- package/dist/chunk-TKCYPDWU.js.map +0 -1
- package/dist/chunk-TOC5FSHP.js.map +0 -1
- package/dist/chunk-UOFTHYIH.js.map +0 -1
- package/dist/chunk-VRTRSEEH.mjs.map +0 -1
- package/dist/chunk-WSNM4EU5.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { Dialog, DialogContent, Avatar, AvatarImage, AvatarFallback, Button, Timeline, CollisionBalls, FilterButtonGroup, BackButton, Grid, Badge } from './chunk-
|
|
2
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, BackButton, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, ConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, GenericOrderManager, Grid, Input, Label, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, SearchBox, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { Dialog, DialogContent, Avatar, AvatarImage, AvatarFallback, Button, Timeline, CollisionBalls, FilterButtonGroup, BackButton, Grid, Badge } from './chunk-KIP2CERU.mjs';
|
|
2
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, BackButton, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, ConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, GenericOrderManager, Grid, Input, Label, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, SearchBox, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants } from './chunk-KIP2CERU.mjs';
|
|
3
|
+
import './chunk-LJ4CCSSY.mjs';
|
|
4
|
+
import './chunk-Z36R3P62.mjs';
|
|
5
|
+
import './chunk-52TN2QSS.mjs';
|
|
6
|
+
import './chunk-KZKIH4AS.mjs';
|
|
7
7
|
import { useAuth } from './chunk-KW5JH6V6.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-PE5EAHZK.mjs';
|
|
9
9
|
import './chunk-AIKEVVDR.mjs';
|
|
10
|
-
import { cn } from './chunk-
|
|
11
|
-
export { arrayUtils, cn, debugUtils, errorUtils, fileUtils, formatTime, japaneseUtils, stringUtils, validators } from './chunk-
|
|
12
|
-
export { useAsyncStorage, useElectronStorage, useLocalStorage, useStorage, useTaroStorage } from './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
export { ConsoleLoggerAdapter, LogLevel, Logger, createLogger, logger } from './chunk-
|
|
10
|
+
import { cn } from './chunk-3NHAT7D4.mjs';
|
|
11
|
+
export { arrayUtils, cn, debugUtils, errorUtils, fileUtils, formatTime, japaneseUtils, stringUtils, validators } from './chunk-3NHAT7D4.mjs';
|
|
12
|
+
export { useAsyncStorage, useElectronStorage, useLocalStorage, useStorage, useTaroStorage } from './chunk-TVROG2Q4.mjs';
|
|
13
|
+
import './chunk-WEEXCPSE.mjs';
|
|
14
|
+
export { ConsoleLoggerAdapter, LogLevel, Logger, createLogger, logger } from './chunk-3DXPQ4YV.mjs';
|
|
15
15
|
import './chunk-BJTO5JO5.mjs';
|
|
16
16
|
import React12, { useState, useRef, useCallback, useEffect } from 'react';
|
|
17
17
|
import { createWorker } from 'tesseract.js';
|
|
18
18
|
import { Upload, X, Loader2, FileText, Eraser, Download, MessageSquare, Send, Bot, User, Shield, AlertTriangle, FlaskConical, LogOut, Meh, Frown, Smile } from 'lucide-react';
|
|
19
|
+
import { clsx } from 'clsx';
|
|
19
20
|
import Link from 'next/link';
|
|
20
21
|
import { createPortal } from 'react-dom';
|
|
21
22
|
import { useSensors, useSensor, PointerSensor, TouchSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
@@ -152,7 +153,7 @@ var OCRScanner = ({
|
|
|
152
153
|
return /* @__PURE__ */ React12.createElement(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
|
-
className:
|
|
156
|
+
className: clsx("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),
|
|
156
157
|
onDragOver: handleDragOver,
|
|
157
158
|
onDrop: handleDrop
|
|
158
159
|
},
|
|
@@ -169,7 +170,7 @@ var OCRScanner = ({
|
|
|
169
170
|
{
|
|
170
171
|
src: imagePreview,
|
|
171
172
|
alt: "Preview",
|
|
172
|
-
className:
|
|
173
|
+
className: clsx("max-h-64 mx-auto object-contain transition-opacity", isProcessing ? "opacity-50" : "opacity-100")
|
|
173
174
|
}
|
|
174
175
|
), !isProcessing && /* @__PURE__ */ React12.createElement(
|
|
175
176
|
"button",
|
|
@@ -182,9 +183,9 @@ var OCRScanner = ({
|
|
|
182
183
|
"div",
|
|
183
184
|
{
|
|
184
185
|
className: "bg-blue-500 h-full transition-all duration-300",
|
|
185
|
-
style: { width:
|
|
186
|
+
style: { width: progress * 100 + "%" }
|
|
186
187
|
}
|
|
187
|
-
)), /* @__PURE__ */ React12.createElement("p", { className: "text-xs font-medium text-blue-600 mt-2" }, status === "initializing" ? "\u6B63\u5728\u52A0\u8F7D\u5F15\u64CE..." :
|
|
188
|
+
)), /* @__PURE__ */ React12.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.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.createElement("div", { className: "flex items-center gap-2 mb-2 text-gray-600 font-medium" }, /* @__PURE__ */ React12.createElement(FileText, { size: 18 }), /* @__PURE__ */ React12.createElement("span", null, "\u8BC6\u522B\u7ED3\u679C (\u7F6E\u4FE1\u5EA6: ", Math.round(result.confidence), "%)")), /* @__PURE__ */ React12.createElement("pre", { className: "text-sm text-gray-800 whitespace-pre-wrap font-sans" }, result.text)), error && /* @__PURE__ */ React12.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)),
|
|
188
189
|
/* @__PURE__ */ React12.createElement(
|
|
189
190
|
"input",
|
|
190
191
|
{
|
|
@@ -333,7 +334,7 @@ var BackgroundRemover = ({
|
|
|
333
334
|
a.download = "removed_background.png";
|
|
334
335
|
a.click();
|
|
335
336
|
};
|
|
336
|
-
return /* @__PURE__ */ React12.createElement("div", { className:
|
|
337
|
+
return /* @__PURE__ */ React12.createElement("div", { className: clsx("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.createElement(
|
|
337
338
|
"div",
|
|
338
339
|
{
|
|
339
340
|
className: "flex flex-col items-center justify-center cursor-pointer space-y-4",
|
|
@@ -345,7 +346,7 @@ var BackgroundRemover = ({
|
|
|
345
346
|
"div",
|
|
346
347
|
{
|
|
347
348
|
className: "bg-purple-500 h-full transition-all duration-300",
|
|
348
|
-
style: { width:
|
|
349
|
+
style: { width: progress * 100 + "%" }
|
|
349
350
|
}
|
|
350
351
|
)), /* @__PURE__ */ React12.createElement("p", { className: "text-[10px] mt-2 font-mono uppercase" }, status.replace(/-/g, " "))) : /* @__PURE__ */ React12.createElement("span", { className: "text-sm italic" }, "\u7B49\u5F85\u5904\u7406..."))))), /* @__PURE__ */ React12.createElement("div", { className: "flex justify-between items-center pt-2" }, !isProcessing && /* @__PURE__ */ React12.createElement(
|
|
351
352
|
"button",
|
|
@@ -500,7 +501,7 @@ var SentimentAnalyzer = ({
|
|
|
500
501
|
return "bg-yellow-50 border-yellow-200 text-yellow-700";
|
|
501
502
|
}
|
|
502
503
|
};
|
|
503
|
-
return /* @__PURE__ */ React12.createElement("div", { className:
|
|
504
|
+
return /* @__PURE__ */ React12.createElement("div", { className: clsx("p-6 border rounded-xl bg-white dark:bg-gray-800 shadow-sm", className) }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center gap-2 mb-4 text-gray-700 dark:text-gray-300 font-medium" }, /* @__PURE__ */ React12.createElement(MessageSquare, { size: 20 }), /* @__PURE__ */ React12.createElement("span", null, "\u6587\u672C\u60C5\u611F\u5206\u6790")), /* @__PURE__ */ React12.createElement("div", { className: "relative" }, /* @__PURE__ */ React12.createElement(
|
|
504
505
|
"textarea",
|
|
505
506
|
{
|
|
506
507
|
value: text,
|
|
@@ -517,7 +518,7 @@ var SentimentAnalyzer = ({
|
|
|
517
518
|
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"
|
|
518
519
|
},
|
|
519
520
|
isProcessing ? /* @__PURE__ */ React12.createElement(Loader2, { className: "animate-spin", size: 18 }) : /* @__PURE__ */ React12.createElement(Send, { size: 18 })
|
|
520
|
-
)), isProcessing && /* @__PURE__ */ React12.createElement("div", { className: "mt-4 flex items-center gap-2 text-sm text-blue-600 animate-pulse" }, /* @__PURE__ */ React12.createElement(Loader2, { size: 14, className: "animate-spin" }), /* @__PURE__ */ React12.createElement("span", null, "\u6B63\u5728\u5206\u6790 (\u9996\u6B21\u8FD0\u884C\u5C06\u52A0\u8F7D\u6A21\u578B\u8D44\u6E90)...")), result && !isProcessing && /* @__PURE__ */ React12.createElement("div", { className:
|
|
521
|
+
)), isProcessing && /* @__PURE__ */ React12.createElement("div", { className: "mt-4 flex items-center gap-2 text-sm text-blue-600 animate-pulse" }, /* @__PURE__ */ React12.createElement(Loader2, { size: 14, className: "animate-spin" }), /* @__PURE__ */ React12.createElement("span", null, "\u6B63\u5728\u5206\u6790 (\u9996\u6B21\u8FD0\u884C\u5C06\u52A0\u8F7D\u6A21\u578B\u8D44\u6E90)...")), result && !isProcessing && /* @__PURE__ */ React12.createElement("div", { className: clsx("mt-4 p-4 border rounded-lg flex items-center gap-4 animate-in fade-in slide-in-from-top-2", getSentimentColor()) }, /* @__PURE__ */ React12.createElement("div", { className: "p-2 bg-white rounded-full shadow-sm" }, getSentimentIcon()), /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("p", { className: "font-bold text-lg capitalize" }, result.sentiment), /* @__PURE__ */ React12.createElement("p", { className: "text-sm opacity-80" }, "\u7F6E\u4FE1\u5EA6: ", (result.score * 100).toFixed(1), "% (", result.label, ")"))), error && /* @__PURE__ */ React12.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));
|
|
521
522
|
};
|
|
522
523
|
var useTextGeneration = (options = {}) => {
|
|
523
524
|
const [state, setState] = useState({
|
|
@@ -575,7 +576,7 @@ var useTextGeneration = (options = {}) => {
|
|
|
575
576
|
pipelineRef.current = await pipeline("text2text-generation", modelName, {
|
|
576
577
|
progress_callback: (info) => {
|
|
577
578
|
if (info.status === "progress") {
|
|
578
|
-
setState((prev) => ({ ...prev, status:
|
|
579
|
+
setState((prev) => ({ ...prev, status: "loading model: " + Math.round(info.progress) + "%" }));
|
|
579
580
|
}
|
|
580
581
|
}
|
|
581
582
|
});
|
|
@@ -641,8 +642,8 @@ var SmartAssistant = ({ className = "" }) => {
|
|
|
641
642
|
return;
|
|
642
643
|
}
|
|
643
644
|
const prompt = `\u5BF9\u8BDD\u3002
|
|
644
|
-
\u4EBA\u8BF4\uFF1A
|
|
645
|
-
AI\u56DE\u5E94\uFF1A
|
|
645
|
+
\u4EBA\u8BF4\uFF1A"${userMessage}"
|
|
646
|
+
AI\u56DE\u5E94\uFF1A"`;
|
|
646
647
|
try {
|
|
647
648
|
const response = await generate(prompt);
|
|
648
649
|
let modelOutput = response.replace(/^AI回应:|^AI:|^Assistant:|^回答:|^答:|^Answer:/i, "").replace(/[. ]*Positive[. ]*|[. ]*Negative[. ]*|[. ]*Neutral[. ]*/gi, "").replace(/^["'“]|["'”]$/g, "").trim();
|
|
@@ -657,7 +658,7 @@ AI\u56DE\u5E94\uFF1A\u201C`;
|
|
|
657
658
|
setChatHistory((prev) => [...prev, { role: "assistant", content: "\uFF08\u672C\u5730\u6A21\u578B\u601D\u8003\u8FC7\u5EA6\uFF0C\u6682\u65F6\u4F11\u606F\u4E2D...\uFF09" }]);
|
|
658
659
|
}
|
|
659
660
|
};
|
|
660
|
-
return /* @__PURE__ */ React12.createElement("div", { className:
|
|
661
|
+
return /* @__PURE__ */ React12.createElement("div", { className: clsx("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.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.createElement("div", { className: "h-full flex flex-col items-center justify-center text-gray-400 space-y-2" }, /* @__PURE__ */ React12.createElement(Bot, { size: 48, className: "opacity-20" }), /* @__PURE__ */ React12.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.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.createElement("div", { key: i, className: clsx("flex", msg.role === "user" ? "justify-end" : "justify-start", "animate-in fade-in slide-in-from-bottom-2") }, /* @__PURE__ */ React12.createElement("div", { className: clsx("flex gap-3 max-w-[85%]", msg.role === "user" ? "flex-row-reverse" : "") }, /* @__PURE__ */ React12.createElement("div", { className: clsx("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.createElement(User, { size: 18 }) : /* @__PURE__ */ React12.createElement(Bot, { size: 18 })), /* @__PURE__ */ React12.createElement("div", { className: clsx("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.createElement("div", { className: "flex justify-start" }, /* @__PURE__ */ React12.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.createElement(Loader2, { className: "animate-spin text-blue-500", size: 16 }), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React12.createElement("span", { className: "text-xs text-gray-500 font-medium" }, "\u601D\u8003\u4E2D..."), /* @__PURE__ */ React12.createElement("span", { className: "text-[10px] text-blue-400 font-mono tracking-tighter" }, genStatus))))), /* @__PURE__ */ React12.createElement("div", { className: "p-4 bg-white dark:bg-gray-800 border-t border-gray-100 dark:border-gray-700" }, /* @__PURE__ */ React12.createElement("div", { className: "relative flex items-center gap-2" }, /* @__PURE__ */ React12.createElement(
|
|
661
662
|
"input",
|
|
662
663
|
{
|
|
663
664
|
type: "text",
|
|
@@ -845,9 +846,9 @@ var ProfileButton = ({
|
|
|
845
846
|
const closeModal = () => setIsModalOpen(false);
|
|
846
847
|
const handleContactClick = (type, value) => {
|
|
847
848
|
if (type === "\u90AE\u7BB1") {
|
|
848
|
-
window.open(
|
|
849
|
+
window.open("mailto:" + value);
|
|
849
850
|
} else if (type === "\u7535\u8BDD") {
|
|
850
|
-
window.open(
|
|
851
|
+
window.open("tel:" + value);
|
|
851
852
|
}
|
|
852
853
|
};
|
|
853
854
|
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
@@ -896,9 +897,9 @@ var AutoOpenModal = ({
|
|
|
896
897
|
};
|
|
897
898
|
const handleContactClick = (type, value) => {
|
|
898
899
|
if (type === "\u90AE\u7BB1") {
|
|
899
|
-
window.open(
|
|
900
|
+
window.open("mailto:" + value);
|
|
900
901
|
} else if (type === "\u7535\u8BDD") {
|
|
901
|
-
window.open(
|
|
902
|
+
window.open("tel:" + value);
|
|
902
903
|
}
|
|
903
904
|
};
|
|
904
905
|
return /* @__PURE__ */ React12.createElement(
|
|
@@ -1024,8 +1025,7 @@ var Contact = () => {
|
|
|
1024
1025
|
{
|
|
1025
1026
|
type: "submit",
|
|
1026
1027
|
disabled: isSubmitting,
|
|
1027
|
-
className:
|
|
1028
|
-
${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"}`
|
|
1028
|
+
className: clsx("inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white", 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")
|
|
1029
1029
|
},
|
|
1030
1030
|
isSubmitting ? "\u53D1\u9001\u4E2D..." : "\u53D1\u9001\u6D88\u606F"
|
|
1031
1031
|
)), submitStatus === "success" && /* @__PURE__ */ React12.createElement("div", { className: "rounded-md bg-green-50 p-4" }, /* @__PURE__ */ React12.createElement("div", { className: "flex" }, /* @__PURE__ */ React12.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React12.createElement("svg", { className: "h-5 w-5 text-green-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React12.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.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React12.createElement("p", { className: "text-sm font-medium text-green-800" }, "\u6D88\u606F\u5DF2\u6210\u529F\u53D1\u9001\uFF01")))), submitStatus === "error" && /* @__PURE__ */ React12.createElement("div", { className: "rounded-md bg-red-50 p-4" }, /* @__PURE__ */ React12.createElement("div", { className: "flex" }, /* @__PURE__ */ React12.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React12.createElement("svg", { className: "h-5 w-5 text-red-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React12.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.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React12.createElement("p", { className: "text-sm font-medium text-red-800" }, "\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")))))), /* @__PURE__ */ React12.createElement("div", { className: "mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3" }, /* @__PURE__ */ React12.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12.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.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u90AE\u7BB1"), /* @__PURE__ */ React12.createElement("p", { className: "mt-2 text-gray-600" }, "your.email@example.com")), /* @__PURE__ */ React12.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12.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.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u7535\u8BDD"), /* @__PURE__ */ React12.createElement("p", { className: "mt-2 text-gray-600" }, "+86 123 4567 8900")), /* @__PURE__ */ React12.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React12.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React12.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React12.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.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }))), /* @__PURE__ */ React12.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u5730\u5740"), /* @__PURE__ */ React12.createElement("p", { className: "mt-2 text-gray-600" }, "\u4E2D\u56FD\uFF0C\u5317\u4EAC")))));
|
|
@@ -1223,7 +1223,7 @@ var NavigationItemComponent = ({
|
|
|
1223
1223
|
`;
|
|
1224
1224
|
const directionClasses = direction === "vertical" ? "px-4 py-3 w-full justify-start" : "px-3 py-2 justify-center";
|
|
1225
1225
|
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";
|
|
1226
|
-
return
|
|
1226
|
+
return baseClasses + " " + directionClasses + " " + stateClasses;
|
|
1227
1227
|
};
|
|
1228
1228
|
return /* @__PURE__ */ React12.createElement(
|
|
1229
1229
|
"a",
|
|
@@ -1235,7 +1235,7 @@ var NavigationItemComponent = ({
|
|
|
1235
1235
|
className: getItemClasses()
|
|
1236
1236
|
},
|
|
1237
1237
|
item.icon && /* @__PURE__ */ React12.createElement("span", { className: "flex-shrink-0" }, item.icon),
|
|
1238
|
-
/* @__PURE__ */ React12.createElement("span", { className:
|
|
1238
|
+
/* @__PURE__ */ React12.createElement("span", { className: clsx("font-medium", direction === "vertical" ? "text-sm" : "text-xs") }, item.label),
|
|
1239
1239
|
item.isExternal && /* @__PURE__ */ React12.createElement(
|
|
1240
1240
|
"svg",
|
|
1241
1241
|
{
|
|
@@ -1258,8 +1258,6 @@ var NavigationItemComponent = ({
|
|
|
1258
1258
|
);
|
|
1259
1259
|
};
|
|
1260
1260
|
var NavigationItem_default = NavigationItemComponent;
|
|
1261
|
-
|
|
1262
|
-
// src/navigation/Navigation.tsx
|
|
1263
1261
|
var Navigation = ({
|
|
1264
1262
|
config,
|
|
1265
1263
|
isOpen,
|
|
@@ -1278,12 +1276,12 @@ var Navigation = ({
|
|
|
1278
1276
|
`;
|
|
1279
1277
|
if (direction === "vertical") {
|
|
1280
1278
|
const verticalClasses = "h-screen w-64 flex flex-col";
|
|
1281
|
-
const positionClasses = position === "left" ?
|
|
1282
|
-
return
|
|
1279
|
+
const positionClasses = position === "left" ? "left-0 top-0 " + (isOpen ? "translate-x-0" : "-translate-x-full") : "right-0 top-0 " + (isOpen ? "translate-x-0" : "translate-x-full");
|
|
1280
|
+
return baseClasses + " " + verticalClasses + " " + positionClasses;
|
|
1283
1281
|
} else {
|
|
1284
1282
|
const horizontalClasses = "w-full h-16 flex items-center";
|
|
1285
|
-
const positionClasses = position === "top" ?
|
|
1286
|
-
return
|
|
1283
|
+
const positionClasses = position === "top" ? "top-0 left-0 right-0 " + (isOpen ? "translate-y-0" : "-translate-y-full") : "bottom-0 left-0 right-0 " + (isOpen ? "translate-y-0" : "translate-y-full");
|
|
1284
|
+
return baseClasses + " " + horizontalClasses + " " + positionClasses;
|
|
1287
1285
|
}
|
|
1288
1286
|
};
|
|
1289
1287
|
const getContentClasses = () => {
|
|
@@ -1314,7 +1312,7 @@ var Navigation = ({
|
|
|
1314
1312
|
onItemClick?.(item);
|
|
1315
1313
|
};
|
|
1316
1314
|
if (!isOpen) return null;
|
|
1317
|
-
return /* @__PURE__ */ React12.createElement("nav", { className:
|
|
1315
|
+
return /* @__PURE__ */ React12.createElement("nav", { className: clsx(getContainerClasses(), className) }, /* @__PURE__ */ React12.createElement("div", { className: getContentClasses() }, logo && /* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-center mb-4" }, /* @__PURE__ */ React12.createElement(
|
|
1318
1316
|
"img",
|
|
1319
1317
|
{
|
|
1320
1318
|
src: logo.src,
|
|
@@ -1370,44 +1368,36 @@ var NavigationToggle = ({
|
|
|
1370
1368
|
"button",
|
|
1371
1369
|
{
|
|
1372
1370
|
onClick,
|
|
1373
|
-
className:
|
|
1374
|
-
fixed
|
|
1375
|
-
|
|
1376
|
-
bg-white/90 backdrop-blur-md
|
|
1377
|
-
|
|
1378
|
-
border border-gray-200/50
|
|
1379
|
-
transition-all duration-300 ease-in-out
|
|
1380
|
-
hover:scale-105 active:scale-95
|
|
1381
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
1382
|
-
`,
|
|
1371
|
+
className: clsx(
|
|
1372
|
+
"fixed",
|
|
1373
|
+
getPositionClasses(),
|
|
1374
|
+
"z-[100] p-3 rounded-xl bg-white/90 backdrop-blur-md shadow-lg hover:shadow-xl border border-gray-200/50 transition-all duration-300 ease-in-out hover:scale-105 active:scale-95 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
|
|
1375
|
+
),
|
|
1383
1376
|
"aria-label": isOpen ? "\u5173\u95ED\u5BFC\u822A\u680F" : "\u6253\u5F00\u5BFC\u822A\u680F"
|
|
1384
1377
|
},
|
|
1385
1378
|
/* @__PURE__ */ React12.createElement("div", { className: "w-5 h-5 flex flex-col justify-center items-center" }, /* @__PURE__ */ React12.createElement(
|
|
1386
1379
|
"span",
|
|
1387
1380
|
{
|
|
1388
|
-
className:
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
`
|
|
1381
|
+
className: clsx(
|
|
1382
|
+
"block w-5 h-0.5 bg-gray-600 rounded-full transform transition-all duration-300 ease-in-out",
|
|
1383
|
+
isOpen ? "rotate-45 translate-y-0.5" : ""
|
|
1384
|
+
)
|
|
1393
1385
|
}
|
|
1394
1386
|
), /* @__PURE__ */ React12.createElement(
|
|
1395
1387
|
"span",
|
|
1396
1388
|
{
|
|
1397
|
-
className:
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
`
|
|
1389
|
+
className: clsx(
|
|
1390
|
+
"block w-5 h-0.5 bg-gray-600 rounded-full transform transition-all duration-300 ease-in-out mt-1",
|
|
1391
|
+
isOpen ? "opacity-0 scale-0" : "opacity-100 scale-100"
|
|
1392
|
+
)
|
|
1402
1393
|
}
|
|
1403
1394
|
), /* @__PURE__ */ React12.createElement(
|
|
1404
1395
|
"span",
|
|
1405
1396
|
{
|
|
1406
|
-
className:
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
`
|
|
1397
|
+
className: clsx(
|
|
1398
|
+
"block w-5 h-0.5 bg-gray-600 rounded-full transform transition-all duration-300 ease-in-out mt-1",
|
|
1399
|
+
isOpen ? "-rotate-45 -translate-y-2.5" : ""
|
|
1400
|
+
)
|
|
1411
1401
|
}
|
|
1412
1402
|
))
|
|
1413
1403
|
);
|
|
@@ -1553,26 +1543,20 @@ var FloatingMenu = ({
|
|
|
1553
1543
|
"div",
|
|
1554
1544
|
{
|
|
1555
1545
|
ref: containerRef,
|
|
1556
|
-
className:
|
|
1546
|
+
className: clsx("fixed select-none box-border", className),
|
|
1557
1547
|
style: {
|
|
1558
|
-
left:
|
|
1559
|
-
top:
|
|
1548
|
+
left: position.x + "px",
|
|
1549
|
+
top: position.y + "px",
|
|
1560
1550
|
zIndex
|
|
1561
1551
|
}
|
|
1562
1552
|
},
|
|
1563
1553
|
/* @__PURE__ */ React12.createElement(
|
|
1564
1554
|
"div",
|
|
1565
1555
|
{
|
|
1566
|
-
className:
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
shadow-md hover:shadow-lg
|
|
1571
|
-
cursor-grab active:cursor-grabbing
|
|
1572
|
-
transition-all duration-200
|
|
1573
|
-
hover:scale-105 active:scale-95
|
|
1574
|
-
${triggerClassName}
|
|
1575
|
-
`,
|
|
1556
|
+
className: clsx(
|
|
1557
|
+
"flex items-center justify-center w-12 h-12 md:w-12 md:h-12 bg-white rounded-full shadow-md hover:shadow-lg cursor-grab active:cursor-grabbing transition-all duration-200 hover:scale-105 active:scale-95",
|
|
1558
|
+
triggerClassName
|
|
1559
|
+
),
|
|
1576
1560
|
onMouseDown: handleMouseDown,
|
|
1577
1561
|
onClick: toggleMenu
|
|
1578
1562
|
},
|
|
@@ -1581,16 +1565,12 @@ var FloatingMenu = ({
|
|
|
1581
1565
|
isMenuOpen && /* @__PURE__ */ React12.createElement(
|
|
1582
1566
|
"div",
|
|
1583
1567
|
{
|
|
1584
|
-
className:
|
|
1585
|
-
absolute top-0
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
${isMenuOpen ? "opacity-100 scale-100" : "opacity-0 scale-95"}
|
|
1591
|
-
${menuDirection === "left" ? "right-[calc(100%+10px)]" : "left-[calc(100%+10px)]"}
|
|
1592
|
-
${menuClassName}
|
|
1593
|
-
`,
|
|
1568
|
+
className: clsx(
|
|
1569
|
+
"absolute top-0 bg-white rounded-lg shadow-xl p-3 min-w-[200px] md:min-w-[200px] max-w-[300px] z-[1000] transition-all duration-200",
|
|
1570
|
+
isMenuOpen ? "opacity-100 scale-100" : "opacity-0 scale-95",
|
|
1571
|
+
menuDirection === "left" ? "right-[calc(100%+10px)]" : "left-[calc(100%+10px)]",
|
|
1572
|
+
menuClassName
|
|
1573
|
+
),
|
|
1594
1574
|
onClick: (e) => e.stopPropagation(),
|
|
1595
1575
|
onMouseDown: (e) => e.stopPropagation(),
|
|
1596
1576
|
onMouseUp: (e) => e.stopPropagation(),
|
|
@@ -1623,7 +1603,7 @@ var FloatingMenuExample = () => {
|
|
|
1623
1603
|
{ id: 5, label: "\u9000\u51FA", icon: "\u{1F6AA}" }
|
|
1624
1604
|
];
|
|
1625
1605
|
const handleMenuItemClick = (id) => {
|
|
1626
|
-
console.log(
|
|
1606
|
+
console.log("\u70B9\u51FB\u4E86\u83DC\u5355\u9879: " + id);
|
|
1627
1607
|
};
|
|
1628
1608
|
return /* @__PURE__ */ React12.createElement("div", { className: "w-full h-screen bg-gray-100 relative p-8" }, /* @__PURE__ */ React12.createElement("div", { className: "max-w-2xl mx-auto bg-white rounded-2xl shadow-sm p-8 mt-12" }, /* @__PURE__ */ React12.createElement("h1", { className: "text-3xl font-bold mb-4 text-gray-900" }, "\u60AC\u6D6E\u83DC\u5355\u793A\u4F8B"), /* @__PURE__ */ React12.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.createElement("span", { className: "font-bold text-blue-600" }, "\u84DD\u8272\u6309\u94AE"), " \u5230\u5904\u79FB\u52A8\u3002"), /* @__PURE__ */ React12.createElement("div", { className: "bg-blue-50 border-l-4 border-blue-500 p-4 mb-6" }, /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-blue-700" }, /* @__PURE__ */ React12.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.createElement(
|
|
1629
1609
|
FloatingMenu_default,
|
|
@@ -1949,7 +1929,7 @@ function ExperimentItemGrid({
|
|
|
1949
1929
|
return /* @__PURE__ */ React12.createElement(ExperimentGrid, { items: experiments, ...props });
|
|
1950
1930
|
}
|
|
1951
1931
|
var EmptyState = ({ searchQuery, onClearSearch, className }) => {
|
|
1952
|
-
return /* @__PURE__ */ React12.createElement("div", { className:
|
|
1932
|
+
return /* @__PURE__ */ React12.createElement("div", { className: clsx("text-center py-12", className) }, /* @__PURE__ */ React12.createElement(
|
|
1953
1933
|
"svg",
|
|
1954
1934
|
{
|
|
1955
1935
|
className: "mx-auto h-12 w-12 text-gray-400",
|
|
@@ -1992,7 +1972,7 @@ var SortControl = ({
|
|
|
1992
1972
|
"button",
|
|
1993
1973
|
{
|
|
1994
1974
|
key: option.value,
|
|
1995
|
-
className:
|
|
1975
|
+
className: clsx("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"),
|
|
1996
1976
|
onClick: () => onSortByChange(option.value)
|
|
1997
1977
|
},
|
|
1998
1978
|
option.label
|
|
@@ -2009,14 +1989,14 @@ var SortModeToggle = ({ sortMode, onSortModeChange }) => {
|
|
|
2009
1989
|
return /* @__PURE__ */ React12.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.createElement("span", { className: "text-sm font-medium text-gray-700" }, "\u6392\u5E8F\u6A21\u5F0F\uFF1A"), /* @__PURE__ */ React12.createElement("div", { className: "flex w-full sm:w-auto p-1 bg-gray-100 rounded-lg" }, /* @__PURE__ */ React12.createElement(
|
|
2010
1990
|
"button",
|
|
2011
1991
|
{
|
|
2012
|
-
className:
|
|
1992
|
+
className: clsx("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"),
|
|
2013
1993
|
onClick: () => onSortModeChange("auto")
|
|
2014
1994
|
},
|
|
2015
1995
|
/* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-center sm:justify-start space-x-1" }, /* @__PURE__ */ React12.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.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" })), /* @__PURE__ */ React12.createElement("span", null, "\u81EA\u52A8\u6392\u5E8F"))
|
|
2016
1996
|
), /* @__PURE__ */ React12.createElement(
|
|
2017
1997
|
"button",
|
|
2018
1998
|
{
|
|
2019
|
-
className:
|
|
1999
|
+
className: clsx("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"),
|
|
2020
2000
|
onClick: () => onSortModeChange("manual")
|
|
2021
2001
|
},
|
|
2022
2002
|
/* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-center sm:justify-start space-x-1" }, /* @__PURE__ */ React12.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.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.createElement("span", null, "\u624B\u52A8\u6392\u5E8F"))
|
|
@@ -2071,11 +2051,10 @@ var SortableExperimentItem = ({
|
|
|
2071
2051
|
onMoveUp?.();
|
|
2072
2052
|
},
|
|
2073
2053
|
disabled: isFirst,
|
|
2074
|
-
className:
|
|
2075
|
-
${isFirst ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"}`,
|
|
2054
|
+
className: clsx("w-8 h-8 rounded-full flex items-center justify-center shadow-md", isFirst ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"),
|
|
2076
2055
|
"aria-label": "\u5411\u4E0A\u79FB\u52A8"
|
|
2077
2056
|
},
|
|
2078
|
-
/* @__PURE__ */ React12.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className:
|
|
2057
|
+
/* @__PURE__ */ React12.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: clsx("h-5 w-5", isFirst ? "text-gray-400" : "text-gray-500"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 15l7-7 7 7" }))
|
|
2079
2058
|
), /* @__PURE__ */ React12.createElement(
|
|
2080
2059
|
"button",
|
|
2081
2060
|
{
|
|
@@ -2084,13 +2063,12 @@ var SortableExperimentItem = ({
|
|
|
2084
2063
|
onMoveDown?.();
|
|
2085
2064
|
},
|
|
2086
2065
|
disabled: isLast,
|
|
2087
|
-
className:
|
|
2088
|
-
${isLast ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"}`,
|
|
2066
|
+
className: clsx("w-8 h-8 rounded-full flex items-center justify-center shadow-md", isLast ? "bg-gray-200 cursor-not-allowed" : "bg-white/80 hover:bg-white active:bg-gray-100"),
|
|
2089
2067
|
"aria-label": "\u5411\u4E0B\u79FB\u52A8"
|
|
2090
2068
|
},
|
|
2091
|
-
/* @__PURE__ */ React12.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className:
|
|
2069
|
+
/* @__PURE__ */ React12.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: clsx("h-5 w-5", isLast ? "text-gray-400" : "text-gray-500"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React12.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
2092
2070
|
)),
|
|
2093
|
-
/* @__PURE__ */ React12.createElement("div", { className:
|
|
2071
|
+
/* @__PURE__ */ React12.createElement("div", { className: clsx("transition-all", isDragging ? "scale-105 shadow-xl" : "") }, /* @__PURE__ */ React12.createElement(
|
|
2094
2072
|
ExperimentCard,
|
|
2095
2073
|
{
|
|
2096
2074
|
href: item.path,
|
|
@@ -2172,7 +2150,7 @@ var DraggableExperimentGrid = ({
|
|
|
2172
2150
|
React12.useEffect(() => {
|
|
2173
2151
|
setItems(initialItems);
|
|
2174
2152
|
}, [initialItems]);
|
|
2175
|
-
return /* @__PURE__ */ React12.createElement("div", { className:
|
|
2153
|
+
return /* @__PURE__ */ React12.createElement("div", { className: clsx("relative", className) }, /* @__PURE__ */ React12.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.createElement("div", { className: "flex items-start sm:items-center" }, /* @__PURE__ */ React12.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.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.createElement("div", null, /* @__PURE__ */ React12.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.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.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.createElement(
|
|
2176
2154
|
DndContext,
|
|
2177
2155
|
{
|
|
2178
2156
|
sensors,
|
|
@@ -2186,10 +2164,7 @@ var DraggableExperimentGrid = ({
|
|
|
2186
2164
|
items: items.map((item) => item.id),
|
|
2187
2165
|
strategy: rectSortingStrategy
|
|
2188
2166
|
},
|
|
2189
|
-
/* @__PURE__ */ React12.createElement("div", { className:
|
|
2190
|
-
grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 md:gap-6
|
|
2191
|
-
${isDragging ? "cursor-grabbing" : ""}
|
|
2192
|
-
` }, items.map((item, index) => /* @__PURE__ */ React12.createElement(
|
|
2167
|
+
/* @__PURE__ */ React12.createElement("div", { className: clsx("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 md:gap-6", isDragging ? "cursor-grabbing" : "") }, items.map((item, index) => /* @__PURE__ */ React12.createElement(
|
|
2193
2168
|
SortableExperimentItem,
|
|
2194
2169
|
{
|
|
2195
2170
|
key: item.id,
|