@vantageos/mosaic-blocks 0.5.23-alpha → 0.5.25-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { Button } from '@base-ui/react/button';
4
4
  import { cva } from 'class-variance-authority';
5
- import * as React29 from 'react';
5
+ import * as React30 from 'react';
6
6
  import { useState, useEffect, useRef, useId, useLayoutEffect, useCallback, useMemo } from 'react';
7
7
  import { Accordion } from '@base-ui/react/accordion';
8
8
  export { Accordion } from '@base-ui/react/accordion';
@@ -24,11 +24,11 @@ import { Switch } from '@base-ui/react/switch';
24
24
  import { Select } from '@base-ui/react/select';
25
25
  import { Combobox } from '@base-ui/react/combobox';
26
26
  import { Menu } from '@base-ui/react/menu';
27
- import { AlertDialog } from '@base-ui/react/alert-dialog';
28
27
  import { Dialog } from '@base-ui/react/dialog';
28
+ import { AlertDialog } from '@base-ui/react/alert-dialog';
29
29
 
30
30
  // src/version.ts
31
- var version = "0.5.23-alpha";
31
+ var version = "0.5.25-alpha";
32
32
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
33
33
  return /* @__PURE__ */ jsx("div", { "data-mosaic-block": "placeholder", children: label });
34
34
  }
