@algenium/blocks 1.2.1 → 1.3.0-rc.1
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/index.cjs +46 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +46 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5015,7 +5015,9 @@ function NotificationsWidget({
|
|
|
5015
5015
|
soundType = "chime",
|
|
5016
5016
|
pulseStyle = "ring",
|
|
5017
5017
|
soundCooldown = 2e3,
|
|
5018
|
-
buttonVariant = "default"
|
|
5018
|
+
buttonVariant = "default",
|
|
5019
|
+
viewAllHref,
|
|
5020
|
+
viewAllLabel = "View all"
|
|
5019
5021
|
}) {
|
|
5020
5022
|
const context = useNotificationsContext();
|
|
5021
5023
|
const notifications = propNotifications ?? context?.notifications ?? [];
|
|
@@ -5260,9 +5262,19 @@ function NotificationsWidget({
|
|
|
5260
5262
|
}
|
|
5261
5263
|
) })
|
|
5262
5264
|
] }),
|
|
5263
|
-
sortedNotifications.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5264
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5265
|
-
|
|
5265
|
+
sortedNotifications.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5266
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
|
|
5267
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "w-6 h-6 text-muted-foreground" }) }),
|
|
5268
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: emptyMessage })
|
|
5269
|
+
] }),
|
|
5270
|
+
viewAllHref && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center px-4 py-2 border-t border-border bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5271
|
+
"a",
|
|
5272
|
+
{
|
|
5273
|
+
href: viewAllHref,
|
|
5274
|
+
className: "text-xs text-primary hover:underline font-medium",
|
|
5275
|
+
children: viewAllLabel
|
|
5276
|
+
}
|
|
5277
|
+
) })
|
|
5266
5278
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5267
5279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5268
5280
|
"div",
|
|
@@ -5325,7 +5337,7 @@ function NotificationsWidget({
|
|
|
5325
5337
|
children: notification.title
|
|
5326
5338
|
}
|
|
5327
5339
|
) }),
|
|
5328
|
-
notification.message && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground
|
|
5340
|
+
notification.message && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: notification.message }),
|
|
5329
5341
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-muted-foreground/70 mt-1", children: formatTimeAgo(notification.timestamp) })
|
|
5330
5342
|
] }),
|
|
5331
5343
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 flex items-start gap-1 opacity-0 group-hover:opacity-100 transition-opacity", children: onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5348,25 +5360,35 @@ function NotificationsWidget({
|
|
|
5348
5360
|
}) })
|
|
5349
5361
|
}
|
|
5350
5362
|
),
|
|
5351
|
-
(hasMore || onClearAll) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-t border-border bg-muted/30", children: [
|
|
5352
|
-
hasMore && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
5363
|
+
(hasMore || onClearAll || viewAllHref) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-t border-border bg-muted/30", children: [
|
|
5364
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: hasMore && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
5353
5365
|
"+",
|
|
5354
5366
|
sortedNotifications.length - maxVisible,
|
|
5355
5367
|
" more"
|
|
5356
|
-
] }),
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5368
|
+
] }) }),
|
|
5369
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5370
|
+
viewAllHref && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5371
|
+
"a",
|
|
5372
|
+
{
|
|
5373
|
+
href: viewAllHref,
|
|
5374
|
+
className: "text-xs text-primary hover:underline font-medium",
|
|
5375
|
+
children: viewAllLabel
|
|
5376
|
+
}
|
|
5377
|
+
),
|
|
5378
|
+
onClearAll && sortedNotifications.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5379
|
+
Button,
|
|
5380
|
+
{
|
|
5381
|
+
variant: "ghost",
|
|
5382
|
+
size: "sm",
|
|
5383
|
+
className: "h-7 px-2 text-xs text-muted-foreground hover:text-destructive",
|
|
5384
|
+
onClick: () => onClearAll(),
|
|
5385
|
+
children: [
|
|
5386
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3 h-3 mr-1" }),
|
|
5387
|
+
"Clear all"
|
|
5388
|
+
]
|
|
5389
|
+
}
|
|
5390
|
+
)
|
|
5391
|
+
] })
|
|
5370
5392
|
] })
|
|
5371
5393
|
] })
|
|
5372
5394
|
]
|
|
@@ -6825,7 +6847,7 @@ function ChatSidebar({
|
|
|
6825
6847
|
} = useChatSidebar();
|
|
6826
6848
|
React2.useEffect(() => {
|
|
6827
6849
|
if (!isOpen || typeof window === "undefined") return;
|
|
6828
|
-
const mq = window.matchMedia("(max-width:
|
|
6850
|
+
const mq = window.matchMedia("(max-width: 767px)");
|
|
6829
6851
|
const apply = () => {
|
|
6830
6852
|
if (mq.matches) document.body.style.overflow = "hidden";
|
|
6831
6853
|
else document.body.style.overflow = "";
|
|
@@ -6853,7 +6875,7 @@ function ChatSidebar({
|
|
|
6853
6875
|
className: cn(
|
|
6854
6876
|
"flex min-h-0 flex-col bg-background",
|
|
6855
6877
|
"fixed top-[var(--sidebar-top)] right-0 bottom-0 left-0 z-[100] w-full max-w-none border-0 shadow-none",
|
|
6856
|
-
"
|
|
6878
|
+
"md:relative md:inset-auto md:z-auto md:h-full md:w-[360px] md:max-w-[360px] md:shrink-0 md:border-l md:shadow-none xl:w-[400px] xl:max-w-[400px]",
|
|
6857
6879
|
className
|
|
6858
6880
|
),
|
|
6859
6881
|
children: view === "list" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -6953,7 +6975,7 @@ function ChatSidebar({
|
|
|
6953
6975
|
"div",
|
|
6954
6976
|
{
|
|
6955
6977
|
style: cssVars,
|
|
6956
|
-
className: "fixed top-[var(--sidebar-top)] right-0 bottom-0 left-0 z-[90] bg-black/50
|
|
6978
|
+
className: "fixed top-[var(--sidebar-top)] right-0 bottom-0 left-0 z-[90] bg-black/50 md:hidden",
|
|
6957
6979
|
"aria-hidden": true,
|
|
6958
6980
|
onClick: close
|
|
6959
6981
|
}
|