@vantageos/mosaic-blocks 0.4.5-alpha → 0.4.7-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,8 +2,8 @@
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 React27 from 'react';
6
- import { useState, useEffect } from 'react';
5
+ import * as React28 from 'react';
6
+ import { useState, useEffect, useRef, useId } from 'react';
7
7
  import { Accordion } from '@base-ui/react/accordion';
8
8
  export { Accordion } from '@base-ui/react/accordion';
9
9
  import { Checkbox } from '@base-ui/react/checkbox';
@@ -27,7 +27,7 @@ import { Menu } from '@base-ui/react/menu';
27
27
  import { AlertDialog } from '@base-ui/react/alert-dialog';
28
28
 
29
29
  // src/version.ts
30
- var version = "0.4.5-alpha";
30
+ var version = "0.4.7-alpha";
31
31
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
32
32
  return /* @__PURE__ */ jsx("div", { "data-mosaic-block": "placeholder", children: label });
33
33
  }
@@ -158,11 +158,11 @@ function MosaicNavbar({
158
158
  className,
159
159
  ref
160
160
  }) {
161
- const [isScrolled, setIsScrolled] = React27.useState(false);
162
- const [isHidden, setIsHidden] = React27.useState(false);
163
- const [isOpen, setIsOpen] = React27.useState(false);
164
- const lastScrollY = React27.useRef(0);
165
- React27.useEffect(() => {
161
+ const [isScrolled, setIsScrolled] = React28.useState(false);
162
+ const [isHidden, setIsHidden] = React28.useState(false);
163
+ const [isOpen, setIsOpen] = React28.useState(false);
164
+ const lastScrollY = React28.useRef(0);
165
+ React28.useEffect(() => {
166
166
  const handleScroll = () => {
167
167
  const current = window.scrollY;
168
168
  setIsScrolled(current > 50);
@@ -177,7 +177,7 @@ function MosaicNavbar({
177
177
  window.addEventListener("scroll", handleScroll, { passive: true });
178
178
  return () => window.removeEventListener("scroll", handleScroll);
179
179
  }, []);
180
- React27.useEffect(() => {
180
+ React28.useEffect(() => {
181
181
  document.body.style.overflow = isOpen ? "hidden" : "";
182
182
  return () => {
183
183
  document.body.style.overflow = "";
@@ -705,10 +705,10 @@ function MosaicCounter({
705
705
  className,
706
706
  ref
707
707
  }) {
708
- const [current, setCurrent] = React27.useState(0);
709
- const rafRef = React27.useRef(0);
710
- const startTimeRef = React27.useRef(null);
711
- React27.useEffect(() => {
708
+ const [current, setCurrent] = React28.useState(0);
709
+ const rafRef = React28.useRef(0);
710
+ const startTimeRef = React28.useRef(null);
711
+ React28.useEffect(() => {
712
712
  const prefersReduced = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
713
713
  if (prefersReduced) {
714
714
  setCurrent(value);
@@ -764,12 +764,12 @@ function MosaicThemeToggle({
764
764
  switchToDarkLabel,
765
765
  ref
766
766
  }) {
767
- const [theme, setTheme] = React27.useState(() => {
767
+ const [theme, setTheme] = React28.useState(() => {
768
768
  if (typeof document === "undefined") return themes[0];
769
769
  const current = document.documentElement.getAttribute("data-theme");
770
770
  return current && themes.includes(current) ? current : themes[0];
771
771
  });
772
- const applyTheme = React27.useCallback(
772
+ const applyTheme = React28.useCallback(
773
773
  (next) => {
774
774
  const resolved = next === "system" ? getSystemTheme() : next;
775
775
  document.documentElement.setAttribute("data-theme", resolved);
@@ -897,10 +897,10 @@ function MosaicAnimatedList({
897
897
  as: Tag = "ul",
898
898
  ref
899
899
  }) {
900
- React27.useEffect(() => {
900
+ React28.useEffect(() => {
901
901
  injectKeyframes();
902
902
  }, []);
903
- const items = React27.Children.toArray(children);
903
+ const items = React28.Children.toArray(children);
904
904
  return /* @__PURE__ */ jsx(
905
905
  Tag,
906
906
  {
@@ -908,7 +908,7 @@ function MosaicAnimatedList({
908
908
  className,
909
909
  children: items.map((child, i) => {
910
910
  const stableKey = child.key ?? `item-${i}`;
911
- return /* @__PURE__ */ jsx(React27.Fragment, { children: /* @__PURE__ */ jsx(
911
+ return /* @__PURE__ */ jsx(React28.Fragment, { children: /* @__PURE__ */ jsx(
912
912
  "div",
913
913
  {
914
914
  className: "mosaic-list-item",
@@ -981,8 +981,8 @@ function MosaicFallingPattern({
981
981
  className,
982
982
  ref
983
983
  }) {
984
- const uniqueId = React27.useId();
985
- React27.useEffect(() => {
984
+ const uniqueId = React28.useId();
985
+ React28.useEffect(() => {
986
986
  injectPatternKeyframes();
987
987
  }, []);
988
988
  const cols = density;
@@ -2078,7 +2078,7 @@ function MosaicSelect({
2078
2078
  name,
2079
2079
  className
2080
2080
  }) {
2081
- const labelMap = React27.useMemo(
2081
+ const labelMap = React28.useMemo(
2082
2082
  () => Object.fromEntries(items.map((item) => [item.value, item.label])),
2083
2083
  [items]
2084
2084
  );
@@ -2198,9 +2198,9 @@ function MosaicCombobox({
2198
2198
  emptyMessage,
2199
2199
  className
2200
2200
  }) {
2201
- const [inputValue, setInputValue] = React27.useState("");
2201
+ const [inputValue, setInputValue] = React28.useState("");
2202
2202
  const filter = Combobox.useFilter({ sensitivity: "base" });
2203
- const filteredItems = React27.useMemo(() => {
2203
+ const filteredItems = React28.useMemo(() => {
2204
2204
  if (!inputValue) return items;
2205
2205
  return items.filter((item) => filter.contains(item.label, inputValue));
2206
2206
  }, [items, inputValue, filter]);
@@ -2292,7 +2292,7 @@ function MosaicDropdownMenu({
2292
2292
  "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
2293
2293
  className
2294
2294
  ),
2295
- children: items.map((item) => /* @__PURE__ */ jsxs(React27.Fragment, { children: [
2295
+ children: items.map((item) => /* @__PURE__ */ jsxs(React28.Fragment, { children: [
2296
2296
  item.separator && /* @__PURE__ */ jsx(Menu.Separator, { className: "my-1 h-px bg-border" }),
2297
2297
  /* @__PURE__ */ jsx(
2298
2298
  Menu.Item,
@@ -2320,8 +2320,8 @@ var BREAKPOINTS = {
2320
2320
  xl: 1280
2321
2321
  };
2322
2322
  function useBreakpoint(breakpoint) {
2323
- const [matches, setMatches] = React27.useState(false);
2324
- React27.useEffect(() => {
2323
+ const [matches, setMatches] = React28.useState(false);
2324
+ React28.useEffect(() => {
2325
2325
  if (typeof window === "undefined") return;
2326
2326
  const mq = window.matchMedia(`(min-width: ${BREAKPOINTS[breakpoint]}px)`);
2327
2327
  setMatches(mq.matches);
@@ -2344,8 +2344,8 @@ function useIsDesktop() {
2344
2344
  return useBreakpoint("lg");
2345
2345
  }
2346
2346
  function useViewport() {
2347
- const [size, setSize] = React27.useState({ width: 0, height: 0 });
2348
- React27.useEffect(() => {
2347
+ const [size, setSize] = React28.useState({ width: 0, height: 0 });
2348
+ React28.useEffect(() => {
2349
2349
  if (typeof window === "undefined") return;
2350
2350
  const update = () => setSize({ width: window.innerWidth, height: window.innerHeight });
2351
2351
  update();
@@ -2363,8 +2363,8 @@ function useViewport() {
2363
2363
  return size;
2364
2364
  }
2365
2365
  function useOrientation() {
2366
- const [orientation, setOrientation] = React27.useState("portrait");
2367
- React27.useEffect(() => {
2366
+ const [orientation, setOrientation] = React28.useState("portrait");
2367
+ React28.useEffect(() => {
2368
2368
  if (typeof window === "undefined") return;
2369
2369
  const update = () => {
2370
2370
  setOrientation(window.innerHeight > window.innerWidth ? "portrait" : "landscape");
@@ -2379,7 +2379,7 @@ function useOrientation() {
2379
2379
  }, []);
2380
2380
  return orientation;
2381
2381
  }
2382
- var DeviceContext = React27.createContext(void 0);
2382
+ var DeviceContext = React28.createContext(void 0);
2383
2383
  function MosaicDeviceProvider({ children }) {
2384
2384
  const isMobile = useIsMobile();
2385
2385
  const isTablet = useIsTablet();
@@ -2390,7 +2390,7 @@ function MosaicDeviceProvider({ children }) {
2390
2390
  const isXlUp = useBreakpoint("xl");
2391
2391
  const orientation = useOrientation();
2392
2392
  const viewport = useViewport();
2393
- const isBreakpoint = React27.useCallback(
2393
+ const isBreakpoint = React28.useCallback(
2394
2394
  (bp) => {
2395
2395
  switch (bp) {
2396
2396
  case "sm":
@@ -2405,7 +2405,7 @@ function MosaicDeviceProvider({ children }) {
2405
2405
  },
2406
2406
  [isSmUp, isMdUp, isLgUp, isXlUp]
2407
2407
  );
2408
- const value = React27.useMemo(
2408
+ const value = React28.useMemo(
2409
2409
  () => ({
2410
2410
  isMobile,
2411
2411
  isTablet,
@@ -2435,7 +2435,7 @@ function MosaicDeviceProvider({ children }) {
2435
2435
  }
2436
2436
  MosaicDeviceProvider.displayName = "MosaicDeviceProvider";
2437
2437
  function useDevice() {
2438
- const ctx = React27.useContext(DeviceContext);
2438
+ const ctx = React28.useContext(DeviceContext);
2439
2439
  if (!ctx) {
2440
2440
  throw new Error("useDevice must be used within a MosaicDeviceProvider");
2441
2441
  }
@@ -2521,13 +2521,13 @@ function MosaicAdaptiveModal({
2521
2521
  closeAriaLabel
2522
2522
  }) {
2523
2523
  const { isMobile } = useDevice();
2524
- const dialogRef = React27.useRef(null);
2525
- const titleId = React27.useId();
2526
- const descId = React27.useId();
2527
- React27.useEffect(() => {
2524
+ const dialogRef = React28.useRef(null);
2525
+ const titleId = React28.useId();
2526
+ const descId = React28.useId();
2527
+ React28.useEffect(() => {
2528
2528
  injectStyles();
2529
2529
  }, []);
2530
- React27.useEffect(() => {
2530
+ React28.useEffect(() => {
2531
2531
  const el = dialogRef.current;
2532
2532
  if (!el) return;
2533
2533
  if (isOpen) {
@@ -2536,7 +2536,7 @@ function MosaicAdaptiveModal({
2536
2536
  if (el.open) el.close();
2537
2537
  }
2538
2538
  }, [isOpen]);
2539
- React27.useEffect(() => {
2539
+ React28.useEffect(() => {
2540
2540
  const el = dialogRef.current;
2541
2541
  if (!el) return;
2542
2542
  const handler = (e) => {
@@ -2546,7 +2546,7 @@ function MosaicAdaptiveModal({
2546
2546
  el.addEventListener("cancel", handler);
2547
2547
  return () => el.removeEventListener("cancel", handler);
2548
2548
  }, [onClose]);
2549
- React27.useEffect(() => {
2549
+ React28.useEffect(() => {
2550
2550
  if (!isOpen) return;
2551
2551
  const prev = document.body.style.overflow;
2552
2552
  document.body.style.overflow = "hidden";
@@ -2978,8 +2978,8 @@ function MosaicAppSidebar({
2978
2978
  ref
2979
2979
  }) {
2980
2980
  const { isMobile } = useDevice();
2981
- const [expandedItems, setExpandedItems] = React27.useState(/* @__PURE__ */ new Set());
2982
- React27.useEffect(() => {
2981
+ const [expandedItems, setExpandedItems] = React28.useState(/* @__PURE__ */ new Set());
2982
+ React28.useEffect(() => {
2983
2983
  injectStyles2();
2984
2984
  }, []);
2985
2985
  const sidebarWidth = isMobile ? "100%" : isCollapsed ? "64px" : "280px";
@@ -3231,9 +3231,9 @@ function MosaicDashboardLayout({
3231
3231
  ref
3232
3232
  }) {
3233
3233
  const { isMobile } = useDevice();
3234
- const [isSidebarCollapsed, setIsSidebarCollapsed] = React27.useState(defaultSidebarCollapsed);
3235
- const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React27.useState(false);
3236
- React27.useEffect(() => {
3234
+ const [isSidebarCollapsed, setIsSidebarCollapsed] = React28.useState(defaultSidebarCollapsed);
3235
+ const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React28.useState(false);
3236
+ React28.useEffect(() => {
3237
3237
  injectStyles3();
3238
3238
  }, []);
3239
3239
  const defaultRenderLink2 = (href, children2) => /* @__PURE__ */ jsx("a", { href, className: "transition-colors hover:text-foreground", children: children2 });
@@ -3365,7 +3365,7 @@ function MosaicQuickActionCard({
3365
3365
  ref
3366
3366
  }) {
3367
3367
  const { mobile = 2, desktop = 3 } = columns;
3368
- React27.useEffect(() => {
3368
+ React28.useEffect(() => {
3369
3369
  injectStyles4();
3370
3370
  }, []);
3371
3371
  const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsx("a", { href, className: "block h-full", children });
@@ -3582,7 +3582,7 @@ function MosaicActivityFeed({
3582
3582
  className,
3583
3583
  ref
3584
3584
  }) {
3585
- React27.useEffect(() => {
3585
+ React28.useEffect(() => {
3586
3586
  injectStyles5();
3587
3587
  }, []);
3588
3588
  const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsx(
@@ -4252,7 +4252,7 @@ function MosaicAgentComposerMobile({
4252
4252
  optionalInstructionsHelp
4253
4253
  }) {
4254
4254
  const L = labels;
4255
- const instructionsId = React27.useId();
4255
+ const instructionsId = React28.useId();
4256
4256
  return /* @__PURE__ */ jsxs("div", { "data-slot": "agent-composer-mobile", className: "flex h-full flex-col", children: [
4257
4257
  /* @__PURE__ */ jsxs("div", { className: "shrink-0 sticky top-0 z-10 border-b border-border bg-background px-4 pt-4 pb-3", children: [
4258
4258
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
@@ -4621,7 +4621,7 @@ function MosaicDeleteConfirmationDialog({
4621
4621
  cancelLabel,
4622
4622
  confirmLabel
4623
4623
  }) {
4624
- React27.useEffect(() => {
4624
+ React28.useEffect(() => {
4625
4625
  injectStyles6();
4626
4626
  }, []);
4627
4627
  return /* @__PURE__ */ jsx(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [
@@ -5127,12 +5127,12 @@ function MosaicMainNav({
5127
5127
  className
5128
5128
  }) {
5129
5129
  const { isMobile } = useDevice();
5130
- const [isOpen, setIsOpen] = React27.useState(false);
5130
+ const [isOpen, setIsOpen] = React28.useState(false);
5131
5131
  const linkRenderer = renderLink ?? defaultRenderLink;
5132
- React27.useEffect(() => {
5132
+ React28.useEffect(() => {
5133
5133
  injectStyles7();
5134
5134
  }, []);
5135
- React27.useEffect(() => {
5135
+ React28.useEffect(() => {
5136
5136
  if (!isOpen) return;
5137
5137
  const handler = (e) => {
5138
5138
  if (e.key === "Escape") setIsOpen(false);
@@ -5211,7 +5211,7 @@ function MosaicMainNav({
5211
5211
  "min-h-[44px]",
5212
5212
  active && "bg-accent text-accent-foreground"
5213
5213
  );
5214
- return /* @__PURE__ */ jsx(React27.Fragment, { children: linkRenderer(
5214
+ return /* @__PURE__ */ jsx(React28.Fragment, { children: linkRenderer(
5215
5215
  item,
5216
5216
  /* @__PURE__ */ jsxs(Fragment, { children: [
5217
5217
  Icon && /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
@@ -5242,7 +5242,7 @@ function MosaicMainNav({
5242
5242
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5243
5243
  active && "bg-accent text-accent-foreground"
5244
5244
  );
5245
- return /* @__PURE__ */ jsx(React27.Fragment, { children: linkRenderer(
5245
+ return /* @__PURE__ */ jsx(React28.Fragment, { children: linkRenderer(
5246
5246
  item,
5247
5247
  /* @__PURE__ */ jsxs(Fragment, { children: [
5248
5248
  Icon && /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4", "aria-hidden": "true" }),
@@ -5379,10 +5379,10 @@ function MosaicAgentCard({
5379
5379
  createdLabel,
5380
5380
  className
5381
5381
  }) {
5382
- const [menuOpen, setMenuOpen] = React27.useState(false);
5383
- const menuRef = React27.useRef(null);
5382
+ const [menuOpen, setMenuOpen] = React28.useState(false);
5383
+ const menuRef = React28.useRef(null);
5384
5384
  const formattedDate = agent.createdAt ? new Date(agent.createdAt).toLocaleDateString() : void 0;
5385
- React27.useEffect(() => {
5385
+ React28.useEffect(() => {
5386
5386
  if (!menuOpen) return;
5387
5387
  const handler = (e) => {
5388
5388
  if (menuRef.current && !menuRef.current.contains(e.target)) {
@@ -5685,9 +5685,9 @@ function MosaicQuickAgentSelector({
5685
5685
  className
5686
5686
  }) {
5687
5687
  const { isMobile } = useDevice();
5688
- const [pickerOpen, setPickerOpen] = React27.useState(false);
5689
- const dropdownRef = React27.useRef(null);
5690
- React27.useEffect(() => {
5688
+ const [pickerOpen, setPickerOpen] = React28.useState(false);
5689
+ const dropdownRef = React28.useRef(null);
5690
+ React28.useEffect(() => {
5691
5691
  if (!pickerOpen || isMobile) return;
5692
5692
  const handler = (e) => {
5693
5693
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -5824,9 +5824,373 @@ function MosaicQuickAgentSelector({
5824
5824
  ] });
5825
5825
  }
5826
5826
  MosaicQuickAgentSelector.displayName = "MosaicQuickAgentSelector";
5827
+ var memoryCardVariants = cva(
5828
+ [
5829
+ "group relative rounded-lg border border-border bg-card text-card-foreground shadow-sm",
5830
+ "transition-all"
5831
+ ],
5832
+ {
5833
+ variants: {
5834
+ variant: {
5835
+ detailed: "p-5 hover:shadow-lg",
5836
+ compact: "min-h-[80px] p-4"
5837
+ }
5838
+ },
5839
+ defaultVariants: {
5840
+ variant: "detailed"
5841
+ }
5842
+ }
5843
+ );
5844
+ var memoryScopeBadgeVariants = cva(
5845
+ ["inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium"],
5846
+ {
5847
+ variants: {
5848
+ scope: {
5849
+ organization: "bg-purple-500/10 text-purple-500",
5850
+ workspace: "bg-blue-500/10 text-blue-500",
5851
+ user: "bg-green-500/10 text-green-500",
5852
+ chat: "bg-orange-500/10 text-orange-500"
5853
+ },
5854
+ bordered: {
5855
+ true: "border",
5856
+ false: ""
5857
+ }
5858
+ },
5859
+ compoundVariants: [
5860
+ { scope: "organization", bordered: true, className: "border-purple-500/20" },
5861
+ { scope: "workspace", bordered: true, className: "border-blue-500/20" },
5862
+ { scope: "user", bordered: true, className: "border-green-500/20" },
5863
+ { scope: "chat", bordered: true, className: "border-orange-500/20" }
5864
+ ],
5865
+ defaultVariants: {
5866
+ scope: "user",
5867
+ bordered: false
5868
+ }
5869
+ }
5870
+ );
5871
+ var memoryTagBadgeVariants = cva([
5872
+ "inline-flex items-center rounded-full border border-border px-2 py-0.5 text-xs"
5873
+ ]);
5874
+ var memoryActionsMenuTriggerVariants = cva(
5875
+ [
5876
+ "inline-flex items-center justify-center rounded-md text-muted-foreground transition-opacity",
5877
+ "hover:bg-accent hover:text-accent-foreground",
5878
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
5879
+ ],
5880
+ {
5881
+ variants: {
5882
+ variant: {
5883
+ detailed: "h-11 w-11 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",
5884
+ compact: "h-8 w-8"
5885
+ }
5886
+ },
5887
+ defaultVariants: {
5888
+ variant: "detailed"
5889
+ }
5890
+ }
5891
+ );
5827
5892
  function cn53(...classes) {
5828
5893
  return classes.filter(Boolean).join(" ");
5829
5894
  }
5895
+ var MAX_VISIBLE_TAGS = 3;
5896
+ function FileTextIcon() {
5897
+ return /* @__PURE__ */ jsxs(
5898
+ "svg",
5899
+ {
5900
+ xmlns: "http://www.w3.org/2000/svg",
5901
+ width: "16",
5902
+ height: "16",
5903
+ viewBox: "0 0 24 24",
5904
+ fill: "none",
5905
+ stroke: "currentColor",
5906
+ strokeWidth: "2",
5907
+ strokeLinecap: "round",
5908
+ strokeLinejoin: "round",
5909
+ "aria-hidden": "true",
5910
+ children: [
5911
+ /* @__PURE__ */ jsx("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
5912
+ /* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" }),
5913
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
5914
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
5915
+ /* @__PURE__ */ jsx("line", { x1: "10", y1: "9", x2: "8", y2: "9" })
5916
+ ]
5917
+ }
5918
+ );
5919
+ }
5920
+ function FileIcon() {
5921
+ return /* @__PURE__ */ jsxs(
5922
+ "svg",
5923
+ {
5924
+ xmlns: "http://www.w3.org/2000/svg",
5925
+ width: "16",
5926
+ height: "16",
5927
+ viewBox: "0 0 24 24",
5928
+ fill: "none",
5929
+ stroke: "currentColor",
5930
+ strokeWidth: "2",
5931
+ strokeLinecap: "round",
5932
+ strokeLinejoin: "round",
5933
+ "aria-hidden": "true",
5934
+ children: [
5935
+ /* @__PURE__ */ jsx("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
5936
+ /* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" })
5937
+ ]
5938
+ }
5939
+ );
5940
+ }
5941
+ function LinkIcon() {
5942
+ return /* @__PURE__ */ jsxs(
5943
+ "svg",
5944
+ {
5945
+ xmlns: "http://www.w3.org/2000/svg",
5946
+ width: "16",
5947
+ height: "16",
5948
+ viewBox: "0 0 24 24",
5949
+ fill: "none",
5950
+ stroke: "currentColor",
5951
+ strokeWidth: "2",
5952
+ strokeLinecap: "round",
5953
+ strokeLinejoin: "round",
5954
+ "aria-hidden": "true",
5955
+ children: [
5956
+ /* @__PURE__ */ jsx("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
5957
+ /* @__PURE__ */ jsx("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
5958
+ ]
5959
+ }
5960
+ );
5961
+ }
5962
+ function ClockIcon3() {
5963
+ return /* @__PURE__ */ jsxs(
5964
+ "svg",
5965
+ {
5966
+ xmlns: "http://www.w3.org/2000/svg",
5967
+ width: "12",
5968
+ height: "12",
5969
+ viewBox: "0 0 24 24",
5970
+ fill: "none",
5971
+ stroke: "currentColor",
5972
+ strokeWidth: "2",
5973
+ strokeLinecap: "round",
5974
+ strokeLinejoin: "round",
5975
+ "aria-hidden": "true",
5976
+ children: [
5977
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
5978
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
5979
+ ]
5980
+ }
5981
+ );
5982
+ }
5983
+ function TagIcon() {
5984
+ return /* @__PURE__ */ jsxs(
5985
+ "svg",
5986
+ {
5987
+ xmlns: "http://www.w3.org/2000/svg",
5988
+ width: "12",
5989
+ height: "12",
5990
+ viewBox: "0 0 24 24",
5991
+ fill: "none",
5992
+ stroke: "currentColor",
5993
+ strokeWidth: "2",
5994
+ strokeLinecap: "round",
5995
+ strokeLinejoin: "round",
5996
+ "aria-hidden": "true",
5997
+ children: [
5998
+ /* @__PURE__ */ jsx("path", { d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }),
5999
+ /* @__PURE__ */ jsx("circle", { cx: "7.5", cy: "7.5", r: "1.5" })
6000
+ ]
6001
+ }
6002
+ );
6003
+ }
6004
+ function MoreVertIcon2() {
6005
+ return /* @__PURE__ */ jsxs(
6006
+ "svg",
6007
+ {
6008
+ xmlns: "http://www.w3.org/2000/svg",
6009
+ width: "16",
6010
+ height: "16",
6011
+ viewBox: "0 0 24 24",
6012
+ fill: "none",
6013
+ stroke: "currentColor",
6014
+ strokeWidth: "2",
6015
+ strokeLinecap: "round",
6016
+ strokeLinejoin: "round",
6017
+ "aria-hidden": "true",
6018
+ children: [
6019
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1" }),
6020
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
6021
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "1" })
6022
+ ]
6023
+ }
6024
+ );
6025
+ }
6026
+ var SOURCE_ICONS = {
6027
+ manual: FileTextIcon,
6028
+ document: FileIcon,
6029
+ url: LinkIcon
6030
+ };
6031
+ function MosaicMemoryCard({
6032
+ memory,
6033
+ variant = "detailed",
6034
+ onEdit,
6035
+ onDelete,
6036
+ editLabel,
6037
+ deleteLabel,
6038
+ moreActionsLabel,
6039
+ formatScope,
6040
+ formatTimeAgo,
6041
+ formatUsageCount,
6042
+ formatMoreTags,
6043
+ className,
6044
+ ref
6045
+ }) {
6046
+ const [menuOpen, setMenuOpen] = React28.useState(false);
6047
+ const menuRef = React28.useRef(null);
6048
+ const SourceIcon = SOURCE_ICONS[memory.source];
6049
+ const isDetailed = variant === "detailed";
6050
+ React28.useEffect(() => {
6051
+ if (!menuOpen) return;
6052
+ const handler = (event) => {
6053
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
6054
+ setMenuOpen(false);
6055
+ }
6056
+ };
6057
+ document.addEventListener("mousedown", handler);
6058
+ return () => document.removeEventListener("mousedown", handler);
6059
+ }, [menuOpen]);
6060
+ const visibleTags = memory.tags.slice(0, MAX_VISIBLE_TAGS);
6061
+ const hiddenTagCount = memory.tags.length - visibleTags.length;
6062
+ const actionsMenu = /* @__PURE__ */ jsxs("div", { ref: menuRef, className: "relative shrink-0", children: [
6063
+ /* @__PURE__ */ jsx(
6064
+ "button",
6065
+ {
6066
+ type: "button",
6067
+ onClick: () => setMenuOpen((open) => !open),
6068
+ "aria-label": moreActionsLabel,
6069
+ "aria-haspopup": "menu",
6070
+ "aria-expanded": menuOpen,
6071
+ className: cn53(memoryActionsMenuTriggerVariants({ variant })),
6072
+ children: /* @__PURE__ */ jsx(MoreVertIcon2, {})
6073
+ }
6074
+ ),
6075
+ menuOpen && /* @__PURE__ */ jsxs(
6076
+ "div",
6077
+ {
6078
+ role: "menu",
6079
+ className: cn53(
6080
+ "absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
6081
+ "bg-popover py-1 shadow-md"
6082
+ ),
6083
+ children: [
6084
+ onEdit && /* @__PURE__ */ jsx(
6085
+ "button",
6086
+ {
6087
+ type: "button",
6088
+ role: "menuitem",
6089
+ onClick: () => {
6090
+ onEdit(memory);
6091
+ setMenuOpen(false);
6092
+ },
6093
+ className: "flex w-full items-center px-3 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground",
6094
+ children: editLabel
6095
+ }
6096
+ ),
6097
+ onDelete && /* @__PURE__ */ jsx(
6098
+ "button",
6099
+ {
6100
+ type: "button",
6101
+ role: "menuitem",
6102
+ onClick: () => {
6103
+ onDelete(memory.id);
6104
+ setMenuOpen(false);
6105
+ },
6106
+ className: "flex w-full items-center px-3 py-2 text-sm text-destructive hover:bg-destructive/10",
6107
+ children: deleteLabel
6108
+ }
6109
+ )
6110
+ ]
6111
+ }
6112
+ )
6113
+ ] });
6114
+ return /* @__PURE__ */ jsx(
6115
+ "div",
6116
+ {
6117
+ ref,
6118
+ "data-slot": "memory-card",
6119
+ "data-variant": variant,
6120
+ className: cn53(memoryCardVariants({ variant }), className),
6121
+ children: isDetailed ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
6122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
6123
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
6124
+ /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-muted p-2 text-muted-foreground", children: /* @__PURE__ */ jsx(SourceIcon, {}) }),
6125
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
6126
+ /* @__PURE__ */ jsx("h3", { className: "line-clamp-1 text-base font-semibold", children: memory.title }),
6127
+ /* @__PURE__ */ jsx(
6128
+ "span",
6129
+ {
6130
+ className: cn53(
6131
+ memoryScopeBadgeVariants({ scope: memory.scope, bordered: true }),
6132
+ "mt-1"
6133
+ ),
6134
+ children: formatScope(memory.scope)
6135
+ }
6136
+ )
6137
+ ] })
6138
+ ] }),
6139
+ actionsMenu
6140
+ ] }),
6141
+ /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-sm text-muted-foreground", children: memory.content }),
6142
+ /* @__PURE__ */ jsxs("div", { "data-slot": "memory-tags", className: "flex flex-wrap gap-1", children: [
6143
+ visibleTags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn53(memoryTagBadgeVariants()), children: tag }, tag)),
6144
+ hiddenTagCount > 0 && /* @__PURE__ */ jsx("span", { className: cn53(memoryTagBadgeVariants()), children: formatMoreTags(hiddenTagCount) })
6145
+ ] }),
6146
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t pt-2 text-xs text-muted-foreground", children: [
6147
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
6148
+ /* @__PURE__ */ jsx(ClockIcon3, {}),
6149
+ formatTimeAgo(memory.createdAt)
6150
+ ] }),
6151
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
6152
+ /* @__PURE__ */ jsx(TagIcon, {}),
6153
+ formatUsageCount(memory.usageCount)
6154
+ ] })
6155
+ ] })
6156
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
6157
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
6158
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
6159
+ /* @__PURE__ */ jsx("h3", { className: "line-clamp-1 text-sm font-medium", children: memory.title }),
6160
+ /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground", children: memory.content })
6161
+ ] }),
6162
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1 text-muted-foreground", children: [
6163
+ /* @__PURE__ */ jsx(SourceIcon, {}),
6164
+ actionsMenu
6165
+ ] })
6166
+ ] }),
6167
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 text-xs text-muted-foreground", children: [
6168
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6169
+ /* @__PURE__ */ jsx(
6170
+ "span",
6171
+ {
6172
+ className: cn53(memoryScopeBadgeVariants({ scope: memory.scope, bordered: false })),
6173
+ children: formatScope(memory.scope)
6174
+ }
6175
+ ),
6176
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
6177
+ /* @__PURE__ */ jsx(ClockIcon3, {}),
6178
+ formatTimeAgo(memory.createdAt)
6179
+ ] })
6180
+ ] }),
6181
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
6182
+ /* @__PURE__ */ jsx(TagIcon, {}),
6183
+ formatUsageCount(memory.usageCount)
6184
+ ] })
6185
+ ] })
6186
+ ] })
6187
+ }
6188
+ );
6189
+ }
6190
+ MosaicMemoryCard.displayName = "MosaicMemoryCard";
6191
+ function cn54(...classes) {
6192
+ return classes.filter(Boolean).join(" ");
6193
+ }
5830
6194
  function SearchIcon() {
5831
6195
  return /* @__PURE__ */ jsxs(
5832
6196
  "svg",
@@ -5884,10 +6248,10 @@ function MosaicSelectorModal({
5884
6248
  emptyMessage,
5885
6249
  closeAriaLabel
5886
6250
  }) {
5887
- const [query, setQuery] = React27.useState("");
5888
- const [activeCategory, setActiveCategory] = React27.useState("all");
5889
- const [pendingId, setPendingId] = React27.useState(selectedId);
5890
- React27.useEffect(() => {
6251
+ const [query, setQuery] = React28.useState("");
6252
+ const [activeCategory, setActiveCategory] = React28.useState("all");
6253
+ const [pendingId, setPendingId] = React28.useState(selectedId);
6254
+ React28.useEffect(() => {
5891
6255
  if (isOpen) {
5892
6256
  setPendingId(selectedId);
5893
6257
  setQuery("");
@@ -5925,7 +6289,7 @@ function MosaicSelectorModal({
5925
6289
  value: query,
5926
6290
  onChange: (e) => setQuery(e.target.value),
5927
6291
  placeholder: searchPlaceholder,
5928
- className: cn53(
6292
+ className: cn54(
5929
6293
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
5930
6294
  "text-sm text-foreground placeholder:text-muted-foreground",
5931
6295
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -5939,7 +6303,7 @@ function MosaicSelectorModal({
5939
6303
  {
5940
6304
  type: "button",
5941
6305
  onClick: () => setActiveCategory("all"),
5942
- className: cn53(
6306
+ className: cn54(
5943
6307
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
5944
6308
  activeCategory === "all" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
5945
6309
  ),
@@ -5951,7 +6315,7 @@ function MosaicSelectorModal({
5951
6315
  {
5952
6316
  type: "button",
5953
6317
  onClick: () => setActiveCategory(cat.id),
5954
- className: cn53(
6318
+ className: cn54(
5955
6319
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
5956
6320
  activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
5957
6321
  ),
@@ -5963,7 +6327,7 @@ function MosaicSelectorModal({
5963
6327
  /* @__PURE__ */ jsxs(
5964
6328
  "div",
5965
6329
  {
5966
- className: cn53(
6330
+ className: cn54(
5967
6331
  "max-h-[50vh] overflow-y-auto",
5968
6332
  columns === 2 ? "grid grid-cols-1 gap-3 sm:grid-cols-2" : "flex flex-col gap-3"
5969
6333
  ),
@@ -5975,7 +6339,7 @@ function MosaicSelectorModal({
5975
6339
  {
5976
6340
  type: "button",
5977
6341
  onClick: () => setPendingId(item.id),
5978
- className: cn53(
6342
+ className: cn54(
5979
6343
  "group relative rounded-lg border p-4 text-left transition-all duration-150",
5980
6344
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
5981
6345
  isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50"
@@ -6013,7 +6377,7 @@ function MosaicSelectorModal({
6013
6377
  {
6014
6378
  type: "button",
6015
6379
  onClick: onClose,
6016
- className: cn53(
6380
+ className: cn54(
6017
6381
  "inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
6018
6382
  "bg-background px-4 py-2 text-sm font-medium text-foreground",
6019
6383
  "hover:bg-accent hover:text-accent-foreground",
@@ -6028,7 +6392,7 @@ function MosaicSelectorModal({
6028
6392
  type: "button",
6029
6393
  onClick: handleConfirm,
6030
6394
  disabled: !pendingItem,
6031
- className: cn53(
6395
+ className: cn54(
6032
6396
  "inline-flex min-h-[44px] items-center justify-center rounded-md",
6033
6397
  "bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
6034
6398
  "hover:bg-primary/90",
@@ -6044,7 +6408,7 @@ function MosaicSelectorModal({
6044
6408
  );
6045
6409
  }
6046
6410
  MosaicSelectorModal.displayName = "MosaicSelectorModal";
6047
- function cn54(...classes) {
6411
+ function cn55(...classes) {
6048
6412
  return classes.filter(Boolean).join(" ");
6049
6413
  }
6050
6414
  function relativeTime(ts) {
@@ -6244,13 +6608,13 @@ function MosaicMessageCard({
6244
6608
  copyMessageLabel,
6245
6609
  className
6246
6610
  }) {
6247
- const [bookmarked, setBookmarked] = React27.useState(message.bookmarked ?? false);
6248
- const [likes, setLikes] = React27.useState(message.reactions?.likes ?? 0);
6249
- const [dislikes, setDislikes] = React27.useState(message.reactions?.dislikes ?? 0);
6250
- const [hasLiked, setHasLiked] = React27.useState(false);
6251
- const [hasDisliked, setHasDisliked] = React27.useState(false);
6252
- const [menuOpen, setMenuOpen] = React27.useState(false);
6253
- const menuRef = React27.useRef(null);
6611
+ const [bookmarked, setBookmarked] = React28.useState(message.bookmarked ?? false);
6612
+ const [likes, setLikes] = React28.useState(message.reactions?.likes ?? 0);
6613
+ const [dislikes, setDislikes] = React28.useState(message.reactions?.dislikes ?? 0);
6614
+ const [hasLiked, setHasLiked] = React28.useState(false);
6615
+ const [hasDisliked, setHasDisliked] = React28.useState(false);
6616
+ const [menuOpen, setMenuOpen] = React28.useState(false);
6617
+ const menuRef = React28.useRef(null);
6254
6618
  const initials = message.sender.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
6255
6619
  const handleLike = () => {
6256
6620
  if (hasLiked) {
@@ -6288,7 +6652,7 @@ function MosaicMessageCard({
6288
6652
  navigator.clipboard.writeText(message.content).catch(() => null);
6289
6653
  onCopy?.(message.id, message.content);
6290
6654
  };
6291
- React27.useEffect(() => {
6655
+ React28.useEffect(() => {
6292
6656
  if (!menuOpen) return;
6293
6657
  const h = (e) => {
6294
6658
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -6300,7 +6664,7 @@ function MosaicMessageCard({
6300
6664
  "div",
6301
6665
  {
6302
6666
  "data-slot": "message-card",
6303
- className: cn54(
6667
+ className: cn55(
6304
6668
  "rounded-lg border border-border bg-card p-4 shadow-sm transition-shadow hover:shadow-md",
6305
6669
  compact && "p-3",
6306
6670
  message.sender.type === "user" && "bg-primary/5",
@@ -6310,7 +6674,7 @@ function MosaicMessageCard({
6310
6674
  /* @__PURE__ */ jsx(
6311
6675
  "span",
6312
6676
  {
6313
- className: cn54(
6677
+ className: cn55(
6314
6678
  "inline-flex shrink-0 items-center justify-center rounded-full text-white font-semibold",
6315
6679
  compact ? "h-8 w-8 text-xs" : "h-10 w-10 text-sm",
6316
6680
  message.sender.accentColor ?? "bg-muted text-muted-foreground"
@@ -6328,7 +6692,7 @@ function MosaicMessageCard({
6328
6692
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
6329
6693
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
6330
6694
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6331
- /* @__PURE__ */ jsx("span", { className: cn54("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
6695
+ /* @__PURE__ */ jsx("span", { className: cn55("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
6332
6696
  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" })
6333
6697
  ] }),
6334
6698
  /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: relativeTime(message.timestamp) })
@@ -6336,7 +6700,7 @@ function MosaicMessageCard({
6336
6700
  /* @__PURE__ */ jsx(
6337
6701
  "p",
6338
6702
  {
6339
- className: cn54(
6703
+ className: cn55(
6340
6704
  "leading-relaxed text-foreground mb-3",
6341
6705
  compact ? "text-sm" : "text-base"
6342
6706
  ),
@@ -6351,7 +6715,7 @@ function MosaicMessageCard({
6351
6715
  {
6352
6716
  type: "button",
6353
6717
  onClick: handleLike,
6354
- className: cn54(
6718
+ className: cn55(
6355
6719
  "inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
6356
6720
  "hover:bg-accent hover:text-accent-foreground",
6357
6721
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6369,7 +6733,7 @@ function MosaicMessageCard({
6369
6733
  {
6370
6734
  type: "button",
6371
6735
  onClick: handleDislike,
6372
- className: cn54(
6736
+ className: cn55(
6373
6737
  "inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
6374
6738
  "hover:bg-accent hover:text-accent-foreground",
6375
6739
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6414,7 +6778,7 @@ function MosaicMessageCard({
6414
6778
  {
6415
6779
  type: "button",
6416
6780
  onClick: handleBookmark,
6417
- className: cn54(
6781
+ className: cn55(
6418
6782
  "inline-flex h-8 w-8 items-center justify-center rounded-md",
6419
6783
  "hover:bg-accent hover:text-accent-foreground",
6420
6784
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6515,7 +6879,7 @@ function MosaicMessageCard({
6515
6879
  );
6516
6880
  }
6517
6881
  MosaicMessageCard.displayName = "MosaicMessageCard";
6518
- function cn55(...classes) {
6882
+ function cn56(...classes) {
6519
6883
  return classes.filter(Boolean).join(" ");
6520
6884
  }
6521
6885
  function SearchIcon2() {
@@ -6561,11 +6925,11 @@ function MessageListDesktop({
6561
6925
  copyMessageLabel,
6562
6926
  className
6563
6927
  }) {
6564
- const [query, setQuery] = React27.useState("");
6928
+ const [query, setQuery] = React28.useState("");
6565
6929
  const filtered = query ? messages.filter(
6566
6930
  (m) => m.content.toLowerCase().includes(query.toLowerCase()) || m.sender.name.toLowerCase().includes(query.toLowerCase())
6567
6931
  ) : messages;
6568
- return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-desktop", className: cn55("flex h-full flex-col", className), children: [
6932
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-desktop", className: cn56("flex h-full flex-col", className), children: [
6569
6933
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
6570
6934
  title && /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: title }),
6571
6935
  /* @__PURE__ */ jsxs("div", { className: "relative ml-auto max-w-xs flex-1", children: [
@@ -6577,7 +6941,7 @@ function MessageListDesktop({
6577
6941
  value: query,
6578
6942
  onChange: (e) => setQuery(e.target.value),
6579
6943
  placeholder: searchPlaceholder,
6580
- className: cn55(
6944
+ className: cn56(
6581
6945
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
6582
6946
  "text-sm placeholder:text-muted-foreground",
6583
6947
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6613,7 +6977,7 @@ function MessageListDesktop({
6613
6977
  {
6614
6978
  type: "button",
6615
6979
  onClick: onLoadMore,
6616
- className: cn55(
6980
+ className: cn56(
6617
6981
  "w-full rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
6618
6982
  "hover:bg-accent hover:text-accent-foreground",
6619
6983
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6644,7 +7008,7 @@ function MessageListMobile({
6644
7008
  copyMessageLabel,
6645
7009
  className
6646
7010
  }) {
6647
- return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-mobile", className: cn55("flex flex-col", className), children: [
7011
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "message-list-mobile", className: cn56("flex flex-col", className), children: [
6648
7012
  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 }) }),
6649
7013
  /* @__PURE__ */ jsxs("div", { className: "space-y-3 p-4", children: [
6650
7014
  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)) }),
@@ -6674,7 +7038,7 @@ function MessageListMobile({
6674
7038
  {
6675
7039
  type: "button",
6676
7040
  onClick: onLoadMore,
6677
- className: cn55(
7041
+ className: cn56(
6678
7042
  "w-full min-h-[44px] rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
6679
7043
  "hover:bg-accent hover:text-accent-foreground",
6680
7044
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6689,7 +7053,7 @@ function MosaicMessageList(props) {
6689
7053
  return isMobile ? /* @__PURE__ */ jsx(MessageListMobile, { ...props }) : /* @__PURE__ */ jsx(MessageListDesktop, { ...props });
6690
7054
  }
6691
7055
  MosaicMessageList.displayName = "MosaicMessageList";
6692
- function cn56(...classes) {
7056
+ function cn57(...classes) {
6693
7057
  return classes.filter(Boolean).join(" ");
6694
7058
  }
6695
7059
  function ChevronLeftIcon2() {
@@ -6769,7 +7133,7 @@ function MosaicFilterSidebar({
6769
7133
  {
6770
7134
  "data-slot": "filter-sidebar",
6771
7135
  style: { width, minWidth: isCollapsed && !isMobile ? "64px" : void 0 },
6772
- className: cn56(
7136
+ className: cn57(
6773
7137
  "relative flex flex-col border-r border-border bg-card",
6774
7138
  "transition-[width] duration-200 ease-in-out",
6775
7139
  "overflow-hidden",
@@ -6781,7 +7145,7 @@ function MosaicFilterSidebar({
6781
7145
  {
6782
7146
  type: "button",
6783
7147
  onClick: onToggleCollapse,
6784
- className: cn56(
7148
+ className: cn57(
6785
7149
  "absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center rounded-full",
6786
7150
  "border border-border bg-background shadow-sm",
6787
7151
  "hover:bg-accent hover:text-accent-foreground",
@@ -6811,7 +7175,7 @@ function MosaicFilterSidebar({
6811
7175
  {
6812
7176
  type: "button",
6813
7177
  onClick: () => onFilterChange(f.id),
6814
- className: cn56(
7178
+ className: cn57(
6815
7179
  "flex min-h-[40px] items-center justify-between rounded-md px-3 py-2 text-sm font-medium",
6816
7180
  "transition-colors hover:bg-accent hover:text-accent-foreground",
6817
7181
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -6831,7 +7195,7 @@ function MosaicFilterSidebar({
6831
7195
  {
6832
7196
  type: "button",
6833
7197
  onClick: () => onCategoryChange(cat.id),
6834
- className: cn56(
7198
+ className: cn57(
6835
7199
  "flex min-h-[36px] items-center justify-between rounded-md px-3 py-1.5 text-sm",
6836
7200
  "transition-colors hover:bg-accent hover:text-accent-foreground",
6837
7201
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -6851,7 +7215,7 @@ function MosaicFilterSidebar({
6851
7215
  );
6852
7216
  }
6853
7217
  MosaicFilterSidebar.displayName = "MosaicFilterSidebar";
6854
- function cn57(...classes) {
7218
+ function cn58(...classes) {
6855
7219
  return classes.filter(Boolean).join(" ");
6856
7220
  }
6857
7221
  function SearchIcon3() {
@@ -6937,8 +7301,8 @@ function AgentListDesktop({
6937
7301
  collapseSidebarAriaLabel,
6938
7302
  expandSidebarAriaLabel
6939
7303
  }) {
6940
- const [query, setQuery] = React27.useState("");
6941
- const [sidebarCollapsed, setSidebarCollapsed] = React27.useState(false);
7304
+ const [query, setQuery] = React28.useState("");
7305
+ const [sidebarCollapsed, setSidebarCollapsed] = React28.useState(false);
6942
7306
  const filtered = agents.filter(
6943
7307
  (a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
6944
7308
  );
@@ -6976,7 +7340,7 @@ function AgentListDesktop({
6976
7340
  value: query,
6977
7341
  onChange: (e) => setQuery(e.target.value),
6978
7342
  placeholder: searchPlaceholder,
6979
- className: cn57(
7343
+ className: cn58(
6980
7344
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
6981
7345
  "text-sm placeholder:text-muted-foreground",
6982
7346
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -6989,7 +7353,7 @@ function AgentListDesktop({
6989
7353
  {
6990
7354
  type: "button",
6991
7355
  onClick: onCreateAgent,
6992
- className: cn57(
7356
+ className: cn58(
6993
7357
  "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
6994
7358
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
6995
7359
  ),
@@ -7043,8 +7407,8 @@ function AgentListMobile({
7043
7407
  collapseSidebarAriaLabel,
7044
7408
  expandSidebarAriaLabel
7045
7409
  }) {
7046
- const [filterOpen, setFilterOpen] = React27.useState(false);
7047
- const [query, setQuery] = React27.useState("");
7410
+ const [filterOpen, setFilterOpen] = React28.useState(false);
7411
+ const [query, setQuery] = React28.useState("");
7048
7412
  const filtered = agents.filter(
7049
7413
  (a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
7050
7414
  );
@@ -7058,7 +7422,7 @@ function AgentListMobile({
7058
7422
  {
7059
7423
  type: "button",
7060
7424
  onClick: () => setFilterOpen(true),
7061
- className: cn57(
7425
+ className: cn58(
7062
7426
  "inline-flex h-9 w-9 items-center justify-center rounded-md",
7063
7427
  "border border-border bg-background text-foreground",
7064
7428
  "hover:bg-accent hover:text-accent-foreground",
@@ -7073,7 +7437,7 @@ function AgentListMobile({
7073
7437
  {
7074
7438
  type: "button",
7075
7439
  onClick: onCreateAgent,
7076
- className: cn57(
7440
+ className: cn58(
7077
7441
  "inline-flex h-9 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground",
7078
7442
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
7079
7443
  ),
@@ -7094,7 +7458,7 @@ function AgentListMobile({
7094
7458
  value: query,
7095
7459
  onChange: (e) => setQuery(e.target.value),
7096
7460
  placeholder: searchPlaceholder,
7097
- className: cn57(
7461
+ className: cn58(
7098
7462
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
7099
7463
  "text-sm placeholder:text-muted-foreground",
7100
7464
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7156,7 +7520,7 @@ function MosaicAgentList(props) {
7156
7520
  return isMobile ? /* @__PURE__ */ jsx(AgentListMobile, { ...props }) : /* @__PURE__ */ jsx(AgentListDesktop, { ...props });
7157
7521
  }
7158
7522
  MosaicAgentList.displayName = "MosaicAgentList";
7159
- function cn58(...classes) {
7523
+ function cn59(...classes) {
7160
7524
  return classes.filter(Boolean).join(" ");
7161
7525
  }
7162
7526
  function StarIcon({ filled }) {
@@ -7253,7 +7617,7 @@ function MarketplaceCard({
7253
7617
  "div",
7254
7618
  {
7255
7619
  "data-slot": "marketplace-card",
7256
- className: cn58(
7620
+ className: cn59(
7257
7621
  "rounded-lg border border-border bg-card p-4 transition-shadow hover:shadow-md",
7258
7622
  compact ? "flex items-center gap-3" : "flex flex-col gap-3"
7259
7623
  ),
@@ -7261,7 +7625,7 @@ function MarketplaceCard({
7261
7625
  item.icon && /* @__PURE__ */ jsx(
7262
7626
  "div",
7263
7627
  {
7264
- className: cn58(
7628
+ className: cn59(
7265
7629
  "flex shrink-0 items-center justify-center rounded-lg",
7266
7630
  compact ? "h-10 w-10" : "h-12 w-12",
7267
7631
  item.accentClass ?? "bg-muted text-muted-foreground"
@@ -7272,7 +7636,7 @@ function MarketplaceCard({
7272
7636
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
7273
7637
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
7274
7638
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
7275
- /* @__PURE__ */ jsx("p", { className: cn58("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
7639
+ /* @__PURE__ */ jsx("p", { className: cn59("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
7276
7640
  item.description && !compact && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground line-clamp-2", children: item.description })
7277
7641
  ] }),
7278
7642
  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 })
@@ -7289,13 +7653,13 @@ function MarketplaceCard({
7289
7653
  ] })
7290
7654
  ] })
7291
7655
  ] }),
7292
- /* @__PURE__ */ jsxs("div", { className: cn58("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
7656
+ /* @__PURE__ */ jsxs("div", { className: cn59("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
7293
7657
  onPreview && /* @__PURE__ */ jsx(
7294
7658
  "button",
7295
7659
  {
7296
7660
  type: "button",
7297
7661
  onClick: () => onPreview(item.id),
7298
- className: cn58(
7662
+ className: cn59(
7299
7663
  "inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
7300
7664
  "bg-background px-3 text-xs font-medium text-foreground",
7301
7665
  "hover:bg-accent hover:text-accent-foreground",
@@ -7309,7 +7673,7 @@ function MarketplaceCard({
7309
7673
  {
7310
7674
  type: "button",
7311
7675
  onClick: () => onUninstall(item.id),
7312
- className: cn58(
7676
+ className: cn59(
7313
7677
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
7314
7678
  "bg-secondary px-3 text-xs font-medium text-secondary-foreground",
7315
7679
  "hover:bg-secondary/80",
@@ -7322,7 +7686,7 @@ function MarketplaceCard({
7322
7686
  {
7323
7687
  type: "button",
7324
7688
  onClick: () => onInstall(item.id),
7325
- className: cn58(
7689
+ className: cn59(
7326
7690
  "inline-flex min-h-[36px] items-center justify-center rounded-md",
7327
7691
  "bg-primary px-3 text-xs font-medium text-primary-foreground",
7328
7692
  "hover:bg-primary/90",
@@ -7359,8 +7723,8 @@ function MarketplaceListDesktop(props) {
7359
7723
  collapseSidebarAriaLabel,
7360
7724
  expandSidebarAriaLabel
7361
7725
  } = props;
7362
- const [query, setQuery] = React27.useState("");
7363
- const [sidebarCollapsed, setSidebarCollapsed] = React27.useState(false);
7726
+ const [query, setQuery] = React28.useState("");
7727
+ const [sidebarCollapsed, setSidebarCollapsed] = React28.useState(false);
7364
7728
  const filtered = items.filter(
7365
7729
  (i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
7366
7730
  );
@@ -7394,7 +7758,7 @@ function MarketplaceListDesktop(props) {
7394
7758
  value: query,
7395
7759
  onChange: (e) => setQuery(e.target.value),
7396
7760
  placeholder: searchPlaceholder,
7397
- className: cn58(
7761
+ className: cn59(
7398
7762
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
7399
7763
  "text-sm placeholder:text-muted-foreground",
7400
7764
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7448,8 +7812,8 @@ function MarketplaceListMobile(props) {
7448
7812
  collapseSidebarAriaLabel,
7449
7813
  expandSidebarAriaLabel
7450
7814
  } = props;
7451
- const [filterOpen, setFilterOpen] = React27.useState(false);
7452
- const [query, setQuery] = React27.useState("");
7815
+ const [filterOpen, setFilterOpen] = React28.useState(false);
7816
+ const [query, setQuery] = React28.useState("");
7453
7817
  const filtered = items.filter(
7454
7818
  (i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
7455
7819
  );
@@ -7477,7 +7841,7 @@ function MarketplaceListMobile(props) {
7477
7841
  value: query,
7478
7842
  onChange: (e) => setQuery(e.target.value),
7479
7843
  placeholder: searchPlaceholder,
7480
- className: cn58(
7844
+ className: cn59(
7481
7845
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
7482
7846
  "text-sm placeholder:text-muted-foreground",
7483
7847
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -7542,7 +7906,7 @@ function MosaicMarketplaceList(props) {
7542
7906
  return isMobile ? /* @__PURE__ */ jsx(MarketplaceListMobile, { ...props }) : /* @__PURE__ */ jsx(MarketplaceListDesktop, { ...props });
7543
7907
  }
7544
7908
  MosaicMarketplaceList.displayName = "MosaicMarketplaceList";
7545
- function cn59(...classes) {
7909
+ function cn60(...classes) {
7546
7910
  return classes.filter(Boolean).join(" ");
7547
7911
  }
7548
7912
  function StarIcon2() {
@@ -7663,7 +8027,7 @@ function MosaicTemplateCard({
7663
8027
  type: "button",
7664
8028
  onClick: () => onSelect(template),
7665
8029
  "data-slot": "template-card",
7666
- className: cn59(
8030
+ className: cn60(
7667
8031
  "w-full text-left rounded-lg border transition-all duration-200",
7668
8032
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
7669
8033
  isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50",
@@ -7764,7 +8128,7 @@ function MosaicTemplatePreview({
7764
8128
  agent.accentColor && /* @__PURE__ */ jsx(
7765
8129
  "span",
7766
8130
  {
7767
- className: cn59("h-2 w-2 rounded-full", agent.accentColor),
8131
+ className: cn60("h-2 w-2 rounded-full", agent.accentColor),
7768
8132
  "aria-hidden": "true"
7769
8133
  }
7770
8134
  ),
@@ -7824,7 +8188,7 @@ function MosaicAgentTeamPreview({ agents, label }) {
7824
8188
  agent.accentColor && /* @__PURE__ */ jsx(
7825
8189
  "span",
7826
8190
  {
7827
- className: cn59("h-2.5 w-2.5 rounded-full", agent.accentColor),
8191
+ className: cn60("h-2.5 w-2.5 rounded-full", agent.accentColor),
7828
8192
  "aria-hidden": "true"
7829
8193
  }
7830
8194
  ),
@@ -7848,7 +8212,7 @@ function MosaicQuickStartPanel({
7848
8212
  scratchLabel,
7849
8213
  className
7850
8214
  }) {
7851
- return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-start-panel", className: cn59("flex flex-col gap-6", className), children: [
8215
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "quick-start-panel", className: cn60("flex flex-col gap-6", className), children: [
7852
8216
  scenarios.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
7853
8217
  /* @__PURE__ */ jsx("h3", { className: "mb-3 text-sm font-semibold text-foreground", children: scenariosTitle }),
7854
8218
  /* @__PURE__ */ jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: scenarios.map((scenario) => /* @__PURE__ */ jsxs(
@@ -7856,7 +8220,7 @@ function MosaicQuickStartPanel({
7856
8220
  {
7857
8221
  type: "button",
7858
8222
  onClick: () => onSelectScenario(scenario),
7859
- className: cn59(
8223
+ className: cn60(
7860
8224
  "flex items-start gap-3 rounded-lg border border-border bg-card p-4 text-left",
7861
8225
  "hover:border-primary/50 hover:bg-primary/5",
7862
8226
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -7888,7 +8252,7 @@ function MosaicQuickStartPanel({
7888
8252
  {
7889
8253
  type: "button",
7890
8254
  onClick: () => onSelectPreset(preset),
7891
- className: cn59(
8255
+ className: cn60(
7892
8256
  "flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left",
7893
8257
  "hover:border-primary/50",
7894
8258
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -7902,7 +8266,7 @@ function MosaicQuickStartPanel({
7902
8266
  a.accentColor && /* @__PURE__ */ jsx(
7903
8267
  "span",
7904
8268
  {
7905
- className: cn59("h-2 w-2 rounded-full", a.accentColor),
8269
+ className: cn60("h-2 w-2 rounded-full", a.accentColor),
7906
8270
  "aria-hidden": "true"
7907
8271
  }
7908
8272
  ),
@@ -7920,7 +8284,7 @@ function MosaicQuickStartPanel({
7920
8284
  {
7921
8285
  type: "button",
7922
8286
  onClick: onStartFromScratch,
7923
- className: cn59(
8287
+ className: cn60(
7924
8288
  "inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
7925
8289
  "bg-background px-4 text-sm font-medium text-foreground",
7926
8290
  "hover:bg-accent hover:text-accent-foreground",
@@ -7959,9 +8323,9 @@ function TemplateGalleryContent({
7959
8323
  duplicateLabel,
7960
8324
  isMobile
7961
8325
  }) {
7962
- const [query, setQuery] = React27.useState("");
7963
- const [filterOpen, setFilterOpen] = React27.useState(false);
7964
- const [sidebarCollapsed, setSidebarCollapsed] = React27.useState(false);
8326
+ const [query, setQuery] = React28.useState("");
8327
+ const [filterOpen, setFilterOpen] = React28.useState(false);
8328
+ const [sidebarCollapsed, setSidebarCollapsed] = React28.useState(false);
7965
8329
  const filtered = templates.filter(
7966
8330
  (t) => !query || t.name.toLowerCase().includes(query.toLowerCase()) || (t.description ?? "").toLowerCase().includes(query.toLowerCase())
7967
8331
  );
@@ -8014,7 +8378,7 @@ function TemplateGalleryContent({
8014
8378
  value: query,
8015
8379
  onChange: (e) => setQuery(e.target.value),
8016
8380
  placeholder: searchPlaceholder,
8017
- className: cn59(
8381
+ className: cn60(
8018
8382
  "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"
8019
8383
  )
8020
8384
  }
@@ -8065,7 +8429,7 @@ function TemplateGalleryContent({
8065
8429
  value: query,
8066
8430
  onChange: (e) => setQuery(e.target.value),
8067
8431
  placeholder: searchPlaceholder,
8068
- className: cn59(
8432
+ className: cn60(
8069
8433
  "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"
8070
8434
  )
8071
8435
  }
@@ -8097,7 +8461,7 @@ function MosaicTemplateGallery(props) {
8097
8461
  return /* @__PURE__ */ jsx(TemplateGalleryContent, { ...props, isMobile });
8098
8462
  }
8099
8463
  MosaicTemplateGallery.displayName = "MosaicTemplateGallery";
8100
- function cn60(...classes) {
8464
+ function cn61(...classes) {
8101
8465
  return classes.filter(Boolean).join(" ");
8102
8466
  }
8103
8467
  function PlusIcon5() {
@@ -8142,7 +8506,7 @@ function SearchIcon6() {
8142
8506
  }
8143
8507
  );
8144
8508
  }
8145
- function MoreVertIcon2() {
8509
+ function MoreVertIcon3() {
8146
8510
  return /* @__PURE__ */ jsxs(
8147
8511
  "svg",
8148
8512
  {
@@ -8200,7 +8564,7 @@ function MosaicModuleForm({
8200
8564
  createItemLabel,
8201
8565
  tagListAddPlaceholder
8202
8566
  }) {
8203
- const [formData, setFormData] = React27.useState({
8567
+ const [formData, setFormData] = React28.useState({
8204
8568
  name: item?.name ?? "",
8205
8569
  description: item?.description ?? "",
8206
8570
  icon: item?.icon ?? "",
@@ -8211,7 +8575,7 @@ function MosaicModuleForm({
8211
8575
  formFields.map((f) => [f.id, item?.[f.id] ?? (f.type === "tag-list" ? [] : "")])
8212
8576
  )
8213
8577
  });
8214
- const [tagInputs, setTagInputs] = React27.useState({});
8578
+ const [tagInputs, setTagInputs] = React28.useState({});
8215
8579
  const update = (key, value) => {
8216
8580
  setFormData((prev) => ({ ...prev, [key]: value }));
8217
8581
  };
@@ -8249,7 +8613,7 @@ function MosaicModuleForm({
8249
8613
  onChange: (e) => update("name", e.target.value),
8250
8614
  placeholder: namePlaceholder,
8251
8615
  required: true,
8252
- className: cn60(
8616
+ className: cn61(
8253
8617
  "w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
8254
8618
  "text-sm placeholder:text-muted-foreground",
8255
8619
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8267,7 +8631,7 @@ function MosaicModuleForm({
8267
8631
  onChange: (e) => update("description", e.target.value),
8268
8632
  placeholder: descriptionPlaceholder,
8269
8633
  rows: 3,
8270
- className: cn60(
8634
+ className: cn61(
8271
8635
  "w-full rounded-md border border-input bg-background px-3 py-2",
8272
8636
  "text-sm placeholder:text-muted-foreground resize-none",
8273
8637
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8289,7 +8653,7 @@ function MosaicModuleForm({
8289
8653
  value: formData[field.id] ?? "",
8290
8654
  onChange: (e) => update(field.id, e.target.value),
8291
8655
  placeholder: field.placeholder,
8292
- className: cn60(
8656
+ className: cn61(
8293
8657
  "w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
8294
8658
  "text-sm placeholder:text-muted-foreground",
8295
8659
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8304,7 +8668,7 @@ function MosaicModuleForm({
8304
8668
  onChange: (e) => update(field.id, e.target.value),
8305
8669
  placeholder: field.placeholder,
8306
8670
  rows: 3,
8307
- className: cn60(
8671
+ className: cn61(
8308
8672
  "w-full rounded-md border border-input bg-background px-3 py-2",
8309
8673
  "text-sm placeholder:text-muted-foreground resize-none",
8310
8674
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8320,7 +8684,7 @@ function MosaicModuleForm({
8320
8684
  onChange: (e) => update(field.id, e.target.value),
8321
8685
  placeholder: field.placeholder ?? "\u{1F9E0}",
8322
8686
  maxLength: 4,
8323
- className: cn60(
8687
+ className: cn61(
8324
8688
  "w-20 rounded-md border border-input bg-background px-3 py-2 text-2xl",
8325
8689
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8326
8690
  )
@@ -8341,7 +8705,7 @@ function MosaicModuleForm({
8341
8705
  }
8342
8706
  },
8343
8707
  placeholder: field.placeholder ?? tagListAddPlaceholder,
8344
- className: cn60(
8708
+ className: cn61(
8345
8709
  "flex-1 rounded-md border border-input bg-background px-3 py-2 min-h-[36px]",
8346
8710
  "text-sm placeholder:text-muted-foreground",
8347
8711
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8412,9 +8776,9 @@ function ModuleItemCard({
8412
8776
  editItemLabel,
8413
8777
  deleteItemLabel
8414
8778
  }) {
8415
- const [menuOpen, setMenuOpen] = React27.useState(false);
8416
- const menuRef = React27.useRef(null);
8417
- React27.useEffect(() => {
8779
+ const [menuOpen, setMenuOpen] = React28.useState(false);
8780
+ const menuRef = React28.useRef(null);
8781
+ React28.useEffect(() => {
8418
8782
  if (!menuOpen) return;
8419
8783
  const h = (e) => {
8420
8784
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -8447,7 +8811,7 @@ function ModuleItemCard({
8447
8811
  className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring opacity-0 group-hover:opacity-100 transition-opacity",
8448
8812
  "aria-label": itemActionsAriaLabel,
8449
8813
  "aria-haspopup": "menu",
8450
- children: /* @__PURE__ */ jsx(MoreVertIcon2, {})
8814
+ children: /* @__PURE__ */ jsx(MoreVertIcon3, {})
8451
8815
  }
8452
8816
  ),
8453
8817
  menuOpen && /* @__PURE__ */ jsxs(
@@ -8515,11 +8879,11 @@ function LibraryContent({
8515
8879
  editModalTitle,
8516
8880
  tagListAddPlaceholder
8517
8881
  }) {
8518
- const [query, setQuery] = React27.useState("");
8519
- const [activeTab, setActiveTab] = React27.useState(tabs?.[0]?.id ?? "all");
8520
- const [editorOpen, setEditorOpen] = React27.useState(false);
8521
- const [editingItem, setEditingItem] = React27.useState();
8522
- const [editorMode, setEditorMode] = React27.useState("create");
8882
+ const [query, setQuery] = React28.useState("");
8883
+ const [activeTab, setActiveTab] = React28.useState(tabs?.[0]?.id ?? "all");
8884
+ const [editorOpen, setEditorOpen] = React28.useState(false);
8885
+ const [editingItem, setEditingItem] = React28.useState();
8886
+ const [editorMode, setEditorMode] = React28.useState("create");
8523
8887
  const openCreate = () => {
8524
8888
  setEditingItem(void 0);
8525
8889
  setEditorMode("create");
@@ -8553,7 +8917,7 @@ function LibraryContent({
8553
8917
  {
8554
8918
  type: "button",
8555
8919
  onClick: openCreate,
8556
- className: cn60(
8920
+ className: cn61(
8557
8921
  "inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground",
8558
8922
  "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8559
8923
  ),
@@ -8573,7 +8937,7 @@ function LibraryContent({
8573
8937
  value: query,
8574
8938
  onChange: (e) => setQuery(e.target.value),
8575
8939
  placeholder: searchPlaceholder,
8576
- className: cn60(
8940
+ className: cn61(
8577
8941
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
8578
8942
  "text-sm placeholder:text-muted-foreground",
8579
8943
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8586,7 +8950,7 @@ function LibraryContent({
8586
8950
  {
8587
8951
  type: "button",
8588
8952
  onClick: () => setActiveTab(tab.id),
8589
- className: cn60(
8953
+ className: cn61(
8590
8954
  "rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
8591
8955
  activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
8592
8956
  ),
@@ -8640,7 +9004,7 @@ function MosaicModuleLibrary(props) {
8640
9004
  return /* @__PURE__ */ jsx(LibraryContent, { ...props });
8641
9005
  }
8642
9006
  MosaicModuleLibrary.displayName = "MosaicModuleLibrary";
8643
- function cn61(...classes) {
9007
+ function cn62(...classes) {
8644
9008
  return classes.filter(Boolean).join(" ");
8645
9009
  }
8646
9010
  var roleConfig = {
@@ -8667,7 +9031,7 @@ function MosaicOrgRoleBadge({ role, className }) {
8667
9031
  {
8668
9032
  "data-slot": "org-role-badge",
8669
9033
  title: config.description,
8670
- className: cn61(
9034
+ className: cn62(
8671
9035
  "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
8672
9036
  config.className,
8673
9037
  className
@@ -8684,13 +9048,13 @@ function MosaicMultiOrgIndicator({
8684
9048
  className
8685
9049
  }) {
8686
9050
  if (orgCount <= 1) return null;
8687
- return /* @__PURE__ */ jsxs("div", { "data-slot": "multi-org-indicator", className: cn61("flex items-center gap-2", className), children: [
9051
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "multi-org-indicator", className: cn62("flex items-center gap-2", className), children: [
8688
9052
  onSwitchOrg ? /* @__PURE__ */ jsxs(
8689
9053
  "button",
8690
9054
  {
8691
9055
  type: "button",
8692
9056
  onClick: onSwitchOrg,
8693
- className: cn61(
9057
+ className: cn62(
8694
9058
  "inline-flex items-center gap-1.5 rounded-full bg-secondary px-2.5 py-1 text-xs font-medium text-secondary-foreground",
8695
9059
  "hover:bg-secondary/80",
8696
9060
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -8743,10 +9107,10 @@ function MosaicCreateOrgDialog({
8743
9107
  creatingLabel,
8744
9108
  createLabel
8745
9109
  }) {
8746
- const [name, setName] = React27.useState("");
8747
- const [slug, setSlug] = React27.useState("");
8748
- const [description, setDescription] = React27.useState("");
8749
- const [errors, setErrors] = React27.useState({});
9110
+ const [name, setName] = React28.useState("");
9111
+ const [slug, setSlug] = React28.useState("");
9112
+ const [description, setDescription] = React28.useState("");
9113
+ const [errors, setErrors] = React28.useState({});
8750
9114
  const validate = () => {
8751
9115
  const errs = {};
8752
9116
  if (!name.trim()) errs.name = "Name is required";
@@ -8770,7 +9134,7 @@ function MosaicCreateOrgDialog({
8770
9134
  setErrors({});
8771
9135
  onOpenChange(false);
8772
9136
  };
8773
- React27.useEffect(() => {
9137
+ React28.useEffect(() => {
8774
9138
  if (!name) {
8775
9139
  setSlug("");
8776
9140
  return;
@@ -8804,7 +9168,7 @@ function MosaicCreateOrgDialog({
8804
9168
  onChange: (e) => setName(e.target.value),
8805
9169
  placeholder: orgNamePlaceholder,
8806
9170
  required: true,
8807
- className: cn61(
9171
+ className: cn62(
8808
9172
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
8809
9173
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8810
9174
  errors.name ? "border-destructive" : "border-input"
@@ -8824,7 +9188,7 @@ function MosaicCreateOrgDialog({
8824
9188
  onChange: (e) => setSlug(e.target.value),
8825
9189
  placeholder: "acme-inc",
8826
9190
  required: true,
8827
- className: cn61(
9191
+ className: cn62(
8828
9192
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
8829
9193
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8830
9194
  errors.slug ? "border-destructive" : "border-input"
@@ -8893,9 +9257,9 @@ function MosaicInviteMemberDialog({
8893
9257
  sendingLabel,
8894
9258
  sendInvitationLabel
8895
9259
  }) {
8896
- const [email, setEmail] = React27.useState("");
8897
- const [role, setRole] = React27.useState("member");
8898
- const [errors, setErrors] = React27.useState({});
9260
+ const [email, setEmail] = React28.useState("");
9261
+ const [role, setRole] = React28.useState("member");
9262
+ const [errors, setErrors] = React28.useState({});
8899
9263
  const validate = () => {
8900
9264
  const errs = {};
8901
9265
  if (!email.trim()) errs.email = "Email is required";
@@ -8937,7 +9301,7 @@ function MosaicInviteMemberDialog({
8937
9301
  onChange: (e) => setEmail(e.target.value),
8938
9302
  placeholder: emailPlaceholder,
8939
9303
  required: true,
8940
- className: cn61(
9304
+ className: cn62(
8941
9305
  "w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
8942
9306
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8943
9307
  errors.email ? "border-destructive" : "border-input"
@@ -8996,10 +9360,10 @@ function MemberRow({
8996
9360
  memberActionsAriaLabel,
8997
9361
  removeMemberLabel
8998
9362
  }) {
8999
- const [menuOpen, setMenuOpen] = React27.useState(false);
9000
- const menuRef = React27.useRef(null);
9363
+ const [menuOpen, setMenuOpen] = React28.useState(false);
9364
+ const menuRef = React28.useRef(null);
9001
9365
  const isSelf = member.id === currentUserId;
9002
- React27.useEffect(() => {
9366
+ React28.useEffect(() => {
9003
9367
  if (!menuOpen) return;
9004
9368
  const h = (e) => {
9005
9369
  if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
@@ -9120,11 +9484,11 @@ function MosaicMemberList({
9120
9484
  inviteLabel,
9121
9485
  className
9122
9486
  }) {
9123
- const [query, setQuery] = React27.useState("");
9487
+ const [query, setQuery] = React28.useState("");
9124
9488
  const filtered = members.filter(
9125
9489
  (m) => !query || m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
9126
9490
  );
9127
- return /* @__PURE__ */ jsxs("div", { "data-slot": "member-list", className: cn61("flex flex-col gap-4", className), children: [
9491
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "member-list", className: cn62("flex flex-col gap-4", className), children: [
9128
9492
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
9129
9493
  /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
9130
9494
  /* @__PURE__ */ jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxs(
@@ -9218,9 +9582,9 @@ function MosaicOrgPanel({
9218
9582
  className
9219
9583
  }) {
9220
9584
  const { isMobile } = useDevice();
9221
- const [activeTab, setActiveTab] = React27.useState(defaultTab ?? tabs[0]?.id ?? "");
9585
+ const [activeTab, setActiveTab] = React28.useState(defaultTab ?? tabs[0]?.id ?? "");
9222
9586
  const activeContent = tabs.find((t) => t.id === activeTab)?.content;
9223
- return /* @__PURE__ */ jsxs("div", { "data-slot": "org-panel", className: cn61("flex h-full flex-col", className), children: [
9587
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "org-panel", className: cn62("flex h-full flex-col", className), children: [
9224
9588
  /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-4 py-4 md:px-6", children: [
9225
9589
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
9226
9590
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
@@ -9242,12 +9606,12 @@ function MosaicOrgPanel({
9242
9606
  ] }),
9243
9607
  headerActions
9244
9608
  ] }),
9245
- tabs.length > 0 && /* @__PURE__ */ jsx("div", { className: cn61("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsx(
9609
+ tabs.length > 0 && /* @__PURE__ */ jsx("div", { className: cn62("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsx(
9246
9610
  "button",
9247
9611
  {
9248
9612
  type: "button",
9249
9613
  onClick: () => setActiveTab(tab.id),
9250
- className: cn61(
9614
+ className: cn62(
9251
9615
  "shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
9252
9616
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
9253
9617
  activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
@@ -9261,7 +9625,7 @@ function MosaicOrgPanel({
9261
9625
  ] });
9262
9626
  }
9263
9627
  MosaicOrgPanel.displayName = "MosaicOrgPanel";
9264
- function cn62(...classes) {
9628
+ function cn63(...classes) {
9265
9629
  return classes.filter(Boolean).join(" ");
9266
9630
  }
9267
9631
  var ANIM_ID8 = "mosaic-dashboard-content-kf";
@@ -9290,7 +9654,7 @@ function MosaicDashboardContent({
9290
9654
  className
9291
9655
  }) {
9292
9656
  const { isMobile } = useDevice();
9293
- React27.useEffect(() => {
9657
+ React28.useEffect(() => {
9294
9658
  injectStyles8();
9295
9659
  }, []);
9296
9660
  const activeView = views.find((v) => v.id === currentView);
@@ -9298,7 +9662,7 @@ function MosaicDashboardContent({
9298
9662
  "div",
9299
9663
  {
9300
9664
  "data-slot": "dashboard-content",
9301
- className: cn62("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
9665
+ className: cn63("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
9302
9666
  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: [
9303
9667
  "View not found: ",
9304
9668
  currentView
@@ -9307,7 +9671,7 @@ function MosaicDashboardContent({
9307
9671
  );
9308
9672
  }
9309
9673
  MosaicDashboardContent.displayName = "MosaicDashboardContent";
9310
- function cn63(...classes) {
9674
+ function cn64(...classes) {
9311
9675
  return classes.filter(Boolean).join(" ");
9312
9676
  }
9313
9677
  var ANIM_ID9 = "mosaic-dashboard-header2-kf";
@@ -9407,8 +9771,8 @@ function MosaicDashboardHeader({
9407
9771
  className
9408
9772
  }) {
9409
9773
  const { isMobile } = useDevice();
9410
- const [searchQuery, setSearchQuery] = React27.useState("");
9411
- React27.useEffect(() => {
9774
+ const [searchQuery, setSearchQuery] = React28.useState("");
9775
+ React28.useEffect(() => {
9412
9776
  injectStyles9();
9413
9777
  }, []);
9414
9778
  const handleSearch = (e) => {
@@ -9419,16 +9783,16 @@ function MosaicDashboardHeader({
9419
9783
  "header",
9420
9784
  {
9421
9785
  "data-slot": "dashboard-header",
9422
- className: cn63(
9786
+ className: cn64(
9423
9787
  "mosaic-dashboard-header2",
9424
9788
  "sticky top-0 z-40 border-b border-border/50 bg-background/80 backdrop-blur-sm",
9425
9789
  className
9426
9790
  ),
9427
- children: /* @__PURE__ */ jsx("div", { className: cn63(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: [
9791
+ children: /* @__PURE__ */ jsx("div", { className: cn64(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: [
9428
9792
  /* @__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: [
9429
9793
  logoSlot ?? /* @__PURE__ */ jsx(SparklesIcon4, {}),
9430
9794
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
9431
- /* @__PURE__ */ jsx("h1", { className: cn63("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
9795
+ /* @__PURE__ */ jsx("h1", { className: cn64("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
9432
9796
  subtitle && !isMobile && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground truncate", children: subtitle })
9433
9797
  ] })
9434
9798
  ] }) }),
@@ -9441,7 +9805,7 @@ function MosaicDashboardHeader({
9441
9805
  value: searchQuery,
9442
9806
  onChange: handleSearch,
9443
9807
  placeholder: searchPlaceholder,
9444
- className: cn63(
9808
+ className: cn64(
9445
9809
  "w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
9446
9810
  "text-sm placeholder:text-muted-foreground",
9447
9811
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
@@ -9481,7 +9845,7 @@ function MosaicDashboardHeader({
9481
9845
  );
9482
9846
  }
9483
9847
  MosaicDashboardHeader.displayName = "MosaicDashboardHeader";
9484
- function cn64(...classes) {
9848
+ function cn65(...classes) {
9485
9849
  return classes.filter(Boolean).join(" ");
9486
9850
  }
9487
9851
  function ChevronDownIcon4() {
@@ -9551,10 +9915,10 @@ function MosaicOrgSwitcher({
9551
9915
  noOrgSelectedLabel,
9552
9916
  className
9553
9917
  }) {
9554
- const [open, setOpen] = React27.useState(false);
9555
- const ref = React27.useRef(null);
9918
+ const [open, setOpen] = React28.useState(false);
9919
+ const ref = React28.useRef(null);
9556
9920
  const currentOrg = organizations.find((o) => o.id === currentOrgId) ?? organizations[0];
9557
- React27.useEffect(() => {
9921
+ React28.useEffect(() => {
9558
9922
  if (!open) return;
9559
9923
  const h = (e) => {
9560
9924
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -9564,13 +9928,13 @@ function MosaicOrgSwitcher({
9564
9928
  }, [open]);
9565
9929
  if (!currentOrg && organizations.length === 0 && !onCreateOrg) return null;
9566
9930
  const initials = currentOrg?.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() ?? "?";
9567
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "org-switcher", className: cn64("relative", className), children: [
9931
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "org-switcher", className: cn65("relative", className), children: [
9568
9932
  /* @__PURE__ */ jsxs(
9569
9933
  "button",
9570
9934
  {
9571
9935
  type: "button",
9572
9936
  onClick: () => setOpen((v) => !v),
9573
- className: cn64(
9937
+ className: cn65(
9574
9938
  "inline-flex items-center gap-2 rounded-md border border-border bg-background px-3 py-1.5",
9575
9939
  "text-sm font-medium text-foreground",
9576
9940
  "hover:bg-accent hover:text-accent-foreground",
@@ -9597,7 +9961,7 @@ function MosaicOrgSwitcher({
9597
9961
  {
9598
9962
  role: "menu",
9599
9963
  "aria-label": triggerAriaLabel,
9600
- className: cn64(
9964
+ className: cn65(
9601
9965
  "absolute left-0 top-full z-50 mt-1 min-w-[200px] rounded-md border border-border",
9602
9966
  "bg-popover py-1 shadow-md"
9603
9967
  ),
@@ -9612,7 +9976,7 @@ function MosaicOrgSwitcher({
9612
9976
  onSelectOrg?.(org.id);
9613
9977
  setOpen(false);
9614
9978
  },
9615
- className: cn64(
9979
+ className: cn65(
9616
9980
  "flex w-full items-center gap-2.5 px-3 py-2 text-sm text-foreground",
9617
9981
  "hover:bg-accent hover:text-accent-foreground",
9618
9982
  org.id === currentOrgId && "bg-primary/10 text-primary"
@@ -9649,7 +10013,7 @@ function MosaicOrgSwitcher({
9649
10013
  ] });
9650
10014
  }
9651
10015
  MosaicOrgSwitcher.displayName = "MosaicOrgSwitcher";
9652
- function cn65(...classes) {
10016
+ function cn66(...classes) {
9653
10017
  return classes.filter(Boolean).join(" ");
9654
10018
  }
9655
10019
  function PlusIcon7() {
@@ -9684,9 +10048,9 @@ function MosaicQuickActionsMenu({
9684
10048
  className
9685
10049
  }) {
9686
10050
  const { isMobile } = useDevice();
9687
- const [open, setOpen] = React27.useState(false);
9688
- const ref = React27.useRef(null);
9689
- React27.useEffect(() => {
10051
+ const [open, setOpen] = React28.useState(false);
10052
+ const ref = React28.useRef(null);
10053
+ React28.useEffect(() => {
9690
10054
  if (!open) return;
9691
10055
  const h = (e) => {
9692
10056
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -9694,19 +10058,19 @@ function MosaicQuickActionsMenu({
9694
10058
  document.addEventListener("mousedown", h);
9695
10059
  return () => document.removeEventListener("mousedown", h);
9696
10060
  }, [open]);
9697
- const itemClass = cn65(
10061
+ const itemClass = cn66(
9698
10062
  "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
9699
10063
  "hover:bg-accent hover:text-accent-foreground",
9700
10064
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
9701
10065
  "min-h-[44px]"
9702
10066
  );
9703
- return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn65("relative", className), children: [
10067
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn66("relative", className), children: [
9704
10068
  /* @__PURE__ */ jsxs(
9705
10069
  "button",
9706
10070
  {
9707
10071
  type: "button",
9708
10072
  onClick: () => setOpen((v) => !v),
9709
- className: cn65(
10073
+ className: cn66(
9710
10074
  "inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
9711
10075
  "min-h-[44px] min-w-[44px] px-3 py-2 text-sm font-medium text-foreground",
9712
10076
  "hover:bg-accent hover:text-accent-foreground",
@@ -9717,7 +10081,7 @@ function MosaicQuickActionsMenu({
9717
10081
  "aria-label": label,
9718
10082
  children: [
9719
10083
  triggerIcon ?? /* @__PURE__ */ jsx(PlusIcon7, {}),
9720
- /* @__PURE__ */ jsx("span", { className: cn65("hidden md:inline"), children: label })
10084
+ /* @__PURE__ */ jsx("span", { className: cn66("hidden md:inline"), children: label })
9721
10085
  ]
9722
10086
  }
9723
10087
  ),
@@ -9726,14 +10090,14 @@ function MosaicQuickActionsMenu({
9726
10090
  {
9727
10091
  role: "menu",
9728
10092
  "aria-label": menuTitle,
9729
- className: cn65(
10093
+ className: cn66(
9730
10094
  "absolute right-0 top-full z-50 mt-1 rounded-md border border-border bg-popover py-1 shadow-md",
9731
10095
  isMobile ? "w-[min(90vw,280px)]" : "w-56"
9732
10096
  ),
9733
10097
  children: [
9734
10098
  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 }) }),
9735
- /* @__PURE__ */ jsx("div", { className: cn65(menuTitle && "border-t border-border") }),
9736
- actions.map((action) => /* @__PURE__ */ jsxs(React27.Fragment, { children: [
10099
+ /* @__PURE__ */ jsx("div", { className: cn66(menuTitle && "border-t border-border") }),
10100
+ actions.map((action) => /* @__PURE__ */ jsxs(React28.Fragment, { children: [
9737
10101
  action.separator && /* @__PURE__ */ jsx("div", { className: "my-1 border-t border-border" }),
9738
10102
  action.href && renderLink ? renderLink(
9739
10103
  action,
@@ -10037,7 +10401,7 @@ function MosaicOrgProfilePage({
10037
10401
  );
10038
10402
  }
10039
10403
  MosaicOrgProfilePage.displayName = "MosaicOrgProfilePage";
10040
- function cn66(...classes) {
10404
+ function cn67(...classes) {
10041
10405
  return classes.filter(Boolean).join(" ");
10042
10406
  }
10043
10407
  function defaultCompare(a, b) {
@@ -10100,7 +10464,7 @@ function MosaicDataTable({
10100
10464
  {
10101
10465
  ref,
10102
10466
  "data-slot": "data-table",
10103
- className: cn66("w-full border-collapse text-sm", className),
10467
+ className: cn67("w-full border-collapse text-sm", className),
10104
10468
  children: [
10105
10469
  /* @__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) => {
10106
10470
  const isSortable = masterSortable && col.sortable;
@@ -10118,7 +10482,7 @@ function MosaicDataTable({
10118
10482
  handleHeaderClick(col);
10119
10483
  }
10120
10484
  } : void 0,
10121
- className: cn66(
10485
+ className: cn67(
10122
10486
  "px-4 py-3 font-medium text-muted-foreground",
10123
10487
  alignClass(col.align),
10124
10488
  col.className,
@@ -10154,7 +10518,7 @@ function MosaicDataTable({
10154
10518
  "td",
10155
10519
  {
10156
10520
  "data-slot": "data-table-td",
10157
- className: cn66(
10521
+ className: cn67(
10158
10522
  "px-4 py-3 text-foreground",
10159
10523
  alignClass(col.align),
10160
10524
  col.className
@@ -10293,7 +10657,7 @@ var stepSegmentVariants = cva(["h-1.5 flex-1 min-w-2 rounded-full transition-col
10293
10657
  filled: false
10294
10658
  }
10295
10659
  });
10296
- function cn67(...classes) {
10660
+ function cn68(...classes) {
10297
10661
  return classes.filter(Boolean).join(" ");
10298
10662
  }
10299
10663
  function resolveStatus(step, index, currentIndex) {
@@ -10334,7 +10698,7 @@ function MosaicStepPipelineSegments({
10334
10698
  "aria-valuemax": total,
10335
10699
  "aria-valuenow": current,
10336
10700
  "aria-valuetext": progressLabel ? progressLabel(current, total) : void 0,
10337
- className: cn67(stepSegmentBarVariants(), className),
10701
+ className: cn68(stepSegmentBarVariants(), className),
10338
10702
  children: steps.map((step, index) => {
10339
10703
  const status = resolveStatus(step, index, currentIndex);
10340
10704
  const filled = status !== "upcoming";
@@ -10346,7 +10710,7 @@ function MosaicStepPipelineSegments({
10346
10710
  "data-status": status,
10347
10711
  "data-filled": filled,
10348
10712
  "aria-hidden": "true",
10349
- className: cn67(stepSegmentVariants({ filled }))
10713
+ className: cn68(stepSegmentVariants({ filled }))
10350
10714
  },
10351
10715
  key
10352
10716
  );
@@ -10367,7 +10731,7 @@ function MosaicStepPipelineDots({
10367
10731
  {
10368
10732
  ref,
10369
10733
  "data-slot": "step-pipeline",
10370
- className: cn67(stepPipelineVariants({ orientation }), className),
10734
+ className: cn68(stepPipelineVariants({ orientation }), className),
10371
10735
  children: steps.map((step, index) => {
10372
10736
  const status = resolveStatus(step, index, currentIndex);
10373
10737
  const isCurrent = status === "current";
@@ -10379,7 +10743,7 @@ function MosaicStepPipelineDots({
10379
10743
  "data-slot": "step",
10380
10744
  "data-status": status,
10381
10745
  "aria-current": isCurrent ? "step" : void 0,
10382
- className: cn67(
10746
+ className: cn68(
10383
10747
  "flex shrink-0",
10384
10748
  orientation === "horizontal" ? "flex-col items-center gap-2" : "flex-row items-start gap-3",
10385
10749
  orientation === "horizontal" && !isLast && "flex-1"
@@ -10390,14 +10754,14 @@ function MosaicStepPipelineDots({
10390
10754
  "div",
10391
10755
  {
10392
10756
  "data-slot": "step-connector",
10393
- className: cn67(stepConnectorVariants({ status, orientation }))
10757
+ className: cn68(stepConnectorVariants({ status, orientation }))
10394
10758
  }
10395
10759
  ),
10396
10760
  /* @__PURE__ */ jsx(
10397
10761
  "div",
10398
10762
  {
10399
10763
  "data-slot": "step-indicator",
10400
- className: cn67(stepIndicatorVariants({ status, orientation })),
10764
+ className: cn68(stepIndicatorVariants({ status, orientation })),
10401
10765
  "aria-hidden": "true",
10402
10766
  children: status === "done" ? "\u2713" : /* @__PURE__ */ jsx("span", { children: index + 1 })
10403
10767
  }
@@ -10406,7 +10770,7 @@ function MosaicStepPipelineDots({
10406
10770
  "div",
10407
10771
  {
10408
10772
  "data-slot": "step-connector",
10409
- className: cn67(
10773
+ className: cn68(
10410
10774
  stepConnectorVariants({
10411
10775
  // connector after current step is still upcoming
10412
10776
  status: status === "done" ? "done" : "upcoming",
@@ -10417,12 +10781,12 @@ function MosaicStepPipelineDots({
10417
10781
  )
10418
10782
  ] }),
10419
10783
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5 text-center px-1", children: [
10420
- /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn67(stepLabelVariants({ status })), children: step.label }),
10784
+ /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn68(stepLabelVariants({ status })), children: step.label }),
10421
10785
  step.description !== void 0 && /* @__PURE__ */ jsx(
10422
10786
  "span",
10423
10787
  {
10424
10788
  "data-slot": "step-description",
10425
- className: cn67(stepDescriptionVariants({ status })),
10789
+ className: cn68(stepDescriptionVariants({ status })),
10426
10790
  children: step.description
10427
10791
  }
10428
10792
  )
@@ -10433,7 +10797,7 @@ function MosaicStepPipelineDots({
10433
10797
  "div",
10434
10798
  {
10435
10799
  "data-slot": "step-indicator",
10436
- className: cn67(stepIndicatorVariants({ status, orientation })),
10800
+ className: cn68(stepIndicatorVariants({ status, orientation })),
10437
10801
  "aria-hidden": "true",
10438
10802
  children: status === "done" ? "\u2713" : /* @__PURE__ */ jsx("span", { children: index + 1 })
10439
10803
  }
@@ -10442,7 +10806,7 @@ function MosaicStepPipelineDots({
10442
10806
  "div",
10443
10807
  {
10444
10808
  "data-slot": "step-connector",
10445
- className: cn67(
10809
+ className: cn68(
10446
10810
  stepConnectorVariants({
10447
10811
  status: status === "done" ? "done" : "upcoming",
10448
10812
  orientation
@@ -10452,12 +10816,12 @@ function MosaicStepPipelineDots({
10452
10816
  )
10453
10817
  ] }),
10454
10818
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 pt-1 pb-4", children: [
10455
- /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn67(stepLabelVariants({ status })), children: step.label }),
10819
+ /* @__PURE__ */ jsx("span", { "data-slot": "step-label", className: cn68(stepLabelVariants({ status })), children: step.label }),
10456
10820
  step.description !== void 0 && /* @__PURE__ */ jsx(
10457
10821
  "span",
10458
10822
  {
10459
10823
  "data-slot": "step-description",
10460
- className: cn67(stepDescriptionVariants({ status })),
10824
+ className: cn68(stepDescriptionVariants({ status })),
10461
10825
  children: step.description
10462
10826
  }
10463
10827
  )
@@ -10471,7 +10835,7 @@ function MosaicStepPipelineDots({
10471
10835
  );
10472
10836
  }
10473
10837
  MosaicStepPipelineDots.displayName = "MosaicStepPipelineDots";
10474
- function cn68(...classes) {
10838
+ function cn69(...classes) {
10475
10839
  return classes.filter(Boolean).join(" ");
10476
10840
  }
10477
10841
  function MosaicKanbanBoard({ children, className, ref, ...props }) {
@@ -10480,7 +10844,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
10480
10844
  {
10481
10845
  ref,
10482
10846
  "data-slot": "kanban-board",
10483
- className: cn68(
10847
+ className: cn69(
10484
10848
  "flex gap-4 overflow-x-auto pb-4",
10485
10849
  "min-h-0",
10486
10850
  // Smooth momentum scrolling on iOS
@@ -10493,7 +10857,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
10493
10857
  );
10494
10858
  }
10495
10859
  MosaicKanbanBoard.displayName = "MosaicKanbanBoard";
10496
- function cn69(...classes) {
10860
+ function cn70(...classes) {
10497
10861
  return classes.filter(Boolean).join(" ");
10498
10862
  }
10499
10863
  function MosaicKanbanColumn({
@@ -10511,7 +10875,7 @@ function MosaicKanbanColumn({
10511
10875
  {
10512
10876
  ref,
10513
10877
  "data-slot": "kanban-column",
10514
- className: cn69(
10878
+ className: cn70(
10515
10879
  // Fixed column width, never shrink so board stays scrollable
10516
10880
  "flex flex-col w-72 shrink-0",
10517
10881
  // Surface
@@ -10532,7 +10896,7 @@ function MosaicKanbanColumn({
10532
10896
  {
10533
10897
  "data-slot": "kanban-column-count",
10534
10898
  "aria-label": countLabel(count),
10535
- className: cn69(
10899
+ className: cn70(
10536
10900
  "inline-flex items-center justify-center",
10537
10901
  "min-w-[1.25rem] h-5 px-1.5 rounded-full",
10538
10902
  "bg-muted text-muted-foreground",
@@ -10575,12 +10939,12 @@ function MosaicKanbanColumn({
10575
10939
  );
10576
10940
  }
10577
10941
  MosaicKanbanColumn.displayName = "MosaicKanbanColumn";
10578
- var WorkspaceCtx = React27.createContext({
10942
+ var WorkspaceCtx = React28.createContext({
10579
10943
  workspaceId: null,
10580
10944
  isLoading: false
10581
10945
  });
10582
10946
  function useMosaicWorkspace() {
10583
- return React27.useContext(WorkspaceCtx);
10947
+ return React28.useContext(WorkspaceCtx);
10584
10948
  }
10585
10949
  var defaultClerkAppearance = {
10586
10950
  variables: {
@@ -10593,9 +10957,9 @@ var defaultClerkAppearance = {
10593
10957
  }
10594
10958
  };
10595
10959
  function WorkspaceResolver({ resolveWorkspaceId, initialOrgId, children }) {
10596
- const [workspaceId, setWorkspaceId] = React27.useState(null);
10597
- const [isLoading, setIsLoading] = React27.useState(false);
10598
- React27.useEffect(() => {
10960
+ const [workspaceId, setWorkspaceId] = React28.useState(null);
10961
+ const [isLoading, setIsLoading] = React28.useState(false);
10962
+ React28.useEffect(() => {
10599
10963
  if (!resolveWorkspaceId) {
10600
10964
  setWorkspaceId(initialOrgId ?? null);
10601
10965
  return;
@@ -10695,7 +11059,210 @@ async function MosaicClerkWebhookHandler(req, options) {
10695
11059
  }
10696
11060
  return new Response("OK", { status: 200 });
10697
11061
  }
11062
+ var documentUploadDropZoneVariants = cva(
11063
+ [
11064
+ "flex flex-col items-center justify-center text-center",
11065
+ "rounded-lg border-2 border-dashed p-8 gap-2",
11066
+ "transition-colors cursor-pointer"
11067
+ ],
11068
+ {
11069
+ variants: {
11070
+ dragActive: {
11071
+ true: "border-ring bg-accent/40",
11072
+ false: "border-border hover:border-ring/50"
11073
+ }
11074
+ },
11075
+ defaultVariants: {
11076
+ dragActive: false
11077
+ }
11078
+ }
11079
+ );
11080
+ var documentUploadFileRowVariants = cva(
11081
+ ["flex items-start gap-3 rounded-lg border p-4 transition-colors"],
11082
+ {
11083
+ variants: {
11084
+ status: {
11085
+ uploading: "border-border bg-card",
11086
+ success: "border-border bg-card",
11087
+ error: "border-destructive/40 bg-destructive/5"
11088
+ }
11089
+ },
11090
+ defaultVariants: {
11091
+ status: "uploading"
11092
+ }
11093
+ }
11094
+ );
11095
+ var documentUploadStatusLabelVariants = cva(["text-xs font-medium"], {
11096
+ variants: {
11097
+ status: {
11098
+ uploading: "text-muted-foreground",
11099
+ success: "text-foreground",
11100
+ error: "text-destructive"
11101
+ }
11102
+ },
11103
+ defaultVariants: {
11104
+ status: "uploading"
11105
+ }
11106
+ });
11107
+ var documentUploadProgressTrackVariants = cva(
11108
+ ["h-1.5 w-full overflow-hidden rounded-full bg-muted"],
11109
+ {
11110
+ variants: {},
11111
+ defaultVariants: {}
11112
+ }
11113
+ );
11114
+ var documentUploadProgressFillVariants = cva(
11115
+ ["h-full rounded-full bg-foreground transition-[width]"],
11116
+ {
11117
+ variants: {},
11118
+ defaultVariants: {}
11119
+ }
11120
+ );
11121
+ function cn71(...classes) {
11122
+ return classes.filter(Boolean).join(" ");
11123
+ }
11124
+ function MosaicDocumentUpload({
11125
+ files,
11126
+ onFilesSelected,
11127
+ onRemoveFile,
11128
+ idleLabel,
11129
+ dragActiveLabel,
11130
+ browseButtonLabel,
11131
+ acceptHint,
11132
+ dropZoneAriaLabel,
11133
+ removeFileAriaLabel,
11134
+ statusLabels,
11135
+ sizeLabel,
11136
+ accept,
11137
+ multiple = false,
11138
+ className,
11139
+ ref
11140
+ }) {
11141
+ const [isDragActive, setIsDragActive] = useState(false);
11142
+ const inputRef = useRef(null);
11143
+ const inputId = useId();
11144
+ function handleDragOver(event) {
11145
+ event.preventDefault();
11146
+ setIsDragActive(true);
11147
+ }
11148
+ function handleDragLeave() {
11149
+ setIsDragActive(false);
11150
+ }
11151
+ function handleDrop(event) {
11152
+ event.preventDefault();
11153
+ setIsDragActive(false);
11154
+ const dropped = Array.from(event.dataTransfer.files);
11155
+ if (dropped.length > 0) onFilesSelected(dropped);
11156
+ }
11157
+ function handleInputChange(event) {
11158
+ const selected = event.target.files ? Array.from(event.target.files) : [];
11159
+ if (selected.length > 0) onFilesSelected(selected);
11160
+ event.target.value = "";
11161
+ }
11162
+ return /* @__PURE__ */ jsxs("div", { ref, "data-slot": "document-upload", className: cn71("flex flex-col gap-4", className), children: [
11163
+ /* @__PURE__ */ jsxs(
11164
+ "div",
11165
+ {
11166
+ "data-slot": "document-upload-drop-zone",
11167
+ "aria-label": dropZoneAriaLabel,
11168
+ onDragOver: handleDragOver,
11169
+ onDragLeave: handleDragLeave,
11170
+ onDrop: handleDrop,
11171
+ className: documentUploadDropZoneVariants({ dragActive: isDragActive }),
11172
+ children: [
11173
+ /* @__PURE__ */ jsx("p", { "data-slot": "document-upload-idle-label", className: "text-sm font-medium", children: isDragActive ? dragActiveLabel : idleLabel }),
11174
+ /* @__PURE__ */ jsx(
11175
+ "input",
11176
+ {
11177
+ ref: inputRef,
11178
+ id: inputId,
11179
+ type: "file",
11180
+ className: "hidden",
11181
+ accept,
11182
+ multiple,
11183
+ onChange: handleInputChange
11184
+ }
11185
+ ),
11186
+ /* @__PURE__ */ jsx("label", { htmlFor: inputId, children: /* @__PURE__ */ jsx(
11187
+ "span",
11188
+ {
11189
+ "data-slot": "document-upload-browse-button",
11190
+ className: "inline-flex min-h-9 items-center justify-center rounded-md border border-border px-3 text-sm font-medium hover:bg-accent/50 transition-colors",
11191
+ children: browseButtonLabel
11192
+ }
11193
+ ) }),
11194
+ /* @__PURE__ */ jsx("p", { "data-slot": "document-upload-accept-hint", className: "text-xs text-muted-foreground", children: acceptHint })
11195
+ ]
11196
+ }
11197
+ ),
11198
+ files.length > 0 && /* @__PURE__ */ jsx("ul", { "data-slot": "document-upload-file-list", className: "flex flex-col gap-2", children: files.map((file) => /* @__PURE__ */ jsxs(
11199
+ "li",
11200
+ {
11201
+ "data-slot": "document-upload-file-row",
11202
+ "data-status": file.status,
11203
+ className: documentUploadFileRowVariants({ status: file.status }),
11204
+ children: [
11205
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
11206
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
11207
+ /* @__PURE__ */ jsx("p", { "data-slot": "document-upload-file-name", className: "text-sm font-medium truncate", children: file.name }),
11208
+ /* @__PURE__ */ jsx(
11209
+ "span",
11210
+ {
11211
+ "data-slot": "document-upload-status-label",
11212
+ className: documentUploadStatusLabelVariants({ status: file.status }),
11213
+ children: statusLabels[file.status]
11214
+ }
11215
+ )
11216
+ ] }),
11217
+ /* @__PURE__ */ jsx("p", { "data-slot": "document-upload-file-size", className: "text-xs text-muted-foreground", children: sizeLabel(file.sizeBytes) }),
11218
+ file.status === "uploading" && /* @__PURE__ */ jsx(
11219
+ "div",
11220
+ {
11221
+ "data-slot": "document-upload-progress-track",
11222
+ role: "progressbar",
11223
+ tabIndex: -1,
11224
+ "aria-valuemin": 0,
11225
+ "aria-valuemax": 100,
11226
+ "aria-valuenow": file.progress ?? 0,
11227
+ className: cn71(documentUploadProgressTrackVariants(), "mt-2"),
11228
+ children: /* @__PURE__ */ jsx(
11229
+ "div",
11230
+ {
11231
+ "data-slot": "document-upload-progress-fill",
11232
+ className: documentUploadProgressFillVariants(),
11233
+ style: { width: `${file.progress ?? 0}%` }
11234
+ }
11235
+ )
11236
+ }
11237
+ ),
11238
+ file.status === "error" && file.errorMessage !== void 0 && /* @__PURE__ */ jsx(
11239
+ "p",
11240
+ {
11241
+ "data-slot": "document-upload-error-message",
11242
+ className: "mt-1 text-xs text-destructive",
11243
+ children: file.errorMessage
11244
+ }
11245
+ )
11246
+ ] }),
11247
+ /* @__PURE__ */ jsx(
11248
+ "button",
11249
+ {
11250
+ type: "button",
11251
+ "data-slot": "document-upload-remove-button",
11252
+ "aria-label": removeFileAriaLabel(file.name),
11253
+ onClick: () => onRemoveFile(file.id),
11254
+ className: "shrink-0 inline-flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-accent/50 transition-colors",
11255
+ children: file.status === "success" ? "\u2713" : "\u2715"
11256
+ }
11257
+ )
11258
+ ]
11259
+ },
11260
+ file.id
11261
+ )) })
11262
+ ] });
11263
+ }
11264
+ MosaicDocumentUpload.displayName = "MosaicDocumentUpload";
10698
11265
 
10699
- export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentCard, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentTeamPreview, MosaicAnimatedList, MosaicAppSidebar, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTemplateCard, MosaicTemplateGallery, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUserButton, Placeholder, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
11266
+ export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentCard, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentTeamPreview, MosaicAnimatedList, MosaicAppSidebar, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDocumentUpload, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMemoryCard, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTemplateCard, MosaicTemplateGallery, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUserButton, Placeholder, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
10700
11267
  //# sourceMappingURL=index.js.map
10701
11268
  //# sourceMappingURL=index.js.map