@vantageos/mosaic-blocks 0.3.6-alpha → 0.4.0-alpha
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 +944 -530
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +665 -112
- package/dist/index.d.ts +665 -112
- package/dist/index.js +943 -531
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
|
|
|
46
46
|
var React27__namespace = /*#__PURE__*/_interopNamespace(React27);
|
|
47
47
|
|
|
48
48
|
// src/version.ts
|
|
49
|
-
var version = "0.
|
|
49
|
+
var version = "0.4.0-alpha";
|
|
50
50
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
51
51
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
52
52
|
}
|
|
@@ -167,7 +167,16 @@ MosaicSkeleton.displayName = "MosaicSkeleton";
|
|
|
167
167
|
function cn3(...classes) {
|
|
168
168
|
return classes.filter(Boolean).join(" ");
|
|
169
169
|
}
|
|
170
|
-
function MosaicNavbar({
|
|
170
|
+
function MosaicNavbar({
|
|
171
|
+
logo,
|
|
172
|
+
links,
|
|
173
|
+
cta,
|
|
174
|
+
navAriaLabel,
|
|
175
|
+
openMenuAriaLabel,
|
|
176
|
+
closeMenuAriaLabel,
|
|
177
|
+
className,
|
|
178
|
+
ref
|
|
179
|
+
}) {
|
|
171
180
|
const [isScrolled, setIsScrolled] = React27__namespace.useState(false);
|
|
172
181
|
const [isHidden, setIsHidden] = React27__namespace.useState(false);
|
|
173
182
|
const [isOpen, setIsOpen] = React27__namespace.useState(false);
|
|
@@ -197,7 +206,7 @@ function MosaicNavbar({ logo, links, cta, className, ref }) {
|
|
|
197
206
|
"nav",
|
|
198
207
|
{
|
|
199
208
|
ref,
|
|
200
|
-
"aria-label":
|
|
209
|
+
"aria-label": navAriaLabel,
|
|
201
210
|
className: cn3(
|
|
202
211
|
"fixed left-0 right-0 top-0 z-50 px-4 pt-4 mx-auto w-full max-w-6xl transition-all duration-300 ease-out",
|
|
203
212
|
isHidden ? "opacity-0 -translate-y-5 pointer-events-none" : "opacity-100 translate-y-0",
|
|
@@ -252,7 +261,7 @@ function MosaicNavbar({ logo, links, cta, className, ref }) {
|
|
|
252
261
|
"button",
|
|
253
262
|
{
|
|
254
263
|
type: "button",
|
|
255
|
-
"aria-label": isOpen ?
|
|
264
|
+
"aria-label": isOpen ? closeMenuAriaLabel : openMenuAriaLabel,
|
|
256
265
|
"aria-expanded": isOpen,
|
|
257
266
|
"aria-controls": "mosaic-mobile-menu",
|
|
258
267
|
onClick: () => setIsOpen((v) => !v),
|
|
@@ -770,6 +779,8 @@ function MosaicThemeToggle({
|
|
|
770
779
|
onChange,
|
|
771
780
|
className,
|
|
772
781
|
label,
|
|
782
|
+
switchToLightLabel,
|
|
783
|
+
switchToDarkLabel,
|
|
773
784
|
ref
|
|
774
785
|
}) {
|
|
775
786
|
const [theme, setTheme] = React27__namespace.useState(() => {
|
|
@@ -792,7 +803,7 @@ function MosaicThemeToggle({
|
|
|
792
803
|
applyTheme(next);
|
|
793
804
|
};
|
|
794
805
|
const isDark = theme === "dark" || theme === "system" && typeof window !== "undefined" && getSystemTheme() === "dark";
|
|
795
|
-
const ariaLabel = label ?? (isDark ?
|
|
806
|
+
const ariaLabel = label ?? (isDark ? switchToLightLabel : switchToDarkLabel);
|
|
796
807
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
797
808
|
"button",
|
|
798
809
|
{
|
|
@@ -1085,7 +1096,7 @@ function MosaicFilterBar({
|
|
|
1085
1096
|
label,
|
|
1086
1097
|
children,
|
|
1087
1098
|
onClearAll,
|
|
1088
|
-
clearLabel
|
|
1099
|
+
clearLabel,
|
|
1089
1100
|
align = "start",
|
|
1090
1101
|
className,
|
|
1091
1102
|
ref
|
|
@@ -2032,7 +2043,7 @@ function MosaicSelect({
|
|
|
2032
2043
|
items,
|
|
2033
2044
|
value,
|
|
2034
2045
|
onValueChange,
|
|
2035
|
-
placeholder
|
|
2046
|
+
placeholder,
|
|
2036
2047
|
defaultValue,
|
|
2037
2048
|
disabled,
|
|
2038
2049
|
required,
|
|
@@ -2153,9 +2164,10 @@ function MosaicCombobox({
|
|
|
2153
2164
|
value,
|
|
2154
2165
|
onValueChange,
|
|
2155
2166
|
defaultValue,
|
|
2156
|
-
placeholder
|
|
2167
|
+
placeholder,
|
|
2157
2168
|
disabled,
|
|
2158
2169
|
name,
|
|
2170
|
+
emptyMessage,
|
|
2159
2171
|
className
|
|
2160
2172
|
}) {
|
|
2161
2173
|
const [inputValue, setInputValue] = React27__namespace.useState("");
|
|
@@ -2217,7 +2229,7 @@ function MosaicCombobox({
|
|
|
2217
2229
|
},
|
|
2218
2230
|
item.value
|
|
2219
2231
|
)),
|
|
2220
|
-
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { className: "py-2 text-center text-sm text-muted-foreground", children:
|
|
2232
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { className: "py-2 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
2221
2233
|
] })
|
|
2222
2234
|
}
|
|
2223
2235
|
) }) })
|
|
@@ -2477,7 +2489,8 @@ function MosaicAdaptiveModal({
|
|
|
2477
2489
|
title,
|
|
2478
2490
|
children,
|
|
2479
2491
|
className,
|
|
2480
|
-
description
|
|
2492
|
+
description,
|
|
2493
|
+
closeAriaLabel
|
|
2481
2494
|
}) {
|
|
2482
2495
|
const { isMobile } = useDevice();
|
|
2483
2496
|
const dialogRef = React27__namespace.useRef(null);
|
|
@@ -2582,7 +2595,7 @@ function MosaicAdaptiveModal({
|
|
|
2582
2595
|
{
|
|
2583
2596
|
type: "button",
|
|
2584
2597
|
onClick: onClose,
|
|
2585
|
-
"aria-label":
|
|
2598
|
+
"aria-label": closeAriaLabel,
|
|
2586
2599
|
className: "flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2587
2600
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2588
2601
|
"svg",
|
|
@@ -2660,6 +2673,10 @@ function MosaicAdaptiveNavigation({
|
|
|
2660
2673
|
onItemChange,
|
|
2661
2674
|
expandedItems,
|
|
2662
2675
|
onToggleExpanded,
|
|
2676
|
+
stepNavAriaLabel,
|
|
2677
|
+
tabNavAriaLabel,
|
|
2678
|
+
completeStatusLabel,
|
|
2679
|
+
inProgressStatusLabel,
|
|
2663
2680
|
className,
|
|
2664
2681
|
ref
|
|
2665
2682
|
}) {
|
|
@@ -2671,7 +2688,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2671
2688
|
ref,
|
|
2672
2689
|
"data-slot": "adaptive-navigation",
|
|
2673
2690
|
className: cn39("space-y-3", className),
|
|
2674
|
-
"aria-label":
|
|
2691
|
+
"aria-label": stepNavAriaLabel,
|
|
2675
2692
|
children: items.map((item, idx) => {
|
|
2676
2693
|
const isExpanded = expandedItems?.has(item.id) ?? false;
|
|
2677
2694
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-hidden rounded-lg border border-border", children: [
|
|
@@ -2698,7 +2715,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2698
2715
|
),
|
|
2699
2716
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2700
2717
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-medium text-foreground", children: item.title }),
|
|
2701
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.isComplete ?
|
|
2718
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.isComplete ? completeStatusLabel : inProgressStatusLabel })
|
|
2702
2719
|
] })
|
|
2703
2720
|
] }),
|
|
2704
2721
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
@@ -2723,7 +2740,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2723
2740
|
ref,
|
|
2724
2741
|
"data-slot": "adaptive-navigation",
|
|
2725
2742
|
className: cn39("w-full", className),
|
|
2726
|
-
"aria-label":
|
|
2743
|
+
"aria-label": tabNavAriaLabel,
|
|
2727
2744
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2728
2745
|
"div",
|
|
2729
2746
|
{
|
|
@@ -2923,6 +2940,12 @@ function MosaicAppSidebar({
|
|
|
2923
2940
|
recentItems = [],
|
|
2924
2941
|
logoSlot,
|
|
2925
2942
|
footerStatus,
|
|
2943
|
+
sidebarAriaLabel,
|
|
2944
|
+
mainNavAriaLabel,
|
|
2945
|
+
quickActionsHeading,
|
|
2946
|
+
recentHeading,
|
|
2947
|
+
collapseSidebarAriaLabel,
|
|
2948
|
+
expandSidebarAriaLabel,
|
|
2926
2949
|
className,
|
|
2927
2950
|
ref
|
|
2928
2951
|
}) {
|
|
@@ -2961,7 +2984,7 @@ function MosaicAppSidebar({
|
|
|
2961
2984
|
transition: "width 280ms ease-in-out",
|
|
2962
2985
|
overflow: "hidden"
|
|
2963
2986
|
},
|
|
2964
|
-
"aria-label":
|
|
2987
|
+
"aria-label": sidebarAriaLabel,
|
|
2965
2988
|
children: [
|
|
2966
2989
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-b border-sidebar-border p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2967
2990
|
!isCollapsed && logoSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mosaic-sidebar-label-in flex items-center gap-2 min-w-0", children: logoSlot }),
|
|
@@ -2970,7 +2993,7 @@ function MosaicAppSidebar({
|
|
|
2970
2993
|
{
|
|
2971
2994
|
type: "button",
|
|
2972
2995
|
onClick: onToggleCollapse,
|
|
2973
|
-
"aria-label": isCollapsed ?
|
|
2996
|
+
"aria-label": isCollapsed ? expandSidebarAriaLabel : collapseSidebarAriaLabel,
|
|
2974
2997
|
className: cn40(
|
|
2975
2998
|
"flex h-9 w-9 items-center justify-center rounded-lg transition-colors",
|
|
2976
2999
|
"hover:bg-sidebar-accent text-sidebar-foreground",
|
|
@@ -2982,7 +3005,7 @@ function MosaicAppSidebar({
|
|
|
2982
3005
|
)
|
|
2983
3006
|
] }) }),
|
|
2984
3007
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto p-2", style: { scrollbarWidth: "thin" }, children: [
|
|
2985
|
-
navItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label":
|
|
3008
|
+
navItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": mainNavAriaLabel, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: navItems.map((item) => {
|
|
2986
3009
|
const isActive = activePath === item.href;
|
|
2987
3010
|
const isSubmenuActive = item.submenu?.some((s) => activePath === s.href) ?? false;
|
|
2988
3011
|
const isExpanded = expandedItems.has(item.id);
|
|
@@ -3045,7 +3068,7 @@ function MosaicAppSidebar({
|
|
|
3045
3068
|
] }, item.id);
|
|
3046
3069
|
}) }) }),
|
|
3047
3070
|
!isCollapsed && quickActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6", children: [
|
|
3048
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 px-3 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60", children:
|
|
3071
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 px-3 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60", children: quickActionsHeading }),
|
|
3049
3072
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: quickActions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3050
3073
|
"button",
|
|
3051
3074
|
{
|
|
@@ -3065,7 +3088,7 @@ function MosaicAppSidebar({
|
|
|
3065
3088
|
)) })
|
|
3066
3089
|
] }),
|
|
3067
3090
|
!isCollapsed && recentItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6", children: [
|
|
3068
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 px-3 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60", children:
|
|
3091
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 px-3 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60", children: recentHeading }),
|
|
3069
3092
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: recentItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3070
3093
|
"div",
|
|
3071
3094
|
{
|
|
@@ -3164,14 +3187,18 @@ function ChevronRightIcon2() {
|
|
|
3164
3187
|
}
|
|
3165
3188
|
function MosaicDashboardLayout({
|
|
3166
3189
|
children,
|
|
3167
|
-
title
|
|
3190
|
+
title,
|
|
3168
3191
|
subtitle,
|
|
3169
3192
|
breadcrumbs,
|
|
3170
3193
|
actions,
|
|
3171
|
-
sidebarProps
|
|
3194
|
+
sidebarProps,
|
|
3172
3195
|
defaultSidebarCollapsed = false,
|
|
3173
|
-
mobileSidebarTitle
|
|
3196
|
+
mobileSidebarTitle,
|
|
3174
3197
|
renderLink,
|
|
3198
|
+
headerAriaLabel,
|
|
3199
|
+
openNavigationAriaLabel,
|
|
3200
|
+
breadcrumbAriaLabel,
|
|
3201
|
+
mobileSidebarCloseAriaLabel,
|
|
3175
3202
|
className,
|
|
3176
3203
|
ref
|
|
3177
3204
|
}) {
|
|
@@ -3203,14 +3230,14 @@ function MosaicDashboardLayout({
|
|
|
3203
3230
|
"header",
|
|
3204
3231
|
{
|
|
3205
3232
|
className: "mosaic-dashboard-header sticky top-0 z-40 shrink-0 border-b border-border/50 bg-background/80 backdrop-blur-sm",
|
|
3206
|
-
"aria-label":
|
|
3233
|
+
"aria-label": headerAriaLabel,
|
|
3207
3234
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 p-3 md:p-4", children: [
|
|
3208
3235
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2 md:gap-4", children: [
|
|
3209
3236
|
isMobile && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3210
3237
|
"button",
|
|
3211
3238
|
{
|
|
3212
3239
|
type: "button",
|
|
3213
|
-
"aria-label":
|
|
3240
|
+
"aria-label": openNavigationAriaLabel,
|
|
3214
3241
|
onClick: () => setIsMobileSidebarOpen(true),
|
|
3215
3242
|
className: cn41(
|
|
3216
3243
|
"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg",
|
|
@@ -3223,7 +3250,7 @@ function MosaicDashboardLayout({
|
|
|
3223
3250
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3224
3251
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "truncate text-base font-semibold md:text-lg", children: title }),
|
|
3225
3252
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "hidden truncate text-xs text-muted-foreground md:block md:text-sm", children: subtitle }),
|
|
3226
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label":
|
|
3253
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": breadcrumbAriaLabel, className: "mt-0.5 hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: breadcrumbs.map((crumb, idx) => {
|
|
3227
3254
|
const isLast = idx === breadcrumbs.length - 1;
|
|
3228
3255
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "flex items-center gap-1.5", children: isLast ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-current": "page", className: "font-medium text-foreground", children: crumb.label }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3229
3256
|
crumb.href ? link(crumb.href, crumb.label) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: crumb.label }),
|
|
@@ -3244,6 +3271,7 @@ function MosaicDashboardLayout({
|
|
|
3244
3271
|
isOpen: isMobileSidebarOpen,
|
|
3245
3272
|
onClose: () => setIsMobileSidebarOpen(false),
|
|
3246
3273
|
title: mobileSidebarTitle,
|
|
3274
|
+
closeAriaLabel: mobileSidebarCloseAriaLabel,
|
|
3247
3275
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3248
3276
|
MosaicAppSidebar,
|
|
3249
3277
|
{
|
|
@@ -3517,8 +3545,10 @@ function MosaicActivityItem({ activity, icon, className }) {
|
|
|
3517
3545
|
MosaicActivityItem.displayName = "MosaicActivityItem";
|
|
3518
3546
|
function MosaicActivityFeed({
|
|
3519
3547
|
activities,
|
|
3520
|
-
heading
|
|
3548
|
+
heading,
|
|
3521
3549
|
viewAllHref,
|
|
3550
|
+
viewAllLabel,
|
|
3551
|
+
emptyMessage,
|
|
3522
3552
|
iconMap,
|
|
3523
3553
|
renderLink,
|
|
3524
3554
|
className,
|
|
@@ -3548,12 +3578,12 @@ function MosaicActivityFeed({
|
|
|
3548
3578
|
viewAllHref && link(
|
|
3549
3579
|
viewAllHref,
|
|
3550
3580
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3551
|
-
|
|
3581
|
+
viewAllLabel,
|
|
3552
3582
|
/* @__PURE__ */ jsxRuntime.jsx(ArrowRightIcon, {})
|
|
3553
3583
|
] })
|
|
3554
3584
|
)
|
|
3555
3585
|
] }),
|
|
3556
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border p-2", children: activities.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-4 py-8 text-center text-sm text-muted-foreground", children:
|
|
3586
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border p-2", children: activities.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-4 py-8 text-center text-sm text-muted-foreground", children: emptyMessage }) : activities.map((activity, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3557
3587
|
"div",
|
|
3558
3588
|
{
|
|
3559
3589
|
className: "mosaic-activity-row",
|
|
@@ -3733,21 +3763,20 @@ function MosaicAgentComposerDesktop({
|
|
|
3733
3763
|
onCancel,
|
|
3734
3764
|
canSave,
|
|
3735
3765
|
isEditMode = false,
|
|
3736
|
-
labels
|
|
3766
|
+
labels,
|
|
3767
|
+
agentNameLabel,
|
|
3768
|
+
agentNamePlaceholder,
|
|
3769
|
+
instructionsPlaceholder,
|
|
3770
|
+
modelDescriptionLabel,
|
|
3771
|
+
recommendedBadgeLabel,
|
|
3772
|
+
livePreviewHeading,
|
|
3773
|
+
livePreviewSubheading,
|
|
3774
|
+
previewConfigLabel,
|
|
3775
|
+
customInstructionsPreviewLabel,
|
|
3776
|
+
selectAllModulesLabel,
|
|
3777
|
+
unnamedAgentLabel
|
|
3737
3778
|
}) {
|
|
3738
|
-
const L =
|
|
3739
|
-
role: labels.role ?? "Role",
|
|
3740
|
-
persona: labels.persona ?? "Persona",
|
|
3741
|
-
framework: labels.framework ?? "Framework",
|
|
3742
|
-
model: labels.model ?? "Model",
|
|
3743
|
-
customInstructions: labels.customInstructions ?? "Custom Instructions (Optional)",
|
|
3744
|
-
saveLabel: labels.saveLabel ?? (isEditMode ? "Save Changes" : "Create Agent"),
|
|
3745
|
-
cancelLabel: labels.cancelLabel ?? "Cancel",
|
|
3746
|
-
heading: labels.heading ?? "Compose Agent",
|
|
3747
|
-
subheading: labels.subheading ?? "Select modules to build your custom agent",
|
|
3748
|
-
headingEdit: labels.headingEdit ?? "Edit Agent",
|
|
3749
|
-
subheadingEdit: labels.subheadingEdit ?? "Update your agent configuration"
|
|
3750
|
-
};
|
|
3779
|
+
const L = labels;
|
|
3751
3780
|
const allModulesSelected = !!selectedRole && !!selectedPersona && !!selectedFramework && !!selectedModel;
|
|
3752
3781
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "agent-composer-desktop", className: "grid h-full grid-cols-2 gap-6", children: [
|
|
3753
3782
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5 overflow-y-auto pr-3", children: [
|
|
@@ -3765,7 +3794,7 @@ function MosaicAgentComposerDesktop({
|
|
|
3765
3794
|
{
|
|
3766
3795
|
htmlFor: "mosaic-composer-name",
|
|
3767
3796
|
className: "block text-sm font-medium text-foreground",
|
|
3768
|
-
children:
|
|
3797
|
+
children: agentNameLabel
|
|
3769
3798
|
}
|
|
3770
3799
|
),
|
|
3771
3800
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3775,7 +3804,7 @@ function MosaicAgentComposerDesktop({
|
|
|
3775
3804
|
type: "text",
|
|
3776
3805
|
value: agentName,
|
|
3777
3806
|
onChange: (e) => onAgentNameChange(e.target.value),
|
|
3778
|
-
placeholder:
|
|
3807
|
+
placeholder: agentNamePlaceholder,
|
|
3779
3808
|
className: cn44(
|
|
3780
3809
|
"flex min-h-[48px] w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
3781
3810
|
"placeholder:text-muted-foreground",
|
|
@@ -3818,13 +3847,13 @@ function MosaicAgentComposerDesktop({
|
|
|
3818
3847
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card", children: [
|
|
3819
3848
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-4 pt-4 pb-3", children: [
|
|
3820
3849
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-foreground", children: L.model }),
|
|
3821
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children:
|
|
3850
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: modelDescriptionLabel })
|
|
3822
3851
|
] }),
|
|
3823
3852
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: selectedModel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
3824
3853
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-[72px] items-start gap-3 rounded-lg border border-border bg-muted/30 p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
3825
3854
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3826
3855
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: selectedModel.name }),
|
|
3827
|
-
selectedModel.recommended && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children:
|
|
3856
|
+
selectedModel.recommended && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: recommendedBadgeLabel })
|
|
3828
3857
|
] }),
|
|
3829
3858
|
selectedModel.provider && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs capitalize text-muted-foreground", children: selectedModel.provider }),
|
|
3830
3859
|
(selectedModel.contextWindow || selectedModel.pricingLabel) && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -3875,7 +3904,7 @@ function MosaicAgentComposerDesktop({
|
|
|
3875
3904
|
id: "mosaic-composer-instructions",
|
|
3876
3905
|
value: customInstructions,
|
|
3877
3906
|
onChange: (e) => onCustomInstructionsChange(e.target.value),
|
|
3878
|
-
placeholder:
|
|
3907
|
+
placeholder: instructionsPlaceholder,
|
|
3879
3908
|
rows: 5,
|
|
3880
3909
|
className: cn44(
|
|
3881
3910
|
"flex w-full resize-y rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
@@ -3889,13 +3918,13 @@ function MosaicAgentComposerDesktop({
|
|
|
3889
3918
|
] }),
|
|
3890
3919
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 border-l border-border pl-6", children: [
|
|
3891
3920
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3892
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children:
|
|
3893
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
3921
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: livePreviewHeading }),
|
|
3922
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: livePreviewSubheading })
|
|
3894
3923
|
] }),
|
|
3895
3924
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-border" }),
|
|
3896
3925
|
allModulesSelected ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto rounded-xl border border-border bg-muted/30 p-4 space-y-4", children: [
|
|
3897
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground", children: agentName ||
|
|
3898
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children:
|
|
3926
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground", children: agentName || unnamedAgentLabel }),
|
|
3927
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: previewConfigLabel }),
|
|
3899
3928
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-border" }),
|
|
3900
3929
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 text-sm", children: [
|
|
3901
3930
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -3936,14 +3965,14 @@ function MosaicAgentComposerDesktop({
|
|
|
3936
3965
|
customInstructions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3937
3966
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-border" }),
|
|
3938
3967
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3939
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-foreground", children:
|
|
3968
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-foreground", children: customInstructionsPreviewLabel }),
|
|
3940
3969
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: customInstructions })
|
|
3941
3970
|
] })
|
|
3942
3971
|
] })
|
|
3943
3972
|
] })
|
|
3944
3973
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 items-center justify-center text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3945
3974
|
/* @__PURE__ */ jsxRuntime.jsx(SparklesIcon, {}),
|
|
3946
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
3975
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: selectAllModulesLabel })
|
|
3947
3976
|
] }) }),
|
|
3948
3977
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn44("flex gap-2", isEditMode && onCancel ? "flex-row" : "flex-col"), children: [
|
|
3949
3978
|
isEditMode && onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4069,7 +4098,8 @@ function MobileModuleSlot({
|
|
|
4069
4098
|
module,
|
|
4070
4099
|
onSelect,
|
|
4071
4100
|
onRemove,
|
|
4072
|
-
isLoading
|
|
4101
|
+
isLoading,
|
|
4102
|
+
requiredLabel
|
|
4073
4103
|
}) {
|
|
4074
4104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card", children: [
|
|
4075
4105
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border px-4 pt-3 pb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -4078,7 +4108,7 @@ function MobileModuleSlot({
|
|
|
4078
4108
|
". ",
|
|
4079
4109
|
label
|
|
4080
4110
|
] }),
|
|
4081
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children:
|
|
4111
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: requiredLabel })
|
|
4082
4112
|
] }) }),
|
|
4083
4113
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3", children: module ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[64px] items-start gap-2 rounded-lg border border-border bg-muted/30 p-3", children: [
|
|
4084
4114
|
module.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-lg", "aria-hidden": "true", children: module.icon }),
|
|
@@ -4182,21 +4212,18 @@ function MosaicAgentComposerMobile({
|
|
|
4182
4212
|
canSave,
|
|
4183
4213
|
isEditMode = false,
|
|
4184
4214
|
isLoading = false,
|
|
4185
|
-
labels
|
|
4215
|
+
labels,
|
|
4216
|
+
agentNameLabel,
|
|
4217
|
+
agentNamePlaceholder,
|
|
4218
|
+
instructionsPlaceholder,
|
|
4219
|
+
recommendedBadgeLabel,
|
|
4220
|
+
requiredLabel,
|
|
4221
|
+
goBackAriaLabel,
|
|
4222
|
+
savingLabel,
|
|
4223
|
+
creatingLabel,
|
|
4224
|
+
optionalInstructionsHelp
|
|
4186
4225
|
}) {
|
|
4187
|
-
const L =
|
|
4188
|
-
role: labels.role ?? "Role",
|
|
4189
|
-
persona: labels.persona ?? "Persona",
|
|
4190
|
-
framework: labels.framework ?? "Framework",
|
|
4191
|
-
model: labels.model ?? "Model",
|
|
4192
|
-
customInstructions: labels.customInstructions ?? "Custom Instructions (Optional)",
|
|
4193
|
-
saveLabel: labels.saveLabel ?? (isEditMode ? "Save Changes" : "Create Agent"),
|
|
4194
|
-
cancelLabel: labels.cancelLabel ?? "Cancel",
|
|
4195
|
-
heading: labels.heading ?? "Compose Agent",
|
|
4196
|
-
subheading: labels.subheading ?? "Select modules to build your custom agent",
|
|
4197
|
-
headingEdit: labels.headingEdit ?? "Edit Agent",
|
|
4198
|
-
subheadingEdit: labels.subheadingEdit ?? "Update your agent configuration"
|
|
4199
|
-
};
|
|
4226
|
+
const L = labels;
|
|
4200
4227
|
const instructionsId = React27__namespace.useId();
|
|
4201
4228
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "agent-composer-mobile", className: "flex h-full flex-col", children: [
|
|
4202
4229
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 sticky top-0 z-10 border-b border-border bg-background px-4 pt-4 pb-3", children: [
|
|
@@ -4207,7 +4234,7 @@ function MosaicAgentComposerMobile({
|
|
|
4207
4234
|
type: "button",
|
|
4208
4235
|
onClick: onCancel,
|
|
4209
4236
|
disabled: isLoading,
|
|
4210
|
-
"aria-label":
|
|
4237
|
+
"aria-label": goBackAriaLabel,
|
|
4211
4238
|
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",
|
|
4212
4239
|
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowLeftIcon, {})
|
|
4213
4240
|
}
|
|
@@ -4224,7 +4251,7 @@ function MosaicAgentComposerMobile({
|
|
|
4224
4251
|
{
|
|
4225
4252
|
htmlFor: "mosaic-composer-mobile-name",
|
|
4226
4253
|
className: "block text-sm font-medium text-foreground",
|
|
4227
|
-
children:
|
|
4254
|
+
children: agentNameLabel
|
|
4228
4255
|
}
|
|
4229
4256
|
),
|
|
4230
4257
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4234,7 +4261,7 @@ function MosaicAgentComposerMobile({
|
|
|
4234
4261
|
type: "text",
|
|
4235
4262
|
value: agentName,
|
|
4236
4263
|
onChange: (e) => onAgentNameChange(e.target.value),
|
|
4237
|
-
placeholder:
|
|
4264
|
+
placeholder: agentNamePlaceholder,
|
|
4238
4265
|
disabled: isLoading,
|
|
4239
4266
|
"aria-required": "true",
|
|
4240
4267
|
"aria-invalid": canSave && !agentName ? "true" : "false",
|
|
@@ -4255,7 +4282,8 @@ function MosaicAgentComposerMobile({
|
|
|
4255
4282
|
module: selectedRole,
|
|
4256
4283
|
onSelect: onSelectRole,
|
|
4257
4284
|
onRemove: onRemoveRole,
|
|
4258
|
-
isLoading
|
|
4285
|
+
isLoading,
|
|
4286
|
+
requiredLabel
|
|
4259
4287
|
}
|
|
4260
4288
|
),
|
|
4261
4289
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4266,7 +4294,8 @@ function MosaicAgentComposerMobile({
|
|
|
4266
4294
|
module: selectedPersona,
|
|
4267
4295
|
onSelect: onSelectPersona,
|
|
4268
4296
|
onRemove: onRemovePersona,
|
|
4269
|
-
isLoading
|
|
4297
|
+
isLoading,
|
|
4298
|
+
requiredLabel
|
|
4270
4299
|
}
|
|
4271
4300
|
),
|
|
4272
4301
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4277,7 +4306,8 @@ function MosaicAgentComposerMobile({
|
|
|
4277
4306
|
module: selectedFramework,
|
|
4278
4307
|
onSelect: onSelectFramework,
|
|
4279
4308
|
onRemove: onRemoveFramework,
|
|
4280
|
-
isLoading
|
|
4309
|
+
isLoading,
|
|
4310
|
+
requiredLabel
|
|
4281
4311
|
}
|
|
4282
4312
|
),
|
|
4283
4313
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card", children: [
|
|
@@ -4286,13 +4316,13 @@ function MosaicAgentComposerMobile({
|
|
|
4286
4316
|
"4. ",
|
|
4287
4317
|
L.model
|
|
4288
4318
|
] }),
|
|
4289
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children:
|
|
4319
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: requiredLabel })
|
|
4290
4320
|
] }) }),
|
|
4291
4321
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3", children: selectedModel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
4292
4322
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-[64px] items-start gap-2 rounded-lg border border-border bg-muted/30 p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-0.5", children: [
|
|
4293
4323
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4294
4324
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: selectedModel.name }),
|
|
4295
|
-
selectedModel.recommended && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary", children:
|
|
4325
|
+
selectedModel.recommended && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary", children: recommendedBadgeLabel })
|
|
4296
4326
|
] }),
|
|
4297
4327
|
selectedModel.provider && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs capitalize text-muted-foreground", children: selectedModel.provider }),
|
|
4298
4328
|
(selectedModel.contextWindow || selectedModel.pricingLabel) && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -4338,7 +4368,7 @@ function MosaicAgentComposerMobile({
|
|
|
4338
4368
|
id: instructionsId,
|
|
4339
4369
|
value: customInstructions,
|
|
4340
4370
|
onChange: (e) => onCustomInstructionsChange(e.target.value),
|
|
4341
|
-
placeholder:
|
|
4371
|
+
placeholder: instructionsPlaceholder,
|
|
4342
4372
|
disabled: isLoading,
|
|
4343
4373
|
"aria-describedby": `${instructionsId}-help`,
|
|
4344
4374
|
rows: 4,
|
|
@@ -4350,7 +4380,7 @@ function MosaicAgentComposerMobile({
|
|
|
4350
4380
|
)
|
|
4351
4381
|
}
|
|
4352
4382
|
),
|
|
4353
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { id: `${instructionsId}-help`, className: "text-xs text-muted-foreground", children:
|
|
4383
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { id: `${instructionsId}-help`, className: "text-xs text-muted-foreground", children: optionalInstructionsHelp })
|
|
4354
4384
|
] })
|
|
4355
4385
|
] }),
|
|
4356
4386
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 sticky bottom-0 z-10 border-t border-border bg-background p-4", children: isEditMode && onCancel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -4373,7 +4403,7 @@ function MosaicAgentComposerMobile({
|
|
|
4373
4403
|
className: "flex flex-1 min-h-[48px] items-center justify-center gap-2 rounded-lg bg-primary text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4374
4404
|
children: [
|
|
4375
4405
|
/* @__PURE__ */ jsxRuntime.jsx(SaveIcon2, {}),
|
|
4376
|
-
isLoading ?
|
|
4406
|
+
isLoading ? savingLabel : L.saveLabel
|
|
4377
4407
|
]
|
|
4378
4408
|
}
|
|
4379
4409
|
)
|
|
@@ -4386,7 +4416,7 @@ function MosaicAgentComposerMobile({
|
|
|
4386
4416
|
className: "flex w-full min-h-[48px] items-center justify-center gap-2 rounded-lg bg-primary text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4387
4417
|
children: [
|
|
4388
4418
|
/* @__PURE__ */ jsxRuntime.jsx(SparklesIcon2, {}),
|
|
4389
|
-
isLoading ?
|
|
4419
|
+
isLoading ? creatingLabel : L.saveLabel
|
|
4390
4420
|
]
|
|
4391
4421
|
}
|
|
4392
4422
|
) })
|
|
@@ -4448,6 +4478,9 @@ function MosaicModuleCard({
|
|
|
4448
4478
|
onEdit,
|
|
4449
4479
|
isSelected = false,
|
|
4450
4480
|
isCustom = false,
|
|
4481
|
+
customBadgeLabel,
|
|
4482
|
+
editAriaLabel,
|
|
4483
|
+
removeAriaLabel,
|
|
4451
4484
|
className,
|
|
4452
4485
|
ref
|
|
4453
4486
|
}) {
|
|
@@ -4467,7 +4500,7 @@ function MosaicModuleCard({
|
|
|
4467
4500
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
4468
4501
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
|
|
4469
4502
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-medium text-foreground", children: module.name }),
|
|
4470
|
-
isCustom && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children:
|
|
4503
|
+
isCustom && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: customBadgeLabel })
|
|
4471
4504
|
] }),
|
|
4472
4505
|
module.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 line-clamp-2 text-xs text-muted-foreground", children: module.description }),
|
|
4473
4506
|
module.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-muted-foreground/80", children: module.details }),
|
|
@@ -4486,7 +4519,7 @@ function MosaicModuleCard({
|
|
|
4486
4519
|
{
|
|
4487
4520
|
type: "button",
|
|
4488
4521
|
onClick: onEdit,
|
|
4489
|
-
"aria-label":
|
|
4522
|
+
"aria-label": editAriaLabel,
|
|
4490
4523
|
className: "flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4491
4524
|
children: /* @__PURE__ */ jsxRuntime.jsx(EditIcon, {})
|
|
4492
4525
|
}
|
|
@@ -4496,7 +4529,7 @@ function MosaicModuleCard({
|
|
|
4496
4529
|
{
|
|
4497
4530
|
type: "button",
|
|
4498
4531
|
onClick: onRemove,
|
|
4499
|
-
"aria-label":
|
|
4532
|
+
"aria-label": removeAriaLabel,
|
|
4500
4533
|
className: "flex h-8 w-8 items-center justify-center rounded-md text-destructive transition-colors hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4501
4534
|
children: /* @__PURE__ */ jsxRuntime.jsx(RemoveIcon, {})
|
|
4502
4535
|
}
|
|
@@ -4555,19 +4588,14 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4555
4588
|
open,
|
|
4556
4589
|
onOpenChange,
|
|
4557
4590
|
onConfirm,
|
|
4558
|
-
itemName,
|
|
4559
|
-
itemType = "item",
|
|
4560
4591
|
title,
|
|
4561
4592
|
description,
|
|
4562
|
-
cancelLabel
|
|
4593
|
+
cancelLabel,
|
|
4563
4594
|
confirmLabel
|
|
4564
4595
|
}) {
|
|
4565
4596
|
React27__namespace.useEffect(() => {
|
|
4566
4597
|
injectStyles6();
|
|
4567
4598
|
}, []);
|
|
4568
|
-
const resolvedTitle = title ?? `Delete ${itemType}?`;
|
|
4569
|
-
const resolvedDescription = description ?? `Are you sure you want to delete "${itemName}"? This action cannot be undone.`;
|
|
4570
|
-
const resolvedConfirmLabel = confirmLabel ?? `Delete ${itemType}`;
|
|
4571
4599
|
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(alertDialog.AlertDialog.Portal, { children: [
|
|
4572
4600
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4573
4601
|
alertDialog.AlertDialog.Backdrop,
|
|
@@ -4586,8 +4614,8 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4586
4614
|
"rounded-lg border border-border bg-background p-6 shadow-xl"
|
|
4587
4615
|
),
|
|
4588
4616
|
children: [
|
|
4589
|
-
/* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Title, { className: "text-lg font-semibold text-foreground", children:
|
|
4590
|
-
/* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Description, { className: "mt-2 text-sm text-muted-foreground", children:
|
|
4617
|
+
/* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Title, { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4618
|
+
/* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Description, { className: "mt-2 text-sm text-muted-foreground", children: description }),
|
|
4591
4619
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
4592
4620
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4593
4621
|
alertDialog.AlertDialog.Close,
|
|
@@ -4613,7 +4641,7 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4613
4641
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4614
4642
|
"sm:w-auto"
|
|
4615
4643
|
),
|
|
4616
|
-
children:
|
|
4644
|
+
children: confirmLabel
|
|
4617
4645
|
}
|
|
4618
4646
|
)
|
|
4619
4647
|
] })
|
|
@@ -4685,7 +4713,8 @@ function MosaicPreferencesPanel({
|
|
|
4685
4713
|
onChange,
|
|
4686
4714
|
onSave,
|
|
4687
4715
|
isSaving = false,
|
|
4688
|
-
saveLabel
|
|
4716
|
+
saveLabel,
|
|
4717
|
+
savingLabel,
|
|
4689
4718
|
className
|
|
4690
4719
|
}) {
|
|
4691
4720
|
const { isMobile } = useDevice();
|
|
@@ -4767,7 +4796,7 @@ function MosaicPreferencesPanel({
|
|
|
4767
4796
|
]
|
|
4768
4797
|
}
|
|
4769
4798
|
),
|
|
4770
|
-
isSaving ?
|
|
4799
|
+
isSaving ? savingLabel : saveLabel
|
|
4771
4800
|
]
|
|
4772
4801
|
}
|
|
4773
4802
|
) })
|
|
@@ -4804,23 +4833,33 @@ function MosaicProfilePanel({
|
|
|
4804
4833
|
isSaving = false,
|
|
4805
4834
|
onAvatarUpload,
|
|
4806
4835
|
extraSections,
|
|
4807
|
-
saveLabel
|
|
4836
|
+
saveLabel,
|
|
4808
4837
|
onChangePassword,
|
|
4838
|
+
avatarHeading,
|
|
4839
|
+
avatarSubheading,
|
|
4840
|
+
uploadPhotoLabel,
|
|
4841
|
+
personalInfoHeading,
|
|
4842
|
+
personalInfoSubheading,
|
|
4843
|
+
securityHeading,
|
|
4844
|
+
securitySubheading,
|
|
4845
|
+
changePasswordLabel,
|
|
4846
|
+
savingLabel,
|
|
4847
|
+
unnamedUserLabel,
|
|
4809
4848
|
className
|
|
4810
4849
|
}) {
|
|
4811
4850
|
const { isMobile } = useDevice();
|
|
4812
4851
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "profile-panel", className: cn49("space-y-4 md:space-y-6", className), children: [
|
|
4813
4852
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
|
|
4814
4853
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
|
|
4815
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children:
|
|
4816
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
4854
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: avatarHeading }),
|
|
4855
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: avatarSubheading })
|
|
4817
4856
|
] }),
|
|
4818
4857
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 pt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
4819
4858
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4820
4859
|
AvatarDisplay,
|
|
4821
4860
|
{
|
|
4822
4861
|
src: avatarSrc,
|
|
4823
|
-
name: displayName ||
|
|
4862
|
+
name: displayName || unnamedUserLabel,
|
|
4824
4863
|
size: isMobile ? "md" : "lg"
|
|
4825
4864
|
}
|
|
4826
4865
|
),
|
|
@@ -4857,7 +4896,7 @@ function MosaicProfilePanel({
|
|
|
4857
4896
|
]
|
|
4858
4897
|
}
|
|
4859
4898
|
),
|
|
4860
|
-
|
|
4899
|
+
uploadPhotoLabel
|
|
4861
4900
|
]
|
|
4862
4901
|
}
|
|
4863
4902
|
)
|
|
@@ -4865,8 +4904,8 @@ function MosaicProfilePanel({
|
|
|
4865
4904
|
] }),
|
|
4866
4905
|
fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
|
|
4867
4906
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
|
|
4868
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children:
|
|
4869
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
4907
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: personalInfoHeading }),
|
|
4908
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: personalInfoSubheading })
|
|
4870
4909
|
] }),
|
|
4871
4910
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 pt-0 space-y-4 md:space-y-6", children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
4872
4911
|
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: field.id, className: "text-base font-medium leading-none", children: field.label }),
|
|
@@ -4907,8 +4946,8 @@ function MosaicProfilePanel({
|
|
|
4907
4946
|
] }),
|
|
4908
4947
|
onChangePassword && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
|
|
4909
4948
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
|
|
4910
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children:
|
|
4911
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
4949
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: securityHeading }),
|
|
4950
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: securitySubheading })
|
|
4912
4951
|
] }),
|
|
4913
4952
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 pt-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4914
4953
|
"button",
|
|
@@ -4922,7 +4961,7 @@ function MosaicProfilePanel({
|
|
|
4922
4961
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4923
4962
|
isMobile ? "w-full" : "w-auto"
|
|
4924
4963
|
),
|
|
4925
|
-
children:
|
|
4964
|
+
children: changePasswordLabel
|
|
4926
4965
|
}
|
|
4927
4966
|
) })
|
|
4928
4967
|
] }),
|
|
@@ -4962,7 +5001,7 @@ function MosaicProfilePanel({
|
|
|
4962
5001
|
]
|
|
4963
5002
|
}
|
|
4964
5003
|
),
|
|
4965
|
-
isSaving ?
|
|
5004
|
+
isSaving ? savingLabel : saveLabel
|
|
4966
5005
|
]
|
|
4967
5006
|
}
|
|
4968
5007
|
) })
|
|
@@ -5050,8 +5089,13 @@ function MosaicMainNav({
|
|
|
5050
5089
|
activePath,
|
|
5051
5090
|
isAdmin = false,
|
|
5052
5091
|
renderLink,
|
|
5053
|
-
drawerTitle
|
|
5054
|
-
drawerSubtitle
|
|
5092
|
+
drawerTitle,
|
|
5093
|
+
drawerSubtitle,
|
|
5094
|
+
openMenuAriaLabel,
|
|
5095
|
+
closeMenuAriaLabel,
|
|
5096
|
+
drawerNavAriaLabel,
|
|
5097
|
+
mainNavAriaLabel,
|
|
5098
|
+
adminBadgeLabel,
|
|
5055
5099
|
className
|
|
5056
5100
|
}) {
|
|
5057
5101
|
const { isMobile } = useDevice();
|
|
@@ -5082,7 +5126,7 @@ function MosaicMainNav({
|
|
|
5082
5126
|
"text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5083
5127
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5084
5128
|
),
|
|
5085
|
-
"aria-label":
|
|
5129
|
+
"aria-label": openMenuAriaLabel,
|
|
5086
5130
|
"aria-expanded": isOpen,
|
|
5087
5131
|
children: /* @__PURE__ */ jsxRuntime.jsx(HamburgerIcon, {})
|
|
5088
5132
|
}
|
|
@@ -5093,14 +5137,14 @@ function MosaicMainNav({
|
|
|
5093
5137
|
type: "button",
|
|
5094
5138
|
className: "fixed inset-0 z-40 bg-black/50 cursor-default",
|
|
5095
5139
|
onClick: () => setIsOpen(false),
|
|
5096
|
-
"aria-label":
|
|
5140
|
+
"aria-label": closeMenuAriaLabel,
|
|
5097
5141
|
tabIndex: -1
|
|
5098
5142
|
}
|
|
5099
5143
|
),
|
|
5100
5144
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5101
5145
|
"dialog",
|
|
5102
5146
|
{
|
|
5103
|
-
"aria-label":
|
|
5147
|
+
"aria-label": drawerNavAriaLabel,
|
|
5104
5148
|
open: isOpen,
|
|
5105
5149
|
"data-open": isOpen ? "true" : "false",
|
|
5106
5150
|
className: cn50(
|
|
@@ -5125,12 +5169,12 @@ function MosaicMainNav({
|
|
|
5125
5169
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5126
5170
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5127
5171
|
),
|
|
5128
|
-
"aria-label":
|
|
5172
|
+
"aria-label": closeMenuAriaLabel,
|
|
5129
5173
|
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
|
|
5130
5174
|
}
|
|
5131
5175
|
)
|
|
5132
5176
|
] }),
|
|
5133
|
-
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1 p-4", "aria-label":
|
|
5177
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1 p-4", "aria-label": mainNavAriaLabel, children: filteredItems.map((item) => {
|
|
5134
5178
|
const Icon = item.icon;
|
|
5135
5179
|
const active = isItemActive(item);
|
|
5136
5180
|
const itemClass = cn50(
|
|
@@ -5144,7 +5188,7 @@ function MosaicMainNav({
|
|
|
5144
5188
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5145
5189
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
|
|
5146
5190
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label }),
|
|
5147
|
-
item.adminOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto rounded bg-primary/10 px-2 py-0.5 text-xs text-primary", children:
|
|
5191
|
+
item.adminOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto rounded bg-primary/10 px-2 py-0.5 text-xs text-primary", children: adminBadgeLabel })
|
|
5148
5192
|
] }),
|
|
5149
5193
|
itemClass,
|
|
5150
5194
|
() => setIsOpen(false)
|
|
@@ -5160,7 +5204,7 @@ function MosaicMainNav({
|
|
|
5160
5204
|
{
|
|
5161
5205
|
"data-slot": "main-nav",
|
|
5162
5206
|
className: cn50("flex items-center gap-1", className),
|
|
5163
|
-
"aria-label":
|
|
5207
|
+
"aria-label": mainNavAriaLabel,
|
|
5164
5208
|
children: filteredItems.map((item) => {
|
|
5165
5209
|
const Icon = item.icon;
|
|
5166
5210
|
const active = isItemActive(item);
|
|
@@ -5175,7 +5219,7 @@ function MosaicMainNav({
|
|
|
5175
5219
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5176
5220
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
5177
5221
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label }),
|
|
5178
|
-
item.adminOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-primary/10 px-1.5 py-0.5 text-xs text-primary", children:
|
|
5222
|
+
item.adminOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-primary/10 px-1.5 py-0.5 text-xs text-primary", children: adminBadgeLabel })
|
|
5179
5223
|
] }),
|
|
5180
5224
|
itemClass
|
|
5181
5225
|
) }, item.href);
|
|
@@ -5296,6 +5340,15 @@ function MosaicAgentCard({
|
|
|
5296
5340
|
onDelete,
|
|
5297
5341
|
onEdit,
|
|
5298
5342
|
isLoading = false,
|
|
5343
|
+
activeBadgeLabel,
|
|
5344
|
+
agentActionsAriaLabel,
|
|
5345
|
+
deactivateLabel,
|
|
5346
|
+
activateLabel,
|
|
5347
|
+
editLabel,
|
|
5348
|
+
deleteLabel,
|
|
5349
|
+
pauseLabel,
|
|
5350
|
+
startLabel,
|
|
5351
|
+
createdLabel,
|
|
5299
5352
|
className
|
|
5300
5353
|
}) {
|
|
5301
5354
|
const [menuOpen, setMenuOpen] = React27__namespace.useState(false);
|
|
@@ -5344,7 +5397,7 @@ function MosaicAgentCard({
|
|
|
5344
5397
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
5345
5398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5346
5399
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-base font-semibold", children: agent.name }),
|
|
5347
|
-
agent.isActive && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground", children:
|
|
5400
|
+
agent.isActive && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground", children: activeBadgeLabel })
|
|
5348
5401
|
] }),
|
|
5349
5402
|
agent.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-sm text-muted-foreground", children: agent.description })
|
|
5350
5403
|
] })
|
|
@@ -5360,7 +5413,7 @@ function MosaicAgentCard({
|
|
|
5360
5413
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5361
5414
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5362
5415
|
),
|
|
5363
|
-
"aria-label":
|
|
5416
|
+
"aria-label": agentActionsAriaLabel,
|
|
5364
5417
|
"aria-haspopup": "menu",
|
|
5365
5418
|
"aria-expanded": menuOpen,
|
|
5366
5419
|
children: /* @__PURE__ */ jsxRuntime.jsx(MoreVertIcon, {})
|
|
@@ -5392,7 +5445,7 @@ function MosaicAgentCard({
|
|
|
5392
5445
|
),
|
|
5393
5446
|
children: [
|
|
5394
5447
|
agent.isActive ? /* @__PURE__ */ jsxRuntime.jsx(PauseIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(PlayIcon, {}),
|
|
5395
|
-
agent.isActive ?
|
|
5448
|
+
agent.isActive ? deactivateLabel : activateLabel
|
|
5396
5449
|
]
|
|
5397
5450
|
}
|
|
5398
5451
|
),
|
|
@@ -5408,7 +5461,7 @@ function MosaicAgentCard({
|
|
|
5408
5461
|
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5409
5462
|
children: [
|
|
5410
5463
|
/* @__PURE__ */ jsxRuntime.jsx(EditIcon2, {}),
|
|
5411
|
-
|
|
5464
|
+
editLabel
|
|
5412
5465
|
]
|
|
5413
5466
|
}
|
|
5414
5467
|
),
|
|
@@ -5424,7 +5477,7 @@ function MosaicAgentCard({
|
|
|
5424
5477
|
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-destructive/10",
|
|
5425
5478
|
children: [
|
|
5426
5479
|
/* @__PURE__ */ jsxRuntime.jsx(TrashIcon, {}),
|
|
5427
|
-
|
|
5480
|
+
deleteLabel
|
|
5428
5481
|
]
|
|
5429
5482
|
}
|
|
5430
5483
|
)
|
|
@@ -5436,10 +5489,7 @@ function MosaicAgentCard({
|
|
|
5436
5489
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center justify-between", children: [
|
|
5437
5490
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5438
5491
|
agent.type && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-md border border-border px-2 py-0.5 text-xs font-medium", children: agent.type }),
|
|
5439
|
-
formattedDate && /* @__PURE__ */ jsxRuntime.
|
|
5440
|
-
"Created ",
|
|
5441
|
-
formattedDate
|
|
5442
|
-
] })
|
|
5492
|
+
formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: createdLabel(formattedDate) })
|
|
5443
5493
|
] }),
|
|
5444
5494
|
onToggleStatus && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5445
5495
|
"button",
|
|
@@ -5453,7 +5503,7 @@ function MosaicAgentCard({
|
|
|
5453
5503
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
5454
5504
|
agent.isActive ? "bg-secondary text-secondary-foreground hover:bg-secondary/80" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
5455
5505
|
),
|
|
5456
|
-
children: agent.isActive ?
|
|
5506
|
+
children: agent.isActive ? pauseLabel : startLabel
|
|
5457
5507
|
}
|
|
5458
5508
|
)
|
|
5459
5509
|
] })
|
|
@@ -5533,10 +5583,13 @@ function PickerContent({
|
|
|
5533
5583
|
available,
|
|
5534
5584
|
onAdd,
|
|
5535
5585
|
onOpenBuilder,
|
|
5536
|
-
createLabel
|
|
5586
|
+
createLabel,
|
|
5587
|
+
quickAddHeading,
|
|
5588
|
+
configureBehaviorCaption,
|
|
5589
|
+
noAgentsAvailableMessage
|
|
5537
5590
|
}) {
|
|
5538
5591
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
5539
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-3 font-medium text-foreground", children:
|
|
5592
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-3 font-medium text-foreground", children: quickAddHeading }),
|
|
5540
5593
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
5541
5594
|
available.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5542
5595
|
"button",
|
|
@@ -5578,12 +5631,12 @@ function PickerContent({
|
|
|
5578
5631
|
/* @__PURE__ */ jsxRuntime.jsx(SparklesIcon3, {}),
|
|
5579
5632
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-left", children: [
|
|
5580
5633
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-primary", children: createLabel }),
|
|
5581
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children:
|
|
5634
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: configureBehaviorCaption })
|
|
5582
5635
|
] })
|
|
5583
5636
|
]
|
|
5584
5637
|
}
|
|
5585
5638
|
) }),
|
|
5586
|
-
available.length === 0 && !onOpenBuilder && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-sm text-muted-foreground", children:
|
|
5639
|
+
available.length === 0 && !onOpenBuilder && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-sm text-muted-foreground", children: noAgentsAvailableMessage })
|
|
5587
5640
|
] })
|
|
5588
5641
|
] });
|
|
5589
5642
|
}
|
|
@@ -5594,8 +5647,13 @@ function MosaicQuickAgentSelector({
|
|
|
5594
5647
|
onRemoveAgent,
|
|
5595
5648
|
onOpenBuilder,
|
|
5596
5649
|
maxAgents = 4,
|
|
5597
|
-
addLabel
|
|
5598
|
-
createLabel
|
|
5650
|
+
addLabel,
|
|
5651
|
+
createLabel,
|
|
5652
|
+
quickAddHeading,
|
|
5653
|
+
configureBehaviorCaption,
|
|
5654
|
+
noAgentsAvailableMessage,
|
|
5655
|
+
addAgentModalTitle,
|
|
5656
|
+
closeAriaLabel,
|
|
5599
5657
|
className
|
|
5600
5658
|
}) {
|
|
5601
5659
|
const { isMobile } = useDevice();
|
|
@@ -5689,7 +5747,10 @@ function MosaicQuickAgentSelector({
|
|
|
5689
5747
|
onOpenBuilder();
|
|
5690
5748
|
setPickerOpen(false);
|
|
5691
5749
|
} : void 0,
|
|
5692
|
-
createLabel
|
|
5750
|
+
createLabel,
|
|
5751
|
+
quickAddHeading,
|
|
5752
|
+
configureBehaviorCaption,
|
|
5753
|
+
noAgentsAvailableMessage
|
|
5693
5754
|
}
|
|
5694
5755
|
)
|
|
5695
5756
|
}
|
|
@@ -5699,7 +5760,8 @@ function MosaicQuickAgentSelector({
|
|
|
5699
5760
|
{
|
|
5700
5761
|
isOpen: pickerOpen,
|
|
5701
5762
|
onClose: () => setPickerOpen(false),
|
|
5702
|
-
title:
|
|
5763
|
+
title: addAgentModalTitle,
|
|
5764
|
+
closeAriaLabel,
|
|
5703
5765
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5704
5766
|
PickerContent,
|
|
5705
5767
|
{
|
|
@@ -5709,7 +5771,10 @@ function MosaicQuickAgentSelector({
|
|
|
5709
5771
|
onOpenBuilder();
|
|
5710
5772
|
setPickerOpen(false);
|
|
5711
5773
|
} : void 0,
|
|
5712
|
-
createLabel
|
|
5774
|
+
createLabel,
|
|
5775
|
+
quickAddHeading,
|
|
5776
|
+
configureBehaviorCaption,
|
|
5777
|
+
noAgentsAvailableMessage
|
|
5713
5778
|
}
|
|
5714
5779
|
)
|
|
5715
5780
|
}
|
|
@@ -5782,11 +5847,14 @@ function MosaicSelectorModal({
|
|
|
5782
5847
|
selectedId,
|
|
5783
5848
|
onSelect,
|
|
5784
5849
|
categories,
|
|
5785
|
-
searchPlaceholder
|
|
5850
|
+
searchPlaceholder,
|
|
5786
5851
|
columns = 2,
|
|
5787
5852
|
renderPreview,
|
|
5788
|
-
confirmLabel
|
|
5789
|
-
cancelLabel
|
|
5853
|
+
confirmLabel,
|
|
5854
|
+
cancelLabel,
|
|
5855
|
+
allCategoryLabel,
|
|
5856
|
+
emptyMessage,
|
|
5857
|
+
closeAriaLabel
|
|
5790
5858
|
}) {
|
|
5791
5859
|
const [query, setQuery] = React27__namespace.useState("");
|
|
5792
5860
|
const [activeCategory, setActiveCategory] = React27__namespace.useState("all");
|
|
@@ -5811,131 +5879,141 @@ function MosaicSelectorModal({
|
|
|
5811
5879
|
}
|
|
5812
5880
|
onClose();
|
|
5813
5881
|
};
|
|
5814
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
className:
|
|
5825
|
-
|
|
5826
|
-
"
|
|
5827
|
-
|
|
5882
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5883
|
+
MosaicAdaptiveModal,
|
|
5884
|
+
{
|
|
5885
|
+
isOpen,
|
|
5886
|
+
onClose,
|
|
5887
|
+
title,
|
|
5888
|
+
description,
|
|
5889
|
+
closeAriaLabel,
|
|
5890
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "selector-modal", className: "flex flex-col gap-4 p-4", children: [
|
|
5891
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
5892
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, {}) }),
|
|
5893
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5894
|
+
"input",
|
|
5895
|
+
{
|
|
5896
|
+
type: "search",
|
|
5897
|
+
value: query,
|
|
5898
|
+
onChange: (e) => setQuery(e.target.value),
|
|
5899
|
+
placeholder: searchPlaceholder,
|
|
5900
|
+
className: cn53(
|
|
5901
|
+
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
5902
|
+
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
5903
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5904
|
+
)
|
|
5905
|
+
}
|
|
5828
5906
|
)
|
|
5829
|
-
}
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
children: "All"
|
|
5843
|
-
}
|
|
5844
|
-
),
|
|
5845
|
-
categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5846
|
-
"button",
|
|
5847
|
-
{
|
|
5848
|
-
type: "button",
|
|
5849
|
-
onClick: () => setActiveCategory(cat.id),
|
|
5850
|
-
className: cn53(
|
|
5851
|
-
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
5852
|
-
activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
5907
|
+
] }),
|
|
5908
|
+
categories && categories.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1 overflow-x-auto pb-1", children: [
|
|
5909
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5910
|
+
"button",
|
|
5911
|
+
{
|
|
5912
|
+
type: "button",
|
|
5913
|
+
onClick: () => setActiveCategory("all"),
|
|
5914
|
+
className: cn53(
|
|
5915
|
+
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
5916
|
+
activeCategory === "all" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
5917
|
+
),
|
|
5918
|
+
children: allCategoryLabel
|
|
5919
|
+
}
|
|
5853
5920
|
),
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5921
|
+
categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5922
|
+
"button",
|
|
5923
|
+
{
|
|
5924
|
+
type: "button",
|
|
5925
|
+
onClick: () => setActiveCategory(cat.id),
|
|
5926
|
+
className: cn53(
|
|
5927
|
+
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
5928
|
+
activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
5929
|
+
),
|
|
5930
|
+
children: cat.label
|
|
5931
|
+
},
|
|
5932
|
+
cat.id
|
|
5933
|
+
))
|
|
5934
|
+
] }),
|
|
5935
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5936
|
+
"div",
|
|
5937
|
+
{
|
|
5938
|
+
className: cn53(
|
|
5939
|
+
"max-h-[50vh] overflow-y-auto",
|
|
5940
|
+
columns === 2 ? "grid grid-cols-1 gap-3 sm:grid-cols-2" : "flex flex-col gap-3"
|
|
5941
|
+
),
|
|
5942
|
+
children: [
|
|
5943
|
+
filtered.map((item) => {
|
|
5944
|
+
const isSelected = pendingId === item.id;
|
|
5945
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5946
|
+
"button",
|
|
5947
|
+
{
|
|
5948
|
+
type: "button",
|
|
5949
|
+
onClick: () => setPendingId(item.id),
|
|
5950
|
+
className: cn53(
|
|
5951
|
+
"group relative rounded-lg border p-4 text-left transition-all duration-150",
|
|
5952
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5953
|
+
isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50"
|
|
5954
|
+
),
|
|
5955
|
+
children: [
|
|
5956
|
+
isSelected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 top-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon3, {}) }),
|
|
5957
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
5958
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0", children: item.icon }),
|
|
5959
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
5960
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground", children: item.name }),
|
|
5961
|
+
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground line-clamp-2", children: item.description }),
|
|
5962
|
+
item.tags && item.tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex flex-wrap gap-1", children: item.tags.slice(0, 3).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5963
|
+
"span",
|
|
5964
|
+
{
|
|
5965
|
+
className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
5966
|
+
children: tag
|
|
5967
|
+
},
|
|
5968
|
+
tag
|
|
5969
|
+
)) })
|
|
5970
|
+
] })
|
|
5971
|
+
] })
|
|
5972
|
+
]
|
|
5973
|
+
},
|
|
5974
|
+
item.id
|
|
5975
|
+
);
|
|
5976
|
+
}),
|
|
5977
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "col-span-2 py-8 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
5978
|
+
]
|
|
5979
|
+
}
|
|
5865
5980
|
),
|
|
5866
|
-
children:
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
5882
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0", children: item.icon }),
|
|
5883
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
5884
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground", children: item.name }),
|
|
5885
|
-
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground line-clamp-2", children: item.description }),
|
|
5886
|
-
item.tags && item.tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex flex-wrap gap-1", children: item.tags.slice(0, 3).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5887
|
-
"span",
|
|
5888
|
-
{
|
|
5889
|
-
className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
5890
|
-
children: tag
|
|
5891
|
-
},
|
|
5892
|
-
tag
|
|
5893
|
-
)) })
|
|
5894
|
-
] })
|
|
5895
|
-
] })
|
|
5896
|
-
]
|
|
5897
|
-
},
|
|
5898
|
-
item.id
|
|
5899
|
-
);
|
|
5900
|
-
}),
|
|
5901
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "col-span-2 py-8 text-center text-sm text-muted-foreground", children: "No results found." })
|
|
5902
|
-
]
|
|
5903
|
-
}
|
|
5904
|
-
),
|
|
5905
|
-
renderPreview && pendingItem && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-card p-4", children: renderPreview(pendingItem) }),
|
|
5906
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
5907
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5908
|
-
"button",
|
|
5909
|
-
{
|
|
5910
|
-
type: "button",
|
|
5911
|
-
onClick: onClose,
|
|
5912
|
-
className: cn53(
|
|
5913
|
-
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
5914
|
-
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
5915
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
5916
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5917
|
-
),
|
|
5918
|
-
children: cancelLabel
|
|
5919
|
-
}
|
|
5920
|
-
),
|
|
5921
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5922
|
-
"button",
|
|
5923
|
-
{
|
|
5924
|
-
type: "button",
|
|
5925
|
-
onClick: handleConfirm,
|
|
5926
|
-
disabled: !pendingItem,
|
|
5927
|
-
className: cn53(
|
|
5928
|
-
"inline-flex min-h-[44px] items-center justify-center rounded-md",
|
|
5929
|
-
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
5930
|
-
"hover:bg-primary/90",
|
|
5931
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5932
|
-
"disabled:pointer-events-none disabled:opacity-50"
|
|
5981
|
+
renderPreview && pendingItem && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-card p-4", children: renderPreview(pendingItem) }),
|
|
5982
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
5983
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5984
|
+
"button",
|
|
5985
|
+
{
|
|
5986
|
+
type: "button",
|
|
5987
|
+
onClick: onClose,
|
|
5988
|
+
className: cn53(
|
|
5989
|
+
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
5990
|
+
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
5991
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
5992
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5993
|
+
),
|
|
5994
|
+
children: cancelLabel
|
|
5995
|
+
}
|
|
5933
5996
|
),
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5997
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5998
|
+
"button",
|
|
5999
|
+
{
|
|
6000
|
+
type: "button",
|
|
6001
|
+
onClick: handleConfirm,
|
|
6002
|
+
disabled: !pendingItem,
|
|
6003
|
+
className: cn53(
|
|
6004
|
+
"inline-flex min-h-[44px] items-center justify-center rounded-md",
|
|
6005
|
+
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
6006
|
+
"hover:bg-primary/90",
|
|
6007
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
6008
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
6009
|
+
),
|
|
6010
|
+
children: confirmLabel
|
|
6011
|
+
}
|
|
6012
|
+
)
|
|
6013
|
+
] })
|
|
6014
|
+
] })
|
|
6015
|
+
}
|
|
6016
|
+
);
|
|
5939
6017
|
}
|
|
5940
6018
|
MosaicSelectorModal.displayName = "MosaicSelectorModal";
|
|
5941
6019
|
function cn54(...classes) {
|
|
@@ -6129,6 +6207,13 @@ function MosaicMessageCard({
|
|
|
6129
6207
|
onCopy,
|
|
6130
6208
|
showThread = true,
|
|
6131
6209
|
compact = false,
|
|
6210
|
+
replyLabel,
|
|
6211
|
+
moreOptionsAriaLabel,
|
|
6212
|
+
removeBookmarkAriaLabel,
|
|
6213
|
+
bookmarkAriaLabel,
|
|
6214
|
+
removeBookmarkLabel,
|
|
6215
|
+
bookmarkLabel,
|
|
6216
|
+
copyMessageLabel,
|
|
6132
6217
|
className
|
|
6133
6218
|
}) {
|
|
6134
6219
|
const [bookmarked, setBookmarked] = React27__namespace.useState(message.bookmarked ?? false);
|
|
@@ -6290,7 +6375,7 @@ function MosaicMessageCard({
|
|
|
6290
6375
|
className: "inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
6291
6376
|
children: [
|
|
6292
6377
|
icons.reply,
|
|
6293
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
6378
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: replyLabel })
|
|
6294
6379
|
]
|
|
6295
6380
|
}
|
|
6296
6381
|
)
|
|
@@ -6307,7 +6392,7 @@ function MosaicMessageCard({
|
|
|
6307
6392
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
6308
6393
|
bookmarked && "text-primary"
|
|
6309
6394
|
),
|
|
6310
|
-
"aria-label": bookmarked ?
|
|
6395
|
+
"aria-label": bookmarked ? removeBookmarkAriaLabel : bookmarkAriaLabel,
|
|
6311
6396
|
"aria-pressed": bookmarked,
|
|
6312
6397
|
children: icons.bookmark
|
|
6313
6398
|
}
|
|
@@ -6319,7 +6404,7 @@ function MosaicMessageCard({
|
|
|
6319
6404
|
type: "button",
|
|
6320
6405
|
onClick: () => setMenuOpen((v) => !v),
|
|
6321
6406
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
6322
|
-
"aria-label":
|
|
6407
|
+
"aria-label": moreOptionsAriaLabel,
|
|
6323
6408
|
"aria-haspopup": "menu",
|
|
6324
6409
|
children: icons.more
|
|
6325
6410
|
}
|
|
@@ -6342,7 +6427,7 @@ function MosaicMessageCard({
|
|
|
6342
6427
|
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6343
6428
|
children: [
|
|
6344
6429
|
icons.copy,
|
|
6345
|
-
|
|
6430
|
+
copyMessageLabel
|
|
6346
6431
|
]
|
|
6347
6432
|
}
|
|
6348
6433
|
),
|
|
@@ -6358,7 +6443,7 @@ function MosaicMessageCard({
|
|
|
6358
6443
|
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6359
6444
|
children: [
|
|
6360
6445
|
icons.reply,
|
|
6361
|
-
|
|
6446
|
+
replyLabel
|
|
6362
6447
|
]
|
|
6363
6448
|
}
|
|
6364
6449
|
),
|
|
@@ -6374,7 +6459,7 @@ function MosaicMessageCard({
|
|
|
6374
6459
|
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6375
6460
|
children: [
|
|
6376
6461
|
icons.bookmark,
|
|
6377
|
-
bookmarked ?
|
|
6462
|
+
bookmarked ? removeBookmarkLabel : bookmarkLabel
|
|
6378
6463
|
]
|
|
6379
6464
|
}
|
|
6380
6465
|
)
|
|
@@ -6436,6 +6521,16 @@ function MessageListDesktop({
|
|
|
6436
6521
|
hasMore,
|
|
6437
6522
|
title,
|
|
6438
6523
|
isLoading,
|
|
6524
|
+
searchPlaceholder,
|
|
6525
|
+
emptyMessage,
|
|
6526
|
+
loadMoreLabel,
|
|
6527
|
+
replyLabel,
|
|
6528
|
+
moreOptionsAriaLabel,
|
|
6529
|
+
removeBookmarkAriaLabel,
|
|
6530
|
+
bookmarkAriaLabel,
|
|
6531
|
+
removeBookmarkLabel,
|
|
6532
|
+
bookmarkLabel,
|
|
6533
|
+
copyMessageLabel,
|
|
6439
6534
|
className
|
|
6440
6535
|
}) {
|
|
6441
6536
|
const [query, setQuery] = React27__namespace.useState("");
|
|
@@ -6453,7 +6548,7 @@ function MessageListDesktop({
|
|
|
6453
6548
|
type: "search",
|
|
6454
6549
|
value: query,
|
|
6455
6550
|
onChange: (e) => setQuery(e.target.value),
|
|
6456
|
-
placeholder:
|
|
6551
|
+
placeholder: searchPlaceholder,
|
|
6457
6552
|
className: cn55(
|
|
6458
6553
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
6459
6554
|
"text-sm placeholder:text-muted-foreground",
|
|
@@ -6472,11 +6567,18 @@ function MessageListDesktop({
|
|
|
6472
6567
|
onReply,
|
|
6473
6568
|
onReaction,
|
|
6474
6569
|
onBookmark,
|
|
6475
|
-
onCopy
|
|
6570
|
+
onCopy,
|
|
6571
|
+
replyLabel,
|
|
6572
|
+
moreOptionsAriaLabel,
|
|
6573
|
+
removeBookmarkAriaLabel,
|
|
6574
|
+
bookmarkAriaLabel,
|
|
6575
|
+
removeBookmarkLabel,
|
|
6576
|
+
bookmarkLabel,
|
|
6577
|
+
copyMessageLabel
|
|
6476
6578
|
},
|
|
6477
6579
|
message.id
|
|
6478
6580
|
)),
|
|
6479
|
-
!isLoading && filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children:
|
|
6581
|
+
!isLoading && filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
6480
6582
|
] }),
|
|
6481
6583
|
hasMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6482
6584
|
"button",
|
|
@@ -6488,7 +6590,7 @@ function MessageListDesktop({
|
|
|
6488
6590
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6489
6591
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6490
6592
|
),
|
|
6491
|
-
children:
|
|
6593
|
+
children: loadMoreLabel
|
|
6492
6594
|
}
|
|
6493
6595
|
) })
|
|
6494
6596
|
] });
|
|
@@ -6503,6 +6605,15 @@ function MessageListMobile({
|
|
|
6503
6605
|
hasMore,
|
|
6504
6606
|
title,
|
|
6505
6607
|
isLoading,
|
|
6608
|
+
emptyMessage,
|
|
6609
|
+
loadMoreLabel,
|
|
6610
|
+
replyLabel,
|
|
6611
|
+
moreOptionsAriaLabel,
|
|
6612
|
+
removeBookmarkAriaLabel,
|
|
6613
|
+
bookmarkAriaLabel,
|
|
6614
|
+
removeBookmarkLabel,
|
|
6615
|
+
bookmarkLabel,
|
|
6616
|
+
copyMessageLabel,
|
|
6506
6617
|
className
|
|
6507
6618
|
}) {
|
|
6508
6619
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className: cn55("flex flex-col", className), children: [
|
|
@@ -6517,11 +6628,18 @@ function MessageListMobile({
|
|
|
6517
6628
|
onReaction,
|
|
6518
6629
|
onBookmark,
|
|
6519
6630
|
onCopy,
|
|
6631
|
+
replyLabel,
|
|
6632
|
+
moreOptionsAriaLabel,
|
|
6633
|
+
removeBookmarkAriaLabel,
|
|
6634
|
+
bookmarkAriaLabel,
|
|
6635
|
+
removeBookmarkLabel,
|
|
6636
|
+
bookmarkLabel,
|
|
6637
|
+
copyMessageLabel,
|
|
6520
6638
|
compact: true
|
|
6521
6639
|
},
|
|
6522
6640
|
message.id
|
|
6523
6641
|
)),
|
|
6524
|
-
!isLoading && messages.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children:
|
|
6642
|
+
!isLoading && messages.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
6525
6643
|
] }),
|
|
6526
6644
|
hasMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6527
6645
|
"button",
|
|
@@ -6533,7 +6651,7 @@ function MessageListMobile({
|
|
|
6533
6651
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6534
6652
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6535
6653
|
),
|
|
6536
|
-
children:
|
|
6654
|
+
children: loadMoreLabel
|
|
6537
6655
|
}
|
|
6538
6656
|
) })
|
|
6539
6657
|
] });
|
|
@@ -6609,7 +6727,11 @@ function MosaicFilterSidebar({
|
|
|
6609
6727
|
categories = [],
|
|
6610
6728
|
selectedCategory,
|
|
6611
6729
|
onCategoryChange,
|
|
6612
|
-
title
|
|
6730
|
+
title,
|
|
6731
|
+
expandFiltersAriaLabel,
|
|
6732
|
+
categoriesHeading,
|
|
6733
|
+
collapseSidebarAriaLabel,
|
|
6734
|
+
expandSidebarAriaLabel,
|
|
6613
6735
|
className
|
|
6614
6736
|
}) {
|
|
6615
6737
|
const { isMobile, isTablet } = useDevice();
|
|
@@ -6637,7 +6759,7 @@ function MosaicFilterSidebar({
|
|
|
6637
6759
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6638
6760
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6639
6761
|
),
|
|
6640
|
-
"aria-label": isCollapsed ?
|
|
6762
|
+
"aria-label": isCollapsed ? expandSidebarAriaLabel : collapseSidebarAriaLabel,
|
|
6641
6763
|
children: isCollapsed ? /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon3, {}) : /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon2, {})
|
|
6642
6764
|
}
|
|
6643
6765
|
),
|
|
@@ -6647,7 +6769,7 @@ function MosaicFilterSidebar({
|
|
|
6647
6769
|
type: "button",
|
|
6648
6770
|
onClick: onToggleCollapse,
|
|
6649
6771
|
className: "flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6650
|
-
"aria-label":
|
|
6772
|
+
"aria-label": expandFiltersAriaLabel,
|
|
6651
6773
|
children: /* @__PURE__ */ jsxRuntime.jsx(FilterIcon, {})
|
|
6652
6774
|
}
|
|
6653
6775
|
) }),
|
|
@@ -6675,7 +6797,7 @@ function MosaicFilterSidebar({
|
|
|
6675
6797
|
f.id
|
|
6676
6798
|
)) }),
|
|
6677
6799
|
categories.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
6678
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children:
|
|
6800
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: categoriesHeading }),
|
|
6679
6801
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1", children: categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6680
6802
|
"button",
|
|
6681
6803
|
{
|
|
@@ -6777,9 +6899,15 @@ function AgentListDesktop({
|
|
|
6777
6899
|
onEditAgent,
|
|
6778
6900
|
onCreateAgent,
|
|
6779
6901
|
headerActions,
|
|
6780
|
-
title
|
|
6781
|
-
searchPlaceholder
|
|
6782
|
-
createLabel
|
|
6902
|
+
title,
|
|
6903
|
+
searchPlaceholder,
|
|
6904
|
+
createLabel,
|
|
6905
|
+
emptyMessage,
|
|
6906
|
+
agentCardLabels,
|
|
6907
|
+
expandFiltersAriaLabel,
|
|
6908
|
+
categoriesHeading,
|
|
6909
|
+
collapseSidebarAriaLabel,
|
|
6910
|
+
expandSidebarAriaLabel
|
|
6783
6911
|
}) {
|
|
6784
6912
|
const [query, setQuery] = React27__namespace.useState("");
|
|
6785
6913
|
const [sidebarCollapsed, setSidebarCollapsed] = React27__namespace.useState(false);
|
|
@@ -6802,7 +6930,11 @@ function AgentListDesktop({
|
|
|
6802
6930
|
onFilterChange,
|
|
6803
6931
|
categories,
|
|
6804
6932
|
selectedCategory,
|
|
6805
|
-
onCategoryChange
|
|
6933
|
+
onCategoryChange,
|
|
6934
|
+
expandFiltersAriaLabel,
|
|
6935
|
+
categoriesHeading,
|
|
6936
|
+
collapseSidebarAriaLabel,
|
|
6937
|
+
expandSidebarAriaLabel
|
|
6806
6938
|
}
|
|
6807
6939
|
),
|
|
6808
6940
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
@@ -6841,14 +6973,15 @@ function AgentListDesktop({
|
|
|
6841
6973
|
)
|
|
6842
6974
|
] }) }),
|
|
6843
6975
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto p-6", children: [
|
|
6844
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children:
|
|
6976
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
6845
6977
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3", children: filtered.map((agent) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6846
6978
|
MosaicAgentCard,
|
|
6847
6979
|
{
|
|
6848
6980
|
agent,
|
|
6849
6981
|
onToggleStatus,
|
|
6850
6982
|
onDelete: onDeleteAgent,
|
|
6851
|
-
onEdit: onEditAgent
|
|
6983
|
+
onEdit: onEditAgent,
|
|
6984
|
+
...agentCardLabels
|
|
6852
6985
|
},
|
|
6853
6986
|
agent.id
|
|
6854
6987
|
)) })
|
|
@@ -6869,9 +7002,18 @@ function AgentListMobile({
|
|
|
6869
7002
|
onDeleteAgent,
|
|
6870
7003
|
onEditAgent,
|
|
6871
7004
|
onCreateAgent,
|
|
6872
|
-
title
|
|
6873
|
-
searchPlaceholder
|
|
6874
|
-
createLabel
|
|
7005
|
+
title,
|
|
7006
|
+
searchPlaceholder,
|
|
7007
|
+
createLabel,
|
|
7008
|
+
emptyMessage,
|
|
7009
|
+
openFiltersAriaLabel,
|
|
7010
|
+
filtersModalTitle,
|
|
7011
|
+
closeFiltersAriaLabel,
|
|
7012
|
+
agentCardLabels,
|
|
7013
|
+
expandFiltersAriaLabel,
|
|
7014
|
+
categoriesHeading,
|
|
7015
|
+
collapseSidebarAriaLabel,
|
|
7016
|
+
expandSidebarAriaLabel
|
|
6875
7017
|
}) {
|
|
6876
7018
|
const [filterOpen, setFilterOpen] = React27__namespace.useState(false);
|
|
6877
7019
|
const [query, setQuery] = React27__namespace.useState("");
|
|
@@ -6894,7 +7036,7 @@ function AgentListMobile({
|
|
|
6894
7036
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6895
7037
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6896
7038
|
),
|
|
6897
|
-
"aria-label":
|
|
7039
|
+
"aria-label": openFiltersAriaLabel,
|
|
6898
7040
|
children: /* @__PURE__ */ jsxRuntime.jsx(FilterIcon2, {})
|
|
6899
7041
|
}
|
|
6900
7042
|
),
|
|
@@ -6940,31 +7082,45 @@ function AgentListMobile({
|
|
|
6940
7082
|
agent,
|
|
6941
7083
|
onToggleStatus,
|
|
6942
7084
|
onDelete: onDeleteAgent,
|
|
6943
|
-
onEdit: onEditAgent
|
|
7085
|
+
onEdit: onEditAgent,
|
|
7086
|
+
...agentCardLabels
|
|
6944
7087
|
},
|
|
6945
7088
|
agent.id
|
|
6946
7089
|
)),
|
|
6947
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children:
|
|
7090
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
6948
7091
|
] }),
|
|
6949
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6950
|
-
|
|
7092
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7093
|
+
MosaicAdaptiveModal,
|
|
6951
7094
|
{
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
7095
|
+
isOpen: filterOpen,
|
|
7096
|
+
onClose: () => setFilterOpen(false),
|
|
7097
|
+
title: filtersModalTitle,
|
|
7098
|
+
closeAriaLabel: closeFiltersAriaLabel,
|
|
7099
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7100
|
+
MosaicFilterSidebar,
|
|
7101
|
+
{
|
|
7102
|
+
isCollapsed: false,
|
|
7103
|
+
onToggleCollapse: () => setFilterOpen(false),
|
|
7104
|
+
filters,
|
|
7105
|
+
selectedFilter,
|
|
7106
|
+
onFilterChange: (id) => {
|
|
7107
|
+
onFilterChange(id);
|
|
7108
|
+
setFilterOpen(false);
|
|
7109
|
+
},
|
|
7110
|
+
categories,
|
|
7111
|
+
selectedCategory,
|
|
7112
|
+
expandFiltersAriaLabel,
|
|
7113
|
+
categoriesHeading,
|
|
7114
|
+
collapseSidebarAriaLabel,
|
|
7115
|
+
expandSidebarAriaLabel,
|
|
7116
|
+
onCategoryChange: (id) => {
|
|
7117
|
+
onCategoryChange(id);
|
|
7118
|
+
setFilterOpen(false);
|
|
7119
|
+
}
|
|
7120
|
+
}
|
|
7121
|
+
) })
|
|
6966
7122
|
}
|
|
6967
|
-
)
|
|
7123
|
+
)
|
|
6968
7124
|
] });
|
|
6969
7125
|
}
|
|
6970
7126
|
function MosaicAgentList(props) {
|
|
@@ -7061,6 +7217,7 @@ function MarketplaceCard({
|
|
|
7061
7217
|
onPreview,
|
|
7062
7218
|
installLabel,
|
|
7063
7219
|
uninstallLabel,
|
|
7220
|
+
previewLabel,
|
|
7064
7221
|
compact = false
|
|
7065
7222
|
}) {
|
|
7066
7223
|
const ratingInt = Math.round(item.rating ?? 0);
|
|
@@ -7116,7 +7273,7 @@ function MarketplaceCard({
|
|
|
7116
7273
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7117
7274
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
7118
7275
|
),
|
|
7119
|
-
children:
|
|
7276
|
+
children: previewLabel
|
|
7120
7277
|
}
|
|
7121
7278
|
),
|
|
7122
7279
|
item.isInstalled ? onUninstall && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7163,10 +7320,16 @@ function MarketplaceListDesktop(props) {
|
|
|
7163
7320
|
onInstall,
|
|
7164
7321
|
onUninstall,
|
|
7165
7322
|
onPreview,
|
|
7166
|
-
title
|
|
7167
|
-
searchPlaceholder
|
|
7168
|
-
installLabel
|
|
7169
|
-
uninstallLabel
|
|
7323
|
+
title,
|
|
7324
|
+
searchPlaceholder,
|
|
7325
|
+
installLabel,
|
|
7326
|
+
uninstallLabel,
|
|
7327
|
+
previewLabel,
|
|
7328
|
+
emptyMessage,
|
|
7329
|
+
expandFiltersAriaLabel,
|
|
7330
|
+
categoriesHeading,
|
|
7331
|
+
collapseSidebarAriaLabel,
|
|
7332
|
+
expandSidebarAriaLabel
|
|
7170
7333
|
} = props;
|
|
7171
7334
|
const [query, setQuery] = React27__namespace.useState("");
|
|
7172
7335
|
const [sidebarCollapsed, setSidebarCollapsed] = React27__namespace.useState(false);
|
|
@@ -7186,7 +7349,11 @@ function MarketplaceListDesktop(props) {
|
|
|
7186
7349
|
onFilterChange,
|
|
7187
7350
|
categories,
|
|
7188
7351
|
selectedCategory,
|
|
7189
|
-
onCategoryChange
|
|
7352
|
+
onCategoryChange,
|
|
7353
|
+
expandFiltersAriaLabel,
|
|
7354
|
+
categoriesHeading,
|
|
7355
|
+
collapseSidebarAriaLabel,
|
|
7356
|
+
expandSidebarAriaLabel
|
|
7190
7357
|
}
|
|
7191
7358
|
),
|
|
7192
7359
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
@@ -7216,11 +7383,12 @@ function MarketplaceListDesktop(props) {
|
|
|
7216
7383
|
onUninstall,
|
|
7217
7384
|
onPreview,
|
|
7218
7385
|
installLabel,
|
|
7219
|
-
uninstallLabel
|
|
7386
|
+
uninstallLabel,
|
|
7387
|
+
previewLabel
|
|
7220
7388
|
},
|
|
7221
7389
|
item.id
|
|
7222
7390
|
)) }),
|
|
7223
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children:
|
|
7391
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
7224
7392
|
] })
|
|
7225
7393
|
] })
|
|
7226
7394
|
] })
|
|
@@ -7238,10 +7406,19 @@ function MarketplaceListMobile(props) {
|
|
|
7238
7406
|
onInstall,
|
|
7239
7407
|
onUninstall,
|
|
7240
7408
|
onPreview,
|
|
7241
|
-
title
|
|
7242
|
-
searchPlaceholder
|
|
7243
|
-
installLabel
|
|
7244
|
-
uninstallLabel
|
|
7409
|
+
title,
|
|
7410
|
+
searchPlaceholder,
|
|
7411
|
+
installLabel,
|
|
7412
|
+
uninstallLabel,
|
|
7413
|
+
previewLabel,
|
|
7414
|
+
emptyMessage,
|
|
7415
|
+
openFiltersAriaLabel,
|
|
7416
|
+
filtersModalTitle,
|
|
7417
|
+
closeFiltersAriaLabel,
|
|
7418
|
+
expandFiltersAriaLabel,
|
|
7419
|
+
categoriesHeading,
|
|
7420
|
+
collapseSidebarAriaLabel,
|
|
7421
|
+
expandSidebarAriaLabel
|
|
7245
7422
|
} = props;
|
|
7246
7423
|
const [filterOpen, setFilterOpen] = React27__namespace.useState(false);
|
|
7247
7424
|
const [query, setQuery] = React27__namespace.useState("");
|
|
@@ -7258,7 +7435,7 @@ function MarketplaceListMobile(props) {
|
|
|
7258
7435
|
type: "button",
|
|
7259
7436
|
onClick: () => setFilterOpen(true),
|
|
7260
7437
|
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7261
|
-
"aria-label":
|
|
7438
|
+
"aria-label": openFiltersAriaLabel,
|
|
7262
7439
|
children: /* @__PURE__ */ jsxRuntime.jsx(FilterIcon3, {})
|
|
7263
7440
|
}
|
|
7264
7441
|
)
|
|
@@ -7291,31 +7468,45 @@ function MarketplaceListMobile(props) {
|
|
|
7291
7468
|
onPreview,
|
|
7292
7469
|
installLabel,
|
|
7293
7470
|
uninstallLabel,
|
|
7471
|
+
previewLabel,
|
|
7294
7472
|
compact: true
|
|
7295
7473
|
},
|
|
7296
7474
|
item.id
|
|
7297
7475
|
)),
|
|
7298
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children:
|
|
7476
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
7299
7477
|
] }),
|
|
7300
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7301
|
-
|
|
7478
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7479
|
+
MosaicAdaptiveModal,
|
|
7302
7480
|
{
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7481
|
+
isOpen: filterOpen,
|
|
7482
|
+
onClose: () => setFilterOpen(false),
|
|
7483
|
+
title: filtersModalTitle,
|
|
7484
|
+
closeAriaLabel: closeFiltersAriaLabel,
|
|
7485
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7486
|
+
MosaicFilterSidebar,
|
|
7487
|
+
{
|
|
7488
|
+
isCollapsed: false,
|
|
7489
|
+
onToggleCollapse: () => setFilterOpen(false),
|
|
7490
|
+
filters,
|
|
7491
|
+
selectedFilter,
|
|
7492
|
+
onFilterChange: (id) => {
|
|
7493
|
+
onFilterChange(id);
|
|
7494
|
+
setFilterOpen(false);
|
|
7495
|
+
},
|
|
7496
|
+
categories,
|
|
7497
|
+
selectedCategory,
|
|
7498
|
+
expandFiltersAriaLabel,
|
|
7499
|
+
categoriesHeading,
|
|
7500
|
+
collapseSidebarAriaLabel,
|
|
7501
|
+
expandSidebarAriaLabel,
|
|
7502
|
+
onCategoryChange: (id) => {
|
|
7503
|
+
onCategoryChange(id);
|
|
7504
|
+
setFilterOpen(false);
|
|
7505
|
+
}
|
|
7506
|
+
}
|
|
7507
|
+
) })
|
|
7317
7508
|
}
|
|
7318
|
-
)
|
|
7509
|
+
)
|
|
7319
7510
|
] });
|
|
7320
7511
|
}
|
|
7321
7512
|
function MosaicMarketplaceList(props) {
|
|
@@ -7431,7 +7622,9 @@ function MosaicTemplateCard({
|
|
|
7431
7622
|
onPreview,
|
|
7432
7623
|
onDuplicate,
|
|
7433
7624
|
showActions = false,
|
|
7434
|
-
compact = false
|
|
7625
|
+
compact = false,
|
|
7626
|
+
previewLabel,
|
|
7627
|
+
duplicateLabel
|
|
7435
7628
|
}) {
|
|
7436
7629
|
const isPopular = (template.metadata?.usageCount ?? 0) > 10;
|
|
7437
7630
|
const isTrending = (template.metadata?.usageCount ?? 0) > 5;
|
|
@@ -7492,7 +7685,7 @@ function MosaicTemplateCard({
|
|
|
7492
7685
|
onPreview(template);
|
|
7493
7686
|
},
|
|
7494
7687
|
className: "inline-flex h-7 items-center gap-1 rounded-md border border-border bg-background px-2.5 text-xs font-medium hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
7495
|
-
children:
|
|
7688
|
+
children: previewLabel
|
|
7496
7689
|
}
|
|
7497
7690
|
),
|
|
7498
7691
|
onDuplicate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7504,7 +7697,7 @@ function MosaicTemplateCard({
|
|
|
7504
7697
|
onDuplicate(template);
|
|
7505
7698
|
},
|
|
7506
7699
|
className: "inline-flex h-7 items-center gap-1 rounded-md border border-border bg-background px-2.5 text-xs font-medium hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
7507
|
-
children:
|
|
7700
|
+
children: duplicateLabel
|
|
7508
7701
|
}
|
|
7509
7702
|
)
|
|
7510
7703
|
] })
|
|
@@ -7517,7 +7710,8 @@ function MosaicTemplatePreview({
|
|
|
7517
7710
|
template,
|
|
7518
7711
|
onSelect,
|
|
7519
7712
|
onClose,
|
|
7520
|
-
selectLabel
|
|
7713
|
+
selectLabel,
|
|
7714
|
+
cancelLabel
|
|
7521
7715
|
}) {
|
|
7522
7716
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "template-preview", className: "flex flex-col gap-4 p-4", children: [
|
|
7523
7717
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -7575,7 +7769,7 @@ function MosaicTemplatePreview({
|
|
|
7575
7769
|
type: "button",
|
|
7576
7770
|
onClick: onClose,
|
|
7577
7771
|
className: "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7578
|
-
children:
|
|
7772
|
+
children: cancelLabel
|
|
7579
7773
|
}
|
|
7580
7774
|
),
|
|
7581
7775
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7621,9 +7815,9 @@ function MosaicQuickStartPanel({
|
|
|
7621
7815
|
onSelectScenario,
|
|
7622
7816
|
onSelectPreset,
|
|
7623
7817
|
onStartFromScratch,
|
|
7624
|
-
scenariosTitle
|
|
7625
|
-
presetsTitle
|
|
7626
|
-
scratchLabel
|
|
7818
|
+
scenariosTitle,
|
|
7819
|
+
presetsTitle,
|
|
7820
|
+
scratchLabel,
|
|
7627
7821
|
className
|
|
7628
7822
|
}) {
|
|
7629
7823
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-start-panel", className: cn59("flex flex-col gap-6", className), children: [
|
|
@@ -7723,8 +7917,18 @@ function TemplateGalleryContent({
|
|
|
7723
7917
|
selectedCategory,
|
|
7724
7918
|
onCategoryChange,
|
|
7725
7919
|
showActions,
|
|
7726
|
-
title
|
|
7727
|
-
searchPlaceholder
|
|
7920
|
+
title,
|
|
7921
|
+
searchPlaceholder,
|
|
7922
|
+
emptyMessage,
|
|
7923
|
+
openFiltersAriaLabel,
|
|
7924
|
+
filtersTitle,
|
|
7925
|
+
closeFiltersAriaLabel,
|
|
7926
|
+
expandFiltersAriaLabel,
|
|
7927
|
+
categoriesHeading,
|
|
7928
|
+
collapseSidebarAriaLabel,
|
|
7929
|
+
expandSidebarAriaLabel,
|
|
7930
|
+
previewLabel,
|
|
7931
|
+
duplicateLabel,
|
|
7728
7932
|
isMobile
|
|
7729
7933
|
}) {
|
|
7730
7934
|
const [query, setQuery] = React27__namespace.useState("");
|
|
@@ -7750,7 +7954,11 @@ function TemplateGalleryContent({
|
|
|
7750
7954
|
onCategoryChange(id);
|
|
7751
7955
|
setFilterOpen(false);
|
|
7752
7956
|
} : onCategoryChange,
|
|
7753
|
-
title:
|
|
7957
|
+
title: filtersTitle,
|
|
7958
|
+
expandFiltersAriaLabel,
|
|
7959
|
+
categoriesHeading,
|
|
7960
|
+
collapseSidebarAriaLabel,
|
|
7961
|
+
expandSidebarAriaLabel
|
|
7754
7962
|
}
|
|
7755
7963
|
);
|
|
7756
7964
|
if (isMobile) {
|
|
@@ -7764,7 +7972,7 @@ function TemplateGalleryContent({
|
|
|
7764
7972
|
type: "button",
|
|
7765
7973
|
onClick: () => setFilterOpen(true),
|
|
7766
7974
|
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7767
|
-
"aria-label":
|
|
7975
|
+
"aria-label": openFiltersAriaLabel,
|
|
7768
7976
|
children: /* @__PURE__ */ jsxRuntime.jsx(FilterIcon4, {})
|
|
7769
7977
|
}
|
|
7770
7978
|
)
|
|
@@ -7795,18 +8003,21 @@ function TemplateGalleryContent({
|
|
|
7795
8003
|
onPreview: onPreviewTemplate,
|
|
7796
8004
|
onDuplicate: onDuplicateTemplate,
|
|
7797
8005
|
showActions,
|
|
8006
|
+
previewLabel,
|
|
8007
|
+
duplicateLabel,
|
|
7798
8008
|
compact: true
|
|
7799
8009
|
},
|
|
7800
8010
|
template.id
|
|
7801
8011
|
)),
|
|
7802
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children:
|
|
8012
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
7803
8013
|
] }),
|
|
7804
8014
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7805
8015
|
MosaicAdaptiveModal,
|
|
7806
8016
|
{
|
|
7807
8017
|
isOpen: filterOpen,
|
|
7808
8018
|
onClose: () => setFilterOpen(false),
|
|
7809
|
-
title:
|
|
8019
|
+
title: filtersTitle,
|
|
8020
|
+
closeAriaLabel: closeFiltersAriaLabel,
|
|
7810
8021
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: sidebar })
|
|
7811
8022
|
}
|
|
7812
8023
|
)
|
|
@@ -7841,11 +8052,13 @@ function TemplateGalleryContent({
|
|
|
7841
8052
|
onSelect: onSelectTemplate,
|
|
7842
8053
|
onPreview: onPreviewTemplate,
|
|
7843
8054
|
onDuplicate: onDuplicateTemplate,
|
|
7844
|
-
showActions
|
|
8055
|
+
showActions,
|
|
8056
|
+
previewLabel,
|
|
8057
|
+
duplicateLabel
|
|
7845
8058
|
},
|
|
7846
8059
|
template.id
|
|
7847
8060
|
)) }),
|
|
7848
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children:
|
|
8061
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
7849
8062
|
] })
|
|
7850
8063
|
] })
|
|
7851
8064
|
] })
|
|
@@ -7949,7 +8162,15 @@ function MosaicModuleForm({
|
|
|
7949
8162
|
mode,
|
|
7950
8163
|
formFields = [],
|
|
7951
8164
|
onSave,
|
|
7952
|
-
onCancel
|
|
8165
|
+
onCancel,
|
|
8166
|
+
nameFieldLabel,
|
|
8167
|
+
descriptionFieldLabel,
|
|
8168
|
+
namePlaceholder,
|
|
8169
|
+
descriptionPlaceholder,
|
|
8170
|
+
cancelLabel,
|
|
8171
|
+
saveChangesLabel,
|
|
8172
|
+
createItemLabel,
|
|
8173
|
+
tagListAddPlaceholder
|
|
7953
8174
|
}) {
|
|
7954
8175
|
const [formData, setFormData] = React27__namespace.useState({
|
|
7955
8176
|
name: item?.name ?? "",
|
|
@@ -7990,7 +8211,7 @@ function MosaicModuleForm({
|
|
|
7990
8211
|
};
|
|
7991
8212
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "module-form", className: "flex flex-col gap-4 p-4", children: [
|
|
7992
8213
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
7993
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "module-name", className: "text-sm font-medium", children:
|
|
8214
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "module-name", className: "text-sm font-medium", children: nameFieldLabel }),
|
|
7994
8215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7995
8216
|
"input",
|
|
7996
8217
|
{
|
|
@@ -7998,7 +8219,7 @@ function MosaicModuleForm({
|
|
|
7998
8219
|
type: "text",
|
|
7999
8220
|
value: formData.name,
|
|
8000
8221
|
onChange: (e) => update("name", e.target.value),
|
|
8001
|
-
placeholder:
|
|
8222
|
+
placeholder: namePlaceholder,
|
|
8002
8223
|
required: true,
|
|
8003
8224
|
className: cn60(
|
|
8004
8225
|
"w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
|
|
@@ -8009,14 +8230,14 @@ function MosaicModuleForm({
|
|
|
8009
8230
|
)
|
|
8010
8231
|
] }),
|
|
8011
8232
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8012
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "module-desc", className: "text-sm font-medium", children:
|
|
8233
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "module-desc", className: "text-sm font-medium", children: descriptionFieldLabel }),
|
|
8013
8234
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8014
8235
|
"textarea",
|
|
8015
8236
|
{
|
|
8016
8237
|
id: "module-desc",
|
|
8017
8238
|
value: formData.description,
|
|
8018
8239
|
onChange: (e) => update("description", e.target.value),
|
|
8019
|
-
placeholder:
|
|
8240
|
+
placeholder: descriptionPlaceholder,
|
|
8020
8241
|
rows: 3,
|
|
8021
8242
|
className: cn60(
|
|
8022
8243
|
"w-full rounded-md border border-input bg-background px-3 py-2",
|
|
@@ -8091,7 +8312,7 @@ function MosaicModuleForm({
|
|
|
8091
8312
|
addTag(field.id);
|
|
8092
8313
|
}
|
|
8093
8314
|
},
|
|
8094
|
-
placeholder: field.placeholder ??
|
|
8315
|
+
placeholder: field.placeholder ?? tagListAddPlaceholder,
|
|
8095
8316
|
className: cn60(
|
|
8096
8317
|
"flex-1 rounded-md border border-input bg-background px-3 py-2 min-h-[36px]",
|
|
8097
8318
|
"text-sm placeholder:text-muted-foreground",
|
|
@@ -8138,7 +8359,7 @@ function MosaicModuleForm({
|
|
|
8138
8359
|
type: "button",
|
|
8139
8360
|
onClick: onCancel,
|
|
8140
8361
|
className: "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8141
|
-
children:
|
|
8362
|
+
children: cancelLabel
|
|
8142
8363
|
}
|
|
8143
8364
|
),
|
|
8144
8365
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8148,7 +8369,7 @@ function MosaicModuleForm({
|
|
|
8148
8369
|
onClick: handleSave,
|
|
8149
8370
|
disabled: !formData.name,
|
|
8150
8371
|
className: "inline-flex min-h-[44px] items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none",
|
|
8151
|
-
children: mode === "edit" ?
|
|
8372
|
+
children: mode === "edit" ? saveChangesLabel : createItemLabel
|
|
8152
8373
|
}
|
|
8153
8374
|
)
|
|
8154
8375
|
] })
|
|
@@ -8158,7 +8379,10 @@ MosaicModuleForm.displayName = "MosaicModuleForm";
|
|
|
8158
8379
|
function ModuleItemCard({
|
|
8159
8380
|
item,
|
|
8160
8381
|
onEdit,
|
|
8161
|
-
onDelete
|
|
8382
|
+
onDelete,
|
|
8383
|
+
itemActionsAriaLabel,
|
|
8384
|
+
editItemLabel,
|
|
8385
|
+
deleteItemLabel
|
|
8162
8386
|
}) {
|
|
8163
8387
|
const [menuOpen, setMenuOpen] = React27__namespace.useState(false);
|
|
8164
8388
|
const menuRef = React27__namespace.useRef(null);
|
|
@@ -8193,7 +8417,7 @@ function ModuleItemCard({
|
|
|
8193
8417
|
type: "button",
|
|
8194
8418
|
onClick: () => setMenuOpen((v) => !v),
|
|
8195
8419
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring opacity-0 group-hover:opacity-100 transition-opacity",
|
|
8196
|
-
"aria-label":
|
|
8420
|
+
"aria-label": itemActionsAriaLabel,
|
|
8197
8421
|
"aria-haspopup": "menu",
|
|
8198
8422
|
children: /* @__PURE__ */ jsxRuntime.jsx(MoreVertIcon2, {})
|
|
8199
8423
|
}
|
|
@@ -8214,7 +8438,7 @@ function ModuleItemCard({
|
|
|
8214
8438
|
setMenuOpen(false);
|
|
8215
8439
|
},
|
|
8216
8440
|
className: "flex w-full items-center px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
8217
|
-
children:
|
|
8441
|
+
children: editItemLabel
|
|
8218
8442
|
}
|
|
8219
8443
|
),
|
|
8220
8444
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8227,7 +8451,7 @@ function ModuleItemCard({
|
|
|
8227
8451
|
setMenuOpen(false);
|
|
8228
8452
|
},
|
|
8229
8453
|
className: "flex w-full items-center px-3 py-2 text-sm text-destructive hover:bg-destructive/10",
|
|
8230
|
-
children:
|
|
8454
|
+
children: deleteItemLabel
|
|
8231
8455
|
}
|
|
8232
8456
|
)
|
|
8233
8457
|
]
|
|
@@ -8245,10 +8469,23 @@ function LibraryContent({
|
|
|
8245
8469
|
tabs,
|
|
8246
8470
|
tabFilter,
|
|
8247
8471
|
formFields,
|
|
8248
|
-
title
|
|
8249
|
-
createLabel
|
|
8250
|
-
searchPlaceholder
|
|
8251
|
-
emptyMessage
|
|
8472
|
+
title,
|
|
8473
|
+
createLabel,
|
|
8474
|
+
searchPlaceholder,
|
|
8475
|
+
emptyMessage,
|
|
8476
|
+
nameFieldLabel,
|
|
8477
|
+
descriptionFieldLabel,
|
|
8478
|
+
namePlaceholder,
|
|
8479
|
+
descriptionPlaceholder,
|
|
8480
|
+
cancelLabel,
|
|
8481
|
+
saveChangesLabel,
|
|
8482
|
+
createItemLabel,
|
|
8483
|
+
itemActionsAriaLabel,
|
|
8484
|
+
editItemLabel,
|
|
8485
|
+
deleteItemLabel,
|
|
8486
|
+
closeEditorAriaLabel,
|
|
8487
|
+
editModalTitle,
|
|
8488
|
+
tagListAddPlaceholder
|
|
8252
8489
|
}) {
|
|
8253
8490
|
const [query, setQuery] = React27__namespace.useState("");
|
|
8254
8491
|
const [activeTab, setActiveTab] = React27__namespace.useState(tabs?.[0]?.id ?? "all");
|
|
@@ -8330,13 +8567,25 @@ function LibraryContent({
|
|
|
8330
8567
|
tab.id
|
|
8331
8568
|
)) })
|
|
8332
8569
|
] }),
|
|
8333
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-4 md:p-6", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-24 animate-pulse rounded-lg bg-muted" }, i)) }) : filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3", children: filtered.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8570
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-4 md:p-6", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-24 animate-pulse rounded-lg bg-muted" }, i)) }) : filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: emptyMessage }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3", children: filtered.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8571
|
+
ModuleItemCard,
|
|
8572
|
+
{
|
|
8573
|
+
item,
|
|
8574
|
+
onEdit: openEdit,
|
|
8575
|
+
onDelete: onDeleteItem,
|
|
8576
|
+
itemActionsAriaLabel,
|
|
8577
|
+
editItemLabel,
|
|
8578
|
+
deleteItemLabel
|
|
8579
|
+
},
|
|
8580
|
+
item.id
|
|
8581
|
+
)) }) }),
|
|
8334
8582
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8335
8583
|
MosaicAdaptiveModal,
|
|
8336
8584
|
{
|
|
8337
8585
|
isOpen: editorOpen,
|
|
8338
8586
|
onClose: () => setEditorOpen(false),
|
|
8339
|
-
title: editorMode === "edit" ?
|
|
8587
|
+
title: editorMode === "edit" ? editModalTitle(editingItem?.name ?? "") : createLabel,
|
|
8588
|
+
closeAriaLabel: closeEditorAriaLabel,
|
|
8340
8589
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8341
8590
|
MosaicModuleForm,
|
|
8342
8591
|
{
|
|
@@ -8344,7 +8593,15 @@ function LibraryContent({
|
|
|
8344
8593
|
mode: editorMode,
|
|
8345
8594
|
formFields,
|
|
8346
8595
|
onSave: handleSave,
|
|
8347
|
-
onCancel: () => setEditorOpen(false)
|
|
8596
|
+
onCancel: () => setEditorOpen(false),
|
|
8597
|
+
nameFieldLabel,
|
|
8598
|
+
descriptionFieldLabel,
|
|
8599
|
+
namePlaceholder,
|
|
8600
|
+
descriptionPlaceholder,
|
|
8601
|
+
cancelLabel,
|
|
8602
|
+
saveChangesLabel,
|
|
8603
|
+
createItemLabel,
|
|
8604
|
+
tagListAddPlaceholder
|
|
8348
8605
|
}
|
|
8349
8606
|
)
|
|
8350
8607
|
}
|
|
@@ -8447,7 +8704,16 @@ function MosaicCreateOrgDialog({
|
|
|
8447
8704
|
onOpenChange,
|
|
8448
8705
|
onCreateOrg,
|
|
8449
8706
|
isLoading = false,
|
|
8450
|
-
title
|
|
8707
|
+
title,
|
|
8708
|
+
closeAriaLabel,
|
|
8709
|
+
orgNameFieldLabel,
|
|
8710
|
+
orgNamePlaceholder,
|
|
8711
|
+
slugFieldLabel,
|
|
8712
|
+
descriptionFieldLabel,
|
|
8713
|
+
descriptionPlaceholder,
|
|
8714
|
+
cancelLabel,
|
|
8715
|
+
creatingLabel,
|
|
8716
|
+
createLabel
|
|
8451
8717
|
}) {
|
|
8452
8718
|
const [name, setName] = React27__namespace.useState("");
|
|
8453
8719
|
const [slug, setSlug] = React27__namespace.useState("");
|
|
@@ -8485,90 +8751,99 @@ function MosaicCreateOrgDialog({
|
|
|
8485
8751
|
name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "")
|
|
8486
8752
|
);
|
|
8487
8753
|
}, [name]);
|
|
8488
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8489
|
-
|
|
8754
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8755
|
+
MosaicAdaptiveModal,
|
|
8490
8756
|
{
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8757
|
+
isOpen: open,
|
|
8758
|
+
onClose: () => onOpenChange(false),
|
|
8759
|
+
title,
|
|
8760
|
+
closeAriaLabel,
|
|
8761
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8762
|
+
"form",
|
|
8763
|
+
{
|
|
8764
|
+
"data-slot": "create-org-dialog",
|
|
8765
|
+
onSubmit: handleSubmit,
|
|
8766
|
+
className: "flex flex-col gap-4 p-4",
|
|
8767
|
+
children: [
|
|
8768
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8769
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "org-name", className: "text-sm font-medium", children: orgNameFieldLabel }),
|
|
8770
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8771
|
+
"input",
|
|
8772
|
+
{
|
|
8773
|
+
id: "org-name",
|
|
8774
|
+
type: "text",
|
|
8775
|
+
value: name,
|
|
8776
|
+
onChange: (e) => setName(e.target.value),
|
|
8777
|
+
placeholder: orgNamePlaceholder,
|
|
8778
|
+
required: true,
|
|
8779
|
+
className: cn61(
|
|
8780
|
+
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
8781
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8782
|
+
errors.name ? "border-destructive" : "border-input"
|
|
8783
|
+
)
|
|
8784
|
+
}
|
|
8785
|
+
),
|
|
8786
|
+
errors.name && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: errors.name })
|
|
8787
|
+
] }),
|
|
8788
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8789
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "org-slug", className: "text-sm font-medium", children: slugFieldLabel }),
|
|
8790
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8791
|
+
"input",
|
|
8792
|
+
{
|
|
8793
|
+
id: "org-slug",
|
|
8794
|
+
type: "text",
|
|
8795
|
+
value: slug,
|
|
8796
|
+
onChange: (e) => setSlug(e.target.value),
|
|
8797
|
+
placeholder: "acme-inc",
|
|
8798
|
+
required: true,
|
|
8799
|
+
className: cn61(
|
|
8800
|
+
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
8801
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8802
|
+
errors.slug ? "border-destructive" : "border-input"
|
|
8803
|
+
)
|
|
8804
|
+
}
|
|
8805
|
+
),
|
|
8806
|
+
errors.slug && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: errors.slug })
|
|
8807
|
+
] }),
|
|
8808
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8809
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "org-desc", className: "text-sm font-medium", children: descriptionFieldLabel }),
|
|
8810
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8811
|
+
"textarea",
|
|
8812
|
+
{
|
|
8813
|
+
id: "org-desc",
|
|
8814
|
+
value: description,
|
|
8815
|
+
onChange: (e) => setDescription(e.target.value),
|
|
8816
|
+
placeholder: descriptionPlaceholder,
|
|
8817
|
+
rows: 3,
|
|
8818
|
+
className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground resize-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8819
|
+
}
|
|
8510
8820
|
)
|
|
8511
|
-
}
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8821
|
+
] }),
|
|
8822
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
8823
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8824
|
+
"button",
|
|
8825
|
+
{
|
|
8826
|
+
type: "button",
|
|
8827
|
+
onClick: () => onOpenChange(false),
|
|
8828
|
+
className: "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8829
|
+
children: cancelLabel
|
|
8830
|
+
}
|
|
8831
|
+
),
|
|
8832
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8833
|
+
"button",
|
|
8834
|
+
{
|
|
8835
|
+
type: "submit",
|
|
8836
|
+
disabled: isLoading,
|
|
8837
|
+
className: "inline-flex min-h-[44px] items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none",
|
|
8838
|
+
children: isLoading ? creatingLabel : createLabel
|
|
8839
|
+
}
|
|
8530
8840
|
)
|
|
8531
|
-
}
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8536
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "org-desc", className: "text-sm font-medium", children: "Description" }),
|
|
8537
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8538
|
-
"textarea",
|
|
8539
|
-
{
|
|
8540
|
-
id: "org-desc",
|
|
8541
|
-
value: description,
|
|
8542
|
-
onChange: (e) => setDescription(e.target.value),
|
|
8543
|
-
placeholder: "Optional description\u2026",
|
|
8544
|
-
rows: 3,
|
|
8545
|
-
className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground resize-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8546
|
-
}
|
|
8547
|
-
)
|
|
8548
|
-
] }),
|
|
8549
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
8550
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8551
|
-
"button",
|
|
8552
|
-
{
|
|
8553
|
-
type: "button",
|
|
8554
|
-
onClick: () => onOpenChange(false),
|
|
8555
|
-
className: "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8556
|
-
children: "Cancel"
|
|
8557
|
-
}
|
|
8558
|
-
),
|
|
8559
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8560
|
-
"button",
|
|
8561
|
-
{
|
|
8562
|
-
type: "submit",
|
|
8563
|
-
disabled: isLoading,
|
|
8564
|
-
className: "inline-flex min-h-[44px] items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none",
|
|
8565
|
-
children: isLoading ? "Creating\u2026" : "Create Organization"
|
|
8566
|
-
}
|
|
8567
|
-
)
|
|
8568
|
-
] })
|
|
8569
|
-
]
|
|
8841
|
+
] })
|
|
8842
|
+
]
|
|
8843
|
+
}
|
|
8844
|
+
)
|
|
8570
8845
|
}
|
|
8571
|
-
)
|
|
8846
|
+
);
|
|
8572
8847
|
}
|
|
8573
8848
|
MosaicCreateOrgDialog.displayName = "MosaicCreateOrgDialog";
|
|
8574
8849
|
var DEFAULT_ROLES = [
|
|
@@ -8581,7 +8856,14 @@ function MosaicInviteMemberDialog({
|
|
|
8581
8856
|
onInvite,
|
|
8582
8857
|
isLoading = false,
|
|
8583
8858
|
roles = DEFAULT_ROLES,
|
|
8584
|
-
title
|
|
8859
|
+
title,
|
|
8860
|
+
closeAriaLabel,
|
|
8861
|
+
emailFieldLabel,
|
|
8862
|
+
emailPlaceholder,
|
|
8863
|
+
roleFieldLabel,
|
|
8864
|
+
cancelLabel,
|
|
8865
|
+
sendingLabel,
|
|
8866
|
+
sendInvitationLabel
|
|
8585
8867
|
}) {
|
|
8586
8868
|
const [email, setEmail] = React27__namespace.useState("");
|
|
8587
8869
|
const [role, setRole] = React27__namespace.useState("member");
|
|
@@ -8602,69 +8884,78 @@ function MosaicInviteMemberDialog({
|
|
|
8602
8884
|
setErrors({});
|
|
8603
8885
|
onOpenChange(false);
|
|
8604
8886
|
};
|
|
8605
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8606
|
-
|
|
8887
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8888
|
+
MosaicAdaptiveModal,
|
|
8607
8889
|
{
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8890
|
+
isOpen: open,
|
|
8891
|
+
onClose: () => onOpenChange(false),
|
|
8892
|
+
title,
|
|
8893
|
+
closeAriaLabel,
|
|
8894
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8895
|
+
"form",
|
|
8896
|
+
{
|
|
8897
|
+
"data-slot": "invite-member-dialog",
|
|
8898
|
+
onSubmit: handleSubmit,
|
|
8899
|
+
className: "flex flex-col gap-4 p-4",
|
|
8900
|
+
children: [
|
|
8901
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8902
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "invite-email", className: "text-sm font-medium", children: emailFieldLabel }),
|
|
8903
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8904
|
+
"input",
|
|
8905
|
+
{
|
|
8906
|
+
id: "invite-email",
|
|
8907
|
+
type: "email",
|
|
8908
|
+
value: email,
|
|
8909
|
+
onChange: (e) => setEmail(e.target.value),
|
|
8910
|
+
placeholder: emailPlaceholder,
|
|
8911
|
+
required: true,
|
|
8912
|
+
className: cn61(
|
|
8913
|
+
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
8914
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8915
|
+
errors.email ? "border-destructive" : "border-input"
|
|
8916
|
+
)
|
|
8917
|
+
}
|
|
8918
|
+
),
|
|
8919
|
+
errors.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: errors.email })
|
|
8920
|
+
] }),
|
|
8921
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
8922
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "invite-role", className: "text-sm font-medium", children: roleFieldLabel }),
|
|
8923
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8924
|
+
"select",
|
|
8925
|
+
{
|
|
8926
|
+
id: "invite-role",
|
|
8927
|
+
value: role,
|
|
8928
|
+
onChange: (e) => setRole(e.target.value),
|
|
8929
|
+
className: "w-full rounded-md border border-input bg-background px-3 py-2 min-h-[44px] text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8930
|
+
children: roles.map((r) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: r.value, children: r.label }, r.value))
|
|
8931
|
+
}
|
|
8627
8932
|
)
|
|
8628
|
-
}
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
children: "Cancel"
|
|
8653
|
-
}
|
|
8654
|
-
),
|
|
8655
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8656
|
-
"button",
|
|
8657
|
-
{
|
|
8658
|
-
type: "submit",
|
|
8659
|
-
disabled: isLoading,
|
|
8660
|
-
className: "inline-flex min-h-[44px] items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none",
|
|
8661
|
-
children: isLoading ? "Sending\u2026" : "Send Invitation"
|
|
8662
|
-
}
|
|
8663
|
-
)
|
|
8664
|
-
] })
|
|
8665
|
-
]
|
|
8933
|
+
] }),
|
|
8934
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
8935
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8936
|
+
"button",
|
|
8937
|
+
{
|
|
8938
|
+
type: "button",
|
|
8939
|
+
onClick: () => onOpenChange(false),
|
|
8940
|
+
className: "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8941
|
+
children: cancelLabel
|
|
8942
|
+
}
|
|
8943
|
+
),
|
|
8944
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8945
|
+
"button",
|
|
8946
|
+
{
|
|
8947
|
+
type: "submit",
|
|
8948
|
+
disabled: isLoading,
|
|
8949
|
+
className: "inline-flex min-h-[44px] items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none",
|
|
8950
|
+
children: isLoading ? sendingLabel : sendInvitationLabel
|
|
8951
|
+
}
|
|
8952
|
+
)
|
|
8953
|
+
] })
|
|
8954
|
+
]
|
|
8955
|
+
}
|
|
8956
|
+
)
|
|
8666
8957
|
}
|
|
8667
|
-
)
|
|
8958
|
+
);
|
|
8668
8959
|
}
|
|
8669
8960
|
MosaicInviteMemberDialog.displayName = "MosaicInviteMemberDialog";
|
|
8670
8961
|
function MemberRow({
|
|
@@ -8672,7 +8963,10 @@ function MemberRow({
|
|
|
8672
8963
|
currentUserId,
|
|
8673
8964
|
onChangeRole,
|
|
8674
8965
|
onRemoveMember,
|
|
8675
|
-
roles
|
|
8966
|
+
roles,
|
|
8967
|
+
youLabel,
|
|
8968
|
+
memberActionsAriaLabel,
|
|
8969
|
+
removeMemberLabel
|
|
8676
8970
|
}) {
|
|
8677
8971
|
const [menuOpen, setMenuOpen] = React27__namespace.useState(false);
|
|
8678
8972
|
const menuRef = React27__namespace.useRef(null);
|
|
@@ -8699,7 +8993,7 @@ function MemberRow({
|
|
|
8699
8993
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
8700
8994
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8701
8995
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: member.name }),
|
|
8702
|
-
isSelf && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground", children:
|
|
8996
|
+
isSelf && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground", children: youLabel })
|
|
8703
8997
|
] }),
|
|
8704
8998
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground truncate", children: member.email }),
|
|
8705
8999
|
joinedDate && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -8715,7 +9009,7 @@ function MemberRow({
|
|
|
8715
9009
|
type: "button",
|
|
8716
9010
|
onClick: () => setMenuOpen((v) => !v),
|
|
8717
9011
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8718
|
-
"aria-label":
|
|
9012
|
+
"aria-label": memberActionsAriaLabel,
|
|
8719
9013
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8720
9014
|
"svg",
|
|
8721
9015
|
{
|
|
@@ -8773,7 +9067,7 @@ function MemberRow({
|
|
|
8773
9067
|
setMenuOpen(false);
|
|
8774
9068
|
},
|
|
8775
9069
|
className: "flex w-full items-center px-3 py-2 text-sm text-destructive hover:bg-destructive/10",
|
|
8776
|
-
children:
|
|
9070
|
+
children: removeMemberLabel
|
|
8777
9071
|
}
|
|
8778
9072
|
)
|
|
8779
9073
|
]
|
|
@@ -8790,7 +9084,12 @@ function MosaicMemberList({
|
|
|
8790
9084
|
onInvite,
|
|
8791
9085
|
roles = DEFAULT_ROLES,
|
|
8792
9086
|
isLoading,
|
|
8793
|
-
searchPlaceholder
|
|
9087
|
+
searchPlaceholder,
|
|
9088
|
+
youLabel,
|
|
9089
|
+
memberActionsAriaLabel,
|
|
9090
|
+
removeMemberLabel,
|
|
9091
|
+
emptyMessage,
|
|
9092
|
+
inviteLabel,
|
|
8794
9093
|
className
|
|
8795
9094
|
}) {
|
|
8796
9095
|
const [query, setQuery] = React27__namespace.useState("");
|
|
@@ -8858,7 +9157,7 @@ function MosaicMemberList({
|
|
|
8858
9157
|
]
|
|
8859
9158
|
}
|
|
8860
9159
|
),
|
|
8861
|
-
|
|
9160
|
+
inviteLabel
|
|
8862
9161
|
]
|
|
8863
9162
|
}
|
|
8864
9163
|
)
|
|
@@ -8871,11 +9170,14 @@ function MosaicMemberList({
|
|
|
8871
9170
|
currentUserId,
|
|
8872
9171
|
onChangeRole,
|
|
8873
9172
|
onRemoveMember,
|
|
8874
|
-
roles
|
|
9173
|
+
roles,
|
|
9174
|
+
youLabel,
|
|
9175
|
+
memberActionsAriaLabel,
|
|
9176
|
+
removeMemberLabel
|
|
8875
9177
|
},
|
|
8876
9178
|
member.id
|
|
8877
9179
|
)),
|
|
8878
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children:
|
|
9180
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
8879
9181
|
] })
|
|
8880
9182
|
] });
|
|
8881
9183
|
}
|
|
@@ -9065,13 +9367,15 @@ function SparklesIcon4() {
|
|
|
9065
9367
|
);
|
|
9066
9368
|
}
|
|
9067
9369
|
function MosaicDashboardHeader({
|
|
9068
|
-
title
|
|
9370
|
+
title,
|
|
9069
9371
|
subtitle,
|
|
9070
9372
|
notificationCount = 0,
|
|
9071
9373
|
onNotificationsClick,
|
|
9072
9374
|
onSearchChange,
|
|
9073
9375
|
actions,
|
|
9074
9376
|
logoSlot,
|
|
9377
|
+
searchPlaceholder,
|
|
9378
|
+
searchAriaLabel,
|
|
9075
9379
|
className
|
|
9076
9380
|
}) {
|
|
9077
9381
|
const { isMobile } = useDevice();
|
|
@@ -9108,7 +9412,7 @@ function MosaicDashboardHeader({
|
|
|
9108
9412
|
type: "search",
|
|
9109
9413
|
value: searchQuery,
|
|
9110
9414
|
onChange: handleSearch,
|
|
9111
|
-
placeholder:
|
|
9415
|
+
placeholder: searchPlaceholder,
|
|
9112
9416
|
className: cn63(
|
|
9113
9417
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
9114
9418
|
"text-sm placeholder:text-muted-foreground",
|
|
@@ -9123,7 +9427,7 @@ function MosaicDashboardHeader({
|
|
|
9123
9427
|
{
|
|
9124
9428
|
type: "button",
|
|
9125
9429
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9126
|
-
"aria-label":
|
|
9430
|
+
"aria-label": searchAriaLabel,
|
|
9127
9431
|
onClick: () => {
|
|
9128
9432
|
},
|
|
9129
9433
|
children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon7, {})
|
|
@@ -9214,7 +9518,9 @@ function MosaicOrgSwitcher({
|
|
|
9214
9518
|
currentOrgId,
|
|
9215
9519
|
onSelectOrg,
|
|
9216
9520
|
onCreateOrg,
|
|
9217
|
-
createOrgLabel
|
|
9521
|
+
createOrgLabel,
|
|
9522
|
+
triggerAriaLabel,
|
|
9523
|
+
noOrgSelectedLabel,
|
|
9218
9524
|
className
|
|
9219
9525
|
}) {
|
|
9220
9526
|
const [open, setOpen] = React27__namespace.useState(false);
|
|
@@ -9253,7 +9559,7 @@ function MosaicOrgSwitcher({
|
|
|
9253
9559
|
className: "h-full w-full object-cover"
|
|
9254
9560
|
}
|
|
9255
9561
|
) : initials }),
|
|
9256
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[120px] truncate", children: currentOrg?.name ??
|
|
9562
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[120px] truncate", children: currentOrg?.name ?? noOrgSelectedLabel }),
|
|
9257
9563
|
/* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon4, {})
|
|
9258
9564
|
]
|
|
9259
9565
|
}
|
|
@@ -9262,7 +9568,7 @@ function MosaicOrgSwitcher({
|
|
|
9262
9568
|
"div",
|
|
9263
9569
|
{
|
|
9264
9570
|
role: "menu",
|
|
9265
|
-
"aria-label":
|
|
9571
|
+
"aria-label": triggerAriaLabel,
|
|
9266
9572
|
className: cn64(
|
|
9267
9573
|
"absolute left-0 top-full z-50 mt-1 min-w-[200px] rounded-md border border-border",
|
|
9268
9574
|
"bg-popover py-1 shadow-md"
|
|
@@ -9342,10 +9648,11 @@ function PlusIcon7() {
|
|
|
9342
9648
|
var DEFAULT_ACTIONS = [];
|
|
9343
9649
|
function MosaicQuickActionsMenu({
|
|
9344
9650
|
actions = DEFAULT_ACTIONS,
|
|
9345
|
-
label
|
|
9651
|
+
label,
|
|
9346
9652
|
triggerIcon,
|
|
9347
|
-
menuTitle
|
|
9653
|
+
menuTitle,
|
|
9348
9654
|
renderLink,
|
|
9655
|
+
emptyMessage,
|
|
9349
9656
|
className
|
|
9350
9657
|
}) {
|
|
9351
9658
|
const { isMobile } = useDevice();
|
|
@@ -9427,7 +9734,7 @@ function MosaicQuickActionsMenu({
|
|
|
9427
9734
|
}
|
|
9428
9735
|
)
|
|
9429
9736
|
] }, action.id)),
|
|
9430
|
-
actions.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children:
|
|
9737
|
+
actions.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
9431
9738
|
]
|
|
9432
9739
|
}
|
|
9433
9740
|
)
|
|
@@ -9715,6 +10022,7 @@ function MosaicDataTable({
|
|
|
9715
10022
|
getRowKey,
|
|
9716
10023
|
sortable: masterSortable = true,
|
|
9717
10024
|
emptyState,
|
|
10025
|
+
emptyMessage,
|
|
9718
10026
|
className,
|
|
9719
10027
|
ref
|
|
9720
10028
|
}) {
|
|
@@ -9800,7 +10108,7 @@ function MosaicDataTable({
|
|
|
9800
10108
|
"data-slot": "data-table-empty-cell",
|
|
9801
10109
|
colSpan: columns.length,
|
|
9802
10110
|
className: "px-4 py-12 text-center text-muted-foreground",
|
|
9803
|
-
children: emptyState ??
|
|
10111
|
+
children: emptyState ?? emptyMessage
|
|
9804
10112
|
}
|
|
9805
10113
|
) }) : sortedRows.map((row, index) => {
|
|
9806
10114
|
const key = getRowKey ? getRowKey(row, index) : index;
|
|
@@ -10036,6 +10344,110 @@ function MosaicStepPipeline({
|
|
|
10036
10344
|
);
|
|
10037
10345
|
}
|
|
10038
10346
|
MosaicStepPipeline.displayName = "MosaicStepPipeline";
|
|
10347
|
+
function cn68(...classes) {
|
|
10348
|
+
return classes.filter(Boolean).join(" ");
|
|
10349
|
+
}
|
|
10350
|
+
function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
10351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10352
|
+
"div",
|
|
10353
|
+
{
|
|
10354
|
+
ref,
|
|
10355
|
+
"data-slot": "kanban-board",
|
|
10356
|
+
className: cn68(
|
|
10357
|
+
"flex gap-4 overflow-x-auto pb-4",
|
|
10358
|
+
"min-h-0",
|
|
10359
|
+
// Smooth momentum scrolling on iOS
|
|
10360
|
+
"[scroll-behavior:smooth]",
|
|
10361
|
+
className
|
|
10362
|
+
),
|
|
10363
|
+
...props,
|
|
10364
|
+
children
|
|
10365
|
+
}
|
|
10366
|
+
);
|
|
10367
|
+
}
|
|
10368
|
+
MosaicKanbanBoard.displayName = "MosaicKanbanBoard";
|
|
10369
|
+
function cn69(...classes) {
|
|
10370
|
+
return classes.filter(Boolean).join(" ");
|
|
10371
|
+
}
|
|
10372
|
+
function MosaicKanbanColumn({
|
|
10373
|
+
title,
|
|
10374
|
+
count,
|
|
10375
|
+
headerActions,
|
|
10376
|
+
children,
|
|
10377
|
+
footer,
|
|
10378
|
+
countLabel,
|
|
10379
|
+
className,
|
|
10380
|
+
ref
|
|
10381
|
+
}) {
|
|
10382
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10383
|
+
"section",
|
|
10384
|
+
{
|
|
10385
|
+
ref,
|
|
10386
|
+
"data-slot": "kanban-column",
|
|
10387
|
+
className: cn69(
|
|
10388
|
+
// Fixed column width, never shrink so board stays scrollable
|
|
10389
|
+
"flex flex-col w-72 shrink-0",
|
|
10390
|
+
// Surface
|
|
10391
|
+
"rounded-lg border border-border bg-muted/30",
|
|
10392
|
+
className
|
|
10393
|
+
),
|
|
10394
|
+
children: [
|
|
10395
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10396
|
+
"div",
|
|
10397
|
+
{
|
|
10398
|
+
"data-slot": "kanban-column-header",
|
|
10399
|
+
className: "flex items-center justify-between gap-2 px-3 py-2.5 border-b border-border",
|
|
10400
|
+
children: [
|
|
10401
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
10402
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground truncate", children: title }),
|
|
10403
|
+
count !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10404
|
+
"span",
|
|
10405
|
+
{
|
|
10406
|
+
"data-slot": "kanban-column-count",
|
|
10407
|
+
"aria-label": countLabel(count),
|
|
10408
|
+
className: cn69(
|
|
10409
|
+
"inline-flex items-center justify-center",
|
|
10410
|
+
"min-w-[1.25rem] h-5 px-1.5 rounded-full",
|
|
10411
|
+
"bg-muted text-muted-foreground",
|
|
10412
|
+
"text-xs font-medium tabular-nums",
|
|
10413
|
+
"select-none"
|
|
10414
|
+
),
|
|
10415
|
+
children: count
|
|
10416
|
+
}
|
|
10417
|
+
)
|
|
10418
|
+
] }),
|
|
10419
|
+
headerActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10420
|
+
"div",
|
|
10421
|
+
{
|
|
10422
|
+
"data-slot": "kanban-column-header-actions",
|
|
10423
|
+
className: "flex items-center gap-1 shrink-0",
|
|
10424
|
+
children: headerActions
|
|
10425
|
+
}
|
|
10426
|
+
)
|
|
10427
|
+
]
|
|
10428
|
+
}
|
|
10429
|
+
),
|
|
10430
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10431
|
+
"div",
|
|
10432
|
+
{
|
|
10433
|
+
"data-slot": "kanban-column-body",
|
|
10434
|
+
className: "flex flex-col gap-2 p-2 overflow-y-auto flex-1 min-h-0",
|
|
10435
|
+
children
|
|
10436
|
+
}
|
|
10437
|
+
),
|
|
10438
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10439
|
+
"div",
|
|
10440
|
+
{
|
|
10441
|
+
"data-slot": "kanban-column-footer",
|
|
10442
|
+
className: "px-3 py-2 border-t border-border text-sm text-muted-foreground",
|
|
10443
|
+
children: footer
|
|
10444
|
+
}
|
|
10445
|
+
)
|
|
10446
|
+
]
|
|
10447
|
+
}
|
|
10448
|
+
);
|
|
10449
|
+
}
|
|
10450
|
+
MosaicKanbanColumn.displayName = "MosaicKanbanColumn";
|
|
10039
10451
|
var WorkspaceCtx = React27__namespace.createContext({
|
|
10040
10452
|
workspaceId: null,
|
|
10041
10453
|
isLoading: false
|
|
@@ -10227,6 +10639,8 @@ exports.MosaicInput = MosaicInput;
|
|
|
10227
10639
|
exports.MosaicInputGroup = MosaicInputGroup;
|
|
10228
10640
|
exports.MosaicIntegrationsBadge = MosaicIntegrationsBadge;
|
|
10229
10641
|
exports.MosaicInviteMemberDialog = MosaicInviteMemberDialog;
|
|
10642
|
+
exports.MosaicKanbanBoard = MosaicKanbanBoard;
|
|
10643
|
+
exports.MosaicKanbanColumn = MosaicKanbanColumn;
|
|
10230
10644
|
exports.MosaicLogosGrid = MosaicLogosGrid;
|
|
10231
10645
|
exports.MosaicMainNav = MosaicMainNav;
|
|
10232
10646
|
exports.MosaicMarketplaceList = MosaicMarketplaceList;
|