@vantageos/mosaic-blocks 0.5.20-alpha → 0.5.22-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.cjs +1190 -419
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +624 -2
- package/dist/index.d.ts +624 -2
- package/dist/index.js +1132 -388
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var button = require('@base-ui/react/button');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
-
var
|
|
7
|
+
var React29 = require('react');
|
|
8
8
|
var accordion = require('@base-ui/react/accordion');
|
|
9
9
|
var checkbox = require('@base-ui/react/checkbox');
|
|
10
10
|
var collapsible = require('@base-ui/react/collapsible');
|
|
@@ -24,6 +24,7 @@ var select = require('@base-ui/react/select');
|
|
|
24
24
|
var combobox = require('@base-ui/react/combobox');
|
|
25
25
|
var menu = require('@base-ui/react/menu');
|
|
26
26
|
var alertDialog = require('@base-ui/react/alert-dialog');
|
|
27
|
+
var dialog = require('@base-ui/react/dialog');
|
|
27
28
|
|
|
28
29
|
function _interopNamespace(e) {
|
|
29
30
|
if (e && e.__esModule) return e;
|
|
@@ -43,10 +44,10 @@ function _interopNamespace(e) {
|
|
|
43
44
|
return Object.freeze(n);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
var
|
|
47
|
+
var React29__namespace = /*#__PURE__*/_interopNamespace(React29);
|
|
47
48
|
|
|
48
49
|
// src/version.ts
|
|
49
|
-
var version = "0.5.
|
|
50
|
+
var version = "0.5.22-alpha";
|
|
50
51
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
51
52
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
52
53
|
}
|
|
@@ -177,11 +178,11 @@ function MosaicNavbar({
|
|
|
177
178
|
className,
|
|
178
179
|
ref
|
|
179
180
|
}) {
|
|
180
|
-
const [isScrolled, setIsScrolled] =
|
|
181
|
-
const [isHidden, setIsHidden] =
|
|
182
|
-
const [isOpen, setIsOpen] =
|
|
183
|
-
const lastScrollY =
|
|
184
|
-
|
|
181
|
+
const [isScrolled, setIsScrolled] = React29__namespace.useState(false);
|
|
182
|
+
const [isHidden, setIsHidden] = React29__namespace.useState(false);
|
|
183
|
+
const [isOpen, setIsOpen] = React29__namespace.useState(false);
|
|
184
|
+
const lastScrollY = React29__namespace.useRef(0);
|
|
185
|
+
React29__namespace.useEffect(() => {
|
|
185
186
|
const handleScroll = () => {
|
|
186
187
|
const current = window.scrollY;
|
|
187
188
|
setIsScrolled(current > 50);
|
|
@@ -196,7 +197,7 @@ function MosaicNavbar({
|
|
|
196
197
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
197
198
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
198
199
|
}, []);
|
|
199
|
-
|
|
200
|
+
React29__namespace.useEffect(() => {
|
|
200
201
|
document.body.style.overflow = isOpen ? "hidden" : "";
|
|
201
202
|
return () => {
|
|
202
203
|
document.body.style.overflow = "";
|
|
@@ -724,10 +725,10 @@ function MosaicCounter({
|
|
|
724
725
|
className,
|
|
725
726
|
ref
|
|
726
727
|
}) {
|
|
727
|
-
const [current, setCurrent] =
|
|
728
|
-
const rafRef =
|
|
729
|
-
const startTimeRef =
|
|
730
|
-
|
|
728
|
+
const [current, setCurrent] = React29__namespace.useState(0);
|
|
729
|
+
const rafRef = React29__namespace.useRef(0);
|
|
730
|
+
const startTimeRef = React29__namespace.useRef(null);
|
|
731
|
+
React29__namespace.useEffect(() => {
|
|
731
732
|
const prefersReduced = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
732
733
|
if (prefersReduced) {
|
|
733
734
|
setCurrent(value);
|
|
@@ -783,12 +784,12 @@ function MosaicThemeToggle({
|
|
|
783
784
|
switchToDarkLabel,
|
|
784
785
|
ref
|
|
785
786
|
}) {
|
|
786
|
-
const [theme, setTheme] =
|
|
787
|
+
const [theme, setTheme] = React29__namespace.useState(() => {
|
|
787
788
|
if (typeof document === "undefined") return themes[0];
|
|
788
789
|
const current = document.documentElement.getAttribute("data-theme");
|
|
789
790
|
return current && themes.includes(current) ? current : themes[0];
|
|
790
791
|
});
|
|
791
|
-
const applyTheme =
|
|
792
|
+
const applyTheme = React29__namespace.useCallback(
|
|
792
793
|
(next) => {
|
|
793
794
|
const resolved = next === "system" ? getSystemTheme() : next;
|
|
794
795
|
document.documentElement.setAttribute("data-theme", resolved);
|
|
@@ -916,10 +917,10 @@ function MosaicAnimatedList({
|
|
|
916
917
|
as: Tag = "ul",
|
|
917
918
|
ref
|
|
918
919
|
}) {
|
|
919
|
-
|
|
920
|
+
React29__namespace.useEffect(() => {
|
|
920
921
|
injectKeyframes();
|
|
921
922
|
}, []);
|
|
922
|
-
const items =
|
|
923
|
+
const items = React29__namespace.Children.toArray(children);
|
|
923
924
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
925
|
Tag,
|
|
925
926
|
{
|
|
@@ -927,7 +928,7 @@ function MosaicAnimatedList({
|
|
|
927
928
|
className,
|
|
928
929
|
children: items.map((child, i) => {
|
|
929
930
|
const stableKey = child.key ?? `item-${i}`;
|
|
930
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
931
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React29__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
931
932
|
"div",
|
|
932
933
|
{
|
|
933
934
|
className: "mosaic-list-item",
|
|
@@ -1000,8 +1001,8 @@ function MosaicFallingPattern({
|
|
|
1000
1001
|
className,
|
|
1001
1002
|
ref
|
|
1002
1003
|
}) {
|
|
1003
|
-
const uniqueId =
|
|
1004
|
-
|
|
1004
|
+
const uniqueId = React29__namespace.useId();
|
|
1005
|
+
React29__namespace.useEffect(() => {
|
|
1005
1006
|
injectPatternKeyframes();
|
|
1006
1007
|
}, []);
|
|
1007
1008
|
const cols = density;
|
|
@@ -1075,8 +1076,8 @@ function MosaicFallingPattern({
|
|
|
1075
1076
|
}
|
|
1076
1077
|
MosaicFallingPattern.displayName = "MosaicFallingPattern";
|
|
1077
1078
|
function useMediaQuery(query) {
|
|
1078
|
-
const [matches, setMatches] =
|
|
1079
|
-
|
|
1079
|
+
const [matches, setMatches] = React29.useState(false);
|
|
1080
|
+
React29.useEffect(() => {
|
|
1080
1081
|
const mql = window.matchMedia(query);
|
|
1081
1082
|
setMatches(mql.matches);
|
|
1082
1083
|
const handler = (e) => {
|
|
@@ -2097,7 +2098,7 @@ function MosaicSelect({
|
|
|
2097
2098
|
name,
|
|
2098
2099
|
className
|
|
2099
2100
|
}) {
|
|
2100
|
-
const labelMap =
|
|
2101
|
+
const labelMap = React29__namespace.useMemo(
|
|
2101
2102
|
() => Object.fromEntries(items.map((item) => [item.value, item.label])),
|
|
2102
2103
|
[items]
|
|
2103
2104
|
);
|
|
@@ -2217,9 +2218,9 @@ function MosaicCombobox({
|
|
|
2217
2218
|
emptyMessage,
|
|
2218
2219
|
className
|
|
2219
2220
|
}) {
|
|
2220
|
-
const [inputValue, setInputValue] =
|
|
2221
|
+
const [inputValue, setInputValue] = React29__namespace.useState("");
|
|
2221
2222
|
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
2222
|
-
const filteredItems =
|
|
2223
|
+
const filteredItems = React29__namespace.useMemo(() => {
|
|
2223
2224
|
if (!inputValue) return items;
|
|
2224
2225
|
return items.filter((item) => filter.contains(item.label, inputValue));
|
|
2225
2226
|
}, [items, inputValue, filter]);
|
|
@@ -2284,9 +2285,123 @@ function MosaicCombobox({
|
|
|
2284
2285
|
}
|
|
2285
2286
|
);
|
|
2286
2287
|
}
|
|
2288
|
+
var modelSelectorTriggerVariants = classVarianceAuthority.cva(
|
|
2289
|
+
[
|
|
2290
|
+
"flex w-full min-h-[44px] items-center justify-between gap-2 rounded-md border",
|
|
2291
|
+
"border-border bg-background px-3 py-2 text-left text-sm text-foreground shadow-xs",
|
|
2292
|
+
"outline-none transition-colors hover:bg-muted",
|
|
2293
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
2294
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
2295
|
+
"data-[popup-open]:ring-ring data-[popup-open]:ring-[3px]"
|
|
2296
|
+
],
|
|
2297
|
+
{
|
|
2298
|
+
variants: {}
|
|
2299
|
+
}
|
|
2300
|
+
);
|
|
2301
|
+
var modelSelectorItemVariants = classVarianceAuthority.cva(
|
|
2302
|
+
[
|
|
2303
|
+
"relative flex cursor-pointer select-none flex-col gap-0.5 rounded-sm px-2 py-1.5",
|
|
2304
|
+
"text-sm text-popover-foreground outline-none transition-colors",
|
|
2305
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
2306
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
2307
|
+
"data-[selected]:font-medium"
|
|
2308
|
+
],
|
|
2309
|
+
{
|
|
2310
|
+
variants: {}
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2287
2313
|
function cn36(...classes) {
|
|
2288
2314
|
return classes.filter(Boolean).join(" ");
|
|
2289
2315
|
}
|
|
2316
|
+
function MosaicModelSelector({
|
|
2317
|
+
models,
|
|
2318
|
+
value,
|
|
2319
|
+
onValueChange,
|
|
2320
|
+
placeholder,
|
|
2321
|
+
emptyMessage,
|
|
2322
|
+
disabled,
|
|
2323
|
+
name,
|
|
2324
|
+
className
|
|
2325
|
+
}) {
|
|
2326
|
+
const [inputValue, setInputValue] = React29__namespace.useState("");
|
|
2327
|
+
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
2328
|
+
const filteredModels = React29__namespace.useMemo(() => {
|
|
2329
|
+
if (!inputValue) return models;
|
|
2330
|
+
return models.filter((model) => filter.contains(model.label, inputValue));
|
|
2331
|
+
}, [models, inputValue, filter]);
|
|
2332
|
+
const labelMap = React29__namespace.useMemo(
|
|
2333
|
+
() => Object.fromEntries(models.map((model) => [model.value, model.label])),
|
|
2334
|
+
[models]
|
|
2335
|
+
);
|
|
2336
|
+
const handleValueChange = React29__namespace.useCallback(
|
|
2337
|
+
(nextValue, eventDetails) => {
|
|
2338
|
+
if (typeof nextValue !== "string") return;
|
|
2339
|
+
const selected = models.find((model) => model.value === nextValue);
|
|
2340
|
+
if (!selected || selected.disabled) return;
|
|
2341
|
+
onValueChange?.(nextValue);
|
|
2342
|
+
},
|
|
2343
|
+
[models, onValueChange]
|
|
2344
|
+
);
|
|
2345
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2346
|
+
combobox.Combobox.Root,
|
|
2347
|
+
{
|
|
2348
|
+
value,
|
|
2349
|
+
onValueChange: handleValueChange,
|
|
2350
|
+
disabled,
|
|
2351
|
+
name,
|
|
2352
|
+
onInputValueChange: setInputValue,
|
|
2353
|
+
autoHighlight: true,
|
|
2354
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "model-selector", className: cn36("relative w-full", className), children: [
|
|
2355
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2356
|
+
combobox.Combobox.Input,
|
|
2357
|
+
{
|
|
2358
|
+
placeholder,
|
|
2359
|
+
className: modelSelectorTriggerVariants({ className })
|
|
2360
|
+
}
|
|
2361
|
+
),
|
|
2362
|
+
value != null && value in labelMap && inputValue === "" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-y-0 left-3 flex items-center text-sm text-foreground", children: labelMap[value] }),
|
|
2363
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2364
|
+
combobox.Combobox.Popup,
|
|
2365
|
+
{
|
|
2366
|
+
className: cn36(
|
|
2367
|
+
"z-50 min-w-[16rem] overflow-hidden rounded-md border border-border",
|
|
2368
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
2369
|
+
"origin-[var(--transform-origin)]",
|
|
2370
|
+
"transition-[transform,scale,opacity]",
|
|
2371
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
2372
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
2373
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0"
|
|
2374
|
+
),
|
|
2375
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.List, { children: [
|
|
2376
|
+
filteredModels.map((model) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2377
|
+
combobox.Combobox.Item,
|
|
2378
|
+
{
|
|
2379
|
+
value: model.value,
|
|
2380
|
+
disabled: model.disabled,
|
|
2381
|
+
className: modelSelectorItemVariants({ className: void 0 }),
|
|
2382
|
+
children: [
|
|
2383
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2384
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: model.label }),
|
|
2385
|
+
model.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs text-secondary-foreground", children: model.badge })
|
|
2386
|
+
] }),
|
|
2387
|
+
model.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: model.description }),
|
|
2388
|
+
model.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: model.meta })
|
|
2389
|
+
]
|
|
2390
|
+
},
|
|
2391
|
+
model.value
|
|
2392
|
+
)),
|
|
2393
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { className: "py-2 text-center text-sm text-muted-foreground", children: emptyMessage })
|
|
2394
|
+
] })
|
|
2395
|
+
}
|
|
2396
|
+
) }) })
|
|
2397
|
+
] })
|
|
2398
|
+
}
|
|
2399
|
+
);
|
|
2400
|
+
}
|
|
2401
|
+
MosaicModelSelector.displayName = "MosaicModelSelector";
|
|
2402
|
+
function cn37(...classes) {
|
|
2403
|
+
return classes.filter(Boolean).join(" ");
|
|
2404
|
+
}
|
|
2290
2405
|
function MosaicDropdownMenu({
|
|
2291
2406
|
trigger,
|
|
2292
2407
|
items,
|
|
@@ -2301,7 +2416,7 @@ function MosaicDropdownMenu({
|
|
|
2301
2416
|
menu.Menu.Popup,
|
|
2302
2417
|
{
|
|
2303
2418
|
"data-slot": "dropdown-menu",
|
|
2304
|
-
className:
|
|
2419
|
+
className: cn37(
|
|
2305
2420
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
2306
2421
|
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
2307
2422
|
"origin-[var(--transform-origin)]",
|
|
@@ -2311,14 +2426,14 @@ function MosaicDropdownMenu({
|
|
|
2311
2426
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
2312
2427
|
className
|
|
2313
2428
|
),
|
|
2314
|
-
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2429
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
2315
2430
|
item.separator && /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Separator, { className: "my-1 h-px bg-border" }),
|
|
2316
2431
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2317
2432
|
menu.Menu.Item,
|
|
2318
2433
|
{
|
|
2319
2434
|
disabled: item.disabled,
|
|
2320
2435
|
onClick: () => onItemSelect?.(item.id),
|
|
2321
|
-
className:
|
|
2436
|
+
className: cn37(
|
|
2322
2437
|
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
2323
2438
|
"text-sm text-popover-foreground outline-none",
|
|
2324
2439
|
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
@@ -2339,8 +2454,8 @@ var BREAKPOINTS = {
|
|
|
2339
2454
|
xl: 1280
|
|
2340
2455
|
};
|
|
2341
2456
|
function useBreakpoint(breakpoint) {
|
|
2342
|
-
const [matches, setMatches] =
|
|
2343
|
-
|
|
2457
|
+
const [matches, setMatches] = React29__namespace.useState(false);
|
|
2458
|
+
React29__namespace.useEffect(() => {
|
|
2344
2459
|
if (typeof window === "undefined") return;
|
|
2345
2460
|
const mq = window.matchMedia(`(min-width: ${BREAKPOINTS[breakpoint]}px)`);
|
|
2346
2461
|
setMatches(mq.matches);
|
|
@@ -2363,8 +2478,8 @@ function useIsDesktop() {
|
|
|
2363
2478
|
return useBreakpoint("lg");
|
|
2364
2479
|
}
|
|
2365
2480
|
function useViewport() {
|
|
2366
|
-
const [size, setSize] =
|
|
2367
|
-
|
|
2481
|
+
const [size, setSize] = React29__namespace.useState({ width: 0, height: 0 });
|
|
2482
|
+
React29__namespace.useEffect(() => {
|
|
2368
2483
|
if (typeof window === "undefined") return;
|
|
2369
2484
|
const update = () => setSize({ width: window.innerWidth, height: window.innerHeight });
|
|
2370
2485
|
update();
|
|
@@ -2382,8 +2497,8 @@ function useViewport() {
|
|
|
2382
2497
|
return size;
|
|
2383
2498
|
}
|
|
2384
2499
|
function useOrientation() {
|
|
2385
|
-
const [orientation, setOrientation] =
|
|
2386
|
-
|
|
2500
|
+
const [orientation, setOrientation] = React29__namespace.useState("portrait");
|
|
2501
|
+
React29__namespace.useEffect(() => {
|
|
2387
2502
|
if (typeof window === "undefined") return;
|
|
2388
2503
|
const update = () => {
|
|
2389
2504
|
setOrientation(window.innerHeight > window.innerWidth ? "portrait" : "landscape");
|
|
@@ -2398,7 +2513,7 @@ function useOrientation() {
|
|
|
2398
2513
|
}, []);
|
|
2399
2514
|
return orientation;
|
|
2400
2515
|
}
|
|
2401
|
-
var DeviceContext =
|
|
2516
|
+
var DeviceContext = React29__namespace.createContext(void 0);
|
|
2402
2517
|
function MosaicDeviceProvider({ children }) {
|
|
2403
2518
|
const isMobile = useIsMobile();
|
|
2404
2519
|
const isTablet = useIsTablet();
|
|
@@ -2409,7 +2524,7 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2409
2524
|
const isXlUp = useBreakpoint("xl");
|
|
2410
2525
|
const orientation = useOrientation();
|
|
2411
2526
|
const viewport = useViewport();
|
|
2412
|
-
const isBreakpoint =
|
|
2527
|
+
const isBreakpoint = React29__namespace.useCallback(
|
|
2413
2528
|
(bp) => {
|
|
2414
2529
|
switch (bp) {
|
|
2415
2530
|
case "sm":
|
|
@@ -2424,7 +2539,7 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2424
2539
|
},
|
|
2425
2540
|
[isSmUp, isMdUp, isLgUp, isXlUp]
|
|
2426
2541
|
);
|
|
2427
|
-
const value =
|
|
2542
|
+
const value = React29__namespace.useMemo(
|
|
2428
2543
|
() => ({
|
|
2429
2544
|
isMobile,
|
|
2430
2545
|
isTablet,
|
|
@@ -2454,13 +2569,13 @@ function MosaicDeviceProvider({ children }) {
|
|
|
2454
2569
|
}
|
|
2455
2570
|
MosaicDeviceProvider.displayName = "MosaicDeviceProvider";
|
|
2456
2571
|
function useDevice() {
|
|
2457
|
-
const ctx =
|
|
2572
|
+
const ctx = React29__namespace.useContext(DeviceContext);
|
|
2458
2573
|
if (!ctx) {
|
|
2459
2574
|
throw new Error("useDevice must be used within a MosaicDeviceProvider");
|
|
2460
2575
|
}
|
|
2461
2576
|
return ctx;
|
|
2462
2577
|
}
|
|
2463
|
-
function
|
|
2578
|
+
function cn38(...classes) {
|
|
2464
2579
|
return classes.filter(Boolean).join(" ");
|
|
2465
2580
|
}
|
|
2466
2581
|
function MosaicAdaptiveGrid({
|
|
@@ -2479,14 +2594,14 @@ function MosaicAdaptiveGrid({
|
|
|
2479
2594
|
{
|
|
2480
2595
|
ref,
|
|
2481
2596
|
"data-slot": "adaptive-grid",
|
|
2482
|
-
className:
|
|
2597
|
+
className: cn38("grid", gap, className),
|
|
2483
2598
|
style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` },
|
|
2484
2599
|
children
|
|
2485
2600
|
}
|
|
2486
2601
|
);
|
|
2487
2602
|
}
|
|
2488
2603
|
MosaicAdaptiveGrid.displayName = "MosaicAdaptiveGrid";
|
|
2489
|
-
function
|
|
2604
|
+
function cn39(...classes) {
|
|
2490
2605
|
return classes.filter(Boolean).join(" ");
|
|
2491
2606
|
}
|
|
2492
2607
|
var ANIM_ID = "mosaic-adaptive-modal-kf";
|
|
@@ -2540,13 +2655,13 @@ function MosaicAdaptiveModal({
|
|
|
2540
2655
|
closeAriaLabel
|
|
2541
2656
|
}) {
|
|
2542
2657
|
const { isMobile } = useDevice();
|
|
2543
|
-
const dialogRef =
|
|
2544
|
-
const titleId =
|
|
2545
|
-
const descId =
|
|
2546
|
-
|
|
2658
|
+
const dialogRef = React29__namespace.useRef(null);
|
|
2659
|
+
const titleId = React29__namespace.useId();
|
|
2660
|
+
const descId = React29__namespace.useId();
|
|
2661
|
+
React29__namespace.useEffect(() => {
|
|
2547
2662
|
injectStyles();
|
|
2548
2663
|
}, []);
|
|
2549
|
-
|
|
2664
|
+
React29__namespace.useEffect(() => {
|
|
2550
2665
|
const el = dialogRef.current;
|
|
2551
2666
|
if (!el) return;
|
|
2552
2667
|
if (isOpen) {
|
|
@@ -2555,7 +2670,7 @@ function MosaicAdaptiveModal({
|
|
|
2555
2670
|
if (el.open) el.close();
|
|
2556
2671
|
}
|
|
2557
2672
|
}, [isOpen]);
|
|
2558
|
-
|
|
2673
|
+
React29__namespace.useEffect(() => {
|
|
2559
2674
|
const el = dialogRef.current;
|
|
2560
2675
|
if (!el) return;
|
|
2561
2676
|
const handler = (e) => {
|
|
@@ -2565,7 +2680,7 @@ function MosaicAdaptiveModal({
|
|
|
2565
2680
|
el.addEventListener("cancel", handler);
|
|
2566
2681
|
return () => el.removeEventListener("cancel", handler);
|
|
2567
2682
|
}, [onClose]);
|
|
2568
|
-
|
|
2683
|
+
React29__namespace.useEffect(() => {
|
|
2569
2684
|
if (!isOpen) return;
|
|
2570
2685
|
const prev = document.body.style.overflow;
|
|
2571
2686
|
document.body.style.overflow = "hidden";
|
|
@@ -2592,7 +2707,7 @@ function MosaicAdaptiveModal({
|
|
|
2592
2707
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2593
2708
|
"div",
|
|
2594
2709
|
{
|
|
2595
|
-
className:
|
|
2710
|
+
className: cn39(
|
|
2596
2711
|
"mosaic-sheet-panel relative w-full rounded-t-2xl border-t border-border bg-background",
|
|
2597
2712
|
"max-h-[90dvh] flex flex-col",
|
|
2598
2713
|
className
|
|
@@ -2625,7 +2740,7 @@ function MosaicAdaptiveModal({
|
|
|
2625
2740
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2626
2741
|
"div",
|
|
2627
2742
|
{
|
|
2628
|
-
className:
|
|
2743
|
+
className: cn39(
|
|
2629
2744
|
"mosaic-modal-panel relative w-[min(90vw,42rem)] rounded-xl border border-border bg-background shadow-xl",
|
|
2630
2745
|
"max-h-[90vh] flex flex-col",
|
|
2631
2746
|
className
|
|
@@ -2673,7 +2788,7 @@ function MosaicAdaptiveModal({
|
|
|
2673
2788
|
);
|
|
2674
2789
|
}
|
|
2675
2790
|
MosaicAdaptiveModal.displayName = "MosaicAdaptiveModal";
|
|
2676
|
-
function
|
|
2791
|
+
function cn40(...classes) {
|
|
2677
2792
|
return classes.filter(Boolean).join(" ");
|
|
2678
2793
|
}
|
|
2679
2794
|
function CheckIcon2() {
|
|
@@ -2734,7 +2849,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2734
2849
|
{
|
|
2735
2850
|
ref,
|
|
2736
2851
|
"data-slot": "adaptive-navigation",
|
|
2737
|
-
className:
|
|
2852
|
+
className: cn40("space-y-3", className),
|
|
2738
2853
|
"aria-label": stepNavAriaLabel,
|
|
2739
2854
|
children: items.map((item, idx) => {
|
|
2740
2855
|
const isExpanded = expandedItems?.has(item.id) ?? false;
|
|
@@ -2752,7 +2867,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2752
2867
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2753
2868
|
"div",
|
|
2754
2869
|
{
|
|
2755
|
-
className:
|
|
2870
|
+
className: cn40(
|
|
2756
2871
|
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-xs font-bold",
|
|
2757
2872
|
item.isComplete ? "bg-green-500 text-white" : "bg-muted text-muted-foreground"
|
|
2758
2873
|
),
|
|
@@ -2786,7 +2901,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2786
2901
|
{
|
|
2787
2902
|
ref,
|
|
2788
2903
|
"data-slot": "adaptive-navigation",
|
|
2789
|
-
className:
|
|
2904
|
+
className: cn40("w-full", className),
|
|
2790
2905
|
"aria-label": tabNavAriaLabel,
|
|
2791
2906
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2792
2907
|
"div",
|
|
@@ -2803,7 +2918,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2803
2918
|
role: "tab",
|
|
2804
2919
|
"aria-selected": isActive,
|
|
2805
2920
|
onClick: () => onItemChange(item.id),
|
|
2806
|
-
className:
|
|
2921
|
+
className: cn40(
|
|
2807
2922
|
"flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium transition-colors",
|
|
2808
2923
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
2809
2924
|
isActive ? "bg-primary text-primary-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
@@ -2812,7 +2927,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2812
2927
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2813
2928
|
"div",
|
|
2814
2929
|
{
|
|
2815
|
-
className:
|
|
2930
|
+
className: cn40(
|
|
2816
2931
|
"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",
|
|
2817
2932
|
item.isComplete ? "bg-green-500 text-white" : isActive ? "bg-primary-foreground/20 text-primary-foreground" : "bg-background text-muted-foreground"
|
|
2818
2933
|
),
|
|
@@ -2824,7 +2939,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2824
2939
|
item.duration !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2825
2940
|
"span",
|
|
2826
2941
|
{
|
|
2827
|
-
className:
|
|
2942
|
+
className: cn40(
|
|
2828
2943
|
"rounded px-1 py-0.5 text-xs",
|
|
2829
2944
|
isActive ? "bg-primary-foreground/20" : "bg-muted"
|
|
2830
2945
|
),
|
|
@@ -2845,7 +2960,7 @@ function MosaicAdaptiveNavigation({
|
|
|
2845
2960
|
);
|
|
2846
2961
|
}
|
|
2847
2962
|
MosaicAdaptiveNavigation.displayName = "MosaicAdaptiveNavigation";
|
|
2848
|
-
function
|
|
2963
|
+
function cn41(...classes) {
|
|
2849
2964
|
return classes.filter(Boolean).join(" ");
|
|
2850
2965
|
}
|
|
2851
2966
|
var ANIM_ID2 = "mosaic-sidebar-kf";
|
|
@@ -2997,8 +3112,8 @@ function MosaicAppSidebar({
|
|
|
2997
3112
|
ref
|
|
2998
3113
|
}) {
|
|
2999
3114
|
const { isMobile } = useDevice();
|
|
3000
|
-
const [expandedItems, setExpandedItems] =
|
|
3001
|
-
|
|
3115
|
+
const [expandedItems, setExpandedItems] = React29__namespace.useState(/* @__PURE__ */ new Set());
|
|
3116
|
+
React29__namespace.useEffect(() => {
|
|
3002
3117
|
injectStyles2();
|
|
3003
3118
|
}, []);
|
|
3004
3119
|
const sidebarWidth = isMobile ? "100%" : isCollapsed ? "64px" : "280px";
|
|
@@ -3021,7 +3136,7 @@ function MosaicAppSidebar({
|
|
|
3021
3136
|
{
|
|
3022
3137
|
ref,
|
|
3023
3138
|
"data-slot": "app-sidebar",
|
|
3024
|
-
className:
|
|
3139
|
+
className: cn41(
|
|
3025
3140
|
"flex h-full flex-col bg-sidebar border-r border-sidebar-border",
|
|
3026
3141
|
isMobile && "border-r-0",
|
|
3027
3142
|
className
|
|
@@ -3041,7 +3156,7 @@ function MosaicAppSidebar({
|
|
|
3041
3156
|
type: "button",
|
|
3042
3157
|
onClick: onToggleCollapse,
|
|
3043
3158
|
"aria-label": isCollapsed ? expandSidebarAriaLabel : collapseSidebarAriaLabel,
|
|
3044
|
-
className:
|
|
3159
|
+
className: cn41(
|
|
3045
3160
|
"flex h-9 w-9 items-center justify-center rounded-lg transition-colors",
|
|
3046
3161
|
"hover:bg-sidebar-accent text-sidebar-foreground",
|
|
3047
3162
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -3071,7 +3186,7 @@ function MosaicAppSidebar({
|
|
|
3071
3186
|
},
|
|
3072
3187
|
"aria-current": isActive ? "page" : void 0,
|
|
3073
3188
|
"aria-expanded": hasSubmenu && !isCollapsed ? isExpanded : void 0,
|
|
3074
|
-
className:
|
|
3189
|
+
className: cn41(
|
|
3075
3190
|
"group flex w-full min-h-[44px] items-center rounded-lg p-3 transition-colors",
|
|
3076
3191
|
"hover:bg-sidebar-accent",
|
|
3077
3192
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -3098,7 +3213,7 @@ function MosaicAppSidebar({
|
|
|
3098
3213
|
type: "button",
|
|
3099
3214
|
onClick: () => handleNavClick(sub.href),
|
|
3100
3215
|
"aria-current": isSubActive ? "page" : void 0,
|
|
3101
|
-
className:
|
|
3216
|
+
className: cn41(
|
|
3102
3217
|
"flex w-full min-h-[40px] items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors",
|
|
3103
3218
|
"hover:bg-sidebar-accent/50 text-sidebar-foreground",
|
|
3104
3219
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -3121,7 +3236,7 @@ function MosaicAppSidebar({
|
|
|
3121
3236
|
{
|
|
3122
3237
|
type: "button",
|
|
3123
3238
|
onClick: action.onClick,
|
|
3124
|
-
className:
|
|
3239
|
+
className: cn41(
|
|
3125
3240
|
"flex w-full min-h-[44px] items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium",
|
|
3126
3241
|
"text-sidebar-foreground transition-colors hover:bg-sidebar-accent",
|
|
3127
3242
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -3168,7 +3283,7 @@ function MosaicAppSidebar({
|
|
|
3168
3283
|
);
|
|
3169
3284
|
}
|
|
3170
3285
|
MosaicAppSidebar.displayName = "MosaicAppSidebar";
|
|
3171
|
-
function
|
|
3286
|
+
function cn42(...classes) {
|
|
3172
3287
|
return classes.filter(Boolean).join(" ");
|
|
3173
3288
|
}
|
|
3174
3289
|
var ANIM_ID3 = "mosaic-dashboard-kf";
|
|
@@ -3250,9 +3365,9 @@ function MosaicDashboardLayout({
|
|
|
3250
3365
|
ref
|
|
3251
3366
|
}) {
|
|
3252
3367
|
const { isMobile } = useDevice();
|
|
3253
|
-
const [isSidebarCollapsed, setIsSidebarCollapsed] =
|
|
3254
|
-
const [isMobileSidebarOpen, setIsMobileSidebarOpen] =
|
|
3255
|
-
|
|
3368
|
+
const [isSidebarCollapsed, setIsSidebarCollapsed] = React29__namespace.useState(defaultSidebarCollapsed);
|
|
3369
|
+
const [isMobileSidebarOpen, setIsMobileSidebarOpen] = React29__namespace.useState(false);
|
|
3370
|
+
React29__namespace.useEffect(() => {
|
|
3256
3371
|
injectStyles3();
|
|
3257
3372
|
}, []);
|
|
3258
3373
|
const defaultRenderLink2 = (href, children2) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "transition-colors hover:text-foreground", children: children2 });
|
|
@@ -3262,7 +3377,7 @@ function MosaicDashboardLayout({
|
|
|
3262
3377
|
{
|
|
3263
3378
|
ref,
|
|
3264
3379
|
"data-slot": "dashboard-layout",
|
|
3265
|
-
className:
|
|
3380
|
+
className: cn42("flex h-screen w-full bg-background", className),
|
|
3266
3381
|
children: [
|
|
3267
3382
|
!isMobile && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3268
3383
|
MosaicAppSidebar,
|
|
@@ -3286,7 +3401,7 @@ function MosaicDashboardLayout({
|
|
|
3286
3401
|
type: "button",
|
|
3287
3402
|
"aria-label": openNavigationAriaLabel,
|
|
3288
3403
|
onClick: () => setIsMobileSidebarOpen(true),
|
|
3289
|
-
className:
|
|
3404
|
+
className: cn42(
|
|
3290
3405
|
"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg",
|
|
3291
3406
|
"text-foreground transition-colors hover:bg-muted",
|
|
3292
3407
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -3339,7 +3454,7 @@ function MosaicDashboardLayout({
|
|
|
3339
3454
|
);
|
|
3340
3455
|
}
|
|
3341
3456
|
MosaicDashboardLayout.displayName = "MosaicDashboardLayout";
|
|
3342
|
-
function
|
|
3457
|
+
function cn43(...classes) {
|
|
3343
3458
|
return classes.filter(Boolean).join(" ");
|
|
3344
3459
|
}
|
|
3345
3460
|
var ANIM_ID4 = "mosaic-quick-action-kf";
|
|
@@ -3384,7 +3499,7 @@ function MosaicQuickActionCard({
|
|
|
3384
3499
|
ref
|
|
3385
3500
|
}) {
|
|
3386
3501
|
const { mobile = 2, desktop = 3 } = columns;
|
|
3387
|
-
|
|
3502
|
+
React29__namespace.useEffect(() => {
|
|
3388
3503
|
injectStyles4();
|
|
3389
3504
|
}, []);
|
|
3390
3505
|
const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "block h-full", children });
|
|
@@ -3394,7 +3509,7 @@ function MosaicQuickActionCard({
|
|
|
3394
3509
|
{
|
|
3395
3510
|
ref,
|
|
3396
3511
|
"data-slot": "quick-action-card",
|
|
3397
|
-
className:
|
|
3512
|
+
className: cn43("rounded-xl border border-border bg-card", className),
|
|
3398
3513
|
children: [
|
|
3399
3514
|
heading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground", children: heading }) }),
|
|
3400
3515
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3419,7 +3534,7 @@ function MosaicQuickActionCard({
|
|
|
3419
3534
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3420
3535
|
"div",
|
|
3421
3536
|
{
|
|
3422
|
-
className:
|
|
3537
|
+
className: cn43(
|
|
3423
3538
|
"flex min-h-[100px] cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border p-4",
|
|
3424
3539
|
"transition-transform duration-150 hover:scale-105 active:scale-[0.98]",
|
|
3425
3540
|
accentClass
|
|
@@ -3452,7 +3567,7 @@ function MosaicQuickActionCard({
|
|
|
3452
3567
|
);
|
|
3453
3568
|
}
|
|
3454
3569
|
MosaicQuickActionCard.displayName = "MosaicQuickActionCard";
|
|
3455
|
-
function
|
|
3570
|
+
function cn44(...classes) {
|
|
3456
3571
|
return classes.filter(Boolean).join(" ");
|
|
3457
3572
|
}
|
|
3458
3573
|
var ANIM_ID5 = "mosaic-activity-feed-kf";
|
|
@@ -3541,7 +3656,7 @@ function MosaicActivityItem({ activity, icon, className }) {
|
|
|
3541
3656
|
"div",
|
|
3542
3657
|
{
|
|
3543
3658
|
"data-slot": "activity-item",
|
|
3544
|
-
className:
|
|
3659
|
+
className: cn44(
|
|
3545
3660
|
"flex cursor-pointer items-start gap-4 rounded-lg p-3 transition-colors hover:bg-muted/50",
|
|
3546
3661
|
className
|
|
3547
3662
|
),
|
|
@@ -3575,7 +3690,7 @@ function MosaicActivityItem({ activity, icon, className }) {
|
|
|
3575
3690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3576
3691
|
"span",
|
|
3577
3692
|
{
|
|
3578
|
-
className:
|
|
3693
|
+
className: cn44(
|
|
3579
3694
|
"rounded-full px-2 py-0.5 text-xs font-medium",
|
|
3580
3695
|
getStatusClass(activity.status)
|
|
3581
3696
|
),
|
|
@@ -3601,7 +3716,7 @@ function MosaicActivityFeed({
|
|
|
3601
3716
|
className,
|
|
3602
3717
|
ref
|
|
3603
3718
|
}) {
|
|
3604
|
-
|
|
3719
|
+
React29__namespace.useEffect(() => {
|
|
3605
3720
|
injectStyles5();
|
|
3606
3721
|
}, []);
|
|
3607
3722
|
const defaultRenderLink2 = (href, children) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3618,7 +3733,7 @@ function MosaicActivityFeed({
|
|
|
3618
3733
|
{
|
|
3619
3734
|
ref,
|
|
3620
3735
|
"data-slot": "activity-feed",
|
|
3621
|
-
className:
|
|
3736
|
+
className: cn44("rounded-xl border border-border bg-card", className),
|
|
3622
3737
|
children: [
|
|
3623
3738
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
|
|
3624
3739
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground", children: heading }),
|
|
@@ -3644,7 +3759,7 @@ function MosaicActivityFeed({
|
|
|
3644
3759
|
);
|
|
3645
3760
|
}
|
|
3646
3761
|
MosaicActivityFeed.displayName = "MosaicActivityFeed";
|
|
3647
|
-
function
|
|
3762
|
+
function cn45(...classes) {
|
|
3648
3763
|
return classes.filter(Boolean).join(" ");
|
|
3649
3764
|
}
|
|
3650
3765
|
function SparklesIcon() {
|
|
@@ -3852,7 +3967,7 @@ function MosaicAgentComposerDesktop({
|
|
|
3852
3967
|
value: agentName,
|
|
3853
3968
|
onChange: (e) => onAgentNameChange(e.target.value),
|
|
3854
3969
|
placeholder: agentNamePlaceholder,
|
|
3855
|
-
className:
|
|
3970
|
+
className: cn45(
|
|
3856
3971
|
"flex min-h-[48px] w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
3857
3972
|
"placeholder:text-muted-foreground",
|
|
3858
3973
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -3953,7 +4068,7 @@ function MosaicAgentComposerDesktop({
|
|
|
3953
4068
|
onChange: (e) => onCustomInstructionsChange(e.target.value),
|
|
3954
4069
|
placeholder: instructionsPlaceholder,
|
|
3955
4070
|
rows: 5,
|
|
3956
|
-
className:
|
|
4071
|
+
className: cn45(
|
|
3957
4072
|
"flex w-full resize-y rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
3958
4073
|
"placeholder:text-muted-foreground",
|
|
3959
4074
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -4021,7 +4136,7 @@ function MosaicAgentComposerDesktop({
|
|
|
4021
4136
|
/* @__PURE__ */ jsxRuntime.jsx(SparklesIcon, {}),
|
|
4022
4137
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: selectAllModulesLabel })
|
|
4023
4138
|
] }) }),
|
|
4024
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4139
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn45("flex gap-2", isEditMode && onCancel ? "flex-row" : "flex-col"), children: [
|
|
4025
4140
|
isEditMode && onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4026
4141
|
"button",
|
|
4027
4142
|
{
|
|
@@ -4037,7 +4152,7 @@ function MosaicAgentComposerDesktop({
|
|
|
4037
4152
|
type: "button",
|
|
4038
4153
|
onClick: onSave,
|
|
4039
4154
|
disabled: !canSave,
|
|
4040
|
-
className:
|
|
4155
|
+
className: cn45(
|
|
4041
4156
|
"flex min-h-[48px] items-center justify-center gap-2 rounded-lg text-sm font-medium transition-colors",
|
|
4042
4157
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4043
4158
|
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -4058,7 +4173,7 @@ function MosaicAgentComposerDesktop({
|
|
|
4058
4173
|
] });
|
|
4059
4174
|
}
|
|
4060
4175
|
MosaicAgentComposerDesktop.displayName = "MosaicAgentComposerDesktop";
|
|
4061
|
-
function
|
|
4176
|
+
function cn46(...classes) {
|
|
4062
4177
|
return classes.filter(Boolean).join(" ");
|
|
4063
4178
|
}
|
|
4064
4179
|
function SparklesIcon2() {
|
|
@@ -4271,7 +4386,7 @@ function MosaicAgentComposerMobile({
|
|
|
4271
4386
|
optionalInstructionsHelp
|
|
4272
4387
|
}) {
|
|
4273
4388
|
const L = labels;
|
|
4274
|
-
const instructionsId =
|
|
4389
|
+
const instructionsId = React29__namespace.useId();
|
|
4275
4390
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "agent-composer-mobile", className: "flex h-full flex-col", children: [
|
|
4276
4391
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 sticky top-0 z-10 border-b border-border bg-background px-4 pt-4 pb-3", children: [
|
|
4277
4392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -4312,7 +4427,7 @@ function MosaicAgentComposerMobile({
|
|
|
4312
4427
|
disabled: isLoading,
|
|
4313
4428
|
"aria-required": "true",
|
|
4314
4429
|
"aria-invalid": canSave && !agentName ? "true" : "false",
|
|
4315
|
-
className:
|
|
4430
|
+
className: cn46(
|
|
4316
4431
|
"flex min-h-[48px] w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
4317
4432
|
"placeholder:text-muted-foreground",
|
|
4318
4433
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -4419,7 +4534,7 @@ function MosaicAgentComposerMobile({
|
|
|
4419
4534
|
disabled: isLoading,
|
|
4420
4535
|
"aria-describedby": `${instructionsId}-help`,
|
|
4421
4536
|
rows: 4,
|
|
4422
|
-
className:
|
|
4537
|
+
className: cn46(
|
|
4423
4538
|
"flex w-full resize-y rounded-lg border border-input bg-transparent px-3 py-2 text-sm",
|
|
4424
4539
|
"placeholder:text-muted-foreground",
|
|
4425
4540
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -4475,7 +4590,108 @@ function MosaicAgentComposer(props) {
|
|
|
4475
4590
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(MosaicAgentComposerMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(MosaicAgentComposerDesktop, { ...props });
|
|
4476
4591
|
}
|
|
4477
4592
|
MosaicAgentComposer.displayName = "MosaicAgentComposer";
|
|
4478
|
-
|
|
4593
|
+
var agentEditorVariants = classVarianceAuthority.cva("flex flex-col gap-4 w-full", {
|
|
4594
|
+
variants: {},
|
|
4595
|
+
defaultVariants: {}
|
|
4596
|
+
});
|
|
4597
|
+
function MosaicAgentEditor({
|
|
4598
|
+
className,
|
|
4599
|
+
ref,
|
|
4600
|
+
nameLabel,
|
|
4601
|
+
nameValue,
|
|
4602
|
+
onNameChange,
|
|
4603
|
+
nameError,
|
|
4604
|
+
roleLabel,
|
|
4605
|
+
roleValue,
|
|
4606
|
+
onRoleChange,
|
|
4607
|
+
roleError,
|
|
4608
|
+
instructionsLabel,
|
|
4609
|
+
instructionsValue,
|
|
4610
|
+
onInstructionsChange,
|
|
4611
|
+
instructionsError,
|
|
4612
|
+
saveLabel,
|
|
4613
|
+
cancelLabel,
|
|
4614
|
+
onSave,
|
|
4615
|
+
onCancel,
|
|
4616
|
+
canSave,
|
|
4617
|
+
isSaving,
|
|
4618
|
+
savingLabel
|
|
4619
|
+
}) {
|
|
4620
|
+
const nameErrorId = nameError ? "mosaic-agent-editor-name-error" : void 0;
|
|
4621
|
+
const roleErrorId = roleError ? "mosaic-agent-editor-role-error" : void 0;
|
|
4622
|
+
const instructionsErrorId = instructionsError ? "mosaic-agent-editor-instructions-error" : void 0;
|
|
4623
|
+
const saveDisabled = !canSave || isSaving;
|
|
4624
|
+
const handleSave = () => {
|
|
4625
|
+
if (saveDisabled) return;
|
|
4626
|
+
onSave();
|
|
4627
|
+
};
|
|
4628
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4629
|
+
"div",
|
|
4630
|
+
{
|
|
4631
|
+
ref,
|
|
4632
|
+
"data-slot": "agent-editor",
|
|
4633
|
+
"aria-busy": isSaving ? "true" : void 0,
|
|
4634
|
+
className: agentEditorVariants({ className }),
|
|
4635
|
+
children: [
|
|
4636
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4637
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "mosaic-agent-editor-name", className: "text-sm font-medium text-foreground", children: nameLabel }),
|
|
4638
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4639
|
+
MosaicInput,
|
|
4640
|
+
{
|
|
4641
|
+
id: "mosaic-agent-editor-name",
|
|
4642
|
+
value: nameValue,
|
|
4643
|
+
onChange: (event) => onNameChange(event.target.value),
|
|
4644
|
+
"aria-invalid": nameError ? "true" : void 0,
|
|
4645
|
+
"aria-describedby": nameErrorId
|
|
4646
|
+
}
|
|
4647
|
+
),
|
|
4648
|
+
nameError ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: nameErrorId, className: "text-xs font-medium text-destructive", children: nameError }) : null
|
|
4649
|
+
] }),
|
|
4650
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4651
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "mosaic-agent-editor-role", className: "text-sm font-medium text-foreground", children: roleLabel }),
|
|
4652
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4653
|
+
MosaicInput,
|
|
4654
|
+
{
|
|
4655
|
+
id: "mosaic-agent-editor-role",
|
|
4656
|
+
value: roleValue,
|
|
4657
|
+
onChange: (event) => onRoleChange(event.target.value),
|
|
4658
|
+
"aria-invalid": roleError ? "true" : void 0,
|
|
4659
|
+
"aria-describedby": roleErrorId
|
|
4660
|
+
}
|
|
4661
|
+
),
|
|
4662
|
+
roleError ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: roleErrorId, className: "text-xs font-medium text-destructive", children: roleError }) : null
|
|
4663
|
+
] }),
|
|
4664
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4665
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4666
|
+
"label",
|
|
4667
|
+
{
|
|
4668
|
+
htmlFor: "mosaic-agent-editor-instructions",
|
|
4669
|
+
className: "text-sm font-medium text-foreground",
|
|
4670
|
+
children: instructionsLabel
|
|
4671
|
+
}
|
|
4672
|
+
),
|
|
4673
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4674
|
+
MosaicTextarea,
|
|
4675
|
+
{
|
|
4676
|
+
id: "mosaic-agent-editor-instructions",
|
|
4677
|
+
value: instructionsValue,
|
|
4678
|
+
onChange: (event) => onInstructionsChange(event.target.value),
|
|
4679
|
+
"aria-invalid": instructionsError ? "true" : void 0,
|
|
4680
|
+
"aria-describedby": instructionsErrorId
|
|
4681
|
+
}
|
|
4682
|
+
),
|
|
4683
|
+
instructionsError ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: instructionsErrorId, className: "text-xs font-medium text-destructive", children: instructionsError }) : null
|
|
4684
|
+
] }),
|
|
4685
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
4686
|
+
/* @__PURE__ */ jsxRuntime.jsx(MosaicButton, { type: "button", variant: "outline", onClick: onCancel, children: cancelLabel }),
|
|
4687
|
+
/* @__PURE__ */ jsxRuntime.jsx(MosaicButton, { type: "button", onClick: handleSave, disabled: saveDisabled, children: isSaving ? savingLabel : saveLabel })
|
|
4688
|
+
] })
|
|
4689
|
+
]
|
|
4690
|
+
}
|
|
4691
|
+
);
|
|
4692
|
+
}
|
|
4693
|
+
MosaicAgentEditor.displayName = "MosaicAgentEditor";
|
|
4694
|
+
function cn47(...classes) {
|
|
4479
4695
|
return classes.filter(Boolean).join(" ");
|
|
4480
4696
|
}
|
|
4481
4697
|
function EditIcon() {
|
|
@@ -4536,7 +4752,7 @@ function MosaicModuleCard({
|
|
|
4536
4752
|
{
|
|
4537
4753
|
ref,
|
|
4538
4754
|
"data-slot": "module-card",
|
|
4539
|
-
className:
|
|
4755
|
+
className: cn47(
|
|
4540
4756
|
"min-h-[80px] rounded-xl border border-border bg-card p-4 transition-all",
|
|
4541
4757
|
"flex items-start gap-3",
|
|
4542
4758
|
isSelected && "ring-2 ring-primary bg-primary/5",
|
|
@@ -4598,7 +4814,7 @@ function MosaicThemeProvider({
|
|
|
4598
4814
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "theme-provider", children });
|
|
4599
4815
|
}
|
|
4600
4816
|
MosaicThemeProvider.displayName = "MosaicThemeProvider";
|
|
4601
|
-
function
|
|
4817
|
+
function cn48(...classes) {
|
|
4602
4818
|
return classes.filter(Boolean).join(" ");
|
|
4603
4819
|
}
|
|
4604
4820
|
var ANIM_ID6 = "mosaic-delete-dialog-kf";
|
|
@@ -4640,21 +4856,21 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4640
4856
|
cancelLabel,
|
|
4641
4857
|
confirmLabel
|
|
4642
4858
|
}) {
|
|
4643
|
-
|
|
4859
|
+
React29__namespace.useEffect(() => {
|
|
4644
4860
|
injectStyles6();
|
|
4645
4861
|
}, []);
|
|
4646
4862
|
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(alertDialog.AlertDialog.Portal, { children: [
|
|
4647
4863
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4648
4864
|
alertDialog.AlertDialog.Backdrop,
|
|
4649
4865
|
{
|
|
4650
|
-
className:
|
|
4866
|
+
className: cn48("mosaic-delete-overlay", "fixed inset-0 z-50 bg-black/50")
|
|
4651
4867
|
}
|
|
4652
4868
|
),
|
|
4653
4869
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4654
4870
|
alertDialog.AlertDialog.Popup,
|
|
4655
4871
|
{
|
|
4656
4872
|
"data-slot": "delete-confirmation-dialog",
|
|
4657
|
-
className:
|
|
4873
|
+
className: cn48(
|
|
4658
4874
|
"mosaic-delete-content",
|
|
4659
4875
|
"fixed left-1/2 top-1/2 z-50",
|
|
4660
4876
|
"w-full max-w-[92vw] sm:max-w-md",
|
|
@@ -4667,7 +4883,7 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4667
4883
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4668
4884
|
alertDialog.AlertDialog.Close,
|
|
4669
4885
|
{
|
|
4670
|
-
className:
|
|
4886
|
+
className: cn48(
|
|
4671
4887
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
|
|
4672
4888
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
4673
4889
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -4681,7 +4897,7 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4681
4897
|
alertDialog.AlertDialog.Close,
|
|
4682
4898
|
{
|
|
4683
4899
|
onClick: onConfirm,
|
|
4684
|
-
className:
|
|
4900
|
+
className: cn48(
|
|
4685
4901
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md",
|
|
4686
4902
|
"bg-destructive px-4 py-2 text-sm font-medium text-destructive-foreground",
|
|
4687
4903
|
"hover:bg-destructive/90",
|
|
@@ -4698,7 +4914,154 @@ function MosaicDeleteConfirmationDialog({
|
|
|
4698
4914
|
] }) });
|
|
4699
4915
|
}
|
|
4700
4916
|
MosaicDeleteConfirmationDialog.displayName = "MosaicDeleteConfirmationDialog";
|
|
4701
|
-
|
|
4917
|
+
var alertDialogContentVariants = classVarianceAuthority.cva([
|
|
4918
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)]",
|
|
4919
|
+
"-translate-x-1/2 -translate-y-1/2 gap-4",
|
|
4920
|
+
"rounded-lg border border-border bg-background p-6 shadow-lg",
|
|
4921
|
+
"sm:max-w-lg"
|
|
4922
|
+
]);
|
|
4923
|
+
var alertDialogOverlayVariants = classVarianceAuthority.cva(["fixed inset-0 z-50 bg-black/50"]);
|
|
4924
|
+
function cn49(...classes) {
|
|
4925
|
+
return classes.filter(Boolean).join(" ");
|
|
4926
|
+
}
|
|
4927
|
+
function MosaicAlertDialog(props) {
|
|
4928
|
+
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
4929
|
+
}
|
|
4930
|
+
MosaicAlertDialog.displayName = "MosaicAlertDialog";
|
|
4931
|
+
function MosaicAlertDialogTrigger(props) {
|
|
4932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
4933
|
+
}
|
|
4934
|
+
MosaicAlertDialogTrigger.displayName = "MosaicAlertDialogTrigger";
|
|
4935
|
+
function MosaicAlertDialogPortal(props) {
|
|
4936
|
+
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
4937
|
+
}
|
|
4938
|
+
MosaicAlertDialogPortal.displayName = "MosaicAlertDialogPortal";
|
|
4939
|
+
function MosaicAlertDialogOverlay({ className, ...props }) {
|
|
4940
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4941
|
+
alertDialog.AlertDialog.Backdrop,
|
|
4942
|
+
{
|
|
4943
|
+
"data-slot": "alert-dialog-overlay",
|
|
4944
|
+
className: cn49(alertDialogOverlayVariants(), className),
|
|
4945
|
+
...props
|
|
4946
|
+
}
|
|
4947
|
+
);
|
|
4948
|
+
}
|
|
4949
|
+
MosaicAlertDialogOverlay.displayName = "MosaicAlertDialogOverlay";
|
|
4950
|
+
function MosaicAlertDialogContent({ className, ...props }) {
|
|
4951
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(MosaicAlertDialogPortal, { children: [
|
|
4952
|
+
/* @__PURE__ */ jsxRuntime.jsx(MosaicAlertDialogOverlay, {}),
|
|
4953
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4954
|
+
alertDialog.AlertDialog.Popup,
|
|
4955
|
+
{
|
|
4956
|
+
"data-slot": "alert-dialog-content",
|
|
4957
|
+
className: cn49(alertDialogContentVariants(), className),
|
|
4958
|
+
...props
|
|
4959
|
+
}
|
|
4960
|
+
)
|
|
4961
|
+
] });
|
|
4962
|
+
}
|
|
4963
|
+
MosaicAlertDialogContent.displayName = "MosaicAlertDialogContent";
|
|
4964
|
+
function MosaicAlertDialogHeader({ className, ...props }) {
|
|
4965
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4966
|
+
"div",
|
|
4967
|
+
{
|
|
4968
|
+
"data-slot": "alert-dialog-header",
|
|
4969
|
+
className: cn49("flex flex-col gap-2 text-center sm:text-left", className),
|
|
4970
|
+
...props
|
|
4971
|
+
}
|
|
4972
|
+
);
|
|
4973
|
+
}
|
|
4974
|
+
MosaicAlertDialogHeader.displayName = "MosaicAlertDialogHeader";
|
|
4975
|
+
function MosaicAlertDialogFooter({ className, ...props }) {
|
|
4976
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4977
|
+
"div",
|
|
4978
|
+
{
|
|
4979
|
+
"data-slot": "alert-dialog-footer",
|
|
4980
|
+
className: cn49("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
4981
|
+
...props
|
|
4982
|
+
}
|
|
4983
|
+
);
|
|
4984
|
+
}
|
|
4985
|
+
MosaicAlertDialogFooter.displayName = "MosaicAlertDialogFooter";
|
|
4986
|
+
function MosaicAlertDialogTitle({
|
|
4987
|
+
className,
|
|
4988
|
+
children,
|
|
4989
|
+
...props
|
|
4990
|
+
}) {
|
|
4991
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4992
|
+
alertDialog.AlertDialog.Title,
|
|
4993
|
+
{
|
|
4994
|
+
"data-slot": "alert-dialog-title",
|
|
4995
|
+
className: cn49("text-lg font-semibold text-foreground", className),
|
|
4996
|
+
...props,
|
|
4997
|
+
children
|
|
4998
|
+
}
|
|
4999
|
+
);
|
|
5000
|
+
}
|
|
5001
|
+
MosaicAlertDialogTitle.displayName = "MosaicAlertDialogTitle";
|
|
5002
|
+
function MosaicAlertDialogDescription({
|
|
5003
|
+
className,
|
|
5004
|
+
children,
|
|
5005
|
+
...props
|
|
5006
|
+
}) {
|
|
5007
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5008
|
+
alertDialog.AlertDialog.Description,
|
|
5009
|
+
{
|
|
5010
|
+
"data-slot": "alert-dialog-description",
|
|
5011
|
+
className: cn49("text-sm text-muted-foreground", className),
|
|
5012
|
+
...props,
|
|
5013
|
+
children
|
|
5014
|
+
}
|
|
5015
|
+
);
|
|
5016
|
+
}
|
|
5017
|
+
MosaicAlertDialogDescription.displayName = "MosaicAlertDialogDescription";
|
|
5018
|
+
function MosaicAlertDialogAction({
|
|
5019
|
+
className,
|
|
5020
|
+
children,
|
|
5021
|
+
...props
|
|
5022
|
+
}) {
|
|
5023
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5024
|
+
alertDialog.AlertDialog.Close,
|
|
5025
|
+
{
|
|
5026
|
+
"data-slot": "alert-dialog-action",
|
|
5027
|
+
className: cn49(
|
|
5028
|
+
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4",
|
|
5029
|
+
"bg-destructive text-sm font-medium text-destructive-foreground",
|
|
5030
|
+
"hover:bg-destructive/90",
|
|
5031
|
+
"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
|
5032
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
5033
|
+
className
|
|
5034
|
+
),
|
|
5035
|
+
...props,
|
|
5036
|
+
children
|
|
5037
|
+
}
|
|
5038
|
+
);
|
|
5039
|
+
}
|
|
5040
|
+
MosaicAlertDialogAction.displayName = "MosaicAlertDialogAction";
|
|
5041
|
+
function MosaicAlertDialogCancel({
|
|
5042
|
+
className,
|
|
5043
|
+
children,
|
|
5044
|
+
...props
|
|
5045
|
+
}) {
|
|
5046
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5047
|
+
alertDialog.AlertDialog.Close,
|
|
5048
|
+
{
|
|
5049
|
+
"data-slot": "alert-dialog-cancel",
|
|
5050
|
+
className: cn49(
|
|
5051
|
+
"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border px-4",
|
|
5052
|
+
"bg-background text-sm font-medium text-foreground shadow-xs",
|
|
5053
|
+
"hover:bg-muted hover:text-foreground",
|
|
5054
|
+
"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
|
5055
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
5056
|
+
className
|
|
5057
|
+
),
|
|
5058
|
+
...props,
|
|
5059
|
+
children
|
|
5060
|
+
}
|
|
5061
|
+
);
|
|
5062
|
+
}
|
|
5063
|
+
MosaicAlertDialogCancel.displayName = "MosaicAlertDialogCancel";
|
|
5064
|
+
function cn50(...classes) {
|
|
4702
5065
|
return classes.filter(Boolean).join(" ");
|
|
4703
5066
|
}
|
|
4704
5067
|
function Toggle({
|
|
@@ -4714,7 +5077,7 @@ function Toggle({
|
|
|
4714
5077
|
id,
|
|
4715
5078
|
"aria-checked": checked,
|
|
4716
5079
|
onClick: () => onChange(!checked),
|
|
4717
|
-
className:
|
|
5080
|
+
className: cn50(
|
|
4718
5081
|
"relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent",
|
|
4719
5082
|
"transition-colors duration-200 ease-in-out",
|
|
4720
5083
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
@@ -4723,7 +5086,7 @@ function Toggle({
|
|
|
4723
5086
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4724
5087
|
"span",
|
|
4725
5088
|
{
|
|
4726
|
-
className:
|
|
5089
|
+
className: cn50(
|
|
4727
5090
|
"pointer-events-none inline-block h-5 w-5 rounded-full bg-background shadow-lg",
|
|
4728
5091
|
"transform transition duration-200 ease-in-out",
|
|
4729
5092
|
checked ? "translate-x-5" : "translate-x-0"
|
|
@@ -4745,7 +5108,7 @@ function NativeSelect({
|
|
|
4745
5108
|
id,
|
|
4746
5109
|
value,
|
|
4747
5110
|
onChange: (e) => onChange(e.target.value),
|
|
4748
|
-
className:
|
|
5111
|
+
className: cn50(
|
|
4749
5112
|
"flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
4750
5113
|
"text-sm text-foreground",
|
|
4751
5114
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -4765,7 +5128,7 @@ function MosaicPreferencesPanel({
|
|
|
4765
5128
|
className
|
|
4766
5129
|
}) {
|
|
4767
5130
|
const { isMobile } = useDevice();
|
|
4768
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "preferences-panel", className:
|
|
5131
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "preferences-panel", className: cn50("space-y-4 md:space-y-6", className), children: [
|
|
4769
5132
|
groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4770
5133
|
"div",
|
|
4771
5134
|
{
|
|
@@ -4808,13 +5171,13 @@ function MosaicPreferencesPanel({
|
|
|
4808
5171
|
},
|
|
4809
5172
|
group.id
|
|
4810
5173
|
)),
|
|
4811
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5174
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn50("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4812
5175
|
"button",
|
|
4813
5176
|
{
|
|
4814
5177
|
type: "button",
|
|
4815
5178
|
onClick: onSave,
|
|
4816
5179
|
disabled: isSaving,
|
|
4817
|
-
className:
|
|
5180
|
+
className: cn50(
|
|
4818
5181
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
|
|
4819
5182
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
4820
5183
|
"hover:bg-primary/90",
|
|
@@ -4850,7 +5213,7 @@ function MosaicPreferencesPanel({
|
|
|
4850
5213
|
] });
|
|
4851
5214
|
}
|
|
4852
5215
|
MosaicPreferencesPanel.displayName = "MosaicPreferencesPanel";
|
|
4853
|
-
function
|
|
5216
|
+
function cn51(...classes) {
|
|
4854
5217
|
return classes.filter(Boolean).join(" ");
|
|
4855
5218
|
}
|
|
4856
5219
|
function AvatarDisplay({
|
|
@@ -4863,7 +5226,7 @@ function AvatarDisplay({
|
|
|
4863
5226
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4864
5227
|
"span",
|
|
4865
5228
|
{
|
|
4866
|
-
className:
|
|
5229
|
+
className: cn51(
|
|
4867
5230
|
"inline-flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground font-semibold overflow-hidden",
|
|
4868
5231
|
sizeClass
|
|
4869
5232
|
),
|
|
@@ -4895,7 +5258,7 @@ function MosaicProfilePanel({
|
|
|
4895
5258
|
className
|
|
4896
5259
|
}) {
|
|
4897
5260
|
const { isMobile } = useDevice();
|
|
4898
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "profile-panel", className:
|
|
5261
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "profile-panel", className: cn51("space-y-4 md:space-y-6", className), children: [
|
|
4899
5262
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border bg-card text-card-foreground shadow-sm", children: [
|
|
4900
5263
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1.5 p-6", children: [
|
|
4901
5264
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold leading-none tracking-tight md:text-xl", children: avatarHeading }),
|
|
@@ -4915,7 +5278,7 @@ function MosaicProfilePanel({
|
|
|
4915
5278
|
{
|
|
4916
5279
|
type: "button",
|
|
4917
5280
|
onClick: onAvatarUpload,
|
|
4918
|
-
className:
|
|
5281
|
+
className: cn51(
|
|
4919
5282
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md border border-border",
|
|
4920
5283
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
4921
5284
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -4965,7 +5328,7 @@ function MosaicProfilePanel({
|
|
|
4965
5328
|
placeholder: field.placeholder,
|
|
4966
5329
|
onChange: (e) => onFieldChange?.(field.id, e.target.value),
|
|
4967
5330
|
rows: 4,
|
|
4968
|
-
className:
|
|
5331
|
+
className: cn51(
|
|
4969
5332
|
"flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
4970
5333
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
4971
5334
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -4981,7 +5344,7 @@ function MosaicProfilePanel({
|
|
|
4981
5344
|
readOnly: field.readOnly,
|
|
4982
5345
|
placeholder: field.placeholder,
|
|
4983
5346
|
onChange: (e) => onFieldChange?.(field.id, e.target.value),
|
|
4984
|
-
className:
|
|
5347
|
+
className: cn51(
|
|
4985
5348
|
"flex min-h-[48px] w-full rounded-md border border-input bg-background px-3 py-2",
|
|
4986
5349
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
4987
5350
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -5001,7 +5364,7 @@ function MosaicProfilePanel({
|
|
|
5001
5364
|
{
|
|
5002
5365
|
type: "button",
|
|
5003
5366
|
onClick: onChangePassword,
|
|
5004
|
-
className:
|
|
5367
|
+
className: cn51(
|
|
5005
5368
|
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
5006
5369
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
5007
5370
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -5013,13 +5376,13 @@ function MosaicProfilePanel({
|
|
|
5013
5376
|
) })
|
|
5014
5377
|
] }),
|
|
5015
5378
|
extraSections,
|
|
5016
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5379
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn51("flex", isMobile ? "flex-col" : "justify-end"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5017
5380
|
"button",
|
|
5018
5381
|
{
|
|
5019
5382
|
type: "button",
|
|
5020
5383
|
onClick: onSave,
|
|
5021
5384
|
disabled: isSaving,
|
|
5022
|
-
className:
|
|
5385
|
+
className: cn51(
|
|
5023
5386
|
"inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md",
|
|
5024
5387
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
5025
5388
|
"hover:bg-primary/90",
|
|
@@ -5055,7 +5418,7 @@ function MosaicProfilePanel({
|
|
|
5055
5418
|
] });
|
|
5056
5419
|
}
|
|
5057
5420
|
MosaicProfilePanel.displayName = "MosaicProfilePanel";
|
|
5058
|
-
function
|
|
5421
|
+
function cn52(...classes) {
|
|
5059
5422
|
return classes.filter(Boolean).join(" ");
|
|
5060
5423
|
}
|
|
5061
5424
|
var ANIM_ID7 = "mosaic-main-nav-kf";
|
|
@@ -5146,12 +5509,12 @@ function MosaicMainNav({
|
|
|
5146
5509
|
className
|
|
5147
5510
|
}) {
|
|
5148
5511
|
const { isMobile } = useDevice();
|
|
5149
|
-
const [isOpen, setIsOpen] =
|
|
5512
|
+
const [isOpen, setIsOpen] = React29__namespace.useState(false);
|
|
5150
5513
|
const linkRenderer = renderLink ?? defaultRenderLink;
|
|
5151
|
-
|
|
5514
|
+
React29__namespace.useEffect(() => {
|
|
5152
5515
|
injectStyles7();
|
|
5153
5516
|
}, []);
|
|
5154
|
-
|
|
5517
|
+
React29__namespace.useEffect(() => {
|
|
5155
5518
|
if (!isOpen) return;
|
|
5156
5519
|
const handler = (e) => {
|
|
5157
5520
|
if (e.key === "Escape") setIsOpen(false);
|
|
@@ -5168,7 +5531,7 @@ function MosaicMainNav({
|
|
|
5168
5531
|
{
|
|
5169
5532
|
type: "button",
|
|
5170
5533
|
onClick: () => setIsOpen(!isOpen),
|
|
5171
|
-
className:
|
|
5534
|
+
className: cn52(
|
|
5172
5535
|
"inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md p-0",
|
|
5173
5536
|
"text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5174
5537
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5194,7 +5557,7 @@ function MosaicMainNav({
|
|
|
5194
5557
|
"aria-label": drawerNavAriaLabel,
|
|
5195
5558
|
open: isOpen,
|
|
5196
5559
|
"data-open": isOpen ? "true" : "false",
|
|
5197
|
-
className:
|
|
5560
|
+
className: cn52(
|
|
5198
5561
|
"mosaic-nav-drawer",
|
|
5199
5562
|
"fixed inset-y-0 left-0 z-50 m-0 w-[280px] max-h-none h-full p-0",
|
|
5200
5563
|
"border-r border-border bg-background shadow-xl",
|
|
@@ -5211,7 +5574,7 @@ function MosaicMainNav({
|
|
|
5211
5574
|
{
|
|
5212
5575
|
type: "button",
|
|
5213
5576
|
onClick: () => setIsOpen(false),
|
|
5214
|
-
className:
|
|
5577
|
+
className: cn52(
|
|
5215
5578
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
5216
5579
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5217
5580
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5224,13 +5587,13 @@ function MosaicMainNav({
|
|
|
5224
5587
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1 p-4", "aria-label": mainNavAriaLabel, children: filteredItems.map((item) => {
|
|
5225
5588
|
const Icon = item.icon;
|
|
5226
5589
|
const active = isItemActive(item);
|
|
5227
|
-
const itemClass =
|
|
5590
|
+
const itemClass = cn52(
|
|
5228
5591
|
"flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
|
|
5229
5592
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5230
5593
|
"min-h-[44px]",
|
|
5231
5594
|
active && "bg-accent text-accent-foreground"
|
|
5232
5595
|
);
|
|
5233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5596
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React29__namespace.Fragment, { children: linkRenderer(
|
|
5234
5597
|
item,
|
|
5235
5598
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5236
5599
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
|
|
@@ -5250,18 +5613,18 @@ function MosaicMainNav({
|
|
|
5250
5613
|
"nav",
|
|
5251
5614
|
{
|
|
5252
5615
|
"data-slot": "main-nav",
|
|
5253
|
-
className:
|
|
5616
|
+
className: cn52("flex items-center gap-1", className),
|
|
5254
5617
|
"aria-label": mainNavAriaLabel,
|
|
5255
5618
|
children: filteredItems.map((item) => {
|
|
5256
5619
|
const Icon = item.icon;
|
|
5257
5620
|
const active = isItemActive(item);
|
|
5258
|
-
const itemClass =
|
|
5621
|
+
const itemClass = cn52(
|
|
5259
5622
|
"flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
5260
5623
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5261
5624
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5262
5625
|
active && "bg-accent text-accent-foreground"
|
|
5263
5626
|
);
|
|
5264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5627
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React29__namespace.Fragment, { children: linkRenderer(
|
|
5265
5628
|
item,
|
|
5266
5629
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5267
5630
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
@@ -5275,7 +5638,7 @@ function MosaicMainNav({
|
|
|
5275
5638
|
);
|
|
5276
5639
|
}
|
|
5277
5640
|
MosaicMainNav.displayName = "MosaicMainNav";
|
|
5278
|
-
function
|
|
5641
|
+
function cn53(...classes) {
|
|
5279
5642
|
return classes.filter(Boolean).join(" ");
|
|
5280
5643
|
}
|
|
5281
5644
|
function MoreVertIcon() {
|
|
@@ -5398,10 +5761,10 @@ function MosaicAgentCard({
|
|
|
5398
5761
|
createdLabel,
|
|
5399
5762
|
className
|
|
5400
5763
|
}) {
|
|
5401
|
-
const [menuOpen, setMenuOpen] =
|
|
5402
|
-
const menuRef =
|
|
5764
|
+
const [menuOpen, setMenuOpen] = React29__namespace.useState(false);
|
|
5765
|
+
const menuRef = React29__namespace.useRef(null);
|
|
5403
5766
|
const formattedDate = agent.createdAt ? new Date(agent.createdAt).toLocaleDateString() : void 0;
|
|
5404
|
-
|
|
5767
|
+
React29__namespace.useEffect(() => {
|
|
5405
5768
|
if (!menuOpen) return;
|
|
5406
5769
|
const handler = (e) => {
|
|
5407
5770
|
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
@@ -5415,7 +5778,7 @@ function MosaicAgentCard({
|
|
|
5415
5778
|
"div",
|
|
5416
5779
|
{
|
|
5417
5780
|
"data-slot": "agent-card",
|
|
5418
|
-
className:
|
|
5781
|
+
className: cn53(
|
|
5419
5782
|
"relative overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
5420
5783
|
"transition-shadow hover:shadow-md",
|
|
5421
5784
|
agent.isActive && "ring-2 ring-primary",
|
|
@@ -5425,7 +5788,7 @@ function MosaicAgentCard({
|
|
|
5425
5788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5426
5789
|
"div",
|
|
5427
5790
|
{
|
|
5428
|
-
className:
|
|
5791
|
+
className: cn53(
|
|
5429
5792
|
"absolute left-0 top-0 h-1 w-full",
|
|
5430
5793
|
agent.isActive ? "bg-primary" : "bg-muted"
|
|
5431
5794
|
)
|
|
@@ -5437,7 +5800,7 @@ function MosaicAgentCard({
|
|
|
5437
5800
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5438
5801
|
"span",
|
|
5439
5802
|
{
|
|
5440
|
-
className:
|
|
5803
|
+
className: cn53("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
|
|
5441
5804
|
"aria-hidden": "true"
|
|
5442
5805
|
}
|
|
5443
5806
|
),
|
|
@@ -5455,7 +5818,7 @@ function MosaicAgentCard({
|
|
|
5455
5818
|
{
|
|
5456
5819
|
type: "button",
|
|
5457
5820
|
onClick: () => setMenuOpen((v) => !v),
|
|
5458
|
-
className:
|
|
5821
|
+
className: cn53(
|
|
5459
5822
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
5460
5823
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5461
5824
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5470,7 +5833,7 @@ function MosaicAgentCard({
|
|
|
5470
5833
|
"div",
|
|
5471
5834
|
{
|
|
5472
5835
|
role: "menu",
|
|
5473
|
-
className:
|
|
5836
|
+
className: cn53(
|
|
5474
5837
|
"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
|
|
5475
5838
|
"bg-popover py-1 shadow-md"
|
|
5476
5839
|
),
|
|
@@ -5485,7 +5848,7 @@ function MosaicAgentCard({
|
|
|
5485
5848
|
onToggleStatus(agent.id);
|
|
5486
5849
|
setMenuOpen(false);
|
|
5487
5850
|
},
|
|
5488
|
-
className:
|
|
5851
|
+
className: cn53(
|
|
5489
5852
|
"flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
|
|
5490
5853
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5491
5854
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
@@ -5544,7 +5907,7 @@ function MosaicAgentCard({
|
|
|
5544
5907
|
type: "button",
|
|
5545
5908
|
disabled: isLoading,
|
|
5546
5909
|
onClick: () => onToggleStatus(agent.id),
|
|
5547
|
-
className:
|
|
5910
|
+
className: cn53(
|
|
5548
5911
|
"inline-flex h-7 items-center justify-center rounded-md px-3 text-xs font-medium",
|
|
5549
5912
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5550
5913
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
@@ -5560,7 +5923,7 @@ function MosaicAgentCard({
|
|
|
5560
5923
|
);
|
|
5561
5924
|
}
|
|
5562
5925
|
MosaicAgentCard.displayName = "MosaicAgentCard";
|
|
5563
|
-
function
|
|
5926
|
+
function cn54(...classes) {
|
|
5564
5927
|
return classes.filter(Boolean).join(" ");
|
|
5565
5928
|
}
|
|
5566
5929
|
function PlusIcon3() {
|
|
@@ -5643,7 +6006,7 @@ function PickerContent({
|
|
|
5643
6006
|
{
|
|
5644
6007
|
type: "button",
|
|
5645
6008
|
onClick: () => onAdd(agent.id),
|
|
5646
|
-
className:
|
|
6009
|
+
className: cn54(
|
|
5647
6010
|
"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
|
|
5648
6011
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5649
6012
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5652,7 +6015,7 @@ function PickerContent({
|
|
|
5652
6015
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5653
6016
|
"span",
|
|
5654
6017
|
{
|
|
5655
|
-
className:
|
|
6018
|
+
className: cn54("h-3 w-3 shrink-0 rounded-full", agent.accentColor),
|
|
5656
6019
|
"aria-hidden": "true"
|
|
5657
6020
|
}
|
|
5658
6021
|
),
|
|
@@ -5669,7 +6032,7 @@ function PickerContent({
|
|
|
5669
6032
|
{
|
|
5670
6033
|
type: "button",
|
|
5671
6034
|
onClick: onOpenBuilder,
|
|
5672
|
-
className:
|
|
6035
|
+
className: cn54(
|
|
5673
6036
|
"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm",
|
|
5674
6037
|
"hover:bg-accent hover:text-accent-foreground",
|
|
5675
6038
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -5704,9 +6067,9 @@ function MosaicQuickAgentSelector({
|
|
|
5704
6067
|
className
|
|
5705
6068
|
}) {
|
|
5706
6069
|
const { isMobile } = useDevice();
|
|
5707
|
-
const [pickerOpen, setPickerOpen] =
|
|
5708
|
-
const dropdownRef =
|
|
5709
|
-
|
|
6070
|
+
const [pickerOpen, setPickerOpen] = React29__namespace.useState(false);
|
|
6071
|
+
const dropdownRef = React29__namespace.useRef(null);
|
|
6072
|
+
React29__namespace.useEffect(() => {
|
|
5710
6073
|
if (!pickerOpen || isMobile) return;
|
|
5711
6074
|
const handler = (e) => {
|
|
5712
6075
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
@@ -5724,11 +6087,11 @@ function MosaicQuickAgentSelector({
|
|
|
5724
6087
|
setPickerOpen(false);
|
|
5725
6088
|
};
|
|
5726
6089
|
const canAdd = selectedAgents.length < maxAgents;
|
|
5727
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-agent-selector", className:
|
|
6090
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-agent-selector", className: cn54("flex items-center gap-2", className), children: [
|
|
5728
6091
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 overflow-x-auto", children: selectedAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5729
6092
|
"div",
|
|
5730
6093
|
{
|
|
5731
|
-
className:
|
|
6094
|
+
className: cn54(
|
|
5732
6095
|
"group flex shrink-0 items-center gap-2 rounded-md border border-border bg-card",
|
|
5733
6096
|
isMobile ? "px-2 py-1" : "px-3 py-1.5"
|
|
5734
6097
|
),
|
|
@@ -5736,17 +6099,17 @@ function MosaicQuickAgentSelector({
|
|
|
5736
6099
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5737
6100
|
"span",
|
|
5738
6101
|
{
|
|
5739
|
-
className:
|
|
6102
|
+
className: cn54("h-2 w-2 shrink-0 rounded-full", agent.accentColor),
|
|
5740
6103
|
"aria-hidden": "true"
|
|
5741
6104
|
}
|
|
5742
6105
|
),
|
|
5743
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6106
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn54("whitespace-nowrap font-medium", isMobile ? "text-xs" : "text-sm"), children: isMobile ? agent.type.split("-")[0] : agent.name }),
|
|
5744
6107
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5745
6108
|
"button",
|
|
5746
6109
|
{
|
|
5747
6110
|
type: "button",
|
|
5748
6111
|
onClick: () => onRemoveAgent(agent.id),
|
|
5749
|
-
className:
|
|
6112
|
+
className: cn54(
|
|
5750
6113
|
"inline-flex h-4 w-4 items-center justify-center rounded",
|
|
5751
6114
|
"text-muted-foreground hover:text-foreground",
|
|
5752
6115
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -5766,7 +6129,7 @@ function MosaicQuickAgentSelector({
|
|
|
5766
6129
|
{
|
|
5767
6130
|
type: "button",
|
|
5768
6131
|
onClick: () => setPickerOpen((v) => !v),
|
|
5769
|
-
className:
|
|
6132
|
+
className: cn54(
|
|
5770
6133
|
"inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
|
|
5771
6134
|
"px-3 py-1.5 text-sm font-medium text-foreground",
|
|
5772
6135
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -5781,7 +6144,7 @@ function MosaicQuickAgentSelector({
|
|
|
5781
6144
|
!isMobile && pickerOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5782
6145
|
"div",
|
|
5783
6146
|
{
|
|
5784
|
-
className:
|
|
6147
|
+
className: cn54(
|
|
5785
6148
|
"absolute left-0 top-full z-50 mt-2 w-72 rounded-lg border border-border",
|
|
5786
6149
|
"bg-popover shadow-lg"
|
|
5787
6150
|
),
|
|
@@ -5830,7 +6193,7 @@ function MosaicQuickAgentSelector({
|
|
|
5830
6193
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5831
6194
|
"span",
|
|
5832
6195
|
{
|
|
5833
|
-
className:
|
|
6196
|
+
className: cn54(
|
|
5834
6197
|
"shrink-0 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground"
|
|
5835
6198
|
),
|
|
5836
6199
|
children: [
|
|
@@ -5843,6 +6206,81 @@ function MosaicQuickAgentSelector({
|
|
|
5843
6206
|
] });
|
|
5844
6207
|
}
|
|
5845
6208
|
MosaicQuickAgentSelector.displayName = "MosaicQuickAgentSelector";
|
|
6209
|
+
var agentPreviewVariants = classVarianceAuthority.cva(["rounded-lg border border-border"], {
|
|
6210
|
+
variants: {
|
|
6211
|
+
variant: {
|
|
6212
|
+
summary: ["flex items-center gap-3 p-3 bg-background"],
|
|
6213
|
+
detailed: []
|
|
6214
|
+
}
|
|
6215
|
+
},
|
|
6216
|
+
defaultVariants: {
|
|
6217
|
+
variant: "summary"
|
|
6218
|
+
}
|
|
6219
|
+
});
|
|
6220
|
+
function cn55(...classes) {
|
|
6221
|
+
return classes.filter(Boolean).join(" ");
|
|
6222
|
+
}
|
|
6223
|
+
function MosaicAgentPreview(props) {
|
|
6224
|
+
if (props.variant === "detailed") {
|
|
6225
|
+
const { name: name2, title, attributes, className: className2 } = props;
|
|
6226
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6227
|
+
"div",
|
|
6228
|
+
{
|
|
6229
|
+
"data-slot": "agent-preview",
|
|
6230
|
+
className: cn55(agentPreviewVariants({ variant: "detailed" }), className2),
|
|
6231
|
+
children: [
|
|
6232
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "agent-preview-header", className: "p-4 pb-0", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold leading-none tracking-tight", children: title }) }),
|
|
6233
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
6234
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 truncate text-sm font-medium", children: name2 }),
|
|
6235
|
+
attributes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2", children: attributes.map((attribute) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6236
|
+
"li",
|
|
6237
|
+
{
|
|
6238
|
+
"data-slot": "agent-preview-attribute",
|
|
6239
|
+
className: "flex items-start justify-between gap-3",
|
|
6240
|
+
children: [
|
|
6241
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-muted-foreground", children: attribute.label }),
|
|
6242
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium", children: attribute.value })
|
|
6243
|
+
]
|
|
6244
|
+
},
|
|
6245
|
+
attribute.id
|
|
6246
|
+
)) })
|
|
6247
|
+
] })
|
|
6248
|
+
]
|
|
6249
|
+
}
|
|
6250
|
+
);
|
|
6251
|
+
}
|
|
6252
|
+
const { name, tagline, badgeLabel, className } = props;
|
|
6253
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6254
|
+
"div",
|
|
6255
|
+
{
|
|
6256
|
+
"data-slot": "agent-preview",
|
|
6257
|
+
className: cn55(agentPreviewVariants({ variant: "summary" }), className),
|
|
6258
|
+
children: [
|
|
6259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6260
|
+
"span",
|
|
6261
|
+
{
|
|
6262
|
+
"aria-hidden": "true",
|
|
6263
|
+
"data-slot": "agent-preview-avatar",
|
|
6264
|
+
className: "h-10 w-10 shrink-0 rounded-full bg-primary/10"
|
|
6265
|
+
}
|
|
6266
|
+
),
|
|
6267
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6268
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-medium", children: name }),
|
|
6269
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-muted-foreground", children: tagline })
|
|
6270
|
+
] }),
|
|
6271
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6272
|
+
"span",
|
|
6273
|
+
{
|
|
6274
|
+
"data-slot": "agent-preview-badge",
|
|
6275
|
+
className: "shrink-0 rounded-full bg-secondary px-2.5 py-0.5 text-xs font-semibold text-secondary-foreground",
|
|
6276
|
+
children: badgeLabel
|
|
6277
|
+
}
|
|
6278
|
+
)
|
|
6279
|
+
]
|
|
6280
|
+
}
|
|
6281
|
+
);
|
|
6282
|
+
}
|
|
6283
|
+
MosaicAgentPreview.displayName = "MosaicAgentPreview";
|
|
5846
6284
|
var memoryCardVariants = classVarianceAuthority.cva(
|
|
5847
6285
|
[
|
|
5848
6286
|
"group relative rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
@@ -5908,7 +6346,7 @@ var memoryActionsMenuTriggerVariants = classVarianceAuthority.cva(
|
|
|
5908
6346
|
}
|
|
5909
6347
|
}
|
|
5910
6348
|
);
|
|
5911
|
-
function
|
|
6349
|
+
function cn56(...classes) {
|
|
5912
6350
|
return classes.filter(Boolean).join(" ");
|
|
5913
6351
|
}
|
|
5914
6352
|
var MAX_VISIBLE_TAGS = 3;
|
|
@@ -6062,10 +6500,10 @@ function MosaicMemoryCard(props) {
|
|
|
6062
6500
|
ref
|
|
6063
6501
|
} = props;
|
|
6064
6502
|
const variant = props.variant ?? "detailed";
|
|
6065
|
-
const [menuOpen, setMenuOpen] =
|
|
6066
|
-
const menuRef =
|
|
6503
|
+
const [menuOpen, setMenuOpen] = React29__namespace.useState(false);
|
|
6504
|
+
const menuRef = React29__namespace.useRef(null);
|
|
6067
6505
|
const SourceIcon = SOURCE_ICONS[memory.source];
|
|
6068
|
-
|
|
6506
|
+
React29__namespace.useEffect(() => {
|
|
6069
6507
|
if (!menuOpen) return;
|
|
6070
6508
|
const handler = (event) => {
|
|
6071
6509
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
@@ -6086,7 +6524,7 @@ function MosaicMemoryCard(props) {
|
|
|
6086
6524
|
"aria-label": moreActionsLabel,
|
|
6087
6525
|
"aria-haspopup": "menu",
|
|
6088
6526
|
"aria-expanded": menuOpen,
|
|
6089
|
-
className:
|
|
6527
|
+
className: cn56(memoryActionsMenuTriggerVariants({ variant })),
|
|
6090
6528
|
children: /* @__PURE__ */ jsxRuntime.jsx(MoreVertIcon2, {})
|
|
6091
6529
|
}
|
|
6092
6530
|
),
|
|
@@ -6094,7 +6532,7 @@ function MosaicMemoryCard(props) {
|
|
|
6094
6532
|
"div",
|
|
6095
6533
|
{
|
|
6096
6534
|
role: "menu",
|
|
6097
|
-
className:
|
|
6535
|
+
className: cn56(
|
|
6098
6536
|
"absolute right-0 top-full z-50 mt-1 min-w-[140px] rounded-md border border-border",
|
|
6099
6537
|
"bg-popover py-1 shadow-md"
|
|
6100
6538
|
),
|
|
@@ -6135,7 +6573,7 @@ function MosaicMemoryCard(props) {
|
|
|
6135
6573
|
ref,
|
|
6136
6574
|
"data-slot": "memory-card",
|
|
6137
6575
|
"data-variant": variant,
|
|
6138
|
-
className:
|
|
6576
|
+
className: cn56(memoryCardVariants({ variant }), className),
|
|
6139
6577
|
children: props.variant !== "compact" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
6140
6578
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
6141
6579
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
@@ -6145,7 +6583,7 @@ function MosaicMemoryCard(props) {
|
|
|
6145
6583
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6146
6584
|
"span",
|
|
6147
6585
|
{
|
|
6148
|
-
className:
|
|
6586
|
+
className: cn56(
|
|
6149
6587
|
memoryScopeBadgeVariants({ scope: memory.scope, bordered: true }),
|
|
6150
6588
|
"mt-1"
|
|
6151
6589
|
),
|
|
@@ -6158,8 +6596,8 @@ function MosaicMemoryCard(props) {
|
|
|
6158
6596
|
] }),
|
|
6159
6597
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-3 text-sm text-muted-foreground", children: memory.content }),
|
|
6160
6598
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "memory-tags", className: "flex flex-wrap gap-1", children: [
|
|
6161
|
-
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6162
|
-
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
6599
|
+
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn56(memoryTagBadgeVariants()), children: tag }, tag)),
|
|
6600
|
+
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn56(memoryTagBadgeVariants()), children: props.formatMoreTags(hiddenTagCount) })
|
|
6163
6601
|
] }),
|
|
6164
6602
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-t pt-2 text-xs text-muted-foreground", children: [
|
|
6165
6603
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
@@ -6187,26 +6625,188 @@ function MosaicMemoryCard(props) {
|
|
|
6187
6625
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6188
6626
|
"span",
|
|
6189
6627
|
{
|
|
6190
|
-
className:
|
|
6628
|
+
className: cn56(memoryScopeBadgeVariants({ scope: memory.scope, bordered: false })),
|
|
6191
6629
|
children: formatScope(memory.scope)
|
|
6192
6630
|
}
|
|
6193
6631
|
),
|
|
6194
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
6195
|
-
/* @__PURE__ */ jsxRuntime.jsx(ClockIcon3, {}),
|
|
6196
|
-
formatTimeAgo(memory.createdAt)
|
|
6197
|
-
] })
|
|
6198
|
-
] }),
|
|
6199
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
6200
|
-
/* @__PURE__ */ jsxRuntime.jsx(TagIcon, {}),
|
|
6201
|
-
formatUsageCount(memory.usageCount)
|
|
6202
|
-
] })
|
|
6632
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
6633
|
+
/* @__PURE__ */ jsxRuntime.jsx(ClockIcon3, {}),
|
|
6634
|
+
formatTimeAgo(memory.createdAt)
|
|
6635
|
+
] })
|
|
6636
|
+
] }),
|
|
6637
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
6638
|
+
/* @__PURE__ */ jsxRuntime.jsx(TagIcon, {}),
|
|
6639
|
+
formatUsageCount(memory.usageCount)
|
|
6640
|
+
] })
|
|
6641
|
+
] })
|
|
6642
|
+
] })
|
|
6643
|
+
}
|
|
6644
|
+
);
|
|
6645
|
+
}
|
|
6646
|
+
MosaicMemoryCard.displayName = "MosaicMemoryCard";
|
|
6647
|
+
var templateAgentCardVariants = classVarianceAuthority.cva(
|
|
6648
|
+
[
|
|
6649
|
+
"rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
6650
|
+
"transition-all hover:border-primary/50"
|
|
6651
|
+
],
|
|
6652
|
+
{
|
|
6653
|
+
variants: {
|
|
6654
|
+
selected: {
|
|
6655
|
+
true: "ring-2 ring-primary border-primary bg-primary/5",
|
|
6656
|
+
false: ""
|
|
6657
|
+
}
|
|
6658
|
+
},
|
|
6659
|
+
defaultVariants: {
|
|
6660
|
+
selected: false
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
);
|
|
6664
|
+
var templateAgentCardBadgeVariants = classVarianceAuthority.cva([
|
|
6665
|
+
"inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium"
|
|
6666
|
+
]);
|
|
6667
|
+
var templateAgentCardTagVariants = classVarianceAuthority.cva([
|
|
6668
|
+
"inline-flex items-center rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground"
|
|
6669
|
+
]);
|
|
6670
|
+
function cn57(...classes) {
|
|
6671
|
+
return classes.filter(Boolean).join(" ");
|
|
6672
|
+
}
|
|
6673
|
+
var MAX_VISIBLE_TAGS2 = 3;
|
|
6674
|
+
function EyeIcon() {
|
|
6675
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6676
|
+
"svg",
|
|
6677
|
+
{
|
|
6678
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6679
|
+
width: "14",
|
|
6680
|
+
height: "14",
|
|
6681
|
+
viewBox: "0 0 24 24",
|
|
6682
|
+
fill: "none",
|
|
6683
|
+
stroke: "currentColor",
|
|
6684
|
+
strokeWidth: "2",
|
|
6685
|
+
strokeLinecap: "round",
|
|
6686
|
+
strokeLinejoin: "round",
|
|
6687
|
+
"aria-hidden": "true",
|
|
6688
|
+
children: [
|
|
6689
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
6690
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
6691
|
+
]
|
|
6692
|
+
}
|
|
6693
|
+
);
|
|
6694
|
+
}
|
|
6695
|
+
function CopyIcon() {
|
|
6696
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6697
|
+
"svg",
|
|
6698
|
+
{
|
|
6699
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6700
|
+
width: "14",
|
|
6701
|
+
height: "14",
|
|
6702
|
+
viewBox: "0 0 24 24",
|
|
6703
|
+
fill: "none",
|
|
6704
|
+
stroke: "currentColor",
|
|
6705
|
+
strokeWidth: "2",
|
|
6706
|
+
strokeLinecap: "round",
|
|
6707
|
+
strokeLinejoin: "round",
|
|
6708
|
+
"aria-hidden": "true",
|
|
6709
|
+
children: [
|
|
6710
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
6711
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
6712
|
+
]
|
|
6713
|
+
}
|
|
6714
|
+
);
|
|
6715
|
+
}
|
|
6716
|
+
function MosaicTemplateAgentCard({
|
|
6717
|
+
template,
|
|
6718
|
+
isSelected = false,
|
|
6719
|
+
onSelect,
|
|
6720
|
+
onPreview,
|
|
6721
|
+
onDuplicate,
|
|
6722
|
+
icon,
|
|
6723
|
+
selectAriaLabel,
|
|
6724
|
+
agentCountLabel,
|
|
6725
|
+
formatUsageCount,
|
|
6726
|
+
formatMoreTags,
|
|
6727
|
+
previewAriaLabel,
|
|
6728
|
+
duplicateAriaLabel,
|
|
6729
|
+
className,
|
|
6730
|
+
ref
|
|
6731
|
+
}) {
|
|
6732
|
+
const visibleTags = template.tags?.slice(0, MAX_VISIBLE_TAGS2) ?? [];
|
|
6733
|
+
const hiddenTagCount = (template.tags?.length ?? 0) - visibleTags.length;
|
|
6734
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6735
|
+
"div",
|
|
6736
|
+
{
|
|
6737
|
+
ref,
|
|
6738
|
+
"data-slot": "template-agent-card",
|
|
6739
|
+
className: cn57(templateAgentCardVariants({ selected: isSelected }), "p-4", className),
|
|
6740
|
+
children: [
|
|
6741
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6742
|
+
"button",
|
|
6743
|
+
{
|
|
6744
|
+
type: "button",
|
|
6745
|
+
onClick: () => onSelect(template),
|
|
6746
|
+
"aria-label": selectAriaLabel,
|
|
6747
|
+
"aria-pressed": isSelected,
|
|
6748
|
+
className: cn57(
|
|
6749
|
+
"flex min-w-0 flex-1 items-start gap-2 rounded-md text-left",
|
|
6750
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6751
|
+
),
|
|
6752
|
+
children: [
|
|
6753
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0 text-primary", "aria-hidden": "true", children: icon }),
|
|
6754
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
|
|
6755
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-sm font-semibold leading-tight", children: template.name }),
|
|
6756
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block line-clamp-2 text-xs text-muted-foreground", children: template.description })
|
|
6757
|
+
] })
|
|
6758
|
+
]
|
|
6759
|
+
}
|
|
6760
|
+
) }),
|
|
6761
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
6762
|
+
template.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: template.category }),
|
|
6763
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: agentCountLabel }),
|
|
6764
|
+
formatUsageCount(template.usageCount) != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(templateAgentCardBadgeVariants()), children: formatUsageCount(template.usageCount) }),
|
|
6765
|
+
visibleTags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(templateAgentCardTagVariants()), children: tag }, tag)),
|
|
6766
|
+
hiddenTagCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn57(templateAgentCardTagVariants()), children: formatMoreTags(hiddenTagCount) })
|
|
6767
|
+
] }),
|
|
6768
|
+
(onPreview || onDuplicate) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-2", children: [
|
|
6769
|
+
onPreview && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6770
|
+
"button",
|
|
6771
|
+
{
|
|
6772
|
+
type: "button",
|
|
6773
|
+
onClick: () => onPreview(template),
|
|
6774
|
+
"aria-label": previewAriaLabel,
|
|
6775
|
+
className: cn57(
|
|
6776
|
+
"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
|
|
6777
|
+
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6778
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6779
|
+
),
|
|
6780
|
+
children: [
|
|
6781
|
+
/* @__PURE__ */ jsxRuntime.jsx(EyeIcon, {}),
|
|
6782
|
+
previewAriaLabel
|
|
6783
|
+
]
|
|
6784
|
+
}
|
|
6785
|
+
),
|
|
6786
|
+
onDuplicate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6787
|
+
"button",
|
|
6788
|
+
{
|
|
6789
|
+
type: "button",
|
|
6790
|
+
onClick: () => onDuplicate(template),
|
|
6791
|
+
"aria-label": duplicateAriaLabel,
|
|
6792
|
+
className: cn57(
|
|
6793
|
+
"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md text-xs font-medium",
|
|
6794
|
+
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6795
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6796
|
+
),
|
|
6797
|
+
children: [
|
|
6798
|
+
/* @__PURE__ */ jsxRuntime.jsx(CopyIcon, {}),
|
|
6799
|
+
duplicateAriaLabel
|
|
6800
|
+
]
|
|
6801
|
+
}
|
|
6802
|
+
)
|
|
6203
6803
|
] })
|
|
6204
|
-
]
|
|
6804
|
+
]
|
|
6205
6805
|
}
|
|
6206
6806
|
);
|
|
6207
6807
|
}
|
|
6208
|
-
|
|
6209
|
-
function
|
|
6808
|
+
MosaicTemplateAgentCard.displayName = "MosaicTemplateAgentCard";
|
|
6809
|
+
function cn58(...classes) {
|
|
6210
6810
|
return classes.filter(Boolean).join(" ");
|
|
6211
6811
|
}
|
|
6212
6812
|
function SearchIcon() {
|
|
@@ -6266,10 +6866,10 @@ function MosaicSelectorModal({
|
|
|
6266
6866
|
emptyMessage,
|
|
6267
6867
|
closeAriaLabel
|
|
6268
6868
|
}) {
|
|
6269
|
-
const [query, setQuery] =
|
|
6270
|
-
const [activeCategory, setActiveCategory] =
|
|
6271
|
-
const [pendingId, setPendingId] =
|
|
6272
|
-
|
|
6869
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
6870
|
+
const [activeCategory, setActiveCategory] = React29__namespace.useState("all");
|
|
6871
|
+
const [pendingId, setPendingId] = React29__namespace.useState(selectedId);
|
|
6872
|
+
React29__namespace.useEffect(() => {
|
|
6273
6873
|
if (isOpen) {
|
|
6274
6874
|
setPendingId(selectedId);
|
|
6275
6875
|
setQuery("");
|
|
@@ -6307,7 +6907,7 @@ function MosaicSelectorModal({
|
|
|
6307
6907
|
value: query,
|
|
6308
6908
|
onChange: (e) => setQuery(e.target.value),
|
|
6309
6909
|
placeholder: searchPlaceholder,
|
|
6310
|
-
className:
|
|
6910
|
+
className: cn58(
|
|
6311
6911
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
6312
6912
|
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
6313
6913
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6321,7 +6921,7 @@ function MosaicSelectorModal({
|
|
|
6321
6921
|
{
|
|
6322
6922
|
type: "button",
|
|
6323
6923
|
onClick: () => setActiveCategory("all"),
|
|
6324
|
-
className:
|
|
6924
|
+
className: cn58(
|
|
6325
6925
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
6326
6926
|
activeCategory === "all" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
6327
6927
|
),
|
|
@@ -6333,7 +6933,7 @@ function MosaicSelectorModal({
|
|
|
6333
6933
|
{
|
|
6334
6934
|
type: "button",
|
|
6335
6935
|
onClick: () => setActiveCategory(cat.id),
|
|
6336
|
-
className:
|
|
6936
|
+
className: cn58(
|
|
6337
6937
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
6338
6938
|
activeCategory === cat.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
6339
6939
|
),
|
|
@@ -6345,7 +6945,7 @@ function MosaicSelectorModal({
|
|
|
6345
6945
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6346
6946
|
"div",
|
|
6347
6947
|
{
|
|
6348
|
-
className:
|
|
6948
|
+
className: cn58(
|
|
6349
6949
|
"max-h-[50vh] overflow-y-auto",
|
|
6350
6950
|
columns === 2 ? "grid grid-cols-1 gap-3 sm:grid-cols-2" : "flex flex-col gap-3"
|
|
6351
6951
|
),
|
|
@@ -6357,7 +6957,7 @@ function MosaicSelectorModal({
|
|
|
6357
6957
|
{
|
|
6358
6958
|
type: "button",
|
|
6359
6959
|
onClick: () => setPendingId(item.id),
|
|
6360
|
-
className:
|
|
6960
|
+
className: cn58(
|
|
6361
6961
|
"group relative rounded-lg border p-4 text-left transition-all duration-150",
|
|
6362
6962
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
6363
6963
|
isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50"
|
|
@@ -6395,7 +6995,7 @@ function MosaicSelectorModal({
|
|
|
6395
6995
|
{
|
|
6396
6996
|
type: "button",
|
|
6397
6997
|
onClick: onClose,
|
|
6398
|
-
className:
|
|
6998
|
+
className: cn58(
|
|
6399
6999
|
"inline-flex min-h-[44px] items-center justify-center rounded-md border border-border",
|
|
6400
7000
|
"bg-background px-4 py-2 text-sm font-medium text-foreground",
|
|
6401
7001
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -6410,7 +7010,7 @@ function MosaicSelectorModal({
|
|
|
6410
7010
|
type: "button",
|
|
6411
7011
|
onClick: handleConfirm,
|
|
6412
7012
|
disabled: !pendingItem,
|
|
6413
|
-
className:
|
|
7013
|
+
className: cn58(
|
|
6414
7014
|
"inline-flex min-h-[44px] items-center justify-center rounded-md",
|
|
6415
7015
|
"bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
6416
7016
|
"hover:bg-primary/90",
|
|
@@ -6426,7 +7026,7 @@ function MosaicSelectorModal({
|
|
|
6426
7026
|
);
|
|
6427
7027
|
}
|
|
6428
7028
|
MosaicSelectorModal.displayName = "MosaicSelectorModal";
|
|
6429
|
-
function
|
|
7029
|
+
function cn59(...classes) {
|
|
6430
7030
|
return classes.filter(Boolean).join(" ");
|
|
6431
7031
|
}
|
|
6432
7032
|
function relativeTime(ts) {
|
|
@@ -6626,13 +7226,13 @@ function MosaicMessageCard({
|
|
|
6626
7226
|
copyMessageLabel,
|
|
6627
7227
|
className
|
|
6628
7228
|
}) {
|
|
6629
|
-
const [bookmarked, setBookmarked] =
|
|
6630
|
-
const [likes, setLikes] =
|
|
6631
|
-
const [dislikes, setDislikes] =
|
|
6632
|
-
const [hasLiked, setHasLiked] =
|
|
6633
|
-
const [hasDisliked, setHasDisliked] =
|
|
6634
|
-
const [menuOpen, setMenuOpen] =
|
|
6635
|
-
const menuRef =
|
|
7229
|
+
const [bookmarked, setBookmarked] = React29__namespace.useState(message.bookmarked ?? false);
|
|
7230
|
+
const [likes, setLikes] = React29__namespace.useState(message.reactions?.likes ?? 0);
|
|
7231
|
+
const [dislikes, setDislikes] = React29__namespace.useState(message.reactions?.dislikes ?? 0);
|
|
7232
|
+
const [hasLiked, setHasLiked] = React29__namespace.useState(false);
|
|
7233
|
+
const [hasDisliked, setHasDisliked] = React29__namespace.useState(false);
|
|
7234
|
+
const [menuOpen, setMenuOpen] = React29__namespace.useState(false);
|
|
7235
|
+
const menuRef = React29__namespace.useRef(null);
|
|
6636
7236
|
const initials = message.sender.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
6637
7237
|
const handleLike = () => {
|
|
6638
7238
|
if (hasLiked) {
|
|
@@ -6670,7 +7270,7 @@ function MosaicMessageCard({
|
|
|
6670
7270
|
navigator.clipboard.writeText(message.content).catch(() => null);
|
|
6671
7271
|
onCopy?.(message.id, message.content);
|
|
6672
7272
|
};
|
|
6673
|
-
|
|
7273
|
+
React29__namespace.useEffect(() => {
|
|
6674
7274
|
if (!menuOpen) return;
|
|
6675
7275
|
const h = (e) => {
|
|
6676
7276
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -6682,7 +7282,7 @@ function MosaicMessageCard({
|
|
|
6682
7282
|
"div",
|
|
6683
7283
|
{
|
|
6684
7284
|
"data-slot": "message-card",
|
|
6685
|
-
className:
|
|
7285
|
+
className: cn59(
|
|
6686
7286
|
"rounded-lg border border-border bg-card p-4 shadow-sm transition-shadow hover:shadow-md",
|
|
6687
7287
|
compact && "p-3",
|
|
6688
7288
|
message.sender.type === "user" && "bg-primary/5",
|
|
@@ -6692,7 +7292,7 @@ function MosaicMessageCard({
|
|
|
6692
7292
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6693
7293
|
"span",
|
|
6694
7294
|
{
|
|
6695
|
-
className:
|
|
7295
|
+
className: cn59(
|
|
6696
7296
|
"inline-flex shrink-0 items-center justify-center rounded-full text-white font-semibold",
|
|
6697
7297
|
compact ? "h-8 w-8 text-xs" : "h-10 w-10 text-sm",
|
|
6698
7298
|
message.sender.accentColor ?? "bg-muted text-muted-foreground"
|
|
@@ -6710,7 +7310,7 @@ function MosaicMessageCard({
|
|
|
6710
7310
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6711
7311
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
6712
7312
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6713
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
7313
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn59("font-medium", compact ? "text-sm" : "text-base"), children: message.sender.name }),
|
|
6714
7314
|
message.sender.type === "ai" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: "AI" })
|
|
6715
7315
|
] }),
|
|
6716
7316
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: relativeTime(message.timestamp) })
|
|
@@ -6718,7 +7318,7 @@ function MosaicMessageCard({
|
|
|
6718
7318
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6719
7319
|
"p",
|
|
6720
7320
|
{
|
|
6721
|
-
className:
|
|
7321
|
+
className: cn59(
|
|
6722
7322
|
"leading-relaxed text-foreground mb-3",
|
|
6723
7323
|
compact ? "text-sm" : "text-base"
|
|
6724
7324
|
),
|
|
@@ -6733,7 +7333,7 @@ function MosaicMessageCard({
|
|
|
6733
7333
|
{
|
|
6734
7334
|
type: "button",
|
|
6735
7335
|
onClick: handleLike,
|
|
6736
|
-
className:
|
|
7336
|
+
className: cn59(
|
|
6737
7337
|
"inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
|
|
6738
7338
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6739
7339
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -6751,7 +7351,7 @@ function MosaicMessageCard({
|
|
|
6751
7351
|
{
|
|
6752
7352
|
type: "button",
|
|
6753
7353
|
onClick: handleDislike,
|
|
6754
|
-
className:
|
|
7354
|
+
className: cn59(
|
|
6755
7355
|
"inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs",
|
|
6756
7356
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6757
7357
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -6796,7 +7396,7 @@ function MosaicMessageCard({
|
|
|
6796
7396
|
{
|
|
6797
7397
|
type: "button",
|
|
6798
7398
|
onClick: handleBookmark,
|
|
6799
|
-
className:
|
|
7399
|
+
className: cn59(
|
|
6800
7400
|
"inline-flex h-8 w-8 items-center justify-center rounded-md",
|
|
6801
7401
|
"hover:bg-accent hover:text-accent-foreground",
|
|
6802
7402
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -6897,7 +7497,7 @@ function MosaicMessageCard({
|
|
|
6897
7497
|
);
|
|
6898
7498
|
}
|
|
6899
7499
|
MosaicMessageCard.displayName = "MosaicMessageCard";
|
|
6900
|
-
function
|
|
7500
|
+
function cn60(...classes) {
|
|
6901
7501
|
return classes.filter(Boolean).join(" ");
|
|
6902
7502
|
}
|
|
6903
7503
|
function SearchIcon2() {
|
|
@@ -6943,11 +7543,11 @@ function MessageListDesktop({
|
|
|
6943
7543
|
copyMessageLabel,
|
|
6944
7544
|
className
|
|
6945
7545
|
}) {
|
|
6946
|
-
const [query, setQuery] =
|
|
7546
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
6947
7547
|
const filtered = query ? messages.filter(
|
|
6948
7548
|
(m) => m.content.toLowerCase().includes(query.toLowerCase()) || m.sender.name.toLowerCase().includes(query.toLowerCase())
|
|
6949
7549
|
) : messages;
|
|
6950
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-desktop", className:
|
|
7550
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-desktop", className: cn60("flex h-full flex-col", className), children: [
|
|
6951
7551
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
|
|
6952
7552
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold", children: title }),
|
|
6953
7553
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative ml-auto max-w-xs flex-1", children: [
|
|
@@ -6959,7 +7559,7 @@ function MessageListDesktop({
|
|
|
6959
7559
|
value: query,
|
|
6960
7560
|
onChange: (e) => setQuery(e.target.value),
|
|
6961
7561
|
placeholder: searchPlaceholder,
|
|
6962
|
-
className:
|
|
7562
|
+
className: cn60(
|
|
6963
7563
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
6964
7564
|
"text-sm placeholder:text-muted-foreground",
|
|
6965
7565
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -6995,7 +7595,7 @@ function MessageListDesktop({
|
|
|
6995
7595
|
{
|
|
6996
7596
|
type: "button",
|
|
6997
7597
|
onClick: onLoadMore,
|
|
6998
|
-
className:
|
|
7598
|
+
className: cn60(
|
|
6999
7599
|
"w-full rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
|
|
7000
7600
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7001
7601
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7026,7 +7626,7 @@ function MessageListMobile({
|
|
|
7026
7626
|
copyMessageLabel,
|
|
7027
7627
|
className
|
|
7028
7628
|
}) {
|
|
7029
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className:
|
|
7629
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className: cn60("flex flex-col", className), children: [
|
|
7030
7630
|
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 border-b border-border bg-background px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: title }) }),
|
|
7031
7631
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 p-4", children: [
|
|
7032
7632
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 animate-pulse rounded-lg bg-muted" }, i)) }),
|
|
@@ -7056,7 +7656,7 @@ function MessageListMobile({
|
|
|
7056
7656
|
{
|
|
7057
7657
|
type: "button",
|
|
7058
7658
|
onClick: onLoadMore,
|
|
7059
|
-
className:
|
|
7659
|
+
className: cn60(
|
|
7060
7660
|
"w-full min-h-[44px] rounded-md border border-border bg-background px-4 py-2 text-sm font-medium",
|
|
7061
7661
|
"hover:bg-accent hover:text-accent-foreground",
|
|
7062
7662
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7071,7 +7671,7 @@ function MosaicMessageList(props) {
|
|
|
7071
7671
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(MessageListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(MessageListDesktop, { ...props });
|
|
7072
7672
|
}
|
|
7073
7673
|
MosaicMessageList.displayName = "MosaicMessageList";
|
|
7074
|
-
function
|
|
7674
|
+
function cn61(...classes) {
|
|
7075
7675
|
return classes.filter(Boolean).join(" ");
|
|
7076
7676
|
}
|
|
7077
7677
|
function ChevronLeftIcon2() {
|
|
@@ -7151,7 +7751,7 @@ function MosaicFilterSidebar({
|
|
|
7151
7751
|
{
|
|
7152
7752
|
"data-slot": "filter-sidebar",
|
|
7153
7753
|
style: { width, minWidth: isCollapsed && !isMobile ? "64px" : void 0 },
|
|
7154
|
-
className:
|
|
7754
|
+
className: cn61(
|
|
7155
7755
|
"relative flex flex-col border-r border-border bg-card",
|
|
7156
7756
|
"transition-[width] duration-200 ease-in-out",
|
|
7157
7757
|
"overflow-hidden",
|
|
@@ -7163,7 +7763,7 @@ function MosaicFilterSidebar({
|
|
|
7163
7763
|
{
|
|
7164
7764
|
type: "button",
|
|
7165
7765
|
onClick: onToggleCollapse,
|
|
7166
|
-
className:
|
|
7766
|
+
className: cn61(
|
|
7167
7767
|
"absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center rounded-full",
|
|
7168
7768
|
"border border-border bg-background shadow-sm",
|
|
7169
7769
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -7193,7 +7793,7 @@ function MosaicFilterSidebar({
|
|
|
7193
7793
|
{
|
|
7194
7794
|
type: "button",
|
|
7195
7795
|
onClick: () => onFilterChange(f.id),
|
|
7196
|
-
className:
|
|
7796
|
+
className: cn61(
|
|
7197
7797
|
"flex min-h-[40px] items-center justify-between rounded-md px-3 py-2 text-sm font-medium",
|
|
7198
7798
|
"transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
7199
7799
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -7213,7 +7813,7 @@ function MosaicFilterSidebar({
|
|
|
7213
7813
|
{
|
|
7214
7814
|
type: "button",
|
|
7215
7815
|
onClick: () => onCategoryChange(cat.id),
|
|
7216
|
-
className:
|
|
7816
|
+
className: cn61(
|
|
7217
7817
|
"flex min-h-[36px] items-center justify-between rounded-md px-3 py-1.5 text-sm",
|
|
7218
7818
|
"transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
7219
7819
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -7233,7 +7833,7 @@ function MosaicFilterSidebar({
|
|
|
7233
7833
|
);
|
|
7234
7834
|
}
|
|
7235
7835
|
MosaicFilterSidebar.displayName = "MosaicFilterSidebar";
|
|
7236
|
-
function
|
|
7836
|
+
function cn62(...classes) {
|
|
7237
7837
|
return classes.filter(Boolean).join(" ");
|
|
7238
7838
|
}
|
|
7239
7839
|
function SearchIcon3() {
|
|
@@ -7319,8 +7919,8 @@ function AgentListDesktop({
|
|
|
7319
7919
|
collapseSidebarAriaLabel,
|
|
7320
7920
|
expandSidebarAriaLabel
|
|
7321
7921
|
}) {
|
|
7322
|
-
const [query, setQuery] =
|
|
7323
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7922
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
7923
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React29__namespace.useState(false);
|
|
7324
7924
|
const filtered = agents.filter(
|
|
7325
7925
|
(a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
|
|
7326
7926
|
);
|
|
@@ -7358,7 +7958,7 @@ function AgentListDesktop({
|
|
|
7358
7958
|
value: query,
|
|
7359
7959
|
onChange: (e) => setQuery(e.target.value),
|
|
7360
7960
|
placeholder: searchPlaceholder,
|
|
7361
|
-
className:
|
|
7961
|
+
className: cn62(
|
|
7362
7962
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7363
7963
|
"text-sm placeholder:text-muted-foreground",
|
|
7364
7964
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7371,7 +7971,7 @@ function AgentListDesktop({
|
|
|
7371
7971
|
{
|
|
7372
7972
|
type: "button",
|
|
7373
7973
|
onClick: onCreateAgent,
|
|
7374
|
-
className:
|
|
7974
|
+
className: cn62(
|
|
7375
7975
|
"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
|
|
7376
7976
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
7377
7977
|
),
|
|
@@ -7425,8 +8025,8 @@ function AgentListMobile({
|
|
|
7425
8025
|
collapseSidebarAriaLabel,
|
|
7426
8026
|
expandSidebarAriaLabel
|
|
7427
8027
|
}) {
|
|
7428
|
-
const [filterOpen, setFilterOpen] =
|
|
7429
|
-
const [query, setQuery] =
|
|
8028
|
+
const [filterOpen, setFilterOpen] = React29__namespace.useState(false);
|
|
8029
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
7430
8030
|
const filtered = agents.filter(
|
|
7431
8031
|
(a) => !query || a.name.toLowerCase().includes(query.toLowerCase()) || a.description?.toLowerCase().includes(query.toLowerCase())
|
|
7432
8032
|
);
|
|
@@ -7440,7 +8040,7 @@ function AgentListMobile({
|
|
|
7440
8040
|
{
|
|
7441
8041
|
type: "button",
|
|
7442
8042
|
onClick: () => setFilterOpen(true),
|
|
7443
|
-
className:
|
|
8043
|
+
className: cn62(
|
|
7444
8044
|
"inline-flex h-9 w-9 items-center justify-center rounded-md",
|
|
7445
8045
|
"border border-border bg-background text-foreground",
|
|
7446
8046
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -7455,7 +8055,7 @@ function AgentListMobile({
|
|
|
7455
8055
|
{
|
|
7456
8056
|
type: "button",
|
|
7457
8057
|
onClick: onCreateAgent,
|
|
7458
|
-
className:
|
|
8058
|
+
className: cn62(
|
|
7459
8059
|
"inline-flex h-9 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground",
|
|
7460
8060
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
7461
8061
|
),
|
|
@@ -7476,7 +8076,7 @@ function AgentListMobile({
|
|
|
7476
8076
|
value: query,
|
|
7477
8077
|
onChange: (e) => setQuery(e.target.value),
|
|
7478
8078
|
placeholder: searchPlaceholder,
|
|
7479
|
-
className:
|
|
8079
|
+
className: cn62(
|
|
7480
8080
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7481
8081
|
"text-sm placeholder:text-muted-foreground",
|
|
7482
8082
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7538,7 +8138,7 @@ function MosaicAgentList(props) {
|
|
|
7538
8138
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(AgentListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(AgentListDesktop, { ...props });
|
|
7539
8139
|
}
|
|
7540
8140
|
MosaicAgentList.displayName = "MosaicAgentList";
|
|
7541
|
-
function
|
|
8141
|
+
function cn63(...classes) {
|
|
7542
8142
|
return classes.filter(Boolean).join(" ");
|
|
7543
8143
|
}
|
|
7544
8144
|
function StarIcon({ filled }) {
|
|
@@ -7635,7 +8235,7 @@ function MarketplaceCard({
|
|
|
7635
8235
|
"div",
|
|
7636
8236
|
{
|
|
7637
8237
|
"data-slot": "marketplace-card",
|
|
7638
|
-
className:
|
|
8238
|
+
className: cn63(
|
|
7639
8239
|
"rounded-lg border border-border bg-card p-4 transition-shadow hover:shadow-md",
|
|
7640
8240
|
compact ? "flex items-center gap-3" : "flex flex-col gap-3"
|
|
7641
8241
|
),
|
|
@@ -7643,7 +8243,7 @@ function MarketplaceCard({
|
|
|
7643
8243
|
item.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7644
8244
|
"div",
|
|
7645
8245
|
{
|
|
7646
|
-
className:
|
|
8246
|
+
className: cn63(
|
|
7647
8247
|
"flex shrink-0 items-center justify-center rounded-lg",
|
|
7648
8248
|
compact ? "h-10 w-10" : "h-12 w-12",
|
|
7649
8249
|
item.accentClass ?? "bg-muted text-muted-foreground"
|
|
@@ -7654,7 +8254,7 @@ function MarketplaceCard({
|
|
|
7654
8254
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
7655
8255
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
7656
8256
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
7657
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
8257
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn63("font-semibold leading-tight", compact ? "text-sm" : "text-base"), children: item.title }),
|
|
7658
8258
|
item.description && !compact && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground line-clamp-2", children: item.description })
|
|
7659
8259
|
] }),
|
|
7660
8260
|
item.price && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground", children: item.price })
|
|
@@ -7671,13 +8271,13 @@ function MarketplaceCard({
|
|
|
7671
8271
|
] })
|
|
7672
8272
|
] })
|
|
7673
8273
|
] }),
|
|
7674
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
8274
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn63("flex gap-2", compact ? "shrink-0" : "mt-1"), children: [
|
|
7675
8275
|
onPreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7676
8276
|
"button",
|
|
7677
8277
|
{
|
|
7678
8278
|
type: "button",
|
|
7679
8279
|
onClick: () => onPreview(item.id),
|
|
7680
|
-
className:
|
|
8280
|
+
className: cn63(
|
|
7681
8281
|
"inline-flex min-h-[36px] items-center justify-center rounded-md border border-border",
|
|
7682
8282
|
"bg-background px-3 text-xs font-medium text-foreground",
|
|
7683
8283
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -7691,7 +8291,7 @@ function MarketplaceCard({
|
|
|
7691
8291
|
{
|
|
7692
8292
|
type: "button",
|
|
7693
8293
|
onClick: () => onUninstall(item.id),
|
|
7694
|
-
className:
|
|
8294
|
+
className: cn63(
|
|
7695
8295
|
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
7696
8296
|
"bg-secondary px-3 text-xs font-medium text-secondary-foreground",
|
|
7697
8297
|
"hover:bg-secondary/80",
|
|
@@ -7704,7 +8304,7 @@ function MarketplaceCard({
|
|
|
7704
8304
|
{
|
|
7705
8305
|
type: "button",
|
|
7706
8306
|
onClick: () => onInstall(item.id),
|
|
7707
|
-
className:
|
|
8307
|
+
className: cn63(
|
|
7708
8308
|
"inline-flex min-h-[36px] items-center justify-center rounded-md",
|
|
7709
8309
|
"bg-primary px-3 text-xs font-medium text-primary-foreground",
|
|
7710
8310
|
"hover:bg-primary/90",
|
|
@@ -7741,8 +8341,8 @@ function MarketplaceListDesktop(props) {
|
|
|
7741
8341
|
collapseSidebarAriaLabel,
|
|
7742
8342
|
expandSidebarAriaLabel
|
|
7743
8343
|
} = props;
|
|
7744
|
-
const [query, setQuery] =
|
|
7745
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
8344
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
8345
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React29__namespace.useState(false);
|
|
7746
8346
|
const filtered = items.filter(
|
|
7747
8347
|
(i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
7748
8348
|
);
|
|
@@ -7776,7 +8376,7 @@ function MarketplaceListDesktop(props) {
|
|
|
7776
8376
|
value: query,
|
|
7777
8377
|
onChange: (e) => setQuery(e.target.value),
|
|
7778
8378
|
placeholder: searchPlaceholder,
|
|
7779
|
-
className:
|
|
8379
|
+
className: cn63(
|
|
7780
8380
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7781
8381
|
"text-sm placeholder:text-muted-foreground",
|
|
7782
8382
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7830,8 +8430,8 @@ function MarketplaceListMobile(props) {
|
|
|
7830
8430
|
collapseSidebarAriaLabel,
|
|
7831
8431
|
expandSidebarAriaLabel
|
|
7832
8432
|
} = props;
|
|
7833
|
-
const [filterOpen, setFilterOpen] =
|
|
7834
|
-
const [query, setQuery] =
|
|
8433
|
+
const [filterOpen, setFilterOpen] = React29__namespace.useState(false);
|
|
8434
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
7835
8435
|
const filtered = items.filter(
|
|
7836
8436
|
(i) => !query || i.title.toLowerCase().includes(query.toLowerCase()) || (i.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
7837
8437
|
);
|
|
@@ -7859,7 +8459,7 @@ function MarketplaceListMobile(props) {
|
|
|
7859
8459
|
value: query,
|
|
7860
8460
|
onChange: (e) => setQuery(e.target.value),
|
|
7861
8461
|
placeholder: searchPlaceholder,
|
|
7862
|
-
className:
|
|
8462
|
+
className: cn63(
|
|
7863
8463
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
7864
8464
|
"text-sm placeholder:text-muted-foreground",
|
|
7865
8465
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -7924,7 +8524,7 @@ function MosaicMarketplaceList(props) {
|
|
|
7924
8524
|
return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(MarketplaceListMobile, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(MarketplaceListDesktop, { ...props });
|
|
7925
8525
|
}
|
|
7926
8526
|
MosaicMarketplaceList.displayName = "MosaicMarketplaceList";
|
|
7927
|
-
function
|
|
8527
|
+
function cn64(...classes) {
|
|
7928
8528
|
return classes.filter(Boolean).join(" ");
|
|
7929
8529
|
}
|
|
7930
8530
|
function StarIcon2() {
|
|
@@ -8045,7 +8645,7 @@ function MosaicTemplateCard({
|
|
|
8045
8645
|
type: "button",
|
|
8046
8646
|
onClick: () => onSelect(template),
|
|
8047
8647
|
"data-slot": "template-card",
|
|
8048
|
-
className:
|
|
8648
|
+
className: cn64(
|
|
8049
8649
|
"w-full text-left rounded-lg border transition-all duration-200",
|
|
8050
8650
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
8051
8651
|
isSelected ? "border-primary bg-primary/5 ring-2 ring-primary" : "border-border bg-card hover:border-primary/50",
|
|
@@ -8146,7 +8746,7 @@ function MosaicTemplatePreview({
|
|
|
8146
8746
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8147
8747
|
"span",
|
|
8148
8748
|
{
|
|
8149
|
-
className:
|
|
8749
|
+
className: cn64("h-2 w-2 rounded-full", agent.accentColor),
|
|
8150
8750
|
"aria-hidden": "true"
|
|
8151
8751
|
}
|
|
8152
8752
|
),
|
|
@@ -8206,7 +8806,7 @@ function MosaicAgentTeamPreview({ agents, label }) {
|
|
|
8206
8806
|
agent.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8207
8807
|
"span",
|
|
8208
8808
|
{
|
|
8209
|
-
className:
|
|
8809
|
+
className: cn64("h-2.5 w-2.5 rounded-full", agent.accentColor),
|
|
8210
8810
|
"aria-hidden": "true"
|
|
8211
8811
|
}
|
|
8212
8812
|
),
|
|
@@ -8230,7 +8830,7 @@ function MosaicQuickStartPanel({
|
|
|
8230
8830
|
scratchLabel,
|
|
8231
8831
|
className
|
|
8232
8832
|
}) {
|
|
8233
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-start-panel", className:
|
|
8833
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "quick-start-panel", className: cn64("flex flex-col gap-6", className), children: [
|
|
8234
8834
|
scenarios.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8235
8835
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-3 text-sm font-semibold text-foreground", children: scenariosTitle }),
|
|
8236
8836
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: scenarios.map((scenario) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8238,7 +8838,7 @@ function MosaicQuickStartPanel({
|
|
|
8238
8838
|
{
|
|
8239
8839
|
type: "button",
|
|
8240
8840
|
onClick: () => onSelectScenario(scenario),
|
|
8241
|
-
className:
|
|
8841
|
+
className: cn64(
|
|
8242
8842
|
"flex items-start gap-3 rounded-lg border border-border bg-card p-4 text-left",
|
|
8243
8843
|
"hover:border-primary/50 hover:bg-primary/5",
|
|
8244
8844
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -8270,7 +8870,7 @@ function MosaicQuickStartPanel({
|
|
|
8270
8870
|
{
|
|
8271
8871
|
type: "button",
|
|
8272
8872
|
onClick: () => onSelectPreset(preset),
|
|
8273
|
-
className:
|
|
8873
|
+
className: cn64(
|
|
8274
8874
|
"flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left",
|
|
8275
8875
|
"hover:border-primary/50",
|
|
8276
8876
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -8284,7 +8884,7 @@ function MosaicQuickStartPanel({
|
|
|
8284
8884
|
a.accentColor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8285
8885
|
"span",
|
|
8286
8886
|
{
|
|
8287
|
-
className:
|
|
8887
|
+
className: cn64("h-2 w-2 rounded-full", a.accentColor),
|
|
8288
8888
|
"aria-hidden": "true"
|
|
8289
8889
|
}
|
|
8290
8890
|
),
|
|
@@ -8302,7 +8902,7 @@ function MosaicQuickStartPanel({
|
|
|
8302
8902
|
{
|
|
8303
8903
|
type: "button",
|
|
8304
8904
|
onClick: onStartFromScratch,
|
|
8305
|
-
className:
|
|
8905
|
+
className: cn64(
|
|
8306
8906
|
"inline-flex min-h-[44px] w-full items-center justify-center rounded-md border border-border",
|
|
8307
8907
|
"bg-background px-4 text-sm font-medium text-foreground",
|
|
8308
8908
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -8341,9 +8941,9 @@ function TemplateGalleryContent({
|
|
|
8341
8941
|
duplicateLabel,
|
|
8342
8942
|
isMobile
|
|
8343
8943
|
}) {
|
|
8344
|
-
const [query, setQuery] =
|
|
8345
|
-
const [filterOpen, setFilterOpen] =
|
|
8346
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
8944
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
8945
|
+
const [filterOpen, setFilterOpen] = React29__namespace.useState(false);
|
|
8946
|
+
const [sidebarCollapsed, setSidebarCollapsed] = React29__namespace.useState(false);
|
|
8347
8947
|
const filtered = templates.filter(
|
|
8348
8948
|
(t) => !query || t.name.toLowerCase().includes(query.toLowerCase()) || (t.description ?? "").toLowerCase().includes(query.toLowerCase())
|
|
8349
8949
|
);
|
|
@@ -8396,7 +8996,7 @@ function TemplateGalleryContent({
|
|
|
8396
8996
|
value: query,
|
|
8397
8997
|
onChange: (e) => setQuery(e.target.value),
|
|
8398
8998
|
placeholder: searchPlaceholder,
|
|
8399
|
-
className:
|
|
8999
|
+
className: cn64(
|
|
8400
9000
|
"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"
|
|
8401
9001
|
)
|
|
8402
9002
|
}
|
|
@@ -8447,7 +9047,7 @@ function TemplateGalleryContent({
|
|
|
8447
9047
|
value: query,
|
|
8448
9048
|
onChange: (e) => setQuery(e.target.value),
|
|
8449
9049
|
placeholder: searchPlaceholder,
|
|
8450
|
-
className:
|
|
9050
|
+
className: cn64(
|
|
8451
9051
|
"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"
|
|
8452
9052
|
)
|
|
8453
9053
|
}
|
|
@@ -8479,7 +9079,7 @@ function MosaicTemplateGallery(props) {
|
|
|
8479
9079
|
return /* @__PURE__ */ jsxRuntime.jsx(TemplateGalleryContent, { ...props, isMobile });
|
|
8480
9080
|
}
|
|
8481
9081
|
MosaicTemplateGallery.displayName = "MosaicTemplateGallery";
|
|
8482
|
-
function
|
|
9082
|
+
function cn65(...classes) {
|
|
8483
9083
|
return classes.filter(Boolean).join(" ");
|
|
8484
9084
|
}
|
|
8485
9085
|
function PlusIcon5() {
|
|
@@ -8581,7 +9181,7 @@ function MosaicModuleForm(props) {
|
|
|
8581
9181
|
cancelLabel,
|
|
8582
9182
|
tagListAddPlaceholder
|
|
8583
9183
|
} = props;
|
|
8584
|
-
const [formData, setFormData] =
|
|
9184
|
+
const [formData, setFormData] = React29__namespace.useState({
|
|
8585
9185
|
name: item?.name ?? "",
|
|
8586
9186
|
description: item?.description ?? "",
|
|
8587
9187
|
icon: item?.icon ?? "",
|
|
@@ -8592,7 +9192,7 @@ function MosaicModuleForm(props) {
|
|
|
8592
9192
|
formFields.map((f) => [f.id, item?.[f.id] ?? (f.type === "tag-list" ? [] : "")])
|
|
8593
9193
|
)
|
|
8594
9194
|
});
|
|
8595
|
-
const [tagInputs, setTagInputs] =
|
|
9195
|
+
const [tagInputs, setTagInputs] = React29__namespace.useState({});
|
|
8596
9196
|
const update = (key, value) => {
|
|
8597
9197
|
setFormData((prev) => ({ ...prev, [key]: value }));
|
|
8598
9198
|
};
|
|
@@ -8630,7 +9230,7 @@ function MosaicModuleForm(props) {
|
|
|
8630
9230
|
onChange: (e) => update("name", e.target.value),
|
|
8631
9231
|
placeholder: namePlaceholder,
|
|
8632
9232
|
required: true,
|
|
8633
|
-
className:
|
|
9233
|
+
className: cn65(
|
|
8634
9234
|
"w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
|
|
8635
9235
|
"text-sm placeholder:text-muted-foreground",
|
|
8636
9236
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8648,7 +9248,7 @@ function MosaicModuleForm(props) {
|
|
|
8648
9248
|
onChange: (e) => update("description", e.target.value),
|
|
8649
9249
|
placeholder: descriptionPlaceholder,
|
|
8650
9250
|
rows: 3,
|
|
8651
|
-
className:
|
|
9251
|
+
className: cn65(
|
|
8652
9252
|
"w-full rounded-md border border-input bg-background px-3 py-2",
|
|
8653
9253
|
"text-sm placeholder:text-muted-foreground resize-none",
|
|
8654
9254
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8670,7 +9270,7 @@ function MosaicModuleForm(props) {
|
|
|
8670
9270
|
value: formData[field.id] ?? "",
|
|
8671
9271
|
onChange: (e) => update(field.id, e.target.value),
|
|
8672
9272
|
placeholder: field.placeholder,
|
|
8673
|
-
className:
|
|
9273
|
+
className: cn65(
|
|
8674
9274
|
"w-full rounded-md border border-input bg-background px-3 py-2 min-h-[40px]",
|
|
8675
9275
|
"text-sm placeholder:text-muted-foreground",
|
|
8676
9276
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8685,7 +9285,7 @@ function MosaicModuleForm(props) {
|
|
|
8685
9285
|
onChange: (e) => update(field.id, e.target.value),
|
|
8686
9286
|
placeholder: field.placeholder,
|
|
8687
9287
|
rows: 3,
|
|
8688
|
-
className:
|
|
9288
|
+
className: cn65(
|
|
8689
9289
|
"w-full rounded-md border border-input bg-background px-3 py-2",
|
|
8690
9290
|
"text-sm placeholder:text-muted-foreground resize-none",
|
|
8691
9291
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8701,7 +9301,7 @@ function MosaicModuleForm(props) {
|
|
|
8701
9301
|
onChange: (e) => update(field.id, e.target.value),
|
|
8702
9302
|
placeholder: field.placeholder ?? "\u{1F9E0}",
|
|
8703
9303
|
maxLength: 4,
|
|
8704
|
-
className:
|
|
9304
|
+
className: cn65(
|
|
8705
9305
|
"w-20 rounded-md border border-input bg-background px-3 py-2 text-2xl",
|
|
8706
9306
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8707
9307
|
)
|
|
@@ -8722,7 +9322,7 @@ function MosaicModuleForm(props) {
|
|
|
8722
9322
|
}
|
|
8723
9323
|
},
|
|
8724
9324
|
placeholder: field.placeholder ?? tagListAddPlaceholder,
|
|
8725
|
-
className:
|
|
9325
|
+
className: cn65(
|
|
8726
9326
|
"flex-1 rounded-md border border-input bg-background px-3 py-2 min-h-[36px]",
|
|
8727
9327
|
"text-sm placeholder:text-muted-foreground",
|
|
8728
9328
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8793,9 +9393,9 @@ function ModuleItemCard({
|
|
|
8793
9393
|
editItemLabel,
|
|
8794
9394
|
deleteItemLabel
|
|
8795
9395
|
}) {
|
|
8796
|
-
const [menuOpen, setMenuOpen] =
|
|
8797
|
-
const menuRef =
|
|
8798
|
-
|
|
9396
|
+
const [menuOpen, setMenuOpen] = React29__namespace.useState(false);
|
|
9397
|
+
const menuRef = React29__namespace.useRef(null);
|
|
9398
|
+
React29__namespace.useEffect(() => {
|
|
8799
9399
|
if (!menuOpen) return;
|
|
8800
9400
|
const h = (e) => {
|
|
8801
9401
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -8896,11 +9496,11 @@ function LibraryContent({
|
|
|
8896
9496
|
editModalTitle,
|
|
8897
9497
|
tagListAddPlaceholder
|
|
8898
9498
|
}) {
|
|
8899
|
-
const [query, setQuery] =
|
|
8900
|
-
const [activeTab, setActiveTab] =
|
|
8901
|
-
const [editorOpen, setEditorOpen] =
|
|
8902
|
-
const [editingItem, setEditingItem] =
|
|
8903
|
-
const [editorMode, setEditorMode] =
|
|
9499
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
9500
|
+
const [activeTab, setActiveTab] = React29__namespace.useState(tabs?.[0]?.id ?? "all");
|
|
9501
|
+
const [editorOpen, setEditorOpen] = React29__namespace.useState(false);
|
|
9502
|
+
const [editingItem, setEditingItem] = React29__namespace.useState();
|
|
9503
|
+
const [editorMode, setEditorMode] = React29__namespace.useState("create");
|
|
8904
9504
|
const openCreate = () => {
|
|
8905
9505
|
setEditingItem(void 0);
|
|
8906
9506
|
setEditorMode("create");
|
|
@@ -8934,7 +9534,7 @@ function LibraryContent({
|
|
|
8934
9534
|
{
|
|
8935
9535
|
type: "button",
|
|
8936
9536
|
onClick: openCreate,
|
|
8937
|
-
className:
|
|
9537
|
+
className: cn65(
|
|
8938
9538
|
"inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground",
|
|
8939
9539
|
"hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8940
9540
|
),
|
|
@@ -8954,7 +9554,7 @@ function LibraryContent({
|
|
|
8954
9554
|
value: query,
|
|
8955
9555
|
onChange: (e) => setQuery(e.target.value),
|
|
8956
9556
|
placeholder: searchPlaceholder,
|
|
8957
|
-
className:
|
|
9557
|
+
className: cn65(
|
|
8958
9558
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
8959
9559
|
"text-sm placeholder:text-muted-foreground",
|
|
8960
9560
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -8967,7 +9567,7 @@ function LibraryContent({
|
|
|
8967
9567
|
{
|
|
8968
9568
|
type: "button",
|
|
8969
9569
|
onClick: () => setActiveTab(tab.id),
|
|
8970
|
-
className:
|
|
9570
|
+
className: cn65(
|
|
8971
9571
|
"rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
8972
9572
|
activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
8973
9573
|
),
|
|
@@ -9019,7 +9619,7 @@ function MosaicModuleLibrary(props) {
|
|
|
9019
9619
|
return /* @__PURE__ */ jsxRuntime.jsx(LibraryContent, { ...props });
|
|
9020
9620
|
}
|
|
9021
9621
|
MosaicModuleLibrary.displayName = "MosaicModuleLibrary";
|
|
9022
|
-
function
|
|
9622
|
+
function cn66(...classes) {
|
|
9023
9623
|
return classes.filter(Boolean).join(" ");
|
|
9024
9624
|
}
|
|
9025
9625
|
var roleConfig = {
|
|
@@ -9046,7 +9646,7 @@ function MosaicOrgRoleBadge({ role, className }) {
|
|
|
9046
9646
|
{
|
|
9047
9647
|
"data-slot": "org-role-badge",
|
|
9048
9648
|
title: config.description,
|
|
9049
|
-
className:
|
|
9649
|
+
className: cn66(
|
|
9050
9650
|
"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
|
|
9051
9651
|
config.className,
|
|
9052
9652
|
className
|
|
@@ -9063,13 +9663,13 @@ function MosaicMultiOrgIndicator({
|
|
|
9063
9663
|
className
|
|
9064
9664
|
}) {
|
|
9065
9665
|
if (orgCount <= 1) return null;
|
|
9066
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "multi-org-indicator", className:
|
|
9666
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "multi-org-indicator", className: cn66("flex items-center gap-2", className), children: [
|
|
9067
9667
|
onSwitchOrg ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9068
9668
|
"button",
|
|
9069
9669
|
{
|
|
9070
9670
|
type: "button",
|
|
9071
9671
|
onClick: onSwitchOrg,
|
|
9072
|
-
className:
|
|
9672
|
+
className: cn66(
|
|
9073
9673
|
"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2.5 py-1 text-xs font-medium text-secondary-foreground",
|
|
9074
9674
|
"hover:bg-secondary/80",
|
|
9075
9675
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9122,10 +9722,10 @@ function MosaicCreateOrgDialog({
|
|
|
9122
9722
|
creatingLabel,
|
|
9123
9723
|
createLabel
|
|
9124
9724
|
}) {
|
|
9125
|
-
const [name, setName] =
|
|
9126
|
-
const [slug, setSlug] =
|
|
9127
|
-
const [description, setDescription] =
|
|
9128
|
-
const [errors, setErrors] =
|
|
9725
|
+
const [name, setName] = React29__namespace.useState("");
|
|
9726
|
+
const [slug, setSlug] = React29__namespace.useState("");
|
|
9727
|
+
const [description, setDescription] = React29__namespace.useState("");
|
|
9728
|
+
const [errors, setErrors] = React29__namespace.useState({});
|
|
9129
9729
|
const validate = () => {
|
|
9130
9730
|
const errs = {};
|
|
9131
9731
|
if (!name.trim()) errs.name = "Name is required";
|
|
@@ -9149,7 +9749,7 @@ function MosaicCreateOrgDialog({
|
|
|
9149
9749
|
setErrors({});
|
|
9150
9750
|
onOpenChange(false);
|
|
9151
9751
|
};
|
|
9152
|
-
|
|
9752
|
+
React29__namespace.useEffect(() => {
|
|
9153
9753
|
if (!name) {
|
|
9154
9754
|
setSlug("");
|
|
9155
9755
|
return;
|
|
@@ -9183,7 +9783,7 @@ function MosaicCreateOrgDialog({
|
|
|
9183
9783
|
onChange: (e) => setName(e.target.value),
|
|
9184
9784
|
placeholder: orgNamePlaceholder,
|
|
9185
9785
|
required: true,
|
|
9186
|
-
className:
|
|
9786
|
+
className: cn66(
|
|
9187
9787
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9188
9788
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9189
9789
|
errors.name ? "border-destructive" : "border-input"
|
|
@@ -9203,7 +9803,7 @@ function MosaicCreateOrgDialog({
|
|
|
9203
9803
|
onChange: (e) => setSlug(e.target.value),
|
|
9204
9804
|
placeholder: "acme-inc",
|
|
9205
9805
|
required: true,
|
|
9206
|
-
className:
|
|
9806
|
+
className: cn66(
|
|
9207
9807
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9208
9808
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9209
9809
|
errors.slug ? "border-destructive" : "border-input"
|
|
@@ -9272,9 +9872,9 @@ function MosaicInviteMemberDialog({
|
|
|
9272
9872
|
sendingLabel,
|
|
9273
9873
|
sendInvitationLabel
|
|
9274
9874
|
}) {
|
|
9275
|
-
const [email, setEmail] =
|
|
9276
|
-
const [role, setRole] =
|
|
9277
|
-
const [errors, setErrors] =
|
|
9875
|
+
const [email, setEmail] = React29__namespace.useState("");
|
|
9876
|
+
const [role, setRole] = React29__namespace.useState("member");
|
|
9877
|
+
const [errors, setErrors] = React29__namespace.useState({});
|
|
9278
9878
|
const validate = () => {
|
|
9279
9879
|
const errs = {};
|
|
9280
9880
|
if (!email.trim()) errs.email = "Email is required";
|
|
@@ -9316,7 +9916,7 @@ function MosaicInviteMemberDialog({
|
|
|
9316
9916
|
onChange: (e) => setEmail(e.target.value),
|
|
9317
9917
|
placeholder: emailPlaceholder,
|
|
9318
9918
|
required: true,
|
|
9319
|
-
className:
|
|
9919
|
+
className: cn66(
|
|
9320
9920
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
9321
9921
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9322
9922
|
errors.email ? "border-destructive" : "border-input"
|
|
@@ -9375,10 +9975,10 @@ function MemberRow({
|
|
|
9375
9975
|
memberActionsAriaLabel,
|
|
9376
9976
|
removeMemberLabel
|
|
9377
9977
|
}) {
|
|
9378
|
-
const [menuOpen, setMenuOpen] =
|
|
9379
|
-
const menuRef =
|
|
9978
|
+
const [menuOpen, setMenuOpen] = React29__namespace.useState(false);
|
|
9979
|
+
const menuRef = React29__namespace.useRef(null);
|
|
9380
9980
|
const isSelf = member.id === currentUserId;
|
|
9381
|
-
|
|
9981
|
+
React29__namespace.useEffect(() => {
|
|
9382
9982
|
if (!menuOpen) return;
|
|
9383
9983
|
const h = (e) => {
|
|
9384
9984
|
if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false);
|
|
@@ -9499,11 +10099,11 @@ function MosaicMemberList({
|
|
|
9499
10099
|
inviteLabel,
|
|
9500
10100
|
className
|
|
9501
10101
|
}) {
|
|
9502
|
-
const [query, setQuery] =
|
|
10102
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
9503
10103
|
const filtered = members.filter(
|
|
9504
10104
|
(m) => !query || m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
|
|
9505
10105
|
);
|
|
9506
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "member-list", className:
|
|
10106
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "member-list", className: cn66("flex flex-col gap-4", className), children: [
|
|
9507
10107
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
9508
10108
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
9509
10109
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9597,9 +10197,9 @@ function MosaicOrgPanel({
|
|
|
9597
10197
|
className
|
|
9598
10198
|
}) {
|
|
9599
10199
|
const { isMobile } = useDevice();
|
|
9600
|
-
const [activeTab, setActiveTab] =
|
|
10200
|
+
const [activeTab, setActiveTab] = React29__namespace.useState(defaultTab ?? tabs[0]?.id ?? "");
|
|
9601
10201
|
const activeContent = tabs.find((t) => t.id === activeTab)?.content;
|
|
9602
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "org-panel", className:
|
|
10202
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "org-panel", className: cn66("flex h-full flex-col", className), children: [
|
|
9603
10203
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-4 py-4 md:px-6", children: [
|
|
9604
10204
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
9605
10205
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -9621,12 +10221,12 @@ function MosaicOrgPanel({
|
|
|
9621
10221
|
] }),
|
|
9622
10222
|
headerActions
|
|
9623
10223
|
] }),
|
|
9624
|
-
tabs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10224
|
+
tabs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn66("mt-4 flex gap-1", isMobile && "overflow-x-auto"), children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9625
10225
|
"button",
|
|
9626
10226
|
{
|
|
9627
10227
|
type: "button",
|
|
9628
10228
|
onClick: () => setActiveTab(tab.id),
|
|
9629
|
-
className:
|
|
10229
|
+
className: cn66(
|
|
9630
10230
|
"shrink-0 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
9631
10231
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9632
10232
|
activeTab === tab.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
@@ -9640,7 +10240,7 @@ function MosaicOrgPanel({
|
|
|
9640
10240
|
] });
|
|
9641
10241
|
}
|
|
9642
10242
|
MosaicOrgPanel.displayName = "MosaicOrgPanel";
|
|
9643
|
-
function
|
|
10243
|
+
function cn67(...classes) {
|
|
9644
10244
|
return classes.filter(Boolean).join(" ");
|
|
9645
10245
|
}
|
|
9646
10246
|
var ANIM_ID8 = "mosaic-dashboard-content-kf";
|
|
@@ -9669,7 +10269,7 @@ function MosaicDashboardContent({
|
|
|
9669
10269
|
className
|
|
9670
10270
|
}) {
|
|
9671
10271
|
const { isMobile } = useDevice();
|
|
9672
|
-
|
|
10272
|
+
React29__namespace.useEffect(() => {
|
|
9673
10273
|
injectStyles8();
|
|
9674
10274
|
}, []);
|
|
9675
10275
|
const activeView = views.find((v) => v.id === currentView);
|
|
@@ -9677,7 +10277,7 @@ function MosaicDashboardContent({
|
|
|
9677
10277
|
"div",
|
|
9678
10278
|
{
|
|
9679
10279
|
"data-slot": "dashboard-content",
|
|
9680
|
-
className:
|
|
10280
|
+
className: cn67("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
|
|
9681
10281
|
children: activeView ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mosaic-content-view space-y-6", children: activeView.content }, currentView) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "py-12 text-center text-sm text-muted-foreground", children: [
|
|
9682
10282
|
"View not found: ",
|
|
9683
10283
|
currentView
|
|
@@ -9686,7 +10286,7 @@ function MosaicDashboardContent({
|
|
|
9686
10286
|
);
|
|
9687
10287
|
}
|
|
9688
10288
|
MosaicDashboardContent.displayName = "MosaicDashboardContent";
|
|
9689
|
-
function
|
|
10289
|
+
function cn68(...classes) {
|
|
9690
10290
|
return classes.filter(Boolean).join(" ");
|
|
9691
10291
|
}
|
|
9692
10292
|
var ANIM_ID9 = "mosaic-dashboard-header2-kf";
|
|
@@ -9786,8 +10386,8 @@ function MosaicDashboardHeader({
|
|
|
9786
10386
|
className
|
|
9787
10387
|
}) {
|
|
9788
10388
|
const { isMobile } = useDevice();
|
|
9789
|
-
const [searchQuery, setSearchQuery] =
|
|
9790
|
-
|
|
10389
|
+
const [searchQuery, setSearchQuery] = React29__namespace.useState("");
|
|
10390
|
+
React29__namespace.useEffect(() => {
|
|
9791
10391
|
injectStyles9();
|
|
9792
10392
|
}, []);
|
|
9793
10393
|
const handleSearch = (e) => {
|
|
@@ -9798,16 +10398,16 @@ function MosaicDashboardHeader({
|
|
|
9798
10398
|
"header",
|
|
9799
10399
|
{
|
|
9800
10400
|
"data-slot": "dashboard-header",
|
|
9801
|
-
className:
|
|
10401
|
+
className: cn68(
|
|
9802
10402
|
"mosaic-dashboard-header2",
|
|
9803
10403
|
"sticky top-0 z-40 border-b border-border/50 bg-background/80 backdrop-blur-sm",
|
|
9804
10404
|
className
|
|
9805
10405
|
),
|
|
9806
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10406
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn68(isMobile ? "px-4 py-3" : "container mx-auto px-4 py-4"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
9807
10407
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2 md:gap-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9808
10408
|
logoSlot ?? /* @__PURE__ */ jsxRuntime.jsx(SparklesIcon4, {}),
|
|
9809
10409
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
9810
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className:
|
|
10410
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn68("font-semibold truncate", isMobile ? "text-lg" : "text-xl"), children: title }),
|
|
9811
10411
|
subtitle && !isMobile && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate", children: subtitle })
|
|
9812
10412
|
] })
|
|
9813
10413
|
] }) }),
|
|
@@ -9820,7 +10420,7 @@ function MosaicDashboardHeader({
|
|
|
9820
10420
|
value: searchQuery,
|
|
9821
10421
|
onChange: handleSearch,
|
|
9822
10422
|
placeholder: searchPlaceholder,
|
|
9823
|
-
className:
|
|
10423
|
+
className: cn68(
|
|
9824
10424
|
"w-full rounded-md border border-input bg-background py-2 pl-9 pr-3",
|
|
9825
10425
|
"text-sm placeholder:text-muted-foreground",
|
|
9826
10426
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
@@ -9860,7 +10460,7 @@ function MosaicDashboardHeader({
|
|
|
9860
10460
|
);
|
|
9861
10461
|
}
|
|
9862
10462
|
MosaicDashboardHeader.displayName = "MosaicDashboardHeader";
|
|
9863
|
-
function
|
|
10463
|
+
function cn69(...classes) {
|
|
9864
10464
|
return classes.filter(Boolean).join(" ");
|
|
9865
10465
|
}
|
|
9866
10466
|
function ChevronDownIcon4() {
|
|
@@ -9930,10 +10530,10 @@ function MosaicOrgSwitcher({
|
|
|
9930
10530
|
noOrgSelectedLabel,
|
|
9931
10531
|
className
|
|
9932
10532
|
}) {
|
|
9933
|
-
const [open, setOpen] =
|
|
9934
|
-
const ref =
|
|
10533
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
10534
|
+
const ref = React29__namespace.useRef(null);
|
|
9935
10535
|
const currentOrg = organizations.find((o) => o.id === currentOrgId) ?? organizations[0];
|
|
9936
|
-
|
|
10536
|
+
React29__namespace.useEffect(() => {
|
|
9937
10537
|
if (!open) return;
|
|
9938
10538
|
const h = (e) => {
|
|
9939
10539
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -9943,13 +10543,13 @@ function MosaicOrgSwitcher({
|
|
|
9943
10543
|
}, [open]);
|
|
9944
10544
|
if (!currentOrg && organizations.length === 0 && !onCreateOrg) return null;
|
|
9945
10545
|
const initials = currentOrg?.name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() ?? "?";
|
|
9946
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "org-switcher", className:
|
|
10546
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "org-switcher", className: cn69("relative", className), children: [
|
|
9947
10547
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9948
10548
|
"button",
|
|
9949
10549
|
{
|
|
9950
10550
|
type: "button",
|
|
9951
10551
|
onClick: () => setOpen((v) => !v),
|
|
9952
|
-
className:
|
|
10552
|
+
className: cn69(
|
|
9953
10553
|
"inline-flex items-center gap-2 rounded-md border border-border bg-background px-3 py-1.5",
|
|
9954
10554
|
"text-sm font-medium text-foreground",
|
|
9955
10555
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -9976,7 +10576,7 @@ function MosaicOrgSwitcher({
|
|
|
9976
10576
|
{
|
|
9977
10577
|
role: "menu",
|
|
9978
10578
|
"aria-label": triggerAriaLabel,
|
|
9979
|
-
className:
|
|
10579
|
+
className: cn69(
|
|
9980
10580
|
"absolute left-0 top-full z-50 mt-1 min-w-[200px] rounded-md border border-border",
|
|
9981
10581
|
"bg-popover py-1 shadow-md"
|
|
9982
10582
|
),
|
|
@@ -9991,7 +10591,7 @@ function MosaicOrgSwitcher({
|
|
|
9991
10591
|
onSelectOrg?.(org.id);
|
|
9992
10592
|
setOpen(false);
|
|
9993
10593
|
},
|
|
9994
|
-
className:
|
|
10594
|
+
className: cn69(
|
|
9995
10595
|
"flex w-full items-center gap-2.5 px-3 py-2 text-sm text-foreground",
|
|
9996
10596
|
"hover:bg-accent hover:text-accent-foreground",
|
|
9997
10597
|
org.id === currentOrgId && "bg-primary/10 text-primary"
|
|
@@ -10028,7 +10628,7 @@ function MosaicOrgSwitcher({
|
|
|
10028
10628
|
] });
|
|
10029
10629
|
}
|
|
10030
10630
|
MosaicOrgSwitcher.displayName = "MosaicOrgSwitcher";
|
|
10031
|
-
function
|
|
10631
|
+
function cn70(...classes) {
|
|
10032
10632
|
return classes.filter(Boolean).join(" ");
|
|
10033
10633
|
}
|
|
10034
10634
|
function PlusIcon7() {
|
|
@@ -10063,9 +10663,9 @@ function MosaicQuickActionsMenu({
|
|
|
10063
10663
|
className
|
|
10064
10664
|
}) {
|
|
10065
10665
|
const { isMobile } = useDevice();
|
|
10066
|
-
const [open, setOpen] =
|
|
10067
|
-
const ref =
|
|
10068
|
-
|
|
10666
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
10667
|
+
const ref = React29__namespace.useRef(null);
|
|
10668
|
+
React29__namespace.useEffect(() => {
|
|
10069
10669
|
if (!open) return;
|
|
10070
10670
|
const h = (e) => {
|
|
10071
10671
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -10073,19 +10673,19 @@ function MosaicQuickActionsMenu({
|
|
|
10073
10673
|
document.addEventListener("mousedown", h);
|
|
10074
10674
|
return () => document.removeEventListener("mousedown", h);
|
|
10075
10675
|
}, [open]);
|
|
10076
|
-
const itemClass =
|
|
10676
|
+
const itemClass = cn70(
|
|
10077
10677
|
"flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground",
|
|
10078
10678
|
"hover:bg-accent hover:text-accent-foreground",
|
|
10079
10679
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
10080
10680
|
"min-h-[44px]"
|
|
10081
10681
|
);
|
|
10082
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "quick-actions-menu", className:
|
|
10682
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "quick-actions-menu", className: cn70("relative", className), children: [
|
|
10083
10683
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10084
10684
|
"button",
|
|
10085
10685
|
{
|
|
10086
10686
|
type: "button",
|
|
10087
10687
|
onClick: () => setOpen((v) => !v),
|
|
10088
|
-
className:
|
|
10688
|
+
className: cn70(
|
|
10089
10689
|
"inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background",
|
|
10090
10690
|
"min-h-[44px] min-w-[44px] px-3 py-2 text-sm font-medium text-foreground",
|
|
10091
10691
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -10096,7 +10696,7 @@ function MosaicQuickActionsMenu({
|
|
|
10096
10696
|
"aria-label": label,
|
|
10097
10697
|
children: [
|
|
10098
10698
|
triggerIcon ?? /* @__PURE__ */ jsxRuntime.jsx(PlusIcon7, {}),
|
|
10099
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
10699
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn70("hidden md:inline"), children: label })
|
|
10100
10700
|
]
|
|
10101
10701
|
}
|
|
10102
10702
|
),
|
|
@@ -10105,14 +10705,14 @@ function MosaicQuickActionsMenu({
|
|
|
10105
10705
|
{
|
|
10106
10706
|
role: "menu",
|
|
10107
10707
|
"aria-label": menuTitle,
|
|
10108
|
-
className:
|
|
10708
|
+
className: cn70(
|
|
10109
10709
|
"absolute right-0 top-full z-50 mt-1 rounded-md border border-border bg-popover py-1 shadow-md",
|
|
10110
10710
|
isMobile ? "w-[min(90vw,280px)]" : "w-56"
|
|
10111
10711
|
),
|
|
10112
10712
|
children: [
|
|
10113
10713
|
menuTitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide", children: menuTitle }) }),
|
|
10114
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
10115
|
-
actions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10714
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn70(menuTitle && "border-t border-border") }),
|
|
10715
|
+
actions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
10116
10716
|
action.separator && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-1 border-t border-border" }),
|
|
10117
10717
|
action.href && renderLink ? renderLink(
|
|
10118
10718
|
action,
|
|
@@ -10416,7 +11016,7 @@ function MosaicOrgProfilePage({
|
|
|
10416
11016
|
);
|
|
10417
11017
|
}
|
|
10418
11018
|
MosaicOrgProfilePage.displayName = "MosaicOrgProfilePage";
|
|
10419
|
-
function
|
|
11019
|
+
function cn71(...classes) {
|
|
10420
11020
|
return classes.filter(Boolean).join(" ");
|
|
10421
11021
|
}
|
|
10422
11022
|
function defaultCompare(a, b) {
|
|
@@ -10435,7 +11035,7 @@ function MosaicDataTable({
|
|
|
10435
11035
|
footerSlot,
|
|
10436
11036
|
pagination
|
|
10437
11037
|
}) {
|
|
10438
|
-
const [sort, setSort] =
|
|
11038
|
+
const [sort, setSort] = React29.useState(null);
|
|
10439
11039
|
function handleHeaderClick(col) {
|
|
10440
11040
|
if (!masterSortable || !col.sortable) return;
|
|
10441
11041
|
setSort((prev) => {
|
|
@@ -10479,7 +11079,7 @@ function MosaicDataTable({
|
|
|
10479
11079
|
{
|
|
10480
11080
|
ref,
|
|
10481
11081
|
"data-slot": "data-table",
|
|
10482
|
-
className:
|
|
11082
|
+
className: cn71("w-full border-collapse text-sm", className),
|
|
10483
11083
|
children: [
|
|
10484
11084
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { "data-slot": "data-table-header", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-slot": "data-table-header-row", className: "border-b border-border bg-muted", children: columns.map((col, colIndex) => {
|
|
10485
11085
|
const isSortable = masterSortable && col.sortable;
|
|
@@ -10497,7 +11097,7 @@ function MosaicDataTable({
|
|
|
10497
11097
|
handleHeaderClick(col);
|
|
10498
11098
|
}
|
|
10499
11099
|
} : void 0,
|
|
10500
|
-
className:
|
|
11100
|
+
className: cn71(
|
|
10501
11101
|
"px-4 py-3 font-medium text-muted-foreground",
|
|
10502
11102
|
alignClass(col.align),
|
|
10503
11103
|
col.className,
|
|
@@ -10533,7 +11133,7 @@ function MosaicDataTable({
|
|
|
10533
11133
|
"td",
|
|
10534
11134
|
{
|
|
10535
11135
|
"data-slot": "data-table-td",
|
|
10536
|
-
className:
|
|
11136
|
+
className: cn71(
|
|
10537
11137
|
"px-4 py-3 text-foreground",
|
|
10538
11138
|
alignClass(col.align),
|
|
10539
11139
|
col.className
|
|
@@ -10672,7 +11272,7 @@ var stepSegmentVariants = classVarianceAuthority.cva(["h-1.5 flex-1 min-w-2 roun
|
|
|
10672
11272
|
filled: false
|
|
10673
11273
|
}
|
|
10674
11274
|
});
|
|
10675
|
-
function
|
|
11275
|
+
function cn72(...classes) {
|
|
10676
11276
|
return classes.filter(Boolean).join(" ");
|
|
10677
11277
|
}
|
|
10678
11278
|
function resolveStatus(step, index, currentIndex) {
|
|
@@ -10713,7 +11313,7 @@ function MosaicStepPipelineSegments({
|
|
|
10713
11313
|
"aria-valuemax": total,
|
|
10714
11314
|
"aria-valuenow": current,
|
|
10715
11315
|
"aria-valuetext": progressLabel ? progressLabel(current, total) : void 0,
|
|
10716
|
-
className:
|
|
11316
|
+
className: cn72(stepSegmentBarVariants(), className),
|
|
10717
11317
|
children: steps.map((step, index) => {
|
|
10718
11318
|
const status = resolveStatus(step, index, currentIndex);
|
|
10719
11319
|
const filled = status !== "upcoming";
|
|
@@ -10725,7 +11325,7 @@ function MosaicStepPipelineSegments({
|
|
|
10725
11325
|
"data-status": status,
|
|
10726
11326
|
"data-filled": filled,
|
|
10727
11327
|
"aria-hidden": "true",
|
|
10728
|
-
className:
|
|
11328
|
+
className: cn72(stepSegmentVariants({ filled }))
|
|
10729
11329
|
},
|
|
10730
11330
|
key
|
|
10731
11331
|
);
|
|
@@ -10746,7 +11346,7 @@ function MosaicStepPipelineDots({
|
|
|
10746
11346
|
{
|
|
10747
11347
|
ref,
|
|
10748
11348
|
"data-slot": "step-pipeline",
|
|
10749
|
-
className:
|
|
11349
|
+
className: cn72(stepPipelineVariants({ orientation }), className),
|
|
10750
11350
|
children: steps.map((step, index) => {
|
|
10751
11351
|
const status = resolveStatus(step, index, currentIndex);
|
|
10752
11352
|
const isCurrent = status === "current";
|
|
@@ -10758,7 +11358,7 @@ function MosaicStepPipelineDots({
|
|
|
10758
11358
|
"data-slot": "step",
|
|
10759
11359
|
"data-status": status,
|
|
10760
11360
|
"aria-current": isCurrent ? "step" : void 0,
|
|
10761
|
-
className:
|
|
11361
|
+
className: cn72(
|
|
10762
11362
|
"flex shrink-0",
|
|
10763
11363
|
orientation === "horizontal" ? "flex-col items-center gap-2" : "flex-row items-start gap-3",
|
|
10764
11364
|
orientation === "horizontal" && !isLast && "flex-1"
|
|
@@ -10769,14 +11369,14 @@ function MosaicStepPipelineDots({
|
|
|
10769
11369
|
"div",
|
|
10770
11370
|
{
|
|
10771
11371
|
"data-slot": "step-connector",
|
|
10772
|
-
className:
|
|
11372
|
+
className: cn72(stepConnectorVariants({ status, orientation }))
|
|
10773
11373
|
}
|
|
10774
11374
|
),
|
|
10775
11375
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10776
11376
|
"div",
|
|
10777
11377
|
{
|
|
10778
11378
|
"data-slot": "step-indicator",
|
|
10779
|
-
className:
|
|
11379
|
+
className: cn72(stepIndicatorVariants({ status, orientation })),
|
|
10780
11380
|
"aria-hidden": "true",
|
|
10781
11381
|
children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
|
|
10782
11382
|
}
|
|
@@ -10785,7 +11385,7 @@ function MosaicStepPipelineDots({
|
|
|
10785
11385
|
"div",
|
|
10786
11386
|
{
|
|
10787
11387
|
"data-slot": "step-connector",
|
|
10788
|
-
className:
|
|
11388
|
+
className: cn72(
|
|
10789
11389
|
stepConnectorVariants({
|
|
10790
11390
|
// connector after current step is still upcoming
|
|
10791
11391
|
status: status === "done" ? "done" : "upcoming",
|
|
@@ -10796,12 +11396,12 @@ function MosaicStepPipelineDots({
|
|
|
10796
11396
|
)
|
|
10797
11397
|
] }),
|
|
10798
11398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-0.5 text-center px-1", children: [
|
|
10799
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className:
|
|
11399
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn72(stepLabelVariants({ status })), children: step.label }),
|
|
10800
11400
|
step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10801
11401
|
"span",
|
|
10802
11402
|
{
|
|
10803
11403
|
"data-slot": "step-description",
|
|
10804
|
-
className:
|
|
11404
|
+
className: cn72(stepDescriptionVariants({ status })),
|
|
10805
11405
|
children: step.description
|
|
10806
11406
|
}
|
|
10807
11407
|
)
|
|
@@ -10812,7 +11412,7 @@ function MosaicStepPipelineDots({
|
|
|
10812
11412
|
"div",
|
|
10813
11413
|
{
|
|
10814
11414
|
"data-slot": "step-indicator",
|
|
10815
|
-
className:
|
|
11415
|
+
className: cn72(stepIndicatorVariants({ status, orientation })),
|
|
10816
11416
|
"aria-hidden": "true",
|
|
10817
11417
|
children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
|
|
10818
11418
|
}
|
|
@@ -10821,7 +11421,7 @@ function MosaicStepPipelineDots({
|
|
|
10821
11421
|
"div",
|
|
10822
11422
|
{
|
|
10823
11423
|
"data-slot": "step-connector",
|
|
10824
|
-
className:
|
|
11424
|
+
className: cn72(
|
|
10825
11425
|
stepConnectorVariants({
|
|
10826
11426
|
status: status === "done" ? "done" : "upcoming",
|
|
10827
11427
|
orientation
|
|
@@ -10831,12 +11431,12 @@ function MosaicStepPipelineDots({
|
|
|
10831
11431
|
)
|
|
10832
11432
|
] }),
|
|
10833
11433
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 pt-1 pb-4", children: [
|
|
10834
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className:
|
|
11434
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn72(stepLabelVariants({ status })), children: step.label }),
|
|
10835
11435
|
step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10836
11436
|
"span",
|
|
10837
11437
|
{
|
|
10838
11438
|
"data-slot": "step-description",
|
|
10839
|
-
className:
|
|
11439
|
+
className: cn72(stepDescriptionVariants({ status })),
|
|
10840
11440
|
children: step.description
|
|
10841
11441
|
}
|
|
10842
11442
|
)
|
|
@@ -10850,7 +11450,7 @@ function MosaicStepPipelineDots({
|
|
|
10850
11450
|
);
|
|
10851
11451
|
}
|
|
10852
11452
|
MosaicStepPipelineDots.displayName = "MosaicStepPipelineDots";
|
|
10853
|
-
function
|
|
11453
|
+
function cn73(...classes) {
|
|
10854
11454
|
return classes.filter(Boolean).join(" ");
|
|
10855
11455
|
}
|
|
10856
11456
|
function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
@@ -10859,7 +11459,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
|
10859
11459
|
{
|
|
10860
11460
|
ref,
|
|
10861
11461
|
"data-slot": "kanban-board",
|
|
10862
|
-
className:
|
|
11462
|
+
className: cn73(
|
|
10863
11463
|
"flex gap-4 overflow-x-auto pb-4",
|
|
10864
11464
|
"min-h-0",
|
|
10865
11465
|
// Smooth momentum scrolling on iOS
|
|
@@ -10872,7 +11472,7 @@ function MosaicKanbanBoard({ children, className, ref, ...props }) {
|
|
|
10872
11472
|
);
|
|
10873
11473
|
}
|
|
10874
11474
|
MosaicKanbanBoard.displayName = "MosaicKanbanBoard";
|
|
10875
|
-
function
|
|
11475
|
+
function cn74(...classes) {
|
|
10876
11476
|
return classes.filter(Boolean).join(" ");
|
|
10877
11477
|
}
|
|
10878
11478
|
function MosaicKanbanColumn({
|
|
@@ -10890,7 +11490,7 @@ function MosaicKanbanColumn({
|
|
|
10890
11490
|
{
|
|
10891
11491
|
ref,
|
|
10892
11492
|
"data-slot": "kanban-column",
|
|
10893
|
-
className:
|
|
11493
|
+
className: cn74(
|
|
10894
11494
|
// Fixed column width, never shrink so board stays scrollable
|
|
10895
11495
|
"flex flex-col w-72 shrink-0",
|
|
10896
11496
|
// Surface
|
|
@@ -10911,7 +11511,7 @@ function MosaicKanbanColumn({
|
|
|
10911
11511
|
{
|
|
10912
11512
|
"data-slot": "kanban-column-count",
|
|
10913
11513
|
"aria-label": countLabel(count),
|
|
10914
|
-
className:
|
|
11514
|
+
className: cn74(
|
|
10915
11515
|
"inline-flex items-center justify-center",
|
|
10916
11516
|
"min-w-[1.25rem] h-5 px-1.5 rounded-full",
|
|
10917
11517
|
"bg-muted text-muted-foreground",
|
|
@@ -10954,12 +11554,12 @@ function MosaicKanbanColumn({
|
|
|
10954
11554
|
);
|
|
10955
11555
|
}
|
|
10956
11556
|
MosaicKanbanColumn.displayName = "MosaicKanbanColumn";
|
|
10957
|
-
var WorkspaceCtx =
|
|
11557
|
+
var WorkspaceCtx = React29__namespace.createContext({
|
|
10958
11558
|
workspaceId: null,
|
|
10959
11559
|
isLoading: false
|
|
10960
11560
|
});
|
|
10961
11561
|
function useMosaicWorkspace() {
|
|
10962
|
-
return
|
|
11562
|
+
return React29__namespace.useContext(WorkspaceCtx);
|
|
10963
11563
|
}
|
|
10964
11564
|
var defaultClerkAppearance = {
|
|
10965
11565
|
variables: {
|
|
@@ -10972,9 +11572,9 @@ var defaultClerkAppearance = {
|
|
|
10972
11572
|
}
|
|
10973
11573
|
};
|
|
10974
11574
|
function WorkspaceResolver({ resolveWorkspaceId, initialOrgId, children }) {
|
|
10975
|
-
const [workspaceId, setWorkspaceId] =
|
|
10976
|
-
const [isLoading, setIsLoading] =
|
|
10977
|
-
|
|
11575
|
+
const [workspaceId, setWorkspaceId] = React29__namespace.useState(null);
|
|
11576
|
+
const [isLoading, setIsLoading] = React29__namespace.useState(false);
|
|
11577
|
+
React29__namespace.useEffect(() => {
|
|
10978
11578
|
if (!resolveWorkspaceId) {
|
|
10979
11579
|
setWorkspaceId(initialOrgId ?? null);
|
|
10980
11580
|
return;
|
|
@@ -11133,7 +11733,7 @@ var documentUploadProgressFillVariants = classVarianceAuthority.cva(
|
|
|
11133
11733
|
defaultVariants: {}
|
|
11134
11734
|
}
|
|
11135
11735
|
);
|
|
11136
|
-
function
|
|
11736
|
+
function cn75(...classes) {
|
|
11137
11737
|
return classes.filter(Boolean).join(" ");
|
|
11138
11738
|
}
|
|
11139
11739
|
function MosaicDocumentUpload({
|
|
@@ -11153,9 +11753,9 @@ function MosaicDocumentUpload({
|
|
|
11153
11753
|
className,
|
|
11154
11754
|
ref
|
|
11155
11755
|
}) {
|
|
11156
|
-
const [isDragActive, setIsDragActive] =
|
|
11157
|
-
const inputRef =
|
|
11158
|
-
const inputId =
|
|
11756
|
+
const [isDragActive, setIsDragActive] = React29.useState(false);
|
|
11757
|
+
const inputRef = React29.useRef(null);
|
|
11758
|
+
const inputId = React29.useId();
|
|
11159
11759
|
function handleDragOver(event) {
|
|
11160
11760
|
event.preventDefault();
|
|
11161
11761
|
setIsDragActive(true);
|
|
@@ -11174,7 +11774,7 @@ function MosaicDocumentUpload({
|
|
|
11174
11774
|
if (selected.length > 0) onFilesSelected(selected);
|
|
11175
11775
|
event.target.value = "";
|
|
11176
11776
|
}
|
|
11177
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "document-upload", className:
|
|
11777
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "document-upload", className: cn75("flex flex-col gap-4", className), children: [
|
|
11178
11778
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11179
11779
|
"div",
|
|
11180
11780
|
{
|
|
@@ -11239,7 +11839,7 @@ function MosaicDocumentUpload({
|
|
|
11239
11839
|
"aria-valuemin": 0,
|
|
11240
11840
|
"aria-valuemax": 100,
|
|
11241
11841
|
"aria-valuenow": file.progress ?? 0,
|
|
11242
|
-
className:
|
|
11842
|
+
className: cn75(documentUploadProgressTrackVariants(), "mt-2"),
|
|
11243
11843
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11244
11844
|
"div",
|
|
11245
11845
|
{
|
|
@@ -11316,7 +11916,7 @@ var urlScraperCardVariants = classVarianceAuthority.cva(["flex flex-col gap-2 ro
|
|
|
11316
11916
|
tone: "neutral"
|
|
11317
11917
|
}
|
|
11318
11918
|
});
|
|
11319
|
-
function
|
|
11919
|
+
function cn76(...classes) {
|
|
11320
11920
|
return classes.filter(Boolean).join(" ");
|
|
11321
11921
|
}
|
|
11322
11922
|
function isSyntacticallyValidUrl(candidate) {
|
|
@@ -11339,7 +11939,7 @@ function MosaicUrlScraper(props) {
|
|
|
11339
11939
|
className,
|
|
11340
11940
|
ref
|
|
11341
11941
|
} = props;
|
|
11342
|
-
const [isLocallyInvalid, setIsLocallyInvalid] =
|
|
11942
|
+
const [isLocallyInvalid, setIsLocallyInvalid] = React29.useState(false);
|
|
11343
11943
|
const isBusy = props.status === "loading" || props.status === "success";
|
|
11344
11944
|
function handleSubmit(event) {
|
|
11345
11945
|
event.preventDefault();
|
|
@@ -11355,7 +11955,7 @@ function MosaicUrlScraper(props) {
|
|
|
11355
11955
|
setIsLocallyInvalid(false);
|
|
11356
11956
|
onUrlChange(event.target.value);
|
|
11357
11957
|
}
|
|
11358
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "url-scraper", className:
|
|
11958
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "url-scraper", className: cn76("flex flex-col gap-4", className), children: [
|
|
11359
11959
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11360
11960
|
"form",
|
|
11361
11961
|
{
|
|
@@ -11491,7 +12091,7 @@ var chatThreadScrollButtonVariants = classVarianceAuthority.cva([
|
|
|
11491
12091
|
"items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm",
|
|
11492
12092
|
"transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
11493
12093
|
]);
|
|
11494
|
-
function
|
|
12094
|
+
function cn77(...classes) {
|
|
11495
12095
|
return classes.filter(Boolean).join(" ");
|
|
11496
12096
|
}
|
|
11497
12097
|
var BOTTOM_THRESHOLD_PX = 24;
|
|
@@ -11505,9 +12105,9 @@ function MosaicChatThread({
|
|
|
11505
12105
|
className,
|
|
11506
12106
|
ref
|
|
11507
12107
|
}) {
|
|
11508
|
-
const containerRef =
|
|
11509
|
-
const isAtBottomRef =
|
|
11510
|
-
const [isAtBottom, setIsAtBottom] =
|
|
12108
|
+
const containerRef = React29.useRef(null);
|
|
12109
|
+
const isAtBottomRef = React29.useRef(true);
|
|
12110
|
+
const [isAtBottom, setIsAtBottom] = React29.useState(true);
|
|
11511
12111
|
function setRefs(node) {
|
|
11512
12112
|
containerRef.current = node;
|
|
11513
12113
|
if (typeof ref === "function") {
|
|
@@ -11539,7 +12139,7 @@ function MosaicChatThread({
|
|
|
11539
12139
|
disengageBottomAnchor();
|
|
11540
12140
|
}
|
|
11541
12141
|
}
|
|
11542
|
-
|
|
12142
|
+
React29.useEffect(() => {
|
|
11543
12143
|
function handleSelectionChange() {
|
|
11544
12144
|
const container = containerRef.current;
|
|
11545
12145
|
if (!container) {
|
|
@@ -11561,7 +12161,7 @@ function MosaicChatThread({
|
|
|
11561
12161
|
document.removeEventListener("selectionchange", handleSelectionChange);
|
|
11562
12162
|
};
|
|
11563
12163
|
}, []);
|
|
11564
|
-
|
|
12164
|
+
React29.useLayoutEffect(() => {
|
|
11565
12165
|
const element = containerRef.current;
|
|
11566
12166
|
if (element && isAtBottomRef.current) {
|
|
11567
12167
|
element.scrollTop = element.scrollHeight;
|
|
@@ -11575,7 +12175,7 @@ function MosaicChatThread({
|
|
|
11575
12175
|
role: "log",
|
|
11576
12176
|
onScroll: handleScroll,
|
|
11577
12177
|
onKeyDown: handleKeyDown,
|
|
11578
|
-
className:
|
|
12178
|
+
className: cn77(chatThreadRootVariants(), className),
|
|
11579
12179
|
children: [
|
|
11580
12180
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "chat-thread-content", className: chatThreadContentVariants(), children }),
|
|
11581
12181
|
!isAtBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11616,7 +12216,7 @@ var chatComposerActionButtonVariants = classVarianceAuthority.cva(
|
|
|
11616
12216
|
}
|
|
11617
12217
|
}
|
|
11618
12218
|
);
|
|
11619
|
-
function
|
|
12219
|
+
function cn78(...classes) {
|
|
11620
12220
|
return classes.filter(Boolean).join(" ");
|
|
11621
12221
|
}
|
|
11622
12222
|
function MosaicChatComposer(props) {
|
|
@@ -11629,9 +12229,9 @@ function MosaicChatComposer(props) {
|
|
|
11629
12229
|
className,
|
|
11630
12230
|
ref
|
|
11631
12231
|
} = props;
|
|
11632
|
-
const textareaRef =
|
|
12232
|
+
const textareaRef = React29.useRef(null);
|
|
11633
12233
|
const trimmedValue = value.trim();
|
|
11634
|
-
|
|
12234
|
+
React29.useEffect(() => {
|
|
11635
12235
|
const textarea = textareaRef.current;
|
|
11636
12236
|
if (!textarea) {
|
|
11637
12237
|
return;
|
|
@@ -11639,7 +12239,7 @@ function MosaicChatComposer(props) {
|
|
|
11639
12239
|
textarea.style.height = "auto";
|
|
11640
12240
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
11641
12241
|
}, [value]);
|
|
11642
|
-
const submitValue =
|
|
12242
|
+
const submitValue = React29.useCallback(() => {
|
|
11643
12243
|
if (props.status !== "idle") {
|
|
11644
12244
|
return;
|
|
11645
12245
|
}
|
|
@@ -11649,14 +12249,14 @@ function MosaicChatComposer(props) {
|
|
|
11649
12249
|
}
|
|
11650
12250
|
props.onSubmit(text);
|
|
11651
12251
|
}, [disabled, props, value]);
|
|
11652
|
-
const handleSubmit =
|
|
12252
|
+
const handleSubmit = React29.useCallback(
|
|
11653
12253
|
(event) => {
|
|
11654
12254
|
event.preventDefault();
|
|
11655
12255
|
submitValue();
|
|
11656
12256
|
},
|
|
11657
12257
|
[submitValue]
|
|
11658
12258
|
);
|
|
11659
|
-
const handleKeyDown =
|
|
12259
|
+
const handleKeyDown = React29.useCallback(
|
|
11660
12260
|
(event) => {
|
|
11661
12261
|
if (event.key === "Enter" && !event.shiftKey) {
|
|
11662
12262
|
event.preventDefault();
|
|
@@ -11671,7 +12271,7 @@ function MosaicChatComposer(props) {
|
|
|
11671
12271
|
{
|
|
11672
12272
|
ref,
|
|
11673
12273
|
"data-slot": "chat-composer",
|
|
11674
|
-
className:
|
|
12274
|
+
className: cn78(chatComposerRootVariants(), className),
|
|
11675
12275
|
onSubmit: handleSubmit,
|
|
11676
12276
|
children: [
|
|
11677
12277
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11787,7 +12387,7 @@ var markdownTableCellVariants = classVarianceAuthority.cva(["border border-borde
|
|
|
11787
12387
|
align: "left"
|
|
11788
12388
|
}
|
|
11789
12389
|
});
|
|
11790
|
-
function
|
|
12390
|
+
function cn79(...classes) {
|
|
11791
12391
|
return classes.filter(Boolean).join(" ");
|
|
11792
12392
|
}
|
|
11793
12393
|
function sanitizeHref(rawHref) {
|
|
@@ -11982,7 +12582,7 @@ function parseBlocks(content) {
|
|
|
11982
12582
|
function MosaicMarkdown({ content, renderCodeBlock, className, ref }) {
|
|
11983
12583
|
const blocks = parseBlocks(content);
|
|
11984
12584
|
const ids = makeIdSource();
|
|
11985
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "markdown", className:
|
|
12585
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "markdown", className: cn79(markdownRootVariants(), className), children: blocks.map((block) => {
|
|
11986
12586
|
if (block.kind === "heading") {
|
|
11987
12587
|
const HeadingTag = `h${block.level}`;
|
|
11988
12588
|
return /* @__PURE__ */ jsxRuntime.jsx(HeadingTag, { className: markdownHeadingVariants({ level: block.level }), children: parseInline(block.text, ids) }, block.id);
|
|
@@ -12060,7 +12660,7 @@ var chatMessageToolStatusVariants = classVarianceAuthority.cva(["text-xs font-me
|
|
|
12060
12660
|
status: "running"
|
|
12061
12661
|
}
|
|
12062
12662
|
});
|
|
12063
|
-
function
|
|
12663
|
+
function cn80(...classes) {
|
|
12064
12664
|
return classes.filter(Boolean).join(" ");
|
|
12065
12665
|
}
|
|
12066
12666
|
function partKey(part, index) {
|
|
@@ -12226,7 +12826,7 @@ function MosaicChatMessage({
|
|
|
12226
12826
|
ref,
|
|
12227
12827
|
"data-slot": "chat-message",
|
|
12228
12828
|
"data-role": messageRole,
|
|
12229
|
-
className:
|
|
12829
|
+
className: cn80(chatMessageContainerVariants({ align: isUser ? "end" : "start" }), className),
|
|
12230
12830
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chatMessageBubbleVariants({ role: messageRole }), children: parts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12231
12831
|
ChatMessagePartView,
|
|
12232
12832
|
{
|
|
@@ -12281,7 +12881,7 @@ var approvalPromptButtonVariants = classVarianceAuthority.cva(
|
|
|
12281
12881
|
}
|
|
12282
12882
|
}
|
|
12283
12883
|
);
|
|
12284
|
-
function
|
|
12884
|
+
function cn81(...classes) {
|
|
12285
12885
|
return classes.filter(Boolean).join(" ");
|
|
12286
12886
|
}
|
|
12287
12887
|
function MosaicApprovalPrompt(props) {
|
|
@@ -12293,7 +12893,7 @@ function MosaicApprovalPrompt(props) {
|
|
|
12293
12893
|
ref,
|
|
12294
12894
|
"data-slot": "approval-prompt",
|
|
12295
12895
|
"aria-label": promptTitle,
|
|
12296
|
-
className:
|
|
12896
|
+
className: cn81("border-0 p-0 m-0", approvalPromptCardVariants({ tone }), className),
|
|
12297
12897
|
children: [
|
|
12298
12898
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { "data-slot": "approval-prompt-title", className: "text-base font-semibold md:text-lg", children: promptTitle }),
|
|
12299
12899
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "approval-prompt-tool", className: "flex flex-col gap-1", children: [
|
|
@@ -12370,7 +12970,7 @@ var toolToggleListRowVariants = classVarianceAuthority.cva(
|
|
|
12370
12970
|
}
|
|
12371
12971
|
}
|
|
12372
12972
|
);
|
|
12373
|
-
function
|
|
12973
|
+
function cn82(...classes) {
|
|
12374
12974
|
return classes.filter(Boolean).join(" ");
|
|
12375
12975
|
}
|
|
12376
12976
|
function MosaicToolToggleList({
|
|
@@ -12386,7 +12986,7 @@ function MosaicToolToggleList({
|
|
|
12386
12986
|
}) {
|
|
12387
12987
|
const toolsById = new Map(tools.map((tool) => [tool.id, tool]));
|
|
12388
12988
|
const approvalLabelById = new Map(approvalLevels.map((level) => [level.id, level.label]));
|
|
12389
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "tool-toggle-list", className:
|
|
12989
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn82("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12390
12990
|
"div",
|
|
12391
12991
|
{
|
|
12392
12992
|
"data-slot": "tool-toggle-list-section",
|
|
@@ -12417,7 +13017,7 @@ function MosaicToolToggleList({
|
|
|
12417
13017
|
onCheckedChange: (checked) => onToggleTool(tool.id, checked),
|
|
12418
13018
|
"aria-label": toggleAriaLabel(tool.name),
|
|
12419
13019
|
"data-slot": "tool-toggle-list-switch",
|
|
12420
|
-
className:
|
|
13020
|
+
className: cn82(
|
|
12421
13021
|
"relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
|
|
12422
13022
|
"rounded-full border-2 border-transparent outline-none",
|
|
12423
13023
|
"bg-muted transition-colors",
|
|
@@ -12428,7 +13028,7 @@ function MosaicToolToggleList({
|
|
|
12428
13028
|
_switch.Switch.Thumb,
|
|
12429
13029
|
{
|
|
12430
13030
|
"data-slot": "tool-toggle-list-switch-thumb",
|
|
12431
|
-
className:
|
|
13031
|
+
className: cn82(
|
|
12432
13032
|
"pointer-events-none block h-4 w-4 rounded-full",
|
|
12433
13033
|
"bg-background shadow-sm",
|
|
12434
13034
|
"translate-x-0 transition-transform",
|
|
@@ -12470,7 +13070,7 @@ function MosaicToolToggleList({
|
|
|
12470
13070
|
{
|
|
12471
13071
|
"aria-label": approvalSelectAriaLabel(tool.name),
|
|
12472
13072
|
"data-slot": "tool-toggle-list-approval-trigger",
|
|
12473
|
-
className:
|
|
13073
|
+
className: cn82(
|
|
12474
13074
|
"inline-flex h-9 min-w-[10rem] items-center justify-between gap-2",
|
|
12475
13075
|
"rounded-md border border-border bg-background px-3 py-2",
|
|
12476
13076
|
"text-sm text-foreground shadow-xs outline-none",
|
|
@@ -12488,7 +13088,7 @@ function MosaicToolToggleList({
|
|
|
12488
13088
|
select.Select.Popup,
|
|
12489
13089
|
{
|
|
12490
13090
|
"data-slot": "tool-toggle-list-approval-popup",
|
|
12491
|
-
className:
|
|
13091
|
+
className: cn82(
|
|
12492
13092
|
"z-50 min-w-[10rem] overflow-hidden rounded-md border border-border",
|
|
12493
13093
|
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
12494
13094
|
"origin-[var(--transform-origin)]",
|
|
@@ -12501,7 +13101,7 @@ function MosaicToolToggleList({
|
|
|
12501
13101
|
select.Select.Item,
|
|
12502
13102
|
{
|
|
12503
13103
|
value: level.id,
|
|
12504
|
-
className:
|
|
13104
|
+
className: cn82(
|
|
12505
13105
|
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
12506
13106
|
"text-sm text-popover-foreground outline-none",
|
|
12507
13107
|
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
@@ -12609,7 +13209,7 @@ var apiKeyPanelMessageVariants = classVarianceAuthority.cva(["text-sm"], {
|
|
|
12609
13209
|
tone: "muted"
|
|
12610
13210
|
}
|
|
12611
13211
|
});
|
|
12612
|
-
function
|
|
13212
|
+
function cn83(...classes) {
|
|
12613
13213
|
return classes.filter(Boolean).join(" ");
|
|
12614
13214
|
}
|
|
12615
13215
|
function MosaicApiKeyPanel(props) {
|
|
@@ -12637,7 +13237,7 @@ function MosaicApiKeyPanel(props) {
|
|
|
12637
13237
|
function handleKeyChange(event) {
|
|
12638
13238
|
onKeyChange(event.target.value);
|
|
12639
13239
|
}
|
|
12640
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "api-key-panel", className:
|
|
13240
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "api-key-panel", className: cn83("flex flex-col gap-3", className), children: [
|
|
12641
13241
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12642
13242
|
"div",
|
|
12643
13243
|
{
|
|
@@ -12732,7 +13332,7 @@ MosaicApiKeyPanel.displayName = "MosaicApiKeyPanel";
|
|
|
12732
13332
|
var agentChatRootVariants = classVarianceAuthority.cva([
|
|
12733
13333
|
"flex min-h-0 w-full flex-1 flex-col gap-2 overflow-hidden rounded-lg border border-border bg-card"
|
|
12734
13334
|
]);
|
|
12735
|
-
function
|
|
13335
|
+
function cn84(...classes) {
|
|
12736
13336
|
return classes.filter(Boolean).join(" ");
|
|
12737
13337
|
}
|
|
12738
13338
|
function formatPayload2(value) {
|
|
@@ -12852,9 +13452,9 @@ function MosaicAgentChat(props) {
|
|
|
12852
13452
|
className,
|
|
12853
13453
|
ref
|
|
12854
13454
|
} = props;
|
|
12855
|
-
const [decisions, setDecisions] =
|
|
12856
|
-
const resumedSessionIdRef =
|
|
12857
|
-
|
|
13455
|
+
const [decisions, setDecisions] = React29.useState({});
|
|
13456
|
+
const resumedSessionIdRef = React29.useRef(void 0);
|
|
13457
|
+
React29.useEffect(() => {
|
|
12858
13458
|
if (!sessionId || !onResumeSession) {
|
|
12859
13459
|
return;
|
|
12860
13460
|
}
|
|
@@ -12868,7 +13468,7 @@ function MosaicAgentChat(props) {
|
|
|
12868
13468
|
setDecisions((previous) => ({ ...previous, [payload.requestId]: decision }));
|
|
12869
13469
|
onApprovalResponse(payload);
|
|
12870
13470
|
}
|
|
12871
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "agent-chat", className:
|
|
13471
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "agent-chat", className: cn84(agentChatRootVariants(), className), children: [
|
|
12872
13472
|
/* @__PURE__ */ jsxRuntime.jsx(MosaicChatThread, { scrollToBottomLabel, children: messages.map((message) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12873
13473
|
MosaicChatMessage,
|
|
12874
13474
|
{
|
|
@@ -12957,7 +13557,7 @@ var toastProviderPositionVariants = classVarianceAuthority.cva(
|
|
|
12957
13557
|
}
|
|
12958
13558
|
}
|
|
12959
13559
|
);
|
|
12960
|
-
function
|
|
13560
|
+
function cn85(...classes) {
|
|
12961
13561
|
return classes.filter(Boolean).join(" ");
|
|
12962
13562
|
}
|
|
12963
13563
|
function MosaicToast({
|
|
@@ -12971,7 +13571,7 @@ function MosaicToast({
|
|
|
12971
13571
|
className,
|
|
12972
13572
|
ref
|
|
12973
13573
|
}) {
|
|
12974
|
-
|
|
13574
|
+
React29.useEffect(() => {
|
|
12975
13575
|
if (durationMs === void 0) return;
|
|
12976
13576
|
const timer = setTimeout(onDismiss, durationMs);
|
|
12977
13577
|
return () => clearTimeout(timer);
|
|
@@ -12983,7 +13583,7 @@ function MosaicToast({
|
|
|
12983
13583
|
ref,
|
|
12984
13584
|
"data-slot": "toast",
|
|
12985
13585
|
role,
|
|
12986
|
-
className:
|
|
13586
|
+
className: cn85(toastCardVariants({ variant }), className),
|
|
12987
13587
|
children: [
|
|
12988
13588
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "toast-body", className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
12989
13589
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "toast-title", className: toastTitleVariants({ variant }), children: title }),
|
|
@@ -13023,7 +13623,7 @@ function MosaicToast({
|
|
|
13023
13623
|
);
|
|
13024
13624
|
}
|
|
13025
13625
|
MosaicToast.displayName = "MosaicToast";
|
|
13026
|
-
function
|
|
13626
|
+
function cn86(...classes) {
|
|
13027
13627
|
return classes.filter(Boolean).join(" ");
|
|
13028
13628
|
}
|
|
13029
13629
|
function MosaicToastProvider({
|
|
@@ -13037,7 +13637,7 @@ function MosaicToastProvider({
|
|
|
13037
13637
|
{
|
|
13038
13638
|
ref,
|
|
13039
13639
|
"data-slot": "toast-provider",
|
|
13040
|
-
className:
|
|
13640
|
+
className: cn86(toastProviderPositionVariants({ position }), className),
|
|
13041
13641
|
children
|
|
13042
13642
|
}
|
|
13043
13643
|
);
|
|
@@ -13064,7 +13664,7 @@ var pdfViewerToolbarButtonVariants = classVarianceAuthority.cva([
|
|
|
13064
13664
|
"inline-flex min-h-8 min-w-8 items-center justify-center rounded-md border border-border text-sm",
|
|
13065
13665
|
"transition-colors hover:bg-accent/50 disabled:opacity-50 disabled:hover:bg-transparent"
|
|
13066
13666
|
]);
|
|
13067
|
-
function
|
|
13667
|
+
function cn87(...classes) {
|
|
13068
13668
|
return classes.filter(Boolean).join(" ");
|
|
13069
13669
|
}
|
|
13070
13670
|
function buildFrameSrc(fileUrl, currentPage, zoom) {
|
|
@@ -13087,14 +13687,14 @@ function MosaicPdfViewer({
|
|
|
13087
13687
|
className,
|
|
13088
13688
|
ref
|
|
13089
13689
|
}) {
|
|
13090
|
-
const [status, setStatus] =
|
|
13091
|
-
const [trackedFileUrl, setTrackedFileUrl] =
|
|
13092
|
-
const frameRef =
|
|
13690
|
+
const [status, setStatus] = React29.useState("loading");
|
|
13691
|
+
const [trackedFileUrl, setTrackedFileUrl] = React29.useState(fileUrl);
|
|
13692
|
+
const frameRef = React29.useRef(null);
|
|
13093
13693
|
if (fileUrl !== trackedFileUrl) {
|
|
13094
13694
|
setTrackedFileUrl(fileUrl);
|
|
13095
13695
|
setStatus("loading");
|
|
13096
13696
|
}
|
|
13097
|
-
|
|
13697
|
+
React29.useEffect(() => {
|
|
13098
13698
|
const node = frameRef.current;
|
|
13099
13699
|
if (!node) return;
|
|
13100
13700
|
function handleLoad() {
|
|
@@ -13129,7 +13729,7 @@ function MosaicPdfViewer({
|
|
|
13129
13729
|
if (zoom === void 0 || onZoomChange === void 0) return;
|
|
13130
13730
|
onZoomChange(Math.round((zoom + 0.1) * 100) / 100);
|
|
13131
13731
|
}
|
|
13132
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "pdf-viewer", className:
|
|
13732
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "pdf-viewer", className: cn87("flex flex-col gap-2", className), children: [
|
|
13133
13733
|
(showPageControls || showZoomControls) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13134
13734
|
"div",
|
|
13135
13735
|
{
|
|
@@ -13218,7 +13818,7 @@ function MosaicPdfViewer({
|
|
|
13218
13818
|
"data-slot": "pdf-viewer-frame",
|
|
13219
13819
|
src: buildFrameSrc(fileUrl, currentPage, zoom),
|
|
13220
13820
|
title: fileUrl,
|
|
13221
|
-
className:
|
|
13821
|
+
className: cn87(
|
|
13222
13822
|
"h-full min-h-64 w-full border-0",
|
|
13223
13823
|
status !== "loaded" && "pointer-events-none absolute inset-0 opacity-0"
|
|
13224
13824
|
)
|
|
@@ -13237,7 +13837,7 @@ var splitPaneCollapseButtonVariants = classVarianceAuthority.cva([
|
|
|
13237
13837
|
"inline-flex h-11 w-6 shrink-0 items-center justify-center self-center rounded-md border border-border text-sm",
|
|
13238
13838
|
"transition-colors hover:bg-accent/50"
|
|
13239
13839
|
]);
|
|
13240
|
-
function
|
|
13840
|
+
function cn88(...classes) {
|
|
13241
13841
|
return classes.filter(Boolean).join(" ");
|
|
13242
13842
|
}
|
|
13243
13843
|
function mergeRefs(externalRef, node) {
|
|
@@ -13266,9 +13866,9 @@ function MosaicResizableSplitPane({
|
|
|
13266
13866
|
className,
|
|
13267
13867
|
ref
|
|
13268
13868
|
}) {
|
|
13269
|
-
const rootRef =
|
|
13270
|
-
const isDraggingRef =
|
|
13271
|
-
|
|
13869
|
+
const rootRef = React29.useRef(null);
|
|
13870
|
+
const isDraggingRef = React29.useRef(false);
|
|
13871
|
+
React29.useEffect(() => {
|
|
13272
13872
|
function handlePointerMove(event) {
|
|
13273
13873
|
if (!isDraggingRef.current) return;
|
|
13274
13874
|
const rootNode = rootRef.current;
|
|
@@ -13310,7 +13910,7 @@ function MosaicResizableSplitPane({
|
|
|
13310
13910
|
mergeRefs(ref, node);
|
|
13311
13911
|
},
|
|
13312
13912
|
"data-slot": "resizable-split-pane",
|
|
13313
|
-
className:
|
|
13913
|
+
className: cn88(splitPaneRootVariants(), className),
|
|
13314
13914
|
children: [
|
|
13315
13915
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "resizable-split-pane-main", className: "min-h-0 min-w-0 flex-1 overflow-auto", children: main }),
|
|
13316
13916
|
!isSideCollapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -13377,7 +13977,7 @@ var tagInputFieldVariants = classVarianceAuthority.cva([
|
|
|
13377
13977
|
"min-w-[6ch] flex-1 border-none bg-transparent px-1 py-0.5 text-sm text-foreground outline-none",
|
|
13378
13978
|
"placeholder:text-muted-foreground"
|
|
13379
13979
|
]);
|
|
13380
|
-
function
|
|
13980
|
+
function cn89(...classes) {
|
|
13381
13981
|
return classes.filter(Boolean).join(" ");
|
|
13382
13982
|
}
|
|
13383
13983
|
function mergeRefs2(externalRef, node) {
|
|
@@ -13398,12 +13998,12 @@ function MosaicTagInput({
|
|
|
13398
13998
|
className,
|
|
13399
13999
|
ref
|
|
13400
14000
|
}) {
|
|
13401
|
-
const [inputValue, setInputValue] =
|
|
13402
|
-
const inputRef =
|
|
14001
|
+
const [inputValue, setInputValue] = React29.useState("");
|
|
14002
|
+
const inputRef = React29.useRef(null);
|
|
13403
14003
|
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
13404
14004
|
const isMaxReached = maxTags !== void 0 && tags.length >= maxTags;
|
|
13405
14005
|
const trimmedValue = inputValue.trim();
|
|
13406
|
-
const filteredSuggestions =
|
|
14006
|
+
const filteredSuggestions = React29.useMemo(() => {
|
|
13407
14007
|
if (!suggestions || trimmedValue.length === 0) return [];
|
|
13408
14008
|
return suggestions.filter(
|
|
13409
14009
|
(suggestion) => !tags.includes(suggestion) && filter.contains(suggestion, trimmedValue)
|
|
@@ -13428,7 +14028,7 @@ function MosaicTagInput({
|
|
|
13428
14028
|
if (lastTag !== void 0) onRemoveTag(lastTag);
|
|
13429
14029
|
}
|
|
13430
14030
|
}
|
|
13431
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "tag-input", className:
|
|
14031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "tag-input", className: cn89(tagInputRootVariants(), className), children: [
|
|
13432
14032
|
tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-slot": "tag-input-tag", className: tagInputTagVariants(), children: [
|
|
13433
14033
|
tag,
|
|
13434
14034
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13465,7 +14065,7 @@ function MosaicTagInput({
|
|
|
13465
14065
|
"ul",
|
|
13466
14066
|
{
|
|
13467
14067
|
"data-slot": "tag-input-suggestions",
|
|
13468
|
-
className:
|
|
14068
|
+
className: cn89(
|
|
13469
14069
|
"z-50 mt-1 w-full min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
13470
14070
|
"bg-popover p-1 text-sm text-popover-foreground shadow-md"
|
|
13471
14071
|
),
|
|
@@ -13484,6 +14084,150 @@ function MosaicTagInput({
|
|
|
13484
14084
|
] });
|
|
13485
14085
|
}
|
|
13486
14086
|
MosaicTagInput.displayName = "MosaicTagInput";
|
|
14087
|
+
var drawerPopupVariants = classVarianceAuthority.cva(
|
|
14088
|
+
[
|
|
14089
|
+
"fixed z-50 flex flex-col bg-background shadow-xl outline-none",
|
|
14090
|
+
"transition-transform duration-200 ease-out",
|
|
14091
|
+
"data-[ending-style]:transition-none"
|
|
14092
|
+
],
|
|
14093
|
+
{
|
|
14094
|
+
variants: {
|
|
14095
|
+
side: {
|
|
14096
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l border-border sm:max-w-sm",
|
|
14097
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r border-border sm:max-w-sm",
|
|
14098
|
+
top: "inset-x-0 top-0 max-h-[80vh] w-full border-b border-border",
|
|
14099
|
+
bottom: "inset-x-0 bottom-0 max-h-[80vh] w-full border-t border-border"
|
|
14100
|
+
}
|
|
14101
|
+
},
|
|
14102
|
+
defaultVariants: {
|
|
14103
|
+
side: "right"
|
|
14104
|
+
}
|
|
14105
|
+
}
|
|
14106
|
+
);
|
|
14107
|
+
var drawerBackdropVariants = classVarianceAuthority.cva(["fixed inset-0 z-50 bg-black/50"]);
|
|
14108
|
+
function cn90(...classes) {
|
|
14109
|
+
return classes.filter(Boolean).join(" ");
|
|
14110
|
+
}
|
|
14111
|
+
function MosaicDrawer({
|
|
14112
|
+
open,
|
|
14113
|
+
onOpenChange,
|
|
14114
|
+
title,
|
|
14115
|
+
closeAriaLabel,
|
|
14116
|
+
children,
|
|
14117
|
+
side = "right",
|
|
14118
|
+
className
|
|
14119
|
+
}) {
|
|
14120
|
+
const titleId = React29__namespace.useId();
|
|
14121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { open, onOpenChange: (nextOpen) => onOpenChange(nextOpen), modal: true, children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
|
|
14122
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Backdrop, { "data-slot": "drawer-backdrop", className: drawerBackdropVariants() }),
|
|
14123
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14124
|
+
dialog.Dialog.Popup,
|
|
14125
|
+
{
|
|
14126
|
+
"data-slot": "drawer",
|
|
14127
|
+
"aria-labelledby": titleId,
|
|
14128
|
+
"aria-modal": "true",
|
|
14129
|
+
className: cn90(drawerPopupVariants({ side }), className),
|
|
14130
|
+
children: [
|
|
14131
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14132
|
+
"div",
|
|
14133
|
+
{
|
|
14134
|
+
"data-slot": "drawer-header",
|
|
14135
|
+
className: "flex items-center justify-between gap-4 border-b border-border p-4",
|
|
14136
|
+
children: [
|
|
14137
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { id: titleId, className: "text-base font-semibold text-foreground", children: title }),
|
|
14138
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14139
|
+
dialog.Dialog.Close,
|
|
14140
|
+
{
|
|
14141
|
+
"aria-label": closeAriaLabel,
|
|
14142
|
+
className: cn90(
|
|
14143
|
+
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
|
|
14144
|
+
"hover:bg-muted hover:text-foreground",
|
|
14145
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
14146
|
+
),
|
|
14147
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14148
|
+
"svg",
|
|
14149
|
+
{
|
|
14150
|
+
width: "16",
|
|
14151
|
+
height: "16",
|
|
14152
|
+
viewBox: "0 0 24 24",
|
|
14153
|
+
fill: "none",
|
|
14154
|
+
stroke: "currentColor",
|
|
14155
|
+
strokeWidth: "2",
|
|
14156
|
+
strokeLinecap: "round",
|
|
14157
|
+
strokeLinejoin: "round",
|
|
14158
|
+
"aria-hidden": "true",
|
|
14159
|
+
children: [
|
|
14160
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
14161
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
14162
|
+
]
|
|
14163
|
+
}
|
|
14164
|
+
)
|
|
14165
|
+
}
|
|
14166
|
+
)
|
|
14167
|
+
]
|
|
14168
|
+
}
|
|
14169
|
+
),
|
|
14170
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", children })
|
|
14171
|
+
]
|
|
14172
|
+
}
|
|
14173
|
+
)
|
|
14174
|
+
] }) });
|
|
14175
|
+
}
|
|
14176
|
+
MosaicDrawer.displayName = "MosaicDrawer";
|
|
14177
|
+
var templateCategoryChipVariants = classVarianceAuthority.cva(
|
|
14178
|
+
[
|
|
14179
|
+
"inline-flex items-center justify-center whitespace-nowrap",
|
|
14180
|
+
"rounded-full border px-3 py-1.5",
|
|
14181
|
+
"text-xs font-medium transition-colors",
|
|
14182
|
+
"focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-[3px]"
|
|
14183
|
+
],
|
|
14184
|
+
{
|
|
14185
|
+
variants: {
|
|
14186
|
+
selected: {
|
|
14187
|
+
true: "border-transparent bg-primary text-primary-foreground",
|
|
14188
|
+
false: "border-border bg-background text-foreground hover:bg-muted"
|
|
14189
|
+
}
|
|
14190
|
+
},
|
|
14191
|
+
defaultVariants: {
|
|
14192
|
+
selected: false
|
|
14193
|
+
}
|
|
14194
|
+
}
|
|
14195
|
+
);
|
|
14196
|
+
function cn91(...classes) {
|
|
14197
|
+
return classes.filter(Boolean).join(" ");
|
|
14198
|
+
}
|
|
14199
|
+
function MosaicTemplateCategoryChips({
|
|
14200
|
+
categories,
|
|
14201
|
+
selected,
|
|
14202
|
+
onSelect,
|
|
14203
|
+
className,
|
|
14204
|
+
ref
|
|
14205
|
+
}) {
|
|
14206
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14207
|
+
"div",
|
|
14208
|
+
{
|
|
14209
|
+
ref,
|
|
14210
|
+
"data-slot": "template-category-chips",
|
|
14211
|
+
className: cn91("flex flex-wrap items-center gap-2", className),
|
|
14212
|
+
children: categories.map((category) => {
|
|
14213
|
+
const isSelected = category.id === selected;
|
|
14214
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14215
|
+
"button",
|
|
14216
|
+
{
|
|
14217
|
+
type: "button",
|
|
14218
|
+
"data-slot": "template-category-chip",
|
|
14219
|
+
"aria-pressed": isSelected,
|
|
14220
|
+
onClick: () => onSelect(category.id),
|
|
14221
|
+
className: templateCategoryChipVariants({ selected: isSelected }),
|
|
14222
|
+
children: category.label
|
|
14223
|
+
},
|
|
14224
|
+
category.id
|
|
14225
|
+
);
|
|
14226
|
+
})
|
|
14227
|
+
}
|
|
14228
|
+
);
|
|
14229
|
+
}
|
|
14230
|
+
MosaicTemplateCategoryChips.displayName = "MosaicTemplateCategoryChips";
|
|
13487
14231
|
|
|
13488
14232
|
Object.defineProperty(exports, "Accordion", {
|
|
13489
14233
|
enumerable: true,
|
|
@@ -13507,10 +14251,23 @@ exports.MosaicAgentChat = MosaicAgentChat;
|
|
|
13507
14251
|
exports.MosaicAgentComposer = MosaicAgentComposer;
|
|
13508
14252
|
exports.MosaicAgentComposerDesktop = MosaicAgentComposerDesktop;
|
|
13509
14253
|
exports.MosaicAgentComposerMobile = MosaicAgentComposerMobile;
|
|
14254
|
+
exports.MosaicAgentEditor = MosaicAgentEditor;
|
|
13510
14255
|
exports.MosaicAgentList = MosaicAgentList;
|
|
13511
14256
|
exports.MosaicAgentListDesktop = AgentListDesktop;
|
|
13512
14257
|
exports.MosaicAgentListMobile = AgentListMobile;
|
|
14258
|
+
exports.MosaicAgentPreview = MosaicAgentPreview;
|
|
13513
14259
|
exports.MosaicAgentTeamPreview = MosaicAgentTeamPreview;
|
|
14260
|
+
exports.MosaicAlertDialog = MosaicAlertDialog;
|
|
14261
|
+
exports.MosaicAlertDialogAction = MosaicAlertDialogAction;
|
|
14262
|
+
exports.MosaicAlertDialogCancel = MosaicAlertDialogCancel;
|
|
14263
|
+
exports.MosaicAlertDialogContent = MosaicAlertDialogContent;
|
|
14264
|
+
exports.MosaicAlertDialogDescription = MosaicAlertDialogDescription;
|
|
14265
|
+
exports.MosaicAlertDialogFooter = MosaicAlertDialogFooter;
|
|
14266
|
+
exports.MosaicAlertDialogHeader = MosaicAlertDialogHeader;
|
|
14267
|
+
exports.MosaicAlertDialogOverlay = MosaicAlertDialogOverlay;
|
|
14268
|
+
exports.MosaicAlertDialogPortal = MosaicAlertDialogPortal;
|
|
14269
|
+
exports.MosaicAlertDialogTitle = MosaicAlertDialogTitle;
|
|
14270
|
+
exports.MosaicAlertDialogTrigger = MosaicAlertDialogTrigger;
|
|
13514
14271
|
exports.MosaicAnimatedList = MosaicAnimatedList;
|
|
13515
14272
|
exports.MosaicApiKeyPanel = MosaicApiKeyPanel;
|
|
13516
14273
|
exports.MosaicAppSidebar = MosaicAppSidebar;
|
|
@@ -13544,6 +14301,7 @@ exports.MosaicDataTable = MosaicDataTable;
|
|
|
13544
14301
|
exports.MosaicDeleteConfirmationDialog = MosaicDeleteConfirmationDialog;
|
|
13545
14302
|
exports.MosaicDeviceProvider = MosaicDeviceProvider;
|
|
13546
14303
|
exports.MosaicDocumentUpload = MosaicDocumentUpload;
|
|
14304
|
+
exports.MosaicDrawer = MosaicDrawer;
|
|
13547
14305
|
exports.MosaicDropdownMenu = MosaicDropdownMenu;
|
|
13548
14306
|
exports.MosaicEmptyState = MosaicEmptyState;
|
|
13549
14307
|
exports.MosaicFallingPattern = MosaicFallingPattern;
|
|
@@ -13576,6 +14334,7 @@ exports.MosaicMessageCard = MosaicMessageCard;
|
|
|
13576
14334
|
exports.MosaicMessageList = MosaicMessageList;
|
|
13577
14335
|
exports.MosaicMessageListDesktop = MessageListDesktop;
|
|
13578
14336
|
exports.MosaicMessageListMobile = MessageListMobile;
|
|
14337
|
+
exports.MosaicModelSelector = MosaicModelSelector;
|
|
13579
14338
|
exports.MosaicModuleCard = MosaicModuleCard;
|
|
13580
14339
|
exports.MosaicModuleForm = MosaicModuleForm;
|
|
13581
14340
|
exports.MosaicModuleLibrary = MosaicModuleLibrary;
|
|
@@ -13614,7 +14373,9 @@ exports.MosaicTabsList = MosaicTabsList;
|
|
|
13614
14373
|
exports.MosaicTabsPanel = MosaicTabsPanel;
|
|
13615
14374
|
exports.MosaicTabsTrigger = MosaicTabsTrigger;
|
|
13616
14375
|
exports.MosaicTagInput = MosaicTagInput;
|
|
14376
|
+
exports.MosaicTemplateAgentCard = MosaicTemplateAgentCard;
|
|
13617
14377
|
exports.MosaicTemplateCard = MosaicTemplateCard;
|
|
14378
|
+
exports.MosaicTemplateCategoryChips = MosaicTemplateCategoryChips;
|
|
13618
14379
|
exports.MosaicTemplateGallery = MosaicTemplateGallery;
|
|
13619
14380
|
exports.MosaicTemplatePreview = MosaicTemplatePreview;
|
|
13620
14381
|
exports.MosaicTestimonialsGrid = MosaicTestimonialsGrid;
|
|
@@ -13633,11 +14394,17 @@ exports.MosaicUrlScraper = MosaicUrlScraper;
|
|
|
13633
14394
|
exports.MosaicUserButton = MosaicUserButton;
|
|
13634
14395
|
exports.Placeholder = Placeholder;
|
|
13635
14396
|
exports.agentChatRootVariants = agentChatRootVariants;
|
|
14397
|
+
exports.agentEditorVariants = agentEditorVariants;
|
|
14398
|
+
exports.agentPreviewVariants = agentPreviewVariants;
|
|
14399
|
+
exports.alertDialogContentVariants = alertDialogContentVariants;
|
|
14400
|
+
exports.alertDialogOverlayVariants = alertDialogOverlayVariants;
|
|
13636
14401
|
exports.badgeVariants = badgeVariants;
|
|
13637
14402
|
exports.buttonVariants = buttonVariants;
|
|
13638
14403
|
exports.chatMessageBubbleVariants = chatMessageBubbleVariants;
|
|
13639
14404
|
exports.chatMessageContainerVariants = chatMessageContainerVariants;
|
|
13640
14405
|
exports.chatMessageToolStatusVariants = chatMessageToolStatusVariants;
|
|
14406
|
+
exports.drawerBackdropVariants = drawerBackdropVariants;
|
|
14407
|
+
exports.drawerPopupVariants = drawerPopupVariants;
|
|
13641
14408
|
exports.pdfViewerFrameVariants = pdfViewerFrameVariants;
|
|
13642
14409
|
exports.pdfViewerStatusVariants = pdfViewerStatusVariants;
|
|
13643
14410
|
exports.pdfViewerToolbarButtonVariants = pdfViewerToolbarButtonVariants;
|
|
@@ -13649,6 +14416,10 @@ exports.tagInputFieldVariants = tagInputFieldVariants;
|
|
|
13649
14416
|
exports.tagInputRemoveButtonVariants = tagInputRemoveButtonVariants;
|
|
13650
14417
|
exports.tagInputRootVariants = tagInputRootVariants;
|
|
13651
14418
|
exports.tagInputTagVariants = tagInputTagVariants;
|
|
14419
|
+
exports.templateAgentCardBadgeVariants = templateAgentCardBadgeVariants;
|
|
14420
|
+
exports.templateAgentCardTagVariants = templateAgentCardTagVariants;
|
|
14421
|
+
exports.templateAgentCardVariants = templateAgentCardVariants;
|
|
14422
|
+
exports.templateCategoryChipVariants = templateCategoryChipVariants;
|
|
13652
14423
|
exports.toastCardVariants = toastCardVariants;
|
|
13653
14424
|
exports.toastDismissButtonVariants = toastDismissButtonVariants;
|
|
13654
14425
|
exports.toastProviderPositionVariants = toastProviderPositionVariants;
|