@vantageos/mosaic-blocks 0.5.22-alpha → 0.5.24-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/README.md +3 -3
- package/dist/index.cjs +956 -402
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +461 -2
- package/dist/index.d.ts +461 -2
- package/dist/index.js +912 -371
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var button = require('@base-ui/react/button');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
-
var
|
|
7
|
+
var React30 = require('react');
|
|
8
8
|
var accordion = require('@base-ui/react/accordion');
|
|
9
9
|
var checkbox = require('@base-ui/react/checkbox');
|
|
10
10
|
var collapsible = require('@base-ui/react/collapsible');
|
|
@@ -23,8 +23,8 @@ var _switch = require('@base-ui/react/switch');
|
|
|
23
23
|
var select = require('@base-ui/react/select');
|
|
24
24
|
var combobox = require('@base-ui/react/combobox');
|
|
25
25
|
var menu = require('@base-ui/react/menu');
|
|
26
|
-
var alertDialog = require('@base-ui/react/alert-dialog');
|
|
27
26
|
var dialog = require('@base-ui/react/dialog');
|
|
27
|
+
var alertDialog = require('@base-ui/react/alert-dialog');
|
|
28
28
|
|
|
29
29
|
function _interopNamespace(e) {
|
|
30
30
|
if (e && e.__esModule) return e;
|
|
@@ -44,10 +44,10 @@ function _interopNamespace(e) {
|
|
|
44
44
|
return Object.freeze(n);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var React30__namespace = /*#__PURE__*/_interopNamespace(React30);
|
|
48
48
|
|
|
49
49
|
// src/version.ts
|
|
50
|
-
var version = "0.5.
|
|
50
|
+
var version = "0.5.24-alpha";
|
|
51
51
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
52
52
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
53
53
|
}
|
|
@@ -178,11 +178,11 @@ function MosaicNavbar({
|
|
|
178
178
|
className,
|
|
179
179
|
ref
|
|
180
180
|
}) {
|
|
181
|
-
const [isScrolled, setIsScrolled] =
|
|
182
|
-
const [isHidden, setIsHidden] =
|
|
183
|
-
const [isOpen, setIsOpen] =
|
|
184
|
-
const lastScrollY =
|
|
185
|
-
|
|
181
|
+
const [isScrolled, setIsScrolled] = React30__namespace.useState(false);
|
|
182
|
+
const [isHidden, setIsHidden] = React30__namespace.useState(false);
|
|
183
|
+
const [isOpen, setIsOpen] = React30__namespace.useState(false);
|
|
184
|
+
const lastScrollY = React30__namespace.useRef(0);
|
|
185
|
+
React30__namespace.useEffect(() => {
|
|
186
186
|
const handleScroll = () => {
|
|
187
187
|
const current = window.scrollY;
|
|
188
188
|
setIsScrolled(current > 50);
|
|
@@ -197,7 +197,7 @@ function MosaicNavbar({
|
|
|
197
197
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
198
198
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
199
199
|
}, []);
|
|
200
|
-
|
|
200
|
+
React30__namespace.useEffect(() => {
|
|
201
201
|
document.body.style.overflow = isOpen ? "hidden" : "";
|
|
202
202
|
return () => {
|
|
203
203
|
document.body.style.overflow = "";
|
|
@@ -725,10 +725,10 @@ function MosaicCounter({
|
|
|
725
725
|
className,
|
|
726
726
|
ref
|
|
727
727
|
}) {
|
|
728
|
-
const [current, setCurrent] =
|
|
729
|
-
const rafRef =
|
|
730
|
-
const startTimeRef =
|
|
731
|
-
|
|
728
|
+
const [current, setCurrent] = React30__namespace.useState(0);
|
|
729
|
+
const rafRef = React30__namespace.useRef(0);
|
|
730
|
+
const startTimeRef = React30__namespace.useRef(null);
|
|
731
|
+
React30__namespace.useEffect(() => {
|
|
732
732
|
const prefersReduced = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
733
733
|
if (prefersReduced) {
|
|
734
734
|
setCurrent(value);
|
|
@@ -784,12 +784,12 @@ function MosaicThemeToggle({
|
|
|
784
784
|
switchToDarkLabel,
|
|
785
785
|
ref
|
|
786
786
|
}) {
|
|
787
|
-
const [theme, setTheme] =
|
|
787
|
+
const [theme, setTheme] = React30__namespace.useState(() => {
|
|
788
788
|
if (typeof document === "undefined") return themes[0];
|
|
789
789
|
const current = document.documentElement.getAttribute("data-theme");
|
|
790
790
|
return current && themes.includes(current) ? current : themes[0];
|
|
791
791
|
});
|
|
792
|
-
const applyTheme =
|
|
792
|
+
const applyTheme = React30__namespace.useCallback(
|
|
793
793
|
(next) => {
|
|
794
794
|
const resolved = next === "system" ? getSystemTheme() : next;
|
|
795
795
|
document.documentElement.setAttribute("data-theme", resolved);
|
|
@@ -917,10 +917,10 @@ function MosaicAnimatedList({
|
|
|
917
917
|
as: Tag = "ul",
|
|
918
918
|
ref
|
|
919
919
|
}) {
|
|
920
|
-
|
|
920
|
+
React30__namespace.useEffect(() => {
|
|
921
921
|
injectKeyframes();
|
|
922
922
|
}, []);
|
|
923
|
-
const items =
|
|
923
|
+
const items = React30__namespace.Children.toArray(children);
|
|
924
924
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
925
925
|
Tag,
|
|
926
926
|
{
|
|
@@ -928,7 +928,7 @@ function MosaicAnimatedList({
|
|
|
928
928
|
className,
|
|
929
929
|
children: items.map((child, i) => {
|
|
930
930
|
const stableKey = child.key ?? `item-${i}`;
|
|
931
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
931
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React30__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
932
932
|
"div",
|
|
933
933
|
{
|
|
934
934
|
className: "mosaic-list-item",
|
|
@@ -1001,8 +1001,8 @@ function MosaicFallingPattern({
|
|
|
1001
1001
|
className,
|
|
1002
1002
|
ref
|
|
1003
1003
|
}) {
|
|
1004
|
-
const uniqueId =
|
|
1005
|
-
|
|
1004
|
+
const uniqueId = React30__namespace.useId();
|
|
1005
|
+
React30__namespace.useEffect(() => {
|
|
1006
1006
|
injectPatternKeyframes();
|
|
1007
1007
|
}, []);
|
|
1008
1008
|
const cols = density;
|
|
@@ -1076,8 +1076,8 @@ function MosaicFallingPattern({
|
|
|
1076
1076
|
}
|
|
1077
1077
|
MosaicFallingPattern.displayName = "MosaicFallingPattern";
|
|
1078
1078
|
function useMediaQuery(query) {
|
|
1079
|
-
const [matches, setMatches] =
|
|
1080
|
-
|
|
1079
|
+
const [matches, setMatches] = React30.useState(false);
|
|
1080
|
+
React30.useEffect(() => {
|
|
1081
1081
|
const mql = window.matchMedia(query);
|
|
1082
1082
|
setMatches(mql.matches);
|
|
1083
1083
|
const handler = (e) => {
|
|
@@ -2098,7 +2098,7 @@ function MosaicSelect({
|
|
|
2098
2098
|
name,
|
|
2099
2099
|
className
|
|
2100
2100
|
}) {
|
|
2101
|
-
const labelMap =
|
|
2101
|
+
const labelMap = React30__namespace.useMemo(
|
|
2102
2102
|
() => Object.fromEntries(items.map((item) => [item.value, item.label])),
|
|
2103
2103
|
[items]
|
|
2104
2104
|
);
|
|
@@ -2218,9 +2218,9 @@ function MosaicCombobox({
|
|
|
2218
2218
|
emptyMessage,
|
|
2219
2219
|
className
|
|
2220
2220
|
}) {
|
|
2221
|
-
const [inputValue, setInputValue] =
|
|
2221
|
+
const [inputValue, setInputValue] = React30__namespace.useState("");
|
|
2222
2222
|
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
2223
|
-
const filteredItems =
|
|
2223
|
+
const filteredItems = React30__namespace.useMemo(() => {
|
|
2224
2224
|
if (!inputValue) return items;
|
|
2225
2225
|
return items.filter((item) => filter.contains(item.label, inputValue));
|
|
2226
2226
|
}, [items, inputValue, filter]);
|
|
@@ -2323,17 +2323,17 @@ function MosaicModelSelector({
|
|
|
2323
2323
|
name,
|
|
2324
2324
|
className
|
|
2325
2325
|
}) {
|
|
2326
|
-
const [inputValue, setInputValue] =
|
|
2326
|
+
const [inputValue, setInputValue] = React30__namespace.useState("");
|
|
2327
2327
|
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
2328
|
-
const filteredModels =
|
|
2328
|
+
const filteredModels = React30__namespace.useMemo(() => {
|
|
2329
2329
|
if (!inputValue) return models;
|
|
2330
2330
|
return models.filter((model) => filter.contains(model.label, inputValue));
|
|
2331
2331
|
}, [models, inputValue, filter]);
|
|
2332
|
-
const labelMap =
|
|
2332
|
+
const labelMap = React30__namespace.useMemo(
|
|
2333
2333
|
() => Object.fromEntries(models.map((model) => [model.value, model.label])),
|
|
2334
2334
|
[models]
|
|
2335
2335
|
);
|
|
2336
|
-
const handleValueChange =
|
|
2336
|
+
const handleValueChange = React30__namespace.useCallback(
|
|
2337
2337
|
(nextValue, eventDetails) => {
|
|
2338
2338
|
if (typeof nextValue !== "string") return;
|
|
2339
2339
|
const selected = models.find((model) => model.value === nextValue);
|
|
@@ -2426,7 +2426,7 @@ function MosaicDropdownMenu({
|
|
|
2426
2426
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
2427
2427
|
className
|
|
2428
2428
|
),
|
|
2429
|
-
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2429
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React30__namespace.Fragment, { children: [
|
|
2430
2430
|
item.separator && /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Separator, { className: "my-1 h-px bg-border" }),
|
|
2431
2431
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2432
2432
|
menu.Menu.Item,
|
|
@@ -2454,8 +2454,8 @@ var BREAKPOINTS = {
|
|
|
2454
2454
|
xl: 1280
|
|
2455
2455
|
};
|
|
2456
2456
|
function useBreakpoint(breakpoint) {
|
|
2457
|
-
const [matches, setMatches] =
|
|
2458
|
-
|
|
2457
|
+
const [matches, setMatches] = React30__namespace.useState(false);
|
|
2458
|
+
React30__namespace.useEffect(() => {
|
|
2459
2459
|
if (typeof window === "undefined") return;
|
|
2460
2460
|
const mq = window.matchMedia(`(min-width: ${BREAKPOINTS[breakpoint]}px)`);
|
|
2461
2461
|
setMatches(mq.matches);
|
|
@@ -2478,8 +2478,8 @@ function useIsDesktop() {
|
|
|
2478
2478
|
return useBreakpoint("lg");
|
|
2479
2479
|
}
|
|
2480
2480
|
function useViewport() {
|
|
2481
|
-
const [size, setSize] =
|
|
2482
|
-
|
|
2481
|
+
const [size, setSize] = React30__namespace.useState({ width: 0, height: 0 });
|
|
2482
|
+
React30__namespace.useEffect(() => {
|
|
2483
2483
|
if (typeof window === "undefined") return;
|
|
2484
2484
|
const update = () => setSize({ width: window.innerWidth, height: window.innerHeight });
|
|
2485
2485
|
update();
|
|
@@ -2497,8 +2497,8 @@ function useViewport() {
|
|
|
2497
2497
|
return size;
|
|
2498
2498
|
}
|
|
2499
2499
|
function useOrientation() {
|
|
2500
|
-
const [orientation, setOrientation] =
|
|
2501
|
-
|
|
2500
|
+
const [orientation, setOrientation] = React30__namespace.useState("portrait");
|
|
2501
|
+
React30__namespace.useEffect(() => {
|
|
2502
2502
|
if (typeof window === "undefined") return;
|
|
2503
2503
|
const update = () => {
|
|
2504
2504
|
setOrientation(window.innerHeight > window.innerWidth ? "portrait" : "landscape");
|
|
@@ -2513,7 +2513,7 @@ function useOrientation() {
|
|
|
2513
2513
|
}, []);
|
|
2514
2514
|
return orientation;
|
|
2515
2515
|
}
|
|
2516
|
-
var DeviceContext =
|
|
2516
|
+
var DeviceContext = React30__namespace.createContext(void 0);
|
|
2517
2517
|
function MosaicDeviceProvider({ children }) {
|
|
2518
2518
|
const isMobile = useIsMobile();
|
|
2519
2519
|
const isTablet = useIsTablet();
|
|
@@ -2524,7 +2524,7 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2524
2524
|
const isXlUp = useBreakpoint("xl");
|
|
2525
2525
|
const orientation = useOrientation();
|
|
2526
2526
|
const viewport = useViewport();
|
|
2527
|
-
const isBreakpoint =
|
|
2527
|
+
const isBreakpoint = React30__namespace.useCallback(
|
|
2528
2528
|
(bp) => {
|
|
2529
2529
|
switch (bp) {
|
|
2530
2530
|
case "sm":
|
|
@@ -2539,7 +2539,7 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2539
2539
|
},
|
|
2540
2540
|
[isSmUp, isMdUp, isLgUp, isXlUp]
|
|
2541
2541
|
);
|
|
2542
|
-
const value =
|
|
2542
|
+
const value = React30__namespace.useMemo(
|
|
2543
2543
|
() => ({
|
|
2544
2544
|
isMobile,
|
|
2545
2545
|
isTablet,
|
|
@@ -2569,7 +2569,7 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
MosaicDeviceProvider.displayName = "MosaicDeviceProvider";
|
|
2571
2571
|
function useDevice() {
|
|
2572
|
-
const ctx =
|
|
2572
|
+
const ctx = React30__namespace.useContext(DeviceContext);
|
|
2573
2573
|
if (!ctx) {
|
|
2574
2574
|
throw new Error("useDevice must be used within a MosaicDeviceProvider");
|
|
2575
2575
|
}
|
|
@@ -2655,13 +2655,13 @@ function MosaicAdaptiveModal({
|
|
|
2655
2655
|
closeAriaLabel
|
|
2656
2656
|
}) {
|
|
2657
2657
|
const { isMobile } = useDevice();
|
|
2658
|
-
const dialogRef =
|
|
2659
|
-
const titleId =
|
|
2660
|
-
const descId =
|
|
2661
|
-
|
|
2658
|
+
const dialogRef = React30__namespace.useRef(null);
|
|
2659
|
+
const titleId = React30__namespace.useId();
|
|
2660
|
+
const descId = React30__namespace.useId();
|
|
2661
|
+
React30__namespace.useEffect(() => {
|
|
2662
2662
|
injectStyles();
|
|
2663
2663
|
}, []);
|
|
2664
|
-
|
|
2664
|
+
React30__namespace.useEffect(() => {
|
|
2665
2665
|
const el = dialogRef.current;
|
|
2666
2666
|
if (!el) return;
|
|
2667
2667
|
if (isOpen) {
|
|
@@ -2670,7 +2670,7 @@ function MosaicAdaptiveModal({
|
|
|
2670
2670
|
if (el.open) el.close();
|
|
2671
2671
|
}
|
|
2672
2672
|
}, [isOpen]);
|
|
2673
|
-
|
|
2673
|
+
React30__namespace.useEffect(() => {
|
|
2674
2674
|
const el = dialogRef.current;
|
|
2675
2675
|
if (!el) return;
|
|
2676
2676
|
const handler = (e) => {
|
|
@@ -2680,7 +2680,7 @@ function MosaicAdaptiveModal({
|
|
|
2680
2680
|
el.addEventListener("cancel", handler);
|
|
2681
2681
|
return () => el.removeEventListener("cancel", handler);
|
|
2682
2682
|
}, [onClose]);
|
|
2683
|
-
|
|
2683
|
+
React30__namespace.useEffect(() => {
|
|
2684
2684
|
if (!isOpen) return;
|
|
2685
2685
|
const prev = document.body.style.overflow;
|
|
2686
2686
|
document.body.style.overflow = "hidden";
|
|
@@ -3112,8 +3112,8 @@ function MosaicAppSidebar({
|
|
|
3112
3112
|
ref
|
|
3113
3113
|
}) {
|
|
3114
3114
|
const { isMobile } = useDevice();
|
|
3115
|
-
const [expandedItems, setExpandedItems] =
|
|
3116
|
-
|
|
3115
|
+
const [expandedItems, setExpandedItems] = React30__namespace.useState(/* @__PURE__ */ new Set());
|
|
3116
|
+
React30__namespace.useEffect(() => {
|
|
3117
3117
|
injectStyles2();
|
|
3118
3118
|
}, []);
|
|
3119
3119
|
const sidebarWidth = isMobile ? "100%" : isCollapsed ? "64px" : "280px";
|
|
@@ -3365,9 +3365,9 @@ function MosaicDashboardLayout({
|
|
|
3365
3365
|
ref
|
|
3366
3366
|
}) {
|
|
3367
3367
|
const { isMobile } = useDevice();
|
|
3368
|
-
const [isSidebarCollapsed, setIsSidebarCollapsed] =
|
|
3369
|
-
const [isMobileSidebarOpen, setIsMobileSidebarOpen] =
|
|
3370
|
-
|
|
3368
|
+
const [isSidebarCollapsed, setIsSidebarCollapsed] = React30__namespace.useState(defaultSidebarCollapsed);
|
|
3369
|
+
const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React30__namespace.useState(false);
|
|
3370
|
+
React30__namespace.useEffect(() => {
|
|
3371
3371
|
injectStyles3();
|
|
3372
3372
|
}, []);
|
|
3373
3373
|
const defaultRenderLink2 = (href, children2) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "transition-colors hover:text-foreground", children: children2 });
|
|
@@ -3499,7 +3499,7 @@ function MosaicQuickActionCard({
|
|
|
3499
3499
|
ref
|
|
3500
3500
|
}) {
|
|
3501
3501
|
const { mobile = 2, desktop = 3 } = columns;
|
|
3502
|
-
|
|
3502
|
+
React30__namespace.useEffect(() => {
|
|
3503
3503
|
injectStyles4();
|
|
3504
3504
|
}, []);
|
|
3505
3505
|
const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "block h-full", children });
|
|
@@ -3716,7 +3716,7 @@ function MosaicActivityFeed({
|
|
|
3716
3716
|
className,
|
|
3717
3717
|
ref
|
|
3718
3718
|
}) {
|
|
3719
|
-
|
|
3719
|
+
React30__namespace.useEffect(() => {
|
|
3720
3720
|
injectStyles5();
|
|
3721
3721
|
}, []);
|
|
3722
3722
|
const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4386,7 +4386,7 @@ function MosaicAgentComposerMobile({
|
|
|
4386
4386
|
optionalInstructionsHelp
|
|
4387
4387
|
}) {
|
|
4388
4388
|
const L = labels;
|
|
4389
|
-
const instructionsId =
|
|
4389
|
+
const instructionsId = React30__namespace.useId();
|
|
4390
4390
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "agent-composer-mobile", className: "flex h-full flex-col", children: [
|
|
4391
4391
|
/* @__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: [
|
|
4392
4392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -4691,9 +4691,147 @@ function MosaicAgentEditor({
|
|
|
4691
4691
|
);
|
|
4692
4692
|
}
|
|
4693
4693
|
MosaicAgentEditor.displayName = "MosaicAgentEditor";
|
|
4694
|
+
var agentBuilderModalPopupVariants = classVarianceAuthority.cva([
|
|
4695
|
+
"fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] w-full max-w-[calc(100%-2rem)] flex-col",
|
|
4696
|
+
"-translate-x-1/2 -translate-y-1/2",
|
|
4697
|
+
"rounded-lg border border-border bg-background shadow-lg outline-none",
|
|
4698
|
+
"sm:max-w-lg"
|
|
4699
|
+
]);
|
|
4700
|
+
var agentBuilderModalBackdropVariants = classVarianceAuthority.cva(["fixed inset-0 z-50 bg-black/50"]);
|
|
4694
4701
|
function cn47(...classes) {
|
|
4695
4702
|
return classes.filter(Boolean).join(" ");
|
|
4696
4703
|
}
|
|
4704
|
+
function MosaicAgentBuilderModal({
|
|
4705
|
+
open,
|
|
4706
|
+
onOpenChange,
|
|
4707
|
+
title,
|
|
4708
|
+
description,
|
|
4709
|
+
closeAriaLabel,
|
|
4710
|
+
confirmLabel,
|
|
4711
|
+
confirmingLabel,
|
|
4712
|
+
cancelLabel,
|
|
4713
|
+
onConfirm,
|
|
4714
|
+
onCancel,
|
|
4715
|
+
canConfirm,
|
|
4716
|
+
isConfirming,
|
|
4717
|
+
children,
|
|
4718
|
+
className
|
|
4719
|
+
}) {
|
|
4720
|
+
const titleId = React30__namespace.useId();
|
|
4721
|
+
const descriptionId = React30__namespace.useId();
|
|
4722
|
+
const confirmDisabled = !canConfirm || isConfirming;
|
|
4723
|
+
const handleConfirm = () => {
|
|
4724
|
+
if (confirmDisabled) return;
|
|
4725
|
+
onConfirm();
|
|
4726
|
+
};
|
|
4727
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { open, onOpenChange: (nextOpen) => onOpenChange(nextOpen), modal: true, children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
|
|
4728
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4729
|
+
dialog.Dialog.Backdrop,
|
|
4730
|
+
{
|
|
4731
|
+
"data-slot": "agent-builder-modal-backdrop",
|
|
4732
|
+
className: agentBuilderModalBackdropVariants()
|
|
4733
|
+
}
|
|
4734
|
+
),
|
|
4735
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4736
|
+
dialog.Dialog.Popup,
|
|
4737
|
+
{
|
|
4738
|
+
"data-slot": "agent-builder-modal",
|
|
4739
|
+
"aria-labelledby": titleId,
|
|
4740
|
+
"aria-describedby": descriptionId,
|
|
4741
|
+
"aria-modal": "true",
|
|
4742
|
+
className: cn47(agentBuilderModalPopupVariants(), className),
|
|
4743
|
+
children: [
|
|
4744
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4745
|
+
"div",
|
|
4746
|
+
{
|
|
4747
|
+
"data-slot": "agent-builder-modal-header",
|
|
4748
|
+
className: "flex items-start justify-between gap-4 border-b border-border p-4",
|
|
4749
|
+
children: [
|
|
4750
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
4751
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { id: titleId, className: "text-base font-semibold text-foreground", children: title }),
|
|
4752
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Description, { id: descriptionId, className: "text-sm text-muted-foreground", children: description })
|
|
4753
|
+
] }),
|
|
4754
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4755
|
+
dialog.Dialog.Close,
|
|
4756
|
+
{
|
|
4757
|
+
"aria-label": closeAriaLabel,
|
|
4758
|
+
className: cn47(
|
|
4759
|
+
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
|
|
4760
|
+
"hover:bg-muted hover:text-foreground",
|
|
4761
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
4762
|
+
),
|
|
4763
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4764
|
+
"svg",
|
|
4765
|
+
{
|
|
4766
|
+
width: "16",
|
|
4767
|
+
height: "16",
|
|
4768
|
+
viewBox: "0 0 24 24",
|
|
4769
|
+
fill: "none",
|
|
4770
|
+
stroke: "currentColor",
|
|
4771
|
+
strokeWidth: "2",
|
|
4772
|
+
strokeLinecap: "round",
|
|
4773
|
+
strokeLinejoin: "round",
|
|
4774
|
+
"aria-hidden": "true",
|
|
4775
|
+
children: [
|
|
4776
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
4777
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
4778
|
+
]
|
|
4779
|
+
}
|
|
4780
|
+
)
|
|
4781
|
+
}
|
|
4782
|
+
)
|
|
4783
|
+
]
|
|
4784
|
+
}
|
|
4785
|
+
),
|
|
4786
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "agent-builder-modal-body", className: "min-h-0 flex-1 overflow-y-auto p-4", children }),
|
|
4787
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4788
|
+
"div",
|
|
4789
|
+
{
|
|
4790
|
+
"data-slot": "agent-builder-modal-footer",
|
|
4791
|
+
className: "flex flex-col-reverse gap-2 border-t border-border p-4 sm:flex-row sm:justify-end",
|
|
4792
|
+
children: [
|
|
4793
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4794
|
+
dialog.Dialog.Close,
|
|
4795
|
+
{
|
|
4796
|
+
onClick: onCancel,
|
|
4797
|
+
className: cn47(
|
|
4798
|
+
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border px-4",
|
|
4799
|
+
"bg-background text-sm font-medium text-foreground shadow-xs",
|
|
4800
|
+
"hover:bg-muted hover:text-foreground",
|
|
4801
|
+
"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
|
4802
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
4803
|
+
),
|
|
4804
|
+
children: cancelLabel
|
|
4805
|
+
}
|
|
4806
|
+
),
|
|
4807
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4808
|
+
"button",
|
|
4809
|
+
{
|
|
4810
|
+
type: "button",
|
|
4811
|
+
onClick: handleConfirm,
|
|
4812
|
+
disabled: confirmDisabled,
|
|
4813
|
+
className: cn47(
|
|
4814
|
+
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4",
|
|
4815
|
+
"bg-primary text-sm font-medium text-primary-foreground",
|
|
4816
|
+
"hover:bg-primary/90",
|
|
4817
|
+
"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
|
4818
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
4819
|
+
),
|
|
4820
|
+
children: isConfirming ? confirmingLabel : confirmLabel
|
|
4821
|
+
}
|
|
4822
|
+
)
|
|
4823
|
+
]
|
|
4824
|
+
}
|
|
4825
|
+
)
|
|
4826
|
+
]
|
|
4827
|
+
}
|
|
4828
|
+
)
|
|
4829
|
+
] }) });
|
|
4830
|
+
}
|
|
4831
|
+
MosaicAgentBuilderModal.displayName = "MosaicAgentBuilderModal";
|
|
4832
|
+
function cn48(...classes) {
|
|
4833
|
+
return classes.filter(Boolean).join(" ");
|
|
4834
|
+
}
|
|
4697
4835
|
function EditIcon() {
|
|
4698
4836
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4699
4837
|
"svg",
|
|
@@ -4752,7 +4890,7 @@ function MosaicModuleCard({
|
|
|
4752
4890
|
{
|
|
4753
4891
|
ref,
|
|
4754
4892
|
"data-slot": "module-card",
|
|
4755
|
-
className:
|
|
4893
|
+
className: cn48(
|
|
4756
4894
|
"min-h-[80px] rounded-xl border border-border bg-card p-4 transition-all",
|
|
4757
4895
|
"flex items-start gap-3",
|
|
4758
4896
|
isSelected && "ring-2 ring-primary bg-primary/5",
|
|
@@ -4814,7 +4952,7 @@ function MosaicThemeProvider({
|
|
|
4814
4952
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "theme-provider", children });
|
|
4815
4953
|
}
|
|
4816
4954
|
MosaicThemeProvider.displayName = "MosaicThemeProvider";
|
|
4817
|
-
function
|
|
4955
|
+
function cn49(...classes) {
|
|
4818
4956
|
return classes.filter(Boolean).join(" ");
|
|
4819
4957
|
}
|
|
4820
4958
|
var ANIM_ID6 = "mosaic-delete-dialog-kf";
|
|
@@ -4856,21 +4994,21 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4856
4994
|
cancelLabel,
|
|
4857
4995
|
confirmLabel
|
|
4858
4996
|
}) {
|
|
4859
|
-
|
|
4997
|
+
React30__namespace.useEffect(() => {
|
|
4860
4998
|
injectStyles6();
|
|
4861
4999
|
}, []);
|
|
4862
5000
|
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(alertDialog.AlertDialog.Portal, { children: [
|
|
4863
5001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4864
5002
|
alertDialog.AlertDialog.Backdrop,
|
|
4865
5003
|
{
|
|
4866
|
-
className:
|
|
5004
|
+
className: cn49("mosaic-delete-overlay", "fixed inset-0 z-50 bg-black/50")
|
|
4867
5005
|
}
|
|
4868
5006
|
),
|
|
4869
5007
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4870
5008
|
alertDialog.AlertDialog.Popup,
|
|
4871
5009
|
{
|
|
4872
5010
|
"data-slot": "delete-confirmation-dialog",
|
|
4873
|
-
className:
|
|
5011
|
+
className: cn49(
|
|
4874
5012
|
"mosaic-delete-content",
|
|
4875
5013
|
"fixed left-1/2 top-1/2 z-50",
|
|
4876
5014
|
"w-full max-w-[92vw] sm:max-w-md",
|
|
@@ -4883,7 +5021,7 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4883
5021
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4884
5022
|
alertDialog.AlertDialog.Close,
|
|
4885
5023
|
{
|
|
4886
|
-
className:
|
|
5024
|
+
className: cn49(
|
|
4887
5025
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
|
|
4888
5026
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
4889
5027
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -4897,7 +5035,7 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4897
5035
|
alertDialog.AlertDialog.Close,
|
|
4898
5036
|
{
|
|
4899
5037
|
onClick: onConfirm,
|
|
4900
|
-
className:
|
|
5038
|
+
className: cn49(
|
|
4901
5039
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md",
|
|
4902
5040
|
"bg-destructive px-4 py-2 text-sm font-medium text-destructive-foreground",
|
|
4903
5041
|
"hover:bg-destructive/90",
|
|
@@ -4921,7 +5059,7 @@ var alertDialogContentVariants = classVarianceAuthority.cva([
|
|
|
4921
5059
|
"sm:max-w-lg"
|
|
4922
5060
|
]);
|
|
4923
5061
|
var alertDialogOverlayVariants = classVarianceAuthority.cva(["fixed inset-0 z-50 bg-black/50"]);
|
|
4924
|
-
function
|
|
5062
|
+
function cn50(...classes) {
|
|
4925
5063
|
return classes.filter(Boolean).join(" ");
|
|
4926
5064
|
}
|
|
4927
5065
|
function MosaicAlertDialog(props) {
|
|
@@ -4941,7 +5079,7 @@ function MosaicAlertDialogOverlay({ className, ...props }) {
|
|
|
4941
5079
|
alertDialog.AlertDialog.Backdrop,
|
|
4942
5080
|
{
|
|
4943
5081
|
"data-slot": "alert-dialog-overlay",
|
|
4944
|
-
className:
|
|
5082
|
+
className: cn50(alertDialogOverlayVariants(), className),
|
|
4945
5083
|
...props
|
|
4946
5084
|
}
|
|
4947
5085
|
);
|
|
@@ -4954,7 +5092,7 @@ function MosaicAlertDialogContent({ className, ...props }) {
|
|
|
4954
5092
|
alertDialog.AlertDialog.Popup,
|
|
4955
5093
|
{
|
|
4956
5094
|
"data-slot": "alert-dialog-content",
|
|
4957
|
-
className:
|
|
5095
|
+
className: cn50(alertDialogContentVariants(), className),
|
|
4958
5096
|
...props
|
|
4959
5097
|
}
|
|
4960
5098
|
)
|
|
@@ -4966,7 +5104,7 @@ function MosaicAlertDialogHeader({ className, ...props }) {
|
|
|
4966
5104
|
"div",
|
|
4967
5105
|
{
|
|
4968
5106
|
"data-slot": "alert-dialog-header",
|
|
4969
|
-
className:
|
|
5107
|
+
className: cn50("flex flex-col gap-2 text-center sm:text-left", className),
|
|
4970
5108
|
...props
|
|
4971
5109
|
}
|
|
4972
5110
|
);
|
|
@@ -4977,7 +5115,7 @@ function MosaicAlertDialogFooter({ className, ...props }) {
|
|
|
4977
5115
|
"div",
|
|
4978
5116
|
{
|
|
4979
5117
|
"data-slot": "alert-dialog-footer",
|
|
4980
|
-
className:
|
|
5118
|
+
className: cn50("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
4981
5119
|
...props
|
|
4982
5120
|
}
|
|
4983
5121
|
);
|
|
@@ -4992,7 +5130,7 @@ function MosaicAlertDialogTitle({
|
|
|
4992
5130
|
alertDialog.AlertDialog.Title,
|
|
4993
5131
|
{
|
|
4994
5132
|
"data-slot": "alert-dialog-title",
|
|
4995
|
-
className:
|
|
5133
|
+
className: cn50("text-lg font-semibold text-foreground", className),
|
|
4996
5134
|
...props,
|
|
4997
5135
|
children
|
|
4998
5136
|
}
|
|
@@ -5008,7 +5146,7 @@ function MosaicAlertDialogDescription({
|
|
|
5008
5146
|
alertDialog.AlertDialog.Description,
|
|
5009
5147
|
{
|
|
5010
5148
|
"data-slot": "alert-dialog-description",
|
|
5011
|
-
className:
|
|
5149
|
+
className: cn50("text-sm text-muted-foreground", className),
|
|
5012
5150
|
...props,
|
|
5013
5151
|
children
|
|
5014
5152
|
}
|
|
@@ -5024,7 +5162,7 @@ function MosaicAlertDialogAction({
|
|
|
5024
5162
|
alertDialog.AlertDialog.Close,
|
|
5025
5163
|
{
|
|
5026
5164
|
"data-slot": "alert-dialog-action",
|
|
5027
|
-
className:
|
|
5165
|
+
className: cn50(
|
|
5028
5166
|
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4",
|
|
5029
5167
|
"bg-destructive text-sm font-medium text-destructive-foreground",
|
|
5030
5168
|
"hover:bg-destructive/90",
|
|
@@ -5047,7 +5185,7 @@ function MosaicAlertDialogCancel({
|
|
|
5047
5185
|
alertDialog.AlertDialog.Close,
|
|
5048
5186
|
{
|
|
5049
5187
|
"data-slot": "alert-dialog-cancel",
|
|
5050
|
-
className:
|
|
5188
|
+
className: cn50(
|
|
5051
5189
|
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border px-4",
|
|
5052
5190
|
"bg-background text-sm font-medium text-foreground shadow-xs",
|
|
5053
5191
|
"hover:bg-muted hover:text-foreground",
|
|
@@ -5061,7 +5199,7 @@ function MosaicAlertDialogCancel({
|
|
|
5061
5199
|
);
|
|
5062
5200
|
}
|
|
5063
5201
|
MosaicAlertDialogCancel.displayName = "MosaicAlertDialogCancel";
|
|
5064
|
-
function
|
|
5202
|
+
function cn51(...classes) {
|
|
5065
5203
|
return classes.filter(Boolean).join(" ");
|
|
5066
5204
|
}
|
|
5067
5205
|
function Toggle({
|
|
@@ -5077,7 +5215,7 @@ function Toggle({
|
|
|
5077
5215
|
id,
|
|
5078
5216
|
"aria-checked": checked,
|
|
5079
5217
|
onClick: () => onChange(!checked),
|
|
5080
|
-
className:
|
|
5218
|
+
className: cn51(
|
|
5081
5219
|
"relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent",
|
|
5082
5220
|
"transition-colors duration-200 ease-in-out",
|
|
5083
5221
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
@@ -5086,7 +5224,7 @@ function Toggle({
|
|
|
5086
5224
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5087
5225
|
"span",
|
|
5088
5226
|
{
|
|
5089
|
-
className:
|
|
5227
|
+
className: cn51(
|
|
5090
5228
|
"pointer-events-none inline-block h-5 w-5 rounded-full bg-background shadow-lg",
|
|
5091
5229
|
"transform transition duration-200 ease-in-out",
|
|
5092
5230
|
checked ? "translate-x-5" : "translate-x-0"
|
|
@@ -5108,7 +5246,7 @@ function NativeSelect({
|
|
|
5108
5246
|
id,
|
|
5109
5247
|
value,
|
|
5110
5248
|
onChange: (e) => onChange(e.target.value),
|
|
5111
|
-
className:
|
|
5249
|
+
className: cn51(
|
|
5112
5250
|
"flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
5113
5251
|
"text-sm text-foreground",
|
|
5114
5252
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -5128,7 +5266,7 @@ function MosaicPreferencesPanel({
|
|
|
5128
5266
|
className
|
|
5129
5267
|
}) {
|
|
5130
5268
|
const { isMobile } = useDevice();
|
|
5131
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "preferences-panel", className:
|
|
5269
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "preferences-panel", className: cn51("space-y-4 md:space-y-6", className), children: [
|
|
5132
5270
|
groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5133
5271
|
"div",
|
|
5134
5272
|
{
|
|
@@ -5171,13 +5309,13 @@ function MosaicPreferencesPanel({
|
|
|
5171
5309
|
},
|
|
5172
5310
|
group.id
|
|
5173
5311
|
)),
|
|
5174
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5312
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn51("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5175
5313
|
"button",
|
|
5176
5314
|
{
|
|
5177
5315
|
type: "button",
|
|
5178
5316
|
onClick: onSave,
|
|
5179
5317
|
disabled: isSaving,
|
|
5180
|
-
className:
|
|
5318
|
+
className: cn51(
|
|
5181
5319
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
|
|
5182
5320
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
5183
5321
|
"hover:bg-primary/90",
|
|
@@ -5213,7 +5351,7 @@ function MosaicPreferencesPanel({
|
|
|
5213
5351
|
] });
|
|
5214
5352
|
}
|
|
5215
5353
|
MosaicPreferencesPanel.displayName = "MosaicPreferencesPanel";
|
|
5216
|
-
function
|
|
5354
|
+
function cn52(...classes) {
|
|
5217
5355
|
return classes.filter(Boolean).join(" ");
|
|
5218
5356
|
}
|
|
5219
5357
|
function AvatarDisplay({
|
|
@@ -5226,7 +5364,7 @@ function AvatarDisplay({
|
|
|
5226
5364
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5227
5365
|
"span",
|
|
5228
5366
|
{
|
|
5229
|
-
className:
|
|
5367
|
+
className: cn52(
|
|
5230
5368
|
"inline-flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground font-semibold overflow-hidden",
|
|
5231
5369
|
sizeClass
|
|
5232
5370
|
),
|
|
@@ -5258,7 +5396,7 @@ function MosaicProfilePanel({
|
|
|
5258
5396
|
className
|
|
5259
5397
|
}) {
|
|
5260
5398
|
const { isMobile } = useDevice();
|
|
5261
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "profile-panel", className:
|
|
5399
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "profile-panel", className: cn52("space-y-4 md:space-y-6", className), children: [
|
|
5262
5400
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
|
|
5263
5401
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
|
|
5264
5402
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: avatarHeading }),
|
|
@@ -5278,7 +5416,7 @@ function MosaicProfilePanel({
|
|
|
5278
5416
|
{
|
|
5279
5417
|
type: "button",
|
|
5280
5418
|
onClick: onAvatarUpload,
|
|
5281
|
-
className:
|
|
5419
|
+
className: cn52(
|
|
5282
5420
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md border border-border",
|
|
5283
5421
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
5284
5422
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -5328,7 +5466,7 @@ function MosaicProfilePanel({
|
|
|
5328
5466
|
placeholder: field.placeholder,
|
|
5329
5467
|
onChange: (e) => onFieldChange?.(field.id, e.target.value),
|
|
5330
5468
|
rows: 4,
|
|
5331
|
-
className:
|
|
5469
|
+
className: cn52(
|
|
5332
5470
|
"flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
5333
5471
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
5334
5472
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -5344,7 +5482,7 @@ function MosaicProfilePanel({
|
|
|
5344
5482
|
readOnly: field.readOnly,
|
|
5345
5483
|
placeholder: field.placeholder,
|
|
5346
5484
|
onChange: (e) => onFieldChange?.(field.id, e.target.value),
|
|
5347
|
-
className:
|
|
5485
|
+
className: cn52(
|
|
5348
5486
|
"flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
5349
5487
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
5350
5488
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -5364,7 +5502,7 @@ function MosaicProfilePanel({
|
|
|
5364
5502
|
{
|
|
5365
5503
|
type: "button",
|
|
5366
5504
|
onClick: onChangePassword,
|
|
5367
|
-
className:
|
|
5505
|
+
className: cn52(
|
|
5368
5506
|
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
5369
5507
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
5370
5508
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -5376,13 +5514,13 @@ function MosaicProfilePanel({
|
|
|
5376
5514
|
) })
|
|
5377
5515
|
] }),
|
|
5378
5516
|
extraSections,
|
|
5379
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5517
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn52("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5380
5518
|
"button",
|
|
5381
5519
|
{
|
|
5382
5520
|
type: "button",
|
|
5383
5521
|
onClick: onSave,
|
|
5384
5522
|
disabled: isSaving,
|
|
5385
|
-
className:
|
|
5523
|
+
className: cn52(
|
|
5386
5524
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
|
|
5387
5525
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
5388
5526
|
"hover:bg-primary/90",
|
|
@@ -5418,7 +5556,7 @@ function MosaicProfilePanel({
|
|
|
5418
5556
|
] });
|
|
5419
5557
|
}
|
|
5420
5558
|
MosaicProfilePanel.displayName = "MosaicProfilePanel";
|
|
5421
|
-
function
|
|
5559
|
+
function cn53(...classes) {
|
|
5422
5560
|
return classes.filter(Boolean).join(" ");
|
|
5423
5561
|
}
|
|
5424
5562
|
var ANIM_ID7 = "mosaic-main-nav-kf";
|
|
@@ -5509,12 +5647,12 @@ function MosaicMainNav({
|
|
|
5509
5647
|
className
|
|
5510
5648
|
}) {
|
|
5511
5649
|
const { isMobile } = useDevice();
|
|
5512
|
-
const [isOpen, setIsOpen] =
|
|
5650
|
+
const [isOpen, setIsOpen] = React30__namespace.useState(false);
|
|
5513
5651
|
const linkRenderer = renderLink ?? defaultRenderLink;
|
|
5514
|
-
|
|
5652
|
+
React30__namespace.useEffect(() => {
|
|
5515
5653
|
injectStyles7();
|
|
5516
5654
|
}, []);
|
|
5517
|
-
|
|
5655
|
+
React30__namespace.useEffect(() => {
|
|
5518
5656
|
if (!isOpen) return;
|
|
5519
5657
|
const handler = (e) => {
|
|
5520
5658
|
if (e.key === "Escape") setIsOpen(false);
|
|
@@ -5531,7 +5669,7 @@ function MosaicMainNav({
|
|
|
5531
5669
|
{
|
|
5532
5670
|
type: "button",
|
|
5533
5671
|
onClick: () => setIsOpen(!isOpen),
|
|
5534
|
-
className:
|
|
5672
|
+
className: cn53(
|
|
5535
5673
|
"inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md p-0",
|
|
5536
5674
|
"text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5537
5675
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5557,7 +5695,7 @@ function MosaicMainNav({
|
|
|
5557
5695
|
"aria-label": drawerNavAriaLabel,
|
|
5558
5696
|
open: isOpen,
|
|
5559
5697
|
"data-open": isOpen ? "true" : "false",
|
|
5560
|
-
className:
|
|
5698
|
+
className: cn53(
|
|
5561
5699
|
"mosaic-nav-drawer",
|
|
5562
5700
|
"fixed inset-y-0 left-0 z-50 m-0 w-[280px] max-h-none h-full p-0",
|
|
5563
5701
|
"border-r border-border bg-background shadow-xl",
|
|
@@ -5574,7 +5712,7 @@ function MosaicMainNav({
|
|
|
5574
5712
|
{
|
|
5575
5713
|
type: "button",
|
|
5576
5714
|
onClick: () => setIsOpen(false),
|
|
5577
|
-
className:
|
|
5715
|
+
className: cn53(
|
|
5578
5716
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
5579
5717
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5580
5718
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5587,13 +5725,13 @@ function MosaicMainNav({
|
|
|
5587
5725
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1 p-4", "aria-label": mainNavAriaLabel, children: filteredItems.map((item) => {
|
|
5588
5726
|
const Icon = item.icon;
|
|
5589
5727
|
const active = isItemActive(item);
|
|
5590
|
-
const itemClass =
|
|
5728
|
+
const itemClass = cn53(
|
|
5591
5729
|
"flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
|
|
5592
5730
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5593
5731
|
"min-h-[44px]",
|
|
5594
5732
|
active && "bg-accent text-accent-foreground"
|
|
5595
5733
|
);
|
|
5596
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5734
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React30__namespace.Fragment, { children: linkRenderer(
|
|
5597
5735
|
item,
|
|
5598
5736
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5599
5737
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
|
|
@@ -5613,18 +5751,18 @@ function MosaicMainNav({
|
|
|
5613
5751
|
"nav",
|
|
5614
5752
|
{
|
|
5615
5753
|
"data-slot": "main-nav",
|
|
5616
|
-
className:
|
|
5754
|
+
className: cn53("flex items-center gap-1", className),
|
|
5617
5755
|
"aria-label": mainNavAriaLabel,
|
|
5618
5756
|
children: filteredItems.map((item) => {
|
|
5619
5757
|
const Icon = item.icon;
|
|
5620
5758
|
const active = isItemActive(item);
|
|
5621
|
-
const itemClass =
|
|
5759
|
+
const itemClass = cn53(
|
|
5622
5760
|
"flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
5623
5761
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5624
5762
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5625
5763
|
active && "bg-accent text-accent-foreground"
|
|
5626
5764
|
);
|
|
5627
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5765
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React30__namespace.Fragment, { children: linkRenderer(
|
|
5628
5766
|
item,
|
|
5629
5767
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5630
5768
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
@@ -5638,7 +5776,7 @@ function MosaicMainNav({
|
|
|
5638
5776
|
);
|
|
5639
5777
|
}
|
|
5640
5778
|
MosaicMainNav.displayName = "MosaicMainNav";
|
|
5641
|
-
function
|
|
5779
|
+
function cn54(...classes) {
|
|
5642
5780
|
return classes.filter(Boolean).join(" ");
|
|
5643
5781
|
}
|
|
5644
5782
|
function MoreVertIcon() {
|
|
@@ -5761,10 +5899,10 @@ function MosaicAgentCard({
|
|
|
5761
5899
|
createdLabel,
|
|
5762
5900
|
className
|
|
5763
5901
|
}) {
|
|
5764
|
-
const [menuOpen, setMenuOpen] =
|
|
5765
|
-
const menuRef =
|
|
5902
|
+
const [menuOpen, setMenuOpen] = React30__namespace.useState(false);
|
|
5903
|
+
const menuRef = React30__namespace.useRef(null);
|
|
5766
5904
|
const formattedDate = agent.createdAt ? new Date(agent.createdAt).toLocaleDateString() : void 0;
|
|
5767
|
-
|
|
5905
|
+
React30__namespace.useEffect(() => {
|
|
5768
5906
|
if (!menuOpen) return;
|
|
5769
5907
|
const handler = (e) => {
|
|
5770
5908
|
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
@@ -5778,7 +5916,7 @@ function MosaicAgentCard({
|
|
|
5778
5916
|
"div",
|
|
5779
5917
|
{
|
|
5780
5918
|
"data-slot": "agent-card",
|
|
5781
|
-
className:
|
|
5919
|
+
className: cn54(
|
|
5782
5920
|
"relative overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
5783
5921
|
"transition-shadow hover:shadow-md",
|
|
5784
5922
|
agent.isActive && "ring-2 ring-primary",
|
|
@@ -5788,7 +5926,7 @@ function MosaicAgentCard({
|
|
|
5788
5926
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5789
5927
|
"div",
|
|
5790
5928
|
{
|
|
5791
|
-
className:
|
|
5929
|
+
className: cn54(
|
|
5792
5930
|
"absolute left-0 top-0 h-1 w-full",
|
|
5793
5931
|
agent.isActive ? "bg-primary" : "bg-muted"
|
|
5794
5932
|
)
|
|
@@ -5800,7 +5938,7 @@ function MosaicAgentCard({
|
|
|
5800
5938
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5801
5939
|
"span",
|
|
5802
5940
|
{
|
|
5803
|
-
className:
|
|
5941
|
+
className: cn54("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
|
|
5804
5942
|
"aria-hidden": "true"
|
|
5805
5943
|
}
|
|
5806
5944
|
),
|
|
@@ -5818,7 +5956,7 @@ function MosaicAgentCard({
|
|
|
5818
5956
|
{
|
|
5819
5957
|
type: "button",
|
|
5820
5958
|
onClick: () => setMenuOpen((v) => !v),
|
|
5821
|
-
className:
|
|
5959
|
+
className: cn54(
|
|
5822
5960
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
5823
5961
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5824
5962
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5833,7 +5971,7 @@ function MosaicAgentCard({
|
|
|
5833
5971
|
"div",
|
|
5834
5972
|
{
|
|
5835
5973
|
role: "menu",
|
|
5836
|
-
className:
|
|
5974
|
+
className: cn54(
|
|
5837
5975
|
"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
|
|
5838
5976
|
"bg-popover py-1 shadow-md"
|
|
5839
5977
|
),
|
|
@@ -5848,7 +5986,7 @@ function MosaicAgentCard({
|
|
|
5848
5986
|
onToggleStatus(agent.id);
|
|
5849
5987
|
setMenuOpen(false);
|
|
5850
5988
|
},
|
|
5851
|
-
className:
|
|
5989
|
+
className: cn54(
|
|
5852
5990
|
"flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
|
|
5853
5991
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5854
5992
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
@@ -5907,7 +6045,7 @@ function MosaicAgentCard({
|
|
|
5907
6045
|
type: "button",
|
|
5908
6046
|
disabled: isLoading,
|
|
5909
6047
|
onClick: () => onToggleStatus(agent.id),
|
|
5910
|
-
className:
|
|
6048
|
+
className: cn54(
|
|
5911
6049
|
"inline-flex h-7 items-center justify-center rounded-md px-3 text-xs font-medium",
|
|
5912
6050
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5913
6051
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
@@ -5923,7 +6061,7 @@ function MosaicAgentCard({
|
|
|
5923
6061
|
);
|
|
5924
6062
|
}
|
|
5925
6063
|
MosaicAgentCard.displayName = "MosaicAgentCard";
|
|
5926
|
-
function
|
|
6064
|
+
function cn55(...classes) {
|
|
5927
6065
|
return classes.filter(Boolean).join(" ");
|
|
5928
6066
|
}
|
|
5929
6067
|
function PlusIcon3() {
|
|
@@ -6006,7 +6144,7 @@ function PickerContent({
|
|
|
6006
6144
|
{
|
|
6007
6145
|
type: "button",
|
|
6008
6146
|
onClick: () => onAdd(agent.id),
|
|
6009
|
-
className:
|
|
6147
|
+
className: cn55(
|
|
6010
6148
|
"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
|
|
6011
6149
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6012
6150
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6015,7 +6153,7 @@ function PickerContent({
|
|
|
6015
6153
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6016
6154
|
"span",
|
|
6017
6155
|
{
|
|
6018
|
-
className:
|
|
6156
|
+
className: cn55("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
|
|
6019
6157
|
"aria-hidden": "true"
|
|
6020
6158
|
}
|
|
6021
6159
|
),
|
|
@@ -6032,7 +6170,7 @@ function PickerContent({
|
|
|
6032
6170
|
{
|
|
6033
6171
|
type: "button",
|
|
6034
6172
|
onClick: onOpenBuilder,
|
|
6035
|
-
className:
|
|
6173
|
+
className: cn55(
|
|
6036
6174
|
"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
|
|
6037
6175
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6038
6176
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6067,9 +6205,9 @@ function MosaicQuickAgentSelector({
|
|
|
6067
6205
|
className
|
|
6068
6206
|
}) {
|
|
6069
6207
|
const { isMobile } = useDevice();
|
|
6070
|
-
const [pickerOpen, setPickerOpen] =
|
|
6071
|
-
const dropdownRef =
|
|
6072
|
-
|
|
6208
|
+
const [pickerOpen, setPickerOpen] = React30__namespace.useState(false);
|
|
6209
|
+
const dropdownRef = React30__namespace.useRef(null);
|
|
6210
|
+
React30__namespace.useEffect(() => {
|
|
6073
6211
|
if (!pickerOpen || isMobile) return;
|
|
6074
6212
|
const handler = (e) => {
|
|
6075
6213
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
@@ -6087,11 +6225,11 @@ function MosaicQuickAgentSelector({
|
|
|
6087
6225
|
setPickerOpen(false);
|
|
6088
6226
|
};
|
|
6089
6227
|
const canAdd = selectedAgents.length < maxAgents;
|
|
6090
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-agent-selector", className:
|
|
6228
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-agent-selector", className: cn55("flex items-center gap-2", className), children: [
|
|
6091
6229
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 overflow-x-auto", children: selectedAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6092
6230
|
"div",
|
|
6093
6231
|
{
|
|
6094
|
-
className:
|
|
6232
|
+
className: cn55(
|
|
6095
6233
|
"group flex shrink-0 items-center gap-2 rounded-md border border-border bg-card",
|
|
6096
6234
|
isMobile ? "px-2 py-1" : "px-3 py-1.5"
|
|
6097
6235
|
),
|
|
@@ -6099,17 +6237,17 @@ function MosaicQuickAgentSelector({
|
|
|
6099
6237
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6100
6238
|
"span",
|
|
6101
6239
|
{
|
|
6102
|
-
className:
|
|
6240
|
+
className: cn55("h-2 w-2 shrink-0 rounded-full", agent.accentColor),
|
|
6103
6241
|
"aria-hidden": "true"
|
|
6104
6242
|
}
|
|
6105
6243
|
),
|
|
6106
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6244
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn55("whitespace-nowrap font-medium", isMobile ? "text-xs" : "text-sm"), children: isMobile ? agent.type.split("-")[0] : agent.name }),
|
|
6107
6245
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6108
6246
|
"button",
|
|
6109
6247
|
{
|
|
6110
6248
|
type: "button",
|
|
6111
6249
|
onClick: () => onRemoveAgent(agent.id),
|
|
6112
|
-
className:
|
|
6250
|
+
className: cn55(
|
|
6113
6251
|
"inline-flex h-4 w-4 items-center justify-center rounded",
|
|
6114
6252
|
"text-muted-foreground hover:text-foreground",
|
|
6115
6253
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -6129,7 +6267,7 @@ function MosaicQuickAgentSelector({
|
|
|
6129
6267
|
{
|
|
6130
6268
|
type: "button",
|
|
6131
6269
|
onClick: () => setPickerOpen((v) => !v),
|
|
6132
|
-
className:
|
|
6270
|
+
className: cn55(
|
|
6133
6271
|
"inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
|
|
6134
6272
|
"px-3 py-1.5 text-sm font-medium text-foreground",
|
|
6135
6273
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -6144,7 +6282,7 @@ function MosaicQuickAgentSelector({
|
|
|
6144
6282
|
!isMobile && pickerOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6145
6283
|
"div",
|
|
6146
6284
|
{
|
|
6147
|
-
className:
|
|
6285
|
+
className: cn55(
|
|
6148
6286
|
"absolute left-0 top-full z-50 mt-2 w-72 rounded-lg border border-border",
|
|
6149
6287
|
"bg-popover shadow-lg"
|
|
6150
6288
|
),
|
|
@@ -6193,7 +6331,7 @@ function MosaicQuickAgentSelector({
|
|
|
6193
6331
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6194
6332
|
"span",
|
|
6195
6333
|
{
|
|
6196
|
-
className:
|
|
6334
|
+
className: cn55(
|
|
6197
6335
|
"shrink-0 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground"
|
|
6198
6336
|
),
|
|
6199
6337
|
children: [
|
|
@@ -6217,7 +6355,7 @@ var agentPreviewVariants = classVarianceAuthority.cva(["rounded-lg border border
|
|
|
6217
6355
|
variant: "summary"
|
|
6218
6356
|
}
|
|
6219
6357
|
});
|
|
6220
|
-
function
|
|
6358
|
+
function cn56(...classes) {
|
|
6221
6359
|
return classes.filter(Boolean).join(" ");
|
|
6222
6360
|
}
|
|
6223
6361
|
function MosaicAgentPreview(props) {
|
|
@@ -6227,7 +6365,7 @@ function MosaicAgentPreview(props) {
|
|
|
6227
6365
|
"div",
|
|
6228
6366
|
{
|
|
6229
6367
|
"data-slot": "agent-preview",
|
|
6230
|
-
className:
|
|
6368
|
+
className: cn56(agentPreviewVariants({ variant: "detailed" }), className2),
|
|
6231
6369
|
children: [
|
|
6232
6370
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "agent-preview-header", className: "p-4 pb-0", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold leading-none tracking-tight", children: title }) }),
|
|
6233
6371
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
@@ -6254,7 +6392,7 @@ function MosaicAgentPreview(props) {
|
|
|
6254
6392
|
"div",
|
|
6255
6393
|
{
|
|
6256
6394
|
"data-slot": "agent-preview",
|
|
6257
|
-
className:
|
|
6395
|
+
className: cn56(agentPreviewVariants({ variant: "summary" }), className),
|
|
6258
6396
|
children: [
|
|
6259
6397
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6260
6398
|
"span",
|
|
@@ -6346,7 +6484,7 @@ var memoryActionsMenuTriggerVariants = classVarianceAuthority.cva(
|
|
|
6346
6484
|
}
|
|
6347
6485
|
}
|
|
6348
6486
|
);
|
|
6349
|
-
function
|
|
6487
|
+
function cn57(...classes) {
|
|
6350
6488
|
return classes.filter(Boolean).join(" ");
|
|
6351
6489
|
}
|
|
6352
6490
|
var MAX_VISIBLE_TAGS = 3;
|
|
@@ -6500,10 +6638,10 @@ function MosaicMemoryCard(props) {
|
|
|
6500
6638
|
ref
|
|
6501
6639
|
} = props;
|
|
6502
6640
|
const variant = props.variant ?? "detailed";
|
|
6503
|
-
const [menuOpen, setMenuOpen] =
|
|
6504
|
-
const menuRef =
|
|
6641
|
+
const [menuOpen, setMenuOpen] = React30__namespace.useState(false);
|
|
6642
|
+
const menuRef = React30__namespace.useRef(null);
|
|
6505
6643
|
const SourceIcon = SOURCE_ICONS[memory.source];
|
|
6506
|
-
|
|
6644
|
+
React30__namespace.useEffect(() => {
|
|
6507
6645
|
if (!menuOpen) return;
|
|
6508
6646
|
const handler = (event) => {
|
|
6509
6647
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
@@ -6524,7 +6662,7 @@ function MosaicMemoryCard(props) {
|
|
|
6524
6662
|
"aria-label": moreActionsLabel,
|
|
6525
6663
|
"aria-haspopup": "menu",
|
|
6526
6664
|
"aria-expanded": menuOpen,
|
|
6527
|
-
className:
|
|
6665
|
+
className: cn57(memoryActionsMenuTriggerVariants({ variant })),
|
|
6528
6666
|
children: /* @__PURE__ */ jsxRuntime.jsx(MoreVertIcon2, {})
|
|
6529
6667
|
}
|
|
6530
6668
|
),
|
|
@@ -6532,7 +6670,7 @@ function MosaicMemoryCard(props) {
|
|
|
6532
6670
|
"div",
|
|
6533
6671
|
{
|
|
6534
6672
|
role: "menu",
|
|
6535
|
-
className:
|
|
6673
|
+
className: cn57(
|
|
6536
6674
|
"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
|
|
6537
6675
|
"bg-popover py-1 shadow-md"
|
|
6538
6676
|
),
|
|
@@ -6573,7 +6711,7 @@ function MosaicMemoryCard(props) {
|
|
|
6573
6711
|
ref,
|
|
6574
6712
|
"data-slot": "memory-card",
|
|
6575
6713
|
"data-variant": variant,
|
|
6576
|
-
className:
|
|
6714
|
+
className: cn57(memoryCardVariants({ variant }), className),
|
|
6577
6715
|
children: props.variant !== "compact" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
6578
6716
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
6579
6717
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
@@ -6583,7 +6721,7 @@ function MosaicMemoryCard(props) {
|
|
|
6583
6721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6584
6722
|
"span",
|
|
6585
6723
|
{
|
|
6586
|
-
className:
|
|
6724
|
+
className: cn57(
|
|
6587
6725
|
memoryScopeBadgeVariants({ scope: memory.scope, bordered: true }),
|
|
6588
6726
|
"mt-1"
|
|
6589
6727
|
),
|
|
@@ -6596,8 +6734,8 @@ function MosaicMemoryCard(props) {
|
|
|
6596
6734
|
] }),
|
|
6597
6735
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-3 text-sm text-muted-foreground", children: memory.content }),
|
|
6598
6736
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "memory-tags", className: "flex flex-wrap gap-1", children: [
|
|
6599
|
-
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6600
|
-
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6737
|
+
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(memoryTagBadgeVariants()), children: tag }, tag)),
|
|
6738
|
+
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(memoryTagBadgeVariants()), children: props.formatMoreTags(hiddenTagCount) })
|
|
6601
6739
|
] }),
|
|
6602
6740
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-t pt-2 text-xs text-muted-foreground", children: [
|
|
6603
6741
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
@@ -6625,7 +6763,7 @@ function MosaicMemoryCard(props) {
|
|
|
6625
6763
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6626
6764
|
"span",
|
|
6627
6765
|
{
|
|
6628
|
-
className:
|
|
6766
|
+
className: cn57(memoryScopeBadgeVariants({ scope: memory.scope, bordered: false })),
|
|
6629
6767
|
children: formatScope(memory.scope)
|
|
6630
6768
|
}
|
|
6631
6769
|
),
|
|
@@ -6667,7 +6805,7 @@ var templateAgentCardBadgeVariants = classVarianceAuthority.cva([
|
|
|
6667
6805
|
var templateAgentCardTagVariants = classVarianceAuthority.cva([
|
|
6668
6806
|
"inline-flex items-center rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground"
|
|
6669
6807
|
]);
|
|
6670
|
-
function
|
|
6808
|
+
function cn58(...classes) {
|
|
6671
6809
|
return classes.filter(Boolean).join(" ");
|
|
6672
6810
|
}
|
|
6673
6811
|
var MAX_VISIBLE_TAGS2 = 3;
|
|
@@ -6736,7 +6874,7 @@ function MosaicTemplateAgentCard({
|
|
|
6736
6874
|
{
|
|
6737
6875
|
ref,
|
|
6738
6876
|
"data-slot": "template-agent-card",
|
|
6739
|
-
className:
|
|
6877
|
+
className: cn58(templateAgentCardVariants({ selected: isSelected }), "p-4", className),
|
|
6740
6878
|
children: [
|
|
6741
6879
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6742
6880
|
"button",
|
|
@@ -6745,7 +6883,7 @@ function MosaicTemplateAgentCard({
|
|
|
6745
6883
|
onClick: () => onSelect(template),
|
|
6746
6884
|
"aria-label": selectAriaLabel,
|
|
6747
6885
|
"aria-pressed": isSelected,
|
|
6748
|
-
className:
|
|
6886
|
+
className: cn58(
|
|
6749
6887
|
"flex min-w-0 flex-1 items-start gap-2 rounded-md text-left",
|
|
6750
6888
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6751
6889
|
),
|
|
@@ -6759,11 +6897,11 @@ function MosaicTemplateAgentCard({
|
|
|
6759
6897
|
}
|
|
6760
6898
|
) }),
|
|
6761
6899
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
6762
|
-
template.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6763
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6764
|
-
formatUsageCount(template.usageCount) != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6765
|
-
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6766
|
-
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6900
|
+
template.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: template.category }),
|
|
6901
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: agentCountLabel }),
|
|
6902
|
+
formatUsageCount(template.usageCount) != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: formatUsageCount(template.usageCount) }),
|
|
6903
|
+
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn58(templateAgentCardTagVariants()), children: tag }, tag)),
|
|
6904
|
+
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn58(templateAgentCardTagVariants()), children: formatMoreTags(hiddenTagCount) })
|
|
6767
6905
|
] }),
|
|
6768
6906
|
(onPreview || onDuplicate) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-2", children: [
|
|
6769
6907
|
onPreview && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6772,7 +6910,7 @@ function MosaicTemplateAgentCard({
|
|
|
6772
6910
|
type: "button",
|
|
6773
6911
|
onClick: () => onPreview(template),
|
|
6774
6912
|
"aria-label": previewAriaLabel,
|
|
6775
|
-
className:
|
|
6913
|
+
className: cn58(
|
|
6776
6914
|
"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
|
|
6777
6915
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6778
6916
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6789,7 +6927,7 @@ function MosaicTemplateAgentCard({
|
|
|
6789
6927
|
type: "button",
|
|
6790
6928
|
onClick: () => onDuplicate(template),
|
|
6791
6929
|
"aria-label": duplicateAriaLabel,
|
|
6792
|
-
className:
|
|
6930
|
+
className: cn58(
|
|
6793
6931
|
"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
|
|
6794
6932
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6795
6933
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6806,7 +6944,7 @@ function MosaicTemplateAgentCard({
|
|
|
6806
6944
|
);
|
|
6807
6945
|
}
|
|
6808
6946
|
MosaicTemplateAgentCard.displayName = "MosaicTemplateAgentCard";
|
|
6809
|
-
function
|
|
6947
|
+
function cn59(...classes) {
|
|
6810
6948
|
return classes.filter(Boolean).join(" ");
|
|
6811
6949
|
}
|
|
6812
6950
|
function SearchIcon() {
|
|
@@ -6866,10 +7004,10 @@ function MosaicSelectorModal({
|
|
|
6866
7004
|
emptyMessage,
|
|
6867
7005
|
closeAriaLabel
|
|
6868
7006
|
}) {
|
|
6869
|
-
const [query, setQuery] =
|
|
6870
|
-
const [activeCategory, setActiveCategory] =
|
|
6871
|
-
const [pendingId, setPendingId] =
|
|
6872
|
-
|
|
7007
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
7008
|
+
const [activeCategory, setActiveCategory] = React30__namespace.useState("all");
|
|
7009
|
+
const [pendingId, setPendingId] = React30__namespace.useState(selectedId);
|
|
7010
|
+
React30__namespace.useEffect(() => {
|
|
6873
7011
|
if (isOpen) {
|
|
6874
7012
|
setPendingId(selectedId);
|
|
6875
7013
|
setQuery("");
|
|
@@ -6907,7 +7045,7 @@ function MosaicSelectorModal({
|
|
|
6907
7045
|
value: query,
|
|
6908
7046
|
onChange: (e) => setQuery(e.target.value),
|
|
6909
7047
|
placeholder: searchPlaceholder,
|
|
6910
|
-
className:
|
|
7048
|
+
className: cn59(
|
|
6911
7049
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
6912
7050
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
6913
7051
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6921,7 +7059,7 @@ function MosaicSelectorModal({
|
|
|
6921
7059
|
{
|
|
6922
7060
|
type: "button",
|
|
6923
7061
|
onClick: () => setActiveCategory("all"),
|
|
6924
|
-
className:
|
|
7062
|
+
className: cn59(
|
|
6925
7063
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
6926
7064
|
activeCategory === "all" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
6927
7065
|
),
|
|
@@ -6933,7 +7071,7 @@ function MosaicSelectorModal({
|
|
|
6933
7071
|
{
|
|
6934
7072
|
type: "button",
|
|
6935
7073
|
onClick: () => setActiveCategory(cat.id),
|
|
6936
|
-
className:
|
|
7074
|
+
className: cn59(
|
|
6937
7075
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
6938
7076
|
activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
6939
7077
|
),
|
|
@@ -6945,7 +7083,7 @@ function MosaicSelectorModal({
|
|
|
6945
7083
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6946
7084
|
"div",
|
|
6947
7085
|
{
|
|
6948
|
-
className:
|
|
7086
|
+
className: cn59(
|
|
6949
7087
|
"max-h-[50vh] overflow-y-auto",
|
|
6950
7088
|
columns === 2 ? "grid grid-cols-1 gap-3 sm:grid-cols-2" : "flex flex-col gap-3"
|
|
6951
7089
|
),
|
|
@@ -6957,7 +7095,7 @@ function MosaicSelectorModal({
|
|
|
6957
7095
|
{
|
|
6958
7096
|
type: "button",
|
|
6959
7097
|
onClick: () => setPendingId(item.id),
|
|
6960
|
-
className:
|
|
7098
|
+
className: cn59(
|
|
6961
7099
|
"group relative rounded-lg border p-4 text-left transition-all duration-150",
|
|
6962
7100
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
6963
7101
|
isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50"
|
|
@@ -6995,7 +7133,7 @@ function MosaicSelectorModal({
|
|
|
6995
7133
|
{
|
|
6996
7134
|
type: "button",
|
|
6997
7135
|
onClick: onClose,
|
|
6998
|
-
className:
|
|
7136
|
+
className: cn59(
|
|
6999
7137
|
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
7000
7138
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
7001
7139
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -7010,7 +7148,7 @@ function MosaicSelectorModal({
|
|
|
7010
7148
|
type: "button",
|
|
7011
7149
|
onClick: handleConfirm,
|
|
7012
7150
|
disabled: !pendingItem,
|
|
7013
|
-
className:
|
|
7151
|
+
className: cn59(
|
|
7014
7152
|
"inline-flex min-h-[44px] items-center justify-center rounded-md",
|
|
7015
7153
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
7016
7154
|
"hover:bg-primary/90",
|
|
@@ -7026,7 +7164,7 @@ function MosaicSelectorModal({
|
|
|
7026
7164
|
);
|
|
7027
7165
|
}
|
|
7028
7166
|
MosaicSelectorModal.displayName = "MosaicSelectorModal";
|
|
7029
|
-
function
|
|
7167
|
+
function cn60(...classes) {
|
|
7030
7168
|
return classes.filter(Boolean).join(" ");
|
|
7031
7169
|
}
|
|
7032
7170
|
function relativeTime(ts) {
|
|
@@ -7226,13 +7364,13 @@ function MosaicMessageCard({
|
|
|
7226
7364
|
copyMessageLabel,
|
|
7227
7365
|
className
|
|
7228
7366
|
}) {
|
|
7229
|
-
const [bookmarked, setBookmarked] =
|
|
7230
|
-
const [likes, setLikes] =
|
|
7231
|
-
const [dislikes, setDislikes] =
|
|
7232
|
-
const [hasLiked, setHasLiked] =
|
|
7233
|
-
const [hasDisliked, setHasDisliked] =
|
|
7234
|
-
const [menuOpen, setMenuOpen] =
|
|
7235
|
-
const menuRef =
|
|
7367
|
+
const [bookmarked, setBookmarked] = React30__namespace.useState(message.bookmarked ?? false);
|
|
7368
|
+
const [likes, setLikes] = React30__namespace.useState(message.reactions?.likes ?? 0);
|
|
7369
|
+
const [dislikes, setDislikes] = React30__namespace.useState(message.reactions?.dislikes ?? 0);
|
|
7370
|
+
const [hasLiked, setHasLiked] = React30__namespace.useState(false);
|
|
7371
|
+
const [hasDisliked, setHasDisliked] = React30__namespace.useState(false);
|
|
7372
|
+
const [menuOpen, setMenuOpen] = React30__namespace.useState(false);
|
|
7373
|
+
const menuRef = React30__namespace.useRef(null);
|
|
7236
7374
|
const initials = message.sender.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
7237
7375
|
const handleLike = () => {
|
|
7238
7376
|
if (hasLiked) {
|
|
@@ -7270,7 +7408,7 @@ function MosaicMessageCard({
|
|
|
7270
7408
|
navigator.clipboard.writeText(message.content).catch(() => null);
|
|
7271
7409
|
onCopy?.(message.id, message.content);
|
|
7272
7410
|
};
|
|
7273
|
-
|
|
7411
|
+
React30__namespace.useEffect(() => {
|
|
7274
7412
|
if (!menuOpen) return;
|
|
7275
7413
|
const h = (e) => {
|
|
7276
7414
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -7282,7 +7420,7 @@ function MosaicMessageCard({
|
|
|
7282
7420
|
"div",
|
|
7283
7421
|
{
|
|
7284
7422
|
"data-slot": "message-card",
|
|
7285
|
-
className:
|
|
7423
|
+
className: cn60(
|
|
7286
7424
|
"rounded-lg border border-border bg-card p-4 shadow-sm transition-shadow hover:shadow-md",
|
|
7287
7425
|
compact && "p-3",
|
|
7288
7426
|
message.sender.type === "user" && "bg-primary/5",
|
|
@@ -7292,7 +7430,7 @@ function MosaicMessageCard({
|
|
|
7292
7430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7293
7431
|
"span",
|
|
7294
7432
|
{
|
|
7295
|
-
className:
|
|
7433
|
+
className: cn60(
|
|
7296
7434
|
"inline-flex shrink-0 items-center justify-center rounded-full text-white font-semibold",
|
|
7297
7435
|
compact ? "h-8 w-8 text-xs" : "h-10 w-10 text-sm",
|
|
7298
7436
|
message.sender.accentColor ?? "bg-muted text-muted-foreground"
|
|
@@ -7310,7 +7448,7 @@ function MosaicMessageCard({
|
|
|
7310
7448
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7311
7449
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
7312
7450
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7313
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
7451
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn60("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
|
|
7314
7452
|
message.sender.type === "ai" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: "AI" })
|
|
7315
7453
|
] }),
|
|
7316
7454
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: relativeTime(message.timestamp) })
|
|
@@ -7318,7 +7456,7 @@ function MosaicMessageCard({
|
|
|
7318
7456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7319
7457
|
"p",
|
|
7320
7458
|
{
|
|
7321
|
-
className:
|
|
7459
|
+
className: cn60(
|
|
7322
7460
|
"leading-relaxed text-foreground mb-3",
|
|
7323
7461
|
compact ? "text-sm" : "text-base"
|
|
7324
7462
|
),
|
|
@@ -7333,7 +7471,7 @@ function MosaicMessageCard({
|
|
|
7333
7471
|
{
|
|
7334
7472
|
type: "button",
|
|
7335
7473
|
onClick: handleLike,
|
|
7336
|
-
className:
|
|
7474
|
+
className: cn60(
|
|
7337
7475
|
"inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
|
|
7338
7476
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7339
7477
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -7351,7 +7489,7 @@ function MosaicMessageCard({
|
|
|
7351
7489
|
{
|
|
7352
7490
|
type: "button",
|
|
7353
7491
|
onClick: handleDislike,
|
|
7354
|
-
className:
|
|
7492
|
+
className: cn60(
|
|
7355
7493
|
"inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
|
|
7356
7494
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7357
7495
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -7396,7 +7534,7 @@ function MosaicMessageCard({
|
|
|
7396
7534
|
{
|
|
7397
7535
|
type: "button",
|
|
7398
7536
|
onClick: handleBookmark,
|
|
7399
|
-
className:
|
|
7537
|
+
className: cn60(
|
|
7400
7538
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
7401
7539
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7402
7540
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -7497,7 +7635,7 @@ function MosaicMessageCard({
|
|
|
7497
7635
|
);
|
|
7498
7636
|
}
|
|
7499
7637
|
MosaicMessageCard.displayName = "MosaicMessageCard";
|
|
7500
|
-
function
|
|
7638
|
+
function cn61(...classes) {
|
|
7501
7639
|
return classes.filter(Boolean).join(" ");
|
|
7502
7640
|
}
|
|
7503
7641
|
function SearchIcon2() {
|
|
@@ -7543,11 +7681,11 @@ function MessageListDesktop({
|
|
|
7543
7681
|
copyMessageLabel,
|
|
7544
7682
|
className
|
|
7545
7683
|
}) {
|
|
7546
|
-
const [query, setQuery] =
|
|
7684
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
7547
7685
|
const filtered = query ? messages.filter(
|
|
7548
7686
|
(m) => m.content.toLowerCase().includes(query.toLowerCase()) || m.sender.name.toLowerCase().includes(query.toLowerCase())
|
|
7549
7687
|
) : messages;
|
|
7550
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-desktop", className:
|
|
7688
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-desktop", className: cn61("flex h-full flex-col", className), children: [
|
|
7551
7689
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
|
|
7552
7690
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold", children: title }),
|
|
7553
7691
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative ml-auto max-w-xs flex-1", children: [
|
|
@@ -7559,7 +7697,7 @@ function MessageListDesktop({
|
|
|
7559
7697
|
value: query,
|
|
7560
7698
|
onChange: (e) => setQuery(e.target.value),
|
|
7561
7699
|
placeholder: searchPlaceholder,
|
|
7562
|
-
className:
|
|
7700
|
+
className: cn61(
|
|
7563
7701
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7564
7702
|
"text-sm placeholder:text-muted-foreground",
|
|
7565
7703
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7595,7 +7733,7 @@ function MessageListDesktop({
|
|
|
7595
7733
|
{
|
|
7596
7734
|
type: "button",
|
|
7597
7735
|
onClick: onLoadMore,
|
|
7598
|
-
className:
|
|
7736
|
+
className: cn61(
|
|
7599
7737
|
"w-full rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
|
|
7600
7738
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7601
7739
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7626,7 +7764,7 @@ function MessageListMobile({
|
|
|
7626
7764
|
copyMessageLabel,
|
|
7627
7765
|
className
|
|
7628
7766
|
}) {
|
|
7629
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className:
|
|
7767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className: cn61("flex flex-col", className), children: [
|
|
7630
7768
|
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 border-b border-border bg-background px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: title }) }),
|
|
7631
7769
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 p-4", children: [
|
|
7632
7770
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 animate-pulse rounded-lg bg-muted" }, i)) }),
|
|
@@ -7656,7 +7794,7 @@ function MessageListMobile({
|
|
|
7656
7794
|
{
|
|
7657
7795
|
type: "button",
|
|
7658
7796
|
onClick: onLoadMore,
|
|
7659
|
-
className:
|
|
7797
|
+
className: cn61(
|
|
7660
7798
|
"w-full min-h-[44px] rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
|
|
7661
7799
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7662
7800
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7671,7 +7809,7 @@ function MosaicMessageList(props) {
|
|
|
7671
7809
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(MessageListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(MessageListDesktop, { ...props });
|
|
7672
7810
|
}
|
|
7673
7811
|
MosaicMessageList.displayName = "MosaicMessageList";
|
|
7674
|
-
function
|
|
7812
|
+
function cn62(...classes) {
|
|
7675
7813
|
return classes.filter(Boolean).join(" ");
|
|
7676
7814
|
}
|
|
7677
7815
|
function ChevronLeftIcon2() {
|
|
@@ -7751,7 +7889,7 @@ function MosaicFilterSidebar({
|
|
|
7751
7889
|
{
|
|
7752
7890
|
"data-slot": "filter-sidebar",
|
|
7753
7891
|
style: { width, minWidth: isCollapsed && !isMobile ? "64px" : void 0 },
|
|
7754
|
-
className:
|
|
7892
|
+
className: cn62(
|
|
7755
7893
|
"relative flex flex-col border-r border-border bg-card",
|
|
7756
7894
|
"transition-[width] duration-200 ease-in-out",
|
|
7757
7895
|
"overflow-hidden",
|
|
@@ -7763,7 +7901,7 @@ function MosaicFilterSidebar({
|
|
|
7763
7901
|
{
|
|
7764
7902
|
type: "button",
|
|
7765
7903
|
onClick: onToggleCollapse,
|
|
7766
|
-
className:
|
|
7904
|
+
className: cn62(
|
|
7767
7905
|
"absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center rounded-full",
|
|
7768
7906
|
"border border-border bg-background shadow-sm",
|
|
7769
7907
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -7793,7 +7931,7 @@ function MosaicFilterSidebar({
|
|
|
7793
7931
|
{
|
|
7794
7932
|
type: "button",
|
|
7795
7933
|
onClick: () => onFilterChange(f.id),
|
|
7796
|
-
className:
|
|
7934
|
+
className: cn62(
|
|
7797
7935
|
"flex min-h-[40px] items-center justify-between rounded-md px-3 py-2 text-sm font-medium",
|
|
7798
7936
|
"transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
7799
7937
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -7813,7 +7951,7 @@ function MosaicFilterSidebar({
|
|
|
7813
7951
|
{
|
|
7814
7952
|
type: "button",
|
|
7815
7953
|
onClick: () => onCategoryChange(cat.id),
|
|
7816
|
-
className:
|
|
7954
|
+
className: cn62(
|
|
7817
7955
|
"flex min-h-[36px] items-center justify-between rounded-md px-3 py-1.5 text-sm",
|
|
7818
7956
|
"transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
7819
7957
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -7833,7 +7971,7 @@ function MosaicFilterSidebar({
|
|
|
7833
7971
|
);
|
|
7834
7972
|
}
|
|
7835
7973
|
MosaicFilterSidebar.displayName = "MosaicFilterSidebar";
|
|
7836
|
-
function
|
|
7974
|
+
function cn63(...classes) {
|
|
7837
7975
|
return classes.filter(Boolean).join(" ");
|
|
7838
7976
|
}
|
|
7839
7977
|
function SearchIcon3() {
|
|
@@ -7919,8 +8057,8 @@ function AgentListDesktop({
|
|
|
7919
8057
|
collapseSidebarAriaLabel,
|
|
7920
8058
|
expandSidebarAriaLabel
|
|
7921
8059
|
}) {
|
|
7922
|
-
const [query, setQuery] =
|
|
7923
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
8060
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
8061
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React30__namespace.useState(false);
|
|
7924
8062
|
const filtered = agents.filter(
|
|
7925
8063
|
(a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
|
|
7926
8064
|
);
|
|
@@ -7958,7 +8096,7 @@ function AgentListDesktop({
|
|
|
7958
8096
|
value: query,
|
|
7959
8097
|
onChange: (e) => setQuery(e.target.value),
|
|
7960
8098
|
placeholder: searchPlaceholder,
|
|
7961
|
-
className:
|
|
8099
|
+
className: cn63(
|
|
7962
8100
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7963
8101
|
"text-sm placeholder:text-muted-foreground",
|
|
7964
8102
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7971,7 +8109,7 @@ function AgentListDesktop({
|
|
|
7971
8109
|
{
|
|
7972
8110
|
type: "button",
|
|
7973
8111
|
onClick: onCreateAgent,
|
|
7974
|
-
className:
|
|
8112
|
+
className: cn63(
|
|
7975
8113
|
"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
7976
8114
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
7977
8115
|
),
|
|
@@ -8025,8 +8163,8 @@ function AgentListMobile({
|
|
|
8025
8163
|
collapseSidebarAriaLabel,
|
|
8026
8164
|
expandSidebarAriaLabel
|
|
8027
8165
|
}) {
|
|
8028
|
-
const [filterOpen, setFilterOpen] =
|
|
8029
|
-
const [query, setQuery] =
|
|
8166
|
+
const [filterOpen, setFilterOpen] = React30__namespace.useState(false);
|
|
8167
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
8030
8168
|
const filtered = agents.filter(
|
|
8031
8169
|
(a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
|
|
8032
8170
|
);
|
|
@@ -8040,7 +8178,7 @@ function AgentListMobile({
|
|
|
8040
8178
|
{
|
|
8041
8179
|
type: "button",
|
|
8042
8180
|
onClick: () => setFilterOpen(true),
|
|
8043
|
-
className:
|
|
8181
|
+
className: cn63(
|
|
8044
8182
|
"inline-flex h-9 w-9 items-center justify-center rounded-md",
|
|
8045
8183
|
"border border-border bg-background text-foreground",
|
|
8046
8184
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -8055,7 +8193,7 @@ function AgentListMobile({
|
|
|
8055
8193
|
{
|
|
8056
8194
|
type: "button",
|
|
8057
8195
|
onClick: onCreateAgent,
|
|
8058
|
-
className:
|
|
8196
|
+
className: cn63(
|
|
8059
8197
|
"inline-flex h-9 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground",
|
|
8060
8198
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8061
8199
|
),
|
|
@@ -8076,7 +8214,7 @@ function AgentListMobile({
|
|
|
8076
8214
|
value: query,
|
|
8077
8215
|
onChange: (e) => setQuery(e.target.value),
|
|
8078
8216
|
placeholder: searchPlaceholder,
|
|
8079
|
-
className:
|
|
8217
|
+
className: cn63(
|
|
8080
8218
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
8081
8219
|
"text-sm placeholder:text-muted-foreground",
|
|
8082
8220
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8138,7 +8276,7 @@ function MosaicAgentList(props) {
|
|
|
8138
8276
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(AgentListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(AgentListDesktop, { ...props });
|
|
8139
8277
|
}
|
|
8140
8278
|
MosaicAgentList.displayName = "MosaicAgentList";
|
|
8141
|
-
function
|
|
8279
|
+
function cn64(...classes) {
|
|
8142
8280
|
return classes.filter(Boolean).join(" ");
|
|
8143
8281
|
}
|
|
8144
8282
|
function StarIcon({ filled }) {
|
|
@@ -8235,7 +8373,7 @@ function MarketplaceCard({
|
|
|
8235
8373
|
"div",
|
|
8236
8374
|
{
|
|
8237
8375
|
"data-slot": "marketplace-card",
|
|
8238
|
-
className:
|
|
8376
|
+
className: cn64(
|
|
8239
8377
|
"rounded-lg border border-border bg-card p-4 transition-shadow hover:shadow-md",
|
|
8240
8378
|
compact ? "flex items-center gap-3" : "flex flex-col gap-3"
|
|
8241
8379
|
),
|
|
@@ -8243,7 +8381,7 @@ function MarketplaceCard({
|
|
|
8243
8381
|
item.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8244
8382
|
"div",
|
|
8245
8383
|
{
|
|
8246
|
-
className:
|
|
8384
|
+
className: cn64(
|
|
8247
8385
|
"flex shrink-0 items-center justify-center rounded-lg",
|
|
8248
8386
|
compact ? "h-10 w-10" : "h-12 w-12",
|
|
8249
8387
|
item.accentClass ?? "bg-muted text-muted-foreground"
|
|
@@ -8254,7 +8392,7 @@ function MarketplaceCard({
|
|
|
8254
8392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
8255
8393
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
8256
8394
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
8257
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
8395
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn64("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
|
|
8258
8396
|
item.description && !compact && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground line-clamp-2", children: item.description })
|
|
8259
8397
|
] }),
|
|
8260
8398
|
item.price && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground", children: item.price })
|
|
@@ -8271,13 +8409,13 @@ function MarketplaceCard({
|
|
|
8271
8409
|
] })
|
|
8272
8410
|
] })
|
|
8273
8411
|
] }),
|
|
8274
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
8412
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn64("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
|
|
8275
8413
|
onPreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8276
8414
|
"button",
|
|
8277
8415
|
{
|
|
8278
8416
|
type: "button",
|
|
8279
8417
|
onClick: () => onPreview(item.id),
|
|
8280
|
-
className:
|
|
8418
|
+
className: cn64(
|
|
8281
8419
|
"inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
|
|
8282
8420
|
"bg-background px-3 text-xs font-medium text-foreground",
|
|
8283
8421
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -8291,7 +8429,7 @@ function MarketplaceCard({
|
|
|
8291
8429
|
{
|
|
8292
8430
|
type: "button",
|
|
8293
8431
|
onClick: () => onUninstall(item.id),
|
|
8294
|
-
className:
|
|
8432
|
+
className: cn64(
|
|
8295
8433
|
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
8296
8434
|
"bg-secondary px-3 text-xs font-medium text-secondary-foreground",
|
|
8297
8435
|
"hover:bg-secondary/80",
|
|
@@ -8304,7 +8442,7 @@ function MarketplaceCard({
|
|
|
8304
8442
|
{
|
|
8305
8443
|
type: "button",
|
|
8306
8444
|
onClick: () => onInstall(item.id),
|
|
8307
|
-
className:
|
|
8445
|
+
className: cn64(
|
|
8308
8446
|
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
8309
8447
|
"bg-primary px-3 text-xs font-medium text-primary-foreground",
|
|
8310
8448
|
"hover:bg-primary/90",
|
|
@@ -8341,8 +8479,8 @@ function MarketplaceListDesktop(props) {
|
|
|
8341
8479
|
collapseSidebarAriaLabel,
|
|
8342
8480
|
expandSidebarAriaLabel
|
|
8343
8481
|
} = props;
|
|
8344
|
-
const [query, setQuery] =
|
|
8345
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
8482
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
8483
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React30__namespace.useState(false);
|
|
8346
8484
|
const filtered = items.filter(
|
|
8347
8485
|
(i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
8348
8486
|
);
|
|
@@ -8376,7 +8514,7 @@ function MarketplaceListDesktop(props) {
|
|
|
8376
8514
|
value: query,
|
|
8377
8515
|
onChange: (e) => setQuery(e.target.value),
|
|
8378
8516
|
placeholder: searchPlaceholder,
|
|
8379
|
-
className:
|
|
8517
|
+
className: cn64(
|
|
8380
8518
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
8381
8519
|
"text-sm placeholder:text-muted-foreground",
|
|
8382
8520
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8430,8 +8568,8 @@ function MarketplaceListMobile(props) {
|
|
|
8430
8568
|
collapseSidebarAriaLabel,
|
|
8431
8569
|
expandSidebarAriaLabel
|
|
8432
8570
|
} = props;
|
|
8433
|
-
const [filterOpen, setFilterOpen] =
|
|
8434
|
-
const [query, setQuery] =
|
|
8571
|
+
const [filterOpen, setFilterOpen] = React30__namespace.useState(false);
|
|
8572
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
8435
8573
|
const filtered = items.filter(
|
|
8436
8574
|
(i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
8437
8575
|
);
|
|
@@ -8459,7 +8597,7 @@ function MarketplaceListMobile(props) {
|
|
|
8459
8597
|
value: query,
|
|
8460
8598
|
onChange: (e) => setQuery(e.target.value),
|
|
8461
8599
|
placeholder: searchPlaceholder,
|
|
8462
|
-
className:
|
|
8600
|
+
className: cn64(
|
|
8463
8601
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
8464
8602
|
"text-sm placeholder:text-muted-foreground",
|
|
8465
8603
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8524,7 +8662,130 @@ function MosaicMarketplaceList(props) {
|
|
|
8524
8662
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(MarketplaceListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(MarketplaceListDesktop, { ...props });
|
|
8525
8663
|
}
|
|
8526
8664
|
MosaicMarketplaceList.displayName = "MosaicMarketplaceList";
|
|
8527
|
-
|
|
8665
|
+
var marketplaceCardVariants = classVarianceAuthority.cva(
|
|
8666
|
+
["rounded-xl border border-border bg-card p-4 transition-shadow", "hover:shadow-md"],
|
|
8667
|
+
{
|
|
8668
|
+
variants: {
|
|
8669
|
+
variant: {
|
|
8670
|
+
default: "flex flex-col gap-3",
|
|
8671
|
+
compact: "flex flex-row items-center gap-3"
|
|
8672
|
+
}
|
|
8673
|
+
},
|
|
8674
|
+
defaultVariants: {
|
|
8675
|
+
variant: "default"
|
|
8676
|
+
}
|
|
8677
|
+
}
|
|
8678
|
+
);
|
|
8679
|
+
function cn65(...classes) {
|
|
8680
|
+
return classes.filter(Boolean).join(" ");
|
|
8681
|
+
}
|
|
8682
|
+
function MosaicMarketplaceCard({
|
|
8683
|
+
id,
|
|
8684
|
+
name,
|
|
8685
|
+
description,
|
|
8686
|
+
icon,
|
|
8687
|
+
rating,
|
|
8688
|
+
mentions,
|
|
8689
|
+
isAdopted = false,
|
|
8690
|
+
onAdopt,
|
|
8691
|
+
onUnadopt,
|
|
8692
|
+
onPreview,
|
|
8693
|
+
adoptLabel,
|
|
8694
|
+
unadoptLabel,
|
|
8695
|
+
previewLabel,
|
|
8696
|
+
ratingLabel,
|
|
8697
|
+
variant = "default",
|
|
8698
|
+
className
|
|
8699
|
+
}) {
|
|
8700
|
+
const compact = variant === "compact";
|
|
8701
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8702
|
+
MosaicCard,
|
|
8703
|
+
{
|
|
8704
|
+
"data-slot": "marketplace-card",
|
|
8705
|
+
className: cn65(marketplaceCardVariants({ variant }), className),
|
|
8706
|
+
children: [
|
|
8707
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8708
|
+
"div",
|
|
8709
|
+
{
|
|
8710
|
+
className: cn65(
|
|
8711
|
+
"flex shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
8712
|
+
compact ? "h-10 w-10" : "h-12 w-12"
|
|
8713
|
+
),
|
|
8714
|
+
children: icon
|
|
8715
|
+
}
|
|
8716
|
+
),
|
|
8717
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
8718
|
+
/* @__PURE__ */ jsxRuntime.jsx(MosaicCardTitle, { className: cn65("truncate", compact ? "text-sm" : "text-base"), children: name }),
|
|
8719
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8720
|
+
MosaicCardDescription,
|
|
8721
|
+
{
|
|
8722
|
+
"data-slot": "marketplace-card-description",
|
|
8723
|
+
className: "mt-1 line-clamp-2",
|
|
8724
|
+
children: description
|
|
8725
|
+
}
|
|
8726
|
+
),
|
|
8727
|
+
mentions && mentions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex flex-wrap gap-1", children: mentions.map((mention) => /* @__PURE__ */ jsxRuntime.jsx(MosaicBadge, { variant: "secondary", children: mention }, mention)) }),
|
|
8728
|
+
rating != null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8729
|
+
"div",
|
|
8730
|
+
{
|
|
8731
|
+
"data-slot": "marketplace-card-rating",
|
|
8732
|
+
className: "mt-2 flex items-center gap-1 text-xs text-muted-foreground",
|
|
8733
|
+
children: [
|
|
8734
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: rating }),
|
|
8735
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: ratingLabel })
|
|
8736
|
+
]
|
|
8737
|
+
}
|
|
8738
|
+
)
|
|
8739
|
+
] }),
|
|
8740
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn65("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
|
|
8741
|
+
onPreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8742
|
+
"button",
|
|
8743
|
+
{
|
|
8744
|
+
type: "button",
|
|
8745
|
+
onClick: () => onPreview(id),
|
|
8746
|
+
className: cn65(
|
|
8747
|
+
"inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
|
|
8748
|
+
"bg-background px-3 text-xs font-medium text-foreground",
|
|
8749
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
8750
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8751
|
+
),
|
|
8752
|
+
children: previewLabel
|
|
8753
|
+
}
|
|
8754
|
+
),
|
|
8755
|
+
isAdopted ? onUnadopt && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8756
|
+
"button",
|
|
8757
|
+
{
|
|
8758
|
+
type: "button",
|
|
8759
|
+
onClick: () => onUnadopt(id),
|
|
8760
|
+
className: cn65(
|
|
8761
|
+
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
8762
|
+
"bg-secondary px-3 text-xs font-medium text-secondary-foreground",
|
|
8763
|
+
"hover:bg-secondary/80",
|
|
8764
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8765
|
+
),
|
|
8766
|
+
children: unadoptLabel
|
|
8767
|
+
}
|
|
8768
|
+
) : onAdopt && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8769
|
+
"button",
|
|
8770
|
+
{
|
|
8771
|
+
type: "button",
|
|
8772
|
+
onClick: () => onAdopt(id),
|
|
8773
|
+
className: cn65(
|
|
8774
|
+
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
8775
|
+
"bg-primary px-3 text-xs font-medium text-primary-foreground",
|
|
8776
|
+
"hover:bg-primary/90",
|
|
8777
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8778
|
+
),
|
|
8779
|
+
children: adoptLabel
|
|
8780
|
+
}
|
|
8781
|
+
)
|
|
8782
|
+
] })
|
|
8783
|
+
]
|
|
8784
|
+
}
|
|
8785
|
+
);
|
|
8786
|
+
}
|
|
8787
|
+
MosaicMarketplaceCard.displayName = "MosaicMarketplaceCard";
|
|
8788
|
+
function cn66(...classes) {
|
|
8528
8789
|
return classes.filter(Boolean).join(" ");
|
|
8529
8790
|
}
|
|
8530
8791
|
function StarIcon2() {
|
|
@@ -8645,7 +8906,7 @@ function MosaicTemplateCard({
|
|
|
8645
8906
|
type: "button",
|
|
8646
8907
|
onClick: () => onSelect(template),
|
|
8647
8908
|
"data-slot": "template-card",
|
|
8648
|
-
className:
|
|
8909
|
+
className: cn66(
|
|
8649
8910
|
"w-full text-left rounded-lg border transition-all duration-200",
|
|
8650
8911
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8651
8912
|
isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50",
|
|
@@ -8746,7 +9007,7 @@ function MosaicTemplatePreview({
|
|
|
8746
9007
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8747
9008
|
"span",
|
|
8748
9009
|
{
|
|
8749
|
-
className:
|
|
9010
|
+
className: cn66("h-2 w-2 rounded-full", agent.accentColor),
|
|
8750
9011
|
"aria-hidden": "true"
|
|
8751
9012
|
}
|
|
8752
9013
|
),
|
|
@@ -8806,7 +9067,7 @@ function MosaicAgentTeamPreview({ agents, label }) {
|
|
|
8806
9067
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8807
9068
|
"span",
|
|
8808
9069
|
{
|
|
8809
|
-
className:
|
|
9070
|
+
className: cn66("h-2.5 w-2.5 rounded-full", agent.accentColor),
|
|
8810
9071
|
"aria-hidden": "true"
|
|
8811
9072
|
}
|
|
8812
9073
|
),
|
|
@@ -8830,7 +9091,7 @@ function MosaicQuickStartPanel({
|
|
|
8830
9091
|
scratchLabel,
|
|
8831
9092
|
className
|
|
8832
9093
|
}) {
|
|
8833
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-start-panel", className:
|
|
9094
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-start-panel", className: cn66("flex flex-col gap-6", className), children: [
|
|
8834
9095
|
scenarios.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8835
9096
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-3 text-sm font-semibold text-foreground", children: scenariosTitle }),
|
|
8836
9097
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: scenarios.map((scenario) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8838,7 +9099,7 @@ function MosaicQuickStartPanel({
|
|
|
8838
9099
|
{
|
|
8839
9100
|
type: "button",
|
|
8840
9101
|
onClick: () => onSelectScenario(scenario),
|
|
8841
|
-
className:
|
|
9102
|
+
className: cn66(
|
|
8842
9103
|
"flex items-start gap-3 rounded-lg border border-border bg-card p-4 text-left",
|
|
8843
9104
|
"hover:border-primary/50 hover:bg-primary/5",
|
|
8844
9105
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -8870,7 +9131,7 @@ function MosaicQuickStartPanel({
|
|
|
8870
9131
|
{
|
|
8871
9132
|
type: "button",
|
|
8872
9133
|
onClick: () => onSelectPreset(preset),
|
|
8873
|
-
className:
|
|
9134
|
+
className: cn66(
|
|
8874
9135
|
"flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left",
|
|
8875
9136
|
"hover:border-primary/50",
|
|
8876
9137
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -8884,7 +9145,7 @@ function MosaicQuickStartPanel({
|
|
|
8884
9145
|
a.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8885
9146
|
"span",
|
|
8886
9147
|
{
|
|
8887
|
-
className:
|
|
9148
|
+
className: cn66("h-2 w-2 rounded-full", a.accentColor),
|
|
8888
9149
|
"aria-hidden": "true"
|
|
8889
9150
|
}
|
|
8890
9151
|
),
|
|
@@ -8902,7 +9163,7 @@ function MosaicQuickStartPanel({
|
|
|
8902
9163
|
{
|
|
8903
9164
|
type: "button",
|
|
8904
9165
|
onClick: onStartFromScratch,
|
|
8905
|
-
className:
|
|
9166
|
+
className: cn66(
|
|
8906
9167
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
|
|
8907
9168
|
"bg-background px-4 text-sm font-medium text-foreground",
|
|
8908
9169
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -8941,9 +9202,9 @@ function TemplateGalleryContent({
|
|
|
8941
9202
|
duplicateLabel,
|
|
8942
9203
|
isMobile
|
|
8943
9204
|
}) {
|
|
8944
|
-
const [query, setQuery] =
|
|
8945
|
-
const [filterOpen, setFilterOpen] =
|
|
8946
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
9205
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
9206
|
+
const [filterOpen, setFilterOpen] = React30__namespace.useState(false);
|
|
9207
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React30__namespace.useState(false);
|
|
8947
9208
|
const filtered = templates.filter(
|
|
8948
9209
|
(t) => !query || t.name.toLowerCase().includes(query.toLowerCase()) || (t.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
8949
9210
|
);
|
|
@@ -8996,7 +9257,7 @@ function TemplateGalleryContent({
|
|
|
8996
9257
|
value: query,
|
|
8997
9258
|
onChange: (e) => setQuery(e.target.value),
|
|
8998
9259
|
placeholder: searchPlaceholder,
|
|
8999
|
-
className:
|
|
9260
|
+
className: cn66(
|
|
9000
9261
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
9001
9262
|
)
|
|
9002
9263
|
}
|
|
@@ -9047,7 +9308,7 @@ function TemplateGalleryContent({
|
|
|
9047
9308
|
value: query,
|
|
9048
9309
|
onChange: (e) => setQuery(e.target.value),
|
|
9049
9310
|
placeholder: searchPlaceholder,
|
|
9050
|
-
className:
|
|
9311
|
+
className: cn66(
|
|
9051
9312
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
9052
9313
|
)
|
|
9053
9314
|
}
|
|
@@ -9079,7 +9340,7 @@ function MosaicTemplateGallery(props) {
|
|
|
9079
9340
|
return /* @__PURE__ */ jsxRuntime.jsx(TemplateGalleryContent, { ...props, isMobile });
|
|
9080
9341
|
}
|
|
9081
9342
|
MosaicTemplateGallery.displayName = "MosaicTemplateGallery";
|
|
9082
|
-
function
|
|
9343
|
+
function cn67(...classes) {
|
|
9083
9344
|
return classes.filter(Boolean).join(" ");
|
|
9084
9345
|
}
|
|
9085
9346
|
function PlusIcon5() {
|
|
@@ -9181,7 +9442,7 @@ function MosaicModuleForm(props) {
|
|
|
9181
9442
|
cancelLabel,
|
|
9182
9443
|
tagListAddPlaceholder
|
|
9183
9444
|
} = props;
|
|
9184
|
-
const [formData, setFormData] =
|
|
9445
|
+
const [formData, setFormData] = React30__namespace.useState({
|
|
9185
9446
|
name: item?.name ?? "",
|
|
9186
9447
|
description: item?.description ?? "",
|
|
9187
9448
|
icon: item?.icon ?? "",
|
|
@@ -9192,7 +9453,7 @@ function MosaicModuleForm(props) {
|
|
|
9192
9453
|
formFields.map((f) => [f.id, item?.[f.id] ?? (f.type === "tag-list" ? [] : "")])
|
|
9193
9454
|
)
|
|
9194
9455
|
});
|
|
9195
|
-
const [tagInputs, setTagInputs] =
|
|
9456
|
+
const [tagInputs, setTagInputs] = React30__namespace.useState({});
|
|
9196
9457
|
const update = (key, value) => {
|
|
9197
9458
|
setFormData((prev) => ({ ...prev, [key]: value }));
|
|
9198
9459
|
};
|
|
@@ -9230,7 +9491,7 @@ function MosaicModuleForm(props) {
|
|
|
9230
9491
|
onChange: (e) => update("name", e.target.value),
|
|
9231
9492
|
placeholder: namePlaceholder,
|
|
9232
9493
|
required: true,
|
|
9233
|
-
className:
|
|
9494
|
+
className: cn67(
|
|
9234
9495
|
"w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
|
|
9235
9496
|
"text-sm placeholder:text-muted-foreground",
|
|
9236
9497
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9248,7 +9509,7 @@ function MosaicModuleForm(props) {
|
|
|
9248
9509
|
onChange: (e) => update("description", e.target.value),
|
|
9249
9510
|
placeholder: descriptionPlaceholder,
|
|
9250
9511
|
rows: 3,
|
|
9251
|
-
className:
|
|
9512
|
+
className: cn67(
|
|
9252
9513
|
"w-full rounded-md border border-input bg-background px-3 py-2",
|
|
9253
9514
|
"text-sm placeholder:text-muted-foreground resize-none",
|
|
9254
9515
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9270,7 +9531,7 @@ function MosaicModuleForm(props) {
|
|
|
9270
9531
|
value: formData[field.id] ?? "",
|
|
9271
9532
|
onChange: (e) => update(field.id, e.target.value),
|
|
9272
9533
|
placeholder: field.placeholder,
|
|
9273
|
-
className:
|
|
9534
|
+
className: cn67(
|
|
9274
9535
|
"w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
|
|
9275
9536
|
"text-sm placeholder:text-muted-foreground",
|
|
9276
9537
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9285,7 +9546,7 @@ function MosaicModuleForm(props) {
|
|
|
9285
9546
|
onChange: (e) => update(field.id, e.target.value),
|
|
9286
9547
|
placeholder: field.placeholder,
|
|
9287
9548
|
rows: 3,
|
|
9288
|
-
className:
|
|
9549
|
+
className: cn67(
|
|
9289
9550
|
"w-full rounded-md border border-input bg-background px-3 py-2",
|
|
9290
9551
|
"text-sm placeholder:text-muted-foreground resize-none",
|
|
9291
9552
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9301,7 +9562,7 @@ function MosaicModuleForm(props) {
|
|
|
9301
9562
|
onChange: (e) => update(field.id, e.target.value),
|
|
9302
9563
|
placeholder: field.placeholder ?? "\u{1F9E0}",
|
|
9303
9564
|
maxLength: 4,
|
|
9304
|
-
className:
|
|
9565
|
+
className: cn67(
|
|
9305
9566
|
"w-20 rounded-md border border-input bg-background px-3 py-2 text-2xl",
|
|
9306
9567
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
9307
9568
|
)
|
|
@@ -9322,7 +9583,7 @@ function MosaicModuleForm(props) {
|
|
|
9322
9583
|
}
|
|
9323
9584
|
},
|
|
9324
9585
|
placeholder: field.placeholder ?? tagListAddPlaceholder,
|
|
9325
|
-
className:
|
|
9586
|
+
className: cn67(
|
|
9326
9587
|
"flex-1 rounded-md border border-input bg-background px-3 py-2 min-h-[36px]",
|
|
9327
9588
|
"text-sm placeholder:text-muted-foreground",
|
|
9328
9589
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9393,9 +9654,9 @@ function ModuleItemCard({
|
|
|
9393
9654
|
editItemLabel,
|
|
9394
9655
|
deleteItemLabel
|
|
9395
9656
|
}) {
|
|
9396
|
-
const [menuOpen, setMenuOpen] =
|
|
9397
|
-
const menuRef =
|
|
9398
|
-
|
|
9657
|
+
const [menuOpen, setMenuOpen] = React30__namespace.useState(false);
|
|
9658
|
+
const menuRef = React30__namespace.useRef(null);
|
|
9659
|
+
React30__namespace.useEffect(() => {
|
|
9399
9660
|
if (!menuOpen) return;
|
|
9400
9661
|
const h = (e) => {
|
|
9401
9662
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -9496,11 +9757,11 @@ function LibraryContent({
|
|
|
9496
9757
|
editModalTitle,
|
|
9497
9758
|
tagListAddPlaceholder
|
|
9498
9759
|
}) {
|
|
9499
|
-
const [query, setQuery] =
|
|
9500
|
-
const [activeTab, setActiveTab] =
|
|
9501
|
-
const [editorOpen, setEditorOpen] =
|
|
9502
|
-
const [editingItem, setEditingItem] =
|
|
9503
|
-
const [editorMode, setEditorMode] =
|
|
9760
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
9761
|
+
const [activeTab, setActiveTab] = React30__namespace.useState(tabs?.[0]?.id ?? "all");
|
|
9762
|
+
const [editorOpen, setEditorOpen] = React30__namespace.useState(false);
|
|
9763
|
+
const [editingItem, setEditingItem] = React30__namespace.useState();
|
|
9764
|
+
const [editorMode, setEditorMode] = React30__namespace.useState("create");
|
|
9504
9765
|
const openCreate = () => {
|
|
9505
9766
|
setEditingItem(void 0);
|
|
9506
9767
|
setEditorMode("create");
|
|
@@ -9534,7 +9795,7 @@ function LibraryContent({
|
|
|
9534
9795
|
{
|
|
9535
9796
|
type: "button",
|
|
9536
9797
|
onClick: openCreate,
|
|
9537
|
-
className:
|
|
9798
|
+
className: cn67(
|
|
9538
9799
|
"inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground",
|
|
9539
9800
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
9540
9801
|
),
|
|
@@ -9554,7 +9815,7 @@ function LibraryContent({
|
|
|
9554
9815
|
value: query,
|
|
9555
9816
|
onChange: (e) => setQuery(e.target.value),
|
|
9556
9817
|
placeholder: searchPlaceholder,
|
|
9557
|
-
className:
|
|
9818
|
+
className: cn67(
|
|
9558
9819
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
9559
9820
|
"text-sm placeholder:text-muted-foreground",
|
|
9560
9821
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9567,7 +9828,7 @@ function LibraryContent({
|
|
|
9567
9828
|
{
|
|
9568
9829
|
type: "button",
|
|
9569
9830
|
onClick: () => setActiveTab(tab.id),
|
|
9570
|
-
className:
|
|
9831
|
+
className: cn67(
|
|
9571
9832
|
"rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
9572
9833
|
activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
9573
9834
|
),
|
|
@@ -9619,7 +9880,7 @@ function MosaicModuleLibrary(props) {
|
|
|
9619
9880
|
return /* @__PURE__ */ jsxRuntime.jsx(LibraryContent, { ...props });
|
|
9620
9881
|
}
|
|
9621
9882
|
MosaicModuleLibrary.displayName = "MosaicModuleLibrary";
|
|
9622
|
-
function
|
|
9883
|
+
function cn68(...classes) {
|
|
9623
9884
|
return classes.filter(Boolean).join(" ");
|
|
9624
9885
|
}
|
|
9625
9886
|
var roleConfig = {
|
|
@@ -9646,7 +9907,7 @@ function MosaicOrgRoleBadge({ role, className }) {
|
|
|
9646
9907
|
{
|
|
9647
9908
|
"data-slot": "org-role-badge",
|
|
9648
9909
|
title: config.description,
|
|
9649
|
-
className:
|
|
9910
|
+
className: cn68(
|
|
9650
9911
|
"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
|
|
9651
9912
|
config.className,
|
|
9652
9913
|
className
|
|
@@ -9663,13 +9924,13 @@ function MosaicMultiOrgIndicator({
|
|
|
9663
9924
|
className
|
|
9664
9925
|
}) {
|
|
9665
9926
|
if (orgCount <= 1) return null;
|
|
9666
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "multi-org-indicator", className:
|
|
9927
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "multi-org-indicator", className: cn68("flex items-center gap-2", className), children: [
|
|
9667
9928
|
onSwitchOrg ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9668
9929
|
"button",
|
|
9669
9930
|
{
|
|
9670
9931
|
type: "button",
|
|
9671
9932
|
onClick: onSwitchOrg,
|
|
9672
|
-
className:
|
|
9933
|
+
className: cn68(
|
|
9673
9934
|
"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2.5 py-1 text-xs font-medium text-secondary-foreground",
|
|
9674
9935
|
"hover:bg-secondary/80",
|
|
9675
9936
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9722,10 +9983,10 @@ function MosaicCreateOrgDialog({
|
|
|
9722
9983
|
creatingLabel,
|
|
9723
9984
|
createLabel
|
|
9724
9985
|
}) {
|
|
9725
|
-
const [name, setName] =
|
|
9726
|
-
const [slug, setSlug] =
|
|
9727
|
-
const [description, setDescription] =
|
|
9728
|
-
const [errors, setErrors] =
|
|
9986
|
+
const [name, setName] = React30__namespace.useState("");
|
|
9987
|
+
const [slug, setSlug] = React30__namespace.useState("");
|
|
9988
|
+
const [description, setDescription] = React30__namespace.useState("");
|
|
9989
|
+
const [errors, setErrors] = React30__namespace.useState({});
|
|
9729
9990
|
const validate = () => {
|
|
9730
9991
|
const errs = {};
|
|
9731
9992
|
if (!name.trim()) errs.name = "Name is required";
|
|
@@ -9749,7 +10010,7 @@ function MosaicCreateOrgDialog({
|
|
|
9749
10010
|
setErrors({});
|
|
9750
10011
|
onOpenChange(false);
|
|
9751
10012
|
};
|
|
9752
|
-
|
|
10013
|
+
React30__namespace.useEffect(() => {
|
|
9753
10014
|
if (!name) {
|
|
9754
10015
|
setSlug("");
|
|
9755
10016
|
return;
|
|
@@ -9783,7 +10044,7 @@ function MosaicCreateOrgDialog({
|
|
|
9783
10044
|
onChange: (e) => setName(e.target.value),
|
|
9784
10045
|
placeholder: orgNamePlaceholder,
|
|
9785
10046
|
required: true,
|
|
9786
|
-
className:
|
|
10047
|
+
className: cn68(
|
|
9787
10048
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9788
10049
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9789
10050
|
errors.name ? "border-destructive" : "border-input"
|
|
@@ -9803,7 +10064,7 @@ function MosaicCreateOrgDialog({
|
|
|
9803
10064
|
onChange: (e) => setSlug(e.target.value),
|
|
9804
10065
|
placeholder: "acme-inc",
|
|
9805
10066
|
required: true,
|
|
9806
|
-
className:
|
|
10067
|
+
className: cn68(
|
|
9807
10068
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9808
10069
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9809
10070
|
errors.slug ? "border-destructive" : "border-input"
|
|
@@ -9872,9 +10133,9 @@ function MosaicInviteMemberDialog({
|
|
|
9872
10133
|
sendingLabel,
|
|
9873
10134
|
sendInvitationLabel
|
|
9874
10135
|
}) {
|
|
9875
|
-
const [email, setEmail] =
|
|
9876
|
-
const [role, setRole] =
|
|
9877
|
-
const [errors, setErrors] =
|
|
10136
|
+
const [email, setEmail] = React30__namespace.useState("");
|
|
10137
|
+
const [role, setRole] = React30__namespace.useState("member");
|
|
10138
|
+
const [errors, setErrors] = React30__namespace.useState({});
|
|
9878
10139
|
const validate = () => {
|
|
9879
10140
|
const errs = {};
|
|
9880
10141
|
if (!email.trim()) errs.email = "Email is required";
|
|
@@ -9916,7 +10177,7 @@ function MosaicInviteMemberDialog({
|
|
|
9916
10177
|
onChange: (e) => setEmail(e.target.value),
|
|
9917
10178
|
placeholder: emailPlaceholder,
|
|
9918
10179
|
required: true,
|
|
9919
|
-
className:
|
|
10180
|
+
className: cn68(
|
|
9920
10181
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9921
10182
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9922
10183
|
errors.email ? "border-destructive" : "border-input"
|
|
@@ -9975,10 +10236,10 @@ function MemberRow({
|
|
|
9975
10236
|
memberActionsAriaLabel,
|
|
9976
10237
|
removeMemberLabel
|
|
9977
10238
|
}) {
|
|
9978
|
-
const [menuOpen, setMenuOpen] =
|
|
9979
|
-
const menuRef =
|
|
10239
|
+
const [menuOpen, setMenuOpen] = React30__namespace.useState(false);
|
|
10240
|
+
const menuRef = React30__namespace.useRef(null);
|
|
9980
10241
|
const isSelf = member.id === currentUserId;
|
|
9981
|
-
|
|
10242
|
+
React30__namespace.useEffect(() => {
|
|
9982
10243
|
if (!menuOpen) return;
|
|
9983
10244
|
const h = (e) => {
|
|
9984
10245
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -10099,11 +10360,11 @@ function MosaicMemberList({
|
|
|
10099
10360
|
inviteLabel,
|
|
10100
10361
|
className
|
|
10101
10362
|
}) {
|
|
10102
|
-
const [query, setQuery] =
|
|
10363
|
+
const [query, setQuery] = React30__namespace.useState("");
|
|
10103
10364
|
const filtered = members.filter(
|
|
10104
10365
|
(m) => !query || m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
|
|
10105
10366
|
);
|
|
10106
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "member-list", className:
|
|
10367
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "member-list", className: cn68("flex flex-col gap-4", className), children: [
|
|
10107
10368
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10108
10369
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
10109
10370
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10197,9 +10458,9 @@ function MosaicOrgPanel({
|
|
|
10197
10458
|
className
|
|
10198
10459
|
}) {
|
|
10199
10460
|
const { isMobile } = useDevice();
|
|
10200
|
-
const [activeTab, setActiveTab] =
|
|
10461
|
+
const [activeTab, setActiveTab] = React30__namespace.useState(defaultTab ?? tabs[0]?.id ?? "");
|
|
10201
10462
|
const activeContent = tabs.find((t) => t.id === activeTab)?.content;
|
|
10202
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "org-panel", className:
|
|
10463
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "org-panel", className: cn68("flex h-full flex-col", className), children: [
|
|
10203
10464
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-4 py-4 md:px-6", children: [
|
|
10204
10465
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
10205
10466
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -10221,12 +10482,12 @@ function MosaicOrgPanel({
|
|
|
10221
10482
|
] }),
|
|
10222
10483
|
headerActions
|
|
10223
10484
|
] }),
|
|
10224
|
-
tabs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10485
|
+
tabs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn68("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10225
10486
|
"button",
|
|
10226
10487
|
{
|
|
10227
10488
|
type: "button",
|
|
10228
10489
|
onClick: () => setActiveTab(tab.id),
|
|
10229
|
-
className:
|
|
10490
|
+
className: cn68(
|
|
10230
10491
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
10231
10492
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
10232
10493
|
activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
@@ -10240,7 +10501,7 @@ function MosaicOrgPanel({
|
|
|
10240
10501
|
] });
|
|
10241
10502
|
}
|
|
10242
10503
|
MosaicOrgPanel.displayName = "MosaicOrgPanel";
|
|
10243
|
-
function
|
|
10504
|
+
function cn69(...classes) {
|
|
10244
10505
|
return classes.filter(Boolean).join(" ");
|
|
10245
10506
|
}
|
|
10246
10507
|
var ANIM_ID8 = "mosaic-dashboard-content-kf";
|
|
@@ -10269,7 +10530,7 @@ function MosaicDashboardContent({
|
|
|
10269
10530
|
className
|
|
10270
10531
|
}) {
|
|
10271
10532
|
const { isMobile } = useDevice();
|
|
10272
|
-
|
|
10533
|
+
React30__namespace.useEffect(() => {
|
|
10273
10534
|
injectStyles8();
|
|
10274
10535
|
}, []);
|
|
10275
10536
|
const activeView = views.find((v) => v.id === currentView);
|
|
@@ -10277,7 +10538,7 @@ function MosaicDashboardContent({
|
|
|
10277
10538
|
"div",
|
|
10278
10539
|
{
|
|
10279
10540
|
"data-slot": "dashboard-content",
|
|
10280
|
-
className:
|
|
10541
|
+
className: cn69("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
|
|
10281
10542
|
children: activeView ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mosaic-content-view space-y-6", children: activeView.content }, currentView) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "py-12 text-center text-sm text-muted-foreground", children: [
|
|
10282
10543
|
"View not found: ",
|
|
10283
10544
|
currentView
|
|
@@ -10286,7 +10547,7 @@ function MosaicDashboardContent({
|
|
|
10286
10547
|
);
|
|
10287
10548
|
}
|
|
10288
10549
|
MosaicDashboardContent.displayName = "MosaicDashboardContent";
|
|
10289
|
-
function
|
|
10550
|
+
function cn70(...classes) {
|
|
10290
10551
|
return classes.filter(Boolean).join(" ");
|
|
10291
10552
|
}
|
|
10292
10553
|
var ANIM_ID9 = "mosaic-dashboard-header2-kf";
|
|
@@ -10386,8 +10647,8 @@ function MosaicDashboardHeader({
|
|
|
10386
10647
|
className
|
|
10387
10648
|
}) {
|
|
10388
10649
|
const { isMobile } = useDevice();
|
|
10389
|
-
const [searchQuery, setSearchQuery] =
|
|
10390
|
-
|
|
10650
|
+
const [searchQuery, setSearchQuery] = React30__namespace.useState("");
|
|
10651
|
+
React30__namespace.useEffect(() => {
|
|
10391
10652
|
injectStyles9();
|
|
10392
10653
|
}, []);
|
|
10393
10654
|
const handleSearch = (e) => {
|
|
@@ -10398,16 +10659,16 @@ function MosaicDashboardHeader({
|
|
|
10398
10659
|
"header",
|
|
10399
10660
|
{
|
|
10400
10661
|
"data-slot": "dashboard-header",
|
|
10401
|
-
className:
|
|
10662
|
+
className: cn70(
|
|
10402
10663
|
"mosaic-dashboard-header2",
|
|
10403
10664
|
"sticky top-0 z-40 border-b border-border/50 bg-background/80 backdrop-blur-sm",
|
|
10404
10665
|
className
|
|
10405
10666
|
),
|
|
10406
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10667
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn70(isMobile ? "px-4 py-3" : "container mx-auto px-4 py-4"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
10407
10668
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2 md:gap-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10408
10669
|
logoSlot ?? /* @__PURE__ */ jsxRuntime.jsx(SparklesIcon4, {}),
|
|
10409
10670
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
10410
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className:
|
|
10671
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn70("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
|
|
10411
10672
|
subtitle && !isMobile && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate", children: subtitle })
|
|
10412
10673
|
] })
|
|
10413
10674
|
] }) }),
|
|
@@ -10420,7 +10681,7 @@ function MosaicDashboardHeader({
|
|
|
10420
10681
|
value: searchQuery,
|
|
10421
10682
|
onChange: handleSearch,
|
|
10422
10683
|
placeholder: searchPlaceholder,
|
|
10423
|
-
className:
|
|
10684
|
+
className: cn70(
|
|
10424
10685
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
10425
10686
|
"text-sm placeholder:text-muted-foreground",
|
|
10426
10687
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -10460,7 +10721,7 @@ function MosaicDashboardHeader({
|
|
|
10460
10721
|
);
|
|
10461
10722
|
}
|
|
10462
10723
|
MosaicDashboardHeader.displayName = "MosaicDashboardHeader";
|
|
10463
|
-
function
|
|
10724
|
+
function cn71(...classes) {
|
|
10464
10725
|
return classes.filter(Boolean).join(" ");
|
|
10465
10726
|
}
|
|
10466
10727
|
function ChevronDownIcon4() {
|
|
@@ -10530,10 +10791,10 @@ function MosaicOrgSwitcher({
|
|
|
10530
10791
|
noOrgSelectedLabel,
|
|
10531
10792
|
className
|
|
10532
10793
|
}) {
|
|
10533
|
-
const [open, setOpen] =
|
|
10534
|
-
const ref =
|
|
10794
|
+
const [open, setOpen] = React30__namespace.useState(false);
|
|
10795
|
+
const ref = React30__namespace.useRef(null);
|
|
10535
10796
|
const currentOrg = organizations.find((o) => o.id === currentOrgId) ?? organizations[0];
|
|
10536
|
-
|
|
10797
|
+
React30__namespace.useEffect(() => {
|
|
10537
10798
|
if (!open) return;
|
|
10538
10799
|
const h = (e) => {
|
|
10539
10800
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -10543,13 +10804,13 @@ function MosaicOrgSwitcher({
|
|
|
10543
10804
|
}, [open]);
|
|
10544
10805
|
if (!currentOrg && organizations.length === 0 && !onCreateOrg) return null;
|
|
10545
10806
|
const initials = currentOrg?.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() ?? "?";
|
|
10546
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "org-switcher", className:
|
|
10807
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "org-switcher", className: cn71("relative", className), children: [
|
|
10547
10808
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10548
10809
|
"button",
|
|
10549
10810
|
{
|
|
10550
10811
|
type: "button",
|
|
10551
10812
|
onClick: () => setOpen((v) => !v),
|
|
10552
|
-
className:
|
|
10813
|
+
className: cn71(
|
|
10553
10814
|
"inline-flex items-center gap-2 rounded-md border border-border bg-background px-3 py-1.5",
|
|
10554
10815
|
"text-sm font-medium text-foreground",
|
|
10555
10816
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -10576,7 +10837,7 @@ function MosaicOrgSwitcher({
|
|
|
10576
10837
|
{
|
|
10577
10838
|
role: "menu",
|
|
10578
10839
|
"aria-label": triggerAriaLabel,
|
|
10579
|
-
className:
|
|
10840
|
+
className: cn71(
|
|
10580
10841
|
"absolute left-0 top-full z-50 mt-1 min-w-[200px] rounded-md border border-border",
|
|
10581
10842
|
"bg-popover py-1 shadow-md"
|
|
10582
10843
|
),
|
|
@@ -10591,7 +10852,7 @@ function MosaicOrgSwitcher({
|
|
|
10591
10852
|
onSelectOrg?.(org.id);
|
|
10592
10853
|
setOpen(false);
|
|
10593
10854
|
},
|
|
10594
|
-
className:
|
|
10855
|
+
className: cn71(
|
|
10595
10856
|
"flex w-full items-center gap-2.5 px-3 py-2 text-sm text-foreground",
|
|
10596
10857
|
"hover:bg-accent hover:text-accent-foreground",
|
|
10597
10858
|
org.id === currentOrgId && "bg-primary/10 text-primary"
|
|
@@ -10628,7 +10889,7 @@ function MosaicOrgSwitcher({
|
|
|
10628
10889
|
] });
|
|
10629
10890
|
}
|
|
10630
10891
|
MosaicOrgSwitcher.displayName = "MosaicOrgSwitcher";
|
|
10631
|
-
function
|
|
10892
|
+
function cn72(...classes) {
|
|
10632
10893
|
return classes.filter(Boolean).join(" ");
|
|
10633
10894
|
}
|
|
10634
10895
|
function PlusIcon7() {
|
|
@@ -10663,9 +10924,9 @@ function MosaicQuickActionsMenu({
|
|
|
10663
10924
|
className
|
|
10664
10925
|
}) {
|
|
10665
10926
|
const { isMobile } = useDevice();
|
|
10666
|
-
const [open, setOpen] =
|
|
10667
|
-
const ref =
|
|
10668
|
-
|
|
10927
|
+
const [open, setOpen] = React30__namespace.useState(false);
|
|
10928
|
+
const ref = React30__namespace.useRef(null);
|
|
10929
|
+
React30__namespace.useEffect(() => {
|
|
10669
10930
|
if (!open) return;
|
|
10670
10931
|
const h = (e) => {
|
|
10671
10932
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -10673,19 +10934,19 @@ function MosaicQuickActionsMenu({
|
|
|
10673
10934
|
document.addEventListener("mousedown", h);
|
|
10674
10935
|
return () => document.removeEventListener("mousedown", h);
|
|
10675
10936
|
}, [open]);
|
|
10676
|
-
const itemClass =
|
|
10937
|
+
const itemClass = cn72(
|
|
10677
10938
|
"flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
|
|
10678
10939
|
"hover:bg-accent hover:text-accent-foreground",
|
|
10679
10940
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
10680
10941
|
"min-h-[44px]"
|
|
10681
10942
|
);
|
|
10682
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "quick-actions-menu", className:
|
|
10943
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn72("relative", className), children: [
|
|
10683
10944
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10684
10945
|
"button",
|
|
10685
10946
|
{
|
|
10686
10947
|
type: "button",
|
|
10687
10948
|
onClick: () => setOpen((v) => !v),
|
|
10688
|
-
className:
|
|
10949
|
+
className: cn72(
|
|
10689
10950
|
"inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
|
|
10690
10951
|
"min-h-[44px] min-w-[44px] px-3 py-2 text-sm font-medium text-foreground",
|
|
10691
10952
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -10696,7 +10957,7 @@ function MosaicQuickActionsMenu({
|
|
|
10696
10957
|
"aria-label": label,
|
|
10697
10958
|
children: [
|
|
10698
10959
|
triggerIcon ?? /* @__PURE__ */ jsxRuntime.jsx(PlusIcon7, {}),
|
|
10699
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
10960
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn72("hidden md:inline"), children: label })
|
|
10700
10961
|
]
|
|
10701
10962
|
}
|
|
10702
10963
|
),
|
|
@@ -10705,14 +10966,14 @@ function MosaicQuickActionsMenu({
|
|
|
10705
10966
|
{
|
|
10706
10967
|
role: "menu",
|
|
10707
10968
|
"aria-label": menuTitle,
|
|
10708
|
-
className:
|
|
10969
|
+
className: cn72(
|
|
10709
10970
|
"absolute right-0 top-full z-50 mt-1 rounded-md border border-border bg-popover py-1 shadow-md",
|
|
10710
10971
|
isMobile ? "w-[min(90vw,280px)]" : "w-56"
|
|
10711
10972
|
),
|
|
10712
10973
|
children: [
|
|
10713
10974
|
menuTitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide", children: menuTitle }) }),
|
|
10714
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10715
|
-
actions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10975
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn72(menuTitle && "border-t border-border") }),
|
|
10976
|
+
actions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(React30__namespace.Fragment, { children: [
|
|
10716
10977
|
action.separator && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-1 border-t border-border" }),
|
|
10717
10978
|
action.href && renderLink ? renderLink(
|
|
10718
10979
|
action,
|
|
@@ -11016,7 +11277,7 @@ function MosaicOrgProfilePage({
|
|
|
11016
11277
|
);
|
|
11017
11278
|
}
|
|
11018
11279
|
MosaicOrgProfilePage.displayName = "MosaicOrgProfilePage";
|
|
11019
|
-
function
|
|
11280
|
+
function cn73(...classes) {
|
|
11020
11281
|
return classes.filter(Boolean).join(" ");
|
|
11021
11282
|
}
|
|
11022
11283
|
function defaultCompare(a, b) {
|
|
@@ -11035,7 +11296,7 @@ function MosaicDataTable({
|
|
|
11035
11296
|
footerSlot,
|
|
11036
11297
|
pagination
|
|
11037
11298
|
}) {
|
|
11038
|
-
const [sort, setSort] =
|
|
11299
|
+
const [sort, setSort] = React30.useState(null);
|
|
11039
11300
|
function handleHeaderClick(col) {
|
|
11040
11301
|
if (!masterSortable || !col.sortable) return;
|
|
11041
11302
|
setSort((prev) => {
|
|
@@ -11079,7 +11340,7 @@ function MosaicDataTable({
|
|
|
11079
11340
|
{
|
|
11080
11341
|
ref,
|
|
11081
11342
|
"data-slot": "data-table",
|
|
11082
|
-
className:
|
|
11343
|
+
className: cn73("w-full border-collapse text-sm", className),
|
|
11083
11344
|
children: [
|
|
11084
11345
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { "data-slot": "data-table-header", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-slot": "data-table-header-row", className: "border-b border-border bg-muted", children: columns.map((col, colIndex) => {
|
|
11085
11346
|
const isSortable = masterSortable && col.sortable;
|
|
@@ -11097,7 +11358,7 @@ function MosaicDataTable({
|
|
|
11097
11358
|
handleHeaderClick(col);
|
|
11098
11359
|
}
|
|
11099
11360
|
} : void 0,
|
|
11100
|
-
className:
|
|
11361
|
+
className: cn73(
|
|
11101
11362
|
"px-4 py-3 font-medium text-muted-foreground",
|
|
11102
11363
|
alignClass(col.align),
|
|
11103
11364
|
col.className,
|
|
@@ -11133,7 +11394,7 @@ function MosaicDataTable({
|
|
|
11133
11394
|
"td",
|
|
11134
11395
|
{
|
|
11135
11396
|
"data-slot": "data-table-td",
|
|
11136
|
-
className:
|
|
11397
|
+
className: cn73(
|
|
11137
11398
|
"px-4 py-3 text-foreground",
|
|
11138
11399
|
alignClass(col.align),
|
|
11139
11400
|
col.className
|
|
@@ -11272,7 +11533,7 @@ var stepSegmentVariants = classVarianceAuthority.cva(["h-1.5 flex-1 min-w-2 roun
|
|
|
11272
11533
|
filled: false
|
|
11273
11534
|
}
|
|
11274
11535
|
});
|
|
11275
|
-
function
|
|
11536
|
+
function cn74(...classes) {
|
|
11276
11537
|
return classes.filter(Boolean).join(" ");
|
|
11277
11538
|
}
|
|
11278
11539
|
function resolveStatus(step, index, currentIndex) {
|
|
@@ -11313,7 +11574,7 @@ function MosaicStepPipelineSegments({
|
|
|
11313
11574
|
"aria-valuemax": total,
|
|
11314
11575
|
"aria-valuenow": current,
|
|
11315
11576
|
"aria-valuetext": progressLabel ? progressLabel(current, total) : void 0,
|
|
11316
|
-
className:
|
|
11577
|
+
className: cn74(stepSegmentBarVariants(), className),
|
|
11317
11578
|
children: steps.map((step, index) => {
|
|
11318
11579
|
const status = resolveStatus(step, index, currentIndex);
|
|
11319
11580
|
const filled = status !== "upcoming";
|
|
@@ -11325,7 +11586,7 @@ function MosaicStepPipelineSegments({
|
|
|
11325
11586
|
"data-status": status,
|
|
11326
11587
|
"data-filled": filled,
|
|
11327
11588
|
"aria-hidden": "true",
|
|
11328
|
-
className:
|
|
11589
|
+
className: cn74(stepSegmentVariants({ filled }))
|
|
11329
11590
|
},
|
|
11330
11591
|
key
|
|
11331
11592
|
);
|
|
@@ -11346,7 +11607,7 @@ function MosaicStepPipelineDots({
|
|
|
11346
11607
|
{
|
|
11347
11608
|
ref,
|
|
11348
11609
|
"data-slot": "step-pipeline",
|
|
11349
|
-
className:
|
|
11610
|
+
className: cn74(stepPipelineVariants({ orientation }), className),
|
|
11350
11611
|
children: steps.map((step, index) => {
|
|
11351
11612
|
const status = resolveStatus(step, index, currentIndex);
|
|
11352
11613
|
const isCurrent = status === "current";
|
|
@@ -11358,7 +11619,7 @@ function MosaicStepPipelineDots({
|
|
|
11358
11619
|
"data-slot": "step",
|
|
11359
11620
|
"data-status": status,
|
|
11360
11621
|
"aria-current": isCurrent ? "step" : void 0,
|
|
11361
|
-
className:
|
|
11622
|
+
className: cn74(
|
|
11362
11623
|
"flex shrink-0",
|
|
11363
11624
|
orientation === "horizontal" ? "flex-col items-center gap-2" : "flex-row items-start gap-3",
|
|
11364
11625
|
orientation === "horizontal" && !isLast && "flex-1"
|
|
@@ -11369,14 +11630,14 @@ function MosaicStepPipelineDots({
|
|
|
11369
11630
|
"div",
|
|
11370
11631
|
{
|
|
11371
11632
|
"data-slot": "step-connector",
|
|
11372
|
-
className:
|
|
11633
|
+
className: cn74(stepConnectorVariants({ status, orientation }))
|
|
11373
11634
|
}
|
|
11374
11635
|
),
|
|
11375
11636
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11376
11637
|
"div",
|
|
11377
11638
|
{
|
|
11378
11639
|
"data-slot": "step-indicator",
|
|
11379
|
-
className:
|
|
11640
|
+
className: cn74(stepIndicatorVariants({ status, orientation })),
|
|
11380
11641
|
"aria-hidden": "true",
|
|
11381
11642
|
children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
|
|
11382
11643
|
}
|
|
@@ -11385,7 +11646,7 @@ function MosaicStepPipelineDots({
|
|
|
11385
11646
|
"div",
|
|
11386
11647
|
{
|
|
11387
11648
|
"data-slot": "step-connector",
|
|
11388
|
-
className:
|
|
11649
|
+
className: cn74(
|
|
11389
11650
|
stepConnectorVariants({
|
|
11390
11651
|
// connector after current step is still upcoming
|
|
11391
11652
|
status: status === "done" ? "done" : "upcoming",
|
|
@@ -11396,12 +11657,12 @@ function MosaicStepPipelineDots({
|
|
|
11396
11657
|
)
|
|
11397
11658
|
] }),
|
|
11398
11659
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-0.5 text-center px-1", children: [
|
|
11399
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className:
|
|
11660
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn74(stepLabelVariants({ status })), children: step.label }),
|
|
11400
11661
|
step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11401
11662
|
"span",
|
|
11402
11663
|
{
|
|
11403
11664
|
"data-slot": "step-description",
|
|
11404
|
-
className:
|
|
11665
|
+
className: cn74(stepDescriptionVariants({ status })),
|
|
11405
11666
|
children: step.description
|
|
11406
11667
|
}
|
|
11407
11668
|
)
|
|
@@ -11412,7 +11673,7 @@ function MosaicStepPipelineDots({
|
|
|
11412
11673
|
"div",
|
|
11413
11674
|
{
|
|
11414
11675
|
"data-slot": "step-indicator",
|
|
11415
|
-
className:
|
|
11676
|
+
className: cn74(stepIndicatorVariants({ status, orientation })),
|
|
11416
11677
|
"aria-hidden": "true",
|
|
11417
11678
|
children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
|
|
11418
11679
|
}
|
|
@@ -11421,7 +11682,7 @@ function MosaicStepPipelineDots({
|
|
|
11421
11682
|
"div",
|
|
11422
11683
|
{
|
|
11423
11684
|
"data-slot": "step-connector",
|
|
11424
|
-
className:
|
|
11685
|
+
className: cn74(
|
|
11425
11686
|
stepConnectorVariants({
|
|
11426
11687
|
status: status === "done" ? "done" : "upcoming",
|
|
11427
11688
|
orientation
|
|
@@ -11431,12 +11692,12 @@ function MosaicStepPipelineDots({
|
|
|
11431
11692
|
)
|
|
11432
11693
|
] }),
|
|
11433
11694
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 pt-1 pb-4", children: [
|
|
11434
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className:
|
|
11695
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn74(stepLabelVariants({ status })), children: step.label }),
|
|
11435
11696
|
step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11436
11697
|
"span",
|
|
11437
11698
|
{
|
|
11438
11699
|
"data-slot": "step-description",
|
|
11439
|
-
className:
|
|
11700
|
+
className: cn74(stepDescriptionVariants({ status })),
|
|
11440
11701
|
children: step.description
|
|
11441
11702
|
}
|
|
11442
11703
|
)
|
|
@@ -11450,7 +11711,7 @@ function MosaicStepPipelineDots({
|
|
|
11450
11711
|
);
|
|
11451
11712
|
}
|
|
11452
11713
|
MosaicStepPipelineDots.displayName = "MosaicStepPipelineDots";
|
|
11453
|
-
function
|
|
11714
|
+
function cn75(...classes) {
|
|
11454
11715
|
return classes.filter(Boolean).join(" ");
|
|
11455
11716
|
}
|
|
11456
11717
|
function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
@@ -11459,7 +11720,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
|
11459
11720
|
{
|
|
11460
11721
|
ref,
|
|
11461
11722
|
"data-slot": "kanban-board",
|
|
11462
|
-
className:
|
|
11723
|
+
className: cn75(
|
|
11463
11724
|
"flex gap-4 overflow-x-auto pb-4",
|
|
11464
11725
|
"min-h-0",
|
|
11465
11726
|
// Smooth momentum scrolling on iOS
|
|
@@ -11472,7 +11733,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
|
11472
11733
|
);
|
|
11473
11734
|
}
|
|
11474
11735
|
MosaicKanbanBoard.displayName = "MosaicKanbanBoard";
|
|
11475
|
-
function
|
|
11736
|
+
function cn76(...classes) {
|
|
11476
11737
|
return classes.filter(Boolean).join(" ");
|
|
11477
11738
|
}
|
|
11478
11739
|
function MosaicKanbanColumn({
|
|
@@ -11490,7 +11751,7 @@ function MosaicKanbanColumn({
|
|
|
11490
11751
|
{
|
|
11491
11752
|
ref,
|
|
11492
11753
|
"data-slot": "kanban-column",
|
|
11493
|
-
className:
|
|
11754
|
+
className: cn76(
|
|
11494
11755
|
// Fixed column width, never shrink so board stays scrollable
|
|
11495
11756
|
"flex flex-col w-72 shrink-0",
|
|
11496
11757
|
// Surface
|
|
@@ -11511,7 +11772,7 @@ function MosaicKanbanColumn({
|
|
|
11511
11772
|
{
|
|
11512
11773
|
"data-slot": "kanban-column-count",
|
|
11513
11774
|
"aria-label": countLabel(count),
|
|
11514
|
-
className:
|
|
11775
|
+
className: cn76(
|
|
11515
11776
|
"inline-flex items-center justify-center",
|
|
11516
11777
|
"min-w-[1.25rem] h-5 px-1.5 rounded-full",
|
|
11517
11778
|
"bg-muted text-muted-foreground",
|
|
@@ -11554,12 +11815,12 @@ function MosaicKanbanColumn({
|
|
|
11554
11815
|
);
|
|
11555
11816
|
}
|
|
11556
11817
|
MosaicKanbanColumn.displayName = "MosaicKanbanColumn";
|
|
11557
|
-
var WorkspaceCtx =
|
|
11818
|
+
var WorkspaceCtx = React30__namespace.createContext({
|
|
11558
11819
|
workspaceId: null,
|
|
11559
11820
|
isLoading: false
|
|
11560
11821
|
});
|
|
11561
11822
|
function useMosaicWorkspace() {
|
|
11562
|
-
return
|
|
11823
|
+
return React30__namespace.useContext(WorkspaceCtx);
|
|
11563
11824
|
}
|
|
11564
11825
|
var defaultClerkAppearance = {
|
|
11565
11826
|
variables: {
|
|
@@ -11572,9 +11833,9 @@ var defaultClerkAppearance = {
|
|
|
11572
11833
|
}
|
|
11573
11834
|
};
|
|
11574
11835
|
function WorkspaceResolver({ resolveWorkspaceId, initialOrgId, children }) {
|
|
11575
|
-
const [workspaceId, setWorkspaceId] =
|
|
11576
|
-
const [isLoading, setIsLoading] =
|
|
11577
|
-
|
|
11836
|
+
const [workspaceId, setWorkspaceId] = React30__namespace.useState(null);
|
|
11837
|
+
const [isLoading, setIsLoading] = React30__namespace.useState(false);
|
|
11838
|
+
React30__namespace.useEffect(() => {
|
|
11578
11839
|
if (!resolveWorkspaceId) {
|
|
11579
11840
|
setWorkspaceId(initialOrgId ?? null);
|
|
11580
11841
|
return;
|
|
@@ -11733,7 +11994,7 @@ var documentUploadProgressFillVariants = classVarianceAuthority.cva(
|
|
|
11733
11994
|
defaultVariants: {}
|
|
11734
11995
|
}
|
|
11735
11996
|
);
|
|
11736
|
-
function
|
|
11997
|
+
function cn77(...classes) {
|
|
11737
11998
|
return classes.filter(Boolean).join(" ");
|
|
11738
11999
|
}
|
|
11739
12000
|
function MosaicDocumentUpload({
|
|
@@ -11753,9 +12014,9 @@ function MosaicDocumentUpload({
|
|
|
11753
12014
|
className,
|
|
11754
12015
|
ref
|
|
11755
12016
|
}) {
|
|
11756
|
-
const [isDragActive, setIsDragActive] =
|
|
11757
|
-
const inputRef =
|
|
11758
|
-
const inputId =
|
|
12017
|
+
const [isDragActive, setIsDragActive] = React30.useState(false);
|
|
12018
|
+
const inputRef = React30.useRef(null);
|
|
12019
|
+
const inputId = React30.useId();
|
|
11759
12020
|
function handleDragOver(event) {
|
|
11760
12021
|
event.preventDefault();
|
|
11761
12022
|
setIsDragActive(true);
|
|
@@ -11774,7 +12035,7 @@ function MosaicDocumentUpload({
|
|
|
11774
12035
|
if (selected.length > 0) onFilesSelected(selected);
|
|
11775
12036
|
event.target.value = "";
|
|
11776
12037
|
}
|
|
11777
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "document-upload", className:
|
|
12038
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "document-upload", className: cn77("flex flex-col gap-4", className), children: [
|
|
11778
12039
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11779
12040
|
"div",
|
|
11780
12041
|
{
|
|
@@ -11839,7 +12100,7 @@ function MosaicDocumentUpload({
|
|
|
11839
12100
|
"aria-valuemin": 0,
|
|
11840
12101
|
"aria-valuemax": 100,
|
|
11841
12102
|
"aria-valuenow": file.progress ?? 0,
|
|
11842
|
-
className:
|
|
12103
|
+
className: cn77(documentUploadProgressTrackVariants(), "mt-2"),
|
|
11843
12104
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11844
12105
|
"div",
|
|
11845
12106
|
{
|
|
@@ -11916,7 +12177,7 @@ var urlScraperCardVariants = classVarianceAuthority.cva(["flex flex-col gap-2 ro
|
|
|
11916
12177
|
tone: "neutral"
|
|
11917
12178
|
}
|
|
11918
12179
|
});
|
|
11919
|
-
function
|
|
12180
|
+
function cn78(...classes) {
|
|
11920
12181
|
return classes.filter(Boolean).join(" ");
|
|
11921
12182
|
}
|
|
11922
12183
|
function isSyntacticallyValidUrl(candidate) {
|
|
@@ -11939,7 +12200,7 @@ function MosaicUrlScraper(props) {
|
|
|
11939
12200
|
className,
|
|
11940
12201
|
ref
|
|
11941
12202
|
} = props;
|
|
11942
|
-
const [isLocallyInvalid, setIsLocallyInvalid] =
|
|
12203
|
+
const [isLocallyInvalid, setIsLocallyInvalid] = React30.useState(false);
|
|
11943
12204
|
const isBusy = props.status === "loading" || props.status === "success";
|
|
11944
12205
|
function handleSubmit(event) {
|
|
11945
12206
|
event.preventDefault();
|
|
@@ -11955,7 +12216,7 @@ function MosaicUrlScraper(props) {
|
|
|
11955
12216
|
setIsLocallyInvalid(false);
|
|
11956
12217
|
onUrlChange(event.target.value);
|
|
11957
12218
|
}
|
|
11958
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "url-scraper", className:
|
|
12219
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "url-scraper", className: cn78("flex flex-col gap-4", className), children: [
|
|
11959
12220
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11960
12221
|
"form",
|
|
11961
12222
|
{
|
|
@@ -12091,7 +12352,7 @@ var chatThreadScrollButtonVariants = classVarianceAuthority.cva([
|
|
|
12091
12352
|
"items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm",
|
|
12092
12353
|
"transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
12093
12354
|
]);
|
|
12094
|
-
function
|
|
12355
|
+
function cn79(...classes) {
|
|
12095
12356
|
return classes.filter(Boolean).join(" ");
|
|
12096
12357
|
}
|
|
12097
12358
|
var BOTTOM_THRESHOLD_PX = 24;
|
|
@@ -12105,9 +12366,9 @@ function MosaicChatThread({
|
|
|
12105
12366
|
className,
|
|
12106
12367
|
ref
|
|
12107
12368
|
}) {
|
|
12108
|
-
const containerRef =
|
|
12109
|
-
const isAtBottomRef =
|
|
12110
|
-
const [isAtBottom, setIsAtBottom] =
|
|
12369
|
+
const containerRef = React30.useRef(null);
|
|
12370
|
+
const isAtBottomRef = React30.useRef(true);
|
|
12371
|
+
const [isAtBottom, setIsAtBottom] = React30.useState(true);
|
|
12111
12372
|
function setRefs(node) {
|
|
12112
12373
|
containerRef.current = node;
|
|
12113
12374
|
if (typeof ref === "function") {
|
|
@@ -12139,7 +12400,7 @@ function MosaicChatThread({
|
|
|
12139
12400
|
disengageBottomAnchor();
|
|
12140
12401
|
}
|
|
12141
12402
|
}
|
|
12142
|
-
|
|
12403
|
+
React30.useEffect(() => {
|
|
12143
12404
|
function handleSelectionChange() {
|
|
12144
12405
|
const container = containerRef.current;
|
|
12145
12406
|
if (!container) {
|
|
@@ -12161,7 +12422,7 @@ function MosaicChatThread({
|
|
|
12161
12422
|
document.removeEventListener("selectionchange", handleSelectionChange);
|
|
12162
12423
|
};
|
|
12163
12424
|
}, []);
|
|
12164
|
-
|
|
12425
|
+
React30.useLayoutEffect(() => {
|
|
12165
12426
|
const element = containerRef.current;
|
|
12166
12427
|
if (element && isAtBottomRef.current) {
|
|
12167
12428
|
element.scrollTop = element.scrollHeight;
|
|
@@ -12175,7 +12436,7 @@ function MosaicChatThread({
|
|
|
12175
12436
|
role: "log",
|
|
12176
12437
|
onScroll: handleScroll,
|
|
12177
12438
|
onKeyDown: handleKeyDown,
|
|
12178
|
-
className:
|
|
12439
|
+
className: cn79(chatThreadRootVariants(), className),
|
|
12179
12440
|
children: [
|
|
12180
12441
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "chat-thread-content", className: chatThreadContentVariants(), children }),
|
|
12181
12442
|
!isAtBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12216,7 +12477,7 @@ var chatComposerActionButtonVariants = classVarianceAuthority.cva(
|
|
|
12216
12477
|
}
|
|
12217
12478
|
}
|
|
12218
12479
|
);
|
|
12219
|
-
function
|
|
12480
|
+
function cn80(...classes) {
|
|
12220
12481
|
return classes.filter(Boolean).join(" ");
|
|
12221
12482
|
}
|
|
12222
12483
|
function MosaicChatComposer(props) {
|
|
@@ -12229,9 +12490,9 @@ function MosaicChatComposer(props) {
|
|
|
12229
12490
|
className,
|
|
12230
12491
|
ref
|
|
12231
12492
|
} = props;
|
|
12232
|
-
const textareaRef =
|
|
12493
|
+
const textareaRef = React30.useRef(null);
|
|
12233
12494
|
const trimmedValue = value.trim();
|
|
12234
|
-
|
|
12495
|
+
React30.useEffect(() => {
|
|
12235
12496
|
const textarea = textareaRef.current;
|
|
12236
12497
|
if (!textarea) {
|
|
12237
12498
|
return;
|
|
@@ -12239,7 +12500,7 @@ function MosaicChatComposer(props) {
|
|
|
12239
12500
|
textarea.style.height = "auto";
|
|
12240
12501
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
12241
12502
|
}, [value]);
|
|
12242
|
-
const submitValue =
|
|
12503
|
+
const submitValue = React30.useCallback(() => {
|
|
12243
12504
|
if (props.status !== "idle") {
|
|
12244
12505
|
return;
|
|
12245
12506
|
}
|
|
@@ -12249,14 +12510,14 @@ function MosaicChatComposer(props) {
|
|
|
12249
12510
|
}
|
|
12250
12511
|
props.onSubmit(text);
|
|
12251
12512
|
}, [disabled, props, value]);
|
|
12252
|
-
const handleSubmit =
|
|
12513
|
+
const handleSubmit = React30.useCallback(
|
|
12253
12514
|
(event) => {
|
|
12254
12515
|
event.preventDefault();
|
|
12255
12516
|
submitValue();
|
|
12256
12517
|
},
|
|
12257
12518
|
[submitValue]
|
|
12258
12519
|
);
|
|
12259
|
-
const handleKeyDown =
|
|
12520
|
+
const handleKeyDown = React30.useCallback(
|
|
12260
12521
|
(event) => {
|
|
12261
12522
|
if (event.key === "Enter" && !event.shiftKey) {
|
|
12262
12523
|
event.preventDefault();
|
|
@@ -12271,7 +12532,7 @@ function MosaicChatComposer(props) {
|
|
|
12271
12532
|
{
|
|
12272
12533
|
ref,
|
|
12273
12534
|
"data-slot": "chat-composer",
|
|
12274
|
-
className:
|
|
12535
|
+
className: cn80(chatComposerRootVariants(), className),
|
|
12275
12536
|
onSubmit: handleSubmit,
|
|
12276
12537
|
children: [
|
|
12277
12538
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12387,7 +12648,7 @@ var markdownTableCellVariants = classVarianceAuthority.cva(["border border-borde
|
|
|
12387
12648
|
align: "left"
|
|
12388
12649
|
}
|
|
12389
12650
|
});
|
|
12390
|
-
function
|
|
12651
|
+
function cn81(...classes) {
|
|
12391
12652
|
return classes.filter(Boolean).join(" ");
|
|
12392
12653
|
}
|
|
12393
12654
|
function sanitizeHref(rawHref) {
|
|
@@ -12582,7 +12843,7 @@ function parseBlocks(content) {
|
|
|
12582
12843
|
function MosaicMarkdown({ content, renderCodeBlock, className, ref }) {
|
|
12583
12844
|
const blocks = parseBlocks(content);
|
|
12584
12845
|
const ids = makeIdSource();
|
|
12585
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "markdown", className:
|
|
12846
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "markdown", className: cn81(markdownRootVariants(), className), children: blocks.map((block) => {
|
|
12586
12847
|
if (block.kind === "heading") {
|
|
12587
12848
|
const HeadingTag = `h${block.level}`;
|
|
12588
12849
|
return /* @__PURE__ */ jsxRuntime.jsx(HeadingTag, { className: markdownHeadingVariants({ level: block.level }), children: parseInline(block.text, ids) }, block.id);
|
|
@@ -12660,7 +12921,7 @@ var chatMessageToolStatusVariants = classVarianceAuthority.cva(["text-xs font-me
|
|
|
12660
12921
|
status: "running"
|
|
12661
12922
|
}
|
|
12662
12923
|
});
|
|
12663
|
-
function
|
|
12924
|
+
function cn82(...classes) {
|
|
12664
12925
|
return classes.filter(Boolean).join(" ");
|
|
12665
12926
|
}
|
|
12666
12927
|
function partKey(part, index) {
|
|
@@ -12826,7 +13087,7 @@ function MosaicChatMessage({
|
|
|
12826
13087
|
ref,
|
|
12827
13088
|
"data-slot": "chat-message",
|
|
12828
13089
|
"data-role": messageRole,
|
|
12829
|
-
className:
|
|
13090
|
+
className: cn82(chatMessageContainerVariants({ align: isUser ? "end" : "start" }), className),
|
|
12830
13091
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chatMessageBubbleVariants({ role: messageRole }), children: parts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12831
13092
|
ChatMessagePartView,
|
|
12832
13093
|
{
|
|
@@ -12881,7 +13142,7 @@ var approvalPromptButtonVariants = classVarianceAuthority.cva(
|
|
|
12881
13142
|
}
|
|
12882
13143
|
}
|
|
12883
13144
|
);
|
|
12884
|
-
function
|
|
13145
|
+
function cn83(...classes) {
|
|
12885
13146
|
return classes.filter(Boolean).join(" ");
|
|
12886
13147
|
}
|
|
12887
13148
|
function MosaicApprovalPrompt(props) {
|
|
@@ -12893,7 +13154,7 @@ function MosaicApprovalPrompt(props) {
|
|
|
12893
13154
|
ref,
|
|
12894
13155
|
"data-slot": "approval-prompt",
|
|
12895
13156
|
"aria-label": promptTitle,
|
|
12896
|
-
className:
|
|
13157
|
+
className: cn83("border-0 p-0 m-0", approvalPromptCardVariants({ tone }), className),
|
|
12897
13158
|
children: [
|
|
12898
13159
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { "data-slot": "approval-prompt-title", className: "text-base font-semibold md:text-lg", children: promptTitle }),
|
|
12899
13160
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "approval-prompt-tool", className: "flex flex-col gap-1", children: [
|
|
@@ -12970,7 +13231,7 @@ var toolToggleListRowVariants = classVarianceAuthority.cva(
|
|
|
12970
13231
|
}
|
|
12971
13232
|
}
|
|
12972
13233
|
);
|
|
12973
|
-
function
|
|
13234
|
+
function cn84(...classes) {
|
|
12974
13235
|
return classes.filter(Boolean).join(" ");
|
|
12975
13236
|
}
|
|
12976
13237
|
function MosaicToolToggleList({
|
|
@@ -12986,7 +13247,7 @@ function MosaicToolToggleList({
|
|
|
12986
13247
|
}) {
|
|
12987
13248
|
const toolsById = new Map(tools.map((tool) => [tool.id, tool]));
|
|
12988
13249
|
const approvalLabelById = new Map(approvalLevels.map((level) => [level.id, level.label]));
|
|
12989
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "tool-toggle-list", className:
|
|
13250
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn84("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12990
13251
|
"div",
|
|
12991
13252
|
{
|
|
12992
13253
|
"data-slot": "tool-toggle-list-section",
|
|
@@ -13017,7 +13278,7 @@ function MosaicToolToggleList({
|
|
|
13017
13278
|
onCheckedChange: (checked) => onToggleTool(tool.id, checked),
|
|
13018
13279
|
"aria-label": toggleAriaLabel(tool.name),
|
|
13019
13280
|
"data-slot": "tool-toggle-list-switch",
|
|
13020
|
-
className:
|
|
13281
|
+
className: cn84(
|
|
13021
13282
|
"relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
|
|
13022
13283
|
"rounded-full border-2 border-transparent outline-none",
|
|
13023
13284
|
"bg-muted transition-colors",
|
|
@@ -13028,7 +13289,7 @@ function MosaicToolToggleList({
|
|
|
13028
13289
|
_switch.Switch.Thumb,
|
|
13029
13290
|
{
|
|
13030
13291
|
"data-slot": "tool-toggle-list-switch-thumb",
|
|
13031
|
-
className:
|
|
13292
|
+
className: cn84(
|
|
13032
13293
|
"pointer-events-none block h-4 w-4 rounded-full",
|
|
13033
13294
|
"bg-background shadow-sm",
|
|
13034
13295
|
"translate-x-0 transition-transform",
|
|
@@ -13070,7 +13331,7 @@ function MosaicToolToggleList({
|
|
|
13070
13331
|
{
|
|
13071
13332
|
"aria-label": approvalSelectAriaLabel(tool.name),
|
|
13072
13333
|
"data-slot": "tool-toggle-list-approval-trigger",
|
|
13073
|
-
className:
|
|
13334
|
+
className: cn84(
|
|
13074
13335
|
"inline-flex h-9 min-w-[10rem] items-center justify-between gap-2",
|
|
13075
13336
|
"rounded-md border border-border bg-background px-3 py-2",
|
|
13076
13337
|
"text-sm text-foreground shadow-xs outline-none",
|
|
@@ -13088,7 +13349,7 @@ function MosaicToolToggleList({
|
|
|
13088
13349
|
select.Select.Popup,
|
|
13089
13350
|
{
|
|
13090
13351
|
"data-slot": "tool-toggle-list-approval-popup",
|
|
13091
|
-
className:
|
|
13352
|
+
className: cn84(
|
|
13092
13353
|
"z-50 min-w-[10rem] overflow-hidden rounded-md border border-border",
|
|
13093
13354
|
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
13094
13355
|
"origin-[var(--transform-origin)]",
|
|
@@ -13101,7 +13362,7 @@ function MosaicToolToggleList({
|
|
|
13101
13362
|
select.Select.Item,
|
|
13102
13363
|
{
|
|
13103
13364
|
value: level.id,
|
|
13104
|
-
className:
|
|
13365
|
+
className: cn84(
|
|
13105
13366
|
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
13106
13367
|
"text-sm text-popover-foreground outline-none",
|
|
13107
13368
|
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
@@ -13209,7 +13470,7 @@ var apiKeyPanelMessageVariants = classVarianceAuthority.cva(["text-sm"], {
|
|
|
13209
13470
|
tone: "muted"
|
|
13210
13471
|
}
|
|
13211
13472
|
});
|
|
13212
|
-
function
|
|
13473
|
+
function cn85(...classes) {
|
|
13213
13474
|
return classes.filter(Boolean).join(" ");
|
|
13214
13475
|
}
|
|
13215
13476
|
function MosaicApiKeyPanel(props) {
|
|
@@ -13237,7 +13498,7 @@ function MosaicApiKeyPanel(props) {
|
|
|
13237
13498
|
function handleKeyChange(event) {
|
|
13238
13499
|
onKeyChange(event.target.value);
|
|
13239
13500
|
}
|
|
13240
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "api-key-panel", className:
|
|
13501
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "api-key-panel", className: cn85("flex flex-col gap-3", className), children: [
|
|
13241
13502
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13242
13503
|
"div",
|
|
13243
13504
|
{
|
|
@@ -13332,7 +13593,7 @@ MosaicApiKeyPanel.displayName = "MosaicApiKeyPanel";
|
|
|
13332
13593
|
var agentChatRootVariants = classVarianceAuthority.cva([
|
|
13333
13594
|
"flex min-h-0 w-full flex-1 flex-col gap-2 overflow-hidden rounded-lg border border-border bg-card"
|
|
13334
13595
|
]);
|
|
13335
|
-
function
|
|
13596
|
+
function cn86(...classes) {
|
|
13336
13597
|
return classes.filter(Boolean).join(" ");
|
|
13337
13598
|
}
|
|
13338
13599
|
function formatPayload2(value) {
|
|
@@ -13452,9 +13713,9 @@ function MosaicAgentChat(props) {
|
|
|
13452
13713
|
className,
|
|
13453
13714
|
ref
|
|
13454
13715
|
} = props;
|
|
13455
|
-
const [decisions, setDecisions] =
|
|
13456
|
-
const resumedSessionIdRef =
|
|
13457
|
-
|
|
13716
|
+
const [decisions, setDecisions] = React30.useState({});
|
|
13717
|
+
const resumedSessionIdRef = React30.useRef(void 0);
|
|
13718
|
+
React30.useEffect(() => {
|
|
13458
13719
|
if (!sessionId || !onResumeSession) {
|
|
13459
13720
|
return;
|
|
13460
13721
|
}
|
|
@@ -13468,7 +13729,7 @@ function MosaicAgentChat(props) {
|
|
|
13468
13729
|
setDecisions((previous) => ({ ...previous, [payload.requestId]: decision }));
|
|
13469
13730
|
onApprovalResponse(payload);
|
|
13470
13731
|
}
|
|
13471
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "agent-chat", className:
|
|
13732
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "agent-chat", className: cn86(agentChatRootVariants(), className), children: [
|
|
13472
13733
|
/* @__PURE__ */ jsxRuntime.jsx(MosaicChatThread, { scrollToBottomLabel, children: messages.map((message) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13473
13734
|
MosaicChatMessage,
|
|
13474
13735
|
{
|
|
@@ -13557,7 +13818,7 @@ var toastProviderPositionVariants = classVarianceAuthority.cva(
|
|
|
13557
13818
|
}
|
|
13558
13819
|
}
|
|
13559
13820
|
);
|
|
13560
|
-
function
|
|
13821
|
+
function cn87(...classes) {
|
|
13561
13822
|
return classes.filter(Boolean).join(" ");
|
|
13562
13823
|
}
|
|
13563
13824
|
function MosaicToast({
|
|
@@ -13571,7 +13832,7 @@ function MosaicToast({
|
|
|
13571
13832
|
className,
|
|
13572
13833
|
ref
|
|
13573
13834
|
}) {
|
|
13574
|
-
|
|
13835
|
+
React30.useEffect(() => {
|
|
13575
13836
|
if (durationMs === void 0) return;
|
|
13576
13837
|
const timer = setTimeout(onDismiss, durationMs);
|
|
13577
13838
|
return () => clearTimeout(timer);
|
|
@@ -13583,7 +13844,7 @@ function MosaicToast({
|
|
|
13583
13844
|
ref,
|
|
13584
13845
|
"data-slot": "toast",
|
|
13585
13846
|
role,
|
|
13586
|
-
className:
|
|
13847
|
+
className: cn87(toastCardVariants({ variant }), className),
|
|
13587
13848
|
children: [
|
|
13588
13849
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "toast-body", className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
13589
13850
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "toast-title", className: toastTitleVariants({ variant }), children: title }),
|
|
@@ -13623,7 +13884,7 @@ function MosaicToast({
|
|
|
13623
13884
|
);
|
|
13624
13885
|
}
|
|
13625
13886
|
MosaicToast.displayName = "MosaicToast";
|
|
13626
|
-
function
|
|
13887
|
+
function cn88(...classes) {
|
|
13627
13888
|
return classes.filter(Boolean).join(" ");
|
|
13628
13889
|
}
|
|
13629
13890
|
function MosaicToastProvider({
|
|
@@ -13637,7 +13898,7 @@ function MosaicToastProvider({
|
|
|
13637
13898
|
{
|
|
13638
13899
|
ref,
|
|
13639
13900
|
"data-slot": "toast-provider",
|
|
13640
|
-
className:
|
|
13901
|
+
className: cn88(toastProviderPositionVariants({ position }), className),
|
|
13641
13902
|
children
|
|
13642
13903
|
}
|
|
13643
13904
|
);
|
|
@@ -13664,7 +13925,7 @@ var pdfViewerToolbarButtonVariants = classVarianceAuthority.cva([
|
|
|
13664
13925
|
"inline-flex min-h-8 min-w-8 items-center justify-center rounded-md border border-border text-sm",
|
|
13665
13926
|
"transition-colors hover:bg-accent/50 disabled:opacity-50 disabled:hover:bg-transparent"
|
|
13666
13927
|
]);
|
|
13667
|
-
function
|
|
13928
|
+
function cn89(...classes) {
|
|
13668
13929
|
return classes.filter(Boolean).join(" ");
|
|
13669
13930
|
}
|
|
13670
13931
|
function buildFrameSrc(fileUrl, currentPage, zoom) {
|
|
@@ -13687,14 +13948,14 @@ function MosaicPdfViewer({
|
|
|
13687
13948
|
className,
|
|
13688
13949
|
ref
|
|
13689
13950
|
}) {
|
|
13690
|
-
const [status, setStatus] =
|
|
13691
|
-
const [trackedFileUrl, setTrackedFileUrl] =
|
|
13692
|
-
const frameRef =
|
|
13951
|
+
const [status, setStatus] = React30.useState("loading");
|
|
13952
|
+
const [trackedFileUrl, setTrackedFileUrl] = React30.useState(fileUrl);
|
|
13953
|
+
const frameRef = React30.useRef(null);
|
|
13693
13954
|
if (fileUrl !== trackedFileUrl) {
|
|
13694
13955
|
setTrackedFileUrl(fileUrl);
|
|
13695
13956
|
setStatus("loading");
|
|
13696
13957
|
}
|
|
13697
|
-
|
|
13958
|
+
React30.useEffect(() => {
|
|
13698
13959
|
const node = frameRef.current;
|
|
13699
13960
|
if (!node) return;
|
|
13700
13961
|
function handleLoad() {
|
|
@@ -13729,7 +13990,7 @@ function MosaicPdfViewer({
|
|
|
13729
13990
|
if (zoom === void 0 || onZoomChange === void 0) return;
|
|
13730
13991
|
onZoomChange(Math.round((zoom + 0.1) * 100) / 100);
|
|
13731
13992
|
}
|
|
13732
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "pdf-viewer", className:
|
|
13993
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "pdf-viewer", className: cn89("flex flex-col gap-2", className), children: [
|
|
13733
13994
|
(showPageControls || showZoomControls) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13734
13995
|
"div",
|
|
13735
13996
|
{
|
|
@@ -13818,7 +14079,7 @@ function MosaicPdfViewer({
|
|
|
13818
14079
|
"data-slot": "pdf-viewer-frame",
|
|
13819
14080
|
src: buildFrameSrc(fileUrl, currentPage, zoom),
|
|
13820
14081
|
title: fileUrl,
|
|
13821
|
-
className:
|
|
14082
|
+
className: cn89(
|
|
13822
14083
|
"h-full min-h-64 w-full border-0",
|
|
13823
14084
|
status !== "loaded" && "pointer-events-none absolute inset-0 opacity-0"
|
|
13824
14085
|
)
|
|
@@ -13837,7 +14098,7 @@ var splitPaneCollapseButtonVariants = classVarianceAuthority.cva([
|
|
|
13837
14098
|
"inline-flex h-11 w-6 shrink-0 items-center justify-center self-center rounded-md border border-border text-sm",
|
|
13838
14099
|
"transition-colors hover:bg-accent/50"
|
|
13839
14100
|
]);
|
|
13840
|
-
function
|
|
14101
|
+
function cn90(...classes) {
|
|
13841
14102
|
return classes.filter(Boolean).join(" ");
|
|
13842
14103
|
}
|
|
13843
14104
|
function mergeRefs(externalRef, node) {
|
|
@@ -13866,9 +14127,9 @@ function MosaicResizableSplitPane({
|
|
|
13866
14127
|
className,
|
|
13867
14128
|
ref
|
|
13868
14129
|
}) {
|
|
13869
|
-
const rootRef =
|
|
13870
|
-
const isDraggingRef =
|
|
13871
|
-
|
|
14130
|
+
const rootRef = React30.useRef(null);
|
|
14131
|
+
const isDraggingRef = React30.useRef(false);
|
|
14132
|
+
React30.useEffect(() => {
|
|
13872
14133
|
function handlePointerMove(event) {
|
|
13873
14134
|
if (!isDraggingRef.current) return;
|
|
13874
14135
|
const rootNode = rootRef.current;
|
|
@@ -13910,7 +14171,7 @@ function MosaicResizableSplitPane({
|
|
|
13910
14171
|
mergeRefs(ref, node);
|
|
13911
14172
|
},
|
|
13912
14173
|
"data-slot": "resizable-split-pane",
|
|
13913
|
-
className:
|
|
14174
|
+
className: cn90(splitPaneRootVariants(), className),
|
|
13914
14175
|
children: [
|
|
13915
14176
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "resizable-split-pane-main", className: "min-h-0 min-w-0 flex-1 overflow-auto", children: main }),
|
|
13916
14177
|
!isSideCollapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -13977,7 +14238,7 @@ var tagInputFieldVariants = classVarianceAuthority.cva([
|
|
|
13977
14238
|
"min-w-[6ch] flex-1 border-none bg-transparent px-1 py-0.5 text-sm text-foreground outline-none",
|
|
13978
14239
|
"placeholder:text-muted-foreground"
|
|
13979
14240
|
]);
|
|
13980
|
-
function
|
|
14241
|
+
function cn91(...classes) {
|
|
13981
14242
|
return classes.filter(Boolean).join(" ");
|
|
13982
14243
|
}
|
|
13983
14244
|
function mergeRefs2(externalRef, node) {
|
|
@@ -13998,12 +14259,12 @@ function MosaicTagInput({
|
|
|
13998
14259
|
className,
|
|
13999
14260
|
ref
|
|
14000
14261
|
}) {
|
|
14001
|
-
const [inputValue, setInputValue] =
|
|
14002
|
-
const inputRef =
|
|
14262
|
+
const [inputValue, setInputValue] = React30.useState("");
|
|
14263
|
+
const inputRef = React30.useRef(null);
|
|
14003
14264
|
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
14004
14265
|
const isMaxReached = maxTags !== void 0 && tags.length >= maxTags;
|
|
14005
14266
|
const trimmedValue = inputValue.trim();
|
|
14006
|
-
const filteredSuggestions =
|
|
14267
|
+
const filteredSuggestions = React30.useMemo(() => {
|
|
14007
14268
|
if (!suggestions || trimmedValue.length === 0) return [];
|
|
14008
14269
|
return suggestions.filter(
|
|
14009
14270
|
(suggestion) => !tags.includes(suggestion) && filter.contains(suggestion, trimmedValue)
|
|
@@ -14028,7 +14289,7 @@ function MosaicTagInput({
|
|
|
14028
14289
|
if (lastTag !== void 0) onRemoveTag(lastTag);
|
|
14029
14290
|
}
|
|
14030
14291
|
}
|
|
14031
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "tag-input", className:
|
|
14292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "tag-input", className: cn91(tagInputRootVariants(), className), children: [
|
|
14032
14293
|
tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-slot": "tag-input-tag", className: tagInputTagVariants(), children: [
|
|
14033
14294
|
tag,
|
|
14034
14295
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14065,7 +14326,7 @@ function MosaicTagInput({
|
|
|
14065
14326
|
"ul",
|
|
14066
14327
|
{
|
|
14067
14328
|
"data-slot": "tag-input-suggestions",
|
|
14068
|
-
className:
|
|
14329
|
+
className: cn91(
|
|
14069
14330
|
"z-50 mt-1 w-full min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
14070
14331
|
"bg-popover p-1 text-sm text-popover-foreground shadow-md"
|
|
14071
14332
|
),
|
|
@@ -14105,7 +14366,7 @@ var drawerPopupVariants = classVarianceAuthority.cva(
|
|
|
14105
14366
|
}
|
|
14106
14367
|
);
|
|
14107
14368
|
var drawerBackdropVariants = classVarianceAuthority.cva(["fixed inset-0 z-50 bg-black/50"]);
|
|
14108
|
-
function
|
|
14369
|
+
function cn92(...classes) {
|
|
14109
14370
|
return classes.filter(Boolean).join(" ");
|
|
14110
14371
|
}
|
|
14111
14372
|
function MosaicDrawer({
|
|
@@ -14117,7 +14378,7 @@ function MosaicDrawer({
|
|
|
14117
14378
|
side = "right",
|
|
14118
14379
|
className
|
|
14119
14380
|
}) {
|
|
14120
|
-
const titleId =
|
|
14381
|
+
const titleId = React30__namespace.useId();
|
|
14121
14382
|
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { open, onOpenChange: (nextOpen) => onOpenChange(nextOpen), modal: true, children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
|
|
14122
14383
|
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Backdrop, { "data-slot": "drawer-backdrop", className: drawerBackdropVariants() }),
|
|
14123
14384
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -14126,7 +14387,7 @@ function MosaicDrawer({
|
|
|
14126
14387
|
"data-slot": "drawer",
|
|
14127
14388
|
"aria-labelledby": titleId,
|
|
14128
14389
|
"aria-modal": "true",
|
|
14129
|
-
className:
|
|
14390
|
+
className: cn92(drawerPopupVariants({ side }), className),
|
|
14130
14391
|
children: [
|
|
14131
14392
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14132
14393
|
"div",
|
|
@@ -14139,7 +14400,7 @@ function MosaicDrawer({
|
|
|
14139
14400
|
dialog.Dialog.Close,
|
|
14140
14401
|
{
|
|
14141
14402
|
"aria-label": closeAriaLabel,
|
|
14142
|
-
className:
|
|
14403
|
+
className: cn92(
|
|
14143
14404
|
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
|
|
14144
14405
|
"hover:bg-muted hover:text-foreground",
|
|
14145
14406
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -14193,7 +14454,7 @@ var templateCategoryChipVariants = classVarianceAuthority.cva(
|
|
|
14193
14454
|
}
|
|
14194
14455
|
}
|
|
14195
14456
|
);
|
|
14196
|
-
function
|
|
14457
|
+
function cn93(...classes) {
|
|
14197
14458
|
return classes.filter(Boolean).join(" ");
|
|
14198
14459
|
}
|
|
14199
14460
|
function MosaicTemplateCategoryChips({
|
|
@@ -14208,7 +14469,7 @@ function MosaicTemplateCategoryChips({
|
|
|
14208
14469
|
{
|
|
14209
14470
|
ref,
|
|
14210
14471
|
"data-slot": "template-category-chips",
|
|
14211
|
-
className:
|
|
14472
|
+
className: cn93("flex flex-wrap items-center gap-2", className),
|
|
14212
14473
|
children: categories.map((category) => {
|
|
14213
14474
|
const isSelected = category.id === selected;
|
|
14214
14475
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14228,6 +14489,286 @@ function MosaicTemplateCategoryChips({
|
|
|
14228
14489
|
);
|
|
14229
14490
|
}
|
|
14230
14491
|
MosaicTemplateCategoryChips.displayName = "MosaicTemplateCategoryChips";
|
|
14492
|
+
var saveTemplateModalBodyVariants = classVarianceAuthority.cva(["flex flex-col gap-4"]);
|
|
14493
|
+
var saveTemplateModalFieldVariants = classVarianceAuthority.cva(["flex flex-col gap-1.5"]);
|
|
14494
|
+
var saveTemplateModalErrorVariants = classVarianceAuthority.cva(["text-xs font-medium text-destructive"]);
|
|
14495
|
+
var saveTemplateModalFooterVariants = classVarianceAuthority.cva([
|
|
14496
|
+
"flex items-center justify-end gap-3 border-t border-border pt-4"
|
|
14497
|
+
]);
|
|
14498
|
+
var saveTemplateModalButtonVariants = classVarianceAuthority.cva(
|
|
14499
|
+
[
|
|
14500
|
+
"inline-flex min-h-9 items-center justify-center gap-2 rounded-md px-4 text-sm font-medium",
|
|
14501
|
+
"transition-colors disabled:cursor-not-allowed disabled:opacity-50"
|
|
14502
|
+
],
|
|
14503
|
+
{
|
|
14504
|
+
variants: {
|
|
14505
|
+
intent: {
|
|
14506
|
+
cancel: "border border-border bg-background hover:bg-muted",
|
|
14507
|
+
save: "border border-transparent bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14508
|
+
}
|
|
14509
|
+
},
|
|
14510
|
+
defaultVariants: {
|
|
14511
|
+
intent: "cancel"
|
|
14512
|
+
}
|
|
14513
|
+
}
|
|
14514
|
+
);
|
|
14515
|
+
function cn94(...classes) {
|
|
14516
|
+
return classes.filter(Boolean).join(" ");
|
|
14517
|
+
}
|
|
14518
|
+
function MosaicSaveTemplateModal({
|
|
14519
|
+
open,
|
|
14520
|
+
onOpenChange,
|
|
14521
|
+
title,
|
|
14522
|
+
description,
|
|
14523
|
+
closeAriaLabel,
|
|
14524
|
+
name,
|
|
14525
|
+
onNameChange,
|
|
14526
|
+
nameLabel,
|
|
14527
|
+
namePlaceholder,
|
|
14528
|
+
nameError,
|
|
14529
|
+
templateDescription,
|
|
14530
|
+
onTemplateDescriptionChange,
|
|
14531
|
+
descriptionLabel,
|
|
14532
|
+
descriptionPlaceholder,
|
|
14533
|
+
descriptionError,
|
|
14534
|
+
categories,
|
|
14535
|
+
category,
|
|
14536
|
+
onCategoryChange,
|
|
14537
|
+
categoryLabel,
|
|
14538
|
+
tags,
|
|
14539
|
+
onAddTag,
|
|
14540
|
+
onRemoveTag,
|
|
14541
|
+
tagsLabel,
|
|
14542
|
+
tagInputPlaceholder,
|
|
14543
|
+
removeTagAriaLabel,
|
|
14544
|
+
suggestedTags,
|
|
14545
|
+
maxTags,
|
|
14546
|
+
isSaving,
|
|
14547
|
+
canSave,
|
|
14548
|
+
onSave,
|
|
14549
|
+
onCancel,
|
|
14550
|
+
saveButtonLabel,
|
|
14551
|
+
savingLabel,
|
|
14552
|
+
cancelButtonLabel,
|
|
14553
|
+
children,
|
|
14554
|
+
className
|
|
14555
|
+
}) {
|
|
14556
|
+
const nameErrorId = React30.useId();
|
|
14557
|
+
const descriptionErrorId = React30.useId();
|
|
14558
|
+
if (!open) return null;
|
|
14559
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14560
|
+
MosaicAdaptiveModal,
|
|
14561
|
+
{
|
|
14562
|
+
isOpen: open,
|
|
14563
|
+
onClose: () => onOpenChange(false),
|
|
14564
|
+
title,
|
|
14565
|
+
description,
|
|
14566
|
+
closeAriaLabel,
|
|
14567
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14568
|
+
"div",
|
|
14569
|
+
{
|
|
14570
|
+
"data-slot": "save-template-modal",
|
|
14571
|
+
className: cn94(saveTemplateModalBodyVariants(), className),
|
|
14572
|
+
children: [
|
|
14573
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: saveTemplateModalFieldVariants(), children: [
|
|
14574
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14575
|
+
"label",
|
|
14576
|
+
{
|
|
14577
|
+
htmlFor: "mosaic-save-template-name",
|
|
14578
|
+
className: "text-sm font-medium text-foreground",
|
|
14579
|
+
children: nameLabel
|
|
14580
|
+
}
|
|
14581
|
+
),
|
|
14582
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14583
|
+
MosaicInput,
|
|
14584
|
+
{
|
|
14585
|
+
id: "mosaic-save-template-name",
|
|
14586
|
+
value: name,
|
|
14587
|
+
placeholder: namePlaceholder,
|
|
14588
|
+
onChange: (e) => onNameChange(e.target.value),
|
|
14589
|
+
"aria-invalid": nameError ? "true" : "false",
|
|
14590
|
+
"aria-describedby": nameError ? nameErrorId : void 0
|
|
14591
|
+
}
|
|
14592
|
+
),
|
|
14593
|
+
nameError && /* @__PURE__ */ jsxRuntime.jsx("p", { id: nameErrorId, className: saveTemplateModalErrorVariants(), children: nameError })
|
|
14594
|
+
] }),
|
|
14595
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: saveTemplateModalFieldVariants(), children: [
|
|
14596
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14597
|
+
"label",
|
|
14598
|
+
{
|
|
14599
|
+
htmlFor: "mosaic-save-template-description",
|
|
14600
|
+
className: "text-sm font-medium text-foreground",
|
|
14601
|
+
children: descriptionLabel
|
|
14602
|
+
}
|
|
14603
|
+
),
|
|
14604
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14605
|
+
MosaicTextarea,
|
|
14606
|
+
{
|
|
14607
|
+
id: "mosaic-save-template-description",
|
|
14608
|
+
value: templateDescription,
|
|
14609
|
+
placeholder: descriptionPlaceholder,
|
|
14610
|
+
onChange: (e) => onTemplateDescriptionChange(e.target.value),
|
|
14611
|
+
rows: 3,
|
|
14612
|
+
"aria-invalid": descriptionError ? "true" : "false",
|
|
14613
|
+
"aria-describedby": descriptionError ? descriptionErrorId : void 0
|
|
14614
|
+
}
|
|
14615
|
+
),
|
|
14616
|
+
descriptionError && /* @__PURE__ */ jsxRuntime.jsx("p", { id: descriptionErrorId, className: saveTemplateModalErrorVariants(), children: descriptionError })
|
|
14617
|
+
] }),
|
|
14618
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: saveTemplateModalFieldVariants(), children: [
|
|
14619
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: categoryLabel }),
|
|
14620
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14621
|
+
MosaicSelect,
|
|
14622
|
+
{
|
|
14623
|
+
items: categories,
|
|
14624
|
+
value: category,
|
|
14625
|
+
onValueChange: (value) => {
|
|
14626
|
+
if (value) onCategoryChange(value);
|
|
14627
|
+
}
|
|
14628
|
+
}
|
|
14629
|
+
)
|
|
14630
|
+
] }),
|
|
14631
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: saveTemplateModalFieldVariants(), children: [
|
|
14632
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: tagsLabel }),
|
|
14633
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14634
|
+
MosaicTagInput,
|
|
14635
|
+
{
|
|
14636
|
+
tags,
|
|
14637
|
+
onAddTag,
|
|
14638
|
+
onRemoveTag,
|
|
14639
|
+
placeholder: tagInputPlaceholder,
|
|
14640
|
+
removeTagAriaLabel,
|
|
14641
|
+
suggestions: suggestedTags,
|
|
14642
|
+
maxTags
|
|
14643
|
+
}
|
|
14644
|
+
)
|
|
14645
|
+
] }),
|
|
14646
|
+
children,
|
|
14647
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: saveTemplateModalFooterVariants(), children: [
|
|
14648
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14649
|
+
"button",
|
|
14650
|
+
{
|
|
14651
|
+
type: "button",
|
|
14652
|
+
"data-slot": "save-template-modal-cancel-button",
|
|
14653
|
+
onClick: onCancel,
|
|
14654
|
+
disabled: isSaving,
|
|
14655
|
+
className: saveTemplateModalButtonVariants({ intent: "cancel" }),
|
|
14656
|
+
children: cancelButtonLabel
|
|
14657
|
+
}
|
|
14658
|
+
),
|
|
14659
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14660
|
+
"button",
|
|
14661
|
+
{
|
|
14662
|
+
type: "button",
|
|
14663
|
+
"data-slot": "save-template-modal-save-button",
|
|
14664
|
+
onClick: onSave,
|
|
14665
|
+
disabled: !canSave || isSaving,
|
|
14666
|
+
"aria-busy": isSaving ? "true" : "false",
|
|
14667
|
+
className: saveTemplateModalButtonVariants({ intent: "save" }),
|
|
14668
|
+
children: isSaving ? savingLabel : saveButtonLabel
|
|
14669
|
+
}
|
|
14670
|
+
)
|
|
14671
|
+
] })
|
|
14672
|
+
]
|
|
14673
|
+
}
|
|
14674
|
+
)
|
|
14675
|
+
}
|
|
14676
|
+
);
|
|
14677
|
+
}
|
|
14678
|
+
MosaicSaveTemplateModal.displayName = "MosaicSaveTemplateModal";
|
|
14679
|
+
var templateListVariants = classVarianceAuthority.cva(["grid gap-4"], {
|
|
14680
|
+
variants: {
|
|
14681
|
+
layout: {
|
|
14682
|
+
grid: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
14683
|
+
list: "grid-cols-1"
|
|
14684
|
+
}
|
|
14685
|
+
},
|
|
14686
|
+
defaultVariants: {
|
|
14687
|
+
layout: "grid"
|
|
14688
|
+
}
|
|
14689
|
+
});
|
|
14690
|
+
function cn95(...classes) {
|
|
14691
|
+
return classes.filter(Boolean).join(" ");
|
|
14692
|
+
}
|
|
14693
|
+
var NEXT_KEYS = /* @__PURE__ */ new Set(["ArrowRight", "ArrowDown"]);
|
|
14694
|
+
var PREV_KEYS = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowUp"]);
|
|
14695
|
+
function MosaicTemplateList({
|
|
14696
|
+
items,
|
|
14697
|
+
renderItem,
|
|
14698
|
+
layout = "grid",
|
|
14699
|
+
emptyMessage,
|
|
14700
|
+
className,
|
|
14701
|
+
itemClassName,
|
|
14702
|
+
ref
|
|
14703
|
+
}) {
|
|
14704
|
+
const itemRefs = React30.useRef([]);
|
|
14705
|
+
const [focusedIndex, setFocusedIndex] = React30.useState(0);
|
|
14706
|
+
function focusItem(index) {
|
|
14707
|
+
if (items.length === 0) {
|
|
14708
|
+
return;
|
|
14709
|
+
}
|
|
14710
|
+
const clamped = Math.max(0, Math.min(items.length - 1, index));
|
|
14711
|
+
setFocusedIndex(clamped);
|
|
14712
|
+
itemRefs.current[clamped]?.focus();
|
|
14713
|
+
}
|
|
14714
|
+
function handleKeyDown(event, index) {
|
|
14715
|
+
if (NEXT_KEYS.has(event.key)) {
|
|
14716
|
+
event.preventDefault();
|
|
14717
|
+
focusItem(index + 1);
|
|
14718
|
+
} else if (PREV_KEYS.has(event.key)) {
|
|
14719
|
+
event.preventDefault();
|
|
14720
|
+
focusItem(index - 1);
|
|
14721
|
+
} else if (event.key === "Home") {
|
|
14722
|
+
event.preventDefault();
|
|
14723
|
+
focusItem(0);
|
|
14724
|
+
} else if (event.key === "End") {
|
|
14725
|
+
event.preventDefault();
|
|
14726
|
+
focusItem(items.length - 1);
|
|
14727
|
+
}
|
|
14728
|
+
}
|
|
14729
|
+
if (items.length === 0) {
|
|
14730
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14731
|
+
"div",
|
|
14732
|
+
{
|
|
14733
|
+
ref,
|
|
14734
|
+
"data-slot": "template-list",
|
|
14735
|
+
className: cn95(templateListVariants({ layout }), className),
|
|
14736
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14737
|
+
"p",
|
|
14738
|
+
{
|
|
14739
|
+
"data-slot": "template-list-empty",
|
|
14740
|
+
className: "col-span-full py-12 text-center text-sm text-muted-foreground",
|
|
14741
|
+
children: emptyMessage
|
|
14742
|
+
}
|
|
14743
|
+
)
|
|
14744
|
+
}
|
|
14745
|
+
);
|
|
14746
|
+
}
|
|
14747
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14748
|
+
"ul",
|
|
14749
|
+
{
|
|
14750
|
+
ref,
|
|
14751
|
+
"data-slot": "template-list",
|
|
14752
|
+
className: cn95("list-none", templateListVariants({ layout }), className),
|
|
14753
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14754
|
+
"li",
|
|
14755
|
+
{
|
|
14756
|
+
ref: (node) => {
|
|
14757
|
+
itemRefs.current[index] = node;
|
|
14758
|
+
},
|
|
14759
|
+
"data-slot": "template-list-item",
|
|
14760
|
+
tabIndex: index === focusedIndex ? 0 : -1,
|
|
14761
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
14762
|
+
onFocus: () => setFocusedIndex(index),
|
|
14763
|
+
className: itemClassName,
|
|
14764
|
+
children: renderItem(item, index)
|
|
14765
|
+
},
|
|
14766
|
+
item.id
|
|
14767
|
+
))
|
|
14768
|
+
}
|
|
14769
|
+
);
|
|
14770
|
+
}
|
|
14771
|
+
MosaicTemplateList.displayName = "MosaicTemplateList";
|
|
14231
14772
|
|
|
14232
14773
|
Object.defineProperty(exports, "Accordion", {
|
|
14233
14774
|
enumerable: true,
|
|
@@ -14246,6 +14787,7 @@ exports.MosaicActivityItem = MosaicActivityItem;
|
|
|
14246
14787
|
exports.MosaicAdaptiveGrid = MosaicAdaptiveGrid;
|
|
14247
14788
|
exports.MosaicAdaptiveModal = MosaicAdaptiveModal;
|
|
14248
14789
|
exports.MosaicAdaptiveNavigation = MosaicAdaptiveNavigation;
|
|
14790
|
+
exports.MosaicAgentBuilderModal = MosaicAgentBuilderModal;
|
|
14249
14791
|
exports.MosaicAgentCard = MosaicAgentCard;
|
|
14250
14792
|
exports.MosaicAgentChat = MosaicAgentChat;
|
|
14251
14793
|
exports.MosaicAgentComposer = MosaicAgentComposer;
|
|
@@ -14325,6 +14867,7 @@ exports.MosaicKanbanColumn = MosaicKanbanColumn;
|
|
|
14325
14867
|
exports.MosaicLogosGrid = MosaicLogosGrid;
|
|
14326
14868
|
exports.MosaicMainNav = MosaicMainNav;
|
|
14327
14869
|
exports.MosaicMarkdown = MosaicMarkdown;
|
|
14870
|
+
exports.MosaicMarketplaceCard = MosaicMarketplaceCard;
|
|
14328
14871
|
exports.MosaicMarketplaceList = MosaicMarketplaceList;
|
|
14329
14872
|
exports.MosaicMarketplaceListDesktop = MarketplaceListDesktop;
|
|
14330
14873
|
exports.MosaicMarketplaceListMobile = MarketplaceListMobile;
|
|
@@ -14357,6 +14900,7 @@ exports.MosaicQuickStartPanel = MosaicQuickStartPanel;
|
|
|
14357
14900
|
exports.MosaicRadioGroup = MosaicRadioGroup;
|
|
14358
14901
|
exports.MosaicRadioGroupItem = MosaicRadioGroupItem;
|
|
14359
14902
|
exports.MosaicResizableSplitPane = MosaicResizableSplitPane;
|
|
14903
|
+
exports.MosaicSaveTemplateModal = MosaicSaveTemplateModal;
|
|
14360
14904
|
exports.MosaicScrollArea = MosaicScrollArea;
|
|
14361
14905
|
exports.MosaicSelect = MosaicSelect;
|
|
14362
14906
|
exports.MosaicSelectorModal = MosaicSelectorModal;
|
|
@@ -14377,6 +14921,7 @@ exports.MosaicTemplateAgentCard = MosaicTemplateAgentCard;
|
|
|
14377
14921
|
exports.MosaicTemplateCard = MosaicTemplateCard;
|
|
14378
14922
|
exports.MosaicTemplateCategoryChips = MosaicTemplateCategoryChips;
|
|
14379
14923
|
exports.MosaicTemplateGallery = MosaicTemplateGallery;
|
|
14924
|
+
exports.MosaicTemplateList = MosaicTemplateList;
|
|
14380
14925
|
exports.MosaicTemplatePreview = MosaicTemplatePreview;
|
|
14381
14926
|
exports.MosaicTestimonialsGrid = MosaicTestimonialsGrid;
|
|
14382
14927
|
exports.MosaicTextarea = MosaicTextarea;
|
|
@@ -14393,6 +14938,8 @@ exports.MosaicTooltipTrigger = MosaicTooltipTrigger;
|
|
|
14393
14938
|
exports.MosaicUrlScraper = MosaicUrlScraper;
|
|
14394
14939
|
exports.MosaicUserButton = MosaicUserButton;
|
|
14395
14940
|
exports.Placeholder = Placeholder;
|
|
14941
|
+
exports.agentBuilderModalBackdropVariants = agentBuilderModalBackdropVariants;
|
|
14942
|
+
exports.agentBuilderModalPopupVariants = agentBuilderModalPopupVariants;
|
|
14396
14943
|
exports.agentChatRootVariants = agentChatRootVariants;
|
|
14397
14944
|
exports.agentEditorVariants = agentEditorVariants;
|
|
14398
14945
|
exports.agentPreviewVariants = agentPreviewVariants;
|
|
@@ -14405,9 +14952,15 @@ exports.chatMessageContainerVariants = chatMessageContainerVariants;
|
|
|
14405
14952
|
exports.chatMessageToolStatusVariants = chatMessageToolStatusVariants;
|
|
14406
14953
|
exports.drawerBackdropVariants = drawerBackdropVariants;
|
|
14407
14954
|
exports.drawerPopupVariants = drawerPopupVariants;
|
|
14955
|
+
exports.marketplaceCardVariants = marketplaceCardVariants;
|
|
14408
14956
|
exports.pdfViewerFrameVariants = pdfViewerFrameVariants;
|
|
14409
14957
|
exports.pdfViewerStatusVariants = pdfViewerStatusVariants;
|
|
14410
14958
|
exports.pdfViewerToolbarButtonVariants = pdfViewerToolbarButtonVariants;
|
|
14959
|
+
exports.saveTemplateModalBodyVariants = saveTemplateModalBodyVariants;
|
|
14960
|
+
exports.saveTemplateModalButtonVariants = saveTemplateModalButtonVariants;
|
|
14961
|
+
exports.saveTemplateModalErrorVariants = saveTemplateModalErrorVariants;
|
|
14962
|
+
exports.saveTemplateModalFieldVariants = saveTemplateModalFieldVariants;
|
|
14963
|
+
exports.saveTemplateModalFooterVariants = saveTemplateModalFooterVariants;
|
|
14411
14964
|
exports.skeletonVariants = skeletonVariants;
|
|
14412
14965
|
exports.splitPaneCollapseButtonVariants = splitPaneCollapseButtonVariants;
|
|
14413
14966
|
exports.splitPaneHandleVariants = splitPaneHandleVariants;
|
|
@@ -14420,6 +14973,7 @@ exports.templateAgentCardBadgeVariants = templateAgentCardBadgeVariants;
|
|
|
14420
14973
|
exports.templateAgentCardTagVariants = templateAgentCardTagVariants;
|
|
14421
14974
|
exports.templateAgentCardVariants = templateAgentCardVariants;
|
|
14422
14975
|
exports.templateCategoryChipVariants = templateCategoryChipVariants;
|
|
14976
|
+
exports.templateListVariants = templateListVariants;
|
|
14423
14977
|
exports.toastCardVariants = toastCardVariants;
|
|
14424
14978
|
exports.toastDismissButtonVariants = toastDismissButtonVariants;
|
|
14425
14979
|
exports.toastProviderPositionVariants = toastProviderPositionVariants;
|