@underverse-ui/underverse 1.0.84 → 1.0.85
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/api-reference.json +1 -1
- package/dist/index.cjs +134 -108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +134 -108
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5493,9 +5493,10 @@ var ToastComponent = ({ toast, onRemove }) => {
|
|
|
5493
5493
|
"div",
|
|
5494
5494
|
{
|
|
5495
5495
|
className: cn(
|
|
5496
|
-
"relative w-80 rounded-xl border backdrop-blur-md transition-all duration-300 pointer-events-auto
|
|
5496
|
+
"relative w-80 rounded-xl border backdrop-blur-md transition-all duration-300 pointer-events-auto",
|
|
5497
5497
|
"bg-card shadow-xl",
|
|
5498
5498
|
"animate-in slide-in-from-right-full",
|
|
5499
|
+
toast.overflowHidden !== false && "overflow-hidden",
|
|
5499
5500
|
config.containerClassName,
|
|
5500
5501
|
isVisible ? "opacity-100 translate-x-0" : "opacity-0 translate-x-full"
|
|
5501
5502
|
),
|
|
@@ -6341,7 +6342,18 @@ var variantConfig = {
|
|
|
6341
6342
|
accentBarClassName: "bg-destructive"
|
|
6342
6343
|
}
|
|
6343
6344
|
};
|
|
6344
|
-
var Alert = ({
|
|
6345
|
+
var Alert = ({
|
|
6346
|
+
title,
|
|
6347
|
+
description,
|
|
6348
|
+
variant = "default",
|
|
6349
|
+
className,
|
|
6350
|
+
icon,
|
|
6351
|
+
dismissible = false,
|
|
6352
|
+
onClose,
|
|
6353
|
+
actions,
|
|
6354
|
+
closeAriaLabel,
|
|
6355
|
+
overflowHidden = true
|
|
6356
|
+
}) => {
|
|
6345
6357
|
const [open, setOpen] = (0, import_react12.useState)(true);
|
|
6346
6358
|
const t = useSmartTranslations("Common");
|
|
6347
6359
|
if (!open) return null;
|
|
@@ -6355,9 +6367,10 @@ var Alert = ({ title, description, variant = "default", className, icon, dismiss
|
|
|
6355
6367
|
"div",
|
|
6356
6368
|
{
|
|
6357
6369
|
className: cn(
|
|
6358
|
-
"relative w-full rounded-r-xl border border-l-0
|
|
6370
|
+
"relative w-full rounded-r-xl border border-l-0",
|
|
6359
6371
|
"flex items-start gap-3 p-4 pl-5",
|
|
6360
6372
|
"backdrop-blur-md",
|
|
6373
|
+
overflowHidden && "overflow-hidden",
|
|
6361
6374
|
config.containerClassName,
|
|
6362
6375
|
className
|
|
6363
6376
|
),
|
|
@@ -13737,6 +13750,7 @@ function CalendarTimeline({
|
|
|
13737
13750
|
dayEventMaxWidth,
|
|
13738
13751
|
monthEventStyle = "span",
|
|
13739
13752
|
monthEventMaxWidth,
|
|
13753
|
+
overflowHidden = true,
|
|
13740
13754
|
dayTimeStepMinutes = 60,
|
|
13741
13755
|
enableEventTooltips = true,
|
|
13742
13756
|
dayHeaderMode = "full",
|
|
@@ -14799,9 +14813,10 @@ function CalendarTimeline({
|
|
|
14799
14813
|
"div",
|
|
14800
14814
|
{
|
|
14801
14815
|
className: cn(
|
|
14802
|
-
"rounded-2xl md:rounded-3xl
|
|
14816
|
+
"rounded-2xl md:rounded-3xl bg-card text-card-foreground backdrop-blur-sm",
|
|
14803
14817
|
"border border-border/50 shadow-sm md:hover:shadow-md",
|
|
14804
14818
|
"transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
|
|
14819
|
+
overflowHidden && "overflow-hidden",
|
|
14805
14820
|
densityClass,
|
|
14806
14821
|
className
|
|
14807
14822
|
),
|
|
@@ -20349,7 +20364,8 @@ var MusicPlayer = ({
|
|
|
20349
20364
|
playlist = DEFAULT_PLAYLIST,
|
|
20350
20365
|
autoPlay = false,
|
|
20351
20366
|
showPlaylist: initialShowPlaylist = true,
|
|
20352
|
-
className = ""
|
|
20367
|
+
className = "",
|
|
20368
|
+
overflowHidden = true
|
|
20353
20369
|
}) => {
|
|
20354
20370
|
const [currentSongIndex, setCurrentSongIndex] = (0, import_react26.useState)(0);
|
|
20355
20371
|
const [isPlaying, setIsPlaying] = (0, import_react26.useState)(false);
|
|
@@ -20451,108 +20467,116 @@ var MusicPlayer = ({
|
|
|
20451
20467
|
}
|
|
20452
20468
|
}
|
|
20453
20469
|
}, [currentSongIndex, currentSong.startTime, isPlaying]);
|
|
20454
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
]
|
|
20462
|
-
|
|
20463
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20464
|
-
|
|
20465
|
-
{
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20484
|
-
|
|
20485
|
-
|
|
20486
|
-
}
|
|
20487
|
-
|
|
20488
|
-
|
|
20489
|
-
|
|
20490
|
-
|
|
20491
|
-
|
|
20492
|
-
|
|
20493
|
-
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
|
|
20518
|
-
|
|
20519
|
-
|
|
20520
|
-
|
|
20521
|
-
|
|
20522
|
-
|
|
20523
|
-
|
|
20524
|
-
|
|
20525
|
-
|
|
20526
|
-
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
{
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
20471
|
+
"div",
|
|
20472
|
+
{
|
|
20473
|
+
className: [
|
|
20474
|
+
"underverse-music-player bg-card dark:bg-card border border-border/50 rounded-2xl shadow-2xl",
|
|
20475
|
+
overflowHidden ? "overflow-hidden" : "",
|
|
20476
|
+
className
|
|
20477
|
+
].filter(Boolean).join(" "),
|
|
20478
|
+
children: [
|
|
20479
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("audio", { ref: audioRef, src: currentSong.audioUrl, onTimeUpdate: handleTimeUpdate, onLoadedMetadata: handleLoadedMetadata, onEnded: playNext }),
|
|
20480
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "p-6", children: [
|
|
20481
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "text-center mb-6", children: [
|
|
20482
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "w-48 h-48 mx-auto mb-4 bg-primary/10 dark:bg-primary/20 border border-primary/30 rounded-2xl shadow-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-6xl", children: "\u{1F3B5}" }) }),
|
|
20483
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "text-2xl font-bold text-foreground mb-1", children: currentSong.title }),
|
|
20484
|
+
currentSong.artist && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-muted-foreground", children: currentSong.artist })
|
|
20485
|
+
] }),
|
|
20486
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mb-4", children: [
|
|
20487
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20488
|
+
"input",
|
|
20489
|
+
{
|
|
20490
|
+
type: "range",
|
|
20491
|
+
min: "0",
|
|
20492
|
+
max: duration || 0,
|
|
20493
|
+
value: currentTime,
|
|
20494
|
+
onChange: handleSeek,
|
|
20495
|
+
className: "w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider"
|
|
20496
|
+
}
|
|
20497
|
+
),
|
|
20498
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex justify-between text-sm text-muted-foreground mt-1", children: [
|
|
20499
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: formatTime3(currentTime) }),
|
|
20500
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: formatTime3(duration) })
|
|
20501
|
+
] })
|
|
20502
|
+
] }),
|
|
20503
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center justify-center gap-4 mb-6", children: [
|
|
20504
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20505
|
+
"button",
|
|
20506
|
+
{
|
|
20507
|
+
onClick: playPrevious,
|
|
20508
|
+
className: "w-12 h-12 flex items-center justify-center rounded-full bg-secondary hover:bg-secondary/80 transition-colors text-secondary-foreground",
|
|
20509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.SkipBack, { size: 24 })
|
|
20510
|
+
}
|
|
20511
|
+
),
|
|
20512
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20513
|
+
"button",
|
|
20514
|
+
{
|
|
20515
|
+
onClick: togglePlay,
|
|
20516
|
+
className: "w-16 h-16 flex items-center justify-center rounded-full bg-primary hover:bg-primary/90 transition-colors text-primary-foreground shadow-lg",
|
|
20517
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Pause, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Play, { size: 32, className: "ml-1" })
|
|
20518
|
+
}
|
|
20519
|
+
),
|
|
20520
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20521
|
+
"button",
|
|
20522
|
+
{
|
|
20523
|
+
onClick: playNext,
|
|
20524
|
+
className: "w-12 h-12 flex items-center justify-center rounded-full bg-secondary hover:bg-secondary/80 transition-colors text-secondary-foreground",
|
|
20525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.SkipForward, { size: 24 })
|
|
20526
|
+
}
|
|
20527
|
+
)
|
|
20528
|
+
] }),
|
|
20529
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
20530
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("button", { onClick: toggleMute, className: "text-foreground hover:text-primary transition-colors", children: isMuted || volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.VolumeX, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Volume2, { size: 20 }) }),
|
|
20531
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
20532
|
+
"input",
|
|
20533
|
+
{
|
|
20534
|
+
type: "range",
|
|
20535
|
+
min: "0",
|
|
20536
|
+
max: "1",
|
|
20537
|
+
step: "0.01",
|
|
20538
|
+
value: volume,
|
|
20539
|
+
onChange: handleVolumeChange,
|
|
20540
|
+
className: "flex-1 h-2 bg-muted rounded-lg appearance-none cursor-pointer"
|
|
20541
|
+
}
|
|
20542
|
+
)
|
|
20543
|
+
] }),
|
|
20544
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
20545
|
+
"button",
|
|
20546
|
+
{
|
|
20547
|
+
onClick: () => setShowPlaylist(!showPlaylist),
|
|
20548
|
+
className: "flex items-center gap-2 px-4 py-2 bg-secondary hover:bg-secondary/80 rounded-lg text-secondary-foreground transition-colors",
|
|
20549
|
+
children: [
|
|
20550
|
+
showPlaylist ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.X, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.List, { size: 20 }),
|
|
20551
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: showPlaylist ? "Hide Playlist" : "Show Playlist" })
|
|
20552
|
+
]
|
|
20553
|
+
}
|
|
20554
|
+
) })
|
|
20555
|
+
] }),
|
|
20556
|
+
showPlaylist && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bg-muted/50 backdrop-blur-sm max-h-96 overflow-y-auto border-t border-border/50", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "p-4", children: [
|
|
20557
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("h3", { className: "text-lg font-semibold text-foreground mb-3", children: [
|
|
20558
|
+
"Playlist (",
|
|
20559
|
+
playlist.length,
|
|
20560
|
+
" songs)"
|
|
20561
|
+
] }),
|
|
20562
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "space-y-2", children: playlist.map((song, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
20563
|
+
"div",
|
|
20564
|
+
{
|
|
20565
|
+
onClick: () => playSong(index),
|
|
20566
|
+
className: `flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all ${index === currentSongIndex ? "bg-primary/20 border border-primary shadow-lg" : "bg-secondary/30 hover:bg-secondary/50"}`,
|
|
20567
|
+
children: [
|
|
20568
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "shrink-0 w-8 h-8 flex items-center justify-center rounded-full bg-primary text-primary-foreground text-sm font-semibold", children: index === currentSongIndex && isPlaying ? "\u25B6" : index + 1 }),
|
|
20569
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
20570
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-foreground font-medium truncate", children: song.title }),
|
|
20571
|
+
song.artist && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-muted-foreground text-sm truncate", children: song.artist })
|
|
20572
|
+
] }),
|
|
20573
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-muted-foreground text-sm shrink-0", children: song.duration })
|
|
20574
|
+
]
|
|
20575
|
+
},
|
|
20576
|
+
song.id
|
|
20577
|
+
)) })
|
|
20578
|
+
] }) }),
|
|
20579
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("style", { children: `
|
|
20556
20580
|
.underverse-music-player input[type="range"]::-webkit-slider-thumb {
|
|
20557
20581
|
-webkit-appearance: none;
|
|
20558
20582
|
appearance: none;
|
|
@@ -20578,7 +20602,9 @@ var MusicPlayer = ({
|
|
|
20578
20602
|
background: linear-gradient(to right, hsl(var(--primary)) var(--progress, 0%), hsl(var(--muted)) var(--progress, 0%));
|
|
20579
20603
|
}
|
|
20580
20604
|
` })
|
|
20581
|
-
|
|
20605
|
+
]
|
|
20606
|
+
}
|
|
20607
|
+
);
|
|
20582
20608
|
};
|
|
20583
20609
|
var MusicPlayer_default = MusicPlayer;
|
|
20584
20610
|
|