@lukeashford/aurelius 4.10.1 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +94 -8
- package/dist/index.d.ts +94 -8
- package/dist/index.js +759 -694
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +580 -516
- package/dist/index.mjs.map +1 -1
- package/dist/styles/deliverable.css +13 -0
- package/llms.md +21 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2440,8 +2440,45 @@ var Progress = React30.forwardRef(
|
|
|
2440
2440
|
);
|
|
2441
2441
|
Progress.displayName = "Progress";
|
|
2442
2442
|
|
|
2443
|
+
// src/components/BusyOverlay.tsx
|
|
2444
|
+
import React31 from "react";
|
|
2445
|
+
var blurClass = {
|
|
2446
|
+
sm: "backdrop-blur-sm",
|
|
2447
|
+
md: "backdrop-blur-md",
|
|
2448
|
+
lg: "backdrop-blur-lg"
|
|
2449
|
+
};
|
|
2450
|
+
var toneClass = {
|
|
2451
|
+
dim: "bg-obsidian/40",
|
|
2452
|
+
frost: "bg-obsidian/80"
|
|
2453
|
+
};
|
|
2454
|
+
function BusyOverlay({
|
|
2455
|
+
label,
|
|
2456
|
+
blurStrength = "sm",
|
|
2457
|
+
tone = "dim",
|
|
2458
|
+
className,
|
|
2459
|
+
...rest
|
|
2460
|
+
}) {
|
|
2461
|
+
return /* @__PURE__ */ React31.createElement(
|
|
2462
|
+
"div",
|
|
2463
|
+
{
|
|
2464
|
+
role: "status",
|
|
2465
|
+
"aria-live": "polite",
|
|
2466
|
+
"aria-busy": "true",
|
|
2467
|
+
className: cx(
|
|
2468
|
+
"absolute inset-0 z-10 flex items-center justify-center",
|
|
2469
|
+
toneClass[tone],
|
|
2470
|
+
blurClass[blurStrength],
|
|
2471
|
+
className
|
|
2472
|
+
),
|
|
2473
|
+
...rest
|
|
2474
|
+
},
|
|
2475
|
+
/* @__PURE__ */ React31.createElement("div", { className: "flex items-center gap-2 text-white text-sm font-medium" }, /* @__PURE__ */ React31.createElement(Spinner, { size: "sm" }), label && /* @__PURE__ */ React31.createElement("span", null, label))
|
|
2476
|
+
);
|
|
2477
|
+
}
|
|
2478
|
+
BusyOverlay.displayName = "BusyOverlay";
|
|
2479
|
+
|
|
2443
2480
|
// src/components/Toast.tsx
|
|
2444
|
-
import
|
|
2481
|
+
import React32, { createContext as createContext2, useCallback as useCallback7, useContext as useContext2, useEffect as useEffect3, useState as useState7 } from "react";
|
|
2445
2482
|
import { createPortal } from "react-dom";
|
|
2446
2483
|
import { AlertCircle, AlertTriangle as AlertTriangle2, CheckCircle as CheckCircle2, Info as Info2, X as X3 } from "lucide-react";
|
|
2447
2484
|
var toastCounter = 0;
|
|
@@ -2492,7 +2529,7 @@ var ToastProvider = ({
|
|
|
2492
2529
|
const removeToast = useCallback7((id) => {
|
|
2493
2530
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
2494
2531
|
}, []);
|
|
2495
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ React32.createElement(ToastContext.Provider, { value: { toasts, addToast, removeToast, position } }, children, mounted && /* @__PURE__ */ React32.createElement(ToastViewport, null));
|
|
2496
2533
|
};
|
|
2497
2534
|
ToastProvider.displayName = "ToastProvider";
|
|
2498
2535
|
var POSITION_CLASSES = {
|
|
@@ -2510,7 +2547,7 @@ var ToastViewport = () => {
|
|
|
2510
2547
|
}
|
|
2511
2548
|
const { toasts, position } = context;
|
|
2512
2549
|
return createPortal(
|
|
2513
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ React32.createElement(
|
|
2514
2551
|
"div",
|
|
2515
2552
|
{
|
|
2516
2553
|
className: cx(
|
|
@@ -2518,7 +2555,7 @@ var ToastViewport = () => {
|
|
|
2518
2555
|
POSITION_CLASSES[position]
|
|
2519
2556
|
)
|
|
2520
2557
|
},
|
|
2521
|
-
toasts.map((toast) => /* @__PURE__ */
|
|
2558
|
+
toasts.map((toast) => /* @__PURE__ */ React32.createElement(Toast, { key: toast.id, ...toast }))
|
|
2522
2559
|
),
|
|
2523
2560
|
document.body
|
|
2524
2561
|
);
|
|
@@ -2532,10 +2569,10 @@ var VARIANT_STYLES2 = {
|
|
|
2532
2569
|
};
|
|
2533
2570
|
var VARIANT_ICONS = {
|
|
2534
2571
|
default: null,
|
|
2535
|
-
success: /* @__PURE__ */
|
|
2536
|
-
error: /* @__PURE__ */
|
|
2537
|
-
warning: /* @__PURE__ */
|
|
2538
|
-
info: /* @__PURE__ */
|
|
2572
|
+
success: /* @__PURE__ */ React32.createElement(CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
2573
|
+
error: /* @__PURE__ */ React32.createElement(AlertCircle, { className: "h-5 w-5 text-error" }),
|
|
2574
|
+
warning: /* @__PURE__ */ React32.createElement(AlertTriangle2, { className: "h-5 w-5 text-warning" }),
|
|
2575
|
+
info: /* @__PURE__ */ React32.createElement(Info2, { className: "h-5 w-5 text-info" })
|
|
2539
2576
|
};
|
|
2540
2577
|
var Toast = ({
|
|
2541
2578
|
id,
|
|
@@ -2555,7 +2592,7 @@ var Toast = ({
|
|
|
2555
2592
|
}
|
|
2556
2593
|
}, [id, duration, context]);
|
|
2557
2594
|
const icon = VARIANT_ICONS[variant];
|
|
2558
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ React32.createElement(
|
|
2559
2596
|
"div",
|
|
2560
2597
|
{
|
|
2561
2598
|
role: "alert",
|
|
@@ -2564,21 +2601,21 @@ var Toast = ({
|
|
|
2564
2601
|
VARIANT_STYLES2[variant]
|
|
2565
2602
|
)
|
|
2566
2603
|
},
|
|
2567
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ React32.createElement("div", { className: "flex gap-3" }, icon && /* @__PURE__ */ React32.createElement("div", { className: "shrink-0 mt-0.5" }, icon), /* @__PURE__ */ React32.createElement("div", { className: "flex-1 min-w-0" }, title && /* @__PURE__ */ React32.createElement("p", { className: "text-sm font-medium text-white" }, title), description && /* @__PURE__ */ React32.createElement("p", { className: "text-sm text-silver mt-1" }, description), action && /* @__PURE__ */ React32.createElement("div", { className: "mt-3" }, action)), /* @__PURE__ */ React32.createElement(
|
|
2568
2605
|
"button",
|
|
2569
2606
|
{
|
|
2570
2607
|
onClick: () => context?.removeToast(id),
|
|
2571
2608
|
className: "shrink-0 text-silver hover:text-white transition-colors"
|
|
2572
2609
|
},
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ React32.createElement(X3, { className: "h-4 w-4" }),
|
|
2611
|
+
/* @__PURE__ */ React32.createElement("span", { className: "sr-only" }, "Dismiss")
|
|
2575
2612
|
))
|
|
2576
2613
|
);
|
|
2577
2614
|
};
|
|
2578
2615
|
Toast.displayName = "Toast";
|
|
2579
2616
|
|
|
2580
2617
|
// src/components/Modal.tsx
|
|
2581
|
-
import
|
|
2618
|
+
import React33, { useEffect as useEffect4, useState as useState8 } from "react";
|
|
2582
2619
|
import { createPortal as createPortal2 } from "react-dom";
|
|
2583
2620
|
import { X as X4 } from "lucide-react";
|
|
2584
2621
|
var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
@@ -2591,14 +2628,14 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
2591
2628
|
if (!mounted || !isOpen) {
|
|
2592
2629
|
return null;
|
|
2593
2630
|
}
|
|
2594
|
-
const content = /* @__PURE__ */
|
|
2631
|
+
const content = /* @__PURE__ */ React33.createElement(
|
|
2595
2632
|
"div",
|
|
2596
2633
|
{
|
|
2597
2634
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",
|
|
2598
2635
|
onClick: onClose
|
|
2599
2636
|
},
|
|
2600
|
-
/* @__PURE__ */
|
|
2601
|
-
/* @__PURE__ */
|
|
2637
|
+
/* @__PURE__ */ React33.createElement("div", { className: "fixed inset-0 z-40 bg-obsidian/80 backdrop-blur-sm", "aria-hidden": "true" }),
|
|
2638
|
+
/* @__PURE__ */ React33.createElement(
|
|
2602
2639
|
"div",
|
|
2603
2640
|
{
|
|
2604
2641
|
role: "dialog",
|
|
@@ -2610,16 +2647,16 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
2610
2647
|
"data-state": "open",
|
|
2611
2648
|
onClick: (e) => e.stopPropagation()
|
|
2612
2649
|
},
|
|
2613
|
-
/* @__PURE__ */
|
|
2650
|
+
/* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between mb-2" }, title ? /* @__PURE__ */ React33.createElement("h3", { className: "text-xl font-semibold text-white m-0" }, title) : /* @__PURE__ */ React33.createElement("div", null), /* @__PURE__ */ React33.createElement(
|
|
2614
2651
|
"button",
|
|
2615
2652
|
{
|
|
2616
2653
|
onClick: onClose,
|
|
2617
2654
|
className: "text-silver hover:text-white transition-colors ml-auto"
|
|
2618
2655
|
},
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
/* @__PURE__ */
|
|
2656
|
+
/* @__PURE__ */ React33.createElement(X4, { className: "h-5 w-5" }),
|
|
2657
|
+
/* @__PURE__ */ React33.createElement("span", { className: "sr-only" }, "Close")
|
|
2621
2658
|
)),
|
|
2622
|
-
/* @__PURE__ */
|
|
2659
|
+
/* @__PURE__ */ React33.createElement("div", { className: "overflow-y-auto min-h-0" }, children)
|
|
2623
2660
|
)
|
|
2624
2661
|
);
|
|
2625
2662
|
return createPortal2(content, document.body);
|
|
@@ -2627,12 +2664,12 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
2627
2664
|
Modal.displayName = "Modal";
|
|
2628
2665
|
|
|
2629
2666
|
// src/components/Lightbox.tsx
|
|
2630
|
-
import
|
|
2667
|
+
import React47, { useCallback as useCallback8 } from "react";
|
|
2631
2668
|
|
|
2632
2669
|
// src/components/icons/ChatBubbleIcon.tsx
|
|
2633
|
-
import
|
|
2670
|
+
import React34 from "react";
|
|
2634
2671
|
function ChatBubbleIcon({ className, ...props }) {
|
|
2635
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ React34.createElement(
|
|
2636
2673
|
"svg",
|
|
2637
2674
|
{
|
|
2638
2675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2641,7 +2678,7 @@ function ChatBubbleIcon({ className, ...props }) {
|
|
|
2641
2678
|
className,
|
|
2642
2679
|
...props
|
|
2643
2680
|
},
|
|
2644
|
-
/* @__PURE__ */
|
|
2681
|
+
/* @__PURE__ */ React34.createElement(
|
|
2645
2682
|
"path",
|
|
2646
2683
|
{
|
|
2647
2684
|
d: "M2 3h16v11H6l-4 3V3z"
|
|
@@ -2651,9 +2688,9 @@ function ChatBubbleIcon({ className, ...props }) {
|
|
|
2651
2688
|
}
|
|
2652
2689
|
|
|
2653
2690
|
// src/components/icons/ChevronLeftIcon.tsx
|
|
2654
|
-
import
|
|
2691
|
+
import React35 from "react";
|
|
2655
2692
|
function ChevronLeftIcon({ className, ...props }) {
|
|
2656
|
-
return /* @__PURE__ */
|
|
2693
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2657
2694
|
"svg",
|
|
2658
2695
|
{
|
|
2659
2696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2662,7 +2699,7 @@ function ChevronLeftIcon({ className, ...props }) {
|
|
|
2662
2699
|
className,
|
|
2663
2700
|
...props
|
|
2664
2701
|
},
|
|
2665
|
-
/* @__PURE__ */
|
|
2702
|
+
/* @__PURE__ */ React35.createElement(
|
|
2666
2703
|
"path",
|
|
2667
2704
|
{
|
|
2668
2705
|
fillRule: "evenodd",
|
|
@@ -2674,9 +2711,9 @@ function ChevronLeftIcon({ className, ...props }) {
|
|
|
2674
2711
|
}
|
|
2675
2712
|
|
|
2676
2713
|
// src/components/icons/ChevronRightIcon.tsx
|
|
2677
|
-
import
|
|
2714
|
+
import React36 from "react";
|
|
2678
2715
|
function ChevronRightIcon({ className, ...props }) {
|
|
2679
|
-
return /* @__PURE__ */
|
|
2716
|
+
return /* @__PURE__ */ React36.createElement(
|
|
2680
2717
|
"svg",
|
|
2681
2718
|
{
|
|
2682
2719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2685,7 +2722,7 @@ function ChevronRightIcon({ className, ...props }) {
|
|
|
2685
2722
|
className,
|
|
2686
2723
|
...props
|
|
2687
2724
|
},
|
|
2688
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ React36.createElement(
|
|
2689
2726
|
"path",
|
|
2690
2727
|
{
|
|
2691
2728
|
fillRule: "evenodd",
|
|
@@ -2697,9 +2734,9 @@ function ChevronRightIcon({ className, ...props }) {
|
|
|
2697
2734
|
}
|
|
2698
2735
|
|
|
2699
2736
|
// src/components/icons/CloseIcon.tsx
|
|
2700
|
-
import
|
|
2737
|
+
import React37 from "react";
|
|
2701
2738
|
function CloseIcon({ className, ...props }) {
|
|
2702
|
-
return /* @__PURE__ */
|
|
2739
|
+
return /* @__PURE__ */ React37.createElement(
|
|
2703
2740
|
"svg",
|
|
2704
2741
|
{
|
|
2705
2742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2708,7 +2745,7 @@ function CloseIcon({ className, ...props }) {
|
|
|
2708
2745
|
className,
|
|
2709
2746
|
...props
|
|
2710
2747
|
},
|
|
2711
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ React37.createElement(
|
|
2712
2749
|
"path",
|
|
2713
2750
|
{
|
|
2714
2751
|
d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
|
|
@@ -2718,9 +2755,9 @@ function CloseIcon({ className, ...props }) {
|
|
|
2718
2755
|
}
|
|
2719
2756
|
|
|
2720
2757
|
// src/components/icons/ExpandIcon.tsx
|
|
2721
|
-
import
|
|
2758
|
+
import React38 from "react";
|
|
2722
2759
|
function ExpandIcon({ className, ...props }) {
|
|
2723
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2724
2761
|
"svg",
|
|
2725
2762
|
{
|
|
2726
2763
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2729,7 +2766,7 @@ function ExpandIcon({ className, ...props }) {
|
|
|
2729
2766
|
className,
|
|
2730
2767
|
...props
|
|
2731
2768
|
},
|
|
2732
|
-
/* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ React38.createElement(
|
|
2733
2770
|
"path",
|
|
2734
2771
|
{
|
|
2735
2772
|
d: "M13.28 7.78l3.22-3.22v2.69a.75.75 0 001.5 0v-4.5a.75.75 0 00-.75-.75h-4.5a.75.75 0 000 1.5h2.69l-3.22 3.22a.75.75 0 001.06 1.06zM2 17.25v-4.5a.75.75 0 011.5 0v2.69l3.22-3.22a.75.75 0 011.06 1.06L4.56 16.5h2.69a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z"
|
|
@@ -2739,9 +2776,9 @@ function ExpandIcon({ className, ...props }) {
|
|
|
2739
2776
|
}
|
|
2740
2777
|
|
|
2741
2778
|
// src/components/icons/HistoryIcon.tsx
|
|
2742
|
-
import
|
|
2779
|
+
import React39 from "react";
|
|
2743
2780
|
function HistoryIcon({ className, ...props }) {
|
|
2744
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ React39.createElement(
|
|
2745
2782
|
"svg",
|
|
2746
2783
|
{
|
|
2747
2784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2750,7 +2787,7 @@ function HistoryIcon({ className, ...props }) {
|
|
|
2750
2787
|
className,
|
|
2751
2788
|
...props
|
|
2752
2789
|
},
|
|
2753
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ React39.createElement(
|
|
2754
2791
|
"path",
|
|
2755
2792
|
{
|
|
2756
2793
|
fillRule: "evenodd",
|
|
@@ -2762,9 +2799,9 @@ function HistoryIcon({ className, ...props }) {
|
|
|
2762
2799
|
}
|
|
2763
2800
|
|
|
2764
2801
|
// src/components/icons/LayersIcon.tsx
|
|
2765
|
-
import
|
|
2802
|
+
import React40 from "react";
|
|
2766
2803
|
function LayersIcon({ className, ...props }) {
|
|
2767
|
-
return /* @__PURE__ */
|
|
2804
|
+
return /* @__PURE__ */ React40.createElement(
|
|
2768
2805
|
"svg",
|
|
2769
2806
|
{
|
|
2770
2807
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2773,19 +2810,19 @@ function LayersIcon({ className, ...props }) {
|
|
|
2773
2810
|
className,
|
|
2774
2811
|
...props
|
|
2775
2812
|
},
|
|
2776
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ React40.createElement(
|
|
2777
2814
|
"path",
|
|
2778
2815
|
{
|
|
2779
2816
|
d: "M3.196 12.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 12.87z"
|
|
2780
2817
|
}
|
|
2781
2818
|
),
|
|
2782
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ React40.createElement(
|
|
2783
2820
|
"path",
|
|
2784
2821
|
{
|
|
2785
2822
|
d: "M3.196 8.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 8.87z"
|
|
2786
2823
|
}
|
|
2787
2824
|
),
|
|
2788
|
-
/* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ React40.createElement(
|
|
2789
2826
|
"path",
|
|
2790
2827
|
{
|
|
2791
2828
|
d: "M10.38 1.103a.75.75 0 00-.76 0l-7.25 4.25a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.76 0l7.25-4.25a.75.75 0 000-1.294l-7.25-4.25z"
|
|
@@ -2795,9 +2832,9 @@ function LayersIcon({ className, ...props }) {
|
|
|
2795
2832
|
}
|
|
2796
2833
|
|
|
2797
2834
|
// src/components/icons/MediaIcon.tsx
|
|
2798
|
-
import
|
|
2835
|
+
import React41 from "react";
|
|
2799
2836
|
function MediaIcon({ className, ...props }) {
|
|
2800
|
-
return /* @__PURE__ */
|
|
2837
|
+
return /* @__PURE__ */ React41.createElement(
|
|
2801
2838
|
"svg",
|
|
2802
2839
|
{
|
|
2803
2840
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2806,7 +2843,7 @@ function MediaIcon({ className, ...props }) {
|
|
|
2806
2843
|
className,
|
|
2807
2844
|
...props
|
|
2808
2845
|
},
|
|
2809
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ React41.createElement(
|
|
2810
2847
|
"path",
|
|
2811
2848
|
{
|
|
2812
2849
|
fillRule: "evenodd",
|
|
@@ -2818,9 +2855,9 @@ function MediaIcon({ className, ...props }) {
|
|
|
2818
2855
|
}
|
|
2819
2856
|
|
|
2820
2857
|
// src/components/icons/PlusIcon.tsx
|
|
2821
|
-
import
|
|
2858
|
+
import React42 from "react";
|
|
2822
2859
|
function PlusIcon({ className, ...props }) {
|
|
2823
|
-
return /* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ React42.createElement(
|
|
2824
2861
|
"svg",
|
|
2825
2862
|
{
|
|
2826
2863
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2829,7 +2866,7 @@ function PlusIcon({ className, ...props }) {
|
|
|
2829
2866
|
className,
|
|
2830
2867
|
...props
|
|
2831
2868
|
},
|
|
2832
|
-
/* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ React42.createElement(
|
|
2833
2870
|
"path",
|
|
2834
2871
|
{
|
|
2835
2872
|
d: "M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"
|
|
@@ -2839,9 +2876,9 @@ function PlusIcon({ className, ...props }) {
|
|
|
2839
2876
|
}
|
|
2840
2877
|
|
|
2841
2878
|
// src/components/icons/CheckSquareIcon.tsx
|
|
2842
|
-
import
|
|
2879
|
+
import React43 from "react";
|
|
2843
2880
|
function CheckSquareIcon({ className, ...props }) {
|
|
2844
|
-
return /* @__PURE__ */
|
|
2881
|
+
return /* @__PURE__ */ React43.createElement(
|
|
2845
2882
|
"div",
|
|
2846
2883
|
{
|
|
2847
2884
|
className: cx(
|
|
@@ -2850,14 +2887,14 @@ function CheckSquareIcon({ className, ...props }) {
|
|
|
2850
2887
|
),
|
|
2851
2888
|
...props
|
|
2852
2889
|
},
|
|
2853
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ React43.createElement(
|
|
2854
2891
|
"svg",
|
|
2855
2892
|
{
|
|
2856
2893
|
viewBox: "0 0 16 16",
|
|
2857
2894
|
fill: "none",
|
|
2858
2895
|
className: "absolute inset-0 w-full h-full p-0.5"
|
|
2859
2896
|
},
|
|
2860
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ React43.createElement(
|
|
2861
2898
|
"path",
|
|
2862
2899
|
{
|
|
2863
2900
|
d: "M3 8l3 3 7-7",
|
|
@@ -2873,9 +2910,9 @@ function CheckSquareIcon({ className, ...props }) {
|
|
|
2873
2910
|
}
|
|
2874
2911
|
|
|
2875
2912
|
// src/components/icons/EmptySquareIcon.tsx
|
|
2876
|
-
import
|
|
2913
|
+
import React44 from "react";
|
|
2877
2914
|
function EmptySquareIcon({ className, ...props }) {
|
|
2878
|
-
return /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2879
2916
|
"div",
|
|
2880
2917
|
{
|
|
2881
2918
|
className: cx(
|
|
@@ -2888,9 +2925,9 @@ function EmptySquareIcon({ className, ...props }) {
|
|
|
2888
2925
|
}
|
|
2889
2926
|
|
|
2890
2927
|
// src/components/icons/CrossSquareIcon.tsx
|
|
2891
|
-
import
|
|
2928
|
+
import React45 from "react";
|
|
2892
2929
|
function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
2893
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ React45.createElement(
|
|
2894
2931
|
"div",
|
|
2895
2932
|
{
|
|
2896
2933
|
className: cx(
|
|
@@ -2900,14 +2937,14 @@ function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
|
2900
2937
|
),
|
|
2901
2938
|
...props
|
|
2902
2939
|
},
|
|
2903
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ React45.createElement(
|
|
2904
2941
|
"svg",
|
|
2905
2942
|
{
|
|
2906
2943
|
viewBox: "0 0 16 16",
|
|
2907
2944
|
fill: "none",
|
|
2908
2945
|
className: "absolute inset-0 w-full h-full p-0.5"
|
|
2909
2946
|
},
|
|
2910
|
-
/* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ React45.createElement(
|
|
2911
2948
|
"path",
|
|
2912
2949
|
{
|
|
2913
2950
|
d: "M4 4l8 8M12 4l-8 8",
|
|
@@ -2922,15 +2959,15 @@ function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
|
2922
2959
|
}
|
|
2923
2960
|
|
|
2924
2961
|
// src/components/icons/SquareLoaderIcon.tsx
|
|
2925
|
-
import
|
|
2962
|
+
import React46 from "react";
|
|
2926
2963
|
function SquareLoaderIcon({ className, ...props }) {
|
|
2927
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ React46.createElement("div", { className: cx("relative w-4 h-4 flex-shrink-0", className), ...props }, /* @__PURE__ */ React46.createElement(
|
|
2928
2965
|
"svg",
|
|
2929
2966
|
{
|
|
2930
2967
|
viewBox: "0 0 16 16",
|
|
2931
2968
|
className: "w-full h-full animate-snake-spin"
|
|
2932
2969
|
},
|
|
2933
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ React46.createElement(
|
|
2934
2971
|
"rect",
|
|
2935
2972
|
{
|
|
2936
2973
|
x: "1",
|
|
@@ -2943,7 +2980,7 @@ function SquareLoaderIcon({ className, ...props }) {
|
|
|
2943
2980
|
className: "text-ash/40"
|
|
2944
2981
|
}
|
|
2945
2982
|
),
|
|
2946
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ React46.createElement(
|
|
2947
2984
|
"rect",
|
|
2948
2985
|
{
|
|
2949
2986
|
x: "1",
|
|
@@ -2975,7 +3012,7 @@ function Lightbox({
|
|
|
2975
3012
|
onClose();
|
|
2976
3013
|
}
|
|
2977
3014
|
}, [onClose]);
|
|
2978
|
-
return /* @__PURE__ */
|
|
3015
|
+
return /* @__PURE__ */ React47.createElement(
|
|
2979
3016
|
"div",
|
|
2980
3017
|
{
|
|
2981
3018
|
className: cx(
|
|
@@ -2987,7 +3024,7 @@ function Lightbox({
|
|
|
2987
3024
|
role: "dialog",
|
|
2988
3025
|
"aria-modal": "true"
|
|
2989
3026
|
},
|
|
2990
|
-
/* @__PURE__ */
|
|
3027
|
+
/* @__PURE__ */ React47.createElement(
|
|
2991
3028
|
"div",
|
|
2992
3029
|
{
|
|
2993
3030
|
className: cx(
|
|
@@ -2996,18 +3033,18 @@ function Lightbox({
|
|
|
2996
3033
|
"group/actions hover:border-gold/40 transition-colors"
|
|
2997
3034
|
)
|
|
2998
3035
|
},
|
|
2999
|
-
actions && /* @__PURE__ */
|
|
3000
|
-
/* @__PURE__ */
|
|
3036
|
+
actions && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement("div", { className: "flex items-center gap-1 px-1 py-1" }, actions), /* @__PURE__ */ React47.createElement("div", { className: "w-px self-stretch bg-ash/40" })),
|
|
3037
|
+
/* @__PURE__ */ React47.createElement(
|
|
3001
3038
|
"button",
|
|
3002
3039
|
{
|
|
3003
3040
|
onClick: onClose,
|
|
3004
3041
|
"aria-label": "Close",
|
|
3005
3042
|
className: "p-2 text-silver hover:text-white hover:bg-ash/20 transition-colors"
|
|
3006
3043
|
},
|
|
3007
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ React47.createElement(CloseIcon, { className: "w-5 h-5" })
|
|
3008
3045
|
)
|
|
3009
3046
|
),
|
|
3010
|
-
/* @__PURE__ */
|
|
3047
|
+
/* @__PURE__ */ React47.createElement(
|
|
3011
3048
|
"div",
|
|
3012
3049
|
{
|
|
3013
3050
|
className: "relative w-11/12 h-11/12 max-w-7xl flex items-center justify-center animate-lightbox-in",
|
|
@@ -3015,12 +3052,12 @@ function Lightbox({
|
|
|
3015
3052
|
},
|
|
3016
3053
|
children
|
|
3017
3054
|
),
|
|
3018
|
-
caption && /* @__PURE__ */
|
|
3055
|
+
caption && /* @__PURE__ */ React47.createElement("div", { className: "absolute bottom-6 left-0 right-0 text-center pointer-events-none px-4" }, caption)
|
|
3019
3056
|
);
|
|
3020
3057
|
}
|
|
3021
3058
|
|
|
3022
3059
|
// src/components/Drawer.tsx
|
|
3023
|
-
import
|
|
3060
|
+
import React48, { useEffect as useEffect5, useState as useState9 } from "react";
|
|
3024
3061
|
import { createPortal as createPortal3 } from "react-dom";
|
|
3025
3062
|
import { X as X5 } from "lucide-react";
|
|
3026
3063
|
var SIZE_MAP2 = {
|
|
@@ -3085,7 +3122,7 @@ var Drawer = ({
|
|
|
3085
3122
|
if (!mounted) {
|
|
3086
3123
|
return null;
|
|
3087
3124
|
}
|
|
3088
|
-
const content = /* @__PURE__ */
|
|
3125
|
+
const content = /* @__PURE__ */ React48.createElement(
|
|
3089
3126
|
"div",
|
|
3090
3127
|
{
|
|
3091
3128
|
className: cx(
|
|
@@ -3093,7 +3130,7 @@ var Drawer = ({
|
|
|
3093
3130
|
isOpen ? "pointer-events-auto" : "pointer-events-none"
|
|
3094
3131
|
)
|
|
3095
3132
|
},
|
|
3096
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ React48.createElement(
|
|
3097
3134
|
"div",
|
|
3098
3135
|
{
|
|
3099
3136
|
className: cx(
|
|
@@ -3104,7 +3141,7 @@ var Drawer = ({
|
|
|
3104
3141
|
"aria-hidden": "true"
|
|
3105
3142
|
}
|
|
3106
3143
|
),
|
|
3107
|
-
/* @__PURE__ */
|
|
3144
|
+
/* @__PURE__ */ React48.createElement(
|
|
3108
3145
|
"div",
|
|
3109
3146
|
{
|
|
3110
3147
|
role: "dialog",
|
|
@@ -3122,16 +3159,16 @@ var Drawer = ({
|
|
|
3122
3159
|
className
|
|
3123
3160
|
)
|
|
3124
3161
|
},
|
|
3125
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between px-4 py-3 border-b border-ash" }, title ? /* @__PURE__ */ React48.createElement("h2", { className: "text-lg font-semibold text-white m-0" }, title) : /* @__PURE__ */ React48.createElement("div", null), /* @__PURE__ */ React48.createElement(
|
|
3126
3163
|
"button",
|
|
3127
3164
|
{
|
|
3128
3165
|
onClick: onClose,
|
|
3129
3166
|
className: "text-silver hover:text-white transition-colors"
|
|
3130
3167
|
},
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3168
|
+
/* @__PURE__ */ React48.createElement(X5, { className: "h-5 w-5" }),
|
|
3169
|
+
/* @__PURE__ */ React48.createElement("span", { className: "sr-only" }, "Close")
|
|
3133
3170
|
)),
|
|
3134
|
-
/* @__PURE__ */
|
|
3171
|
+
/* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-auto p-4" }, children)
|
|
3135
3172
|
)
|
|
3136
3173
|
);
|
|
3137
3174
|
return createPortal3(content, document.body);
|
|
@@ -3139,7 +3176,7 @@ var Drawer = ({
|
|
|
3139
3176
|
Drawer.displayName = "Drawer";
|
|
3140
3177
|
|
|
3141
3178
|
// src/components/Popover.tsx
|
|
3142
|
-
import
|
|
3179
|
+
import React49, { useCallback as useCallback9, useId as useId3, useRef as useRef5, useState as useState10 } from "react";
|
|
3143
3180
|
var POSITION_CLASSES3 = {
|
|
3144
3181
|
top: {
|
|
3145
3182
|
start: "bottom-full left-0 mb-2",
|
|
@@ -3191,14 +3228,14 @@ var Popover = ({
|
|
|
3191
3228
|
const handleTriggerClick = () => {
|
|
3192
3229
|
setIsOpen(!isOpen);
|
|
3193
3230
|
};
|
|
3194
|
-
const triggerElement =
|
|
3231
|
+
const triggerElement = React49.cloneElement(trigger, {
|
|
3195
3232
|
onClick: handleTriggerClick,
|
|
3196
3233
|
"aria-haspopup": "dialog",
|
|
3197
3234
|
"aria-expanded": isOpen,
|
|
3198
3235
|
"aria-controls": `${baseId}-popover`,
|
|
3199
3236
|
id: `${baseId}-trigger`
|
|
3200
3237
|
});
|
|
3201
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ React49.createElement("div", { ref: containerRef, className: "relative inline-block" }, triggerElement, isOpen && /* @__PURE__ */ React49.createElement(
|
|
3202
3239
|
"div",
|
|
3203
3240
|
{
|
|
3204
3241
|
id: `${baseId}-popover`,
|
|
@@ -3217,7 +3254,7 @@ var Popover = ({
|
|
|
3217
3254
|
Popover.displayName = "Popover";
|
|
3218
3255
|
|
|
3219
3256
|
// src/components/Dialog.tsx
|
|
3220
|
-
import
|
|
3257
|
+
import React50, { useCallback as useCallback10 } from "react";
|
|
3221
3258
|
var ConfirmDialog = ({
|
|
3222
3259
|
title = "Confirm",
|
|
3223
3260
|
description,
|
|
@@ -3238,7 +3275,7 @@ var ConfirmDialog = ({
|
|
|
3238
3275
|
await onConfirm();
|
|
3239
3276
|
onClose();
|
|
3240
3277
|
}, [onConfirm, onClose]);
|
|
3241
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ React50.createElement(Modal, { title, onClose, ...props }, description && /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-silver mb-6" }, description), /* @__PURE__ */ React50.createElement("div", { className: "flex justify-end gap-3" }, /* @__PURE__ */ React50.createElement(Button, { variant: "outlined", onClick: handleCancel, disabled: isLoading }, cancelText), /* @__PURE__ */ React50.createElement(
|
|
3242
3279
|
Button,
|
|
3243
3280
|
{
|
|
3244
3281
|
variant: confirmVariant,
|
|
@@ -3261,7 +3298,7 @@ var AlertDialog = ({
|
|
|
3261
3298
|
variant === "warning" && "text-warning",
|
|
3262
3299
|
variant === "error" && "text-error"
|
|
3263
3300
|
);
|
|
3264
|
-
return /* @__PURE__ */
|
|
3301
|
+
return /* @__PURE__ */ React50.createElement(Modal, { onClose, ...props }, /* @__PURE__ */ React50.createElement("h3", { className: cx("text-xl font-semibold mb-2", titleClass) }, title), description && /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-silver mb-6" }, description), /* @__PURE__ */ React50.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React50.createElement(Button, { variant: "primary", onClick: onClose }, acknowledgeText)));
|
|
3265
3302
|
};
|
|
3266
3303
|
AlertDialog.displayName = "AlertDialog";
|
|
3267
3304
|
var PromptDialog = ({
|
|
@@ -3277,7 +3314,7 @@ var PromptDialog = ({
|
|
|
3277
3314
|
isLoading = false,
|
|
3278
3315
|
...props
|
|
3279
3316
|
}) => {
|
|
3280
|
-
const [value, setValue] =
|
|
3317
|
+
const [value, setValue] = React50.useState(defaultValue);
|
|
3281
3318
|
const handleCancel = useCallback10(() => {
|
|
3282
3319
|
onCancel?.();
|
|
3283
3320
|
onClose();
|
|
@@ -3290,7 +3327,7 @@ var PromptDialog = ({
|
|
|
3290
3327
|
},
|
|
3291
3328
|
[onSubmit, value, onClose]
|
|
3292
3329
|
);
|
|
3293
|
-
return /* @__PURE__ */
|
|
3330
|
+
return /* @__PURE__ */ React50.createElement(Modal, { title, onClose, ...props }, /* @__PURE__ */ React50.createElement("form", { onSubmit: handleSubmit }, description && /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-silver mb-4" }, description), /* @__PURE__ */ React50.createElement(
|
|
3294
3331
|
"input",
|
|
3295
3332
|
{
|
|
3296
3333
|
type: "text",
|
|
@@ -3305,7 +3342,7 @@ var PromptDialog = ({
|
|
|
3305
3342
|
),
|
|
3306
3343
|
autoFocus: true
|
|
3307
3344
|
}
|
|
3308
|
-
), /* @__PURE__ */
|
|
3345
|
+
), /* @__PURE__ */ React50.createElement("div", { className: "flex justify-end gap-3" }, /* @__PURE__ */ React50.createElement(
|
|
3309
3346
|
Button,
|
|
3310
3347
|
{
|
|
3311
3348
|
type: "button",
|
|
@@ -3314,12 +3351,12 @@ var PromptDialog = ({
|
|
|
3314
3351
|
disabled: isLoading
|
|
3315
3352
|
},
|
|
3316
3353
|
cancelText
|
|
3317
|
-
), /* @__PURE__ */
|
|
3354
|
+
), /* @__PURE__ */ React50.createElement(Button, { type: "submit", variant: "important", loading: isLoading }, submitText))));
|
|
3318
3355
|
};
|
|
3319
3356
|
PromptDialog.displayName = "PromptDialog";
|
|
3320
3357
|
|
|
3321
3358
|
// src/components/Tabs.tsx
|
|
3322
|
-
import
|
|
3359
|
+
import React51, { createContext as createContext3, useCallback as useCallback11, useContext as useContext3, useId as useId4, useState as useState11 } from "react";
|
|
3323
3360
|
var TabsContext = createContext3(null);
|
|
3324
3361
|
function useTabsContext() {
|
|
3325
3362
|
const context = useContext3(TabsContext);
|
|
@@ -3328,7 +3365,7 @@ function useTabsContext() {
|
|
|
3328
3365
|
}
|
|
3329
3366
|
return context;
|
|
3330
3367
|
}
|
|
3331
|
-
var Tabs =
|
|
3368
|
+
var Tabs = React51.forwardRef(
|
|
3332
3369
|
({ defaultValue, value, onValueChange, children, className, ...props }, ref) => {
|
|
3333
3370
|
const [internalValue, setInternalValue] = useState11(defaultValue ?? "");
|
|
3334
3371
|
const isControlled = value !== void 0;
|
|
@@ -3343,13 +3380,13 @@ var Tabs = React50.forwardRef(
|
|
|
3343
3380
|
},
|
|
3344
3381
|
[isControlled, onValueChange]
|
|
3345
3382
|
);
|
|
3346
|
-
return /* @__PURE__ */
|
|
3383
|
+
return /* @__PURE__ */ React51.createElement(TabsContext.Provider, { value: { activeTab, setActiveTab, baseId } }, /* @__PURE__ */ React51.createElement("div", { ref, className: cx("w-full", className), ...props }, children));
|
|
3347
3384
|
}
|
|
3348
3385
|
);
|
|
3349
3386
|
Tabs.displayName = "Tabs";
|
|
3350
|
-
var TabList =
|
|
3387
|
+
var TabList = React51.forwardRef(
|
|
3351
3388
|
({ children, className, ...props }, ref) => {
|
|
3352
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ React51.createElement(
|
|
3353
3390
|
"div",
|
|
3354
3391
|
{
|
|
3355
3392
|
ref,
|
|
@@ -3365,13 +3402,13 @@ var TabList = React50.forwardRef(
|
|
|
3365
3402
|
}
|
|
3366
3403
|
);
|
|
3367
3404
|
TabList.displayName = "TabList";
|
|
3368
|
-
var Tab =
|
|
3405
|
+
var Tab = React51.forwardRef(
|
|
3369
3406
|
({ value, children, className, disabled, ...props }, ref) => {
|
|
3370
3407
|
const { activeTab, setActiveTab, baseId } = useTabsContext();
|
|
3371
3408
|
const isActive = activeTab === value;
|
|
3372
3409
|
const panelId = `${baseId}-panel-${value}`;
|
|
3373
3410
|
const tabId = `${baseId}-tab-${value}`;
|
|
3374
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ React51.createElement(
|
|
3375
3412
|
"button",
|
|
3376
3413
|
{
|
|
3377
3414
|
ref,
|
|
@@ -3398,7 +3435,7 @@ var Tab = React50.forwardRef(
|
|
|
3398
3435
|
}
|
|
3399
3436
|
);
|
|
3400
3437
|
Tab.displayName = "Tab";
|
|
3401
|
-
var TabPanel =
|
|
3438
|
+
var TabPanel = React51.forwardRef(
|
|
3402
3439
|
({ value, forceMount = false, children, className, ...props }, ref) => {
|
|
3403
3440
|
const { activeTab, baseId } = useTabsContext();
|
|
3404
3441
|
const isActive = activeTab === value;
|
|
@@ -3407,7 +3444,7 @@ var TabPanel = React50.forwardRef(
|
|
|
3407
3444
|
if (!isActive && !forceMount) {
|
|
3408
3445
|
return null;
|
|
3409
3446
|
}
|
|
3410
|
-
return /* @__PURE__ */
|
|
3447
|
+
return /* @__PURE__ */ React51.createElement(
|
|
3411
3448
|
"div",
|
|
3412
3449
|
{
|
|
3413
3450
|
ref,
|
|
@@ -3430,7 +3467,7 @@ var TabPanel = React50.forwardRef(
|
|
|
3430
3467
|
TabPanel.displayName = "TabPanel";
|
|
3431
3468
|
|
|
3432
3469
|
// src/components/Accordion.tsx
|
|
3433
|
-
import
|
|
3470
|
+
import React52, { createContext as createContext4, useCallback as useCallback12, useContext as useContext4, useId as useId5, useState as useState12 } from "react";
|
|
3434
3471
|
import { ChevronDown } from "lucide-react";
|
|
3435
3472
|
var AccordionContext = createContext4(null);
|
|
3436
3473
|
function useAccordionContext() {
|
|
@@ -3440,7 +3477,7 @@ function useAccordionContext() {
|
|
|
3440
3477
|
}
|
|
3441
3478
|
return context;
|
|
3442
3479
|
}
|
|
3443
|
-
var Accordion =
|
|
3480
|
+
var Accordion = React52.forwardRef(
|
|
3444
3481
|
({ type = "single", defaultValue, value, onValueChange, children, className, ...props }, ref) => {
|
|
3445
3482
|
const [internalValue, setInternalValue] = useState12(() => {
|
|
3446
3483
|
if (defaultValue) {
|
|
@@ -3469,7 +3506,7 @@ var Accordion = React51.forwardRef(
|
|
|
3469
3506
|
},
|
|
3470
3507
|
[expandedItems, type, isControlled, onValueChange]
|
|
3471
3508
|
);
|
|
3472
|
-
return /* @__PURE__ */
|
|
3509
|
+
return /* @__PURE__ */ React52.createElement(AccordionContext.Provider, { value: { expandedItems, toggleItem, type } }, /* @__PURE__ */ React52.createElement(
|
|
3473
3510
|
"div",
|
|
3474
3511
|
{
|
|
3475
3512
|
ref,
|
|
@@ -3482,9 +3519,9 @@ var Accordion = React51.forwardRef(
|
|
|
3482
3519
|
);
|
|
3483
3520
|
Accordion.displayName = "Accordion";
|
|
3484
3521
|
var AccordionItemContext = createContext4(null);
|
|
3485
|
-
var AccordionItem =
|
|
3522
|
+
var AccordionItem = React52.forwardRef(
|
|
3486
3523
|
({ value, disabled = false, children, className, ...props }, ref) => {
|
|
3487
|
-
return /* @__PURE__ */
|
|
3524
|
+
return /* @__PURE__ */ React52.createElement(AccordionItemContext.Provider, { value: { value, disabled } }, /* @__PURE__ */ React52.createElement(
|
|
3488
3525
|
"div",
|
|
3489
3526
|
{
|
|
3490
3527
|
ref,
|
|
@@ -3497,7 +3534,7 @@ var AccordionItem = React51.forwardRef(
|
|
|
3497
3534
|
}
|
|
3498
3535
|
);
|
|
3499
3536
|
AccordionItem.displayName = "AccordionItem";
|
|
3500
|
-
var AccordionTrigger =
|
|
3537
|
+
var AccordionTrigger = React52.forwardRef(
|
|
3501
3538
|
({ children, className, ...props }, ref) => {
|
|
3502
3539
|
const { expandedItems, toggleItem } = useAccordionContext();
|
|
3503
3540
|
const itemContext = useContext4(AccordionItemContext);
|
|
@@ -3507,7 +3544,7 @@ var AccordionTrigger = React51.forwardRef(
|
|
|
3507
3544
|
}
|
|
3508
3545
|
const { value, disabled } = itemContext;
|
|
3509
3546
|
const isExpanded = expandedItems.has(value);
|
|
3510
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ React52.createElement("h3", { className: "m-0" }, /* @__PURE__ */ React52.createElement(
|
|
3511
3548
|
"button",
|
|
3512
3549
|
{
|
|
3513
3550
|
ref,
|
|
@@ -3528,8 +3565,8 @@ var AccordionTrigger = React51.forwardRef(
|
|
|
3528
3565
|
),
|
|
3529
3566
|
...props
|
|
3530
3567
|
},
|
|
3531
|
-
/* @__PURE__ */
|
|
3532
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ React52.createElement("span", null, children),
|
|
3569
|
+
/* @__PURE__ */ React52.createElement(
|
|
3533
3570
|
ChevronDown,
|
|
3534
3571
|
{
|
|
3535
3572
|
className: cx(
|
|
@@ -3542,7 +3579,7 @@ var AccordionTrigger = React51.forwardRef(
|
|
|
3542
3579
|
}
|
|
3543
3580
|
);
|
|
3544
3581
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
3545
|
-
var AccordionContent =
|
|
3582
|
+
var AccordionContent = React52.forwardRef(
|
|
3546
3583
|
({ children, className, ...props }, ref) => {
|
|
3547
3584
|
const { expandedItems } = useAccordionContext();
|
|
3548
3585
|
const itemContext = useContext4(AccordionItemContext);
|
|
@@ -3552,7 +3589,7 @@ var AccordionContent = React51.forwardRef(
|
|
|
3552
3589
|
}
|
|
3553
3590
|
const { value } = itemContext;
|
|
3554
3591
|
const isExpanded = expandedItems.has(value);
|
|
3555
|
-
return /* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ React52.createElement(
|
|
3556
3593
|
"div",
|
|
3557
3594
|
{
|
|
3558
3595
|
ref,
|
|
@@ -3567,14 +3604,14 @@ var AccordionContent = React51.forwardRef(
|
|
|
3567
3604
|
),
|
|
3568
3605
|
...props
|
|
3569
3606
|
},
|
|
3570
|
-
/* @__PURE__ */
|
|
3607
|
+
/* @__PURE__ */ React52.createElement("div", { className: "px-4 pb-4 text-sm text-silver" }, children)
|
|
3571
3608
|
);
|
|
3572
3609
|
}
|
|
3573
3610
|
);
|
|
3574
3611
|
AccordionContent.displayName = "AccordionContent";
|
|
3575
3612
|
|
|
3576
3613
|
// src/components/Menu.tsx
|
|
3577
|
-
import
|
|
3614
|
+
import React53, {
|
|
3578
3615
|
createContext as createContext5,
|
|
3579
3616
|
useCallback as useCallback13,
|
|
3580
3617
|
useContext as useContext5,
|
|
@@ -3605,7 +3642,7 @@ var Menu = ({ children, open, onOpenChange }) => {
|
|
|
3605
3642
|
},
|
|
3606
3643
|
[isControlled, onOpenChange]
|
|
3607
3644
|
);
|
|
3608
|
-
return /* @__PURE__ */
|
|
3645
|
+
return /* @__PURE__ */ React53.createElement(
|
|
3609
3646
|
MenuContext.Provider,
|
|
3610
3647
|
{
|
|
3611
3648
|
value: {
|
|
@@ -3615,11 +3652,11 @@ var Menu = ({ children, open, onOpenChange }) => {
|
|
|
3615
3652
|
menuId: `${baseId}-menu`
|
|
3616
3653
|
}
|
|
3617
3654
|
},
|
|
3618
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ React53.createElement("div", { className: "relative inline-block" }, children)
|
|
3619
3656
|
);
|
|
3620
3657
|
};
|
|
3621
3658
|
Menu.displayName = "Menu";
|
|
3622
|
-
var MenuTrigger =
|
|
3659
|
+
var MenuTrigger = React53.forwardRef(
|
|
3623
3660
|
({ children, className, asChild, ...props }, ref) => {
|
|
3624
3661
|
const { isOpen, setIsOpen, triggerId, menuId } = useMenuContext();
|
|
3625
3662
|
const handleClick = (e) => {
|
|
@@ -3627,7 +3664,7 @@ var MenuTrigger = React52.forwardRef(
|
|
|
3627
3664
|
setIsOpen(!isOpen);
|
|
3628
3665
|
props.onClick?.(e);
|
|
3629
3666
|
};
|
|
3630
|
-
return /* @__PURE__ */
|
|
3667
|
+
return /* @__PURE__ */ React53.createElement(
|
|
3631
3668
|
"button",
|
|
3632
3669
|
{
|
|
3633
3670
|
ref,
|
|
@@ -3657,7 +3694,7 @@ var MENU_SIDE_CLASSES = {
|
|
|
3657
3694
|
top: "bottom-full mb-1",
|
|
3658
3695
|
bottom: "top-full mt-1"
|
|
3659
3696
|
};
|
|
3660
|
-
var MenuContent =
|
|
3697
|
+
var MenuContent = React53.forwardRef(
|
|
3661
3698
|
({ children, className, align = "start", side = "bottom", ...props }, ref) => {
|
|
3662
3699
|
const { isOpen, setIsOpen, triggerId, menuId } = useMenuContext();
|
|
3663
3700
|
const menuRef = useRef6(null);
|
|
@@ -3680,7 +3717,7 @@ var MenuContent = React52.forwardRef(
|
|
|
3680
3717
|
if (!isOpen) {
|
|
3681
3718
|
return null;
|
|
3682
3719
|
}
|
|
3683
|
-
return /* @__PURE__ */
|
|
3720
|
+
return /* @__PURE__ */ React53.createElement(
|
|
3684
3721
|
"div",
|
|
3685
3722
|
{
|
|
3686
3723
|
ref: composeRefs(menuRef, ref),
|
|
@@ -3702,7 +3739,7 @@ var MenuContent = React52.forwardRef(
|
|
|
3702
3739
|
}
|
|
3703
3740
|
);
|
|
3704
3741
|
MenuContent.displayName = "MenuContent";
|
|
3705
|
-
var MenuItem =
|
|
3742
|
+
var MenuItem = React53.forwardRef(
|
|
3706
3743
|
({ children, className, icon, destructive, disabled, onClick, ...props }, ref) => {
|
|
3707
3744
|
const { setIsOpen } = useMenuContext();
|
|
3708
3745
|
const handleClick = (e) => {
|
|
@@ -3712,7 +3749,7 @@ var MenuItem = React52.forwardRef(
|
|
|
3712
3749
|
onClick?.(e);
|
|
3713
3750
|
setIsOpen(false);
|
|
3714
3751
|
};
|
|
3715
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ React53.createElement(
|
|
3716
3753
|
"button",
|
|
3717
3754
|
{
|
|
3718
3755
|
ref,
|
|
@@ -3730,13 +3767,13 @@ var MenuItem = React52.forwardRef(
|
|
|
3730
3767
|
),
|
|
3731
3768
|
...props
|
|
3732
3769
|
},
|
|
3733
|
-
icon && /* @__PURE__ */
|
|
3770
|
+
icon && /* @__PURE__ */ React53.createElement("span", { className: "w-4 h-4 shrink-0" }, icon),
|
|
3734
3771
|
children
|
|
3735
3772
|
);
|
|
3736
3773
|
}
|
|
3737
3774
|
);
|
|
3738
3775
|
MenuItem.displayName = "MenuItem";
|
|
3739
|
-
var MenuSeparator =
|
|
3776
|
+
var MenuSeparator = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React53.createElement(
|
|
3740
3777
|
"div",
|
|
3741
3778
|
{
|
|
3742
3779
|
ref,
|
|
@@ -3746,7 +3783,7 @@ var MenuSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3746
3783
|
}
|
|
3747
3784
|
));
|
|
3748
3785
|
MenuSeparator.displayName = "MenuSeparator";
|
|
3749
|
-
var MenuLabel =
|
|
3786
|
+
var MenuLabel = React53.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React53.createElement(
|
|
3750
3787
|
"div",
|
|
3751
3788
|
{
|
|
3752
3789
|
ref,
|
|
@@ -3758,10 +3795,10 @@ var MenuLabel = React52.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
3758
3795
|
MenuLabel.displayName = "MenuLabel";
|
|
3759
3796
|
|
|
3760
3797
|
// src/components/Navbar.tsx
|
|
3761
|
-
import
|
|
3762
|
-
var Navbar =
|
|
3798
|
+
import React54 from "react";
|
|
3799
|
+
var Navbar = React54.forwardRef(
|
|
3763
3800
|
({ fixed = false, bordered = true, className, children, ...props }, ref) => {
|
|
3764
|
-
return /* @__PURE__ */
|
|
3801
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3765
3802
|
"nav",
|
|
3766
3803
|
{
|
|
3767
3804
|
ref,
|
|
@@ -3773,14 +3810,14 @@ var Navbar = React53.forwardRef(
|
|
|
3773
3810
|
),
|
|
3774
3811
|
...props
|
|
3775
3812
|
},
|
|
3776
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between" }, children)
|
|
3777
3814
|
);
|
|
3778
3815
|
}
|
|
3779
3816
|
);
|
|
3780
3817
|
Navbar.displayName = "Navbar";
|
|
3781
|
-
var NavbarBrand =
|
|
3818
|
+
var NavbarBrand = React54.forwardRef(
|
|
3782
3819
|
({ className, children, ...props }, ref) => {
|
|
3783
|
-
return /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3784
3821
|
"div",
|
|
3785
3822
|
{
|
|
3786
3823
|
ref,
|
|
@@ -3792,14 +3829,14 @@ var NavbarBrand = React53.forwardRef(
|
|
|
3792
3829
|
}
|
|
3793
3830
|
);
|
|
3794
3831
|
NavbarBrand.displayName = "NavbarBrand";
|
|
3795
|
-
var NavbarContent =
|
|
3832
|
+
var NavbarContent = React54.forwardRef(
|
|
3796
3833
|
({ position = "center", className, children, ...props }, ref) => {
|
|
3797
3834
|
const positionClasses = {
|
|
3798
3835
|
start: "mr-auto",
|
|
3799
3836
|
center: "mx-auto",
|
|
3800
3837
|
end: "ml-auto"
|
|
3801
3838
|
};
|
|
3802
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3803
3840
|
"div",
|
|
3804
3841
|
{
|
|
3805
3842
|
ref,
|
|
@@ -3815,9 +3852,9 @@ var NavbarContent = React53.forwardRef(
|
|
|
3815
3852
|
}
|
|
3816
3853
|
);
|
|
3817
3854
|
NavbarContent.displayName = "NavbarContent";
|
|
3818
|
-
var NavbarItem =
|
|
3855
|
+
var NavbarItem = React54.forwardRef(
|
|
3819
3856
|
({ active = false, className, children, ...props }, ref) => {
|
|
3820
|
-
return /* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3821
3858
|
"div",
|
|
3822
3859
|
{
|
|
3823
3860
|
ref,
|
|
@@ -3832,9 +3869,9 @@ var NavbarItem = React53.forwardRef(
|
|
|
3832
3869
|
}
|
|
3833
3870
|
);
|
|
3834
3871
|
NavbarItem.displayName = "NavbarItem";
|
|
3835
|
-
var NavbarLink =
|
|
3872
|
+
var NavbarLink = React54.forwardRef(
|
|
3836
3873
|
({ active = false, className, children, ...props }, ref) => {
|
|
3837
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3838
3875
|
"a",
|
|
3839
3876
|
{
|
|
3840
3877
|
ref,
|
|
@@ -3850,7 +3887,7 @@ var NavbarLink = React53.forwardRef(
|
|
|
3850
3887
|
}
|
|
3851
3888
|
);
|
|
3852
3889
|
NavbarLink.displayName = "NavbarLink";
|
|
3853
|
-
var NavbarDivider =
|
|
3890
|
+
var NavbarDivider = React54.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React54.createElement(
|
|
3854
3891
|
"div",
|
|
3855
3892
|
{
|
|
3856
3893
|
ref,
|
|
@@ -3861,19 +3898,19 @@ var NavbarDivider = React53.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3861
3898
|
NavbarDivider.displayName = "NavbarDivider";
|
|
3862
3899
|
|
|
3863
3900
|
// src/components/Breadcrumb.tsx
|
|
3864
|
-
import
|
|
3901
|
+
import React55 from "react";
|
|
3865
3902
|
import { ChevronRight } from "lucide-react";
|
|
3866
|
-
var Breadcrumb =
|
|
3903
|
+
var Breadcrumb = React55.forwardRef(
|
|
3867
3904
|
({ separator, className, children, ...props }, ref) => {
|
|
3868
|
-
const items =
|
|
3869
|
-
const defaultSeparator = /* @__PURE__ */
|
|
3870
|
-
return /* @__PURE__ */
|
|
3905
|
+
const items = React55.Children.toArray(children);
|
|
3906
|
+
const defaultSeparator = /* @__PURE__ */ React55.createElement(ChevronRight, { className: "h-4 w-4 text-ash" });
|
|
3907
|
+
return /* @__PURE__ */ React55.createElement("nav", { ref, "aria-label": "Breadcrumb", className, ...props }, /* @__PURE__ */ React55.createElement("ol", { className: "flex items-center gap-2" }, items.map((child, index) => /* @__PURE__ */ React55.createElement("li", { key: index, className: "flex items-center gap-2" }, child, index < items.length - 1 && /* @__PURE__ */ React55.createElement("span", { "aria-hidden": "true" }, separator ?? defaultSeparator)))));
|
|
3871
3908
|
}
|
|
3872
3909
|
);
|
|
3873
3910
|
Breadcrumb.displayName = "Breadcrumb";
|
|
3874
|
-
var BreadcrumbItem =
|
|
3911
|
+
var BreadcrumbItem = React55.forwardRef(
|
|
3875
3912
|
({ current = false, className, children, ...props }, ref) => {
|
|
3876
|
-
return /* @__PURE__ */
|
|
3913
|
+
return /* @__PURE__ */ React55.createElement(
|
|
3877
3914
|
"span",
|
|
3878
3915
|
{
|
|
3879
3916
|
ref,
|
|
@@ -3890,9 +3927,9 @@ var BreadcrumbItem = React54.forwardRef(
|
|
|
3890
3927
|
}
|
|
3891
3928
|
);
|
|
3892
3929
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
3893
|
-
var BreadcrumbLink =
|
|
3930
|
+
var BreadcrumbLink = React55.forwardRef(
|
|
3894
3931
|
({ className, children, ...props }, ref) => {
|
|
3895
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ React55.createElement(
|
|
3896
3933
|
"a",
|
|
3897
3934
|
{
|
|
3898
3935
|
ref,
|
|
@@ -3909,7 +3946,7 @@ var BreadcrumbLink = React54.forwardRef(
|
|
|
3909
3946
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
3910
3947
|
|
|
3911
3948
|
// src/components/Pagination.tsx
|
|
3912
|
-
import
|
|
3949
|
+
import React56 from "react";
|
|
3913
3950
|
import { ChevronLeft, ChevronRight as ChevronRight2, MoreHorizontal } from "lucide-react";
|
|
3914
3951
|
function generatePagination(currentPage, totalPages, siblingCount) {
|
|
3915
3952
|
const totalSlots = siblingCount * 2 + 5;
|
|
@@ -3939,7 +3976,7 @@ function generatePagination(currentPage, totalPages, siblingCount) {
|
|
|
3939
3976
|
);
|
|
3940
3977
|
return [1, "ellipsis", ...middleRange, "ellipsis", totalPages];
|
|
3941
3978
|
}
|
|
3942
|
-
var Pagination =
|
|
3979
|
+
var Pagination = React56.forwardRef(
|
|
3943
3980
|
({
|
|
3944
3981
|
page,
|
|
3945
3982
|
totalPages,
|
|
@@ -3951,7 +3988,7 @@ var Pagination = React55.forwardRef(
|
|
|
3951
3988
|
}, ref) => {
|
|
3952
3989
|
const pages = generatePagination(page, totalPages, siblingCount);
|
|
3953
3990
|
const buttonBaseClass = "flex items-center justify-center h-8 min-w-8 px-2 text-sm border border-ash transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gold";
|
|
3954
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ React56.createElement(
|
|
3955
3992
|
"nav",
|
|
3956
3993
|
{
|
|
3957
3994
|
ref,
|
|
@@ -3960,7 +3997,7 @@ var Pagination = React55.forwardRef(
|
|
|
3960
3997
|
className: cx("flex items-center gap-1", className),
|
|
3961
3998
|
...props
|
|
3962
3999
|
},
|
|
3963
|
-
/* @__PURE__ */
|
|
4000
|
+
/* @__PURE__ */ React56.createElement(
|
|
3964
4001
|
"button",
|
|
3965
4002
|
{
|
|
3966
4003
|
type: "button",
|
|
@@ -3973,17 +4010,17 @@ var Pagination = React55.forwardRef(
|
|
|
3973
4010
|
page <= 1 && "opacity-50 cursor-not-allowed hover:border-ash"
|
|
3974
4011
|
)
|
|
3975
4012
|
},
|
|
3976
|
-
/* @__PURE__ */
|
|
4013
|
+
/* @__PURE__ */ React56.createElement(ChevronLeft, { className: "h-4 w-4" })
|
|
3977
4014
|
),
|
|
3978
4015
|
pages.map(
|
|
3979
|
-
(pageNum, index) => pageNum === "ellipsis" ? /* @__PURE__ */
|
|
4016
|
+
(pageNum, index) => pageNum === "ellipsis" ? /* @__PURE__ */ React56.createElement(
|
|
3980
4017
|
"span",
|
|
3981
4018
|
{
|
|
3982
4019
|
key: `ellipsis-${index}`,
|
|
3983
4020
|
className: "flex items-center justify-center h-8 w-8 text-silver"
|
|
3984
4021
|
},
|
|
3985
|
-
/* @__PURE__ */
|
|
3986
|
-
) : /* @__PURE__ */
|
|
4022
|
+
/* @__PURE__ */ React56.createElement(MoreHorizontal, { className: "h-4 w-4" })
|
|
4023
|
+
) : /* @__PURE__ */ React56.createElement(
|
|
3987
4024
|
"button",
|
|
3988
4025
|
{
|
|
3989
4026
|
key: pageNum,
|
|
@@ -3999,7 +4036,7 @@ var Pagination = React55.forwardRef(
|
|
|
3999
4036
|
pageNum
|
|
4000
4037
|
)
|
|
4001
4038
|
),
|
|
4002
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ React56.createElement(
|
|
4003
4040
|
"button",
|
|
4004
4041
|
{
|
|
4005
4042
|
type: "button",
|
|
@@ -4012,7 +4049,7 @@ var Pagination = React55.forwardRef(
|
|
|
4012
4049
|
page >= totalPages && "opacity-50 cursor-not-allowed hover:border-ash"
|
|
4013
4050
|
)
|
|
4014
4051
|
},
|
|
4015
|
-
/* @__PURE__ */
|
|
4052
|
+
/* @__PURE__ */ React56.createElement(ChevronRight2, { className: "h-4 w-4" })
|
|
4016
4053
|
)
|
|
4017
4054
|
);
|
|
4018
4055
|
}
|
|
@@ -4020,9 +4057,9 @@ var Pagination = React55.forwardRef(
|
|
|
4020
4057
|
Pagination.displayName = "Pagination";
|
|
4021
4058
|
|
|
4022
4059
|
// src/components/Stepper.tsx
|
|
4023
|
-
import
|
|
4060
|
+
import React57 from "react";
|
|
4024
4061
|
import { Check as Check2 } from "lucide-react";
|
|
4025
|
-
var Stepper =
|
|
4062
|
+
var Stepper = React57.forwardRef(
|
|
4026
4063
|
({ steps, currentStep, status, className, ...rest }, ref) => {
|
|
4027
4064
|
const currentIndex = steps.findIndex((step) => step.id === currentStep);
|
|
4028
4065
|
const getStepState = (index) => {
|
|
@@ -4034,7 +4071,7 @@ var Stepper = React56.forwardRef(
|
|
|
4034
4071
|
}
|
|
4035
4072
|
return "future";
|
|
4036
4073
|
};
|
|
4037
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ React57.createElement(
|
|
4038
4075
|
"div",
|
|
4039
4076
|
{
|
|
4040
4077
|
ref,
|
|
@@ -4044,7 +4081,7 @@ var Stepper = React56.forwardRef(
|
|
|
4044
4081
|
steps.map((step, index) => {
|
|
4045
4082
|
const state = getStepState(index);
|
|
4046
4083
|
const isLast = index === steps.length - 1;
|
|
4047
|
-
return /* @__PURE__ */
|
|
4084
|
+
return /* @__PURE__ */ React57.createElement(React57.Fragment, { key: step.id }, /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React57.createElement(
|
|
4048
4085
|
"div",
|
|
4049
4086
|
{
|
|
4050
4087
|
className: cx(
|
|
@@ -4055,8 +4092,8 @@ var Stepper = React56.forwardRef(
|
|
|
4055
4092
|
state === "future" && "bg-charcoal border-ash text-silver"
|
|
4056
4093
|
)
|
|
4057
4094
|
},
|
|
4058
|
-
state === "complete" ? /* @__PURE__ */
|
|
4059
|
-
), /* @__PURE__ */
|
|
4095
|
+
state === "complete" ? /* @__PURE__ */ React57.createElement(Check2, { className: "h-5 w-5" }) : /* @__PURE__ */ React57.createElement("span", null, index + 1)
|
|
4096
|
+
), /* @__PURE__ */ React57.createElement(
|
|
4060
4097
|
"span",
|
|
4061
4098
|
{
|
|
4062
4099
|
className: cx(
|
|
@@ -4068,7 +4105,7 @@ var Stepper = React56.forwardRef(
|
|
|
4068
4105
|
)
|
|
4069
4106
|
},
|
|
4070
4107
|
step.label
|
|
4071
|
-
)), !isLast && /* @__PURE__ */
|
|
4108
|
+
)), !isLast && /* @__PURE__ */ React57.createElement(
|
|
4072
4109
|
"div",
|
|
4073
4110
|
{
|
|
4074
4111
|
className: cx(
|
|
@@ -4084,11 +4121,11 @@ var Stepper = React56.forwardRef(
|
|
|
4084
4121
|
Stepper.displayName = "Stepper";
|
|
4085
4122
|
|
|
4086
4123
|
// src/components/Message.tsx
|
|
4087
|
-
import
|
|
4124
|
+
import React59, { useCallback as useCallback14, useEffect as useEffect7, useRef as useRef7, useState as useState14 } from "react";
|
|
4088
4125
|
import { Check as Check3, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, Copy, GitBranch, Pencil, RotateCcw, Send, X as X6 } from "lucide-react";
|
|
4089
4126
|
|
|
4090
4127
|
// src/components/MarkdownContent.tsx
|
|
4091
|
-
import
|
|
4128
|
+
import React58 from "react";
|
|
4092
4129
|
import ReactMarkdown from "react-markdown";
|
|
4093
4130
|
import remarkGfm from "remark-gfm";
|
|
4094
4131
|
|
|
@@ -4131,7 +4168,7 @@ function remarkMentions() {
|
|
|
4131
4168
|
|
|
4132
4169
|
// src/components/MarkdownContent.tsx
|
|
4133
4170
|
var CURSOR_BASE_CLASSES = "inline-block bg-current animate-cursor-blink w-0.5 h-cursor translate-y-cursor-offset";
|
|
4134
|
-
var MarkdownContent =
|
|
4171
|
+
var MarkdownContent = React58.forwardRef(
|
|
4135
4172
|
({
|
|
4136
4173
|
className,
|
|
4137
4174
|
content,
|
|
@@ -4142,7 +4179,7 @@ var MarkdownContent = React57.forwardRef(
|
|
|
4142
4179
|
...rest
|
|
4143
4180
|
}, ref) => {
|
|
4144
4181
|
if (!isMarkdown) {
|
|
4145
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ React58.createElement("div", { ref, className: cx("prose whitespace-pre-wrap", className), ...rest }, content, isStreaming && /* @__PURE__ */ React58.createElement(
|
|
4146
4183
|
"span",
|
|
4147
4184
|
{
|
|
4148
4185
|
"aria-hidden": "true",
|
|
@@ -4153,13 +4190,13 @@ var MarkdownContent = React57.forwardRef(
|
|
|
4153
4190
|
const components = {
|
|
4154
4191
|
// Harden external links so user-authored URLs don't open in the same tab
|
|
4155
4192
|
// and can't reach `window.opener`.
|
|
4156
|
-
a: ({ href, children }) => /* @__PURE__ */
|
|
4193
|
+
a: ({ href, children }) => /* @__PURE__ */ React58.createElement("a", { href, target: "_blank", rel: "noopener noreferrer" }, children),
|
|
4157
4194
|
...mentionRenderer && {
|
|
4158
|
-
mention: ({ name }) => /* @__PURE__ */
|
|
4195
|
+
mention: ({ name }) => /* @__PURE__ */ React58.createElement(React58.Fragment, null, mentionRenderer(name))
|
|
4159
4196
|
}
|
|
4160
4197
|
};
|
|
4161
4198
|
const remarkPlugins = mentionRenderer ? [remarkGfm, remarkMentions] : [remarkGfm];
|
|
4162
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ React58.createElement("div", { ref, className: cx("prose", className), ...rest }, /* @__PURE__ */ React58.createElement(ReactMarkdown, { remarkPlugins, components }, content), isStreaming && /* @__PURE__ */ React58.createElement(
|
|
4163
4200
|
"span",
|
|
4164
4201
|
{
|
|
4165
4202
|
"aria-hidden": "true",
|
|
@@ -4185,7 +4222,7 @@ var BRANCH_BUTTON_CLASSES = cx(
|
|
|
4185
4222
|
"disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-silver/70"
|
|
4186
4223
|
);
|
|
4187
4224
|
function ActionButton({ onClick, label, children, disabled }) {
|
|
4188
|
-
return /* @__PURE__ */
|
|
4225
|
+
return /* @__PURE__ */ React59.createElement(
|
|
4189
4226
|
"button",
|
|
4190
4227
|
{
|
|
4191
4228
|
type: "button",
|
|
@@ -4197,7 +4234,7 @@ function ActionButton({ onClick, label, children, disabled }) {
|
|
|
4197
4234
|
children
|
|
4198
4235
|
);
|
|
4199
4236
|
}
|
|
4200
|
-
var Message =
|
|
4237
|
+
var Message = React59.forwardRef(
|
|
4201
4238
|
({
|
|
4202
4239
|
variant = "assistant",
|
|
4203
4240
|
className,
|
|
@@ -4281,7 +4318,7 @@ var Message = React58.forwardRef(
|
|
|
4281
4318
|
textarea.style.height = "auto";
|
|
4282
4319
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
4283
4320
|
};
|
|
4284
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ React59.createElement(
|
|
4285
4322
|
"div",
|
|
4286
4323
|
{
|
|
4287
4324
|
ref,
|
|
@@ -4292,7 +4329,7 @@ var Message = React58.forwardRef(
|
|
|
4292
4329
|
),
|
|
4293
4330
|
...rest
|
|
4294
4331
|
},
|
|
4295
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
4332
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ React59.createElement("div", { className: cx("mb-1.5", isUser ? "self-end" : "self-start") }, /* @__PURE__ */ React59.createElement(
|
|
4296
4333
|
AttachmentPreview,
|
|
4297
4334
|
{
|
|
4298
4335
|
attachments,
|
|
@@ -4300,7 +4337,7 @@ var Message = React58.forwardRef(
|
|
|
4300
4337
|
onOpen: onAttachmentOpen
|
|
4301
4338
|
}
|
|
4302
4339
|
)),
|
|
4303
|
-
isUser && isEditing ? /* @__PURE__ */
|
|
4340
|
+
isUser && isEditing ? /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-11/12" }, /* @__PURE__ */ React59.createElement("div", { className: "relative bg-gold" }, /* @__PURE__ */ React59.createElement(
|
|
4304
4341
|
"textarea",
|
|
4305
4342
|
{
|
|
4306
4343
|
ref: textareaRef,
|
|
@@ -4310,7 +4347,7 @@ var Message = React58.forwardRef(
|
|
|
4310
4347
|
className: "w-full bg-transparent text-obsidian px-3 py-2 pr-20 resize-none outline-none min-h-10 text-sm",
|
|
4311
4348
|
rows: 1
|
|
4312
4349
|
}
|
|
4313
|
-
), /* @__PURE__ */
|
|
4350
|
+
), /* @__PURE__ */ React59.createElement("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex gap-0.5" }, /* @__PURE__ */ React59.createElement(
|
|
4314
4351
|
"button",
|
|
4315
4352
|
{
|
|
4316
4353
|
type: "button",
|
|
@@ -4318,8 +4355,8 @@ var Message = React58.forwardRef(
|
|
|
4318
4355
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors",
|
|
4319
4356
|
"aria-label": "Cancel edit"
|
|
4320
4357
|
},
|
|
4321
|
-
/* @__PURE__ */
|
|
4322
|
-
), /* @__PURE__ */
|
|
4358
|
+
/* @__PURE__ */ React59.createElement(X6, { className: "w-4 h-4" })
|
|
4359
|
+
), /* @__PURE__ */ React59.createElement(
|
|
4323
4360
|
"button",
|
|
4324
4361
|
{
|
|
4325
4362
|
type: "button",
|
|
@@ -4328,8 +4365,8 @@ var Message = React58.forwardRef(
|
|
|
4328
4365
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors disabled:opacity-30",
|
|
4329
4366
|
"aria-label": "Submit edit"
|
|
4330
4367
|
},
|
|
4331
|
-
/* @__PURE__ */
|
|
4332
|
-
)))) : /* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ React59.createElement(Send, { className: "w-4 h-4" })
|
|
4369
|
+
)))) : /* @__PURE__ */ React59.createElement(
|
|
4333
4370
|
"div",
|
|
4334
4371
|
{
|
|
4335
4372
|
className: cx(
|
|
@@ -4341,7 +4378,7 @@ var Message = React58.forwardRef(
|
|
|
4341
4378
|
role: isJumpInteractive ? "button" : void 0,
|
|
4342
4379
|
"aria-label": isJumpInteractive ? "Jump to this message" : void 0
|
|
4343
4380
|
},
|
|
4344
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
4381
|
+
typeof content === "string" ? /* @__PURE__ */ React59.createElement(
|
|
4345
4382
|
MarkdownContent,
|
|
4346
4383
|
{
|
|
4347
4384
|
content,
|
|
@@ -4351,17 +4388,17 @@ var Message = React58.forwardRef(
|
|
|
4351
4388
|
}
|
|
4352
4389
|
) : content
|
|
4353
4390
|
),
|
|
4354
|
-
showActions && !isEditing && /* @__PURE__ */
|
|
4391
|
+
showActions && !isEditing && /* @__PURE__ */ React59.createElement("div", { className: cx(
|
|
4355
4392
|
"flex items-center gap-0.5 mt-1",
|
|
4356
4393
|
isUser ? "mr-1" : "ml-1"
|
|
4357
|
-
) }, actions.showCopy !== false && /* @__PURE__ */
|
|
4394
|
+
) }, actions.showCopy !== false && /* @__PURE__ */ React59.createElement(
|
|
4358
4395
|
ActionButton,
|
|
4359
4396
|
{
|
|
4360
4397
|
onClick: handleCopy,
|
|
4361
4398
|
label: copied ? "Copied!" : "Copy message"
|
|
4362
4399
|
},
|
|
4363
|
-
copied ? /* @__PURE__ */
|
|
4364
|
-
), isUser && actions.onEdit && typeof content === "string" && /* @__PURE__ */
|
|
4400
|
+
copied ? /* @__PURE__ */ React59.createElement(Check3, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React59.createElement(Copy, { className: "w-3.5 h-3.5" })
|
|
4401
|
+
), isUser && actions.onEdit && typeof content === "string" && /* @__PURE__ */ React59.createElement(ActionButton, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React59.createElement(Pencil, { className: "w-3.5 h-3.5" })), !isUser && actions.onRetry && /* @__PURE__ */ React59.createElement(ActionButton, { onClick: actions.onRetry, label: "Regenerate response" }, /* @__PURE__ */ React59.createElement(RotateCcw, { className: "w-3.5 h-3.5" })), showBranchNav && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement("div", { className: "w-px h-4 bg-ash/40 mx-1" }), /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-0.5 text-silver/70" }, /* @__PURE__ */ React59.createElement(GitBranch, { className: "w-3 h-3 mr-0.5 text-silver/50" }), /* @__PURE__ */ React59.createElement(
|
|
4365
4402
|
"button",
|
|
4366
4403
|
{
|
|
4367
4404
|
type: "button",
|
|
@@ -4370,8 +4407,8 @@ var Message = React58.forwardRef(
|
|
|
4370
4407
|
className: BRANCH_BUTTON_CLASSES,
|
|
4371
4408
|
"aria-label": "Previous branch"
|
|
4372
4409
|
},
|
|
4373
|
-
/* @__PURE__ */
|
|
4374
|
-
), /* @__PURE__ */
|
|
4410
|
+
/* @__PURE__ */ React59.createElement(ChevronLeft2, { className: "w-3 h-3" })
|
|
4411
|
+
), /* @__PURE__ */ React59.createElement("span", { className: "text-xs tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total), /* @__PURE__ */ React59.createElement(
|
|
4375
4412
|
"button",
|
|
4376
4413
|
{
|
|
4377
4414
|
type: "button",
|
|
@@ -4380,7 +4417,7 @@ var Message = React58.forwardRef(
|
|
|
4380
4417
|
className: BRANCH_BUTTON_CLASSES,
|
|
4381
4418
|
"aria-label": "Next branch"
|
|
4382
4419
|
},
|
|
4383
|
-
/* @__PURE__ */
|
|
4420
|
+
/* @__PURE__ */ React59.createElement(ChevronRight3, { className: "w-3 h-3" })
|
|
4384
4421
|
))))
|
|
4385
4422
|
);
|
|
4386
4423
|
}
|
|
@@ -4388,15 +4425,15 @@ var Message = React58.forwardRef(
|
|
|
4388
4425
|
Message.displayName = "Message";
|
|
4389
4426
|
|
|
4390
4427
|
// src/components/StreamingCursor.tsx
|
|
4391
|
-
import
|
|
4392
|
-
var StreamingCursor =
|
|
4428
|
+
import React60 from "react";
|
|
4429
|
+
var StreamingCursor = React60.forwardRef(
|
|
4393
4430
|
({ className, variant = "line", ...rest }, ref) => {
|
|
4394
4431
|
const variantStyles2 = {
|
|
4395
4432
|
block: "w-2.5 h-cursor translate-y-cursor-offset",
|
|
4396
4433
|
line: "w-0.5 h-cursor translate-y-cursor-offset",
|
|
4397
4434
|
underscore: "w-2.5 h-0.5 self-end mb-0.5"
|
|
4398
4435
|
};
|
|
4399
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ React60.createElement(
|
|
4400
4437
|
"span",
|
|
4401
4438
|
{
|
|
4402
4439
|
ref,
|
|
@@ -4414,10 +4451,10 @@ var StreamingCursor = React59.forwardRef(
|
|
|
4414
4451
|
StreamingCursor.displayName = "StreamingCursor";
|
|
4415
4452
|
|
|
4416
4453
|
// src/components/chat/ChatInterface.tsx
|
|
4417
|
-
import
|
|
4454
|
+
import React89, { useCallback as useCallback24, useEffect as useEffect17, useImperativeHandle, useMemo as useMemo5, useRef as useRef16, useState as useState26 } from "react";
|
|
4418
4455
|
|
|
4419
4456
|
// src/components/chat/ChatView.tsx
|
|
4420
|
-
import
|
|
4457
|
+
import React64, { useEffect as useEffect10 } from "react";
|
|
4421
4458
|
|
|
4422
4459
|
// src/components/chat/hooks/useScrollAnchor.ts
|
|
4423
4460
|
import { useCallback as useCallback15, useRef as useRef8 } from "react";
|
|
@@ -4533,7 +4570,7 @@ function useAdaptiveSpacer(options = {}) {
|
|
|
4533
4570
|
}
|
|
4534
4571
|
|
|
4535
4572
|
// src/components/chat/ThinkingIndicator.tsx
|
|
4536
|
-
import
|
|
4573
|
+
import React61, { useEffect as useEffect9, useState as useState16 } from "react";
|
|
4537
4574
|
var THINKING_PHRASES = [
|
|
4538
4575
|
"Consulting the ancient tomes...",
|
|
4539
4576
|
"Parsing the ineffable...",
|
|
@@ -4549,7 +4586,7 @@ var THINKING_PHRASES = [
|
|
|
4549
4586
|
"Consulting my inner monologue...",
|
|
4550
4587
|
"Summoning the muse..."
|
|
4551
4588
|
];
|
|
4552
|
-
var ThinkingIndicator =
|
|
4589
|
+
var ThinkingIndicator = React61.forwardRef(
|
|
4553
4590
|
({
|
|
4554
4591
|
isVisible = true,
|
|
4555
4592
|
phraseInterval = 2500,
|
|
@@ -4586,7 +4623,7 @@ var ThinkingIndicator = React60.forwardRef(
|
|
|
4586
4623
|
if (!isVisible) {
|
|
4587
4624
|
return null;
|
|
4588
4625
|
}
|
|
4589
|
-
return /* @__PURE__ */
|
|
4626
|
+
return /* @__PURE__ */ React61.createElement(
|
|
4590
4627
|
"div",
|
|
4591
4628
|
{
|
|
4592
4629
|
ref,
|
|
@@ -4600,26 +4637,26 @@ var ThinkingIndicator = React60.forwardRef(
|
|
|
4600
4637
|
"aria-live": "polite",
|
|
4601
4638
|
...rest
|
|
4602
4639
|
},
|
|
4603
|
-
/* @__PURE__ */
|
|
4640
|
+
/* @__PURE__ */ React61.createElement("div", { className: "flex gap-1", "aria-hidden": "true" }, /* @__PURE__ */ React61.createElement(
|
|
4604
4641
|
"span",
|
|
4605
4642
|
{
|
|
4606
4643
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4607
4644
|
style: { animationDelay: "0ms" }
|
|
4608
4645
|
}
|
|
4609
|
-
), /* @__PURE__ */
|
|
4646
|
+
), /* @__PURE__ */ React61.createElement(
|
|
4610
4647
|
"span",
|
|
4611
4648
|
{
|
|
4612
4649
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4613
4650
|
style: { animationDelay: "150ms" }
|
|
4614
4651
|
}
|
|
4615
|
-
), /* @__PURE__ */
|
|
4652
|
+
), /* @__PURE__ */ React61.createElement(
|
|
4616
4653
|
"span",
|
|
4617
4654
|
{
|
|
4618
4655
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4619
4656
|
style: { animationDelay: "300ms" }
|
|
4620
4657
|
}
|
|
4621
4658
|
)),
|
|
4622
|
-
isManual ? /* @__PURE__ */
|
|
4659
|
+
isManual ? /* @__PURE__ */ React61.createElement("span", { className: "text-sm italic" }, manualLabel) : /* @__PURE__ */ React61.createElement(
|
|
4623
4660
|
"span",
|
|
4624
4661
|
{
|
|
4625
4662
|
className: cx(
|
|
@@ -4635,7 +4672,7 @@ var ThinkingIndicator = React60.forwardRef(
|
|
|
4635
4672
|
ThinkingIndicator.displayName = "ThinkingIndicator";
|
|
4636
4673
|
|
|
4637
4674
|
// src/components/chat/Checkpoint.tsx
|
|
4638
|
-
import
|
|
4675
|
+
import React62 from "react";
|
|
4639
4676
|
import {
|
|
4640
4677
|
ArrowLeft,
|
|
4641
4678
|
ChevronLeft as ChevronLeft3,
|
|
@@ -4660,7 +4697,7 @@ var KIND_ARIA_LABELS = {
|
|
|
4660
4697
|
init: "Project head checkpoint",
|
|
4661
4698
|
ingest: "Upload batch checkpoint"
|
|
4662
4699
|
};
|
|
4663
|
-
var Checkpoint =
|
|
4700
|
+
var Checkpoint = React62.forwardRef(
|
|
4664
4701
|
function Checkpoint2({ name, executionKind, status = "completed", isActive, muted, branchInfo, onJumpHere }, ref) {
|
|
4665
4702
|
const KindIcon = KIND_ICONS[executionKind];
|
|
4666
4703
|
const isFailed = status === "failed";
|
|
@@ -4671,7 +4708,7 @@ var Checkpoint = React61.forwardRef(
|
|
|
4671
4708
|
"transition-colors text-xs",
|
|
4672
4709
|
isActive ? "text-silver font-medium" : isInteractive ? "text-silver/70 hover:text-white underline decoration-silver/30 underline-offset-4 decoration-dotted hover:decoration-silver/70" : "text-silver/50"
|
|
4673
4710
|
);
|
|
4674
|
-
return /* @__PURE__ */
|
|
4711
|
+
return /* @__PURE__ */ React62.createElement(
|
|
4675
4712
|
"div",
|
|
4676
4713
|
{
|
|
4677
4714
|
ref,
|
|
@@ -4682,8 +4719,8 @@ var Checkpoint = React61.forwardRef(
|
|
|
4682
4719
|
muted && "opacity-60"
|
|
4683
4720
|
)
|
|
4684
4721
|
},
|
|
4685
|
-
/* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4722
|
+
/* @__PURE__ */ React62.createElement(KindIcon, { className: cx("w-3.5 h-3.5 shrink-0", iconColor), "aria-hidden": "true" }),
|
|
4723
|
+
/* @__PURE__ */ React62.createElement(
|
|
4687
4724
|
"button",
|
|
4688
4725
|
{
|
|
4689
4726
|
type: "button",
|
|
@@ -4696,11 +4733,11 @@ var Checkpoint = React61.forwardRef(
|
|
|
4696
4733
|
),
|
|
4697
4734
|
"aria-label": isInteractive ? `Jump to checkpoint ${name}` : name
|
|
4698
4735
|
},
|
|
4699
|
-
/* @__PURE__ */
|
|
4700
|
-
isFailed && /* @__PURE__ */
|
|
4701
|
-
isCancelled && /* @__PURE__ */
|
|
4736
|
+
/* @__PURE__ */ React62.createElement("span", { className: "truncate" }, name),
|
|
4737
|
+
isFailed && /* @__PURE__ */ React62.createElement("span", { className: "ml-1.5 text-error-muted" }, "\xB7 failed"),
|
|
4738
|
+
isCancelled && /* @__PURE__ */ React62.createElement("span", { className: "ml-1.5 text-silver/40" }, "\xB7 cancelled")
|
|
4702
4739
|
),
|
|
4703
|
-
isInteractive && /* @__PURE__ */
|
|
4740
|
+
isInteractive && /* @__PURE__ */ React62.createElement(
|
|
4704
4741
|
"span",
|
|
4705
4742
|
{
|
|
4706
4743
|
className: cx(
|
|
@@ -4710,17 +4747,17 @@ var Checkpoint = React61.forwardRef(
|
|
|
4710
4747
|
),
|
|
4711
4748
|
"aria-hidden": "true"
|
|
4712
4749
|
},
|
|
4713
|
-
/* @__PURE__ */
|
|
4750
|
+
/* @__PURE__ */ React62.createElement(ArrowLeft, { className: "w-3 h-3" }),
|
|
4714
4751
|
"Jump here"
|
|
4715
4752
|
),
|
|
4716
|
-
branchInfo && branchInfo.total > 1 && /* @__PURE__ */
|
|
4753
|
+
branchInfo && branchInfo.total > 1 && /* @__PURE__ */ React62.createElement(
|
|
4717
4754
|
"div",
|
|
4718
4755
|
{
|
|
4719
4756
|
className: "ml-auto inline-flex items-center gap-0.5 text-silver/70 text-xs",
|
|
4720
4757
|
role: "navigation",
|
|
4721
4758
|
"aria-label": "Switch sibling checkpoint"
|
|
4722
4759
|
},
|
|
4723
|
-
/* @__PURE__ */
|
|
4760
|
+
/* @__PURE__ */ React62.createElement(
|
|
4724
4761
|
"button",
|
|
4725
4762
|
{
|
|
4726
4763
|
type: "button",
|
|
@@ -4732,10 +4769,10 @@ var Checkpoint = React61.forwardRef(
|
|
|
4732
4769
|
),
|
|
4733
4770
|
"aria-label": "Previous sibling checkpoint"
|
|
4734
4771
|
},
|
|
4735
|
-
/* @__PURE__ */
|
|
4772
|
+
/* @__PURE__ */ React62.createElement(ChevronLeft3, { className: "w-3 h-3" })
|
|
4736
4773
|
),
|
|
4737
|
-
/* @__PURE__ */
|
|
4738
|
-
/* @__PURE__ */
|
|
4774
|
+
/* @__PURE__ */ React62.createElement("span", { className: "tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total),
|
|
4775
|
+
/* @__PURE__ */ React62.createElement(
|
|
4739
4776
|
"button",
|
|
4740
4777
|
{
|
|
4741
4778
|
type: "button",
|
|
@@ -4747,7 +4784,7 @@ var Checkpoint = React61.forwardRef(
|
|
|
4747
4784
|
),
|
|
4748
4785
|
"aria-label": "Next sibling checkpoint"
|
|
4749
4786
|
},
|
|
4750
|
-
/* @__PURE__ */
|
|
4787
|
+
/* @__PURE__ */ React62.createElement(ChevronRight4, { className: "w-3 h-3" })
|
|
4751
4788
|
)
|
|
4752
4789
|
)
|
|
4753
4790
|
);
|
|
@@ -4756,7 +4793,7 @@ var Checkpoint = React61.forwardRef(
|
|
|
4756
4793
|
Checkpoint.displayName = "Checkpoint";
|
|
4757
4794
|
|
|
4758
4795
|
// src/components/chat/GreyedDivider.tsx
|
|
4759
|
-
import
|
|
4796
|
+
import React63 from "react";
|
|
4760
4797
|
import { ArrowDown } from "lucide-react";
|
|
4761
4798
|
function pluralize(n, singular, plural) {
|
|
4762
4799
|
return `${n} ${n === 1 ? singular : plural}`;
|
|
@@ -4771,12 +4808,12 @@ function summarize(messageCount, checkpointCount) {
|
|
|
4771
4808
|
}
|
|
4772
4809
|
return parts.length > 0 ? parts.join(", ") : "no items";
|
|
4773
4810
|
}
|
|
4774
|
-
var GreyedDivider =
|
|
4811
|
+
var GreyedDivider = React63.forwardRef(
|
|
4775
4812
|
function GreyedDivider2({ messageCount, checkpointCount, onJumpToLatest }, ref) {
|
|
4776
4813
|
if (messageCount === 0 && checkpointCount === 0) {
|
|
4777
4814
|
return null;
|
|
4778
4815
|
}
|
|
4779
|
-
return /* @__PURE__ */
|
|
4816
|
+
return /* @__PURE__ */ React63.createElement(
|
|
4780
4817
|
"div",
|
|
4781
4818
|
{
|
|
4782
4819
|
ref,
|
|
@@ -4784,10 +4821,10 @@ var GreyedDivider = React62.forwardRef(
|
|
|
4784
4821
|
"aria-label": "Start of rewound timeline",
|
|
4785
4822
|
className: "flex items-center gap-3 py-2 text-xs text-silver/50 select-none"
|
|
4786
4823
|
},
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
onJumpToLatest && /* @__PURE__ */
|
|
4824
|
+
/* @__PURE__ */ React63.createElement("div", { className: "flex-1 h-px bg-ash/40", "aria-hidden": "true" }),
|
|
4825
|
+
/* @__PURE__ */ React63.createElement("span", { className: "inline-flex items-center gap-1.5 whitespace-nowrap" }, /* @__PURE__ */ React63.createElement(ArrowDown, { className: "w-3 h-3", "aria-hidden": "true" }), "Later in this conversation \xB7 ", summarize(messageCount, checkpointCount)),
|
|
4826
|
+
/* @__PURE__ */ React63.createElement("div", { className: "flex-1 h-px bg-ash/40", "aria-hidden": "true" }),
|
|
4827
|
+
onJumpToLatest && /* @__PURE__ */ React63.createElement(
|
|
4791
4828
|
"button",
|
|
4792
4829
|
{
|
|
4793
4830
|
type: "button",
|
|
@@ -4806,7 +4843,7 @@ var GreyedDivider = React62.forwardRef(
|
|
|
4806
4843
|
GreyedDivider.displayName = "GreyedDivider";
|
|
4807
4844
|
|
|
4808
4845
|
// src/components/chat/ChatView.tsx
|
|
4809
|
-
var ChatView =
|
|
4846
|
+
var ChatView = React64.forwardRef(
|
|
4810
4847
|
function ChatView2({
|
|
4811
4848
|
items,
|
|
4812
4849
|
latestUserMessageIndex,
|
|
@@ -4839,7 +4876,7 @@ var ChatView = React63.forwardRef(
|
|
|
4839
4876
|
return found ?? (item.kind === "message" ? item : null);
|
|
4840
4877
|
}, null);
|
|
4841
4878
|
const showThinking = isThinking && lastMessage?.kind === "message" && lastMessage.variant === "user";
|
|
4842
|
-
return /* @__PURE__ */
|
|
4879
|
+
return /* @__PURE__ */ React64.createElement(
|
|
4843
4880
|
"div",
|
|
4844
4881
|
{
|
|
4845
4882
|
ref: composeRefs(containerRef, ref),
|
|
@@ -4851,17 +4888,17 @@ var ChatView = React63.forwardRef(
|
|
|
4851
4888
|
),
|
|
4852
4889
|
...rest
|
|
4853
4890
|
},
|
|
4854
|
-
/* @__PURE__ */
|
|
4891
|
+
/* @__PURE__ */ React64.createElement("div", { ref: contentRef, className: "relative flex flex-col gap-3" }, items.map((item, index) => {
|
|
4855
4892
|
const isAnchor = index === latestUserIdx;
|
|
4856
4893
|
const wrapperRef = isAnchor ? anchorRef : void 0;
|
|
4857
4894
|
const wrapperClass = isAnchor ? "scroll-mt-4" : void 0;
|
|
4858
4895
|
if (item.kind === "divider") {
|
|
4859
4896
|
const { kind: _k2, id: id2, ...dividerProps } = item;
|
|
4860
|
-
return /* @__PURE__ */
|
|
4897
|
+
return /* @__PURE__ */ React64.createElement("div", { key: id2 }, /* @__PURE__ */ React64.createElement(GreyedDivider, { ...dividerProps }));
|
|
4861
4898
|
}
|
|
4862
4899
|
if (item.kind === "checkpoint") {
|
|
4863
4900
|
const { kind: _k2, id: id2, ...checkpointProps } = item;
|
|
4864
|
-
return /* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ React64.createElement("div", { key: id2, ref: wrapperRef, className: wrapperClass }, /* @__PURE__ */ React64.createElement(Checkpoint, { ...checkpointProps }));
|
|
4865
4902
|
}
|
|
4866
4903
|
const {
|
|
4867
4904
|
kind: _k,
|
|
@@ -4875,14 +4912,14 @@ var ChatView = React63.forwardRef(
|
|
|
4875
4912
|
...messageProps
|
|
4876
4913
|
} = item;
|
|
4877
4914
|
const isMessageStreaming = !!nodeIsStreaming;
|
|
4878
|
-
return /* @__PURE__ */
|
|
4915
|
+
return /* @__PURE__ */ React64.createElement(
|
|
4879
4916
|
"div",
|
|
4880
4917
|
{
|
|
4881
4918
|
key: id,
|
|
4882
4919
|
ref: wrapperRef,
|
|
4883
4920
|
className: cx(wrapperClass, muted && "opacity-60")
|
|
4884
4921
|
},
|
|
4885
|
-
/* @__PURE__ */
|
|
4922
|
+
/* @__PURE__ */ React64.createElement(
|
|
4886
4923
|
Message,
|
|
4887
4924
|
{
|
|
4888
4925
|
variant,
|
|
@@ -4895,8 +4932,8 @@ var ChatView = React63.forwardRef(
|
|
|
4895
4932
|
}
|
|
4896
4933
|
)
|
|
4897
4934
|
);
|
|
4898
|
-
}), showThinking && /* @__PURE__ */
|
|
4899
|
-
/* @__PURE__ */
|
|
4935
|
+
}), showThinking && /* @__PURE__ */ React64.createElement(ThinkingIndicator, { isVisible: true, manualLabel: thinkingLabel })),
|
|
4936
|
+
/* @__PURE__ */ React64.createElement(
|
|
4900
4937
|
"div",
|
|
4901
4938
|
{
|
|
4902
4939
|
ref: spacerRef,
|
|
@@ -4911,7 +4948,7 @@ var ChatView = React63.forwardRef(
|
|
|
4911
4948
|
ChatView.displayName = "ChatView";
|
|
4912
4949
|
|
|
4913
4950
|
// src/components/chat/ChatInput.tsx
|
|
4914
|
-
import
|
|
4951
|
+
import React65, { useCallback as useCallback17, useEffect as useEffect11, useMemo, useRef as useRef10, useState as useState17 } from "react";
|
|
4915
4952
|
import { Paperclip, Send as Send2, Square, X as X7 } from "lucide-react";
|
|
4916
4953
|
|
|
4917
4954
|
// src/components/chat/types.ts
|
|
@@ -4937,7 +4974,17 @@ function generateId() {
|
|
|
4937
4974
|
}
|
|
4938
4975
|
|
|
4939
4976
|
// src/components/chat/ChatInput.tsx
|
|
4940
|
-
var
|
|
4977
|
+
var noticeContainerClass = {
|
|
4978
|
+
info: "bg-charcoal border border-ash/40 text-silver",
|
|
4979
|
+
warning: "bg-gold/5 border border-gold/20 text-gold/80",
|
|
4980
|
+
error: "bg-error/10 border border-error/30 text-error"
|
|
4981
|
+
};
|
|
4982
|
+
var noticeDismissClass = {
|
|
4983
|
+
info: "text-silver",
|
|
4984
|
+
warning: "text-gold",
|
|
4985
|
+
error: "text-error"
|
|
4986
|
+
};
|
|
4987
|
+
var ChatInput = React65.forwardRef(
|
|
4941
4988
|
({
|
|
4942
4989
|
position = "bottom",
|
|
4943
4990
|
placeholder = "Send a message...",
|
|
@@ -5092,7 +5139,7 @@ var ChatInput = React64.forwardRef(
|
|
|
5092
5139
|
const hasAttachments = attachments.length > 0;
|
|
5093
5140
|
const isUploadIncomplete = attachments.some((a) => a.status === "pending" || a.status === "uploading" || a.status === "upload_failed");
|
|
5094
5141
|
const canSubmit = value.trim() && !disabled && !isStreaming && !isUploadIncomplete;
|
|
5095
|
-
return /* @__PURE__ */
|
|
5142
|
+
return /* @__PURE__ */ React65.createElement(
|
|
5096
5143
|
"div",
|
|
5097
5144
|
{
|
|
5098
5145
|
ref,
|
|
@@ -5104,12 +5151,12 @@ var ChatInput = React64.forwardRef(
|
|
|
5104
5151
|
),
|
|
5105
5152
|
...rest
|
|
5106
5153
|
},
|
|
5107
|
-
isCentered && helperText && /* @__PURE__ */
|
|
5108
|
-
notice && /* @__PURE__ */
|
|
5154
|
+
isCentered && helperText && /* @__PURE__ */ React65.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
|
|
5155
|
+
notice && /* @__PURE__ */ React65.createElement("div", { className: cx(
|
|
5109
5156
|
"w-full flex items-start gap-2 px-3 py-2 mb-1 text-xs",
|
|
5110
5157
|
isCentered && "max-w-lg",
|
|
5111
|
-
notice.variant
|
|
5112
|
-
) }, /* @__PURE__ */
|
|
5158
|
+
noticeContainerClass[notice.variant]
|
|
5159
|
+
) }, /* @__PURE__ */ React65.createElement("span", { className: "flex-1" }, notice.content), (notice.dismissible ?? notice.variant === "warning") && notice.onDismiss && /* @__PURE__ */ React65.createElement(
|
|
5113
5160
|
"button",
|
|
5114
5161
|
{
|
|
5115
5162
|
type: "button",
|
|
@@ -5117,12 +5164,12 @@ var ChatInput = React64.forwardRef(
|
|
|
5117
5164
|
"aria-label": "Dismiss",
|
|
5118
5165
|
className: cx(
|
|
5119
5166
|
"shrink-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
5120
|
-
notice.variant
|
|
5167
|
+
noticeDismissClass[notice.variant]
|
|
5121
5168
|
)
|
|
5122
5169
|
},
|
|
5123
|
-
/* @__PURE__ */
|
|
5170
|
+
/* @__PURE__ */ React65.createElement(X7, { className: "w-3 h-3" })
|
|
5124
5171
|
)),
|
|
5125
|
-
/* @__PURE__ */
|
|
5172
|
+
/* @__PURE__ */ React65.createElement(
|
|
5126
5173
|
"div",
|
|
5127
5174
|
{
|
|
5128
5175
|
className: cx(
|
|
@@ -5137,7 +5184,7 @@ var ChatInput = React64.forwardRef(
|
|
|
5137
5184
|
onDragOver: showAttachmentButton ? handleDragOver : void 0,
|
|
5138
5185
|
onDrop: showAttachmentButton ? handleDrop : void 0
|
|
5139
5186
|
},
|
|
5140
|
-
hasAttachments && /* @__PURE__ */
|
|
5187
|
+
hasAttachments && /* @__PURE__ */ React65.createElement("div", { className: "px-3 pt-3 pb-1" }, /* @__PURE__ */ React65.createElement(
|
|
5141
5188
|
AttachmentPreview,
|
|
5142
5189
|
{
|
|
5143
5190
|
attachments,
|
|
@@ -5145,14 +5192,14 @@ var ChatInput = React64.forwardRef(
|
|
|
5145
5192
|
removable: !isStreaming
|
|
5146
5193
|
}
|
|
5147
5194
|
)),
|
|
5148
|
-
isDragOver && /* @__PURE__ */
|
|
5195
|
+
isDragOver && /* @__PURE__ */ React65.createElement(
|
|
5149
5196
|
"div",
|
|
5150
5197
|
{
|
|
5151
5198
|
className: "absolute inset-0 bg-gold/10 flex items-center justify-center z-10 pointer-events-none"
|
|
5152
5199
|
},
|
|
5153
|
-
/* @__PURE__ */
|
|
5200
|
+
/* @__PURE__ */ React65.createElement("span", { className: "text-gold text-sm font-medium" }, "Drop files here")
|
|
5154
5201
|
),
|
|
5155
|
-
/* @__PURE__ */
|
|
5202
|
+
/* @__PURE__ */ React65.createElement("div", { className: "flex items-end" }, showAttachmentButton && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
|
|
5156
5203
|
"button",
|
|
5157
5204
|
{
|
|
5158
5205
|
type: "button",
|
|
@@ -5164,8 +5211,8 @@ var ChatInput = React64.forwardRef(
|
|
|
5164
5211
|
),
|
|
5165
5212
|
"aria-label": "Attach file"
|
|
5166
5213
|
},
|
|
5167
|
-
/* @__PURE__ */
|
|
5168
|
-
), /* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ React65.createElement(Paperclip, { className: "w-5 h-5" })
|
|
5215
|
+
), /* @__PURE__ */ React65.createElement(
|
|
5169
5216
|
"input",
|
|
5170
5217
|
{
|
|
5171
5218
|
ref: fileInputRef,
|
|
@@ -5176,7 +5223,7 @@ var ChatInput = React64.forwardRef(
|
|
|
5176
5223
|
className: "hidden",
|
|
5177
5224
|
"aria-hidden": "true"
|
|
5178
5225
|
}
|
|
5179
|
-
)), /* @__PURE__ */
|
|
5226
|
+
)), /* @__PURE__ */ React65.createElement(
|
|
5180
5227
|
"textarea",
|
|
5181
5228
|
{
|
|
5182
5229
|
ref: mergedTextareaRef,
|
|
@@ -5194,7 +5241,7 @@ var ChatInput = React64.forwardRef(
|
|
|
5194
5241
|
),
|
|
5195
5242
|
style: { maxHeight: 200 }
|
|
5196
5243
|
}
|
|
5197
|
-
), isStreaming ? /* @__PURE__ */
|
|
5244
|
+
), isStreaming ? /* @__PURE__ */ React65.createElement(
|
|
5198
5245
|
"button",
|
|
5199
5246
|
{
|
|
5200
5247
|
type: "button",
|
|
@@ -5205,8 +5252,8 @@ var ChatInput = React64.forwardRef(
|
|
|
5205
5252
|
),
|
|
5206
5253
|
"aria-label": "Stop generation"
|
|
5207
5254
|
},
|
|
5208
|
-
/* @__PURE__ */
|
|
5209
|
-
) : /* @__PURE__ */
|
|
5255
|
+
/* @__PURE__ */ React65.createElement(Square, { className: "w-5 h-5 fill-current" })
|
|
5256
|
+
) : /* @__PURE__ */ React65.createElement(
|
|
5210
5257
|
"button",
|
|
5211
5258
|
{
|
|
5212
5259
|
type: "button",
|
|
@@ -5219,7 +5266,7 @@ var ChatInput = React64.forwardRef(
|
|
|
5219
5266
|
),
|
|
5220
5267
|
"aria-label": "Send message"
|
|
5221
5268
|
},
|
|
5222
|
-
/* @__PURE__ */
|
|
5269
|
+
/* @__PURE__ */ React65.createElement(Send2, { className: "w-5 h-5" })
|
|
5223
5270
|
))
|
|
5224
5271
|
)
|
|
5225
5272
|
);
|
|
@@ -5228,14 +5275,14 @@ var ChatInput = React64.forwardRef(
|
|
|
5228
5275
|
ChatInput.displayName = "ChatInput";
|
|
5229
5276
|
|
|
5230
5277
|
// src/components/chat/ArtifactsPanel.tsx
|
|
5231
|
-
import
|
|
5278
|
+
import React84, { useCallback as useCallback20, useEffect as useEffect14, useRef as useRef13, useState as useState22 } from "react";
|
|
5232
5279
|
import { Image } from "lucide-react";
|
|
5233
5280
|
|
|
5234
5281
|
// src/components/ArtifactCard.tsx
|
|
5235
|
-
import
|
|
5282
|
+
import React73 from "react";
|
|
5236
5283
|
|
|
5237
5284
|
// src/components/ImageCard.tsx
|
|
5238
|
-
import
|
|
5285
|
+
import React66 from "react";
|
|
5239
5286
|
var ASPECT_RATIO_PRESETS = {
|
|
5240
5287
|
landscape: "3 / 2",
|
|
5241
5288
|
portrait: "2 / 3",
|
|
@@ -5247,7 +5294,7 @@ function resolveAspectRatio(ratio) {
|
|
|
5247
5294
|
}
|
|
5248
5295
|
return ratio.replace("/", " / ");
|
|
5249
5296
|
}
|
|
5250
|
-
var ImageCard =
|
|
5297
|
+
var ImageCard = React66.forwardRef(
|
|
5251
5298
|
({
|
|
5252
5299
|
src,
|
|
5253
5300
|
alt = "",
|
|
@@ -5264,7 +5311,7 @@ var ImageCard = React65.forwardRef(
|
|
|
5264
5311
|
loading,
|
|
5265
5312
|
...props
|
|
5266
5313
|
}, ref) => {
|
|
5267
|
-
return /* @__PURE__ */
|
|
5314
|
+
return /* @__PURE__ */ React66.createElement(
|
|
5268
5315
|
Card,
|
|
5269
5316
|
{
|
|
5270
5317
|
ref,
|
|
@@ -5272,13 +5319,13 @@ var ImageCard = React65.forwardRef(
|
|
|
5272
5319
|
loading,
|
|
5273
5320
|
...props
|
|
5274
5321
|
},
|
|
5275
|
-
/* @__PURE__ */
|
|
5322
|
+
/* @__PURE__ */ React66.createElement(
|
|
5276
5323
|
Card.Media,
|
|
5277
5324
|
{
|
|
5278
5325
|
className: mediaClassName,
|
|
5279
5326
|
style: { aspectRatio: resolveAspectRatio(aspectRatio) }
|
|
5280
5327
|
},
|
|
5281
|
-
/* @__PURE__ */
|
|
5328
|
+
/* @__PURE__ */ React66.createElement(React66.Fragment, null, src && /* @__PURE__ */ React66.createElement(
|
|
5282
5329
|
"img",
|
|
5283
5330
|
{
|
|
5284
5331
|
src,
|
|
@@ -5288,7 +5335,7 @@ var ImageCard = React65.forwardRef(
|
|
|
5288
5335
|
objectFit === "cover" ? "object-cover" : "object-contain"
|
|
5289
5336
|
)
|
|
5290
5337
|
}
|
|
5291
|
-
), overlay && /* @__PURE__ */
|
|
5338
|
+
), overlay && /* @__PURE__ */ React66.createElement(
|
|
5292
5339
|
"div",
|
|
5293
5340
|
{
|
|
5294
5341
|
className: "absolute inset-0 bg-obsidian/80 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center"
|
|
@@ -5296,7 +5343,7 @@ var ImageCard = React65.forwardRef(
|
|
|
5296
5343
|
overlay
|
|
5297
5344
|
))
|
|
5298
5345
|
),
|
|
5299
|
-
/* @__PURE__ */
|
|
5346
|
+
/* @__PURE__ */ React66.createElement(
|
|
5300
5347
|
Card.Header,
|
|
5301
5348
|
{
|
|
5302
5349
|
title,
|
|
@@ -5305,14 +5352,14 @@ var ImageCard = React65.forwardRef(
|
|
|
5305
5352
|
className: contentClassName
|
|
5306
5353
|
}
|
|
5307
5354
|
),
|
|
5308
|
-
children && /* @__PURE__ */
|
|
5355
|
+
children && /* @__PURE__ */ React66.createElement(Card.Body, { className: contentClassName }, children)
|
|
5309
5356
|
);
|
|
5310
5357
|
}
|
|
5311
5358
|
);
|
|
5312
5359
|
ImageCard.displayName = "ImageCard";
|
|
5313
5360
|
|
|
5314
5361
|
// src/components/VideoCard.tsx
|
|
5315
|
-
import
|
|
5362
|
+
import React67 from "react";
|
|
5316
5363
|
import ReactPlayer from "react-player";
|
|
5317
5364
|
var ASPECT_RATIO_PRESETS2 = {
|
|
5318
5365
|
video: "16 / 9",
|
|
@@ -5325,7 +5372,7 @@ function resolveAspectRatio2(ratio) {
|
|
|
5325
5372
|
}
|
|
5326
5373
|
return ratio.replace("/", " / ");
|
|
5327
5374
|
}
|
|
5328
|
-
var VideoCard =
|
|
5375
|
+
var VideoCard = React67.forwardRef(
|
|
5329
5376
|
({
|
|
5330
5377
|
src,
|
|
5331
5378
|
title,
|
|
@@ -5346,7 +5393,7 @@ var VideoCard = React66.forwardRef(
|
|
|
5346
5393
|
loading,
|
|
5347
5394
|
...props
|
|
5348
5395
|
}, ref) => {
|
|
5349
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ React67.createElement(
|
|
5350
5397
|
Card,
|
|
5351
5398
|
{
|
|
5352
5399
|
ref,
|
|
@@ -5354,13 +5401,13 @@ var VideoCard = React66.forwardRef(
|
|
|
5354
5401
|
loading,
|
|
5355
5402
|
...props
|
|
5356
5403
|
},
|
|
5357
|
-
/* @__PURE__ */
|
|
5404
|
+
/* @__PURE__ */ React67.createElement(
|
|
5358
5405
|
Card.Media,
|
|
5359
5406
|
{
|
|
5360
5407
|
className: mediaClassName,
|
|
5361
5408
|
style: { aspectRatio: resolveAspectRatio2(aspectRatio) }
|
|
5362
5409
|
},
|
|
5363
|
-
src && /* @__PURE__ */
|
|
5410
|
+
src && /* @__PURE__ */ React67.createElement(
|
|
5364
5411
|
ReactPlayer,
|
|
5365
5412
|
{
|
|
5366
5413
|
src,
|
|
@@ -5377,7 +5424,7 @@ var VideoCard = React66.forwardRef(
|
|
|
5377
5424
|
}
|
|
5378
5425
|
)
|
|
5379
5426
|
),
|
|
5380
|
-
/* @__PURE__ */
|
|
5427
|
+
/* @__PURE__ */ React67.createElement(
|
|
5381
5428
|
Card.Header,
|
|
5382
5429
|
{
|
|
5383
5430
|
title,
|
|
@@ -5386,17 +5433,17 @@ var VideoCard = React66.forwardRef(
|
|
|
5386
5433
|
className: contentClassName
|
|
5387
5434
|
}
|
|
5388
5435
|
),
|
|
5389
|
-
children && /* @__PURE__ */
|
|
5436
|
+
children && /* @__PURE__ */ React67.createElement(Card.Body, { className: contentClassName }, children)
|
|
5390
5437
|
);
|
|
5391
5438
|
}
|
|
5392
5439
|
);
|
|
5393
5440
|
VideoCard.displayName = "VideoCard";
|
|
5394
5441
|
|
|
5395
5442
|
// src/components/AudioCard.tsx
|
|
5396
|
-
import
|
|
5443
|
+
import React68 from "react";
|
|
5397
5444
|
import ReactPlayer2 from "react-player";
|
|
5398
5445
|
import { Music } from "lucide-react";
|
|
5399
|
-
var AudioCard =
|
|
5446
|
+
var AudioCard = React68.forwardRef(
|
|
5400
5447
|
({
|
|
5401
5448
|
src,
|
|
5402
5449
|
title,
|
|
@@ -5416,7 +5463,7 @@ var AudioCard = React67.forwardRef(
|
|
|
5416
5463
|
loading,
|
|
5417
5464
|
...props
|
|
5418
5465
|
}, ref) => {
|
|
5419
|
-
return /* @__PURE__ */
|
|
5466
|
+
return /* @__PURE__ */ React68.createElement(
|
|
5420
5467
|
Card,
|
|
5421
5468
|
{
|
|
5422
5469
|
ref,
|
|
@@ -5424,10 +5471,10 @@ var AudioCard = React67.forwardRef(
|
|
|
5424
5471
|
loading,
|
|
5425
5472
|
...props
|
|
5426
5473
|
},
|
|
5427
|
-
/* @__PURE__ */
|
|
5474
|
+
/* @__PURE__ */ React68.createElement(Card.Media, { className: cx(
|
|
5428
5475
|
"bg-obsidian py-8 flex flex-col items-center justify-center",
|
|
5429
5476
|
mediaClassName
|
|
5430
|
-
) }, /* @__PURE__ */
|
|
5477
|
+
) }, /* @__PURE__ */ React68.createElement("div", { className: "mb-4 text-gold" }, /* @__PURE__ */ React68.createElement(Music, { size: 48 })), src && /* @__PURE__ */ React68.createElement("div", { className: "w-full px-4" }, /* @__PURE__ */ React68.createElement(
|
|
5431
5478
|
ReactPlayer2,
|
|
5432
5479
|
{
|
|
5433
5480
|
src,
|
|
@@ -5442,7 +5489,7 @@ var AudioCard = React67.forwardRef(
|
|
|
5442
5489
|
...playerProps
|
|
5443
5490
|
}
|
|
5444
5491
|
))),
|
|
5445
|
-
/* @__PURE__ */
|
|
5492
|
+
/* @__PURE__ */ React68.createElement(
|
|
5446
5493
|
Card.Header,
|
|
5447
5494
|
{
|
|
5448
5495
|
title,
|
|
@@ -5451,16 +5498,16 @@ var AudioCard = React67.forwardRef(
|
|
|
5451
5498
|
className: contentClassName
|
|
5452
5499
|
}
|
|
5453
5500
|
),
|
|
5454
|
-
children && /* @__PURE__ */
|
|
5501
|
+
children && /* @__PURE__ */ React68.createElement(Card.Body, { className: contentClassName }, children)
|
|
5455
5502
|
);
|
|
5456
5503
|
}
|
|
5457
5504
|
);
|
|
5458
5505
|
AudioCard.displayName = "AudioCard";
|
|
5459
5506
|
|
|
5460
5507
|
// src/components/PdfCard.tsx
|
|
5461
|
-
import
|
|
5508
|
+
import React69 from "react";
|
|
5462
5509
|
import { FileText as FileText2 } from "lucide-react";
|
|
5463
|
-
var PdfCard =
|
|
5510
|
+
var PdfCard = React69.forwardRef(
|
|
5464
5511
|
({
|
|
5465
5512
|
src,
|
|
5466
5513
|
title,
|
|
@@ -5474,7 +5521,7 @@ var PdfCard = React68.forwardRef(
|
|
|
5474
5521
|
loading,
|
|
5475
5522
|
...props
|
|
5476
5523
|
}, ref) => {
|
|
5477
|
-
return /* @__PURE__ */
|
|
5524
|
+
return /* @__PURE__ */ React69.createElement(
|
|
5478
5525
|
Card,
|
|
5479
5526
|
{
|
|
5480
5527
|
ref,
|
|
@@ -5482,13 +5529,13 @@ var PdfCard = React68.forwardRef(
|
|
|
5482
5529
|
loading,
|
|
5483
5530
|
...props
|
|
5484
5531
|
},
|
|
5485
|
-
/* @__PURE__ */
|
|
5532
|
+
/* @__PURE__ */ React69.createElement(
|
|
5486
5533
|
Card.Media,
|
|
5487
5534
|
{
|
|
5488
5535
|
className: cx("bg-obsidian", mediaClassName),
|
|
5489
5536
|
style: { height }
|
|
5490
5537
|
},
|
|
5491
|
-
src && /* @__PURE__ */
|
|
5538
|
+
src && /* @__PURE__ */ React69.createElement(
|
|
5492
5539
|
"iframe",
|
|
5493
5540
|
{
|
|
5494
5541
|
src: `${src}#view=FitH`,
|
|
@@ -5497,24 +5544,24 @@ var PdfCard = React68.forwardRef(
|
|
|
5497
5544
|
}
|
|
5498
5545
|
)
|
|
5499
5546
|
),
|
|
5500
|
-
/* @__PURE__ */
|
|
5547
|
+
/* @__PURE__ */ React69.createElement(
|
|
5501
5548
|
Card.Header,
|
|
5502
5549
|
{
|
|
5503
5550
|
title,
|
|
5504
5551
|
subtitle,
|
|
5505
5552
|
handle,
|
|
5506
5553
|
className: contentClassName,
|
|
5507
|
-
action: /* @__PURE__ */
|
|
5554
|
+
action: /* @__PURE__ */ React69.createElement("div", { className: "p-2 bg-ash/20 text-gold shrink-0" }, /* @__PURE__ */ React69.createElement(FileText2, { size: 20 }))
|
|
5508
5555
|
}
|
|
5509
5556
|
),
|
|
5510
|
-
children && /* @__PURE__ */
|
|
5557
|
+
children && /* @__PURE__ */ React69.createElement(Card.Body, { className: contentClassName }, children)
|
|
5511
5558
|
);
|
|
5512
5559
|
}
|
|
5513
5560
|
);
|
|
5514
5561
|
PdfCard.displayName = "PdfCard";
|
|
5515
5562
|
|
|
5516
5563
|
// src/components/ScriptCard.tsx
|
|
5517
|
-
import
|
|
5564
|
+
import React70 from "react";
|
|
5518
5565
|
var SCRIPT_ELEMENT_TYPES = {
|
|
5519
5566
|
SCENE_HEADING: "scene-heading",
|
|
5520
5567
|
ACTION: "action",
|
|
@@ -5528,28 +5575,28 @@ var SCRIPT_ELEMENT_TYPES = {
|
|
|
5528
5575
|
function ScriptElementRenderer({ element }) {
|
|
5529
5576
|
switch (element.type) {
|
|
5530
5577
|
case "scene-heading":
|
|
5531
|
-
return /* @__PURE__ */
|
|
5578
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "mt-4 mb-2 font-bold uppercase text-gold text-xs tracking-wide" }, element.content);
|
|
5532
5579
|
case "action":
|
|
5533
|
-
return /* @__PURE__ */
|
|
5580
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "my-2 text-silver text-xs leading-relaxed" }, element.content);
|
|
5534
5581
|
case "character":
|
|
5535
|
-
return /* @__PURE__ */
|
|
5582
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "mt-4 mb-0.5 ml-8 font-bold text-white text-xs uppercase tracking-wide" }, element.content);
|
|
5536
5583
|
case "parenthetical":
|
|
5537
|
-
return /* @__PURE__ */
|
|
5584
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "ml-6 text-silver/70 text-xs italic" }, "(", element.content, ")");
|
|
5538
5585
|
case "dialogue":
|
|
5539
|
-
return /* @__PURE__ */
|
|
5586
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "ml-4 mr-8 text-silver text-xs leading-relaxed" }, element.content);
|
|
5540
5587
|
case "transition":
|
|
5541
|
-
return /* @__PURE__ */
|
|
5588
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "mt-4 mb-2 text-right font-bold uppercase text-gold/80 text-xs tracking-wide" }, element.content);
|
|
5542
5589
|
case "title":
|
|
5543
|
-
return /* @__PURE__ */
|
|
5590
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "mt-6 mb-2 text-center font-bold text-gold text-sm" }, element.content);
|
|
5544
5591
|
case "subtitle":
|
|
5545
|
-
return /* @__PURE__ */
|
|
5592
|
+
return /* @__PURE__ */ React70.createElement("p", { className: "text-center italic text-gold/70 text-xs" }, element.content);
|
|
5546
5593
|
default:
|
|
5547
5594
|
return null;
|
|
5548
5595
|
}
|
|
5549
5596
|
}
|
|
5550
|
-
var ScriptCard =
|
|
5597
|
+
var ScriptCard = React70.forwardRef(
|
|
5551
5598
|
({ title, subtitle, handle, elements, maxHeight = "16rem", className, style, loading, ...rest }, ref) => {
|
|
5552
|
-
return /* @__PURE__ */
|
|
5599
|
+
return /* @__PURE__ */ React70.createElement(
|
|
5553
5600
|
Card,
|
|
5554
5601
|
{
|
|
5555
5602
|
ref,
|
|
@@ -5557,7 +5604,7 @@ var ScriptCard = React69.forwardRef(
|
|
|
5557
5604
|
loading,
|
|
5558
5605
|
...rest
|
|
5559
5606
|
},
|
|
5560
|
-
/* @__PURE__ */
|
|
5607
|
+
/* @__PURE__ */ React70.createElement(
|
|
5561
5608
|
Card.Header,
|
|
5562
5609
|
{
|
|
5563
5610
|
title,
|
|
@@ -5565,13 +5612,13 @@ var ScriptCard = React69.forwardRef(
|
|
|
5565
5612
|
handle
|
|
5566
5613
|
}
|
|
5567
5614
|
),
|
|
5568
|
-
/* @__PURE__ */
|
|
5615
|
+
/* @__PURE__ */ React70.createElement(
|
|
5569
5616
|
Card.Body,
|
|
5570
5617
|
{
|
|
5571
5618
|
className: "font-mono overflow-y-auto",
|
|
5572
5619
|
style: { maxHeight, ...style }
|
|
5573
5620
|
},
|
|
5574
|
-
elements.map((element, index) => /* @__PURE__ */
|
|
5621
|
+
elements.map((element, index) => /* @__PURE__ */ React70.createElement(ScriptElementRenderer, { key: index, element }))
|
|
5575
5622
|
)
|
|
5576
5623
|
);
|
|
5577
5624
|
}
|
|
@@ -5579,8 +5626,8 @@ var ScriptCard = React69.forwardRef(
|
|
|
5579
5626
|
ScriptCard.displayName = "ScriptCard";
|
|
5580
5627
|
|
|
5581
5628
|
// src/components/TextCard.tsx
|
|
5582
|
-
import
|
|
5583
|
-
var TextCard =
|
|
5629
|
+
import React71 from "react";
|
|
5630
|
+
var TextCard = React71.forwardRef(
|
|
5584
5631
|
({
|
|
5585
5632
|
content,
|
|
5586
5633
|
title,
|
|
@@ -5593,7 +5640,7 @@ var TextCard = React70.forwardRef(
|
|
|
5593
5640
|
loading,
|
|
5594
5641
|
...props
|
|
5595
5642
|
}, ref) => {
|
|
5596
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ React71.createElement(
|
|
5597
5644
|
Card,
|
|
5598
5645
|
{
|
|
5599
5646
|
ref,
|
|
@@ -5601,7 +5648,7 @@ var TextCard = React70.forwardRef(
|
|
|
5601
5648
|
loading,
|
|
5602
5649
|
...props
|
|
5603
5650
|
},
|
|
5604
|
-
/* @__PURE__ */
|
|
5651
|
+
/* @__PURE__ */ React71.createElement(
|
|
5605
5652
|
Card.Header,
|
|
5606
5653
|
{
|
|
5607
5654
|
title,
|
|
@@ -5609,13 +5656,13 @@ var TextCard = React70.forwardRef(
|
|
|
5609
5656
|
handle
|
|
5610
5657
|
}
|
|
5611
5658
|
),
|
|
5612
|
-
/* @__PURE__ */
|
|
5659
|
+
/* @__PURE__ */ React71.createElement(
|
|
5613
5660
|
Card.Body,
|
|
5614
5661
|
{
|
|
5615
5662
|
className: cx("overflow-y-auto", contentClassName),
|
|
5616
5663
|
style: { maxHeight }
|
|
5617
5664
|
},
|
|
5618
|
-
/* @__PURE__ */
|
|
5665
|
+
/* @__PURE__ */ React71.createElement(
|
|
5619
5666
|
MarkdownContent,
|
|
5620
5667
|
{
|
|
5621
5668
|
content,
|
|
@@ -5630,8 +5677,8 @@ var TextCard = React70.forwardRef(
|
|
|
5630
5677
|
TextCard.displayName = "TextCard";
|
|
5631
5678
|
|
|
5632
5679
|
// src/components/DeliverableCard.tsx
|
|
5633
|
-
import
|
|
5634
|
-
var DeliverableCard =
|
|
5680
|
+
import React72 from "react";
|
|
5681
|
+
var DeliverableCard = React72.forwardRef(
|
|
5635
5682
|
({
|
|
5636
5683
|
deliverable,
|
|
5637
5684
|
title,
|
|
@@ -5650,7 +5697,7 @@ var DeliverableCard = React71.forwardRef(
|
|
|
5650
5697
|
const accent = deliverable?.accentColor?.trim();
|
|
5651
5698
|
const style = accent ? { "--deliverable-accent": accent } : void 0;
|
|
5652
5699
|
const sectionCount = deliverable?.sections.length ?? 0;
|
|
5653
|
-
return /* @__PURE__ */
|
|
5700
|
+
return /* @__PURE__ */ React72.createElement(
|
|
5654
5701
|
Card,
|
|
5655
5702
|
{
|
|
5656
5703
|
ref,
|
|
@@ -5661,8 +5708,8 @@ var DeliverableCard = React71.forwardRef(
|
|
|
5661
5708
|
style,
|
|
5662
5709
|
...props
|
|
5663
5710
|
},
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
/* @__PURE__ */
|
|
5711
|
+
/* @__PURE__ */ React72.createElement("div", { className: "deliverable-card-cover" }, eyebrow && /* @__PURE__ */ React72.createElement("p", { className: "deliverable-card-eyebrow" }, eyebrow), headline && /* @__PURE__ */ React72.createElement("p", { className: "deliverable-card-title" }, headline), tagline && /* @__PURE__ */ React72.createElement("p", { className: "deliverable-card-subtitle" }, tagline)),
|
|
5712
|
+
/* @__PURE__ */ React72.createElement("div", { className: "deliverable-card-meta flex items-center justify-between" }, /* @__PURE__ */ React72.createElement("span", null, sectionCount, " ", sectionCount === 1 ? "section" : "sections"), handle && /* @__PURE__ */ React72.createElement(Card.Handle, { handle }))
|
|
5666
5713
|
);
|
|
5667
5714
|
}
|
|
5668
5715
|
);
|
|
@@ -5693,7 +5740,7 @@ var ARTIFACT_TYPES = {
|
|
|
5693
5740
|
PDF: "PDF",
|
|
5694
5741
|
DELIVERABLE: "DELIVERABLE"
|
|
5695
5742
|
};
|
|
5696
|
-
var ArtifactCard =
|
|
5743
|
+
var ArtifactCard = React73.forwardRef(
|
|
5697
5744
|
({ artifact, onExpand, loading, className, ...props }, ref) => {
|
|
5698
5745
|
const derivedLoading = deriveCardSlotLoading(artifact);
|
|
5699
5746
|
const commonProps = {
|
|
@@ -5715,7 +5762,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5715
5762
|
const renderContent = () => {
|
|
5716
5763
|
switch (artifact.type) {
|
|
5717
5764
|
case "IMAGE":
|
|
5718
|
-
return /* @__PURE__ */
|
|
5765
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5719
5766
|
ImageCard,
|
|
5720
5767
|
{
|
|
5721
5768
|
...commonProps,
|
|
@@ -5725,7 +5772,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5725
5772
|
}
|
|
5726
5773
|
);
|
|
5727
5774
|
case "VIDEO":
|
|
5728
|
-
return /* @__PURE__ */
|
|
5775
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5729
5776
|
VideoCard,
|
|
5730
5777
|
{
|
|
5731
5778
|
...commonProps,
|
|
@@ -5735,7 +5782,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5735
5782
|
}
|
|
5736
5783
|
);
|
|
5737
5784
|
case "AUDIO":
|
|
5738
|
-
return /* @__PURE__ */
|
|
5785
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5739
5786
|
AudioCard,
|
|
5740
5787
|
{
|
|
5741
5788
|
...commonProps,
|
|
@@ -5744,7 +5791,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5744
5791
|
}
|
|
5745
5792
|
);
|
|
5746
5793
|
case "PDF":
|
|
5747
|
-
return /* @__PURE__ */
|
|
5794
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5748
5795
|
PdfCard,
|
|
5749
5796
|
{
|
|
5750
5797
|
...commonProps,
|
|
@@ -5752,7 +5799,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5752
5799
|
}
|
|
5753
5800
|
);
|
|
5754
5801
|
case "SCRIPT":
|
|
5755
|
-
return /* @__PURE__ */
|
|
5802
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5756
5803
|
ScriptCard,
|
|
5757
5804
|
{
|
|
5758
5805
|
...commonProps,
|
|
@@ -5761,7 +5808,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5761
5808
|
}
|
|
5762
5809
|
);
|
|
5763
5810
|
case "TEXT":
|
|
5764
|
-
return /* @__PURE__ */
|
|
5811
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5765
5812
|
TextCard,
|
|
5766
5813
|
{
|
|
5767
5814
|
...commonProps,
|
|
@@ -5773,7 +5820,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5773
5820
|
}
|
|
5774
5821
|
);
|
|
5775
5822
|
case "DELIVERABLE":
|
|
5776
|
-
return /* @__PURE__ */
|
|
5823
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5777
5824
|
DeliverableCard,
|
|
5778
5825
|
{
|
|
5779
5826
|
...commonProps,
|
|
@@ -5787,7 +5834,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5787
5834
|
}
|
|
5788
5835
|
};
|
|
5789
5836
|
const isCardExpandable = !!onExpand && (artifact.type === "IMAGE" || artifact.type === "PDF" || artifact.type === "SCRIPT" || artifact.type === "TEXT" || artifact.type === "DELIVERABLE");
|
|
5790
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ React73.createElement(
|
|
5791
5838
|
"div",
|
|
5792
5839
|
{
|
|
5793
5840
|
ref,
|
|
@@ -5800,7 +5847,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5800
5847
|
onClick: isCardExpandable ? handleExpand : void 0,
|
|
5801
5848
|
...props
|
|
5802
5849
|
},
|
|
5803
|
-
onExpand && /* @__PURE__ */
|
|
5850
|
+
onExpand && /* @__PURE__ */ React73.createElement(
|
|
5804
5851
|
"button",
|
|
5805
5852
|
{
|
|
5806
5853
|
onClick: handleExpand,
|
|
@@ -5811,7 +5858,7 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5811
5858
|
),
|
|
5812
5859
|
"aria-label": "Expand artifact"
|
|
5813
5860
|
},
|
|
5814
|
-
/* @__PURE__ */
|
|
5861
|
+
/* @__PURE__ */ React73.createElement(ExpandIcon, { className: "w-4 h-4" })
|
|
5815
5862
|
),
|
|
5816
5863
|
renderContent()
|
|
5817
5864
|
);
|
|
@@ -5820,10 +5867,10 @@ var ArtifactCard = React72.forwardRef(
|
|
|
5820
5867
|
ArtifactCard.displayName = "ArtifactCard";
|
|
5821
5868
|
|
|
5822
5869
|
// src/components/ArtifactGroup.tsx
|
|
5823
|
-
import
|
|
5870
|
+
import React74, { useEffect as useEffect12, useRef as useRef11, useState as useState18 } from "react";
|
|
5824
5871
|
var LAYER_OFFSET = "8px";
|
|
5825
5872
|
var LAYER_OFFSET_2X = "16px";
|
|
5826
|
-
var ArtifactGroup =
|
|
5873
|
+
var ArtifactGroup = React74.forwardRef(
|
|
5827
5874
|
({ node, onClick, className, ...props }, ref) => {
|
|
5828
5875
|
const children = node.children;
|
|
5829
5876
|
const count = children.length;
|
|
@@ -5845,21 +5892,21 @@ var ArtifactGroup = React73.forwardRef(
|
|
|
5845
5892
|
};
|
|
5846
5893
|
const renderFrontContent = () => {
|
|
5847
5894
|
if (!frontChild) {
|
|
5848
|
-
return /* @__PURE__ */
|
|
5895
|
+
return /* @__PURE__ */ React74.createElement("div", { className: "w-full aspect-video bg-graphite border border-ash/40 flex items-center justify-center" }, /* @__PURE__ */ React74.createElement("span", { className: "text-silver text-sm" }, "Empty group"));
|
|
5849
5896
|
}
|
|
5850
5897
|
if (frontChild.type === "ARTIFACT" && frontChild.artifact) {
|
|
5851
|
-
return /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ React74.createElement(ArtifactCard, { artifact: frontChild.artifact, className: "w-full" });
|
|
5852
5899
|
}
|
|
5853
|
-
return /* @__PURE__ */
|
|
5900
|
+
return /* @__PURE__ */ React74.createElement(
|
|
5854
5901
|
"div",
|
|
5855
5902
|
{
|
|
5856
5903
|
className: "w-full aspect-video bg-graphite border border-gold/30 flex flex-col items-center justify-center gap-2 p-4"
|
|
5857
5904
|
},
|
|
5858
|
-
/* @__PURE__ */
|
|
5859
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ React74.createElement("span", { className: "text-sm text-silver uppercase tracking-wider" }, frontChild.type === "GROUP" ? "Group" : "Variants"),
|
|
5906
|
+
/* @__PURE__ */ React74.createElement("span", { className: "text-white font-semibold" }, frontChild.label)
|
|
5860
5907
|
);
|
|
5861
5908
|
};
|
|
5862
|
-
return /* @__PURE__ */
|
|
5909
|
+
return /* @__PURE__ */ React74.createElement(
|
|
5863
5910
|
"div",
|
|
5864
5911
|
{
|
|
5865
5912
|
ref,
|
|
@@ -5879,21 +5926,21 @@ var ArtifactGroup = React73.forwardRef(
|
|
|
5879
5926
|
"aria-label": `${node.label} \u2014 ${count} items`,
|
|
5880
5927
|
...props
|
|
5881
5928
|
},
|
|
5882
|
-
/* @__PURE__ */
|
|
5929
|
+
/* @__PURE__ */ React74.createElement(Card, { noPadding: true, className: "p-5" }, /* @__PURE__ */ React74.createElement("h3", { className: "text-lg font-semibold text-white m-0 mb-4" }, node.label), /* @__PURE__ */ React74.createElement("div", { style: { paddingRight: LAYER_OFFSET_2X, paddingBottom: LAYER_OFFSET_2X } }, /* @__PURE__ */ React74.createElement("div", { className: "relative" }, /* @__PURE__ */ React74.createElement(
|
|
5883
5930
|
"div",
|
|
5884
5931
|
{
|
|
5885
5932
|
className: "absolute inset-0 bg-charcoal border border-ash/30 pointer-events-none",
|
|
5886
5933
|
style: { transform: `translate(${LAYER_OFFSET_2X}, ${LAYER_OFFSET_2X})` },
|
|
5887
5934
|
"aria-hidden": "true"
|
|
5888
5935
|
}
|
|
5889
|
-
), /* @__PURE__ */
|
|
5936
|
+
), /* @__PURE__ */ React74.createElement(
|
|
5890
5937
|
"div",
|
|
5891
5938
|
{
|
|
5892
5939
|
className: "absolute inset-0 bg-charcoal border border-ash/40 pointer-events-none",
|
|
5893
5940
|
style: { transform: `translate(${LAYER_OFFSET}, ${LAYER_OFFSET})` },
|
|
5894
5941
|
"aria-hidden": "true"
|
|
5895
5942
|
}
|
|
5896
|
-
), /* @__PURE__ */
|
|
5943
|
+
), /* @__PURE__ */ React74.createElement("div", { className: "relative transition-transform duration-200 group-hover:-translate-y-0.5" }, renderFrontContent()), /* @__PURE__ */ React74.createElement(
|
|
5897
5944
|
"div",
|
|
5898
5945
|
{
|
|
5899
5946
|
className: "absolute -top-2 -right-2 z-10 min-w-6 h-6 px-1.5 flex items-center justify-center bg-gold text-obsidian text-xs font-bold",
|
|
@@ -5907,13 +5954,13 @@ var ArtifactGroup = React73.forwardRef(
|
|
|
5907
5954
|
ArtifactGroup.displayName = "ArtifactGroup";
|
|
5908
5955
|
|
|
5909
5956
|
// src/components/ArtifactVariantStack.tsx
|
|
5910
|
-
import
|
|
5911
|
-
var ArtifactVariantStack =
|
|
5957
|
+
import React75 from "react";
|
|
5958
|
+
var ArtifactVariantStack = React75.forwardRef(
|
|
5912
5959
|
({ node, onExpandArtifact, onGroupClick, className, ...props }, ref) => {
|
|
5913
5960
|
const children = node.children;
|
|
5914
5961
|
const renderChild = (child) => {
|
|
5915
5962
|
if (child.type === "ARTIFACT" && child.artifact) {
|
|
5916
|
-
return /* @__PURE__ */
|
|
5963
|
+
return /* @__PURE__ */ React75.createElement("div", { key: child.id, className: "flex-1 min-w-0" }, /* @__PURE__ */ React75.createElement(
|
|
5917
5964
|
ArtifactCard,
|
|
5918
5965
|
{
|
|
5919
5966
|
artifact: child.artifact,
|
|
@@ -5923,18 +5970,18 @@ var ArtifactVariantStack = React74.forwardRef(
|
|
|
5923
5970
|
));
|
|
5924
5971
|
}
|
|
5925
5972
|
if (child.type === "GROUP") {
|
|
5926
|
-
return /* @__PURE__ */
|
|
5973
|
+
return /* @__PURE__ */ React75.createElement("div", { key: child.id, className: "flex-1 min-w-0" }, /* @__PURE__ */ React75.createElement(ArtifactGroup, { node: child, onClick: onGroupClick }));
|
|
5927
5974
|
}
|
|
5928
|
-
return /* @__PURE__ */
|
|
5975
|
+
return /* @__PURE__ */ React75.createElement("div", { key: child.id, className: "flex-1 min-w-0" }, /* @__PURE__ */ React75.createElement(
|
|
5929
5976
|
"div",
|
|
5930
5977
|
{
|
|
5931
5978
|
className: "aspect-video bg-graphite border border-gold/30 flex flex-col items-center justify-center gap-2 p-4"
|
|
5932
5979
|
},
|
|
5933
|
-
/* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
5980
|
+
/* @__PURE__ */ React75.createElement("span", { className: "text-xs text-silver uppercase tracking-wider" }, "Variants"),
|
|
5981
|
+
/* @__PURE__ */ React75.createElement("span", { className: "text-sm text-white font-semibold truncate max-w-full" }, child.label)
|
|
5935
5982
|
));
|
|
5936
5983
|
};
|
|
5937
|
-
return /* @__PURE__ */
|
|
5984
|
+
return /* @__PURE__ */ React75.createElement(
|
|
5938
5985
|
Card,
|
|
5939
5986
|
{
|
|
5940
5987
|
ref,
|
|
@@ -5942,27 +5989,27 @@ var ArtifactVariantStack = React74.forwardRef(
|
|
|
5942
5989
|
className: cx("w-full p-5", className),
|
|
5943
5990
|
...props
|
|
5944
5991
|
},
|
|
5945
|
-
/* @__PURE__ */
|
|
5946
|
-
/* @__PURE__ */
|
|
5992
|
+
/* @__PURE__ */ React75.createElement("h3", { className: "text-lg font-semibold text-white m-0 mb-4" }, node.label),
|
|
5993
|
+
/* @__PURE__ */ React75.createElement("div", { className: "flex gap-3" }, children.map(renderChild))
|
|
5947
5994
|
);
|
|
5948
5995
|
}
|
|
5949
5996
|
);
|
|
5950
5997
|
ArtifactVariantStack.displayName = "ArtifactVariantStack";
|
|
5951
5998
|
|
|
5952
5999
|
// src/components/ArtifactLightboxBody.tsx
|
|
5953
|
-
import
|
|
6000
|
+
import React83 from "react";
|
|
5954
6001
|
|
|
5955
6002
|
// src/components/deliverable/DeliverableRenderer.tsx
|
|
5956
|
-
import
|
|
6003
|
+
import React82, { useState as useState19 } from "react";
|
|
5957
6004
|
|
|
5958
6005
|
// src/components/deliverable/CoverSection.tsx
|
|
5959
|
-
import
|
|
6006
|
+
import React76 from "react";
|
|
5960
6007
|
function CoverSection({ data, clientName }) {
|
|
5961
|
-
return /* @__PURE__ */
|
|
6008
|
+
return /* @__PURE__ */ React76.createElement("section", { className: "deliverable-cover deliverable-page" }, /* @__PURE__ */ React76.createElement("div", { className: "deliverable-cover-inner" }, data.eyebrow && /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement("p", { className: "deliverable-cover-eyebrow" }, data.eyebrow), /* @__PURE__ */ React76.createElement("div", { className: "deliverable-cover-rule", "aria-hidden": "true" })), /* @__PURE__ */ React76.createElement("h1", { className: "deliverable-cover-title" }, data.title), data.subtitle && /* @__PURE__ */ React76.createElement("p", { className: "deliverable-cover-subtitle" }, data.subtitle), clientName && /* @__PURE__ */ React76.createElement("p", { className: "deliverable-cover-client" }, "Prepared for", " ", /* @__PURE__ */ React76.createElement("span", { className: "deliverable-cover-client-name" }, clientName))));
|
|
5962
6009
|
}
|
|
5963
6010
|
|
|
5964
6011
|
// src/components/deliverable/ArtifactImageGridSection.tsx
|
|
5965
|
-
import
|
|
6012
|
+
import React77 from "react";
|
|
5966
6013
|
var COLUMN_CLASSES = {
|
|
5967
6014
|
1: "deliverable-image-grid-cols-1",
|
|
5968
6015
|
2: "deliverable-image-grid-cols-2",
|
|
@@ -5977,7 +6024,7 @@ var ASPECT_CLASSES = {
|
|
|
5977
6024
|
function ArtifactImageGridSection({ data }) {
|
|
5978
6025
|
const columns = clampColumns(data.columns);
|
|
5979
6026
|
const aspect = data.aspectRatio ?? "landscape";
|
|
5980
|
-
return /* @__PURE__ */
|
|
6027
|
+
return /* @__PURE__ */ React77.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React77.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React77.createElement(
|
|
5981
6028
|
"div",
|
|
5982
6029
|
{
|
|
5983
6030
|
className: cx(
|
|
@@ -5986,14 +6033,14 @@ function ArtifactImageGridSection({ data }) {
|
|
|
5986
6033
|
ASPECT_CLASSES[aspect]
|
|
5987
6034
|
)
|
|
5988
6035
|
},
|
|
5989
|
-
data.items.map((item, idx) => /* @__PURE__ */
|
|
6036
|
+
data.items.map((item, idx) => /* @__PURE__ */ React77.createElement("figure", { key: idx, className: "deliverable-image-item" }, item.artifact.url ? /* @__PURE__ */ React77.createElement(
|
|
5990
6037
|
"img",
|
|
5991
6038
|
{
|
|
5992
6039
|
src: item.artifact.url,
|
|
5993
6040
|
alt: item.artifact.title ?? "",
|
|
5994
6041
|
className: "deliverable-image-img"
|
|
5995
6042
|
}
|
|
5996
|
-
) : /* @__PURE__ */
|
|
6043
|
+
) : /* @__PURE__ */ React77.createElement("div", { className: "deliverable-image-missing" }, "Missing image"), item.caption && /* @__PURE__ */ React77.createElement("figcaption", { className: "deliverable-image-caption" }, item.caption)))
|
|
5997
6044
|
));
|
|
5998
6045
|
}
|
|
5999
6046
|
function clampColumns(n) {
|
|
@@ -6003,7 +6050,7 @@ function clampColumns(n) {
|
|
|
6003
6050
|
}
|
|
6004
6051
|
|
|
6005
6052
|
// src/components/deliverable/ArtifactSpotlightSection.tsx
|
|
6006
|
-
import
|
|
6053
|
+
import React78 from "react";
|
|
6007
6054
|
var VARIANT_CLASSES = {
|
|
6008
6055
|
framed: null,
|
|
6009
6056
|
"full-bleed": "deliverable-spotlight-variant-full-bleed",
|
|
@@ -6011,14 +6058,14 @@ var VARIANT_CLASSES = {
|
|
|
6011
6058
|
};
|
|
6012
6059
|
function ArtifactSpotlightSection({ data }) {
|
|
6013
6060
|
const variant = data.variant ?? "framed";
|
|
6014
|
-
return /* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ React78.createElement("section", { className: cx("deliverable-page", VARIANT_CLASSES[variant]) }, data.heading && /* @__PURE__ */ React78.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React78.createElement("div", { className: "deliverable-spotlight-media" }, data.artifact.url ? /* @__PURE__ */ React78.createElement(
|
|
6015
6062
|
"img",
|
|
6016
6063
|
{
|
|
6017
6064
|
src: data.artifact.url,
|
|
6018
6065
|
alt: data.artifact.title ?? "",
|
|
6019
6066
|
className: "deliverable-spotlight-img"
|
|
6020
6067
|
}
|
|
6021
|
-
) : /* @__PURE__ */
|
|
6068
|
+
) : /* @__PURE__ */ React78.createElement("div", { className: "deliverable-spotlight-missing" }, "Missing image")), data.body && /* @__PURE__ */ React78.createElement(
|
|
6022
6069
|
MarkdownContent,
|
|
6023
6070
|
{
|
|
6024
6071
|
content: data.body,
|
|
@@ -6028,9 +6075,9 @@ function ArtifactSpotlightSection({ data }) {
|
|
|
6028
6075
|
}
|
|
6029
6076
|
|
|
6030
6077
|
// src/components/deliverable/TextBlockSection.tsx
|
|
6031
|
-
import
|
|
6078
|
+
import React79 from "react";
|
|
6032
6079
|
function TextBlockSection({ data }) {
|
|
6033
|
-
return /* @__PURE__ */
|
|
6080
|
+
return /* @__PURE__ */ React79.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React79.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React79.createElement(
|
|
6034
6081
|
MarkdownContent,
|
|
6035
6082
|
{
|
|
6036
6083
|
content: data.body,
|
|
@@ -6040,22 +6087,22 @@ function TextBlockSection({ data }) {
|
|
|
6040
6087
|
}
|
|
6041
6088
|
|
|
6042
6089
|
// src/components/deliverable/ColorPaletteSection.tsx
|
|
6043
|
-
import
|
|
6090
|
+
import React80 from "react";
|
|
6044
6091
|
function ColorPaletteSection({ data }) {
|
|
6045
|
-
return /* @__PURE__ */
|
|
6092
|
+
return /* @__PURE__ */ React80.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React80.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React80.createElement("div", { className: "deliverable-palette" }, data.swatches.map((swatch, idx) => /* @__PURE__ */ React80.createElement("div", { key: idx, className: "deliverable-palette-item" }, /* @__PURE__ */ React80.createElement(
|
|
6046
6093
|
"div",
|
|
6047
6094
|
{
|
|
6048
6095
|
className: "deliverable-palette-chip",
|
|
6049
6096
|
style: { backgroundColor: swatch.color },
|
|
6050
6097
|
"aria-label": swatch.label
|
|
6051
6098
|
}
|
|
6052
|
-
), /* @__PURE__ */
|
|
6099
|
+
), /* @__PURE__ */ React80.createElement("p", { className: "deliverable-palette-label" }, swatch.label), /* @__PURE__ */ React80.createElement("p", { className: "deliverable-palette-hex" }, swatch.color.toUpperCase())))));
|
|
6053
6100
|
}
|
|
6054
6101
|
|
|
6055
6102
|
// src/components/deliverable/QuoteBlockSection.tsx
|
|
6056
|
-
import
|
|
6103
|
+
import React81 from "react";
|
|
6057
6104
|
function QuoteBlockSection({ data }) {
|
|
6058
|
-
return /* @__PURE__ */
|
|
6105
|
+
return /* @__PURE__ */ React81.createElement("section", { className: "deliverable-page deliverable-quote" }, /* @__PURE__ */ React81.createElement("blockquote", { className: "deliverable-quote-body" }, /* @__PURE__ */ React81.createElement("p", { className: "deliverable-quote-text" }, "\u201C", data.quote, "\u201D"), data.attribution && /* @__PURE__ */ React81.createElement("footer", { className: "deliverable-quote-attribution" }, "\u2014 ", data.attribution)));
|
|
6059
6106
|
}
|
|
6060
6107
|
|
|
6061
6108
|
// src/components/deliverable/DeliverableRenderer.tsx
|
|
@@ -6085,14 +6132,14 @@ function DeliverableRenderer({
|
|
|
6085
6132
|
setIsDownloading(false);
|
|
6086
6133
|
}
|
|
6087
6134
|
};
|
|
6088
|
-
return /* @__PURE__ */
|
|
6135
|
+
return /* @__PURE__ */ React82.createElement(
|
|
6089
6136
|
"div",
|
|
6090
6137
|
{
|
|
6091
6138
|
className: cx("deliverable", themeClass, className),
|
|
6092
6139
|
style
|
|
6093
6140
|
},
|
|
6094
6141
|
deliverable.sections.map((section, idx) => renderSection(section, idx, deliverable)),
|
|
6095
|
-
!hideActions && onDownloadPdf && /* @__PURE__ */
|
|
6142
|
+
!hideActions && onDownloadPdf && /* @__PURE__ */ React82.createElement("div", { className: "deliverable-actions" }, /* @__PURE__ */ React82.createElement(
|
|
6096
6143
|
Button,
|
|
6097
6144
|
{
|
|
6098
6145
|
variant: "important",
|
|
@@ -6109,7 +6156,7 @@ function renderSection(section, idx, doc) {
|
|
|
6109
6156
|
const key = `${section.type}-${idx}`;
|
|
6110
6157
|
switch (section.type) {
|
|
6111
6158
|
case "COVER":
|
|
6112
|
-
return /* @__PURE__ */
|
|
6159
|
+
return /* @__PURE__ */ React82.createElement(
|
|
6113
6160
|
CoverSection,
|
|
6114
6161
|
{
|
|
6115
6162
|
key,
|
|
@@ -6118,15 +6165,15 @@ function renderSection(section, idx, doc) {
|
|
|
6118
6165
|
}
|
|
6119
6166
|
);
|
|
6120
6167
|
case "ARTIFACT_IMAGE_GRID":
|
|
6121
|
-
return /* @__PURE__ */
|
|
6168
|
+
return /* @__PURE__ */ React82.createElement(ArtifactImageGridSection, { key, data: section });
|
|
6122
6169
|
case "ARTIFACT_SPOTLIGHT":
|
|
6123
|
-
return /* @__PURE__ */
|
|
6170
|
+
return /* @__PURE__ */ React82.createElement(ArtifactSpotlightSection, { key, data: section });
|
|
6124
6171
|
case "TEXT_BLOCK":
|
|
6125
|
-
return /* @__PURE__ */
|
|
6172
|
+
return /* @__PURE__ */ React82.createElement(TextBlockSection, { key, data: section });
|
|
6126
6173
|
case "COLOR_PALETTE":
|
|
6127
|
-
return /* @__PURE__ */
|
|
6174
|
+
return /* @__PURE__ */ React82.createElement(ColorPaletteSection, { key, data: section });
|
|
6128
6175
|
case "QUOTE_BLOCK":
|
|
6129
|
-
return /* @__PURE__ */
|
|
6176
|
+
return /* @__PURE__ */ React82.createElement(QuoteBlockSection, { key, data: section });
|
|
6130
6177
|
default:
|
|
6131
6178
|
return null;
|
|
6132
6179
|
}
|
|
@@ -6137,9 +6184,9 @@ function ArtifactLightboxBody({ artifact }) {
|
|
|
6137
6184
|
switch (artifact.type) {
|
|
6138
6185
|
case ARTIFACT_TYPES.DELIVERABLE: {
|
|
6139
6186
|
if (!artifact.deliverable) {
|
|
6140
|
-
return /* @__PURE__ */
|
|
6187
|
+
return /* @__PURE__ */ React83.createElement(ArtifactCard, { artifact });
|
|
6141
6188
|
}
|
|
6142
|
-
return /* @__PURE__ */
|
|
6189
|
+
return /* @__PURE__ */ React83.createElement("div", { className: "w-full h-full overflow-auto" }, /* @__PURE__ */ React83.createElement(
|
|
6143
6190
|
DeliverableRenderer,
|
|
6144
6191
|
{
|
|
6145
6192
|
deliverable: artifact.deliverable,
|
|
@@ -6149,9 +6196,9 @@ function ArtifactLightboxBody({ artifact }) {
|
|
|
6149
6196
|
}
|
|
6150
6197
|
case ARTIFACT_TYPES.IMAGE: {
|
|
6151
6198
|
if (!artifact.url) {
|
|
6152
|
-
return /* @__PURE__ */
|
|
6199
|
+
return /* @__PURE__ */ React83.createElement(ArtifactCard, { artifact });
|
|
6153
6200
|
}
|
|
6154
|
-
return /* @__PURE__ */
|
|
6201
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6155
6202
|
"img",
|
|
6156
6203
|
{
|
|
6157
6204
|
src: artifact.url,
|
|
@@ -6162,9 +6209,9 @@ function ArtifactLightboxBody({ artifact }) {
|
|
|
6162
6209
|
}
|
|
6163
6210
|
case ARTIFACT_TYPES.VIDEO: {
|
|
6164
6211
|
if (!artifact.url) {
|
|
6165
|
-
return /* @__PURE__ */
|
|
6212
|
+
return /* @__PURE__ */ React83.createElement(ArtifactCard, { artifact });
|
|
6166
6213
|
}
|
|
6167
|
-
return /* @__PURE__ */
|
|
6214
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6168
6215
|
"video",
|
|
6169
6216
|
{
|
|
6170
6217
|
src: artifact.url,
|
|
@@ -6175,9 +6222,9 @@ function ArtifactLightboxBody({ artifact }) {
|
|
|
6175
6222
|
}
|
|
6176
6223
|
case ARTIFACT_TYPES.AUDIO: {
|
|
6177
6224
|
if (!artifact.url) {
|
|
6178
|
-
return /* @__PURE__ */
|
|
6225
|
+
return /* @__PURE__ */ React83.createElement(ArtifactCard, { artifact });
|
|
6179
6226
|
}
|
|
6180
|
-
return /* @__PURE__ */
|
|
6227
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6181
6228
|
"audio",
|
|
6182
6229
|
{
|
|
6183
6230
|
src: artifact.url,
|
|
@@ -6187,7 +6234,7 @@ function ArtifactLightboxBody({ artifact }) {
|
|
|
6187
6234
|
);
|
|
6188
6235
|
}
|
|
6189
6236
|
default:
|
|
6190
|
-
return /* @__PURE__ */
|
|
6237
|
+
return /* @__PURE__ */ React83.createElement(ArtifactCard, { artifact });
|
|
6191
6238
|
}
|
|
6192
6239
|
}
|
|
6193
6240
|
function getArtifactLightboxCaption(artifact) {
|
|
@@ -6197,7 +6244,7 @@ function getArtifactLightboxCaption(artifact) {
|
|
|
6197
6244
|
if (!artifact.title && !artifact.subtitle) {
|
|
6198
6245
|
return null;
|
|
6199
6246
|
}
|
|
6200
|
-
return /* @__PURE__ */
|
|
6247
|
+
return /* @__PURE__ */ React83.createElement("div", { className: "inline-flex flex-col items-center gap-1 px-4 py-2 bg-charcoal/70 backdrop-blur border border-ash/40" }, artifact.title && /* @__PURE__ */ React83.createElement("p", { className: "text-xs uppercase tracking-wider text-silver" }, artifact.title), artifact.subtitle && /* @__PURE__ */ React83.createElement("p", { className: "text-xs text-silver/70" }, artifact.subtitle));
|
|
6201
6248
|
}
|
|
6202
6249
|
|
|
6203
6250
|
// src/components/chat/hooks/useResizable.ts
|
|
@@ -6296,19 +6343,25 @@ function useArtifactTreeNavigation(rootNodes) {
|
|
|
6296
6343
|
|
|
6297
6344
|
// src/components/chat/ArtifactsPanel.tsx
|
|
6298
6345
|
var ZOOM_LEVELS = [0.25, 0.5, 0.75, 1];
|
|
6346
|
+
var FULL_CARD_SLOT_LOADING = {
|
|
6347
|
+
header: { title: true, subtitle: true },
|
|
6348
|
+
media: true,
|
|
6349
|
+
body: true
|
|
6350
|
+
};
|
|
6351
|
+
var COLD_START_PLACEHOLDER_COUNT = 3;
|
|
6299
6352
|
function ArtifactLightbox({
|
|
6300
6353
|
artifact,
|
|
6301
6354
|
onClose,
|
|
6302
6355
|
getArtifactActions
|
|
6303
6356
|
}) {
|
|
6304
|
-
return /* @__PURE__ */
|
|
6357
|
+
return /* @__PURE__ */ React84.createElement(
|
|
6305
6358
|
Lightbox,
|
|
6306
6359
|
{
|
|
6307
6360
|
onClose,
|
|
6308
6361
|
actions: getArtifactActions?.(artifact, { onClose }),
|
|
6309
6362
|
caption: getArtifactLightboxCaption(artifact)
|
|
6310
6363
|
},
|
|
6311
|
-
/* @__PURE__ */
|
|
6364
|
+
/* @__PURE__ */ React84.createElement(ArtifactLightboxBody, { artifact })
|
|
6312
6365
|
);
|
|
6313
6366
|
}
|
|
6314
6367
|
function findArtifactInNodes(nodes, artifactId) {
|
|
@@ -6325,6 +6378,9 @@ function findArtifactInNodes(nodes, artifactId) {
|
|
|
6325
6378
|
}
|
|
6326
6379
|
return null;
|
|
6327
6380
|
}
|
|
6381
|
+
function ColdStartPlaceholders() {
|
|
6382
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, Array.from({ length: COLD_START_PLACEHOLDER_COUNT }, (_, i) => /* @__PURE__ */ React84.createElement(Skeleton, { key: i, className: "w-full aspect-video" })));
|
|
6383
|
+
}
|
|
6328
6384
|
function NodeRenderer({
|
|
6329
6385
|
node,
|
|
6330
6386
|
loading,
|
|
@@ -6332,7 +6388,7 @@ function NodeRenderer({
|
|
|
6332
6388
|
onGroupClick
|
|
6333
6389
|
}) {
|
|
6334
6390
|
if (node.type === "ARTIFACT" && node.artifact) {
|
|
6335
|
-
return /* @__PURE__ */
|
|
6391
|
+
return /* @__PURE__ */ React84.createElement(
|
|
6336
6392
|
ArtifactCard,
|
|
6337
6393
|
{
|
|
6338
6394
|
artifact: node.artifact,
|
|
@@ -6342,10 +6398,10 @@ function NodeRenderer({
|
|
|
6342
6398
|
);
|
|
6343
6399
|
}
|
|
6344
6400
|
if (node.type === "GROUP") {
|
|
6345
|
-
return /* @__PURE__ */
|
|
6401
|
+
return /* @__PURE__ */ React84.createElement(ArtifactGroup, { node, onClick: onGroupClick });
|
|
6346
6402
|
}
|
|
6347
6403
|
if (node.type === "VARIANT_SET") {
|
|
6348
|
-
return /* @__PURE__ */
|
|
6404
|
+
return /* @__PURE__ */ React84.createElement(
|
|
6349
6405
|
ArtifactVariantStack,
|
|
6350
6406
|
{
|
|
6351
6407
|
node,
|
|
@@ -6356,7 +6412,7 @@ function NodeRenderer({
|
|
|
6356
6412
|
}
|
|
6357
6413
|
return null;
|
|
6358
6414
|
}
|
|
6359
|
-
var ArtifactsPanel =
|
|
6415
|
+
var ArtifactsPanel = React84.forwardRef(
|
|
6360
6416
|
({
|
|
6361
6417
|
nodes,
|
|
6362
6418
|
loading,
|
|
@@ -6368,6 +6424,8 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6368
6424
|
}, ref) => {
|
|
6369
6425
|
const [expandedArtifact, setExpandedArtifact] = useState22(null);
|
|
6370
6426
|
const [zoomIndex, setZoomIndex] = useState22(ZOOM_LEVELS.length - 1);
|
|
6427
|
+
const slotLoading2 = loading === true ? FULL_CARD_SLOT_LOADING : loading || void 0;
|
|
6428
|
+
const showColdStartPlaceholders = !!loading;
|
|
6371
6429
|
const treeNav = useArtifactTreeNavigation(nodes || []);
|
|
6372
6430
|
const hasNodes = !!nodes && nodes.length > 0;
|
|
6373
6431
|
const handleExpandArtifact = useCallback20((artifact) => {
|
|
@@ -6409,7 +6467,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6409
6467
|
observer.observe(el);
|
|
6410
6468
|
return () => observer.disconnect();
|
|
6411
6469
|
}, []);
|
|
6412
|
-
return /* @__PURE__ */
|
|
6470
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(
|
|
6413
6471
|
"div",
|
|
6414
6472
|
{
|
|
6415
6473
|
ref,
|
|
@@ -6420,19 +6478,19 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6420
6478
|
),
|
|
6421
6479
|
...rest
|
|
6422
6480
|
},
|
|
6423
|
-
/* @__PURE__ */
|
|
6481
|
+
/* @__PURE__ */ React84.createElement(
|
|
6424
6482
|
"div",
|
|
6425
6483
|
{
|
|
6426
6484
|
className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
|
|
6427
6485
|
},
|
|
6428
|
-
/* @__PURE__ */
|
|
6429
|
-
hasNodes && /* @__PURE__ */
|
|
6486
|
+
/* @__PURE__ */ React84.createElement("h3", { className: "text-sm font-semibold text-white" }, "Artifacts"),
|
|
6487
|
+
hasNodes && /* @__PURE__ */ React84.createElement(
|
|
6430
6488
|
"div",
|
|
6431
6489
|
{
|
|
6432
6490
|
className: "flex items-center gap-0.5",
|
|
6433
6491
|
"data-testid": "zoom-controls"
|
|
6434
6492
|
},
|
|
6435
|
-
/* @__PURE__ */
|
|
6493
|
+
/* @__PURE__ */ React84.createElement(
|
|
6436
6494
|
"button",
|
|
6437
6495
|
{
|
|
6438
6496
|
onClick: zoomOut,
|
|
@@ -6446,7 +6504,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6446
6504
|
},
|
|
6447
6505
|
"\u2212"
|
|
6448
6506
|
),
|
|
6449
|
-
/* @__PURE__ */
|
|
6507
|
+
/* @__PURE__ */ React84.createElement(
|
|
6450
6508
|
"span",
|
|
6451
6509
|
{
|
|
6452
6510
|
className: "text-xs text-silver w-8 text-center tabular-nums",
|
|
@@ -6455,7 +6513,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6455
6513
|
Math.round(currentZoom * 100),
|
|
6456
6514
|
"%"
|
|
6457
6515
|
),
|
|
6458
|
-
/* @__PURE__ */
|
|
6516
|
+
/* @__PURE__ */ React84.createElement(
|
|
6459
6517
|
"button",
|
|
6460
6518
|
{
|
|
6461
6519
|
onClick: zoomIn,
|
|
@@ -6471,7 +6529,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6471
6529
|
)
|
|
6472
6530
|
)
|
|
6473
6531
|
),
|
|
6474
|
-
hasNodes && !treeNav.isAtRoot && /* @__PURE__ */
|
|
6532
|
+
hasNodes && !treeNav.isAtRoot && /* @__PURE__ */ React84.createElement(
|
|
6475
6533
|
"nav",
|
|
6476
6534
|
{
|
|
6477
6535
|
className: "flex items-center gap-1 px-4 py-2 border-b border-ash/40 shrink-0 overflow-x-auto text-xs",
|
|
@@ -6480,7 +6538,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6480
6538
|
},
|
|
6481
6539
|
treeNav.breadcrumbs.map((crumb, i) => {
|
|
6482
6540
|
const isLast = i === treeNav.breadcrumbs.length - 1;
|
|
6483
|
-
return /* @__PURE__ */
|
|
6541
|
+
return /* @__PURE__ */ React84.createElement("span", { key: i, className: "flex items-center gap-1 shrink-0" }, i > 0 && /* @__PURE__ */ React84.createElement(ChevronRightIcon, { className: "w-3 h-3 text-silver/50", "aria-hidden": true }), isLast ? /* @__PURE__ */ React84.createElement("span", { className: "text-gold font-medium" }, crumb.label) : /* @__PURE__ */ React84.createElement(
|
|
6484
6542
|
"button",
|
|
6485
6543
|
{
|
|
6486
6544
|
onClick: () => treeNav.navigateTo(i),
|
|
@@ -6490,18 +6548,18 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6490
6548
|
));
|
|
6491
6549
|
})
|
|
6492
6550
|
),
|
|
6493
|
-
/* @__PURE__ */
|
|
6551
|
+
/* @__PURE__ */ React84.createElement(
|
|
6494
6552
|
"div",
|
|
6495
6553
|
{
|
|
6496
6554
|
className: "flex-1 overflow-auto relative",
|
|
6497
6555
|
"data-testid": "artifacts-scroll-area"
|
|
6498
6556
|
},
|
|
6499
|
-
/* @__PURE__ */
|
|
6557
|
+
/* @__PURE__ */ React84.createElement(
|
|
6500
6558
|
"div",
|
|
6501
6559
|
{
|
|
6502
6560
|
style: currentZoom !== 1 && contentHeight !== void 0 ? { height: contentHeight * currentZoom } : void 0
|
|
6503
6561
|
},
|
|
6504
|
-
/* @__PURE__ */
|
|
6562
|
+
/* @__PURE__ */ React84.createElement(
|
|
6505
6563
|
"div",
|
|
6506
6564
|
{
|
|
6507
6565
|
ref: contentRef,
|
|
@@ -6512,12 +6570,12 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6512
6570
|
transformOrigin: "top center"
|
|
6513
6571
|
} : void 0
|
|
6514
6572
|
},
|
|
6515
|
-
treeNav.currentNodes.length === 0 ? /* @__PURE__ */
|
|
6573
|
+
treeNav.currentNodes.length === 0 ? showColdStartPlaceholders && !hasNodes ? /* @__PURE__ */ React84.createElement(ColdStartPlaceholders, null) : /* @__PURE__ */ React84.createElement("p", { className: "text-xs text-silver/60 text-center py-8" }, hasNodes ? "Empty group" : "No artifacts to display") : treeNav.currentNodes.map((node) => /* @__PURE__ */ React84.createElement(
|
|
6516
6574
|
NodeRenderer,
|
|
6517
6575
|
{
|
|
6518
6576
|
key: node.id,
|
|
6519
6577
|
node,
|
|
6520
|
-
loading,
|
|
6578
|
+
loading: slotLoading2,
|
|
6521
6579
|
onExpandArtifact: handleExpandArtifact,
|
|
6522
6580
|
onGroupClick: handleGroupClick
|
|
6523
6581
|
}
|
|
@@ -6525,7 +6583,7 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6525
6583
|
)
|
|
6526
6584
|
)
|
|
6527
6585
|
)
|
|
6528
|
-
), expandedArtifact && /* @__PURE__ */
|
|
6586
|
+
), expandedArtifact && /* @__PURE__ */ React84.createElement(
|
|
6529
6587
|
ArtifactLightbox,
|
|
6530
6588
|
{
|
|
6531
6589
|
artifact: expandedArtifact,
|
|
@@ -6536,8 +6594,8 @@ var ArtifactsPanel = React83.forwardRef(
|
|
|
6536
6594
|
}
|
|
6537
6595
|
);
|
|
6538
6596
|
ArtifactsPanel.displayName = "ArtifactsPanel";
|
|
6539
|
-
var ArtifactsPanelToggle =
|
|
6540
|
-
return /* @__PURE__ */
|
|
6597
|
+
var ArtifactsPanelToggle = React84.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
|
|
6598
|
+
return /* @__PURE__ */ React84.createElement(
|
|
6541
6599
|
"button",
|
|
6542
6600
|
{
|
|
6543
6601
|
ref,
|
|
@@ -6554,8 +6612,8 @@ var ArtifactsPanelToggle = React83.forwardRef(({ artifactCount = 0, onExpand, cl
|
|
|
6554
6612
|
"aria-label": "Expand artifacts panel",
|
|
6555
6613
|
...rest
|
|
6556
6614
|
},
|
|
6557
|
-
/* @__PURE__ */
|
|
6558
|
-
artifactCount > 0 && /* @__PURE__ */
|
|
6615
|
+
/* @__PURE__ */ React84.createElement(Image, { className: "w-5 h-5", "aria-hidden": true }),
|
|
6616
|
+
artifactCount > 0 && /* @__PURE__ */ React84.createElement(
|
|
6559
6617
|
"span",
|
|
6560
6618
|
{
|
|
6561
6619
|
className: "absolute -top-1 -right-1 w-4 h-4 bg-gold text-obsidian text-xs font-medium flex items-center justify-center"
|
|
@@ -6567,7 +6625,7 @@ var ArtifactsPanelToggle = React83.forwardRef(({ artifactCount = 0, onExpand, cl
|
|
|
6567
6625
|
ArtifactsPanelToggle.displayName = "ArtifactsPanelToggle";
|
|
6568
6626
|
|
|
6569
6627
|
// src/components/chat/HistoryPanel.tsx
|
|
6570
|
-
import
|
|
6628
|
+
import React85, { useCallback as useCallback21, useEffect as useEffect15, useMemo as useMemo3, useRef as useRef14, useState as useState23 } from "react";
|
|
6571
6629
|
import { ChevronDown as ChevronDown2, Pencil as Pencil2 } from "lucide-react";
|
|
6572
6630
|
function parseTimestamp(ts) {
|
|
6573
6631
|
if (ts == null) {
|
|
@@ -6615,7 +6673,7 @@ function ProjectFilter({
|
|
|
6615
6673
|
const closeFilter = useCallback21(() => setOpen(false), []);
|
|
6616
6674
|
useClickOutside(ref, closeFilter, open);
|
|
6617
6675
|
const label = value ?? "All projects";
|
|
6618
|
-
return /* @__PURE__ */
|
|
6676
|
+
return /* @__PURE__ */ React85.createElement("div", { className: cx("relative min-w-0", className), ref }, /* @__PURE__ */ React85.createElement(
|
|
6619
6677
|
"button",
|
|
6620
6678
|
{
|
|
6621
6679
|
type: "button",
|
|
@@ -6631,9 +6689,9 @@ function ProjectFilter({
|
|
|
6631
6689
|
"transition-colors duration-150 min-w-0"
|
|
6632
6690
|
)
|
|
6633
6691
|
},
|
|
6634
|
-
/* @__PURE__ */
|
|
6635
|
-
/* @__PURE__ */
|
|
6636
|
-
), open && /* @__PURE__ */
|
|
6692
|
+
/* @__PURE__ */ React85.createElement("span", { className: "truncate" }, label),
|
|
6693
|
+
/* @__PURE__ */ React85.createElement(ChevronDown2, { className: "w-3 h-3 shrink-0", "aria-hidden": true })
|
|
6694
|
+
), open && /* @__PURE__ */ React85.createElement(
|
|
6637
6695
|
"div",
|
|
6638
6696
|
{
|
|
6639
6697
|
role: "listbox",
|
|
@@ -6643,7 +6701,7 @@ function ProjectFilter({
|
|
|
6643
6701
|
"max-h-60 overflow-y-auto"
|
|
6644
6702
|
)
|
|
6645
6703
|
},
|
|
6646
|
-
/* @__PURE__ */
|
|
6704
|
+
/* @__PURE__ */ React85.createElement(
|
|
6647
6705
|
"button",
|
|
6648
6706
|
{
|
|
6649
6707
|
type: "button",
|
|
@@ -6661,7 +6719,7 @@ function ProjectFilter({
|
|
|
6661
6719
|
},
|
|
6662
6720
|
"All projects"
|
|
6663
6721
|
),
|
|
6664
|
-
projects.map((p) => /* @__PURE__ */
|
|
6722
|
+
projects.map((p) => /* @__PURE__ */ React85.createElement(
|
|
6665
6723
|
"button",
|
|
6666
6724
|
{
|
|
6667
6725
|
key: p,
|
|
@@ -6713,7 +6771,7 @@ function ConversationRow({
|
|
|
6713
6771
|
setIsEditing(false);
|
|
6714
6772
|
}, [conversation.title]);
|
|
6715
6773
|
if (isEditing) {
|
|
6716
|
-
return /* @__PURE__ */
|
|
6774
|
+
return /* @__PURE__ */ React85.createElement(
|
|
6717
6775
|
"div",
|
|
6718
6776
|
{
|
|
6719
6777
|
className: cx(
|
|
@@ -6721,7 +6779,7 @@ function ConversationRow({
|
|
|
6721
6779
|
conversation.isActive ? "bg-ash/40" : "bg-ash/20"
|
|
6722
6780
|
)
|
|
6723
6781
|
},
|
|
6724
|
-
/* @__PURE__ */
|
|
6782
|
+
/* @__PURE__ */ React85.createElement(
|
|
6725
6783
|
"input",
|
|
6726
6784
|
{
|
|
6727
6785
|
ref: inputRef,
|
|
@@ -6746,10 +6804,10 @@ function ConversationRow({
|
|
|
6746
6804
|
"aria-label": "Conversation title"
|
|
6747
6805
|
}
|
|
6748
6806
|
),
|
|
6749
|
-
conversation.project && /* @__PURE__ */
|
|
6807
|
+
conversation.project && /* @__PURE__ */ React85.createElement("p", { className: "text-xs text-silver/60 truncate mt-1" }, conversation.project)
|
|
6750
6808
|
);
|
|
6751
6809
|
}
|
|
6752
|
-
return /* @__PURE__ */
|
|
6810
|
+
return /* @__PURE__ */ React85.createElement("div", { className: "relative group" }, /* @__PURE__ */ React85.createElement(
|
|
6753
6811
|
"button",
|
|
6754
6812
|
{
|
|
6755
6813
|
onClick: () => onSelect?.(conversation.id),
|
|
@@ -6759,18 +6817,19 @@ function ConversationRow({
|
|
|
6759
6817
|
conversation.isActive ? "bg-ash/40 text-white" : "text-silver hover:bg-ash/20 hover:text-white"
|
|
6760
6818
|
)
|
|
6761
6819
|
},
|
|
6762
|
-
/* @__PURE__ */
|
|
6820
|
+
/* @__PURE__ */ React85.createElement(
|
|
6763
6821
|
"p",
|
|
6764
6822
|
{
|
|
6823
|
+
key: conversation.title,
|
|
6765
6824
|
className: cx(
|
|
6766
|
-
"text-sm font-medium truncate",
|
|
6825
|
+
"text-sm font-medium truncate animate-fade-in",
|
|
6767
6826
|
onRename ? "pr-6" : ""
|
|
6768
6827
|
)
|
|
6769
6828
|
},
|
|
6770
6829
|
conversation.title
|
|
6771
6830
|
),
|
|
6772
|
-
conversation.project && /* @__PURE__ */
|
|
6773
|
-
), onRename && /* @__PURE__ */
|
|
6831
|
+
conversation.project && /* @__PURE__ */ React85.createElement("p", { className: "text-xs text-silver/60 truncate mt-0.5" }, conversation.project)
|
|
6832
|
+
), onRename && /* @__PURE__ */ React85.createElement(
|
|
6774
6833
|
"button",
|
|
6775
6834
|
{
|
|
6776
6835
|
type: "button",
|
|
@@ -6783,7 +6842,7 @@ function ConversationRow({
|
|
|
6783
6842
|
"transition-opacity duration-150"
|
|
6784
6843
|
)
|
|
6785
6844
|
},
|
|
6786
|
-
/* @__PURE__ */
|
|
6845
|
+
/* @__PURE__ */ React85.createElement(Pencil2, { className: "w-3.5 h-3.5", "aria-hidden": true })
|
|
6787
6846
|
));
|
|
6788
6847
|
}
|
|
6789
6848
|
function HistoryPanel({
|
|
@@ -6818,7 +6877,7 @@ function HistoryPanel({
|
|
|
6818
6877
|
[filteredConversations]
|
|
6819
6878
|
);
|
|
6820
6879
|
const hasFilter = projects.length > 0;
|
|
6821
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ React85.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React85.createElement("div", { className: "px-4 py-3 border-b border-ash/40 shrink-0 flex items-center gap-2" }, /* @__PURE__ */ React85.createElement("h3", { className: "text-xs font-medium text-white shrink-0" }, "History"), (hasFilter || onNewChat) && /* @__PURE__ */ React85.createElement("div", { className: "flex items-center gap-2 flex-1 min-w-0" }, hasFilter && /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement("div", { className: "w-px h-3 bg-ash/40 shrink-0 mx-1" }), /* @__PURE__ */ React85.createElement(
|
|
6822
6881
|
ProjectFilter,
|
|
6823
6882
|
{
|
|
6824
6883
|
projects,
|
|
@@ -6826,7 +6885,7 @@ function HistoryPanel({
|
|
|
6826
6885
|
onChange: setProjectFilter,
|
|
6827
6886
|
className: "flex-1"
|
|
6828
6887
|
}
|
|
6829
|
-
)), onNewChat && /* @__PURE__ */
|
|
6888
|
+
)), onNewChat && /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement("div", { className: "w-px h-3 bg-ash/40 shrink-0 mx-1" }), /* @__PURE__ */ React85.createElement(
|
|
6830
6889
|
"button",
|
|
6831
6890
|
{
|
|
6832
6891
|
onClick: onNewChat,
|
|
@@ -6838,15 +6897,15 @@ function HistoryPanel({
|
|
|
6838
6897
|
"transition-colors duration-200"
|
|
6839
6898
|
)
|
|
6840
6899
|
},
|
|
6841
|
-
/* @__PURE__ */
|
|
6842
|
-
/* @__PURE__ */
|
|
6843
|
-
)))), /* @__PURE__ */
|
|
6900
|
+
/* @__PURE__ */ React85.createElement(PlusIcon, { className: "w-4 h-4" }),
|
|
6901
|
+
/* @__PURE__ */ React85.createElement("span", { className: "truncate" }, "New Chat")
|
|
6902
|
+
)))), /* @__PURE__ */ React85.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ React85.createElement("p", { className: "px-4 py-2 text-xs text-silver/60" }, "No conversations yet") : groups.length === 0 ? /* @__PURE__ */ React85.createElement("p", { className: "px-4 py-2 text-xs text-silver/60" }, "No conversations match this filter") : /* @__PURE__ */ React85.createElement("div", null, groups.map((group, index) => /* @__PURE__ */ React85.createElement("section", { key: group.key, className: cx(index > 0 && "mt-3") }, /* @__PURE__ */ React85.createElement("div", { className: "flex items-center gap-2 px-3 pb-2" }, /* @__PURE__ */ React85.createElement(
|
|
6844
6903
|
"span",
|
|
6845
6904
|
{
|
|
6846
6905
|
className: "text-xs font-medium uppercase tracking-wider text-gold/70"
|
|
6847
6906
|
},
|
|
6848
6907
|
group.label
|
|
6849
|
-
), /* @__PURE__ */
|
|
6908
|
+
), /* @__PURE__ */ React85.createElement("div", { className: "flex-1 h-px bg-gold/20" })), /* @__PURE__ */ React85.createElement("div", { className: "space-y-1 px-2" }, group.conversations.map((conversation) => /* @__PURE__ */ React85.createElement(
|
|
6850
6909
|
ConversationRow,
|
|
6851
6910
|
{
|
|
6852
6911
|
key: conversation.id,
|
|
@@ -6858,7 +6917,7 @@ function HistoryPanel({
|
|
|
6858
6917
|
}
|
|
6859
6918
|
|
|
6860
6919
|
// src/components/chat/TodosList.tsx
|
|
6861
|
-
import
|
|
6920
|
+
import React86, { useCallback as useCallback22, useMemo as useMemo4, useState as useState24 } from "react";
|
|
6862
6921
|
import { Loader2 as Loader22, Square as Square2 } from "lucide-react";
|
|
6863
6922
|
var TASK_STATUSES = {
|
|
6864
6923
|
PENDING: "pending",
|
|
@@ -6870,16 +6929,16 @@ var TASK_STATUSES = {
|
|
|
6870
6929
|
function TaskIcon({ status }) {
|
|
6871
6930
|
switch (status) {
|
|
6872
6931
|
case "done":
|
|
6873
|
-
return /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ React86.createElement(CheckSquareIcon, null);
|
|
6874
6933
|
case "in_progress":
|
|
6875
|
-
return /* @__PURE__ */
|
|
6934
|
+
return /* @__PURE__ */ React86.createElement(SquareLoaderIcon, null);
|
|
6876
6935
|
case "cancelled":
|
|
6877
|
-
return /* @__PURE__ */
|
|
6936
|
+
return /* @__PURE__ */ React86.createElement(CrossSquareIcon, { variant: "cancelled" });
|
|
6878
6937
|
case "failed":
|
|
6879
|
-
return /* @__PURE__ */
|
|
6938
|
+
return /* @__PURE__ */ React86.createElement(CrossSquareIcon, { variant: "failed" });
|
|
6880
6939
|
case "pending":
|
|
6881
6940
|
default:
|
|
6882
|
-
return /* @__PURE__ */
|
|
6941
|
+
return /* @__PURE__ */ React86.createElement(EmptySquareIcon, null);
|
|
6883
6942
|
}
|
|
6884
6943
|
}
|
|
6885
6944
|
function sortTasks(tasks) {
|
|
@@ -6899,14 +6958,14 @@ function TaskItem({ task, depth = 0 }) {
|
|
|
6899
6958
|
const isSubtle = task.status === "cancelled" || task.status === "failed";
|
|
6900
6959
|
const showSubtasks = task.subtasks && task.subtasks.length > 0;
|
|
6901
6960
|
const sortedSubtasks = showSubtasks ? sortTasks(task.subtasks) : [];
|
|
6902
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ React86.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React86.createElement(
|
|
6903
6962
|
"div",
|
|
6904
6963
|
{
|
|
6905
6964
|
className: "flex items-center gap-2 py-1",
|
|
6906
6965
|
style: { paddingLeft: `${depth * 1.5}rem` }
|
|
6907
6966
|
},
|
|
6908
|
-
/* @__PURE__ */
|
|
6909
|
-
/* @__PURE__ */
|
|
6967
|
+
/* @__PURE__ */ React86.createElement(TaskIcon, { status: task.status }),
|
|
6968
|
+
/* @__PURE__ */ React86.createElement(
|
|
6910
6969
|
"span",
|
|
6911
6970
|
{
|
|
6912
6971
|
className: cx(
|
|
@@ -6918,10 +6977,10 @@ function TaskItem({ task, depth = 0 }) {
|
|
|
6918
6977
|
)
|
|
6919
6978
|
},
|
|
6920
6979
|
task.label,
|
|
6921
|
-
task.status === "cancelled" && /* @__PURE__ */
|
|
6922
|
-
task.status === "failed" && /* @__PURE__ */
|
|
6980
|
+
task.status === "cancelled" && /* @__PURE__ */ React86.createElement("span", { className: "text-silver/40 ml-1" }, "(cancelled)"),
|
|
6981
|
+
task.status === "failed" && /* @__PURE__ */ React86.createElement("span", { className: "text-error/60 ml-1" }, "(failed)")
|
|
6923
6982
|
)
|
|
6924
|
-
), showSubtasks && /* @__PURE__ */
|
|
6983
|
+
), showSubtasks && /* @__PURE__ */ React86.createElement("div", { className: "flex flex-col" }, sortedSubtasks.map((subtask) => /* @__PURE__ */ React86.createElement(TaskItem, { key: subtask.id, task: subtask, depth: depth + 1 }))));
|
|
6925
6984
|
}
|
|
6926
6985
|
function hasInProgressTask(tasks) {
|
|
6927
6986
|
return tasks.some((t) => {
|
|
@@ -6934,7 +6993,7 @@ function hasInProgressTask(tasks) {
|
|
|
6934
6993
|
return false;
|
|
6935
6994
|
});
|
|
6936
6995
|
}
|
|
6937
|
-
var TodosList =
|
|
6996
|
+
var TodosList = React86.forwardRef(
|
|
6938
6997
|
({ tasks, title = "Tasks", onStopAllTasks, className, ...rest }, ref) => {
|
|
6939
6998
|
const sortedTasks = useMemo4(() => sortTasks(tasks), [tasks]);
|
|
6940
6999
|
const [isStopping, setIsStopping] = useState24(false);
|
|
@@ -6959,7 +7018,7 @@ var TodosList = React85.forwardRef(
|
|
|
6959
7018
|
if (tasks.length === 0) {
|
|
6960
7019
|
return null;
|
|
6961
7020
|
}
|
|
6962
|
-
return /* @__PURE__ */
|
|
7021
|
+
return /* @__PURE__ */ React86.createElement(
|
|
6963
7022
|
"div",
|
|
6964
7023
|
{
|
|
6965
7024
|
ref,
|
|
@@ -6970,16 +7029,16 @@ var TodosList = React85.forwardRef(
|
|
|
6970
7029
|
),
|
|
6971
7030
|
...rest
|
|
6972
7031
|
},
|
|
6973
|
-
/* @__PURE__ */
|
|
7032
|
+
/* @__PURE__ */ React86.createElement(
|
|
6974
7033
|
"div",
|
|
6975
7034
|
{
|
|
6976
7035
|
className: "flex items-center justify-between px-4 py-2 border-b border-ash/40 flex-shrink-0"
|
|
6977
7036
|
},
|
|
6978
|
-
/* @__PURE__ */
|
|
6979
|
-
/* @__PURE__ */
|
|
7037
|
+
/* @__PURE__ */ React86.createElement("h4", { className: "text-xs font-medium text-white" }, title),
|
|
7038
|
+
/* @__PURE__ */ React86.createElement("span", { className: "text-xs text-silver/60" }, countCompleted(tasks), "/", countTotal(tasks))
|
|
6980
7039
|
),
|
|
6981
|
-
/* @__PURE__ */
|
|
6982
|
-
showStopButton && /* @__PURE__ */
|
|
7040
|
+
/* @__PURE__ */ React86.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-2" }, sortedTasks.map((task) => /* @__PURE__ */ React86.createElement(TaskItem, { key: task.id, task }))),
|
|
7041
|
+
showStopButton && /* @__PURE__ */ React86.createElement("div", { className: "px-4 py-2 border-t border-ash/40 flex-shrink-0" }, /* @__PURE__ */ React86.createElement(
|
|
6983
7042
|
"button",
|
|
6984
7043
|
{
|
|
6985
7044
|
type: "button",
|
|
@@ -6996,7 +7055,7 @@ var TodosList = React85.forwardRef(
|
|
|
6996
7055
|
isStopping ? "cursor-not-allowed opacity-70" : "hover:bg-error/20"
|
|
6997
7056
|
)
|
|
6998
7057
|
},
|
|
6999
|
-
isStopping ? /* @__PURE__ */
|
|
7058
|
+
isStopping ? /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement(Loader22, { className: "w-3 h-3 animate-spin" }), "Stopping tasks") : /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement(Square2, { className: "w-3 h-3 fill-current" }), "Stop All Tasks")
|
|
7000
7059
|
))
|
|
7001
7060
|
);
|
|
7002
7061
|
}
|
|
@@ -7016,8 +7075,8 @@ function areAllTasksSettled(tasks) {
|
|
|
7016
7075
|
}
|
|
7017
7076
|
|
|
7018
7077
|
// src/components/chat/ToolSidebar.tsx
|
|
7019
|
-
import
|
|
7020
|
-
var ToolSidebar =
|
|
7078
|
+
import React87 from "react";
|
|
7079
|
+
var ToolSidebar = React87.forwardRef(
|
|
7021
7080
|
({ tools, activeTools, onToggleTool, side, className, ...rest }, ref) => {
|
|
7022
7081
|
const topTools = tools.filter((t) => t.group === `top-${side}`);
|
|
7023
7082
|
const bottomTools = tools.filter((t) => t.group === `bottom-${side}`);
|
|
@@ -7028,7 +7087,7 @@ var ToolSidebar = React86.forwardRef(
|
|
|
7028
7087
|
};
|
|
7029
7088
|
const renderButton = (tool) => {
|
|
7030
7089
|
const active = isActive(tool.id);
|
|
7031
|
-
return /* @__PURE__ */
|
|
7090
|
+
return /* @__PURE__ */ React87.createElement(
|
|
7032
7091
|
"button",
|
|
7033
7092
|
{
|
|
7034
7093
|
key: tool.id,
|
|
@@ -7040,10 +7099,10 @@ var ToolSidebar = React86.forwardRef(
|
|
|
7040
7099
|
"aria-label": tool.label,
|
|
7041
7100
|
"aria-pressed": active
|
|
7042
7101
|
},
|
|
7043
|
-
/* @__PURE__ */
|
|
7102
|
+
/* @__PURE__ */ React87.createElement("span", { className: "w-4 h-4 block" }, tool.icon)
|
|
7044
7103
|
);
|
|
7045
7104
|
};
|
|
7046
|
-
return /* @__PURE__ */
|
|
7105
|
+
return /* @__PURE__ */ React87.createElement(
|
|
7047
7106
|
"div",
|
|
7048
7107
|
{
|
|
7049
7108
|
ref,
|
|
@@ -7054,17 +7113,17 @@ var ToolSidebar = React86.forwardRef(
|
|
|
7054
7113
|
),
|
|
7055
7114
|
...rest
|
|
7056
7115
|
},
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7116
|
+
/* @__PURE__ */ React87.createElement("div", { className: "flex flex-col items-center gap-1" }, topTools.map(renderButton)),
|
|
7117
|
+
/* @__PURE__ */ React87.createElement("div", { className: "flex-1 flex items-center justify-center" }, /* @__PURE__ */ React87.createElement("div", { className: "w-5 border-t border-ash/30" })),
|
|
7118
|
+
/* @__PURE__ */ React87.createElement("div", { className: "flex flex-col items-center gap-1" }, bottomTools.map(renderButton))
|
|
7060
7119
|
);
|
|
7061
7120
|
}
|
|
7062
7121
|
);
|
|
7063
7122
|
ToolSidebar.displayName = "ToolSidebar";
|
|
7064
7123
|
|
|
7065
7124
|
// src/components/chat/ToolPanelContainer.tsx
|
|
7066
|
-
import
|
|
7067
|
-
var ToolPanelContainer =
|
|
7125
|
+
import React88, { useCallback as useCallback23, useEffect as useEffect16, useRef as useRef15, useState as useState25 } from "react";
|
|
7126
|
+
var ToolPanelContainer = React88.forwardRef(
|
|
7068
7127
|
({
|
|
7069
7128
|
topContent,
|
|
7070
7129
|
bottomContent,
|
|
@@ -7127,7 +7186,7 @@ var ToolPanelContainer = React87.forwardRef(
|
|
|
7127
7186
|
document.body.style.userSelect = "";
|
|
7128
7187
|
};
|
|
7129
7188
|
}, [isResizingHeight, resizeHeight, stopHeightResize]);
|
|
7130
|
-
return /* @__PURE__ */
|
|
7189
|
+
return /* @__PURE__ */ React88.createElement(
|
|
7131
7190
|
"div",
|
|
7132
7191
|
{
|
|
7133
7192
|
ref: composeRefs(containerRef, ref),
|
|
@@ -7139,7 +7198,7 @@ var ToolPanelContainer = React87.forwardRef(
|
|
|
7139
7198
|
style: width ? { width } : void 0,
|
|
7140
7199
|
...rest
|
|
7141
7200
|
},
|
|
7142
|
-
/* @__PURE__ */
|
|
7201
|
+
/* @__PURE__ */ React88.createElement(
|
|
7143
7202
|
"div",
|
|
7144
7203
|
{
|
|
7145
7204
|
onMouseDown: onResizeStart,
|
|
@@ -7150,7 +7209,7 @@ var ToolPanelContainer = React87.forwardRef(
|
|
|
7150
7209
|
)
|
|
7151
7210
|
}
|
|
7152
7211
|
),
|
|
7153
|
-
topContent !== null && /* @__PURE__ */
|
|
7212
|
+
topContent !== null && /* @__PURE__ */ React88.createElement(
|
|
7154
7213
|
"div",
|
|
7155
7214
|
{
|
|
7156
7215
|
className: "min-h-0 overflow-hidden flex flex-col",
|
|
@@ -7158,7 +7217,7 @@ var ToolPanelContainer = React87.forwardRef(
|
|
|
7158
7217
|
},
|
|
7159
7218
|
topContent
|
|
7160
7219
|
),
|
|
7161
|
-
hasBoth && /* @__PURE__ */
|
|
7220
|
+
hasBoth && /* @__PURE__ */ React88.createElement(
|
|
7162
7221
|
"div",
|
|
7163
7222
|
{
|
|
7164
7223
|
onMouseDown: startHeightResize,
|
|
@@ -7170,7 +7229,7 @@ var ToolPanelContainer = React87.forwardRef(
|
|
|
7170
7229
|
)
|
|
7171
7230
|
}
|
|
7172
7231
|
),
|
|
7173
|
-
bottomContent !== null && /* @__PURE__ */
|
|
7232
|
+
bottomContent !== null && /* @__PURE__ */ React88.createElement(
|
|
7174
7233
|
"div",
|
|
7175
7234
|
{
|
|
7176
7235
|
className: "min-h-0 overflow-hidden flex flex-col",
|
|
@@ -7330,7 +7389,7 @@ function isAncestor(tree, ancestorId, descendantId) {
|
|
|
7330
7389
|
}
|
|
7331
7390
|
|
|
7332
7391
|
// src/components/chat/ChatInterface.tsx
|
|
7333
|
-
var ChatInterface =
|
|
7392
|
+
var ChatInterface = React89.forwardRef(
|
|
7334
7393
|
({
|
|
7335
7394
|
messages = [],
|
|
7336
7395
|
conversationTree,
|
|
@@ -7371,6 +7430,9 @@ var ChatInterface = React88.forwardRef(
|
|
|
7371
7430
|
autoFocus = true,
|
|
7372
7431
|
textareaRef,
|
|
7373
7432
|
onTextareaKeyDown,
|
|
7433
|
+
chatLoading = false,
|
|
7434
|
+
artifactsLoading = false,
|
|
7435
|
+
inputDisabled = false,
|
|
7374
7436
|
className,
|
|
7375
7437
|
...rest
|
|
7376
7438
|
}, ref) => {
|
|
@@ -7434,11 +7496,11 @@ var ChatInterface = React88.forwardRef(
|
|
|
7434
7496
|
const allSettled = tasks.length === 0 || areAllTasksSettled(tasks);
|
|
7435
7497
|
const allToolDefinitions = useMemo5(() => {
|
|
7436
7498
|
const builtIn = [
|
|
7437
|
-
{ id: "history", icon: /* @__PURE__ */
|
|
7438
|
-
{ id: "artifacts", icon: /* @__PURE__ */
|
|
7499
|
+
{ id: "history", icon: /* @__PURE__ */ React89.createElement(ChatBubbleIcon, null), label: "History", group: "top-left" },
|
|
7500
|
+
{ id: "artifacts", icon: /* @__PURE__ */ React89.createElement(MediaIcon, null), label: "Artifacts", group: "top-right" },
|
|
7439
7501
|
{
|
|
7440
7502
|
id: "todos",
|
|
7441
|
-
icon: allSettled ? /* @__PURE__ */
|
|
7503
|
+
icon: allSettled ? /* @__PURE__ */ React89.createElement(CheckSquareIcon, null) : /* @__PURE__ */ React89.createElement(SquareLoaderIcon, null),
|
|
7442
7504
|
label: "Tasks",
|
|
7443
7505
|
group: "bottom-right"
|
|
7444
7506
|
}
|
|
@@ -7639,7 +7701,7 @@ var ChatInterface = React88.forwardRef(
|
|
|
7639
7701
|
},
|
|
7640
7702
|
[onMessageSubmit]
|
|
7641
7703
|
);
|
|
7642
|
-
const isEmpty = displayItems.length === 0;
|
|
7704
|
+
const isEmpty = displayItems.length === 0 && !chatLoading;
|
|
7643
7705
|
const leftToolDefs = useMemo5(
|
|
7644
7706
|
() => allToolDefinitions.filter((t) => t.group === "top-left" || t.group === "bottom-left"),
|
|
7645
7707
|
[allToolDefinitions]
|
|
@@ -7658,7 +7720,7 @@ var ChatInterface = React88.forwardRef(
|
|
|
7658
7720
|
}
|
|
7659
7721
|
switch (toolId) {
|
|
7660
7722
|
case "history":
|
|
7661
|
-
return /* @__PURE__ */
|
|
7723
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7662
7724
|
HistoryPanel,
|
|
7663
7725
|
{
|
|
7664
7726
|
conversations,
|
|
@@ -7668,10 +7730,11 @@ var ChatInterface = React88.forwardRef(
|
|
|
7668
7730
|
}
|
|
7669
7731
|
);
|
|
7670
7732
|
case "artifacts":
|
|
7671
|
-
return /* @__PURE__ */
|
|
7733
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7672
7734
|
ArtifactsPanel,
|
|
7673
7735
|
{
|
|
7674
7736
|
nodes: artifactNodes,
|
|
7737
|
+
loading: artifactsLoading,
|
|
7675
7738
|
openArtifactId: panelOpenArtifactId,
|
|
7676
7739
|
onArtifactClosed: handleArtifactPanelClosed,
|
|
7677
7740
|
getArtifactActions,
|
|
@@ -7679,7 +7742,7 @@ var ChatInterface = React88.forwardRef(
|
|
|
7679
7742
|
}
|
|
7680
7743
|
);
|
|
7681
7744
|
case "todos":
|
|
7682
|
-
return tasks.length > 0 ? /* @__PURE__ */
|
|
7745
|
+
return tasks.length > 0 ? /* @__PURE__ */ React89.createElement(
|
|
7683
7746
|
TodosList,
|
|
7684
7747
|
{
|
|
7685
7748
|
tasks,
|
|
@@ -7687,20 +7750,20 @@ var ChatInterface = React88.forwardRef(
|
|
|
7687
7750
|
onStopAllTasks,
|
|
7688
7751
|
className: "h-full"
|
|
7689
7752
|
}
|
|
7690
|
-
) : /* @__PURE__ */
|
|
7753
|
+
) : /* @__PURE__ */ React89.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React89.createElement("div", { className: "flex items-center p-4 border-b border-ash/40 shrink-0" }, /* @__PURE__ */ React89.createElement("h3", { className: "text-xs font-medium text-white" }, "Tasks")), /* @__PURE__ */ React89.createElement("div", { className: "flex-1 flex items-center justify-center" }, /* @__PURE__ */ React89.createElement("p", { className: "text-xs text-silver/60" }, "No tasks")));
|
|
7691
7754
|
default: {
|
|
7692
7755
|
const externalTool = externalTools.find((t) => t.id === toolId);
|
|
7693
7756
|
return externalTool?.content ?? null;
|
|
7694
7757
|
}
|
|
7695
7758
|
}
|
|
7696
7759
|
};
|
|
7697
|
-
return /* @__PURE__ */
|
|
7760
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7698
7761
|
"div",
|
|
7699
7762
|
{
|
|
7700
7763
|
className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
|
|
7701
7764
|
...rest
|
|
7702
7765
|
},
|
|
7703
|
-
hasLeftTools && /* @__PURE__ */
|
|
7766
|
+
hasLeftTools && /* @__PURE__ */ React89.createElement(
|
|
7704
7767
|
ToolSidebar,
|
|
7705
7768
|
{
|
|
7706
7769
|
tools: leftToolDefs,
|
|
@@ -7709,7 +7772,7 @@ var ChatInterface = React88.forwardRef(
|
|
|
7709
7772
|
side: "left"
|
|
7710
7773
|
}
|
|
7711
7774
|
),
|
|
7712
|
-
isLeftPanelOpen && /* @__PURE__ */
|
|
7775
|
+
isLeftPanelOpen && /* @__PURE__ */ React89.createElement(
|
|
7713
7776
|
ToolPanelContainer,
|
|
7714
7777
|
{
|
|
7715
7778
|
topContent: renderToolContent(activeTools["top-left"]),
|
|
@@ -7720,16 +7783,16 @@ var ChatInterface = React88.forwardRef(
|
|
|
7720
7783
|
initialTopPercent: 30
|
|
7721
7784
|
}
|
|
7722
7785
|
),
|
|
7723
|
-
/* @__PURE__ */
|
|
7786
|
+
/* @__PURE__ */ React89.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React89.createElement("div", { className: cx(
|
|
7724
7787
|
"flex-1 flex flex-col min-h-0 relative",
|
|
7725
7788
|
isEmpty ? "justify-center" : "justify-start"
|
|
7726
|
-
) }, /* @__PURE__ */
|
|
7789
|
+
) }, /* @__PURE__ */ React89.createElement("div", { className: cx(
|
|
7727
7790
|
"transition-all duration-500 ease-in-out",
|
|
7728
7791
|
isEmpty ? "flex-1" : "flex-zero"
|
|
7729
|
-
) }), /* @__PURE__ */
|
|
7730
|
-
"transition-all duration-500 ease-in-out overflow-hidden flex flex-col",
|
|
7792
|
+
) }), /* @__PURE__ */ React89.createElement("div", { className: cx(
|
|
7793
|
+
"relative transition-all duration-500 ease-in-out overflow-hidden flex flex-col",
|
|
7731
7794
|
isEmpty ? "flex-zero opacity-0" : "flex-1 opacity-100"
|
|
7732
|
-
) }, /* @__PURE__ */
|
|
7795
|
+
) }, /* @__PURE__ */ React89.createElement(
|
|
7733
7796
|
ChatView,
|
|
7734
7797
|
{
|
|
7735
7798
|
items: displayItems,
|
|
@@ -7738,17 +7801,17 @@ var ChatInterface = React88.forwardRef(
|
|
|
7738
7801
|
thinkingLabel,
|
|
7739
7802
|
className: "flex-1"
|
|
7740
7803
|
}
|
|
7741
|
-
)), /* @__PURE__ */
|
|
7804
|
+
), chatLoading && /* @__PURE__ */ React89.createElement(BusyOverlay, null)), /* @__PURE__ */ React89.createElement("div", { className: cx(
|
|
7742
7805
|
"transition-all duration-500 ease-in-out z-10 w-full flex flex-col items-center",
|
|
7743
7806
|
isEmpty ? "p-4" : "shrink-0 p-4 border-t border-ash/40 bg-obsidian"
|
|
7744
|
-
) }, isEmpty && /* @__PURE__ */
|
|
7807
|
+
) }, isEmpty && /* @__PURE__ */ React89.createElement("div", { className: "mb-8 text-center animate-fade-in duration-500" }, emptyState ? emptyState : /* @__PURE__ */ React89.createElement("h1", { className: "text-4xl md:text-5xl font-heading text-gold mb-2 tracking-tight" }, "Welcome!")), /* @__PURE__ */ React89.createElement(
|
|
7745
7808
|
ChatInput,
|
|
7746
7809
|
{
|
|
7747
7810
|
position: isEmpty ? "centered" : "bottom",
|
|
7748
7811
|
placeholder,
|
|
7749
7812
|
helperText: isEmpty ? emptyStateHelper : void 0,
|
|
7750
7813
|
onSubmit: handleSubmit,
|
|
7751
|
-
disabled: isEmpty ? isStreaming : isStreaming && !onStop,
|
|
7814
|
+
disabled: inputDisabled || (isEmpty ? isStreaming : isStreaming && !onStop),
|
|
7752
7815
|
isStreaming,
|
|
7753
7816
|
onStop,
|
|
7754
7817
|
showAttachmentButton,
|
|
@@ -7762,11 +7825,11 @@ var ChatInterface = React88.forwardRef(
|
|
|
7762
7825
|
textareaRef,
|
|
7763
7826
|
onTextareaKeyDown
|
|
7764
7827
|
}
|
|
7765
|
-
)), /* @__PURE__ */
|
|
7828
|
+
)), /* @__PURE__ */ React89.createElement("div", { className: cx(
|
|
7766
7829
|
"transition-all duration-500 ease-in-out",
|
|
7767
7830
|
isEmpty ? "flex-1" : "flex-zero"
|
|
7768
7831
|
) }))),
|
|
7769
|
-
isRightPanelOpen && /* @__PURE__ */
|
|
7832
|
+
isRightPanelOpen && /* @__PURE__ */ React89.createElement(
|
|
7770
7833
|
ToolPanelContainer,
|
|
7771
7834
|
{
|
|
7772
7835
|
topContent: renderToolContent(activeTools["top-right"]),
|
|
@@ -7777,7 +7840,7 @@ var ChatInterface = React88.forwardRef(
|
|
|
7777
7840
|
initialTopPercent: 70
|
|
7778
7841
|
}
|
|
7779
7842
|
),
|
|
7780
|
-
hasRightTools && /* @__PURE__ */
|
|
7843
|
+
hasRightTools && /* @__PURE__ */ React89.createElement(
|
|
7781
7844
|
ToolSidebar,
|
|
7782
7845
|
{
|
|
7783
7846
|
tools: rightToolDefs,
|
|
@@ -7792,9 +7855,9 @@ var ChatInterface = React88.forwardRef(
|
|
|
7792
7855
|
ChatInterface.displayName = "ChatInterface";
|
|
7793
7856
|
|
|
7794
7857
|
// src/components/chat/MessageActions.tsx
|
|
7795
|
-
import
|
|
7858
|
+
import React90, { useCallback as useCallback25, useState as useState27 } from "react";
|
|
7796
7859
|
import { Check as Check4, Copy as Copy2, Pencil as Pencil3, RotateCcw as RotateCcw2, Send as Send3, X as X8 } from "lucide-react";
|
|
7797
|
-
var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */
|
|
7860
|
+
var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React90.createElement(
|
|
7798
7861
|
"button",
|
|
7799
7862
|
{
|
|
7800
7863
|
type: "button",
|
|
@@ -7810,7 +7873,7 @@ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @_
|
|
|
7810
7873
|
},
|
|
7811
7874
|
children
|
|
7812
7875
|
);
|
|
7813
|
-
var MessageActions =
|
|
7876
|
+
var MessageActions = React90.forwardRef(
|
|
7814
7877
|
({
|
|
7815
7878
|
variant,
|
|
7816
7879
|
content,
|
|
@@ -7871,19 +7934,19 @@ var MessageActions = React89.forwardRef(
|
|
|
7871
7934
|
);
|
|
7872
7935
|
const isUser = variant === "user";
|
|
7873
7936
|
if (isUser && isEditing) {
|
|
7874
|
-
return /* @__PURE__ */
|
|
7937
|
+
return /* @__PURE__ */ React90.createElement(
|
|
7875
7938
|
"div",
|
|
7876
7939
|
{
|
|
7877
7940
|
ref,
|
|
7878
7941
|
className: cx("mt-2", className),
|
|
7879
7942
|
...rest
|
|
7880
7943
|
},
|
|
7881
|
-
/* @__PURE__ */
|
|
7944
|
+
/* @__PURE__ */ React90.createElement(
|
|
7882
7945
|
"div",
|
|
7883
7946
|
{
|
|
7884
7947
|
className: "relative bg-charcoal border border-ash/60 focus-within:border-gold/60 focus-within:ring-1 focus-within:ring-gold/20"
|
|
7885
7948
|
},
|
|
7886
|
-
/* @__PURE__ */
|
|
7949
|
+
/* @__PURE__ */ React90.createElement(
|
|
7887
7950
|
"textarea",
|
|
7888
7951
|
{
|
|
7889
7952
|
value: editValue,
|
|
@@ -7894,15 +7957,15 @@ var MessageActions = React89.forwardRef(
|
|
|
7894
7957
|
rows: 2
|
|
7895
7958
|
}
|
|
7896
7959
|
),
|
|
7897
|
-
/* @__PURE__ */
|
|
7960
|
+
/* @__PURE__ */ React90.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ React90.createElement(
|
|
7898
7961
|
ActionButton2,
|
|
7899
7962
|
{
|
|
7900
7963
|
onClick: handleCancelEdit,
|
|
7901
7964
|
label: "Cancel edit",
|
|
7902
7965
|
className: "text-silver/60 hover:text-error"
|
|
7903
7966
|
},
|
|
7904
|
-
/* @__PURE__ */
|
|
7905
|
-
), /* @__PURE__ */
|
|
7967
|
+
/* @__PURE__ */ React90.createElement(X8, { className: "w-4 h-4" })
|
|
7968
|
+
), /* @__PURE__ */ React90.createElement(
|
|
7906
7969
|
ActionButton2,
|
|
7907
7970
|
{
|
|
7908
7971
|
onClick: handleSubmitEdit,
|
|
@@ -7910,13 +7973,13 @@ var MessageActions = React89.forwardRef(
|
|
|
7910
7973
|
className: "text-silver/60 hover:text-gold",
|
|
7911
7974
|
disabled: !editValue.trim() || editValue.trim() === content
|
|
7912
7975
|
},
|
|
7913
|
-
/* @__PURE__ */
|
|
7976
|
+
/* @__PURE__ */ React90.createElement(Send3, { className: "w-4 h-4" })
|
|
7914
7977
|
))
|
|
7915
7978
|
),
|
|
7916
|
-
/* @__PURE__ */
|
|
7979
|
+
/* @__PURE__ */ React90.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
|
|
7917
7980
|
);
|
|
7918
7981
|
}
|
|
7919
|
-
return /* @__PURE__ */
|
|
7982
|
+
return /* @__PURE__ */ React90.createElement(
|
|
7920
7983
|
"div",
|
|
7921
7984
|
{
|
|
7922
7985
|
ref,
|
|
@@ -7927,18 +7990,18 @@ var MessageActions = React89.forwardRef(
|
|
|
7927
7990
|
),
|
|
7928
7991
|
...rest
|
|
7929
7992
|
},
|
|
7930
|
-
/* @__PURE__ */
|
|
7931
|
-
isUser && onEdit && /* @__PURE__ */
|
|
7932
|
-
!isUser && onRetry && /* @__PURE__ */
|
|
7993
|
+
/* @__PURE__ */ React90.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ React90.createElement(Check4, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React90.createElement(Copy2, { className: "w-3.5 h-3.5" })),
|
|
7994
|
+
isUser && onEdit && /* @__PURE__ */ React90.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React90.createElement(Pencil3, { className: "w-3.5 h-3.5" })),
|
|
7995
|
+
!isUser && onRetry && /* @__PURE__ */ React90.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ React90.createElement(RotateCcw2, { className: "w-3.5 h-3.5" }))
|
|
7933
7996
|
);
|
|
7934
7997
|
}
|
|
7935
7998
|
);
|
|
7936
7999
|
MessageActions.displayName = "MessageActions";
|
|
7937
8000
|
|
|
7938
8001
|
// src/components/chat/BranchNavigator.tsx
|
|
7939
|
-
import
|
|
8002
|
+
import React91 from "react";
|
|
7940
8003
|
import { ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5, GitBranch as GitBranch3 } from "lucide-react";
|
|
7941
|
-
var BranchNavigator =
|
|
8004
|
+
var BranchNavigator = React91.forwardRef(
|
|
7942
8005
|
({
|
|
7943
8006
|
current,
|
|
7944
8007
|
total,
|
|
@@ -7957,7 +8020,7 @@ var BranchNavigator = React90.forwardRef(
|
|
|
7957
8020
|
const buttonSize = size === "sm" ? "p-0.5" : "p-1";
|
|
7958
8021
|
const iconSize = size === "sm" ? "w-3 h-3" : "w-4 h-4";
|
|
7959
8022
|
const textSize = size === "sm" ? "text-xs" : "text-sm";
|
|
7960
|
-
return /* @__PURE__ */
|
|
8023
|
+
return /* @__PURE__ */ React91.createElement(
|
|
7961
8024
|
"div",
|
|
7962
8025
|
{
|
|
7963
8026
|
ref,
|
|
@@ -7969,8 +8032,8 @@ var BranchNavigator = React90.forwardRef(
|
|
|
7969
8032
|
"aria-label": "Branch navigation",
|
|
7970
8033
|
...rest
|
|
7971
8034
|
},
|
|
7972
|
-
showIcon && /* @__PURE__ */
|
|
7973
|
-
/* @__PURE__ */
|
|
8035
|
+
showIcon && /* @__PURE__ */ React91.createElement(GitBranch3, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
|
|
8036
|
+
/* @__PURE__ */ React91.createElement(
|
|
7974
8037
|
"button",
|
|
7975
8038
|
{
|
|
7976
8039
|
type: "button",
|
|
@@ -7983,10 +8046,10 @@ var BranchNavigator = React90.forwardRef(
|
|
|
7983
8046
|
),
|
|
7984
8047
|
"aria-label": "Previous branch"
|
|
7985
8048
|
},
|
|
7986
|
-
/* @__PURE__ */
|
|
8049
|
+
/* @__PURE__ */ React91.createElement(ChevronLeft4, { className: iconSize })
|
|
7987
8050
|
),
|
|
7988
|
-
/* @__PURE__ */
|
|
7989
|
-
/* @__PURE__ */
|
|
8051
|
+
/* @__PURE__ */ React91.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
|
|
8052
|
+
/* @__PURE__ */ React91.createElement(
|
|
7990
8053
|
"button",
|
|
7991
8054
|
{
|
|
7992
8055
|
type: "button",
|
|
@@ -7999,7 +8062,7 @@ var BranchNavigator = React90.forwardRef(
|
|
|
7999
8062
|
),
|
|
8000
8063
|
"aria-label": "Next branch"
|
|
8001
8064
|
},
|
|
8002
|
-
/* @__PURE__ */
|
|
8065
|
+
/* @__PURE__ */ React91.createElement(ChevronRight5, { className: iconSize })
|
|
8003
8066
|
)
|
|
8004
8067
|
);
|
|
8005
8068
|
}
|
|
@@ -8007,16 +8070,16 @@ var BranchNavigator = React90.forwardRef(
|
|
|
8007
8070
|
BranchNavigator.displayName = "BranchNavigator";
|
|
8008
8071
|
|
|
8009
8072
|
// src/components/BrandIcon.tsx
|
|
8010
|
-
import
|
|
8073
|
+
import React92 from "react";
|
|
8011
8074
|
var sizeMap2 = {
|
|
8012
8075
|
sm: "h-8 w-8 text-sm",
|
|
8013
8076
|
md: "h-12 w-12 text-base",
|
|
8014
8077
|
lg: "h-16 w-16 text-lg"
|
|
8015
8078
|
};
|
|
8016
|
-
var BrandIcon =
|
|
8079
|
+
var BrandIcon = React92.forwardRef(
|
|
8017
8080
|
({ size = "md", variant = "solid", children, className, ...rest }, ref) => {
|
|
8018
8081
|
const variantClasses = variant === "solid" ? "bg-gold text-obsidian border-2 border-gold" : "bg-transparent text-gold border-2 border-gold";
|
|
8019
|
-
return /* @__PURE__ */
|
|
8082
|
+
return /* @__PURE__ */ React92.createElement(
|
|
8020
8083
|
"div",
|
|
8021
8084
|
{
|
|
8022
8085
|
ref,
|
|
@@ -8035,17 +8098,17 @@ var BrandIcon = React91.forwardRef(
|
|
|
8035
8098
|
BrandIcon.displayName = "BrandIcon";
|
|
8036
8099
|
|
|
8037
8100
|
// src/components/ColorSwatch.tsx
|
|
8038
|
-
import
|
|
8039
|
-
var ColorSwatch =
|
|
8101
|
+
import React93 from "react";
|
|
8102
|
+
var ColorSwatch = React93.forwardRef(
|
|
8040
8103
|
({ color, label, className, ...rest }, ref) => {
|
|
8041
|
-
return /* @__PURE__ */
|
|
8104
|
+
return /* @__PURE__ */ React93.createElement(
|
|
8042
8105
|
"div",
|
|
8043
8106
|
{
|
|
8044
8107
|
ref,
|
|
8045
8108
|
className: cx("flex flex-col items-center gap-2", className),
|
|
8046
8109
|
...rest
|
|
8047
8110
|
},
|
|
8048
|
-
/* @__PURE__ */
|
|
8111
|
+
/* @__PURE__ */ React93.createElement(
|
|
8049
8112
|
"div",
|
|
8050
8113
|
{
|
|
8051
8114
|
className: "h-16 w-16 border-2 border-ash rounded-none shadow-sm",
|
|
@@ -8053,22 +8116,22 @@ var ColorSwatch = React92.forwardRef(
|
|
|
8053
8116
|
"aria-label": label || color
|
|
8054
8117
|
}
|
|
8055
8118
|
),
|
|
8056
|
-
label && /* @__PURE__ */
|
|
8119
|
+
label && /* @__PURE__ */ React93.createElement("span", { className: "text-xs text-silver font-medium" }, label)
|
|
8057
8120
|
);
|
|
8058
8121
|
}
|
|
8059
8122
|
);
|
|
8060
8123
|
ColorSwatch.displayName = "ColorSwatch";
|
|
8061
8124
|
|
|
8062
8125
|
// src/components/SectionHeading.tsx
|
|
8063
|
-
import
|
|
8126
|
+
import React94 from "react";
|
|
8064
8127
|
var levelStyles = {
|
|
8065
8128
|
h2: "text-2xl mb-4",
|
|
8066
8129
|
h3: "text-xl mb-3"
|
|
8067
8130
|
};
|
|
8068
|
-
var SectionHeading =
|
|
8131
|
+
var SectionHeading = React94.forwardRef(
|
|
8069
8132
|
({ level = "h2", children, className, ...rest }, ref) => {
|
|
8070
8133
|
const Component = level;
|
|
8071
|
-
return /* @__PURE__ */
|
|
8134
|
+
return /* @__PURE__ */ React94.createElement(
|
|
8072
8135
|
Component,
|
|
8073
8136
|
{
|
|
8074
8137
|
ref,
|
|
@@ -8118,6 +8181,7 @@ export {
|
|
|
8118
8181
|
Breadcrumb,
|
|
8119
8182
|
BreadcrumbItem,
|
|
8120
8183
|
BreadcrumbLink,
|
|
8184
|
+
BusyOverlay,
|
|
8121
8185
|
Button,
|
|
8122
8186
|
Card,
|
|
8123
8187
|
ChatBubbleIcon,
|