@@ -159,11 +159,11 @@ function MosaicNavbar({
159
159
  className,
160
160
  ref
161
161
  }) {
162
- const [isScrolled, setIsScrolled] = React29.useState(false);
163
- const [isHidden, setIsHidden] = React29.useState(false);
164
- const [isOpen, setIsOpen] = React29.useState(false);
165
- const lastScrollY = React29.useRef(0);
166
- React29.useEffect(() => {
162
+ const [isScrolled, setIsScrolled] = React30.useState(false);
163
+ const [isHidden, setIsHidden] = React30.useState(false);
164
+ const [isOpen, setIsOpen] = React30.useState(false);
165
+ const lastScrollY = React30.useRef(0);
166
+ React30.useEffect(() => {
167
167
  const handleScroll = () => {
168
168
  const current = window.scrollY;
169
169
  setIsScrolled(current > 50);
@@ -178,7 +178,7 @@ function MosaicNavbar({
178
178
  window.addEventListener("scroll", handleScroll, { passive: true });
179
179
  return () => window.removeEventListener("scroll", handleScroll);
180
180
  }, []);
181
- React29.useEffect(() => {
181
+ React30.useEffect(() => {
182
182
  document.body.style.overflow = isOpen ? "hidden" : "";
183
183
  return () => {
184
184
  document.body.style.overflow = "";
@@ -706,10 +706,10 @@ function MosaicCounter({
706
706
  className,
707
707
  ref
708
708
  }) {
709
- const [current, setCurrent] = React29.useState(0);
710
- const rafRef = React29.useRef(0);
711
- const startTimeRef = React29.useRef(null);
712
- React29.useEffect(() => {
709
+ const [current, setCurrent] = React30.useState(0);
710
+ const rafRef = React30.useRef(0);
711
+ const startTimeRef = React30.useRef(null);
712
+ React30.useEffect(() => {
713
713
  const prefersReduced = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
714
714
  if (prefersReduced) {
715
715
  setCurrent(value);
@@ -765,12 +765,12 @@ function MosaicThemeToggle({
765
765
  switchToDarkLabel,
766
766
  ref
767
767
  }) {
768
- const [theme, setTheme] = React29.useState(() => {
768
+ const [theme, setTheme] = React30.useState(() => {
769
769
  if (typeof document === "undefined") return themes[0];
770
770
  const current = document.documentElement.getAttribute("data-theme");
771
771
  return current && themes.includes(current) ? current : themes[0];
772
772
  });
773
- const applyTheme = React29.useCallback(
773
+ const applyTheme = React30.useCallback(
774
774
  (next) => {
775
775
  const resolved = next === "system" ? getSystemTheme() : next;
776
776
  document.documentElement.setAttribute("data-theme", resolved);
@@ -898,10 +898,10 @@ function MosaicAnimatedList({
898
898
  as: Tag = "ul",
899
899
  ref
900
900
  }) {
901
- React29.useEffect(() => {
901
+ React30.useEffect(() => {
902
902
  injectKeyframes();
903
903
  }, []);
904
- const items = React29.Children.toArray(children);
904
+ const items = React30.Children.toArray(children);
905
905
  return /* @__PURE__ */ jsx(
906
906
  Tag,
907
907
  {
@@ -909,7 +909,7 @@ function MosaicAnimatedList({
909
909
  className,
910
910
  children: items.map((child, i) => {
911
911
  const stableKey = child.key ?? `item-${i}`;
912
- return /* @__PURE__ */ jsx(React29.Fragment, { children: /* @__PURE__ */ jsx(
912
+ return /* @__PURE__ */ jsx(React30.Fragment, { children: /* @__PURE__ */ jsx(
913
913
  "div",
914
914
  {
915
915
  className: "mosaic-list-item",
@@ -982,8 +982,8 @@ function MosaicFallingPattern({
982
982
  className,
983
983
  ref
984
984
  }) {
985
- const uniqueId = React29.useId();
986
- React29.useEffect(() => {
985
+ const uniqueId = React30.useId();
986
+ React30.useEffect(() => {
987
987
  injectPatternKeyframes();
988
988
  }, []);
989
989
  const cols = density;
@@ -2079,7 +2079,7 @@ function MosaicSelect({
2079
2079
  name,
2080
2080
  className
2081
2081
  }) {
2082
- const labelMap = React29.useMemo(
2082
+ const labelMap = React30.useMemo(
2083
2083
  () => Object.fromEntries(items.map((item) => [item.value, item.label])),
2084
2084
  [items]
2085
2085
  );
@@ -2199,9 +2199,9 @@ function MosaicCombobox({
2199
2199
  emptyMessage,
2200
2200
  className
2201
2201
  }) {
2202
- const [inputValue, setInputValue] = React29.useState("");
2202
+ const [inputValue, setInputValue] = React30.useState("");
2203
2203
  const filter = Combobox.useFilter({ sensitivity: "base" });
2204
- const filteredItems = React29.useMemo(() => {
2204
+ const filteredItems = React30.useMemo(() => {
2205
2205
  if (!inputValue) return items;
2206
2206
  return items.filter((item) => filter.contains(item.label, inputValue));
2207
2207
  }, [items, inputValue, filter]);
@@ -2304,17 +2304,17 @@ function MosaicModelSelector({
2304
2304
  name,
2305
2305
  className
2306
2306
  }) {
2307
- const [inputValue, setInputValue] = React29.useState("");
2307
+ const [inputValue, setInputValue] = React30.useState("");
2308
2308
  const filter = Combobox.useFilter({ sensitivity: "base" });
2309
- const filteredModels = React29.useMemo(() => {
2309
+ const filteredModels = React30.useMemo(() => {
2310
2310
  if (!inputValue) return models;
2311
2311
  return models.filter((model) => filter.contains(model.label, inputValue));
2312
2312
  }, [models, inputValue, filter]);
2313
- const labelMap = React29.useMemo(
2313
+ const labelMap = React30.useMemo(
2314
2314
  () => Object.fromEntries(models.map((model) => [model.value, model.label])),
2315
2315
  [models]
2316
2316
  );
2317
- const handleValueChange = React29.useCallback(
2317
+ const handleValueChange = React30.useCallback(
2318
2318
  (nextValue, eventDetails) => {
2319
2319
  if (typeof nextValue !== "string") return;
2320
2320
  const selected = models.find((model) => model.value === nextValue);
@@ -2407,7 +2407,7 @@ function MosaicDropdownMenu({
2407
2407
  "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
2408
2408
  className
2409
2409
  ),
2410
- children: items.map((item) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
2410
+ children: items.map((item) => /* @__PURE__ */ jsxs(React30.Fragment, { children: [
2411
2411
  item.separator && /* @__PURE__ */ jsx(Menu.Separator, { className: "my-1 h-px bg-border" }),
2412
2412
  /* @__PURE__ */ jsx(
2413
2413
  Menu.Item,
@@ -2435,8 +2435,8 @@ var BREAKPOINTS = {
2435
2435
  xl: 1280
2436
2436
  };
2437
2437
  function useBreakpoint(breakpoint) {
2438
- const [matches, setMatches] = React29.useState(false);
2439
- React29.useEffect(() => {
2438
+ const [matches, setMatches] = React30.useState(false);
2439
+ React30.useEffect(() => {
2440
2440
  if (typeof window === "undefined") return;
2441
2441
  const mq = window.matchMedia(`(min-width: ${BREAKPOINTS[breakpoint]}px)`);
2442
2442
  setMatches(mq.matches);
@@ -2459,8 +2459,8 @@ function useIsDesktop() {
2459
2459
  return useBreakpoint("lg");
2460
2460
  }
2461
2461
  function useViewport() {
2462
- const [size, setSize] = React29.useState({ width: 0, height: 0 });
2463
- React29.useEffect(() => {
2462
+ const [size, setSize] = React30.useState({ width: 0, height: 0 });
2463
+ React30.useEffect(() => {
2464
2464
  if (typeof window === "undefined") return;
2465
2465
  const update = () => setSize({ width: window.innerWidth, height: window.innerHeight });
2466
2466
  update();
@@ -2478,8 +2478,8 @@ function useViewport() {
2478
2478
  return size;
2479
2479
  }
2480
2480
  function useOrientation() {
2481
- const [orientation, setOrientation] = React29.useState("portrait");
2482
- React29.useEffect(() => {
2481
+ const [orientation, setOrientation] = React30.useState("portrait");
2482
+ React30.useEffect(() => {
2483
2483
  if (typeof window === "undefined") return;
2484
2484
  const update = () => {
2485
2485
  setOrientation(window.innerHeight > window.innerWidth ? "portrait" : "landscape");
@@ -2494,7 +2494,7 @@ function useOrientation() {
2494
2494
  }, []);
2495
2495
  return orientation;
2496
2496
  }
2497
- var DeviceContext = React29.createContext(void 0);
2497
+ var DeviceContext = React30.createContext(void 0);
2498
2498
  function MosaicDeviceProvider({ children }) {
2499
2499
  const isMobile = useIsMobile();
2500
2500
  const isTablet = useIsTablet();
@@ -2505,7 +2505,7 @@ function MosaicDeviceProvider({ children }) {
2505
2505
  const isXlUp = useBreakpoint("xl");
2506
2506
  const orientation = useOrientation();
2507
2507
  const viewport = useViewport();
2508
- const isBreakpoint = React29.useCallback(
2508
+ const isBreakpoint = React30.useCallback(
2509
2509
  (bp) => {
2510
2510
  switch (bp) {
2511
2511
  case "sm":
@@ -2520,7 +2520,7 @@ function MosaicDeviceProvider({ children }) {
2520
2520
  },
2521
2521
  [isSmUp, isMdUp, isLgUp, isXlUp]
2522
2522
  );
2523
- const value = React29.useMemo(
2523
+ const value = React30.useMemo(
2524
2524
  () => ({
2525
2525
  isMobile,
2526
2526
  isTablet,
@@ -2550,7 +2550,7 @@ function MosaicDeviceProvider({ children }) {
2550
2550
  }
2551
2551
  MosaicDeviceProvider.displayName = "MosaicDeviceProvider";
2552
2552
  function useDevice() {
2553
- const ctx = React29.useContext(DeviceContext);
2553
+ const ctx = React30.useContext(DeviceContext);
2554
2554
  if (!ctx) {
2555
2555
  throw new Error("useDevice must be used within a MosaicDeviceProvider");
2556
2556
  }
@@ -2636,13 +2636,13 @@ function MosaicAdaptiveModal({
2636
2636
  closeAriaLabel
2637
2637
  }) {
2638
2638
  const { isMobile } = useDevice();
2639
- const dialogRef = React29.useRef(null);
2640
- const titleId = React29.useId();
2641
- const descId = React29.useId();
2642
- React29.useEffect(() => {
2639
+ const dialogRef = React30.useRef(null);
2640
+ const titleId = React30.useId();
2641
+ const descId = React30.useId();
2642
+ React30.useEffect(() => {
2643
2643
  injectStyles();
2644
2644
  }, []);
2645
- React29.useEffect(() => {
2645
+ React30.useEffect(() => {
2646
2646
  const el = dialogRef.current;
2647
2647
  if (!el) return;
2648
2648
  if (isOpen) {
@@ -2651,7 +2651,7 @@ function MosaicAdaptiveModal({
2651
2651
  if (el.open) el.close();
2652
2652
  }
2653
2653
  }, [isOpen]);
2654
- React29.useEffect(() => {
2654
+ React30.useEffect(() => {
2655
2655
  const el = dialogRef.current;
2656
2656
  if (!el) return;
2657
2657
  const handler = (e) => {
@@ -2661,7 +2661,7 @@ function MosaicAdaptiveModal({
2661
2661
  el.addEventListener("cancel", handler);
2662
2662
  return () => el.removeEventListener("cancel", handler);
2663
2663
  }, [onClose]);
2664
- React29.useEffect(() => {
2664
+ React30.useEffect(() => {
2665
2665
  if (!isOpen) return;
2666
2666
  const prev = document.body.style.overflow;
2667
2667
  document.body.style.overflow = "hidden";
@@ -3093,8 +3093,8 @@ function MosaicAppSidebar({
3093
3093
  ref
3094
3094
  }) {
3095
3095
  const { isMobile } = useDevice();
3096
- const [expandedItems, setExpandedItems] = React29.useState(/* @__PURE__ */ new Set());
3097
- React29.useEffect(() => {
3096
+ const [expandedItems, setExpandedItems] = React30.useState(/* @__PURE__ */ new Set());
3097
+ React30.useEffect(() => {
3098
3098
  injectStyles2();
3099
3099
  }, []);
3100
3100
  const sidebarWidth = isMobile ? "100%" : isCollapsed ? "64px" : "280px";
@@ -3346,9 +3346,9 @@ function MosaicDashboardLayout({
3346
3346
  ref
3347
3347
  }) {
3348
3348
  const { isMobile } = useDevice();
3349
- const [isSidebarCollapsed, setIsSidebarCollapsed] = React29.useState(defaultSidebarCollapsed);
3350
- const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React29.useState(false);
3351
- React29.useEffect(() => {
3349
+ const [isSidebarCollapsed, setIsSidebarCollapsed] = React30.useState(defaultSidebarCollapsed);
3350
+ const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React30.useState(false);
3351
+ React30.useEffect(() => {
3352
3352
  injectStyles3();
3353
3353
  }, []);
3354
3354
  const defaultRenderLink2 = (href, children2) => /* @__PURE__ */ jsx("a", { href, className: "transition-colors hover:text-foreground", children: children2 });
@@ -3480,7 +3480,7 @@ function MosaicQuickActionCard({
3480
3480
  ref
3481
3481
  }) {
3482
3482
  const { mobile = 2, desktop = 3 } = columns;
3483
- React29.useEffect(() => {
3483
+ React30.useEffect(() => {
3484
3484
  injectStyles4();
3485
3485
  }, []);
3486
3486
  const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsx("a", { href, className: "block h-full", children });
@@ -3697,7 +3697,7 @@ function MosaicActivityFeed({
3697
3697
  className,
3698
3698
  ref
3699
3699
  }) {
3700
- React29.useEffect(() => {
3700
+ React30.useEffect(() => {
3701
3701
  injectStyles5();
3702
3702
  }, []);
3703
3703
  const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsx(
@@ -4367,7 +4367,7 @@ function MosaicAgentComposerMobile({
4367
4367
  optionalInstructionsHelp
4368
4368
  }) {
4369
4369
  const L = labels;
4370
- const instructionsId = React29.useId();
4370
+ const instructionsId = React30.useId();
4371
4371
  return /* @__PURE__ */ jsxs("div", { "data-slot": "agent-composer-mobile", className: "flex h-full flex-col", children: [
4372
4372
  /* @__PURE__ */ jsxs("div", { className: "shrink-0 sticky top-0 z-10 border-b border-border bg-background px-4 pt-4 pb-3", children: [
4373
4373
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4672,9 +4672,147 @@ function MosaicAgentEditor({
4672
4672
  );
4673
4673
  }
4674
4674
  MosaicAgentEditor.displayName = "MosaicAgentEditor";
4675
+ var agentBuilderModalPopupVariants = cva([
4676
+ "fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] w-full max-w-[calc(100%-2rem)] flex-col",
4677
+ "-translate-x-1/2 -translate-y-1/2",
4678
+ "rounded-lg border border-border bg-background shadow-lg outline-none",
4679
+ "sm:max-w-lg"
4680
+ ]);
4681
+ var agentBuilderModalBackdropVariants = cva(["fixed inset-0 z-50 bg-black/50"]);
4675
4682
  function cn47(...classes) {
4676
4683
  return classes.filter(Boolean).join(" ");
4677
4684
  }
4685
+ function MosaicAgentBuilderModal({
4686
+ open,
4687
+ onOpenChange,
4688
+ title,
4689
+ description,
4690
+ closeAriaLabel,
4691
+ confirmLabel,
4692
+ confirmingLabel,
4693
+ cancelLabel,
4694
+ onConfirm,
4695
+ onCancel,
4696
+ canConfirm,
4697
+ isConfirming,
4698
+ children,
4699
+ className
4700
+ }) {
4701
+ const titleId = React30.useId();
4702
+ const descriptionId = React30.useId();
4703
+ const confirmDisabled = !canConfirm || isConfirming;
4704
+ const handleConfirm = () => {
4705
+ if (confirmDisabled) return;
4706
+ onConfirm();
4707
+ };
4708
+ return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange: (nextOpen) => onOpenChange(nextOpen), modal: true, children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
4709
+ /* @__PURE__ */ jsx(
4710
+ Dialog.Backdrop,
4711
+ {
4712
+ "data-slot": "agent-builder-modal-backdrop",
4713
+ className: agentBuilderModalBackdropVariants()
4714
+ }
4715
+ ),
4716
+ /* @__PURE__ */ jsxs(
4717
+ Dialog.Popup,
4718
+ {
4719
+ "data-slot": "agent-builder-modal",
4720
+ "aria-labelledby": titleId,
4721
+ "aria-describedby": descriptionId,
4722
+ "aria-modal": "true",
4723
+ className: cn47(agentBuilderModalPopupVariants(), className),
4724
+ children: [
4725
+ /* @__PURE__ */ jsxs(
4726
+ "div",
4727
+ {
4728
+ "data-slot": "agent-builder-modal-header",
4729
+ className: "flex items-start justify-between gap-4 border-b border-border p-4",
4730
+ children: [
4731
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4732
+ /* @__PURE__ */ jsx(Dialog.Title, { id: titleId, className: "text-base font-semibold text-foreground", children: title }),
4733
+ /* @__PURE__ */ jsx(Dialog.Description, { id: descriptionId, className: "text-sm text-muted-foreground", children: description })
4734
+ ] }),
4735
+ /* @__PURE__ */ jsx(
4736
+ Dialog.Close,
4737
+ {
4738
+ "aria-label": closeAriaLabel,
4739
+ className: cn47(
4740
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
4741
+ "hover:bg-muted hover:text-foreground",
4742
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
4743
+ ),
4744
+ children: /* @__PURE__ */ jsxs(
4745
+ "svg",
4746
+ {
4747
+ width: "16",
4748
+ height: "16",
4749
+ viewBox: "0 0 24 24",
4750
+ fill: "none",
4751
+ stroke: "currentColor",
4752
+ strokeWidth: "2",
4753
+ strokeLinecap: "round",
4754
+ strokeLinejoin: "round",
4755
+ "aria-hidden": "true",
4756
+ children: [
4757
+ /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
4758
+ /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
4759
+ ]
4760
+ }
4761
+ )
4762
+ }
4763
+ )
4764
+ ]
4765
+ }
4766
+ ),
4767
+ /* @__PURE__ */ jsx("div", { "data-slot": "agent-builder-modal-body", className: "min-h-0 flex-1 overflow-y-auto p-4", children }),
4768
+ /* @__PURE__ */ jsxs(
4769
+ "div",
4770
+ {
4771
+ "data-slot": "agent-builder-modal-footer",
4772
+ className: "flex flex-col-reverse gap-2 border-t border-border p-4 sm:flex-row sm:justify-end",
4773
+ children: [
4774
+ /* @__PURE__ */ jsx(
4775
+ Dialog.Close,
4776
+ {
4777
+ onClick: onCancel,
4778
+ className: cn47(
4779
+ "inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border px-4",
4780
+ "bg-background text-sm font-medium text-foreground shadow-xs",
4781
+ "hover:bg-muted hover:text-foreground",
4782
+ "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
4783
+ "disabled:pointer-events-none disabled:opacity-50"
4784
+ ),
4785
+ children: cancelLabel
4786
+ }
4787
+ ),
4788
+ /* @__PURE__ */ jsx(
4789
+ "button",
4790
+ {
4791
+ type: "button",
4792
+ onClick: handleConfirm,
4793
+ disabled: confirmDisabled,
4794
+ className: cn47(
4795
+ "inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4",
4796
+ "bg-primary text-sm font-medium text-primary-foreground",
4797
+ "hover:bg-primary/90",
4798
+ "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
4799
+ "disabled:pointer-events-none disabled:opacity-50"
4800
+ ),
4801
+ children: isConfirming ? confirmingLabel : confirmLabel
4802
+ }
4803
+ )
4804
+ ]
4805
+ }
4806
+ )
4807
+ ]
4808
+ }
4809
+ )
4810
+ ] }) });
4811
+ }
4812
+ MosaicAgentBuilderModal.displayName = "MosaicAgentBuilderModal";
4813
+ function cn48(...classes) {
4814
+ return classes.filter(Boolean).join(" ");
4815
+ }
4678
4816
  function EditIcon() {
4679
4817
  return /* @__PURE__ */ jsxs(
4680
4818
  "svg",
@@ -4733,7 +4871,7 @@ function MosaicModuleCard({
4733
4871
  {
4734
4872
  ref,
4735
4873
  "data-slot": "module-card",
4736
- className: cn47(
4874
+ className: cn48(
4737
4875
  "min-h-[80px] rounded-xl border border-border bg-card p-4 transition-all",
4738
4876
  "flex items-start gap-3",
4739
4877
  isSelected && "ring-2 ring-primary bg-primary/5",
@@ -4795,7 +4933,7 @@ function MosaicThemeProvider({
4795
4933
  return /* @__PURE__ */ jsx("div", { "data-slot": "theme-provider", children });
4796
4934
  }
4797
4935
  MosaicThemeProvider.displayName = "MosaicThemeProvider";
4798
- function cn48(...classes) {
4936
+ function cn49(...classes) {
4799
4937
  return classes.filter(Boolean).join(" ");
4800
4938
  }
4801
4939
  var ANIM_ID6 = "mosaic-delete-dialog-kf";
@@ -4837,21 +4975,21 @@ function MosaicDeleteConfirmationDialog({
4837
4975
  cancelLabel,
4838
4976
  confirmLabel
4839
4977
  }) {
4840
- React29.useEffect(() => {
4978
+ React30.useEffect(() => {
4841
4979
  injectStyles6();
4842
4980
  }, []);
4843
4981
  return /* @__PURE__ */ jsx(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [
4844
4982
  /* @__PURE__ */ jsx(
4845
4983
  AlertDialog.Backdrop,
4846
4984
  {
4847
- className: cn48("mosaic-delete-overlay", "fixed inset-0 z-50 bg-black/50")
4985
+ className: cn49("mosaic-delete-overlay", "fixed inset-0 z-50 bg-black/50")
4848
4986
  }
4849
4987
  ),
4850
4988
  /* @__PURE__ */ jsxs(
4851
4989
  AlertDialog.Popup,
4852
4990
  {
4853
4991
  "data-slot": "delete-confirmation-dialog",
4854
- className: cn48(
4992
+ className: cn49(
4855
4993
  "mosaic-delete-content",
4856
4994
  "fixed left-1/2 top-1/2 z-50",
4857
4995
  "w-full max-w-[92vw] sm:max-w-md",
@@ -4864,7 +5002,7 @@ function MosaicDeleteConfirmationDialog({
4864
5002
  /* @__PURE__ */ jsx(
4865
5003
  AlertDialog.Close,
4866
5004
  {
4867
- className: cn48(
5005
+ className: cn49(
4868
5006
  "inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
4869
5007
  "bg-background px-4 py-2 text-sm font-medium text-foreground",
4870
5008
  "hover:bg-accent hover:text-accent-foreground",
@@ -4878,7 +5016,7 @@ function MosaicDeleteConfirmationDialog({
4878
5016
  AlertDialog.Close,
4879
5017
  {
4880
5018
  onClick: onConfirm,
4881
- className: cn48(
5019
+ className: cn49(
4882
5020
  "inline-flex min-h-[44px] w-full items-center justify-center rounded-md",
4883
5021
  "bg-destructive px-4 py-2 text-sm font-medium text-destructive-foreground",
4884
5022
  "hover:bg-destructive/90",
@@ -4902,7 +5040,7 @@ var alertDialogContentVariants = cva([
4902
5040
  "sm:max-w-lg"
4903
5041
  ]);
4904
5042
  var alertDialogOverlayVariants = cva(["fixed inset-0 z-50 bg-black/50"]);
4905
- function cn49(...classes) {
5043
+ function cn50(...classes) {
4906
5044
  return classes.filter(Boolean).join(" ");
4907
5045
  }
4908
5046
  function MosaicAlertDialog(props) {
@@ -4922,7 +5060,7 @@ function MosaicAlertDialogOverlay({ className, ...props }) {
4922
5060
  AlertDialog.Backdrop,
4923
5061
  {
4924
5062
  "data-slot": "alert-dialog-overlay",
4925
- className: cn49(alertDialogOverlayVariants(), className),
5063
+ className: cn50(alertDialogOverlayVariants(), className),
4926
5064
  ...props
4927
5065
  }
4928
5066
  );
@@ -4935,7 +5073,7 @@ function MosaicAlertDialogContent({ className, ...props }) {
4935
5073
  AlertDialog.Popup,
4936
5074
  {
4937
5075
  "data-slot": "alert-dialog-content",
4938
- className: cn49(alertDialogContentVariants(), className),
5076
+ className: cn50(alertDialogContentVariants(), className),
4939
5077
  ...props
4940
5078
  }
4941
5079
  )
@@ -4947,7 +5085,7 @@ function MosaicAlertDialogHeader({ className, ...props }) {
4947
5085
  "div",
4948
5086
  {
4949
5087
  "data-slot": "alert-dialog-header",
4950
- className: cn49("flex flex-col gap-2 text-center sm:text-left", className),
5088
+ className: cn50("flex flex-col gap-2 text-center sm:text-left", className),
4951
5089
  ...props
4952
5090
  }
4953
5091
  );
@@ -4958,7 +5096,7 @@ function MosaicAlertDialogFooter({ className, ...props }) {
4958
5096
  "div",
4959
5097
  {
4960
5098
  "data-slot": "alert-dialog-footer",
4961
- className: cn49("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
5099
+ className: cn50("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
4962
5100
  ...props
4963
5101
  }
4964
5102
  );
@@ -4973,7 +5111,7 @@ function MosaicAlertDialogTitle({
4973
5111
  AlertDialog.Title,
4974
5112
  {
4975
5113
  "data-slot": "alert-dialog-title",
4976
- className: cn49("text-lg font-semibold text-foreground", className),
5114
+ className: cn50("text-lg font-semibold text-foreground", className),
4977
5115
  ...props,
4978
5116
  children
4979
5117
  }
@@ -4989,7 +5127,7 @@ function MosaicAlertDialogDescription({
4989
5127
  AlertDialog.Description,
4990
5128
  {
4991
5129
  "data-slot": "alert-dialog-description",
4992
- className: cn49("text-sm text-muted-foreground", className),
5130
+ className: cn50("text-sm text-muted-foreground", className),
4993
5131
  ...props,
4994
5132
  children
4995
5133
  }
@@ -5005,7 +5143,7 @@ function MosaicAlertDialogAction({
5005
5143
  AlertDialog.Close,
5006
5144
  {
5007
5145
  "data-slot": "alert-dialog-action",
5008
- className: cn49(
5146
+ className: cn50(
5009
5147
  "inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4",
5010
5148
  "bg-destructive text-sm font-medium text-destructive-foreground",
5011
5149
  "hover:bg-destructive/90",
@@ -5028,7 +5166,7 @@ function MosaicAlertDialogCancel({
5028
5166
  AlertDialog.Close,
5029
5167
  {
5030
5168
  "data-slot": "alert-dialog-cancel",
5031
- className: cn49(
5169
+ className: cn50(
5032
5170
  "inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border px-4",
5033
5171
  "bg-background text-sm font-medium text-foreground shadow-xs",
5034
5172
  "hover:bg-muted hover:text-foreground",
@@ -5042,7 +5180,7 @@ function MosaicAlertDialogCancel({
5042
5180
  );
5043
5181
  }
5044
5182
  MosaicAlertDialogCancel.displayName = "MosaicAlertDialogCancel";
5045
- function cn50(...classes) {
5183
+ function cn51(...classes) {
5046
5184
  return classes.filter(Boolean).join(" ");
5047
5185
  }
5048
5186
  function Toggle({
@@ -5058,7 +5196,7 @@ function Toggle({
5058
5196
  id,
5059
5197
  "aria-checked": checked,
5060
5198
  onClick: () => onChange(!checked),
5061
- className: cn50(
5199
+ className: cn51(
5062
5200
  "relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent",
5063
5201
  "transition-colors duration-200 ease-in-out",
5064
5202
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
@@ -5067,7 +5205,7 @@ function Toggle({
5067
5205
  children: /* @__PURE__ */ jsx(
5068
5206
  "span",
5069
5207
  {
5070
- className: cn50(
5208
+ className: cn51(
5071
5209
  "pointer-events-none inline-block h-5 w-5 rounded-full bg-background shadow-lg",
5072
5210
  "transform transition duration-200 ease-in-out",
5073
5211
  checked ? "translate-x-5" : "translate-x-0"
@@ -5089,7 +5227,7 @@ function NativeSelect({
5089
5227
  id,
5090
5228
  value,
5091
5229
  onChange: (e) => onChange(e.target.value),
5092
- className: cn50(
5230
+ className: cn51(
5093
5231
  "flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
5094
5232
  "text-sm text-foreground",
5095
5233
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -5109,7 +5247,7 @@ function MosaicPreferencesPanel({
5109
5247
  className
5110
5248
  }) {
5111
5249
  const { isMobile } = useDevice();
5112
- return /* @__PURE__ */ jsxs("div", { "data-slot": "preferences-panel", className: cn50("space-y-4 md:space-y-6", className), children: [
5250
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "preferences-panel", className: cn51("space-y-4 md:space-y-6", className), children: [
5113
5251
  groups.map((group) => /* @__PURE__ */ jsxs(
5114
5252
  "div",
5115
5253
  {
@@ -5152,13 +5290,13 @@ function MosaicPreferencesPanel({
5152
5290
  },
5153
5291
  group.id
5154
5292
  )),
5155
- /* @__PURE__ */ jsx("div", { className: cn50("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxs(
5293
+ /* @__PURE__ */ jsx("div", { className: cn51("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxs(
5156
5294
  "button",
5157
5295
  {
5158
5296
  type: "button",
5159
5297
  onClick: onSave,
5160
5298
  disabled: isSaving,
5161
- className: cn50(
5299
+ className: cn51(
5162
5300
  "inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
5163
5301
  "bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
5164
5302
  "hover:bg-primary/90",
@@ -5194,7 +5332,7 @@ function MosaicPreferencesPanel({
5194
5332
  ] });
5195
5333
  }
5196
5334
  MosaicPreferencesPanel.displayName = "MosaicPreferencesPanel";
5197
- function cn51(...classes) {
5335
+ function cn52(...classes) {
5198
5336
  return classes.filter(Boolean).join(" ");
5199
5337
  }
5200
5338
  function AvatarDisplay({
@@ -5207,7 +5345,7 @@ function AvatarDisplay({
5207
5345
  return /* @__PURE__ */ jsx(
5208
5346
  "span",
5209
5347
  {
5210
- className: cn51(
5348
+ className: cn52(
5211
5349
  "inline-flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground font-semibold overflow-hidden",
5212
5350
  sizeClass
5213
5351
  ),
@@ -5239,7 +5377,7 @@ function MosaicProfilePanel({
5239
5377
  className
5240
5378
  }) {
5241
5379
  const { isMobile } = useDevice();
5242
- return /* @__PURE__ */ jsxs("div", { "data-slot": "profile-panel", className: cn51("space-y-4 md:space-y-6", className), children: [
5380
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "profile-panel", className: cn52("space-y-4 md:space-y-6", className), children: [
5243
5381
  /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
5244
5382
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
5245
5383
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: avatarHeading }),
@@ -5259,7 +5397,7 @@ function MosaicProfilePanel({
5259
5397
  {
5260
5398
  type: "button",
5261
5399
  onClick: onAvatarUpload,
5262
- className: cn51(
5400
+ className: cn52(
5263
5401
  "inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md border border-border",
5264
5402
  "bg-background px-4 py-2 text-sm font-medium text-foreground",
5265
5403
  "hover:bg-accent hover:text-accent-foreground",
@@ -5309,7 +5447,7 @@ function MosaicProfilePanel({
5309
5447
  placeholder: field.placeholder,
5310
5448
  onChange: (e) => onFieldChange?.(field.id, e.target.value),
5311
5449
  rows: 4,
5312
- className: cn51(
5450
+ className: cn52(
5313
5451
  "flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2",
5314
5452
  "text-sm text-foreground placeholder:text-muted-foreground",
5315
5453
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -5325,7 +5463,7 @@ function MosaicProfilePanel({
5325
5463
  readOnly: field.readOnly,
5326
5464
  placeholder: field.placeholder,
5327
5465
  onChange: (e) => onFieldChange?.(field.id, e.target.value),
5328
- className: cn51(
5466
+ className: cn52(
5329
5467
  "flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
5330
5468
  "text-sm text-foreground placeholder:text-muted-foreground",
5331
5469
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -5345,7 +5483,7 @@ function MosaicProfilePanel({
5345
5483
  {
5346
5484
  type: "button",
5347
5485
  onClick: onChangePassword,
5348
- className: cn51(
5486
+ className: cn52(
5349
5487
  "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
5350
5488
  "bg-background px-4 py-2 text-sm font-medium text-foreground",
5351
5489
  "hover:bg-accent hover:text-accent-foreground",
@@ -5357,13 +5495,13 @@ function MosaicProfilePanel({
5357
5495
  ) })
5358
5496
  ] }),
5359
5497
  extraSections,
5360
- /* @__PURE__ */ jsx("div", { className: cn51("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxs(
5498
+ /* @__PURE__ */ jsx("div", { className: cn52("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxs(
5361
5499
  "button",
5362
5500
  {
5363
5501
  type: "button",
5364
5502
  onClick: onSave,
5365
5503
  disabled: isSaving,
5366
- className: cn51(
5504
+ className: cn52(
5367
5505
  "inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
5368
5506
  "bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
5369
5507
  "hover:bg-primary/90",
@@ -5399,7 +5537,7 @@ function MosaicProfilePanel({
5399
5537
  ] });
5400
5538
  }
5401
5539
  MosaicProfilePanel.displayName = "MosaicProfilePanel";
5402
- function cn52(...classes) {
5540
+ function cn53(...classes) {
5403
5541
  return classes.filter(Boolean).join(" ");
5404
5542
  }
5405
5543
  var ANIM_ID7 = "mosaic-main-nav-kf";
@@ -5490,12 +5628,12 @@ function MosaicMainNav({
5490
5628
  className
5491
5629
  }) {
5492
5630
  const { isMobile } = useDevice();
5493
- const [isOpen, setIsOpen] = React29.useState(false);
5631
+ const [isOpen, setIsOpen] = React30.useState(false);
5494
5632
  const linkRenderer = renderLink ?? defaultRenderLink;
5495
- React29.useEffect(() => {
5633
+ React30.useEffect(() => {
5496
5634
  injectStyles7();
5497
5635
  }, []);
5498
- React29.useEffect(() => {
5636
+ React30.useEffect(() => {
5499
5637
  if (!isOpen) return;
5500
5638
  const handler = (e) => {
5501
5639
  if (e.key === "Escape") setIsOpen(false);
@@ -5512,7 +5650,7 @@ function MosaicMainNav({
5512
5650
  {
5513
5651
  type: "button",
5514
5652
  onClick: () => setIsOpen(!isOpen),
5515
- className: cn52(
5653
+ className: cn53(
5516
5654
  "inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md p-0",
5517
5655
  "text-foreground hover:bg-accent hover:text-accent-foreground",
5518
5656
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -5538,7 +5676,7 @@ function MosaicMainNav({
5538
5676
  "aria-label": drawerNavAriaLabel,
5539
5677
  open: isOpen,
5540
5678
  "data-open": isOpen ? "true" : "false",
5541
- className: cn52(
5679
+ className: cn53(
5542
5680
  "mosaic-nav-drawer",
5543
5681
  "fixed inset-y-0 left-0 z-50 m-0 w-[280px] max-h-none h-full p-0",
5544
5682
  "border-r border-border bg-background shadow-xl",
@@ -5555,7 +5693,7 @@ function MosaicMainNav({
5555
5693
  {
5556
5694
  type: "button",
5557
5695
  onClick: () => setIsOpen(false),
5558
- className: cn52(
5696
+ className: cn53(
5559
5697
  "inline-flex h-8 w-8 items-center justify-center rounded-md",
5560
5698
  "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
5561
5699
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -5568,13 +5706,13 @@ function MosaicMainNav({
5568
5706
  /* @__PURE__ */ jsx("nav", { className: "flex flex-col gap-1 p-4", "aria-label": mainNavAriaLabel, children: filteredItems.map((item) => {
5569
5707
  const Icon = item.icon;
5570
5708
  const active = isItemActive(item);
5571
- const itemClass = cn52(
5709
+ const itemClass = cn53(
5572
5710
  "flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
5573
5711
  "hover:bg-accent hover:text-accent-foreground",
5574
5712
  "min-h-[44px]",
5575
5713
  active && "bg-accent text-accent-foreground"
5576
5714
  );
5577
- return /* @__PURE__ */ jsx(React29.Fragment, { children: linkRenderer(
5715
+ return /* @__PURE__ */ jsx(React30.Fragment, { children: linkRenderer(
5578
5716
  item,
5579
5717
  /* @__PURE__ */ jsxs(Fragment, { children: [
5580
5718
  Icon && /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
@@ -5594,18 +5732,18 @@ function MosaicMainNav({
5594
5732
  "nav",
5595
5733
  {
5596
5734
  "data-slot": "main-nav",
5597
- className: cn52("flex items-center gap-1", className),
5735
+ className: cn53("flex items-center gap-1", className),
5598
5736
  "aria-label": mainNavAriaLabel,
5599
5737
  children: filteredItems.map((item) => {
5600
5738
  const Icon = item.icon;
5601
5739
  const active = isItemActive(item);
5602
- const itemClass = cn52(
5740
+ const itemClass = cn53(
5603
5741
  "flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors",
5604
5742
  "hover:bg-accent hover:text-accent-foreground",
5605
5743
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5606
5744
  active && "bg-accent text-accent-foreground"
5607
5745
  );
5608
- return /* @__PURE__ */ jsx(React29.Fragment, { children: linkRenderer(
5746
+ return /* @__PURE__ */ jsx(React30.Fragment, { children: linkRenderer(
5609
5747
  item,
5610
5748
  /* @__PURE__ */ jsxs(Fragment, { children: [
5611
5749
  Icon && /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4", "aria-hidden": "true" }),
@@ -5619,7 +5757,7 @@ function MosaicMainNav({
5619
5757
  );
5620
5758
  }
5621
5759
  MosaicMainNav.displayName = "MosaicMainNav";
5622
- function cn53(...classes) {
5760
+ function cn54(...classes) {
5623
5761
  return classes.filter(Boolean).join(" ");
5624
5762
  }
5625
5763
  function MoreVertIcon() {
@@ -5742,10 +5880,10 @@ function MosaicAgentCard({
5742
5880
  createdLabel,
5743
5881
  className
5744
5882
  }) {
5745
- const [menuOpen, setMenuOpen] = React29.useState(false);
5746
- const menuRef = React29.useRef(null);
5883
+ const [menuOpen, setMenuOpen] = React30.useState(false);
5884
+ const menuRef = React30.useRef(null);
5747
5885
  const formattedDate = agent.createdAt ? new Date(agent.createdAt).toLocaleDateString() : void 0;
5748
- React29.useEffect(() => {
5886
+ React30.useEffect(() => {
5749
5887
  if (!menuOpen) return;
5750
5888
  const handler = (e) => {
5751
5889
  if (menuRef.current && !menuRef.current.contains(e.target)) {
@@ -5759,7 +5897,7 @@ function MosaicAgentCard({
5759
5897
  "div",
5760
5898
  {
5761
5899
  "data-slot": "agent-card",
5762
- className: cn53(
5900
+ className: cn54(
5763
5901
  "relative overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-sm",
5764
5902
  "transition-shadow hover:shadow-md",
5765
5903
  agent.isActive && "ring-2 ring-primary",
@@ -5769,7 +5907,7 @@ function MosaicAgentCard({
5769
5907
  /* @__PURE__ */ jsx(
5770
5908
  "div",
5771
5909
  {
5772
- className: cn53(
5910
+ className: cn54(
5773
5911
  "absolute left-0 top-0 h-1 w-full",
5774
5912
  agent.isActive ? "bg-primary" : "bg-muted"
5775
5913
  )
@@ -5781,7 +5919,7 @@ function MosaicAgentCard({
5781
5919
  agent.accentColor && /* @__PURE__ */ jsx(
5782
5920
  "span",
5783
5921
  {
5784
- className: cn53("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
5922
+ className: cn54("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
5785
5923
  "aria-hidden": "true"
5786
5924
  }
5787
5925
  ),
@@ -5799,7 +5937,7 @@ function MosaicAgentCard({
5799
5937
  {
5800
5938
  type: "button",
5801
5939
  onClick: () => setMenuOpen((v) => !v),
5802
- className: cn53(
5940
+ className: cn54(
5803
5941
  "inline-flex h-8 w-8 items-center justify-center rounded-md",
5804
5942
  "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
5805
5943
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -5814,7 +5952,7 @@ function MosaicAgentCard({
5814
5952
  "div",
5815
5953
  {
5816
5954
  role: "menu",
5817
- className: cn53(
5955
+ className: cn54(
5818
5956
  "absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
5819
5957
  "bg-popover py-1 shadow-md"
5820
5958
  ),
@@ -5829,7 +5967,7 @@ function MosaicAgentCard({
5829
5967
  onToggleStatus(agent.id);
5830
5968
  setMenuOpen(false);
5831
5969
  },
5832
- className: cn53(
5970
+ className: cn54(
5833
5971
  "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
5834
5972
  "hover:bg-accent hover:text-accent-foreground",
5835
5973
  "disabled:pointer-events-none disabled:opacity-50"
@@ -5888,7 +6026,7 @@ function MosaicAgentCard({
5888
6026
  type: "button",
5889
6027
  disabled: isLoading,
5890
6028
  onClick: () => onToggleStatus(agent.id),
5891
- className: cn53(
6029
+ className: cn54(
5892
6030
  "inline-flex h-7 items-center justify-center rounded-md px-3 text-xs font-medium",
5893
6031
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5894
6032
  "disabled:pointer-events-none disabled:opacity-50",
@@ -5904,7 +6042,7 @@ function MosaicAgentCard({
5904
6042
  );
5905
6043
  }
5906
6044
  MosaicAgentCard.displayName = "MosaicAgentCard";
5907
- function cn54(...classes) {
6045
+ function cn55(...classes) {
5908
6046
  return classes.filter(Boolean).join(" ");
5909
6047
  }
5910
6048
  function PlusIcon3() {
@@ -5987,7 +6125,7 @@ function PickerContent({
5987
6125
  {
5988
6126
  type: "button",
5989
6127
  onClick: () => onAdd(agent.id),
5990
- className: cn54(
6128
+ className: cn55(
5991
6129
  "flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
5992
6130
  "hover:bg-accent hover:text-accent-foreground",
5993
6131
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -5996,7 +6134,7 @@ function PickerContent({
5996
6134
  agent.accentColor && /* @__PURE__ */ jsx(
5997
6135
  "span",
5998
6136
  {
5999
- className: cn54("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
6137
+ className: cn55("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
6000
6138
  "aria-hidden": "true"
6001
6139
  }
6002
6140
  ),
@@ -6013,7 +6151,7 @@ function PickerContent({
6013
6151
  {
6014
6152
  type: "button",
6015
6153
  onClick: onOpenBuilder,
6016
- className: cn54(
6154
+ className: cn55(
6017
6155
  "flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
6018
6156
  "hover:bg-accent hover:text-accent-foreground",
6019
6157
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6048,9 +6186,9 @@ function MosaicQuickAgentSelector({
6048
6186
  className
6049
6187
  }) {
6050
6188
  const { isMobile } = useDevice();
6051
- const [pickerOpen, setPickerOpen] = React29.useState(false);
6052
- const dropdownRef = React29.useRef(null);
6053
- React29.useEffect(() => {
6189
+ const [pickerOpen, setPickerOpen] = React30.useState(false);
6190
+ const dropdownRef = React30.useRef(null);
6191
+ React30.useEffect(() => {
6054
6192
  if (!pickerOpen || isMobile) return;
6055
6193
  const handler = (e) => {
6056
6194
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -6068,11 +6206,11 @@ function MosaicQuickAgentSelector({
6068
6206
  setPickerOpen(false);
6069
6207
  };
6070
6208
  const canAdd = selectedAgents.length < maxAgents;
6071
- return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-agent-selector", className: cn54("flex items-center gap-2", className), children: [
6209
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-agent-selector", className: cn55("flex items-center gap-2", className), children: [
6072
6210
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-x-auto", children: selectedAgents.map((agent) => /* @__PURE__ */ jsxs(
6073
6211
  "div",
6074
6212
  {
6075
- className: cn54(
6213
+ className: cn55(
6076
6214
  "group flex shrink-0 items-center gap-2 rounded-md border border-border bg-card",
6077
6215
  isMobile ? "px-2 py-1" : "px-3 py-1.5"
6078
6216
  ),
@@ -6080,17 +6218,17 @@ function MosaicQuickAgentSelector({
6080
6218
  agent.accentColor && /* @__PURE__ */ jsx(
6081
6219
  "span",
6082
6220
  {
6083
- className: cn54("h-2 w-2 shrink-0 rounded-full", agent.accentColor),
6221
+ className: cn55("h-2 w-2 shrink-0 rounded-full", agent.accentColor),
6084
6222
  "aria-hidden": "true"
6085
6223
  }
6086
6224
  ),
6087
- /* @__PURE__ */ jsx("span", { className: cn54("whitespace-nowrap font-medium", isMobile ? "text-xs" : "text-sm"), children: isMobile ? agent.type.split("-")[0] : agent.name }),
6225
+ /* @__PURE__ */ jsx("span", { className: cn55("whitespace-nowrap font-medium", isMobile ? "text-xs" : "text-sm"), children: isMobile ? agent.type.split("-")[0] : agent.name }),
6088
6226
  /* @__PURE__ */ jsx(
6089
6227
  "button",
6090
6228
  {
6091
6229
  type: "button",
6092
6230
  onClick: () => onRemoveAgent(agent.id),
6093
- className: cn54(
6231
+ className: cn55(
6094
6232
  "inline-flex h-4 w-4 items-center justify-center rounded",
6095
6233
  "text-muted-foreground hover:text-foreground",
6096
6234
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6110,7 +6248,7 @@ function MosaicQuickAgentSelector({
6110
6248
  {
6111
6249
  type: "button",
6112
6250
  onClick: () => setPickerOpen((v) => !v),
6113
- className: cn54(
6251
+ className: cn55(
6114
6252
  "inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
6115
6253
  "px-3 py-1.5 text-sm font-medium text-foreground",
6116
6254
  "hover:bg-accent hover:text-accent-foreground",
@@ -6125,7 +6263,7 @@ function MosaicQuickAgentSelector({
6125
6263
  !isMobile && pickerOpen && /* @__PURE__ */ jsx(
6126
6264
  "div",
6127
6265
  {
6128
- className: cn54(
6266
+ className: cn55(
6129
6267
  "absolute left-0 top-full z-50 mt-2 w-72 rounded-lg border border-border",
6130
6268
  "bg-popover shadow-lg"
6131
6269
  ),
@@ -6174,7 +6312,7 @@ function MosaicQuickAgentSelector({
6174
6312
  /* @__PURE__ */ jsxs(
6175
6313
  "span",
6176
6314
  {
6177
- className: cn54(
6315
+ className: cn55(
6178
6316
  "shrink-0 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground"
6179
6317
  ),
6180
6318
  children: [
@@ -6198,7 +6336,7 @@ var agentPreviewVariants = cva(["rounded-lg border border-border"], {
6198
6336
  variant: "summary"
6199
6337
  }
6200
6338
  });
6201
- function cn55(...classes) {
6339
+ function cn56(...classes) {
6202
6340
  return classes.filter(Boolean).join(" ");
6203
6341
  }
6204
6342
  function MosaicAgentPreview(props) {
@@ -6208,7 +6346,7 @@ function MosaicAgentPreview(props) {
6208
6346
  "div",
6209
6347
  {
6210
6348
  "data-slot": "agent-preview",
6211
- className: cn55(agentPreviewVariants({ variant: "detailed" }), className2),
6349
+ className: cn56(agentPreviewVariants({ variant: "detailed" }), className2),
6212
6350
  children: [
6213
6351
  /* @__PURE__ */ jsx("div", { "data-slot": "agent-preview-header", className: "p-4 pb-0", children: /* @__PURE__ */ jsx("p", { className: "text-base font-semibold leading-none tracking-tight", children: title }) }),
6214
6352
  /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
@@ -6235,7 +6373,7 @@ function MosaicAgentPreview(props) {
6235
6373
  "div",
6236
6374
  {
6237
6375
  "data-slot": "agent-preview",
6238
- className: cn55(agentPreviewVariants({ variant: "summary" }), className),
6376
+ className: cn56(agentPreviewVariants({ variant: "summary" }), className),
6239
6377
  children: [
6240
6378
  /* @__PURE__ */ jsx(
6241
6379
  "span",
@@ -6327,7 +6465,7 @@ var memoryActionsMenuTriggerVariants = cva(
6327
6465
  }
6328
6466
  }
6329
6467
  );
6330
- function cn56(...classes) {
6468
+ function cn57(...classes) {
6331
6469
  return classes.filter(Boolean).join(" ");
6332
6470
  }
6333
6471
  var MAX_VISIBLE_TAGS = 3;
@@ -6481,10 +6619,10 @@ function MosaicMemoryCard(props) {
6481
6619
  ref
6482
6620
  } = props;
6483
6621
  const variant = props.variant ?? "detailed";
6484
- const [menuOpen, setMenuOpen] = React29.useState(false);
6485
- const menuRef = React29.useRef(null);
6622
+ const [menuOpen, setMenuOpen] = React30.useState(false);
6623
+ const menuRef = React30.useRef(null);
6486
6624
  const SourceIcon = SOURCE_ICONS[memory.source];
6487
- React29.useEffect(() => {
6625
+ React30.useEffect(() => {
6488
6626
  if (!menuOpen) return;
6489
6627
  const handler = (event) => {
6490
6628
  if (menuRef.current && !menuRef.current.contains(event.target)) {
@@ -6505,7 +6643,7 @@ function MosaicMemoryCard(props) {
6505
6643
  "aria-label": moreActionsLabel,
6506
6644
  "aria-haspopup": "menu",
6507
6645
  "aria-expanded": menuOpen,
6508
- className: cn56(memoryActionsMenuTriggerVariants({ variant })),
6646
+ className: cn57(memoryActionsMenuTriggerVariants({ variant })),
6509
6647
  children: /* @__PURE__ */ jsx(MoreVertIcon2, {})
6510
6648
  }
6511
6649
  ),
@@ -6513,7 +6651,7 @@ function MosaicMemoryCard(props) {
6513
6651
  "div",
6514
6652
  {
6515
6653
  role: "menu",
6516
- className: cn56(
6654
+ className: cn57(
6517
6655
  "absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
6518
6656
  "bg-popover py-1 shadow-md"
6519
6657
  ),
@@ -6554,7 +6692,7 @@ function MosaicMemoryCard(props) {
6554
6692
  ref,
6555
6693
  "data-slot": "memory-card",
6556
6694
  "data-variant": variant,
6557
- className: cn56(memoryCardVariants({ variant }), className),
6695
+ className: cn57(memoryCardVariants({ variant }), className),
6558
6696
  children: props.variant !== "compact" ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
6559
6697
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
6560
6698
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
@@ -6564,7 +6702,7 @@ function MosaicMemoryCard(props) {
6564
6702
  /* @__PURE__ */ jsx(
6565
6703
  "span",
6566
6704
  {
6567
- className: cn56(
6705
+ className: cn57(
6568
6706
  memoryScopeBadgeVariants({ scope: memory.scope, bordered: true }),
6569
6707
  "mt-1"
6570
6708
  ),
@@ -6577,8 +6715,8 @@ function MosaicMemoryCard(props) {
6577
6715
  ] }),
6578
6716
  /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-sm text-muted-foreground", children: memory.content }),
6579
6717
  /* @__PURE__ */ jsxs("div", { "data-slot": "memory-tags", className: "flex flex-wrap gap-1", children: [
6580
- visibleTags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn56(memoryTagBadgeVariants()), children: tag }, tag)),
6581
- hiddenTagCount > 0 && /* @__PURE__ */ jsx("span", { className: cn56(memoryTagBadgeVariants()), children: props.formatMoreTags(hiddenTagCount) })
6718
+ visibleTags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn57(memoryTagBadgeVariants()), children: tag }, tag)),
6719
+ hiddenTagCount > 0 && /* @__PURE__ */ jsx("span", { className: cn57(memoryTagBadgeVariants()), children: props.formatMoreTags(hiddenTagCount) })
6582
6720
  ] }),
6583
6721
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t pt-2 text-xs text-muted-foreground", children: [
6584
6722
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
@@ -6606,7 +6744,7 @@ function MosaicMemoryCard(props) {
6606
6744
  /* @__PURE__ */ jsx(
6607
6745
  "span",
6608
6746
  {
6609
- className: cn56(memoryScopeBadgeVariants({ scope: memory.scope, bordered: false })),
6747
+ className: cn57(memoryScopeBadgeVariants({ scope: memory.scope, bordered: false })),
6610
6748
  children: formatScope(memory.scope)
6611
6749
  }
6612
6750
  ),
@@ -6648,7 +6786,7 @@ var templateAgentCardBadgeVariants = cva([
6648
6786
  var templateAgentCardTagVariants = cva([
6649
6787
  "inline-flex items-center rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground"
6650
6788
  ]);
6651
- function cn57(...classes) {
6789
+ function cn58(...classes) {
6652
6790
  return classes.filter(Boolean).join(" ");
6653
6791
  }
6654
6792
  var MAX_VISIBLE_TAGS2 = 3;
@@ -6717,7 +6855,7 @@ function MosaicTemplateAgentCard({
6717
6855
  {
6718
6856
  ref,
6719
6857
  "data-slot": "template-agent-card",
6720
- className: cn57(templateAgentCardVariants({ selected: isSelected }), "p-4", className),
6858
+ className: cn58(templateAgentCardVariants({ selected: isSelected }), "p-4", className),
6721
6859
  children: [
6722
6860
  /* @__PURE__ */ jsx("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ jsxs(
6723
6861
  "button",
@@ -6726,7 +6864,7 @@ function MosaicTemplateAgentCard({
6726
6864
  onClick: () => onSelect(template),
6727
6865
  "aria-label": selectAriaLabel,
6728
6866
  "aria-pressed": isSelected,
6729
- className: cn57(
6867
+ className: cn58(
6730
6868
  "flex min-w-0 flex-1 items-start gap-2 rounded-md text-left",
6731
6869
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
6732
6870
  ),
@@ -6740,11 +6878,11 @@ function MosaicTemplateAgentCard({
6740
6878
  }
6741
6879
  ) }),
6742
6880
  /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
6743
- template.category && /* @__PURE__ */ jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: template.category }),
6744
- /* @__PURE__ */ jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: agentCountLabel }),
6745
- formatUsageCount(template.usageCount) != null && /* @__PURE__ */ jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: formatUsageCount(template.usageCount) }),
6746
- visibleTags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn57(templateAgentCardTagVariants()), children: tag }, tag)),
6747
- hiddenTagCount > 0 && /* @__PURE__ */ jsx("span", { className: cn57(templateAgentCardTagVariants()), children: formatMoreTags(hiddenTagCount) })
6881
+ template.category && /* @__PURE__ */ jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: template.category }),
6882
+ /* @__PURE__ */ jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: agentCountLabel }),
6883
+ formatUsageCount(template.usageCount) != null && /* @__PURE__ */ jsx("span", { className: cn58(templateAgentCardBadgeVariants()), children: formatUsageCount(template.usageCount) }),
6884
+ visibleTags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn58(templateAgentCardTagVariants()), children: tag }, tag)),
6885
+ hiddenTagCount > 0 && /* @__PURE__ */ jsx("span", { className: cn58(templateAgentCardTagVariants()), children: formatMoreTags(hiddenTagCount) })
6748
6886
  ] }),
6749
6887
  (onPreview || onDuplicate) && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-2", children: [
6750
6888
  onPreview && /* @__PURE__ */ jsxs(
@@ -6753,7 +6891,7 @@ function MosaicTemplateAgentCard({
6753
6891
  type: "button",
6754
6892
  onClick: () => onPreview(template),
6755
6893
  "aria-label": previewAriaLabel,
6756
- className: cn57(
6894
+ className: cn58(
6757
6895
  "inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
6758
6896
  "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
6759
6897
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6770,7 +6908,7 @@ function MosaicTemplateAgentCard({
6770
6908
  type: "button",
6771
6909
  onClick: () => onDuplicate(template),
6772
6910
  "aria-label": duplicateAriaLabel,
6773
- className: cn57(
6911
+ className: cn58(
6774
6912
  "inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
6775
6913
  "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
6776
6914
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6787,7 +6925,7 @@ function MosaicTemplateAgentCard({
6787
6925
  );
6788
6926
  }
6789
6927
  MosaicTemplateAgentCard.displayName = "MosaicTemplateAgentCard";
6790
- function cn58(...classes) {
6928
+ function cn59(...classes) {
6791
6929
  return classes.filter(Boolean).join(" ");
6792
6930
  }
6793
6931
  function SearchIcon() {
@@ -6847,10 +6985,10 @@ function MosaicSelectorModal({
6847
6985
  emptyMessage,
6848
6986
  closeAriaLabel
6849
6987
  }) {
6850
- const [query, setQuery] = React29.useState("");
6851
- const [activeCategory, setActiveCategory] = React29.useState("all");
6852
- const [pendingId, setPendingId] = React29.useState(selectedId);
6853
- React29.useEffect(() => {
6988
+ const [query, setQuery] = React30.useState("");
6989
+ const [activeCategory, setActiveCategory] = React30.useState("all");
6990
+ const [pendingId, setPendingId] = React30.useState(selectedId);
6991
+ React30.useEffect(() => {
6854
6992
  if (isOpen) {
6855
6993
  setPendingId(selectedId);
6856
6994
  setQuery("");
@@ -6888,7 +7026,7 @@ function MosaicSelectorModal({
6888
7026
  value: query,
6889
7027
  onChange: (e) => setQuery(e.target.value),
6890
7028
  placeholder: searchPlaceholder,
6891
- className: cn58(
7029
+ className: cn59(
6892
7030
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
6893
7031
  "text-sm text-foreground placeholder:text-muted-foreground",
6894
7032
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6902,7 +7040,7 @@ function MosaicSelectorModal({
6902
7040
  {
6903
7041
  type: "button",
6904
7042
  onClick: () => setActiveCategory("all"),
6905
- className: cn58(
7043
+ className: cn59(
6906
7044
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
6907
7045
  activeCategory === "all" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
6908
7046
  ),
@@ -6914,7 +7052,7 @@ function MosaicSelectorModal({
6914
7052
  {
6915
7053
  type: "button",
6916
7054
  onClick: () => setActiveCategory(cat.id),
6917
- className: cn58(
7055
+ className: cn59(
6918
7056
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
6919
7057
  activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
6920
7058
  ),
@@ -6926,7 +7064,7 @@ function MosaicSelectorModal({
6926
7064
  /* @__PURE__ */ jsxs(
6927
7065
  "div",
6928
7066
  {
6929
- className: cn58(
7067
+ className: cn59(
6930
7068
  "max-h-[50vh] overflow-y-auto",
6931
7069
  columns === 2 ? "grid grid-cols-1 gap-3 sm:grid-cols-2" : "flex flex-col gap-3"
6932
7070
  ),
@@ -6938,7 +7076,7 @@ function MosaicSelectorModal({
6938
7076
  {
6939
7077
  type: "button",
6940
7078
  onClick: () => setPendingId(item.id),
6941
- className: cn58(
7079
+ className: cn59(
6942
7080
  "group relative rounded-lg border p-4 text-left transition-all duration-150",
6943
7081
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
6944
7082
  isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50"
@@ -6976,7 +7114,7 @@ function MosaicSelectorModal({
6976
7114
  {
6977
7115
  type: "button",
6978
7116
  onClick: onClose,
6979
- className: cn58(
7117
+ className: cn59(
6980
7118
  "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
6981
7119
  "bg-background px-4 py-2 text-sm font-medium text-foreground",
6982
7120
  "hover:bg-accent hover:text-accent-foreground",
@@ -6991,7 +7129,7 @@ function MosaicSelectorModal({
6991
7129
  type: "button",
6992
7130
  onClick: handleConfirm,
6993
7131
  disabled: !pendingItem,
6994
- className: cn58(
7132
+ className: cn59(
6995
7133
  "inline-flex min-h-[44px] items-center justify-center rounded-md",
6996
7134
  "bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
6997
7135
  "hover:bg-primary/90",
@@ -7007,7 +7145,7 @@ function MosaicSelectorModal({
7007
7145
  );
7008
7146
  }
7009
7147
  MosaicSelectorModal.displayName = "MosaicSelectorModal";
7010
- function cn59(...classes) {
7148
+ function cn60(...classes) {
7011
7149
  return classes.filter(Boolean).join(" ");
7012
7150
  }
7013
7151
  function relativeTime(ts) {
@@ -7207,13 +7345,13 @@ function MosaicMessageCard({
7207
7345
  copyMessageLabel,
7208
7346
  className
7209
7347
  }) {
7210
- const [bookmarked, setBookmarked] = React29.useState(message.bookmarked ?? false);
7211
- const [likes, setLikes] = React29.useState(message.reactions?.likes ?? 0);
7212
- const [dislikes, setDislikes] = React29.useState(message.reactions?.dislikes ?? 0);
7213
- const [hasLiked, setHasLiked] = React29.useState(false);
7214
- const [hasDisliked, setHasDisliked] = React29.useState(false);
7215
- const [menuOpen, setMenuOpen] = React29.useState(false);
7216
- const menuRef = React29.useRef(null);
7348
+ const [bookmarked, setBookmarked] = React30.useState(message.bookmarked ?? false);
7349
+ const [likes, setLikes] = React30.useState(message.reactions?.likes ?? 0);
7350
+ const [dislikes, setDislikes] = React30.useState(message.reactions?.dislikes ?? 0);
7351
+ const [hasLiked, setHasLiked] = React30.useState(false);
7352
+ const [hasDisliked, setHasDisliked] = React30.useState(false);
7353
+ const [menuOpen, setMenuOpen] = React30.useState(false);
7354
+ const menuRef = React30.useRef(null);
7217
7355
  const initials = message.sender.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
7218
7356
  const handleLike = () => {
7219
7357
  if (hasLiked) {
@@ -7251,7 +7389,7 @@ function MosaicMessageCard({
7251
7389
  navigator.clipboard.writeText(message.content).catch(() => null);
7252
7390
  onCopy?.(message.id, message.content);
7253
7391
  };
7254
- React29.useEffect(() => {
7392
+ React30.useEffect(() => {
7255
7393
  if (!menuOpen) return;
7256
7394
  const h = (e) => {
7257
7395
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -7263,7 +7401,7 @@ function MosaicMessageCard({
7263
7401
  "div",
7264
7402
  {
7265
7403
  "data-slot": "message-card",
7266
- className: cn59(
7404
+ className: cn60(
7267
7405
  "rounded-lg border border-border bg-card p-4 shadow-sm transition-shadow hover:shadow-md",
7268
7406
  compact && "p-3",
7269
7407
  message.sender.type === "user" && "bg-primary/5",
@@ -7273,7 +7411,7 @@ function MosaicMessageCard({
7273
7411
  /* @__PURE__ */ jsx(
7274
7412
  "span",
7275
7413
  {
7276
- className: cn59(
7414
+ className: cn60(
7277
7415
  "inline-flex shrink-0 items-center justify-center rounded-full text-white font-semibold",
7278
7416
  compact ? "h-8 w-8 text-xs" : "h-10 w-10 text-sm",
7279
7417
  message.sender.accentColor ?? "bg-muted text-muted-foreground"
@@ -7291,7 +7429,7 @@ function MosaicMessageCard({
7291
7429
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
7292
7430
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
7293
7431
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7294
- /* @__PURE__ */ jsx("span", { className: cn59("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
7432
+ /* @__PURE__ */ jsx("span", { className: cn60("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
7295
7433
  message.sender.type === "ai" && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: "AI" })
7296
7434
  ] }),
7297
7435
  /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: relativeTime(message.timestamp) })
@@ -7299,7 +7437,7 @@ function MosaicMessageCard({
7299
7437
  /* @__PURE__ */ jsx(
7300
7438
  "p",
7301
7439
  {
7302
- className: cn59(
7440
+ className: cn60(
7303
7441
  "leading-relaxed text-foreground mb-3",
7304
7442
  compact ? "text-sm" : "text-base"
7305
7443
  ),
@@ -7314,7 +7452,7 @@ function MosaicMessageCard({
7314
7452
  {
7315
7453
  type: "button",
7316
7454
  onClick: handleLike,
7317
- className: cn59(
7455
+ className: cn60(
7318
7456
  "inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
7319
7457
  "hover:bg-accent hover:text-accent-foreground",
7320
7458
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -7332,7 +7470,7 @@ function MosaicMessageCard({
7332
7470
  {
7333
7471
  type: "button",
7334
7472
  onClick: handleDislike,
7335
- className: cn59(
7473
+ className: cn60(
7336
7474
  "inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
7337
7475
  "hover:bg-accent hover:text-accent-foreground",
7338
7476
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -7377,7 +7515,7 @@ function MosaicMessageCard({
7377
7515
  {
7378
7516
  type: "button",
7379
7517
  onClick: handleBookmark,
7380
- className: cn59(
7518
+ className: cn60(
7381
7519
  "inline-flex h-8 w-8 items-center justify-center rounded-md",
7382
7520
  "hover:bg-accent hover:text-accent-foreground",
7383
7521
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -7478,7 +7616,7 @@ function MosaicMessageCard({
7478
7616
  );
7479
7617
  }
7480
7618
  MosaicMessageCard.displayName = "MosaicMessageCard";
7481
- function cn60(...classes) {
7619
+ function cn61(...classes) {
7482
7620
  return classes.filter(Boolean).join(" ");
7483
7621
  }
7484
7622
  function SearchIcon2() {
@@ -7524,11 +7662,11 @@ function MessageListDesktop({
7524
7662
  copyMessageLabel,
7525
7663
  className
7526
7664
  }) {
7527
- const [query, setQuery] = React29.useState("");
7665
+ const [query, setQuery] = React30.useState("");
7528
7666
  const filtered = query ? messages.filter(
7529
7667
  (m) => m.content.toLowerCase().includes(query.toLowerCase()) || m.sender.name.toLowerCase().includes(query.toLowerCase())
7530
7668
  ) : messages;
7531
- return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-desktop", className: cn60("flex h-full flex-col", className), children: [
7669
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-desktop", className: cn61("flex h-full flex-col", className), children: [
7532
7670
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
7533
7671
  title && /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: title }),
7534
7672
  /* @__PURE__ */ jsxs("div", { className: "relative ml-auto max-w-xs flex-1", children: [
@@ -7540,7 +7678,7 @@ function MessageListDesktop({
7540
7678
  value: query,
7541
7679
  onChange: (e) => setQuery(e.target.value),
7542
7680
  placeholder: searchPlaceholder,
7543
- className: cn60(
7681
+ className: cn61(
7544
7682
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
7545
7683
  "text-sm placeholder:text-muted-foreground",
7546
7684
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7576,7 +7714,7 @@ function MessageListDesktop({
7576
7714
  {
7577
7715
  type: "button",
7578
7716
  onClick: onLoadMore,
7579
- className: cn60(
7717
+ className: cn61(
7580
7718
  "w-full rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
7581
7719
  "hover:bg-accent hover:text-accent-foreground",
7582
7720
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7607,7 +7745,7 @@ function MessageListMobile({
7607
7745
  copyMessageLabel,
7608
7746
  className
7609
7747
  }) {
7610
- return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-mobile", className: cn60("flex flex-col", className), children: [
7748
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-mobile", className: cn61("flex flex-col", className), children: [
7611
7749
  title && /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 border-b border-border bg-background px-4 py-3", children: /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold", children: title }) }),
7612
7750
  /* @__PURE__ */ jsxs("div", { className: "space-y-3 p-4", children: [
7613
7751
  isLoading && /* @__PURE__ */ jsx("div", { className: "space-y-3", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("div", { className: "h-20 animate-pulse rounded-lg bg-muted" }, i)) }),
@@ -7637,7 +7775,7 @@ function MessageListMobile({
7637
7775
  {
7638
7776
  type: "button",
7639
7777
  onClick: onLoadMore,
7640
- className: cn60(
7778
+ className: cn61(
7641
7779
  "w-full min-h-[44px] rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
7642
7780
  "hover:bg-accent hover:text-accent-foreground",
7643
7781
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7652,7 +7790,7 @@ function MosaicMessageList(props) {
7652
7790
  return isMobile ? /* @__PURE__ */ jsx(MessageListMobile, { ...props }) : /* @__PURE__ */ jsx(MessageListDesktop, { ...props });
7653
7791
  }
7654
7792
  MosaicMessageList.displayName = "MosaicMessageList";
7655
- function cn61(...classes) {
7793
+ function cn62(...classes) {
7656
7794
  return classes.filter(Boolean).join(" ");
7657
7795
  }
7658
7796
  function ChevronLeftIcon2() {
@@ -7732,7 +7870,7 @@ function MosaicFilterSidebar({
7732
7870
  {
7733
7871
  "data-slot": "filter-sidebar",
7734
7872
  style: { width, minWidth: isCollapsed && !isMobile ? "64px" : void 0 },
7735
- className: cn61(
7873
+ className: cn62(
7736
7874
  "relative flex flex-col border-r border-border bg-card",
7737
7875
  "transition-[width] duration-200 ease-in-out",
7738
7876
  "overflow-hidden",
@@ -7744,7 +7882,7 @@ function MosaicFilterSidebar({
7744
7882
  {
7745
7883
  type: "button",
7746
7884
  onClick: onToggleCollapse,
7747
- className: cn61(
7885
+ className: cn62(
7748
7886
  "absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center rounded-full",
7749
7887
  "border border-border bg-background shadow-sm",
7750
7888
  "hover:bg-accent hover:text-accent-foreground",
@@ -7774,7 +7912,7 @@ function MosaicFilterSidebar({
7774
7912
  {
7775
7913
  type: "button",
7776
7914
  onClick: () => onFilterChange(f.id),
7777
- className: cn61(
7915
+ className: cn62(
7778
7916
  "flex min-h-[40px] items-center justify-between rounded-md px-3 py-2 text-sm font-medium",
7779
7917
  "transition-colors hover:bg-accent hover:text-accent-foreground",
7780
7918
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -7794,7 +7932,7 @@ function MosaicFilterSidebar({
7794
7932
  {
7795
7933
  type: "button",
7796
7934
  onClick: () => onCategoryChange(cat.id),
7797
- className: cn61(
7935
+ className: cn62(
7798
7936
  "flex min-h-[36px] items-center justify-between rounded-md px-3 py-1.5 text-sm",
7799
7937
  "transition-colors hover:bg-accent hover:text-accent-foreground",
7800
7938
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -7814,7 +7952,7 @@ function MosaicFilterSidebar({
7814
7952
  );
7815
7953
  }
7816
7954
  MosaicFilterSidebar.displayName = "MosaicFilterSidebar";
7817
- function cn62(...classes) {
7955
+ function cn63(...classes) {
7818
7956
  return classes.filter(Boolean).join(" ");
7819
7957
  }
7820
7958
  function SearchIcon3() {
@@ -7900,8 +8038,8 @@ function AgentListDesktop({
7900
8038
  collapseSidebarAriaLabel,
7901
8039
  expandSidebarAriaLabel
7902
8040
  }) {
7903
- const [query, setQuery] = React29.useState("");
7904
- const [sidebarCollapsed, setSidebarCollapsed] = React29.useState(false);
8041
+ const [query, setQuery] = React30.useState("");
8042
+ const [sidebarCollapsed, setSidebarCollapsed] = React30.useState(false);
7905
8043
  const filtered = agents.filter(
7906
8044
  (a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
7907
8045
  );
@@ -7939,7 +8077,7 @@ function AgentListDesktop({
7939
8077
  value: query,
7940
8078
  onChange: (e) => setQuery(e.target.value),
7941
8079
  placeholder: searchPlaceholder,
7942
- className: cn62(
8080
+ className: cn63(
7943
8081
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
7944
8082
  "text-sm placeholder:text-muted-foreground",
7945
8083
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7952,7 +8090,7 @@ function AgentListDesktop({
7952
8090
  {
7953
8091
  type: "button",
7954
8092
  onClick: onCreateAgent,
7955
- className: cn62(
8093
+ className: cn63(
7956
8094
  "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
7957
8095
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
7958
8096
  ),
@@ -8006,8 +8144,8 @@ function AgentListMobile({
8006
8144
  collapseSidebarAriaLabel,
8007
8145
  expandSidebarAriaLabel
8008
8146
  }) {
8009
- const [filterOpen, setFilterOpen] = React29.useState(false);
8010
- const [query, setQuery] = React29.useState("");
8147
+ const [filterOpen, setFilterOpen] = React30.useState(false);
8148
+ const [query, setQuery] = React30.useState("");
8011
8149
  const filtered = agents.filter(
8012
8150
  (a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
8013
8151
  );
@@ -8021,7 +8159,7 @@ function AgentListMobile({
8021
8159
  {
8022
8160
  type: "button",
8023
8161
  onClick: () => setFilterOpen(true),
8024
- className: cn62(
8162
+ className: cn63(
8025
8163
  "inline-flex h-9 w-9 items-center justify-center rounded-md",
8026
8164
  "border border-border bg-background text-foreground",
8027
8165
  "hover:bg-accent hover:text-accent-foreground",
@@ -8036,7 +8174,7 @@ function AgentListMobile({
8036
8174
  {
8037
8175
  type: "button",
8038
8176
  onClick: onCreateAgent,
8039
- className: cn62(
8177
+ className: cn63(
8040
8178
  "inline-flex h-9 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground",
8041
8179
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8042
8180
  ),
@@ -8057,7 +8195,7 @@ function AgentListMobile({
8057
8195
  value: query,
8058
8196
  onChange: (e) => setQuery(e.target.value),
8059
8197
  placeholder: searchPlaceholder,
8060
- className: cn62(
8198
+ className: cn63(
8061
8199
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
8062
8200
  "text-sm placeholder:text-muted-foreground",
8063
8201
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8119,7 +8257,7 @@ function MosaicAgentList(props) {
8119
8257
  return isMobile ? /* @__PURE__ */ jsx(AgentListMobile, { ...props }) : /* @__PURE__ */ jsx(AgentListDesktop, { ...props });
8120
8258
  }
8121
8259
  MosaicAgentList.displayName = "MosaicAgentList";
8122
- function cn63(...classes) {
8260
+ function cn64(...classes) {
8123
8261
  return classes.filter(Boolean).join(" ");
8124
8262
  }
8125
8263
  function StarIcon({ filled }) {
@@ -8216,7 +8354,7 @@ function MarketplaceCard({
8216
8354
  "div",
8217
8355
  {
8218
8356
  "data-slot": "marketplace-card",
8219
- className: cn63(
8357
+ className: cn64(
8220
8358
  "rounded-lg border border-border bg-card p-4 transition-shadow hover:shadow-md",
8221
8359
  compact ? "flex items-center gap-3" : "flex flex-col gap-3"
8222
8360
  ),
@@ -8224,7 +8362,7 @@ function MarketplaceCard({
8224
8362
  item.icon && /* @__PURE__ */ jsx(
8225
8363
  "div",
8226
8364
  {
8227
- className: cn63(
8365
+ className: cn64(
8228
8366
  "flex shrink-0 items-center justify-center rounded-lg",
8229
8367
  compact ? "h-10 w-10" : "h-12 w-12",
8230
8368
  item.accentClass ?? "bg-muted text-muted-foreground"
@@ -8235,7 +8373,7 @@ function MarketplaceCard({
8235
8373
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
8236
8374
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
8237
8375
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
8238
- /* @__PURE__ */ jsx("p", { className: cn63("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
8376
+ /* @__PURE__ */ jsx("p", { className: cn64("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
8239
8377
  item.description && !compact && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground line-clamp-2", children: item.description })
8240
8378
  ] }),
8241
8379
  item.price && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground", children: item.price })
@@ -8252,13 +8390,13 @@ function MarketplaceCard({
8252
8390
  ] })
8253
8391
  ] })
8254
8392
  ] }),
8255
- /* @__PURE__ */ jsxs("div", { className: cn63("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
8393
+ /* @__PURE__ */ jsxs("div", { className: cn64("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
8256
8394
  onPreview && /* @__PURE__ */ jsx(
8257
8395
  "button",
8258
8396
  {
8259
8397
  type: "button",
8260
8398
  onClick: () => onPreview(item.id),
8261
- className: cn63(
8399
+ className: cn64(
8262
8400
  "inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
8263
8401
  "bg-background px-3 text-xs font-medium text-foreground",
8264
8402
  "hover:bg-accent hover:text-accent-foreground",
@@ -8272,7 +8410,7 @@ function MarketplaceCard({
8272
8410
  {
8273
8411
  type: "button",
8274
8412
  onClick: () => onUninstall(item.id),
8275
- className: cn63(
8413
+ className: cn64(
8276
8414
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
8277
8415
  "bg-secondary px-3 text-xs font-medium text-secondary-foreground",
8278
8416
  "hover:bg-secondary/80",
@@ -8285,7 +8423,7 @@ function MarketplaceCard({
8285
8423
  {
8286
8424
  type: "button",
8287
8425
  onClick: () => onInstall(item.id),
8288
- className: cn63(
8426
+ className: cn64(
8289
8427
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
8290
8428
  "bg-primary px-3 text-xs font-medium text-primary-foreground",
8291
8429
  "hover:bg-primary/90",
@@ -8322,8 +8460,8 @@ function MarketplaceListDesktop(props) {
8322
8460
  collapseSidebarAriaLabel,
8323
8461
  expandSidebarAriaLabel
8324
8462
  } = props;
8325
- const [query, setQuery] = React29.useState("");
8326
- const [sidebarCollapsed, setSidebarCollapsed] = React29.useState(false);
8463
+ const [query, setQuery] = React30.useState("");
8464
+ const [sidebarCollapsed, setSidebarCollapsed] = React30.useState(false);
8327
8465
  const filtered = items.filter(
8328
8466
  (i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
8329
8467
  );
@@ -8357,7 +8495,7 @@ function MarketplaceListDesktop(props) {
8357
8495
  value: query,
8358
8496
  onChange: (e) => setQuery(e.target.value),
8359
8497
  placeholder: searchPlaceholder,
8360
- className: cn63(
8498
+ className: cn64(
8361
8499
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
8362
8500
  "text-sm placeholder:text-muted-foreground",
8363
8501
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8411,8 +8549,8 @@ function MarketplaceListMobile(props) {
8411
8549
  collapseSidebarAriaLabel,
8412
8550
  expandSidebarAriaLabel
8413
8551
  } = props;
8414
- const [filterOpen, setFilterOpen] = React29.useState(false);
8415
- const [query, setQuery] = React29.useState("");
8552
+ const [filterOpen, setFilterOpen] = React30.useState(false);
8553
+ const [query, setQuery] = React30.useState("");
8416
8554
  const filtered = items.filter(
8417
8555
  (i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
8418
8556
  );
@@ -8440,7 +8578,7 @@ function MarketplaceListMobile(props) {
8440
8578
  value: query,
8441
8579
  onChange: (e) => setQuery(e.target.value),
8442
8580
  placeholder: searchPlaceholder,
8443
- className: cn63(
8581
+ className: cn64(
8444
8582
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
8445
8583
  "text-sm placeholder:text-muted-foreground",
8446
8584
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8519,7 +8657,7 @@ var marketplaceCardVariants = cva(
8519
8657
  }
8520
8658
  }
8521
8659
  );
8522
- function cn64(...classes) {
8660
+ function cn65(...classes) {
8523
8661
  return classes.filter(Boolean).join(" ");
8524
8662
  }
8525
8663
  function MosaicMarketplaceCard({
@@ -8545,12 +8683,12 @@ function MosaicMarketplaceCard({
8545
8683
  MosaicCard,
8546
8684
  {
8547
8685
  "data-slot": "marketplace-card",
8548
- className: cn64(marketplaceCardVariants({ variant }), className),
8686
+ className: cn65(marketplaceCardVariants({ variant }), className),
8549
8687
  children: [
8550
8688
  icon && /* @__PURE__ */ jsx(
8551
8689
  "div",
8552
8690
  {
8553
- className: cn64(
8691
+ className: cn65(
8554
8692
  "flex shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
8555
8693
  compact ? "h-10 w-10" : "h-12 w-12"
8556
8694
  ),
@@ -8558,7 +8696,7 @@ function MosaicMarketplaceCard({
8558
8696
  }
8559
8697
  ),
8560
8698
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
8561
- /* @__PURE__ */ jsx(MosaicCardTitle, { className: cn64("truncate", compact ? "text-sm" : "text-base"), children: name }),
8699
+ /* @__PURE__ */ jsx(MosaicCardTitle, { className: cn65("truncate", compact ? "text-sm" : "text-base"), children: name }),
8562
8700
  description && /* @__PURE__ */ jsx(
8563
8701
  MosaicCardDescription,
8564
8702
  {
@@ -8580,13 +8718,13 @@ function MosaicMarketplaceCard({
8580
8718
  }
8581
8719
  )
8582
8720
  ] }),
8583
- /* @__PURE__ */ jsxs("div", { className: cn64("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
8721
+ /* @__PURE__ */ jsxs("div", { className: cn65("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
8584
8722
  onPreview && /* @__PURE__ */ jsx(
8585
8723
  "button",
8586
8724
  {
8587
8725
  type: "button",
8588
8726
  onClick: () => onPreview(id),
8589
- className: cn64(
8727
+ className: cn65(
8590
8728
  "inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
8591
8729
  "bg-background px-3 text-xs font-medium text-foreground",
8592
8730
  "hover:bg-accent hover:text-accent-foreground",
@@ -8600,7 +8738,7 @@ function MosaicMarketplaceCard({
8600
8738
  {
8601
8739
  type: "button",
8602
8740
  onClick: () => onUnadopt(id),
8603
- className: cn64(
8741
+ className: cn65(
8604
8742
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
8605
8743
  "bg-secondary px-3 text-xs font-medium text-secondary-foreground",
8606
8744
  "hover:bg-secondary/80",
@@ -8613,7 +8751,7 @@ function MosaicMarketplaceCard({
8613
8751
  {
8614
8752
  type: "button",
8615
8753
  onClick: () => onAdopt(id),
8616
- className: cn64(
8754
+ className: cn65(
8617
8755
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
8618
8756
  "bg-primary px-3 text-xs font-medium text-primary-foreground",
8619
8757
  "hover:bg-primary/90",
@@ -8628,7 +8766,7 @@ function MosaicMarketplaceCard({
8628
8766
  );
8629
8767
  }
8630
8768
  MosaicMarketplaceCard.displayName = "MosaicMarketplaceCard";
8631
- function cn65(...classes) {
8769
+ function cn66(...classes) {
8632
8770
  return classes.filter(Boolean).join(" ");
8633
8771
  }
8634
8772
  function StarIcon2() {
@@ -8749,7 +8887,7 @@ function MosaicTemplateCard({
8749
8887
  type: "button",
8750
8888
  onClick: () => onSelect(template),
8751
8889
  "data-slot": "template-card",
8752
- className: cn65(
8890
+ className: cn66(
8753
8891
  "w-full text-left rounded-lg border transition-all duration-200",
8754
8892
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8755
8893
  isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50",
@@ -8850,7 +8988,7 @@ function MosaicTemplatePreview({
8850
8988
  agent.accentColor && /* @__PURE__ */ jsx(
8851
8989
  "span",
8852
8990
  {
8853
- className: cn65("h-2 w-2 rounded-full", agent.accentColor),
8991
+ className: cn66("h-2 w-2 rounded-full", agent.accentColor),
8854
8992
  "aria-hidden": "true"
8855
8993
  }
8856
8994
  ),
@@ -8910,7 +9048,7 @@ function MosaicAgentTeamPreview({ agents, label }) {
8910
9048
  agent.accentColor && /* @__PURE__ */ jsx(
8911
9049
  "span",
8912
9050
  {
8913
- className: cn65("h-2.5 w-2.5 rounded-full", agent.accentColor),
9051
+ className: cn66("h-2.5 w-2.5 rounded-full", agent.accentColor),
8914
9052
  "aria-hidden": "true"
8915
9053
  }
8916
9054
  ),
@@ -8934,7 +9072,7 @@ function MosaicQuickStartPanel({
8934
9072
  scratchLabel,
8935
9073
  className
8936
9074
  }) {
8937
- return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-start-panel", className: cn65("flex flex-col gap-6", className), children: [
9075
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-start-panel", className: cn66("flex flex-col gap-6", className), children: [
8938
9076
  scenarios.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
8939
9077
  /* @__PURE__ */ jsx("h3", { className: "mb-3 text-sm font-semibold text-foreground", children: scenariosTitle }),
8940
9078
  /* @__PURE__ */ jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: scenarios.map((scenario) => /* @__PURE__ */ jsxs(
@@ -8942,7 +9080,7 @@ function MosaicQuickStartPanel({
8942
9080
  {
8943
9081
  type: "button",
8944
9082
  onClick: () => onSelectScenario(scenario),
8945
- className: cn65(
9083
+ className: cn66(
8946
9084
  "flex items-start gap-3 rounded-lg border border-border bg-card p-4 text-left",
8947
9085
  "hover:border-primary/50 hover:bg-primary/5",
8948
9086
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -8974,7 +9112,7 @@ function MosaicQuickStartPanel({
8974
9112
  {
8975
9113
  type: "button",
8976
9114
  onClick: () => onSelectPreset(preset),
8977
- className: cn65(
9115
+ className: cn66(
8978
9116
  "flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left",
8979
9117
  "hover:border-primary/50",
8980
9118
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -8988,7 +9126,7 @@ function MosaicQuickStartPanel({
8988
9126
  a.accentColor && /* @__PURE__ */ jsx(
8989
9127
  "span",
8990
9128
  {
8991
- className: cn65("h-2 w-2 rounded-full", a.accentColor),
9129
+ className: cn66("h-2 w-2 rounded-full", a.accentColor),
8992
9130
  "aria-hidden": "true"
8993
9131
  }
8994
9132
  ),
@@ -9006,7 +9144,7 @@ function MosaicQuickStartPanel({
9006
9144
  {
9007
9145
  type: "button",
9008
9146
  onClick: onStartFromScratch,
9009
- className: cn65(
9147
+ className: cn66(
9010
9148
  "inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
9011
9149
  "bg-background px-4 text-sm font-medium text-foreground",
9012
9150
  "hover:bg-accent hover:text-accent-foreground",
@@ -9045,9 +9183,9 @@ function TemplateGalleryContent({
9045
9183
  duplicateLabel,
9046
9184
  isMobile
9047
9185
  }) {
9048
- const [query, setQuery] = React29.useState("");
9049
- const [filterOpen, setFilterOpen] = React29.useState(false);
9050
- const [sidebarCollapsed, setSidebarCollapsed] = React29.useState(false);
9186
+ const [query, setQuery] = React30.useState("");
9187
+ const [filterOpen, setFilterOpen] = React30.useState(false);
9188
+ const [sidebarCollapsed, setSidebarCollapsed] = React30.useState(false);
9051
9189
  const filtered = templates.filter(
9052
9190
  (t) => !query || t.name.toLowerCase().includes(query.toLowerCase()) || (t.description ?? "").toLowerCase().includes(query.toLowerCase())
9053
9191
  );
@@ -9100,7 +9238,7 @@ function TemplateGalleryContent({
9100
9238
  value: query,
9101
9239
  onChange: (e) => setQuery(e.target.value),
9102
9240
  placeholder: searchPlaceholder,
9103
- className: cn65(
9241
+ className: cn66(
9104
9242
  "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"
9105
9243
  )
9106
9244
  }
@@ -9151,7 +9289,7 @@ function TemplateGalleryContent({
9151
9289
  value: query,
9152
9290
  onChange: (e) => setQuery(e.target.value),
9153
9291
  placeholder: searchPlaceholder,
9154
- className: cn65(
9292
+ className: cn66(
9155
9293
  "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"
9156
9294
  )
9157
9295
  }
@@ -9183,7 +9321,7 @@ function MosaicTemplateGallery(props) {
9183
9321
  return /* @__PURE__ */ jsx(TemplateGalleryContent, { ...props, isMobile });
9184
9322
  }
9185
9323
  MosaicTemplateGallery.displayName = "MosaicTemplateGallery";
9186
- function cn66(...classes) {
9324
+ function cn67(...classes) {
9187
9325
  return classes.filter(Boolean).join(" ");
9188
9326
  }
9189
9327
  function PlusIcon5() {
@@ -9285,7 +9423,7 @@ function MosaicModuleForm(props) {
9285
9423
  cancelLabel,
9286
9424
  tagListAddPlaceholder
9287
9425
  } = props;
9288
- const [formData, setFormData] = React29.useState({
9426
+ const [formData, setFormData] = React30.useState({
9289
9427
  name: item?.name ?? "",
9290
9428
  description: item?.description ?? "",
9291
9429
  icon: item?.icon ?? "",
@@ -9296,7 +9434,7 @@ function MosaicModuleForm(props) {
9296
9434
  formFields.map((f) => [f.id, item?.[f.id] ?? (f.type === "tag-list" ? [] : "")])
9297
9435
  )
9298
9436
  });
9299
- const [tagInputs, setTagInputs] = React29.useState({});
9437
+ const [tagInputs, setTagInputs] = React30.useState({});
9300
9438
  const update = (key, value) => {
9301
9439
  setFormData((prev) => ({ ...prev, [key]: value }));
9302
9440
  };
@@ -9334,7 +9472,7 @@ function MosaicModuleForm(props) {
9334
9472
  onChange: (e) => update("name", e.target.value),
9335
9473
  placeholder: namePlaceholder,
9336
9474
  required: true,
9337
- className: cn66(
9475
+ className: cn67(
9338
9476
  "w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
9339
9477
  "text-sm placeholder:text-muted-foreground",
9340
9478
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9352,7 +9490,7 @@ function MosaicModuleForm(props) {
9352
9490
  onChange: (e) => update("description", e.target.value),
9353
9491
  placeholder: descriptionPlaceholder,
9354
9492
  rows: 3,
9355
- className: cn66(
9493
+ className: cn67(
9356
9494
  "w-full rounded-md border border-input bg-background px-3 py-2",
9357
9495
  "text-sm placeholder:text-muted-foreground resize-none",
9358
9496
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9374,7 +9512,7 @@ function MosaicModuleForm(props) {
9374
9512
  value: formData[field.id] ?? "",
9375
9513
  onChange: (e) => update(field.id, e.target.value),
9376
9514
  placeholder: field.placeholder,
9377
- className: cn66(
9515
+ className: cn67(
9378
9516
  "w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
9379
9517
  "text-sm placeholder:text-muted-foreground",
9380
9518
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9389,7 +9527,7 @@ function MosaicModuleForm(props) {
9389
9527
  onChange: (e) => update(field.id, e.target.value),
9390
9528
  placeholder: field.placeholder,
9391
9529
  rows: 3,
9392
- className: cn66(
9530
+ className: cn67(
9393
9531
  "w-full rounded-md border border-input bg-background px-3 py-2",
9394
9532
  "text-sm placeholder:text-muted-foreground resize-none",
9395
9533
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9405,7 +9543,7 @@ function MosaicModuleForm(props) {
9405
9543
  onChange: (e) => update(field.id, e.target.value),
9406
9544
  placeholder: field.placeholder ?? "\u{1F9E0}",
9407
9545
  maxLength: 4,
9408
- className: cn66(
9546
+ className: cn67(
9409
9547
  "w-20 rounded-md border border-input bg-background px-3 py-2 text-2xl",
9410
9548
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
9411
9549
  )
@@ -9426,7 +9564,7 @@ function MosaicModuleForm(props) {
9426
9564
  }
9427
9565
  },
9428
9566
  placeholder: field.placeholder ?? tagListAddPlaceholder,
9429
- className: cn66(
9567
+ className: cn67(
9430
9568
  "flex-1 rounded-md border border-input bg-background px-3 py-2 min-h-[36px]",
9431
9569
  "text-sm placeholder:text-muted-foreground",
9432
9570
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9497,9 +9635,9 @@ function ModuleItemCard({
9497
9635
  editItemLabel,
9498
9636
  deleteItemLabel
9499
9637
  }) {
9500
- const [menuOpen, setMenuOpen] = React29.useState(false);
9501
- const menuRef = React29.useRef(null);
9502
- React29.useEffect(() => {
9638
+ const [menuOpen, setMenuOpen] = React30.useState(false);
9639
+ const menuRef = React30.useRef(null);
9640
+ React30.useEffect(() => {
9503
9641
  if (!menuOpen) return;
9504
9642
  const h = (e) => {
9505
9643
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -9600,11 +9738,11 @@ function LibraryContent({
9600
9738
  editModalTitle,
9601
9739
  tagListAddPlaceholder
9602
9740
  }) {
9603
- const [query, setQuery] = React29.useState("");
9604
- const [activeTab, setActiveTab] = React29.useState(tabs?.[0]?.id ?? "all");
9605
- const [editorOpen, setEditorOpen] = React29.useState(false);
9606
- const [editingItem, setEditingItem] = React29.useState();
9607
- const [editorMode, setEditorMode] = React29.useState("create");
9741
+ const [query, setQuery] = React30.useState("");
9742
+ const [activeTab, setActiveTab] = React30.useState(tabs?.[0]?.id ?? "all");
9743
+ const [editorOpen, setEditorOpen] = React30.useState(false);
9744
+ const [editingItem, setEditingItem] = React30.useState();
9745
+ const [editorMode, setEditorMode] = React30.useState("create");
9608
9746
  const openCreate = () => {
9609
9747
  setEditingItem(void 0);
9610
9748
  setEditorMode("create");
@@ -9638,7 +9776,7 @@ function LibraryContent({
9638
9776
  {
9639
9777
  type: "button",
9640
9778
  onClick: openCreate,
9641
- className: cn66(
9779
+ className: cn67(
9642
9780
  "inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground",
9643
9781
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
9644
9782
  ),
@@ -9658,7 +9796,7 @@ function LibraryContent({
9658
9796
  value: query,
9659
9797
  onChange: (e) => setQuery(e.target.value),
9660
9798
  placeholder: searchPlaceholder,
9661
- className: cn66(
9799
+ className: cn67(
9662
9800
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
9663
9801
  "text-sm placeholder:text-muted-foreground",
9664
9802
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9671,7 +9809,7 @@ function LibraryContent({
9671
9809
  {
9672
9810
  type: "button",
9673
9811
  onClick: () => setActiveTab(tab.id),
9674
- className: cn66(
9812
+ className: cn67(
9675
9813
  "rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
9676
9814
  activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
9677
9815
  ),
@@ -9723,7 +9861,7 @@ function MosaicModuleLibrary(props) {
9723
9861
  return /* @__PURE__ */ jsx(LibraryContent, { ...props });
9724
9862
  }
9725
9863
  MosaicModuleLibrary.displayName = "MosaicModuleLibrary";
9726
- function cn67(...classes) {
9864
+ function cn68(...classes) {
9727
9865
  return classes.filter(Boolean).join(" ");
9728
9866
  }
9729
9867
  var roleConfig = {
@@ -9750,7 +9888,7 @@ function MosaicOrgRoleBadge({ role, className }) {
9750
9888
  {
9751
9889
  "data-slot": "org-role-badge",
9752
9890
  title: config.description,
9753
- className: cn67(
9891
+ className: cn68(
9754
9892
  "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
9755
9893
  config.className,
9756
9894
  className
@@ -9767,13 +9905,13 @@ function MosaicMultiOrgIndicator({
9767
9905
  className
9768
9906
  }) {
9769
9907
  if (orgCount <= 1) return null;
9770
- return /* @__PURE__ */ jsxs("div", { "data-slot": "multi-org-indicator", className: cn67("flex items-center gap-2", className), children: [
9908
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "multi-org-indicator", className: cn68("flex items-center gap-2", className), children: [
9771
9909
  onSwitchOrg ? /* @__PURE__ */ jsxs(
9772
9910
  "button",
9773
9911
  {
9774
9912
  type: "button",
9775
9913
  onClick: onSwitchOrg,
9776
- className: cn67(
9914
+ className: cn68(
9777
9915
  "inline-flex items-center gap-1.5 rounded-full bg-secondary px-2.5 py-1 text-xs font-medium text-secondary-foreground",
9778
9916
  "hover:bg-secondary/80",
9779
9917
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9826,10 +9964,10 @@ function MosaicCreateOrgDialog({
9826
9964
  creatingLabel,
9827
9965
  createLabel
9828
9966
  }) {
9829
- const [name, setName] = React29.useState("");
9830
- const [slug, setSlug] = React29.useState("");
9831
- const [description, setDescription] = React29.useState("");
9832
- const [errors, setErrors] = React29.useState({});
9967
+ const [name, setName] = React30.useState("");
9968
+ const [slug, setSlug] = React30.useState("");
9969
+ const [description, setDescription] = React30.useState("");
9970
+ const [errors, setErrors] = React30.useState({});
9833
9971
  const validate = () => {
9834
9972
  const errs = {};
9835
9973
  if (!name.trim()) errs.name = "Name is required";
@@ -9853,7 +9991,7 @@ function MosaicCreateOrgDialog({
9853
9991
  setErrors({});
9854
9992
  onOpenChange(false);
9855
9993
  };
9856
- React29.useEffect(() => {
9994
+ React30.useEffect(() => {
9857
9995
  if (!name) {
9858
9996
  setSlug("");
9859
9997
  return;
@@ -9887,7 +10025,7 @@ function MosaicCreateOrgDialog({
9887
10025
  onChange: (e) => setName(e.target.value),
9888
10026
  placeholder: orgNamePlaceholder,
9889
10027
  required: true,
9890
- className: cn67(
10028
+ className: cn68(
9891
10029
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
9892
10030
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
9893
10031
  errors.name ? "border-destructive" : "border-input"
@@ -9907,7 +10045,7 @@ function MosaicCreateOrgDialog({
9907
10045
  onChange: (e) => setSlug(e.target.value),
9908
10046
  placeholder: "acme-inc",
9909
10047
  required: true,
9910
- className: cn67(
10048
+ className: cn68(
9911
10049
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
9912
10050
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
9913
10051
  errors.slug ? "border-destructive" : "border-input"
@@ -9976,9 +10114,9 @@ function MosaicInviteMemberDialog({
9976
10114
  sendingLabel,
9977
10115
  sendInvitationLabel
9978
10116
  }) {
9979
- const [email, setEmail] = React29.useState("");
9980
- const [role, setRole] = React29.useState("member");
9981
- const [errors, setErrors] = React29.useState({});
10117
+ const [email, setEmail] = React30.useState("");
10118
+ const [role, setRole] = React30.useState("member");
10119
+ const [errors, setErrors] = React30.useState({});
9982
10120
  const validate = () => {
9983
10121
  const errs = {};
9984
10122
  if (!email.trim()) errs.email = "Email is required";
@@ -10020,7 +10158,7 @@ function MosaicInviteMemberDialog({
10020
10158
  onChange: (e) => setEmail(e.target.value),
10021
10159
  placeholder: emailPlaceholder,
10022
10160
  required: true,
10023
- className: cn67(
10161
+ className: cn68(
10024
10162
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
10025
10163
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
10026
10164
  errors.email ? "border-destructive" : "border-input"
@@ -10079,10 +10217,10 @@ function MemberRow({
10079
10217
  memberActionsAriaLabel,
10080
10218
  removeMemberLabel
10081
10219
  }) {
10082
- const [menuOpen, setMenuOpen] = React29.useState(false);
10083
- const menuRef = React29.useRef(null);
10220
+ const [menuOpen, setMenuOpen] = React30.useState(false);
10221
+ const menuRef = React30.useRef(null);
10084
10222
  const isSelf = member.id === currentUserId;
10085
- React29.useEffect(() => {
10223
+ React30.useEffect(() => {
10086
10224
  if (!menuOpen) return;
10087
10225
  const h = (e) => {
10088
10226
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -10203,11 +10341,11 @@ function MosaicMemberList({
10203
10341
  inviteLabel,
10204
10342
  className
10205
10343
  }) {
10206
- const [query, setQuery] = React29.useState("");
10344
+ const [query, setQuery] = React30.useState("");
10207
10345
  const filtered = members.filter(
10208
10346
  (m) => !query || m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
10209
10347
  );
10210
- return /* @__PURE__ */ jsxs("div", { "data-slot": "member-list", className: cn67("flex flex-col gap-4", className), children: [
10348
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "member-list", className: cn68("flex flex-col gap-4", className), children: [
10211
10349
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
10212
10350
  /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
10213
10351
  /* @__PURE__ */ jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxs(
@@ -10301,9 +10439,9 @@ function MosaicOrgPanel({
10301
10439
  className
10302
10440
  }) {
10303
10441
  const { isMobile } = useDevice();
10304
- const [activeTab, setActiveTab] = React29.useState(defaultTab ?? tabs[0]?.id ?? "");
10442
+ const [activeTab, setActiveTab] = React30.useState(defaultTab ?? tabs[0]?.id ?? "");
10305
10443
  const activeContent = tabs.find((t) => t.id === activeTab)?.content;
10306
- return /* @__PURE__ */ jsxs("div", { "data-slot": "org-panel", className: cn67("flex h-full flex-col", className), children: [
10444
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "org-panel", className: cn68("flex h-full flex-col", className), children: [
10307
10445
  /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-4 py-4 md:px-6", children: [
10308
10446
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
10309
10447
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
@@ -10325,12 +10463,12 @@ function MosaicOrgPanel({
10325
10463
  ] }),
10326
10464
  headerActions
10327
10465
  ] }),
10328
- tabs.length > 0 && /* @__PURE__ */ jsx("div", { className: cn67("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsx(
10466
+ tabs.length > 0 && /* @__PURE__ */ jsx("div", { className: cn68("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsx(
10329
10467
  "button",
10330
10468
  {
10331
10469
  type: "button",
10332
10470
  onClick: () => setActiveTab(tab.id),
10333
- className: cn67(
10471
+ className: cn68(
10334
10472
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
10335
10473
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
10336
10474
  activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
@@ -10344,7 +10482,7 @@ function MosaicOrgPanel({
10344
10482
  ] });
10345
10483
  }
10346
10484
  MosaicOrgPanel.displayName = "MosaicOrgPanel";
10347
- function cn68(...classes) {
10485
+ function cn69(...classes) {
10348
10486
  return classes.filter(Boolean).join(" ");
10349
10487
  }
10350
10488
  var ANIM_ID8 = "mosaic-dashboard-content-kf";
@@ -10373,7 +10511,7 @@ function MosaicDashboardContent({
10373
10511
  className
10374
10512
  }) {
10375
10513
  const { isMobile } = useDevice();
10376
- React29.useEffect(() => {
10514
+ React30.useEffect(() => {
10377
10515
  injectStyles8();
10378
10516
  }, []);
10379
10517
  const activeView = views.find((v) => v.id === currentView);
@@ -10381,7 +10519,7 @@ function MosaicDashboardContent({
10381
10519
  "div",
10382
10520
  {
10383
10521
  "data-slot": "dashboard-content",
10384
- className: cn68("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
10522
+ className: cn69("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
10385
10523
  children: activeView ? /* @__PURE__ */ jsx("div", { className: "mosaic-content-view space-y-6", children: activeView.content }, currentView) : /* @__PURE__ */ jsxs("p", { className: "py-12 text-center text-sm text-muted-foreground", children: [
10386
10524
  "View not found: ",
10387
10525
  currentView
@@ -10390,7 +10528,7 @@ function MosaicDashboardContent({
10390
10528
  );
10391
10529
  }
10392
10530
  MosaicDashboardContent.displayName = "MosaicDashboardContent";
10393
- function cn69(...classes) {
10531
+ function cn70(...classes) {
10394
10532
  return classes.filter(Boolean).join(" ");
10395
10533
  }
10396
10534
  var ANIM_ID9 = "mosaic-dashboard-header2-kf";
@@ -10490,8 +10628,8 @@ function MosaicDashboardHeader({
10490
10628
  className
10491
10629
  }) {
10492
10630
  const { isMobile } = useDevice();
10493
- const [searchQuery, setSearchQuery] = React29.useState("");
10494
- React29.useEffect(() => {
10631
+ const [searchQuery, setSearchQuery] = React30.useState("");
10632
+ React30.useEffect(() => {
10495
10633
  injectStyles9();
10496
10634
  }, []);
10497
10635
  const handleSearch = (e) => {
@@ -10502,16 +10640,16 @@ function MosaicDashboardHeader({
10502
10640
  "header",
10503
10641
  {
10504
10642
  "data-slot": "dashboard-header",
10505
- className: cn69(
10643
+ className: cn70(
10506
10644
  "mosaic-dashboard-header2",
10507
10645
  "sticky top-0 z-40 border-b border-border/50 bg-background/80 backdrop-blur-sm",
10508
10646
  className
10509
10647
  ),
10510
- children: /* @__PURE__ */ jsx("div", { className: cn69(isMobile ? "px-4 py-3" : "container mx-auto px-4 py-4"), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
10648
+ children: /* @__PURE__ */ jsx("div", { className: cn70(isMobile ? "px-4 py-3" : "container mx-auto px-4 py-4"), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
10511
10649
  /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2 md:gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
10512
10650
  logoSlot ?? /* @__PURE__ */ jsx(SparklesIcon4, {}),
10513
10651
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
10514
- /* @__PURE__ */ jsx("h1", { className: cn69("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
10652
+ /* @__PURE__ */ jsx("h1", { className: cn70("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
10515
10653
  subtitle && !isMobile && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground truncate", children: subtitle })
10516
10654
  ] })
10517
10655
  ] }) }),
@@ -10524,7 +10662,7 @@ function MosaicDashboardHeader({
10524
10662
  value: searchQuery,
10525
10663
  onChange: handleSearch,
10526
10664
  placeholder: searchPlaceholder,
10527
- className: cn69(
10665
+ className: cn70(
10528
10666
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
10529
10667
  "text-sm placeholder:text-muted-foreground",
10530
10668
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -10564,7 +10702,7 @@ function MosaicDashboardHeader({
10564
10702
  );
10565
10703
  }
10566
10704
  MosaicDashboardHeader.displayName = "MosaicDashboardHeader";
10567
- function cn70(...classes) {
10705
+ function cn71(...classes) {
10568
10706
  return classes.filter(Boolean).join(" ");
10569
10707
  }
10570
10708
  function ChevronDownIcon4() {
@@ -10634,10 +10772,10 @@ function MosaicOrgSwitcher({
10634
10772
  noOrgSelectedLabel,
10635
10773
  className
10636
10774
  }) {
10637
- const [open, setOpen] = React29.useState(false);
10638
- const ref = React29.useRef(null);
10775
+ const [open, setOpen] = React30.useState(false);
10776
+ const ref = React30.useRef(null);
10639
10777
  const currentOrg = organizations.find((o) => o.id === currentOrgId) ?? organizations[0];
10640
- React29.useEffect(() => {
10778
+ React30.useEffect(() => {
10641
10779
  if (!open) return;
10642
10780
  const h = (e) => {
10643
10781
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -10647,13 +10785,13 @@ function MosaicOrgSwitcher({
10647
10785
  }, [open]);
10648
10786
  if (!currentOrg && organizations.length === 0 && !onCreateOrg) return null;
10649
10787
  const initials = currentOrg?.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() ?? "?";
10650
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "org-switcher", className: cn70("relative", className), children: [
10788
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "org-switcher", className: cn71("relative", className), children: [
10651
10789
  /* @__PURE__ */ jsxs(
10652
10790
  "button",
10653
10791
  {
10654
10792
  type: "button",
10655
10793
  onClick: () => setOpen((v) => !v),
10656
- className: cn70(
10794
+ className: cn71(
10657
10795
  "inline-flex items-center gap-2 rounded-md border border-border bg-background px-3 py-1.5",
10658
10796
  "text-sm font-medium text-foreground",
10659
10797
  "hover:bg-accent hover:text-accent-foreground",
@@ -10680,7 +10818,7 @@ function MosaicOrgSwitcher({
10680
10818
  {
10681
10819
  role: "menu",
10682
10820
  "aria-label": triggerAriaLabel,
10683
- className: cn70(
10821
+ className: cn71(
10684
10822
  "absolute left-0 top-full z-50 mt-1 min-w-[200px] rounded-md border border-border",
10685
10823
  "bg-popover py-1 shadow-md"
10686
10824
  ),
@@ -10695,7 +10833,7 @@ function MosaicOrgSwitcher({
10695
10833
  onSelectOrg?.(org.id);
10696
10834
  setOpen(false);
10697
10835
  },
10698
- className: cn70(
10836
+ className: cn71(
10699
10837
  "flex w-full items-center gap-2.5 px-3 py-2 text-sm text-foreground",
10700
10838
  "hover:bg-accent hover:text-accent-foreground",
10701
10839
  org.id === currentOrgId && "bg-primary/10 text-primary"
@@ -10732,7 +10870,7 @@ function MosaicOrgSwitcher({
10732
10870
  ] });
10733
10871
  }
10734
10872
  MosaicOrgSwitcher.displayName = "MosaicOrgSwitcher";
10735
- function cn71(...classes) {
10873
+ function cn72(...classes) {
10736
10874
  return classes.filter(Boolean).join(" ");
10737
10875
  }
10738
10876
  function PlusIcon7() {
@@ -10767,9 +10905,9 @@ function MosaicQuickActionsMenu({
10767
10905
  className
10768
10906
  }) {
10769
10907
  const { isMobile } = useDevice();
10770
- const [open, setOpen] = React29.useState(false);
10771
- const ref = React29.useRef(null);
10772
- React29.useEffect(() => {
10908
+ const [open, setOpen] = React30.useState(false);
10909
+ const ref = React30.useRef(null);
10910
+ React30.useEffect(() => {
10773
10911
  if (!open) return;
10774
10912
  const h = (e) => {
10775
10913
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -10777,19 +10915,19 @@ function MosaicQuickActionsMenu({
10777
10915
  document.addEventListener("mousedown", h);
10778
10916
  return () => document.removeEventListener("mousedown", h);
10779
10917
  }, [open]);
10780
- const itemClass = cn71(
10918
+ const itemClass = cn72(
10781
10919
  "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
10782
10920
  "hover:bg-accent hover:text-accent-foreground",
10783
10921
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
10784
10922
  "min-h-[44px]"
10785
10923
  );
10786
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn71("relative", className), children: [
10924
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn72("relative", className), children: [
10787
10925
  /* @__PURE__ */ jsxs(
10788
10926
  "button",
10789
10927
  {
10790
10928
  type: "button",
10791
10929
  onClick: () => setOpen((v) => !v),
10792
- className: cn71(
10930
+ className: cn72(
10793
10931
  "inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
10794
10932
  "min-h-[44px] min-w-[44px] px-3 py-2 text-sm font-medium text-foreground",
10795
10933
  "hover:bg-accent hover:text-accent-foreground",
@@ -10800,7 +10938,7 @@ function MosaicQuickActionsMenu({
10800
10938
  "aria-label": label,
10801
10939
  children: [
10802
10940
  triggerIcon ?? /* @__PURE__ */ jsx(PlusIcon7, {}),
10803
- /* @__PURE__ */ jsx("span", { className: cn71("hidden md:inline"), children: label })
10941
+ /* @__PURE__ */ jsx("span", { className: cn72("hidden md:inline"), children: label })
10804
10942
  ]
10805
10943
  }
10806
10944
  ),
@@ -10809,14 +10947,14 @@ function MosaicQuickActionsMenu({
10809
10947
  {
10810
10948
  role: "menu",
10811
10949
  "aria-label": menuTitle,
10812
- className: cn71(
10950
+ className: cn72(
10813
10951
  "absolute right-0 top-full z-50 mt-1 rounded-md border border-border bg-popover py-1 shadow-md",
10814
10952
  isMobile ? "w-[min(90vw,280px)]" : "w-56"
10815
10953
  ),
10816
10954
  children: [
10817
10955
  menuTitle && /* @__PURE__ */ jsx("div", { className: "px-3 py-1.5", children: /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide", children: menuTitle }) }),
10818
- /* @__PURE__ */ jsx("div", { className: cn71(menuTitle && "border-t border-border") }),
10819
- actions.map((action) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
10956
+ /* @__PURE__ */ jsx("div", { className: cn72(menuTitle && "border-t border-border") }),
10957
+ actions.map((action) => /* @__PURE__ */ jsxs(React30.Fragment, { children: [
10820
10958
  action.separator && /* @__PURE__ */ jsx("div", { className: "my-1 border-t border-border" }),
10821
10959
  action.href && renderLink ? renderLink(
10822
10960
  action,
@@ -11120,7 +11258,7 @@ function MosaicOrgProfilePage({
11120
11258
  );
11121
11259
  }
11122
11260
  MosaicOrgProfilePage.displayName = "MosaicOrgProfilePage";
11123
- function cn72(...classes) {
11261
+ function cn73(...classes) {
11124
11262
  return classes.filter(Boolean).join(" ");
11125
11263
  }
11126
11264
  function defaultCompare(a, b) {
@@ -11183,7 +11321,7 @@ function MosaicDataTable({
11183
11321
  {
11184
11322
  ref,
11185
11323
  "data-slot": "data-table",
11186
- className: cn72("w-full border-collapse text-sm", className),
11324
+ className: cn73("w-full border-collapse text-sm", className),
11187
11325
  children: [
11188
11326
  /* @__PURE__ */ jsx("thead", { "data-slot": "data-table-header", children: /* @__PURE__ */ jsx("tr", { "data-slot": "data-table-header-row", className: "border-b border-border bg-muted", children: columns.map((col, colIndex) => {
11189
11327
  const isSortable = masterSortable && col.sortable;
@@ -11201,7 +11339,7 @@ function MosaicDataTable({
11201
11339
  handleHeaderClick(col);
11202
11340
  }
11203
11341
  } : void 0,
11204
- className: cn72(
11342
+ className: cn73(
11205
11343
  "px-4 py-3 font-medium text-muted-foreground",
11206
11344
  alignClass(col.align),
11207
11345
  col.className,
@@ -11237,7 +11375,7 @@ function MosaicDataTable({
11237
11375
  "td",
11238
11376
  {
11239
11377
  "data-slot": "data-table-td",
11240
- className: cn72(
11378
+ className: cn73(
11241
11379
  "px-4 py-3 text-foreground",
11242
11380
  alignClass(col.align),
11243
11381
  col.className
@@ -11376,7 +11514,7 @@ var stepSegmentVariants = cva(["h-1.5 flex-1 min-w-2 rounded-full transition-col
11376
11514
  filled: false
11377
11515
  }
11378
11516
  });
11379
- function cn73(...classes) {
11517
+ function cn74(...classes) {
11380
11518
  return classes.filter(Boolean).join(" ");
11381
11519
  }
11382
11520
  function resolveStatus(step, index, currentIndex) {
@@ -11417,7 +11555,7 @@ function MosaicStepPipelineSegments({
11417
11555
  "aria-valuemax": total,
11418
11556
  "aria-valuenow": current,
11419
11557
  "aria-valuetext": progressLabel ? progressLabel(current, total) : void 0,
11420
- className: cn73(stepSegmentBarVariants(), className),
11558
+ className: cn74(stepSegmentBarVariants(), className),
11421
11559
  children: steps.map((step, index) => {
11422
11560
  const status = resolveStatus(step, index, currentIndex);
11423
11561
  const filled = status !== "upcoming";
@@ -11429,7 +11567,7 @@ function MosaicStepPipelineSegments({
11429
11567
  "data-status": status,
11430
11568
  "data-filled": filled,
11431
11569
  "aria-hidden": "true",
11432
- className: cn73(stepSegmentVariants({ filled }))
11570
+ className: cn74(stepSegmentVariants({ filled }))
11433
11571
  },
11434
11572
  key
11435
11573
  );
@@ -11450,7 +11588,7 @@ function MosaicStepPipelineDots({
11450
11588
  {
11451
11589
  ref,
11452
11590
  "data-slot": "step-pipeline",
11453
- className: cn73(stepPipelineVariants({ orientation }), className),
11591
+ className: cn74(stepPipelineVariants({ orientation }), className),
11454
11592
  children: steps.map((step, index) => {
11455
11593
  const status = resolveStatus(step, index, currentIndex);
11456
11594
  const isCurrent = status === "current";
@@ -11462,7 +11600,7 @@ function MosaicStepPipelineDots({
11462
11600
  "data-slot": "step",
11463
11601
  "data-status": status,
11464
11602
  "aria-current": isCurrent ? "step" : void 0,
11465
- className: cn73(
11603
+ className: cn74(
11466
11604
  "flex shrink-0",
11467
11605
  orientation === "horizontal" ? "flex-col items-center gap-2" : "flex-row items-start gap-3",
11468
11606
  orientation === "horizontal" && !isLast && "flex-1"
@@ -11473,14 +11611,14 @@ function MosaicStepPipelineDots({
11473
11611
  "div",
11474
11612
  {
11475
11613
  "data-slot": "step-connector",
11476
- className: cn73(stepConnectorVariants({ status, orientation }))
11614
+ className: cn74(stepConnectorVariants({ status, orientation }))
11477
11615
  }
11478
11616
  ),
11479
11617
  /* @__PURE__ */ jsx(
11480
11618
  "div",
11481
11619
  {
11482
11620
  "data-slot": "step-indicator",
11483
- className: cn73(stepIndicatorVariants({ status, orientation })),
11621
+ className: cn74(stepIndicatorVariants({ status, orientation })),
11484
11622
  "aria-hidden": "true",
11485
11623
  children: status === "done" ? "\u2713" : /* @__PURE__ */ jsx("span", { children: index + 1 })
11486
11624
  }
@@ -11489,7 +11627,7 @@ function MosaicStepPipelineDots({
11489
11627
  "div",
11490
11628
  {
11491
11629
  "data-slot": "step-connector",
11492
- className: cn73(
11630
+ className: cn74(
11493
11631
  stepConnectorVariants({
11494
11632
  // connector after current step is still upcoming
11495
11633
  status: status === "done" ? "done" : "upcoming",
@@ -11500,12 +11638,12 @@ function MosaicStepPipelineDots({
11500
11638
  )
11501
11639
  ] }),
11502
11640
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5 text-center px-1", children: [
11503
- /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn73(stepLabelVariants({ status })), children: step.label }),
11641
+ /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn74(stepLabelVariants({ status })), children: step.label }),
11504
11642
  step.description !== void 0 && /* @__PURE__ */ jsx(
11505
11643
  "span",
11506
11644
  {
11507
11645
  "data-slot": "step-description",
11508
- className: cn73(stepDescriptionVariants({ status })),
11646
+ className: cn74(stepDescriptionVariants({ status })),
11509
11647
  children: step.description
11510
11648
  }
11511
11649
  )
@@ -11516,7 +11654,7 @@ function MosaicStepPipelineDots({
11516
11654
  "div",
11517
11655
  {
11518
11656
  "data-slot": "step-indicator",
11519
- className: cn73(stepIndicatorVariants({ status, orientation })),
11657
+ className: cn74(stepIndicatorVariants({ status, orientation })),
11520
11658
  "aria-hidden": "true",
11521
11659
  children: status === "done" ? "\u2713" : /* @__PURE__ */ jsx("span", { children: index + 1 })
11522
11660
  }
@@ -11525,7 +11663,7 @@ function MosaicStepPipelineDots({
11525
11663
  "div",
11526
11664
  {
11527
11665
  "data-slot": "step-connector",
11528
- className: cn73(
11666
+ className: cn74(
11529
11667
  stepConnectorVariants({
11530
11668
  status: status === "done" ? "done" : "upcoming",
11531
11669
  orientation
@@ -11535,12 +11673,12 @@ function MosaicStepPipelineDots({
11535
11673
  )
11536
11674
  ] }),
11537
11675
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 pt-1 pb-4", children: [
11538
- /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn73(stepLabelVariants({ status })), children: step.label }),
11676
+ /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn74(stepLabelVariants({ status })), children: step.label }),
11539
11677
  step.description !== void 0 && /* @__PURE__ */ jsx(
11540
11678
  "span",
11541
11679
  {
11542
11680
  "data-slot": "step-description",
11543
- className: cn73(stepDescriptionVariants({ status })),
11681
+ className: cn74(stepDescriptionVariants({ status })),
11544
11682
  children: step.description
11545
11683
  }
11546
11684
  )
@@ -11554,7 +11692,7 @@ function MosaicStepPipelineDots({
11554
11692
  );
11555
11693
  }
11556
11694
  MosaicStepPipelineDots.displayName = "MosaicStepPipelineDots";
11557
- function cn74(...classes) {
11695
+ function cn75(...classes) {
11558
11696
  return classes.filter(Boolean).join(" ");
11559
11697
  }
11560
11698
  function MosaicKanbanBoard({ children, className, ref, ...props }) {
@@ -11563,7 +11701,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
11563
11701
  {
11564
11702
  ref,
11565
11703
  "data-slot": "kanban-board",
11566
- className: cn74(
11704
+ className: cn75(
11567
11705
  "flex gap-4 overflow-x-auto pb-4",
11568
11706
  "min-h-0",
11569
11707
  // Smooth momentum scrolling on iOS
@@ -11576,7 +11714,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
11576
11714
  );
11577
11715
  }
11578
11716
  MosaicKanbanBoard.displayName = "MosaicKanbanBoard";
11579
- function cn75(...classes) {
11717
+ function cn76(...classes) {
11580
11718
  return classes.filter(Boolean).join(" ");
11581
11719
  }
11582
11720
  function MosaicKanbanColumn({
@@ -11594,7 +11732,7 @@ function MosaicKanbanColumn({
11594
11732
  {
11595
11733
  ref,
11596
11734
  "data-slot": "kanban-column",
11597
- className: cn75(
11735
+ className: cn76(
11598
11736
  // Fixed column width, never shrink so board stays scrollable
11599
11737
  "flex flex-col w-72 shrink-0",
11600
11738
  // Surface
@@ -11615,7 +11753,7 @@ function MosaicKanbanColumn({
11615
11753
  {
11616
11754
  "data-slot": "kanban-column-count",
11617
11755
  "aria-label": countLabel(count),
11618
- className: cn75(
11756
+ className: cn76(
11619
11757
  "inline-flex items-center justify-center",
11620
11758
  "min-w-[1.25rem] h-5 px-1.5 rounded-full",
11621
11759
  "bg-muted text-muted-foreground",
@@ -11658,12 +11796,12 @@ function MosaicKanbanColumn({
11658
11796
  );
11659
11797
  }
11660
11798
  MosaicKanbanColumn.displayName = "MosaicKanbanColumn";
11661
- var WorkspaceCtx = React29.createContext({
11799
+ var WorkspaceCtx = React30.createContext({
11662
11800
  workspaceId: null,
11663
11801
  isLoading: false
11664
11802
  });
11665
11803
  function useMosaicWorkspace() {
11666
- return React29.useContext(WorkspaceCtx);
11804
+ return React30.useContext(WorkspaceCtx);
11667
11805
  }
11668
11806
  var defaultClerkAppearance = {
11669
11807
  variables: {
@@ -11676,9 +11814,9 @@ var defaultClerkAppearance = {
11676
11814
  }
11677
11815
  };
11678
11816
  function WorkspaceResolver({ resolveWorkspaceId, initialOrgId, children }) {
11679
- const [workspaceId, setWorkspaceId] = React29.useState(null);
11680
- const [isLoading, setIsLoading] = React29.useState(false);
11681
- React29.useEffect(() => {
11817
+ const [workspaceId, setWorkspaceId] = React30.useState(null);
11818
+ const [isLoading, setIsLoading] = React30.useState(false);
11819
+ React30.useEffect(() => {
11682
11820
  if (!resolveWorkspaceId) {
11683
11821
  setWorkspaceId(initialOrgId ?? null);
11684
11822
  return;
@@ -11837,7 +11975,7 @@ var documentUploadProgressFillVariants = cva(
11837
11975
  defaultVariants: {}
11838
11976
  }
11839
11977
  );
11840
- function cn76(...classes) {
11978
+ function cn77(...classes) {
11841
11979
  return classes.filter(Boolean).join(" ");
11842
11980
  }
11843
11981
  function MosaicDocumentUpload({
@@ -11878,7 +12016,7 @@ function MosaicDocumentUpload({
11878
12016
  if (selected.length > 0) onFilesSelected(selected);
11879
12017
  event.target.value = "";
11880
12018
  }
11881
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "document-upload", className: cn76("flex flex-col gap-4", className), children: [
12019
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "document-upload", className: cn77("flex flex-col gap-4", className), children: [
11882
12020
  /* @__PURE__ */ jsxs(
11883
12021
  "div",
11884
12022
  {
@@ -11943,7 +12081,7 @@ function MosaicDocumentUpload({
11943
12081
  "aria-valuemin": 0,
11944
12082
  "aria-valuemax": 100,
11945
12083
  "aria-valuenow": file.progress ?? 0,
11946
- className: cn76(documentUploadProgressTrackVariants(), "mt-2"),
12084
+ className: cn77(documentUploadProgressTrackVariants(), "mt-2"),
11947
12085
  children: /* @__PURE__ */ jsx(
11948
12086
  "div",
11949
12087
  {
@@ -12020,7 +12158,7 @@ var urlScraperCardVariants = cva(["flex flex-col gap-2 rounded-lg border p-4"],
12020
12158
  tone: "neutral"
12021
12159
  }
12022
12160
  });
12023
- function cn77(...classes) {
12161
+ function cn78(...classes) {
12024
12162
  return classes.filter(Boolean).join(" ");
12025
12163
  }
12026
12164
  function isSyntacticallyValidUrl(candidate) {
@@ -12059,7 +12197,7 @@ function MosaicUrlScraper(props) {
12059
12197
  setIsLocallyInvalid(false);
12060
12198
  onUrlChange(event.target.value);
12061
12199
  }
12062
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "url-scraper", className: cn77("flex flex-col gap-4", className), children: [
12200
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "url-scraper", className: cn78("flex flex-col gap-4", className), children: [
12063
12201
  /* @__PURE__ */ jsxs(
12064
12202
  "form",
12065
12203
  {
@@ -12195,7 +12333,7 @@ var chatThreadScrollButtonVariants = cva([
12195
12333
  "items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm",
12196
12334
  "transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
12197
12335
  ]);
12198
- function cn78(...classes) {
12336
+ function cn79(...classes) {
12199
12337
  return classes.filter(Boolean).join(" ");
12200
12338
  }
12201
12339
  var BOTTOM_THRESHOLD_PX = 24;
@@ -12279,7 +12417,7 @@ function MosaicChatThread({
12279
12417
  role: "log",
12280
12418
  onScroll: handleScroll,
12281
12419
  onKeyDown: handleKeyDown,
12282
- className: cn78(chatThreadRootVariants(), className),
12420
+ className: cn79(chatThreadRootVariants(), className),
12283
12421
  children: [
12284
12422
  /* @__PURE__ */ jsx("div", { "data-slot": "chat-thread-content", className: chatThreadContentVariants(), children }),
12285
12423
  !isAtBottom && /* @__PURE__ */ jsx(
@@ -12320,7 +12458,7 @@ var chatComposerActionButtonVariants = cva(
12320
12458
  }
12321
12459
  }
12322
12460
  );
12323
- function cn79(...classes) {
12461
+ function cn80(...classes) {
12324
12462
  return classes.filter(Boolean).join(" ");
12325
12463
  }
12326
12464
  function MosaicChatComposer(props) {
@@ -12375,7 +12513,7 @@ function MosaicChatComposer(props) {
12375
12513
  {
12376
12514
  ref,
12377
12515
  "data-slot": "chat-composer",
12378
- className: cn79(chatComposerRootVariants(), className),
12516
+ className: cn80(chatComposerRootVariants(), className),
12379
12517
  onSubmit: handleSubmit,
12380
12518
  children: [
12381
12519
  /* @__PURE__ */ jsx(
@@ -12491,7 +12629,7 @@ var markdownTableCellVariants = cva(["border border-border px-3 py-1.5"], {
12491
12629
  align: "left"
12492
12630
  }
12493
12631
  });
12494
- function cn80(...classes) {
12632
+ function cn81(...classes) {
12495
12633
  return classes.filter(Boolean).join(" ");
12496
12634
  }
12497
12635
  function sanitizeHref(rawHref) {
@@ -12686,7 +12824,7 @@ function parseBlocks(content) {
12686
12824
  function MosaicMarkdown({ content, renderCodeBlock, className, ref }) {
12687
12825
  const blocks = parseBlocks(content);
12688
12826
  const ids = makeIdSource();
12689
- return /* @__PURE__ */ jsx("div", { ref, "data-slot": "markdown", className: cn80(markdownRootVariants(), className), children: blocks.map((block) => {
12827
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "markdown", className: cn81(markdownRootVariants(), className), children: blocks.map((block) => {
12690
12828
  if (block.kind === "heading") {
12691
12829
  const HeadingTag = `h${block.level}`;
12692
12830
  return /* @__PURE__ */ jsx(HeadingTag, { className: markdownHeadingVariants({ level: block.level }), children: parseInline(block.text, ids) }, block.id);
@@ -12764,7 +12902,7 @@ var chatMessageToolStatusVariants = cva(["text-xs font-medium"], {
12764
12902
  status: "running"
12765
12903
  }
12766
12904
  });
12767
- function cn81(...classes) {
12905
+ function cn82(...classes) {
12768
12906
  return classes.filter(Boolean).join(" ");
12769
12907
  }
12770
12908
  function partKey(part, index) {
@@ -12930,7 +13068,7 @@ function MosaicChatMessage({
12930
13068
  ref,
12931
13069
  "data-slot": "chat-message",
12932
13070
  "data-role": messageRole,
12933
- className: cn81(chatMessageContainerVariants({ align: isUser ? "end" : "start" }), className),
13071
+ className: cn82(chatMessageContainerVariants({ align: isUser ? "end" : "start" }), className),
12934
13072
  children: /* @__PURE__ */ jsx("div", { className: chatMessageBubbleVariants({ role: messageRole }), children: parts.map((part, index) => /* @__PURE__ */ jsx(
12935
13073
  ChatMessagePartView,
12936
13074
  {
@@ -12985,7 +13123,7 @@ var approvalPromptButtonVariants = cva(
12985
13123
  }
12986
13124
  }
12987
13125
  );
12988
- function cn82(...classes) {
13126
+ function cn83(...classes) {
12989
13127
  return classes.filter(Boolean).join(" ");
12990
13128
  }
12991
13129
  function MosaicApprovalPrompt(props) {
@@ -12997,7 +13135,7 @@ function MosaicApprovalPrompt(props) {
12997
13135
  ref,
12998
13136
  "data-slot": "approval-prompt",
12999
13137
  "aria-label": promptTitle,
13000
- className: cn82("border-0 p-0 m-0", approvalPromptCardVariants({ tone }), className),
13138
+ className: cn83("border-0 p-0 m-0", approvalPromptCardVariants({ tone }), className),
13001
13139
  children: [
13002
13140
  /* @__PURE__ */ jsx("legend", { "data-slot": "approval-prompt-title", className: "text-base font-semibold md:text-lg", children: promptTitle }),
13003
13141
  /* @__PURE__ */ jsxs("div", { "data-slot": "approval-prompt-tool", className: "flex flex-col gap-1", children: [
@@ -13074,7 +13212,7 @@ var toolToggleListRowVariants = cva(
13074
13212
  }
13075
13213
  }
13076
13214
  );
13077
- function cn83(...classes) {
13215
+ function cn84(...classes) {
13078
13216
  return classes.filter(Boolean).join(" ");
13079
13217
  }
13080
13218
  function MosaicToolToggleList({
@@ -13090,7 +13228,7 @@ function MosaicToolToggleList({
13090
13228
  }) {
13091
13229
  const toolsById = new Map(tools.map((tool) => [tool.id, tool]));
13092
13230
  const approvalLabelById = new Map(approvalLevels.map((level) => [level.id, level.label]));
13093
- return /* @__PURE__ */ jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn83("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxs(
13231
+ return /* @__PURE__ */ jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn84("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxs(
13094
13232
  "div",
13095
13233
  {
13096
13234
  "data-slot": "tool-toggle-list-section",
@@ -13121,7 +13259,7 @@ function MosaicToolToggleList({
13121
13259
  onCheckedChange: (checked) => onToggleTool(tool.id, checked),
13122
13260
  "aria-label": toggleAriaLabel(tool.name),
13123
13261
  "data-slot": "tool-toggle-list-switch",
13124
- className: cn83(
13262
+ className: cn84(
13125
13263
  "relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
13126
13264
  "rounded-full border-2 border-transparent outline-none",
13127
13265
  "bg-muted transition-colors",
@@ -13132,7 +13270,7 @@ function MosaicToolToggleList({
13132
13270
  Switch.Thumb,
13133
13271
  {
13134
13272
  "data-slot": "tool-toggle-list-switch-thumb",
13135
- className: cn83(
13273
+ className: cn84(
13136
13274
  "pointer-events-none block h-4 w-4 rounded-full",
13137
13275
  "bg-background shadow-sm",
13138
13276
  "translate-x-0 transition-transform",
@@ -13174,7 +13312,7 @@ function MosaicToolToggleList({
13174
13312
  {
13175
13313
  "aria-label": approvalSelectAriaLabel(tool.name),
13176
13314
  "data-slot": "tool-toggle-list-approval-trigger",
13177
- className: cn83(
13315
+ className: cn84(
13178
13316
  "inline-flex h-9 min-w-[10rem] items-center justify-between gap-2",
13179
13317
  "rounded-md border border-border bg-background px-3 py-2",
13180
13318
  "text-sm text-foreground shadow-xs outline-none",
@@ -13192,7 +13330,7 @@ function MosaicToolToggleList({
13192
13330
  Select.Popup,
13193
13331
  {
13194
13332
  "data-slot": "tool-toggle-list-approval-popup",
13195
- className: cn83(
13333
+ className: cn84(
13196
13334
  "z-50 min-w-[10rem] overflow-hidden rounded-md border border-border",
13197
13335
  "bg-popover p-1 text-popover-foreground shadow-md",
13198
13336
  "origin-[var(--transform-origin)]",
@@ -13205,7 +13343,7 @@ function MosaicToolToggleList({
13205
13343
  Select.Item,
13206
13344
  {
13207
13345
  value: level.id,
13208
- className: cn83(
13346
+ className: cn84(
13209
13347
  "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
13210
13348
  "text-sm text-popover-foreground outline-none",
13211
13349
  "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
@@ -13313,7 +13451,7 @@ var apiKeyPanelMessageVariants = cva(["text-sm"], {
13313
13451
  tone: "muted"
13314
13452
  }
13315
13453
  });
13316
- function cn84(...classes) {
13454
+ function cn85(...classes) {
13317
13455
  return classes.filter(Boolean).join(" ");
13318
13456
  }
13319
13457
  function MosaicApiKeyPanel(props) {
@@ -13341,7 +13479,7 @@ function MosaicApiKeyPanel(props) {
13341
13479
  function handleKeyChange(event) {
13342
13480
  onKeyChange(event.target.value);
13343
13481
  }
13344
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "api-key-panel", className: cn84("flex flex-col gap-3", className), children: [
13482
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "api-key-panel", className: cn85("flex flex-col gap-3", className), children: [
13345
13483
  /* @__PURE__ */ jsx(
13346
13484
  "div",
13347
13485
  {
@@ -13436,7 +13574,7 @@ MosaicApiKeyPanel.displayName = "MosaicApiKeyPanel";
13436
13574
  var agentChatRootVariants = cva([
13437
13575
  "flex min-h-0 w-full flex-1 flex-col gap-2 overflow-hidden rounded-lg border border-border bg-card"
13438
13576
  ]);
13439
- function cn85(...classes) {
13577
+ function cn86(...classes) {
13440
13578
  return classes.filter(Boolean).join(" ");
13441
13579
  }
13442
13580
  function formatPayload2(value) {
@@ -13572,7 +13710,7 @@ function MosaicAgentChat(props) {
13572
13710
  setDecisions((previous) => ({ ...previous, [payload.requestId]: decision }));
13573
13711
  onApprovalResponse(payload);
13574
13712
  }
13575
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "agent-chat", className: cn85(agentChatRootVariants(), className), children: [
13713
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "agent-chat", className: cn86(agentChatRootVariants(), className), children: [
13576
13714
  /* @__PURE__ */ jsx(MosaicChatThread, { scrollToBottomLabel, children: messages.map((message) => /* @__PURE__ */ jsx(
13577
13715
  MosaicChatMessage,
13578
13716
  {
@@ -13661,7 +13799,7 @@ var toastProviderPositionVariants = cva(
13661
13799
  }
13662
13800
  }
13663
13801
  );
13664
- function cn86(...classes) {
13802
+ function cn87(...classes) {
13665
13803
  return classes.filter(Boolean).join(" ");
13666
13804
  }
13667
13805
  function MosaicToast({
@@ -13687,7 +13825,7 @@ function MosaicToast({
13687
13825
  ref,
13688
13826
  "data-slot": "toast",
13689
13827
  role,
13690
- className: cn86(toastCardVariants({ variant }), className),
13828
+ className: cn87(toastCardVariants({ variant }), className),
13691
13829
  children: [
13692
13830
  /* @__PURE__ */ jsxs("div", { "data-slot": "toast-body", className: "flex min-w-0 flex-1 flex-col gap-1", children: [
13693
13831
  /* @__PURE__ */ jsx("p", { "data-slot": "toast-title", className: toastTitleVariants({ variant }), children: title }),
@@ -13727,7 +13865,7 @@ function MosaicToast({
13727
13865
  );
13728
13866
  }
13729
13867
  MosaicToast.displayName = "MosaicToast";
13730
- function cn87(...classes) {
13868
+ function cn88(...classes) {
13731
13869
  return classes.filter(Boolean).join(" ");
13732
13870
  }
13733
13871
  function MosaicToastProvider({
@@ -13741,7 +13879,7 @@ function MosaicToastProvider({
13741
13879
  {
13742
13880
  ref,
13743
13881
  "data-slot": "toast-provider",
13744
- className: cn87(toastProviderPositionVariants({ position }), className),
13882
+ className: cn88(toastProviderPositionVariants({ position }), className),
13745
13883
  children
13746
13884
  }
13747
13885
  );
@@ -13768,7 +13906,7 @@ var pdfViewerToolbarButtonVariants = cva([
13768
13906
  "inline-flex min-h-8 min-w-8 items-center justify-center rounded-md border border-border text-sm",
13769
13907
  "transition-colors hover:bg-accent/50 disabled:opacity-50 disabled:hover:bg-transparent"
13770
13908
  ]);
13771
- function cn88(...classes) {
13909
+ function cn89(...classes) {
13772
13910
  return classes.filter(Boolean).join(" ");
13773
13911
  }
13774
13912
  function buildFrameSrc(fileUrl, currentPage, zoom) {
@@ -13833,7 +13971,7 @@ function MosaicPdfViewer({
13833
13971
  if (zoom === void 0 || onZoomChange === void 0) return;
13834
13972
  onZoomChange(Math.round((zoom + 0.1) * 100) / 100);
13835
13973
  }
13836
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "pdf-viewer", className: cn88("flex flex-col gap-2", className), children: [
13974
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "pdf-viewer", className: cn89("flex flex-col gap-2", className), children: [
13837
13975
  (showPageControls || showZoomControls) && /* @__PURE__ */ jsxs(
13838
13976
  "div",
13839
13977
  {
@@ -13922,7 +14060,7 @@ function MosaicPdfViewer({
13922
14060
  "data-slot": "pdf-viewer-frame",
13923
14061
  src: buildFrameSrc(fileUrl, currentPage, zoom),
13924
14062
  title: fileUrl,
13925
- className: cn88(
14063
+ className: cn89(
13926
14064
  "h-full min-h-64 w-full border-0",
13927
14065
  status !== "loaded" && "pointer-events-none absolute inset-0 opacity-0"
13928
14066
  )
@@ -13941,7 +14079,7 @@ var splitPaneCollapseButtonVariants = cva([
13941
14079
  "inline-flex h-11 w-6 shrink-0 items-center justify-center self-center rounded-md border border-border text-sm",
13942
14080
  "transition-colors hover:bg-accent/50"
13943
14081
  ]);
13944
- function cn89(...classes) {
14082
+ function cn90(...classes) {
13945
14083
  return classes.filter(Boolean).join(" ");
13946
14084
  }
13947
14085
  function mergeRefs(externalRef, node) {
@@ -14014,7 +14152,7 @@ function MosaicResizableSplitPane({
14014
14152
  mergeRefs(ref, node);
14015
14153
  },
14016
14154
  "data-slot": "resizable-split-pane",
14017
- className: cn89(splitPaneRootVariants(), className),
14155
+ className: cn90(splitPaneRootVariants(), className),
14018
14156
  children: [
14019
14157
  /* @__PURE__ */ jsx("div", { "data-slot": "resizable-split-pane-main", className: "min-h-0 min-w-0 flex-1 overflow-auto", children: main }),
14020
14158
  !isSideCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -14081,7 +14219,7 @@ var tagInputFieldVariants = cva([
14081
14219
  "min-w-[6ch] flex-1 border-none bg-transparent px-1 py-0.5 text-sm text-foreground outline-none",
14082
14220
  "placeholder:text-muted-foreground"
14083
14221
  ]);
14084
- function cn90(...classes) {
14222
+ function cn91(...classes) {
14085
14223
  return classes.filter(Boolean).join(" ");
14086
14224
  }
14087
14225
  function mergeRefs2(externalRef, node) {
@@ -14132,7 +14270,7 @@ function MosaicTagInput({
14132
14270
  if (lastTag !== void 0) onRemoveTag(lastTag);
14133
14271
  }
14134
14272
  }
14135
- return /* @__PURE__ */ jsxs("div", { "data-slot": "tag-input", className: cn90(tagInputRootVariants(), className), children: [
14273
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "tag-input", className: cn91(tagInputRootVariants(), className), children: [
14136
14274
  tags.map((tag) => /* @__PURE__ */ jsxs("span", { "data-slot": "tag-input-tag", className: tagInputTagVariants(), children: [
14137
14275
  tag,
14138
14276
  /* @__PURE__ */ jsx(
@@ -14169,7 +14307,7 @@ function MosaicTagInput({
14169
14307
  "ul",
14170
14308
  {
14171
14309
  "data-slot": "tag-input-suggestions",
14172
- className: cn90(
14310
+ className: cn91(
14173
14311
  "z-50 mt-1 w-full min-w-[8rem] overflow-hidden rounded-md border border-border",
14174
14312
  "bg-popover p-1 text-sm text-popover-foreground shadow-md"
14175
14313
  ),
@@ -14209,7 +14347,7 @@ var drawerPopupVariants = cva(
14209
14347
  }
14210
14348
  );
14211
14349
  var drawerBackdropVariants = cva(["fixed inset-0 z-50 bg-black/50"]);
14212
- function cn91(...classes) {
14350
+ function cn92(...classes) {
14213
14351
  return classes.filter(Boolean).join(" ");
14214
14352
  }
14215
14353
  function MosaicDrawer({
@@ -14221,7 +14359,7 @@ function MosaicDrawer({
14221
14359
  side = "right",
14222
14360
  className
14223
14361
  }) {
14224
- const titleId = React29.useId();
14362
+ const titleId = React30.useId();
14225
14363
  return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange: (nextOpen) => onOpenChange(nextOpen), modal: true, children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
14226
14364
  /* @__PURE__ */ jsx(Dialog.Backdrop, { "data-slot": "drawer-backdrop", className: drawerBackdropVariants() }),
14227
14365
  /* @__PURE__ */ jsxs(
@@ -14230,7 +14368,7 @@ function MosaicDrawer({
14230
14368
  "data-slot": "drawer",
14231
14369
  "aria-labelledby": titleId,
14232
14370
  "aria-modal": "true",
14233
- className: cn91(drawerPopupVariants({ side }), className),
14371
+ className: cn92(drawerPopupVariants({ side }), className),
14234
14372
  children: [
14235
14373
  /* @__PURE__ */ jsxs(
14236
14374
  "div",
@@ -14243,7 +14381,7 @@ function MosaicDrawer({
14243
14381
  Dialog.Close,
14244
14382
  {
14245
14383
  "aria-label": closeAriaLabel,
14246
- className: cn91(
14384
+ className: cn92(
14247
14385
  "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
14248
14386
  "hover:bg-muted hover:text-foreground",
14249
14387
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -14297,7 +14435,7 @@ var templateCategoryChipVariants = cva(
14297
14435
  }
14298
14436
  }
14299
14437
  );
14300
- function cn92(...classes) {
14438
+ function cn93(...classes) {
14301
14439
  return classes.filter(Boolean).join(" ");
14302
14440
  }
14303
14441
  function MosaicTemplateCategoryChips({
@@ -14312,7 +14450,7 @@ function MosaicTemplateCategoryChips({
14312
14450
  {
14313
14451
  ref,
14314
14452
  "data-slot": "template-category-chips",
14315
- className: cn92("flex flex-wrap items-center gap-2", className),
14453
+ className: cn93("flex flex-wrap items-center gap-2", className),
14316
14454
  children: categories.map((category) => {
14317
14455
  const isSelected = category.id === selected;
14318
14456
  return /* @__PURE__ */ jsx(
@@ -14355,7 +14493,7 @@ var saveTemplateModalButtonVariants = cva(
14355
14493
  }
14356
14494
  }
14357
14495
  );
14358
- function cn93(...classes) {
14496
+ function cn94(...classes) {
14359
14497
  return classes.filter(Boolean).join(" ");
14360
14498
  }
14361
14499
  function MosaicSaveTemplateModal({
@@ -14411,7 +14549,7 @@ function MosaicSaveTemplateModal({
14411
14549
  "div",
14412
14550
  {
14413
14551
  "data-slot": "save-template-modal",
14414
- className: cn93(saveTemplateModalBodyVariants(), className),
14552
+ className: cn94(saveTemplateModalBodyVariants(), className),
14415
14553
  children: [
14416
14554
  /* @__PURE__ */ jsxs("div", { className: saveTemplateModalFieldVariants(), children: [
14417
14555
  /* @__PURE__ */ jsx(
@@ -14530,7 +14668,7 @@ var templateListVariants = cva(["grid gap-4"], {
14530
14668
  layout: "grid"
14531
14669
  }
14532
14670
  });
14533
- function cn94(...classes) {
14671
+ function cn95(...classes) {
14534
14672
  return classes.filter(Boolean).join(" ");
14535
14673
  }
14536
14674
  var NEXT_KEYS = /* @__PURE__ */ new Set(["ArrowRight", "ArrowDown"]);
@@ -14575,7 +14713,7 @@ function MosaicTemplateList({
14575
14713
  {
14576
14714
  ref,
14577
14715
  "data-slot": "template-list",
14578
- className: cn94(templateListVariants({ layout }), className),
14716
+ className: cn95(templateListVariants({ layout }), className),
14579
14717
  children: /* @__PURE__ */ jsx(
14580
14718
  "p",
14581
14719
  {
@@ -14592,7 +14730,7 @@ function MosaicTemplateList({
14592
14730
  {
14593
14731
  ref,
14594
14732
  "data-slot": "template-list",
14595
- className: cn94("list-none", templateListVariants({ layout }), className),
14733
+ className: cn95("list-none", templateListVariants({ layout }), className),
14596
14734
  children: items.map((item, index) => /* @__PURE__ */ jsx(
14597
14735
  "li",
14598
14736
  {
@@ -14612,7 +14750,136 @@ function MosaicTemplateList({
14612
14750
  );
14613
14751
  }
14614
14752
  MosaicTemplateList.displayName = "MosaicTemplateList";
14753
+ var templateManagementRowVariants = cva(
14754
+ "flex items-center justify-between gap-3 border-b border-border px-4 py-3 last:border-b-0"
14755
+ );
14756
+ function cn96(...classes) {
14757
+ return classes.filter(Boolean).join(" ");
14758
+ }
14759
+ function MosaicTemplateManagementPanel({
14760
+ templates,
14761
+ heading,
14762
+ emptyMessage,
14763
+ renameLabel,
14764
+ duplicateLabel,
14765
+ deleteLabel,
14766
+ saveLabel,
14767
+ cancelLabel,
14768
+ renameInputAriaLabel,
14769
+ actionsAriaLabelFor,
14770
+ onRename,
14771
+ onDuplicate,
14772
+ onDelete,
14773
+ className
14774
+ }) {
14775
+ const [renamingId, setRenamingId] = React30.useState(null);
14776
+ const [draftName, setDraftName] = React30.useState("");
14777
+ const startRename = (item) => {
14778
+ setRenamingId(item.id);
14779
+ setDraftName(item.name);
14780
+ };
14781
+ const cancelRename = () => {
14782
+ setRenamingId(null);
14783
+ setDraftName("");
14784
+ };
14785
+ const saveRename = (id) => {
14786
+ const trimmed = draftName.trim();
14787
+ if (trimmed.length > 0) {
14788
+ onRename(id, trimmed);
14789
+ }
14790
+ setRenamingId(null);
14791
+ setDraftName("");
14792
+ };
14793
+ const menuItems = [
14794
+ { id: "rename", label: renameLabel },
14795
+ { id: "duplicate", label: duplicateLabel },
14796
+ { id: "delete", label: deleteLabel, separator: true }
14797
+ ];
14798
+ const handleItemSelect = (item, actionId) => {
14799
+ if (actionId === "rename") {
14800
+ startRename(item);
14801
+ } else if (actionId === "duplicate") {
14802
+ onDuplicate(item.id);
14803
+ } else if (actionId === "delete") {
14804
+ onDelete(item.id);
14805
+ }
14806
+ };
14807
+ return /* @__PURE__ */ jsxs(
14808
+ "div",
14809
+ {
14810
+ "data-slot": "template-management-panel",
14811
+ className: cn96("flex flex-col rounded-lg border border-border bg-background", className),
14812
+ children: [
14813
+ /* @__PURE__ */ jsx("h2", { className: "border-b border-border px-4 py-3 font-semibold text-foreground text-sm", children: heading }),
14814
+ templates.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-4 py-6 text-center text-muted-foreground text-sm", children: emptyMessage }) : /* @__PURE__ */ jsx("ul", { children: templates.map((item) => {
14815
+ const isRenaming = renamingId === item.id;
14816
+ return /* @__PURE__ */ jsx(
14817
+ "li",
14818
+ {
14819
+ "data-slot": "template-management-row",
14820
+ className: templateManagementRowVariants(),
14821
+ children: isRenaming ? /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-2", children: [
14822
+ /* @__PURE__ */ jsx(
14823
+ MosaicInput,
14824
+ {
14825
+ "aria-label": renameInputAriaLabel,
14826
+ value: draftName,
14827
+ onChange: (event) => setDraftName(event.target.value),
14828
+ className: "flex-1"
14829
+ }
14830
+ ),
14831
+ /* @__PURE__ */ jsx(MosaicButton, { type: "button", size: "sm", onClick: () => saveRename(item.id), children: saveLabel }),
14832
+ /* @__PURE__ */ jsx(MosaicButton, { type: "button", variant: "outline", size: "sm", onClick: cancelRename, children: cancelLabel })
14833
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
14834
+ /* @__PURE__ */ jsx("span", { className: "truncate text-foreground text-sm", children: item.name }),
14835
+ /* @__PURE__ */ jsx(
14836
+ MosaicDropdownMenu,
14837
+ {
14838
+ trigger: /* @__PURE__ */ jsx(
14839
+ "button",
14840
+ {
14841
+ type: "button",
14842
+ "aria-label": actionsAriaLabelFor(item.name),
14843
+ className: cn96(
14844
+ "flex size-8 items-center justify-center rounded-md",
14845
+ "text-muted-foreground hover:bg-muted hover:text-foreground"
14846
+ ),
14847
+ children: /* @__PURE__ */ jsx(DotsIcon, {})
14848
+ }
14849
+ ),
14850
+ items: menuItems,
14851
+ onItemSelect: (actionId) => handleItemSelect(item, actionId)
14852
+ }
14853
+ )
14854
+ ] })
14855
+ },
14856
+ item.id
14857
+ );
14858
+ }) })
14859
+ ]
14860
+ }
14861
+ );
14862
+ }
14863
+ MosaicTemplateManagementPanel.displayName = "MosaicTemplateManagementPanel";
14864
+ function DotsIcon() {
14865
+ return /* @__PURE__ */ jsxs(
14866
+ "svg",
14867
+ {
14868
+ xmlns: "http://www.w3.org/2000/svg",
14869
+ width: "16",
14870
+ height: "16",
14871
+ viewBox: "0 0 24 24",
14872
+ fill: "currentColor",
14873
+ "aria-hidden": "true",
14874
+ children: [
14875
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1.5" }),
14876
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1.5" }),
14877
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "1.5" })
14878
+ ]
14879
+ }
14880
+ );
14881
+ }
14615
14882
 
14616
- export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentCard, MosaicAgentChat, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentEditor, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentPreview, MosaicAgentTeamPreview, MosaicAlertDialog, MosaicAlertDialogAction, MosaicAlertDialogCancel, MosaicAlertDialogContent, MosaicAlertDialogDescription, MosaicAlertDialogFooter, MosaicAlertDialogHeader, MosaicAlertDialogOverlay, MosaicAlertDialogPortal, MosaicAlertDialogTitle, MosaicAlertDialogTrigger, MosaicAnimatedList, MosaicApiKeyPanel, MosaicAppSidebar, MosaicApprovalPrompt, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicChatComposer, MosaicChatMessage, MosaicChatThread, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDocumentUpload, MosaicDrawer, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarkdown, MosaicMarketplaceCard, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMemoryCard, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModelSelector, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPdfViewer, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicResizableSplitPane, MosaicSaveTemplateModal, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTagInput, MosaicTemplateAgentCard, MosaicTemplateCard, MosaicTemplateCategoryChips, MosaicTemplateGallery, MosaicTemplateList, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicToast, MosaicToastProvider, MosaicToolToggleList, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUrlScraper, MosaicUserButton, Placeholder, agentChatRootVariants, agentEditorVariants, agentPreviewVariants, alertDialogContentVariants, alertDialogOverlayVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, drawerBackdropVariants, drawerPopupVariants, marketplaceCardVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, saveTemplateModalBodyVariants, saveTemplateModalButtonVariants, saveTemplateModalErrorVariants, saveTemplateModalFieldVariants, saveTemplateModalFooterVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, templateAgentCardBadgeVariants, templateAgentCardTagVariants, templateAgentCardVariants, templateCategoryChipVariants, templateListVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
14883
+ export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentBuilderModal, MosaicAgentCard, MosaicAgentChat, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentEditor, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentPreview, MosaicAgentTeamPreview, MosaicAlertDialog, MosaicAlertDialogAction, MosaicAlertDialogCancel, MosaicAlertDialogContent, MosaicAlertDialogDescription, MosaicAlertDialogFooter, MosaicAlertDialogHeader, MosaicAlertDialogOverlay, MosaicAlertDialogPortal, MosaicAlertDialogTitle, MosaicAlertDialogTrigger, MosaicAnimatedList, MosaicApiKeyPanel, MosaicAppSidebar, MosaicApprovalPrompt, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicChatComposer, MosaicChatMessage, MosaicChatThread, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDocumentUpload, MosaicDrawer, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarkdown, MosaicMarketplaceCard, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMemoryCard, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModelSelector, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPdfViewer, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicResizableSplitPane, MosaicSaveTemplateModal, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTagInput, MosaicTemplateAgentCard, MosaicTemplateCard, MosaicTemplateCategoryChips, MosaicTemplateGallery, MosaicTemplateList, MosaicTemplateManagementPanel, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicToast, MosaicToastProvider, MosaicToolToggleList, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUrlScraper, MosaicUserButton, Placeholder, agentBuilderModalBackdropVariants, agentBuilderModalPopupVariants, agentChatRootVariants, agentEditorVariants, agentPreviewVariants, alertDialogContentVariants, alertDialogOverlayVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, drawerBackdropVariants, drawerPopupVariants, marketplaceCardVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, saveTemplateModalBodyVariants, saveTemplateModalButtonVariants, saveTemplateModalErrorVariants, saveTemplateModalFieldVariants, saveTemplateModalFooterVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, templateAgentCardBadgeVariants, templateAgentCardTagVariants, templateAgentCardVariants, templateCategoryChipVariants, templateListVariants, templateManagementRowVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
14617
14884
  //# sourceMappingURL=index.js.map
14618
14885
  //# sourceMappingURL=index.js.map