@toolr/ui-design 0.1.0 → 0.1.2
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/components/lib/theme-engine.ts +48 -15
- package/components/sections/ai-tools-paths/tools-paths-panel.tsx +11 -11
- package/components/sections/captured-issues/captured-issues-panel.tsx +20 -20
- package/components/sections/golden-snapshots/file-diff-viewer.tsx +19 -19
- package/components/sections/golden-snapshots/golden-sync-panel.tsx +3 -3
- package/components/sections/golden-snapshots/snapshot-manager.tsx +15 -15
- package/components/sections/golden-snapshots/status-overview.tsx +40 -40
- package/components/sections/golden-snapshots/version-manager.tsx +10 -10
- package/components/sections/prompt-editor/file-type-tabbed-prompt-editor.tsx +11 -11
- package/components/sections/prompt-editor/simulator-prompt-editor.tsx +15 -15
- package/components/sections/prompt-editor/tabbed-prompt-editor.tsx +19 -19
- package/components/sections/snapshot-browser/snapshot-browser-panel.tsx +10 -10
- package/components/sections/snapshot-browser/snapshot-tree.tsx +11 -11
- package/components/sections/snippets-editor/snippets-editor.tsx +24 -24
- package/components/settings/SettingsHeader.tsx +78 -0
- package/components/settings/SettingsPanel.tsx +21 -0
- package/components/settings/SettingsTreeNav.tsx +256 -0
- package/components/settings/index.ts +7 -0
- package/components/settings/settings-tree-utils.ts +120 -0
- package/components/ui/breadcrumb.tsx +16 -4
- package/components/ui/cookie-consent.tsx +82 -0
- package/components/ui/file-tree.tsx +5 -5
- package/components/ui/filter-dropdown.tsx +4 -4
- package/components/ui/form-actions.tsx +1 -1
- package/components/ui/label.tsx +31 -3
- package/components/ui/resizable-textarea.tsx +2 -2
- package/components/ui/segmented-toggle.tsx +17 -4
- package/components/ui/select.tsx +3 -3
- package/components/ui/sort-dropdown.tsx +2 -2
- package/components/ui/status-card.tsx +1 -1
- package/components/ui/tooltip.tsx +2 -2
- package/dist/index.d.ts +79 -8
- package/dist/index.js +1119 -622
- package/dist/tokens/{tokens/primitives.css → primitives.css} +10 -8
- package/dist/tokens/{tokens/semantic.css → semantic.css} +5 -0
- package/index.ts +13 -0
- package/package.json +6 -2
- package/tokens/primitives.css +10 -8
- package/tokens/semantic.css +5 -0
- /package/dist/tokens/{tokens/theme.css → theme.css} +0 -0
- /package/dist/tokens/{tokens/tokens.json → tokens.json} +0 -0
package/dist/index.js
CHANGED
|
@@ -16,17 +16,12 @@ var FORM_COLORS = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// components/lib/theme-engine.ts
|
|
19
|
-
var SCALE_KEYS = ["black", "950", "900", "800", "700", "600", "500", "400", "300", "200"];
|
|
20
|
-
var DARK_THEMES = ["
|
|
21
|
-
var LIGHT_THEMES = ["
|
|
19
|
+
var SCALE_KEYS = ["black", "950", "900", "850", "800", "750", "700", "600", "500", "400", "300", "200"];
|
|
20
|
+
var DARK_THEMES = ["dark"];
|
|
21
|
+
var LIGHT_THEMES = ["light"];
|
|
22
22
|
var BASE_THEMES = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
night: { label: "Night", maxSat: 12, lightness: { black: 0, "950": 3, "900": 7, "800": 11, "700": 17, "600": 25, "500": 43, "400": 62, "300": 82, "200": 89 } },
|
|
26
|
-
soft: { label: "Soft", maxSat: 15, lightness: { black: 0, "950": 5, "900": 10, "800": 15, "700": 22, "600": 30, "500": 46, "400": 64, "300": 83, "200": 90 } },
|
|
27
|
-
bright: { label: "Bright", maxSat: 6, lightness: { black: 100, "950": 98, "900": 96, "800": 92, "700": 85, "600": 68, "500": 52, "400": 40, "300": 24, "200": 14 } },
|
|
28
|
-
paper: { label: "Paper", maxSat: 10, lightness: { black: 98, "950": 96, "900": 93, "800": 88, "700": 82, "600": 65, "500": 50, "400": 38, "300": 22, "200": 12 } },
|
|
29
|
-
muted: { label: "Muted", maxSat: 14, lightness: { black: 95, "950": 93, "900": 89, "800": 84, "700": 78, "600": 62, "500": 48, "400": 36, "300": 20, "200": 10 } }
|
|
23
|
+
dark: { label: "Dark", maxSat: 22, lightness: { black: 0, "950": 5, "900": 10, "850": 12, "800": 15, "750": 18, "700": 22, "600": 30, "500": 46, "400": 64, "300": 83, "200": 90 } },
|
|
24
|
+
light: { label: "Light", maxSat: 15, lightness: { black: 98, "950": 96, "900": 93, "850": 91, "800": 88, "750": 85, "700": 82, "600": 65, "500": 50, "400": 38, "300": 22, "200": 12 } }
|
|
30
25
|
};
|
|
31
26
|
var ACCENT_DEFS = [
|
|
32
27
|
{ id: "blue", hue: 220, dotColor: "#3b82f6" },
|
|
@@ -44,7 +39,7 @@ var ACCENT_DEFS = [
|
|
|
44
39
|
{ id: "neutral", hue: null, dotColor: "#737373" }
|
|
45
40
|
];
|
|
46
41
|
function satCurve(l) {
|
|
47
|
-
return Math.min(l /
|
|
42
|
+
return Math.min(l / 10, 1) * Math.max(0, 1 - l / 115);
|
|
48
43
|
}
|
|
49
44
|
function hslToHex(h, s, l) {
|
|
50
45
|
const a = s / 100 * Math.min(l / 100, 1 - l / 100);
|
|
@@ -55,11 +50,27 @@ function hslToHex(h, s, l) {
|
|
|
55
50
|
};
|
|
56
51
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
57
52
|
}
|
|
58
|
-
function
|
|
53
|
+
function alphaToHex(alpha) {
|
|
54
|
+
return Math.round(Math.min(alpha, 1) * 255).toString(16).padStart(2, "0");
|
|
55
|
+
}
|
|
56
|
+
var SURFACE_KEYS = ["950", "900", "850", "800", "750"];
|
|
57
|
+
var DEFAULT_DIMS = { "950": 1, "900": 2, "850": 3, "800": 4, "750": 5 };
|
|
58
|
+
var DEFAULT_OUTLINE = 30;
|
|
59
|
+
function generateScale(theme, hue, maxSat, dims = DEFAULT_DIMS, outline = DEFAULT_OUTLINE) {
|
|
59
60
|
const lightness = BASE_THEMES[theme].lightness;
|
|
61
|
+
const glassBase = hue !== null ? hslToHex(hue, 80, 50) : null;
|
|
60
62
|
const result = {};
|
|
61
63
|
for (const key of SCALE_KEYS) {
|
|
62
64
|
const l = lightness[key];
|
|
65
|
+
const dimVal = dims[key];
|
|
66
|
+
if (dimVal !== void 0 && dimVal > 0 && glassBase) {
|
|
67
|
+
result[key] = `${glassBase}${alphaToHex(dimVal / 100)}`;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (key === "700" && outline > 0 && glassBase) {
|
|
71
|
+
result[key] = `${glassBase}${alphaToHex(outline / 100)}`;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
63
74
|
if (hue === null || maxSat === 0) {
|
|
64
75
|
const g = Math.round(255 * l / 100).toString(16).padStart(2, "0");
|
|
65
76
|
result[key] = `#${g}${g}${g}`;
|
|
@@ -72,8 +83,8 @@ function generateScale(theme, hue, maxSat) {
|
|
|
72
83
|
function isLightTheme(themeId) {
|
|
73
84
|
return LIGHT_THEMES.includes(themeId);
|
|
74
85
|
}
|
|
75
|
-
function applyTheme(themeId, accentHue, root = document.documentElement) {
|
|
76
|
-
const scale = generateScale(themeId, accentHue, BASE_THEMES[themeId].maxSat);
|
|
86
|
+
function applyTheme(themeId, accentHue, dims = DEFAULT_DIMS, outline = DEFAULT_OUTLINE, root = document.documentElement) {
|
|
87
|
+
const scale = generateScale(themeId, accentHue, BASE_THEMES[themeId].maxSat, dims, outline);
|
|
77
88
|
const light = isLightTheme(themeId);
|
|
78
89
|
for (const key of SCALE_KEYS) {
|
|
79
90
|
const prop = key === "black" ? "--color-black" : `--color-neutral-${key}`;
|
|
@@ -82,6 +93,10 @@ function applyTheme(themeId, accentHue, root = document.documentElement) {
|
|
|
82
93
|
root.style.setProperty("--color-white", light ? "#0a0a0a" : "#ffffff");
|
|
83
94
|
root.style.setProperty("--color-neutral-100", light ? "#1a1a1a" : "#f0f0f0");
|
|
84
95
|
root.style.setProperty("--color-neutral-50", light ? "#0f0f0f" : "#fafafa");
|
|
96
|
+
const glassBase = accentHue !== null ? hslToHex(accentHue, 80, 50) : null;
|
|
97
|
+
if (glassBase) {
|
|
98
|
+
root.style.setProperty("--surface-hover", `${glassBase}${alphaToHex(10 / 100)}`);
|
|
99
|
+
}
|
|
85
100
|
}
|
|
86
101
|
|
|
87
102
|
// components/lib/toolr-brand.tsx
|
|
@@ -326,7 +341,7 @@ function clampToViewport(coords, tooltipRect) {
|
|
|
326
341
|
}
|
|
327
342
|
return { top, left };
|
|
328
343
|
}
|
|
329
|
-
var ARROW_BASE_CLASSES = "absolute w-3 h-3 bg-
|
|
344
|
+
var ARROW_BASE_CLASSES = "absolute w-3 h-3 bg-[var(--popover)] border-neutral-600 rotate-45";
|
|
330
345
|
function getAlignmentClass(align) {
|
|
331
346
|
if (align === "start") return "left-2";
|
|
332
347
|
if (align === "end") return "right-2";
|
|
@@ -422,7 +437,7 @@ function Tooltip({
|
|
|
422
437
|
"div",
|
|
423
438
|
{
|
|
424
439
|
ref: tooltipRef,
|
|
425
|
-
className: `fixed px-3 py-1.5 bg-
|
|
440
|
+
className: `fixed px-3 py-1.5 bg-[var(--popover)] backdrop-blur border border-neutral-600 rounded-lg shadow-xl z-[9999] ${interactive || trigger === "click" ? "" : "pointer-events-none"} ${multiline ? "whitespace-pre-line" : "whitespace-nowrap"}`,
|
|
426
441
|
style: {
|
|
427
442
|
top: coords.top,
|
|
428
443
|
left: coords.left,
|
|
@@ -759,6 +774,22 @@ var colorClasses2 = {
|
|
|
759
774
|
violet: "border-violet-500/50 text-violet-400",
|
|
760
775
|
pink: "border-pink-500/50 text-pink-400"
|
|
761
776
|
};
|
|
777
|
+
var progressFillColors = {
|
|
778
|
+
neutral: "bg-neutral-500/20",
|
|
779
|
+
green: "bg-green-500/20",
|
|
780
|
+
red: "bg-red-500/20",
|
|
781
|
+
blue: "bg-blue-500/20",
|
|
782
|
+
yellow: "bg-yellow-500/20",
|
|
783
|
+
orange: "bg-orange-500/20",
|
|
784
|
+
purple: "bg-purple-500/20",
|
|
785
|
+
amber: "bg-amber-500/20",
|
|
786
|
+
emerald: "bg-emerald-500/20",
|
|
787
|
+
cyan: "bg-cyan-500/20",
|
|
788
|
+
indigo: "bg-indigo-500/20",
|
|
789
|
+
teal: "bg-teal-500/20",
|
|
790
|
+
violet: "bg-violet-500/20",
|
|
791
|
+
pink: "bg-pink-500/20"
|
|
792
|
+
};
|
|
762
793
|
var sizeConfig = {
|
|
763
794
|
xss: { height: 14, padding: "px-1", text: "text-[9px]", iconSize: "w-2 h-2", gap: "gap-0.5" },
|
|
764
795
|
xs: { height: 16, padding: "px-1.5", text: "text-[10px]", iconSize: "w-2.5 h-2.5", gap: "gap-1" },
|
|
@@ -781,29 +812,39 @@ function Label({
|
|
|
781
812
|
tooltip,
|
|
782
813
|
size = "sm",
|
|
783
814
|
textTransform,
|
|
815
|
+
progress,
|
|
784
816
|
onClick,
|
|
785
817
|
className = "",
|
|
786
818
|
testId
|
|
787
819
|
}) {
|
|
788
820
|
const s = sizeConfig[size];
|
|
789
821
|
const cssTransform = textTransform === "lowercase" || textTransform === "uppercase" ? textTransform : void 0;
|
|
822
|
+
const hasProgress = progress !== void 0 && progress >= 0;
|
|
790
823
|
const baseClasses = [
|
|
791
824
|
`inline-flex items-center ${s.gap}`,
|
|
792
825
|
s.padding,
|
|
793
826
|
s.text,
|
|
794
827
|
"border rounded font-medium leading-none",
|
|
828
|
+
hasProgress ? "relative overflow-hidden" : "",
|
|
795
829
|
colorClasses2[color],
|
|
796
830
|
onClick ? "cursor-pointer hover:brightness-125 transition-all" : "cursor-help",
|
|
797
831
|
className
|
|
798
832
|
].filter(Boolean).join(" ");
|
|
799
833
|
const icons = CustomIcon ? [] : !icon ? [] : Array.isArray(icon) ? icon : [icon];
|
|
800
834
|
const content = /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
801
|
-
|
|
835
|
+
hasProgress && /* @__PURE__ */ jsx5(
|
|
836
|
+
"span",
|
|
837
|
+
{
|
|
838
|
+
className: `absolute inset-y-0 left-0 ${progressFillColors[color]} rounded-[inherit]`,
|
|
839
|
+
style: { width: `${Math.min(progress, 100)}%` }
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
CustomIcon && /* @__PURE__ */ jsx5("span", { className: `${s.iconSize} flex-shrink-0 ${hasProgress ? "relative" : ""}`, children: /* @__PURE__ */ jsx5(CustomIcon, { className: s.iconSize }) }),
|
|
802
843
|
icons.map((iconName, i) => {
|
|
803
844
|
const Icon = iconMap[iconName];
|
|
804
|
-
return Icon ? /* @__PURE__ */ jsx5("span", { className: `${s.iconSize} flex-shrink-0`, children: /* @__PURE__ */ jsx5(Icon, { className: s.iconSize }) }, i) : null;
|
|
845
|
+
return Icon ? /* @__PURE__ */ jsx5("span", { className: `${s.iconSize} flex-shrink-0 ${hasProgress ? "relative" : ""}`, children: /* @__PURE__ */ jsx5(Icon, { className: s.iconSize }) }, i) : null;
|
|
805
846
|
}),
|
|
806
|
-
/* @__PURE__ */ jsx5("span", { className:
|
|
847
|
+
/* @__PURE__ */ jsx5("span", { className: `min-w-0 truncate ${hasProgress ? "relative" : ""}`, style: cssTransform ? { textTransform: cssTransform } : void 0, children: transformText(text, textTransform) })
|
|
807
848
|
] });
|
|
808
849
|
const labelElement = onClick ? /* @__PURE__ */ jsx5(
|
|
809
850
|
"button",
|
|
@@ -1485,14 +1526,21 @@ function ScopeBadge({ scope, size = "xs" }) {
|
|
|
1485
1526
|
}
|
|
1486
1527
|
|
|
1487
1528
|
// components/ui/segmented-toggle.tsx
|
|
1488
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1489
|
-
var
|
|
1529
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1530
|
+
var ICON_SIZE_CLASSES = {
|
|
1490
1531
|
xss: "w-[18px] h-[18px]",
|
|
1491
1532
|
xs: "w-6 h-6",
|
|
1492
1533
|
sm: "w-7 h-7",
|
|
1493
1534
|
md: "w-8 h-8",
|
|
1494
1535
|
lg: "w-9 h-9"
|
|
1495
1536
|
};
|
|
1537
|
+
var TEXT_SIZE_CLASSES = {
|
|
1538
|
+
xss: "h-[18px] px-1.5 text-[9px]",
|
|
1539
|
+
xs: "h-6 px-2 text-[10px]",
|
|
1540
|
+
sm: "h-7 px-2.5 text-xs",
|
|
1541
|
+
md: "h-8 px-3 text-xs",
|
|
1542
|
+
lg: "h-9 px-3.5 text-sm"
|
|
1543
|
+
};
|
|
1496
1544
|
var ROUNDING_CLASSES = {
|
|
1497
1545
|
xss: "rounded-[3px]",
|
|
1498
1546
|
xs: "rounded-[5px]",
|
|
@@ -1557,13 +1605,18 @@ function SegmentedToggle({
|
|
|
1557
1605
|
const isFirst = i === 0;
|
|
1558
1606
|
const isLast = i === options.length - 1;
|
|
1559
1607
|
const rounding = isFirst && isLast ? ROUNDING_CLASSES[size] : isFirst ? `rounded-l-[5px]` : isLast ? `rounded-r-[5px]` : "";
|
|
1560
|
-
|
|
1608
|
+
const hasLabel = !!option.label;
|
|
1609
|
+
const sizeClass = hasLabel ? TEXT_SIZE_CLASSES[size] : ICON_SIZE_CLASSES[size];
|
|
1610
|
+
return /* @__PURE__ */ jsx13(Tooltip, { content: option.tooltip, position: tooltipPosition, children: /* @__PURE__ */ jsxs8(
|
|
1561
1611
|
"button",
|
|
1562
1612
|
{
|
|
1563
1613
|
onClick: () => onChange(option.value),
|
|
1564
1614
|
disabled,
|
|
1565
|
-
className: `flex items-center justify-center ${
|
|
1566
|
-
children:
|
|
1615
|
+
className: `flex items-center justify-center ${sizeClass} ${rounding} font-medium transition-all cursor-pointer ${isActive ? ACTIVE_COLORS[accentColor] || ACTIVE_COLORS.blue : `text-neutral-400 ${HOVER_COLORS[accentColor] || HOVER_COLORS.blue}`}`,
|
|
1616
|
+
children: [
|
|
1617
|
+
option.icon,
|
|
1618
|
+
option.label
|
|
1619
|
+
]
|
|
1567
1620
|
}
|
|
1568
1621
|
) }, option.value);
|
|
1569
1622
|
})
|
|
@@ -1578,7 +1631,7 @@ function SegmentedToggle({
|
|
|
1578
1631
|
// components/ui/resizable-textarea.tsx
|
|
1579
1632
|
import { useCallback as useCallback2, useRef as useRef4, useState as useState4 } from "react";
|
|
1580
1633
|
import Editor from "@monaco-editor/react";
|
|
1581
|
-
import { Fragment as Fragment4, jsx as jsx14, jsxs as
|
|
1634
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1582
1635
|
var variantClasses2 = {
|
|
1583
1636
|
filled: "bg-neutral-800 border text-neutral-200 placeholder-neutral-500",
|
|
1584
1637
|
outline: "bg-transparent border text-neutral-200 placeholder-neutral-500"
|
|
@@ -1589,7 +1642,7 @@ function isCodeMode(props) {
|
|
|
1589
1642
|
function isChildrenVariant(props) {
|
|
1590
1643
|
return "children" in props && props.children !== void 0;
|
|
1591
1644
|
}
|
|
1592
|
-
var ResizeSvg = () => /* @__PURE__ */
|
|
1645
|
+
var ResizeSvg = () => /* @__PURE__ */ jsxs9("svg", { className: "w-2.5 h-2.5 text-neutral-600 pointer-events-none", viewBox: "0 0 10 10", children: [
|
|
1593
1646
|
/* @__PURE__ */ jsx14("line", { x1: "9", y1: "1", x2: "1", y2: "9", stroke: "currentColor", strokeWidth: "1" }),
|
|
1594
1647
|
/* @__PURE__ */ jsx14("line", { x1: "9", y1: "4.5", x2: "4.5", y2: "9", stroke: "currentColor", strokeWidth: "1" })
|
|
1595
1648
|
] });
|
|
@@ -1650,7 +1703,7 @@ function ResizableCode({
|
|
|
1650
1703
|
onHeightChange
|
|
1651
1704
|
}) {
|
|
1652
1705
|
const { height, onResizeStart } = useResize(minHeight, onHeightChange);
|
|
1653
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ jsxs9(
|
|
1654
1707
|
"div",
|
|
1655
1708
|
{
|
|
1656
1709
|
className: `relative ${codeWrapperClasses[variant]} ${FORM_COLORS[color].border} ${wrapperClassName ?? ""}`,
|
|
@@ -1692,8 +1745,8 @@ function ResizableCode({
|
|
|
1692
1745
|
inherit: true,
|
|
1693
1746
|
rules: [],
|
|
1694
1747
|
colors: {
|
|
1695
|
-
"editor.background": variant === "filled" ? "#
|
|
1696
|
-
"editorGutter.background": variant === "filled" ? "#
|
|
1748
|
+
"editor.background": variant === "filled" ? "#262626" : "#00000000",
|
|
1749
|
+
"editorGutter.background": variant === "filled" ? "#262626" : "#00000000",
|
|
1697
1750
|
"editor.lineHighlightBackground": "#00000000",
|
|
1698
1751
|
"editor.lineHighlightBorder": "#00000000"
|
|
1699
1752
|
}
|
|
@@ -1732,7 +1785,7 @@ function ResizableChildren({
|
|
|
1732
1785
|
if (!resizable) {
|
|
1733
1786
|
return /* @__PURE__ */ jsx14(Fragment4, { children });
|
|
1734
1787
|
}
|
|
1735
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ jsxs9(
|
|
1736
1789
|
"div",
|
|
1737
1790
|
{
|
|
1738
1791
|
className: `relative ${childrenVariantClasses[variant]} ${FORM_COLORS[color].border} ${wrapperClassName ?? ""}`,
|
|
@@ -1782,7 +1835,7 @@ function ResizableField({
|
|
|
1782
1835
|
if (!resizable) {
|
|
1783
1836
|
return /* @__PURE__ */ jsx14("textarea", { ...props, className, style: { resize: "none", ...props.style } });
|
|
1784
1837
|
}
|
|
1785
|
-
return /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ jsxs9("div", { className: `relative ${wrapperClassName ?? ""}`, children: [
|
|
1786
1839
|
/* @__PURE__ */ jsx14("textarea", { ref: taRef, ...props, className, style: { resize: "none", ...props.style } }),
|
|
1787
1840
|
/* @__PURE__ */ jsx14(
|
|
1788
1841
|
"div",
|
|
@@ -1816,10 +1869,10 @@ function useDropdownMaxHeight(isOpen, margin = 16) {
|
|
|
1816
1869
|
}
|
|
1817
1870
|
|
|
1818
1871
|
// components/ui/select.tsx
|
|
1819
|
-
import { jsx as jsx15, jsxs as
|
|
1872
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1820
1873
|
var VARIANT_CLASSES2 = {
|
|
1821
|
-
filled: { bg: "bg-neutral-800", hoverBg: "hover:bg-neutral-700", menuBg: "bg-
|
|
1822
|
-
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-
|
|
1874
|
+
filled: { bg: "bg-neutral-800", hoverBg: "hover:bg-neutral-700", menuBg: "bg-[var(--popover)]" },
|
|
1875
|
+
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-700", menuBg: "bg-[var(--popover)]" }
|
|
1823
1876
|
};
|
|
1824
1877
|
var SIZE_CLASSES = {
|
|
1825
1878
|
xss: "h-[18px] px-1.5 text-[10px]",
|
|
@@ -1897,8 +1950,8 @@ function Select({
|
|
|
1897
1950
|
close();
|
|
1898
1951
|
}
|
|
1899
1952
|
};
|
|
1900
|
-
return /* @__PURE__ */
|
|
1901
|
-
/* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsxs10("div", { className: `inline-flex ${className}`, ref, onKeyDown: handleKeyDown, children: [
|
|
1954
|
+
/* @__PURE__ */ jsxs10(
|
|
1902
1955
|
"button",
|
|
1903
1956
|
{
|
|
1904
1957
|
ref: buttonRef,
|
|
@@ -1918,7 +1971,7 @@ function Select({
|
|
|
1918
1971
|
"div",
|
|
1919
1972
|
{
|
|
1920
1973
|
ref: menuRef,
|
|
1921
|
-
className: `fixed z-[9999] whitespace-nowrap ${v.menuBg} border ${FORM_COLORS[color].border} rounded-lg shadow-xl overflow-hidden`,
|
|
1974
|
+
className: `fixed z-[9999] whitespace-nowrap ${v.menuBg} backdrop-blur border ${FORM_COLORS[color].border} rounded-lg shadow-xl overflow-hidden`,
|
|
1922
1975
|
style: {
|
|
1923
1976
|
top: menuPos.top,
|
|
1924
1977
|
left: align === "right" ? void 0 : menuPos.left,
|
|
@@ -1928,7 +1981,7 @@ function Select({
|
|
|
1928
1981
|
children: options.map((opt, idx) => {
|
|
1929
1982
|
const isHighlighted = highlightIdx === idx;
|
|
1930
1983
|
const isSelected = value === opt.value;
|
|
1931
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ jsxs10(
|
|
1932
1985
|
"button",
|
|
1933
1986
|
{
|
|
1934
1987
|
type: "button",
|
|
@@ -1979,11 +2032,11 @@ function useClickOutside(ref, isOpen, onClose) {
|
|
|
1979
2032
|
}
|
|
1980
2033
|
|
|
1981
2034
|
// components/ui/filter-dropdown.tsx
|
|
1982
|
-
import { jsx as jsx16, jsxs as
|
|
2035
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1983
2036
|
var SEARCH_THRESHOLD = 20;
|
|
1984
2037
|
var VARIANT_CLASSES3 = {
|
|
1985
2038
|
filled: { bg: "bg-neutral-800", hoverBg: "hover:bg-neutral-700" },
|
|
1986
|
-
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-
|
|
2039
|
+
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-700" }
|
|
1987
2040
|
};
|
|
1988
2041
|
function FilterDropdown({
|
|
1989
2042
|
value,
|
|
@@ -2044,8 +2097,8 @@ function FilterDropdown({
|
|
|
2044
2097
|
setIsOpen(false);
|
|
2045
2098
|
}
|
|
2046
2099
|
};
|
|
2047
|
-
return /* @__PURE__ */
|
|
2048
|
-
/* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsxs11("div", { className: "relative flex items-center", ref, onKeyDown: handleKeyDown, children: [
|
|
2101
|
+
/* @__PURE__ */ jsxs11(
|
|
2049
2102
|
"button",
|
|
2050
2103
|
{
|
|
2051
2104
|
onClick: () => setIsOpen(!isOpen),
|
|
@@ -2066,8 +2119,8 @@ function FilterDropdown({
|
|
|
2066
2119
|
children: /* @__PURE__ */ jsx16(X3, { className: "w-3 h-3" })
|
|
2067
2120
|
}
|
|
2068
2121
|
),
|
|
2069
|
-
isOpen && /* @__PURE__ */
|
|
2070
|
-
showSearch && /* @__PURE__ */ jsx16("div", { className: `sticky top-0 p-1.5
|
|
2122
|
+
isOpen && /* @__PURE__ */ jsxs11("div", { ref: menuRef, className: `absolute right-0 top-full z-50 mt-1 min-w-[140px] whitespace-nowrap bg-[var(--popover)] backdrop-blur border ${FORM_COLORS[color].border} rounded-lg shadow-xl overflow-hidden`, children: [
|
|
2123
|
+
showSearch && /* @__PURE__ */ jsx16("div", { className: `sticky top-0 p-1.5 bg-[var(--popover)] border-b ${FORM_COLORS[color].border} z-10`, children: /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
|
|
2071
2124
|
/* @__PURE__ */ jsx16(Search3, { className: "absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-neutral-500" }),
|
|
2072
2125
|
/* @__PURE__ */ jsx16(
|
|
2073
2126
|
"input",
|
|
@@ -2078,11 +2131,11 @@ function FilterDropdown({
|
|
|
2078
2131
|
onChange: (e) => setSearch(e.target.value),
|
|
2079
2132
|
onKeyDown: handleKeyDown,
|
|
2080
2133
|
placeholder: "Search...",
|
|
2081
|
-
className: `w-full pl-6 pr-2 py-1 text-xs bg-
|
|
2134
|
+
className: `w-full pl-6 pr-2 py-1 text-xs bg-[var(--popover)] border border-neutral-600 rounded text-neutral-200 placeholder-neutral-500 outline-none ${FORM_COLORS[color].focus}`
|
|
2082
2135
|
}
|
|
2083
2136
|
)
|
|
2084
2137
|
] }) }),
|
|
2085
|
-
hasAllOption && /* @__PURE__ */
|
|
2138
|
+
hasAllOption && /* @__PURE__ */ jsxs11(
|
|
2086
2139
|
"button",
|
|
2087
2140
|
{
|
|
2088
2141
|
"data-idx": 0,
|
|
@@ -2098,7 +2151,7 @@ function FilterDropdown({
|
|
|
2098
2151
|
const idx = i + (hasAllOption ? 1 : 0);
|
|
2099
2152
|
const isHighlighted = highlightIdx === idx;
|
|
2100
2153
|
const isSelected = value === opt.value;
|
|
2101
|
-
return /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ jsxs11(
|
|
2102
2155
|
"button",
|
|
2103
2156
|
{
|
|
2104
2157
|
"data-idx": idx,
|
|
@@ -2120,10 +2173,10 @@ function FilterDropdown({
|
|
|
2120
2173
|
// components/ui/sort-dropdown.tsx
|
|
2121
2174
|
import { useState as useState7, useRef as useRef8, useEffect as useEffect6 } from "react";
|
|
2122
2175
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, ChevronDown as ChevronDown5, Check as Check6 } from "lucide-react";
|
|
2123
|
-
import { jsx as jsx17, jsxs as
|
|
2176
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2124
2177
|
var VARIANT_CLASSES4 = {
|
|
2125
2178
|
filled: { bg: "bg-neutral-800", hoverBg: "hover:bg-neutral-700" },
|
|
2126
|
-
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-
|
|
2179
|
+
outline: { bg: "bg-transparent", hoverBg: "hover:bg-neutral-700" }
|
|
2127
2180
|
};
|
|
2128
2181
|
function SortDropdown({
|
|
2129
2182
|
field,
|
|
@@ -2162,8 +2215,8 @@ function SortDropdown({
|
|
|
2162
2215
|
};
|
|
2163
2216
|
const current = fields.find((f) => f.value === field) ?? fields[0];
|
|
2164
2217
|
const DirIcon = ascending ? ArrowUp2 : ArrowDown2;
|
|
2165
|
-
return /* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2218
|
+
return /* @__PURE__ */ jsxs12("div", { className: "relative flex items-center", ref, onKeyDown: handleKeyDown, children: [
|
|
2219
|
+
/* @__PURE__ */ jsxs12(
|
|
2167
2220
|
"button",
|
|
2168
2221
|
{
|
|
2169
2222
|
onClick: () => setIsOpen(!isOpen),
|
|
@@ -2186,7 +2239,7 @@ function SortDropdown({
|
|
|
2186
2239
|
]
|
|
2187
2240
|
}
|
|
2188
2241
|
),
|
|
2189
|
-
isOpen && /* @__PURE__ */ jsx17("div", { ref: menuRef, className: `absolute right-0 top-full z-50 mt-1 min-w-[140px]
|
|
2242
|
+
isOpen && /* @__PURE__ */ jsx17("div", { ref: menuRef, className: `absolute right-0 top-full z-50 mt-1 min-w-[140px] bg-[var(--popover)] backdrop-blur border ${FORM_COLORS[color].border} rounded-lg shadow-xl overflow-hidden`, children: fields.map((f, idx) => /* @__PURE__ */ jsxs12(
|
|
2190
2243
|
"button",
|
|
2191
2244
|
{
|
|
2192
2245
|
onClick: () => {
|
|
@@ -2206,7 +2259,7 @@ function SortDropdown({
|
|
|
2206
2259
|
}
|
|
2207
2260
|
|
|
2208
2261
|
// components/ui/form-actions.tsx
|
|
2209
|
-
import { jsx as jsx18, jsxs as
|
|
2262
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2210
2263
|
var PADDING_CLASSES = {
|
|
2211
2264
|
compact: "pt-2",
|
|
2212
2265
|
normal: "pt-2 border-t border-neutral-700",
|
|
@@ -2238,10 +2291,10 @@ function FormActions({
|
|
|
2238
2291
|
}) {
|
|
2239
2292
|
const showBorder = border ?? DEFAULT_BORDER[padding];
|
|
2240
2293
|
const base = PADDING_CLASSES[padding];
|
|
2241
|
-
const paddingClass = showBorder ? base : base.replace(/\s*border-t\s+border
|
|
2294
|
+
const paddingClass = showBorder ? base : base.replace(/\s*border-t\s+border-neutral-700/g, "");
|
|
2242
2295
|
const hasLeft = onBack || statusText;
|
|
2243
|
-
return /* @__PURE__ */
|
|
2244
|
-
hasLeft && /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsxs13("div", { className: `flex items-center ${hasLeft ? "justify-between" : "justify-end"} gap-2 ${paddingClass}`, children: [
|
|
2297
|
+
hasLeft && /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
2245
2298
|
onBack && /* @__PURE__ */ jsx18(
|
|
2246
2299
|
IconButton,
|
|
2247
2300
|
{
|
|
@@ -2253,7 +2306,7 @@ function FormActions({
|
|
|
2253
2306
|
),
|
|
2254
2307
|
statusText && /* @__PURE__ */ jsx18("span", { className: "text-xs text-neutral-500", children: statusText })
|
|
2255
2308
|
] }),
|
|
2256
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
2257
2310
|
onMinimize && /* @__PURE__ */ jsx18(
|
|
2258
2311
|
IconButton,
|
|
2259
2312
|
{
|
|
@@ -2300,7 +2353,7 @@ function FormActions({
|
|
|
2300
2353
|
import { useEffect as useEffect7, useRef as useRef9, useState as useState8 } from "react";
|
|
2301
2354
|
import { createPortal as createPortal3 } from "react-dom";
|
|
2302
2355
|
import { Info as Info2, AlertTriangle as AlertTriangle2, AlertCircle as AlertCircle2, Check as Check7 } from "lucide-react";
|
|
2303
|
-
import { jsx as jsx19, jsxs as
|
|
2356
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2304
2357
|
var SIZE_CLASSES2 = {
|
|
2305
2358
|
sm: "max-w-sm",
|
|
2306
2359
|
md: "max-w-md",
|
|
@@ -2333,16 +2386,16 @@ function Modal({ isOpen, onClose, title, children, kind = "info", size = "md", h
|
|
|
2333
2386
|
}, [isOpen]);
|
|
2334
2387
|
if (!isOpen) return null;
|
|
2335
2388
|
return createPortal3(
|
|
2336
|
-
/* @__PURE__ */
|
|
2389
|
+
/* @__PURE__ */ jsxs14("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
|
|
2337
2390
|
/* @__PURE__ */ jsx19("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm", onClick: onClose }),
|
|
2338
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsxs14(
|
|
2339
2392
|
"div",
|
|
2340
2393
|
{
|
|
2341
2394
|
ref: modalRef,
|
|
2342
2395
|
"data-testid": testId,
|
|
2343
2396
|
className: `relative bg-neutral-900 border border-neutral-700 rounded-xl shadow-2xl ${SIZE_CLASSES2[size]} w-full mx-4 overflow-hidden`,
|
|
2344
2397
|
children: [
|
|
2345
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-3 px-5 py-4 border-b border-neutral-800", children: [
|
|
2346
2399
|
KIND_ICON[kind],
|
|
2347
2400
|
/* @__PURE__ */ jsx19("h3", { className: "text-lg font-semibold text-white flex-1", children: title }),
|
|
2348
2401
|
headerActions?.map((a, i) => /* @__PURE__ */ jsx19(IconButton, { ...a }, i)),
|
|
@@ -2393,10 +2446,10 @@ function ConfirmModal({
|
|
|
2393
2446
|
onClose();
|
|
2394
2447
|
}
|
|
2395
2448
|
};
|
|
2396
|
-
return /* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ jsxs14(Modal, { isOpen, onClose, title, kind, hideCloseButton: true, children: [
|
|
2450
|
+
/* @__PURE__ */ jsxs14("div", { className: "text-neutral-300 mb-6", children: [
|
|
2398
2451
|
message,
|
|
2399
|
-
warning && /* @__PURE__ */
|
|
2452
|
+
warning && /* @__PURE__ */ jsxs14("div", { className: "mt-3 p-3 bg-amber-500/10 border border-amber-500/30 rounded-lg", children: [
|
|
2400
2453
|
/* @__PURE__ */ jsx19("p", { className: "text-amber-300 text-sm font-medium", children: warning }),
|
|
2401
2454
|
warningItems && warningItems.length > 0 && /* @__PURE__ */ jsx19("ul", { className: "mt-2 space-y-1", children: warningItems.map((item, i) => /* @__PURE__ */ jsx19("li", { className: "text-amber-300/80 text-sm ml-4 list-disc", children: item }, i)) })
|
|
2402
2455
|
] })
|
|
@@ -2424,7 +2477,7 @@ function AlertModal({
|
|
|
2424
2477
|
message,
|
|
2425
2478
|
kind = "info"
|
|
2426
2479
|
}) {
|
|
2427
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ jsxs14(Modal, { isOpen, onClose, title, kind, hideCloseButton: true, children: [
|
|
2428
2481
|
/* @__PURE__ */ jsx19("div", { className: "text-neutral-300 mb-6", children: message }),
|
|
2429
2482
|
/* @__PURE__ */ jsx19(
|
|
2430
2483
|
FormActions,
|
|
@@ -2563,7 +2616,7 @@ function cn(...inputs) {
|
|
|
2563
2616
|
}
|
|
2564
2617
|
|
|
2565
2618
|
// components/ui/selection-grid.tsx
|
|
2566
|
-
import { jsx as jsx20, jsxs as
|
|
2619
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2567
2620
|
var iconMap2 = {
|
|
2568
2621
|
"check": Check8,
|
|
2569
2622
|
"settings": Settings3,
|
|
@@ -2708,7 +2761,7 @@ function SelectionGrid({
|
|
|
2708
2761
|
function GridCard({ item, selected, onClick }) {
|
|
2709
2762
|
const color = resolveColor(item.color);
|
|
2710
2763
|
const Icon = item.IconComponent || (item.icon ? iconMap2[item.icon] : void 0);
|
|
2711
|
-
return /* @__PURE__ */
|
|
2764
|
+
return /* @__PURE__ */ jsxs15(
|
|
2712
2765
|
"button",
|
|
2713
2766
|
{
|
|
2714
2767
|
type: "button",
|
|
@@ -2737,7 +2790,7 @@ function GridCard({ item, selected, onClick }) {
|
|
|
2737
2790
|
function ListCard({ item, selected, onClick }) {
|
|
2738
2791
|
const color = resolveColor(item.color);
|
|
2739
2792
|
const Icon = item.IconComponent || (item.icon ? iconMap2[item.icon] : void 0);
|
|
2740
|
-
return /* @__PURE__ */
|
|
2793
|
+
return /* @__PURE__ */ jsxs15(
|
|
2741
2794
|
"button",
|
|
2742
2795
|
{
|
|
2743
2796
|
type: "button",
|
|
@@ -2757,7 +2810,7 @@ function ListCard({ item, selected, onClick }) {
|
|
|
2757
2810
|
style: { color: item.disabled ? void 0 : item.color || "#9ca3af" }
|
|
2758
2811
|
}
|
|
2759
2812
|
),
|
|
2760
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
2761
2814
|
/* @__PURE__ */ jsx20("span", { className: "text-xs font-medium text-neutral-200 block", children: item.name }),
|
|
2762
2815
|
item.description && /* @__PURE__ */ jsx20("span", { className: "text-xs text-neutral-500 block mt-0.5", children: item.description })
|
|
2763
2816
|
] })
|
|
@@ -2768,7 +2821,7 @@ function ListCard({ item, selected, onClick }) {
|
|
|
2768
2821
|
|
|
2769
2822
|
// components/ui/execution-details-panel.tsx
|
|
2770
2823
|
import { AlertTriangle as AlertTriangle3, Info as Info3 } from "lucide-react";
|
|
2771
|
-
import { jsx as jsx21, jsxs as
|
|
2824
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2772
2825
|
function ExecutionDetailsPanel({
|
|
2773
2826
|
details,
|
|
2774
2827
|
allowDirectEdits,
|
|
@@ -2777,12 +2830,12 @@ function ExecutionDetailsPanel({
|
|
|
2777
2830
|
className
|
|
2778
2831
|
}) {
|
|
2779
2832
|
const showToggle = onAllowDirectEditsChange !== void 0;
|
|
2780
|
-
return /* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2833
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("space-y-3", className), children: [
|
|
2834
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
2782
2835
|
/* @__PURE__ */ jsx21(Info3, { className: "w-4 h-4 text-neutral-500" }),
|
|
2783
2836
|
/* @__PURE__ */ jsx21("span", { className: "font-medium text-neutral-400 text-sm", children: "Execution Details" })
|
|
2784
2837
|
] }),
|
|
2785
|
-
showToggle && /* @__PURE__ */
|
|
2838
|
+
showToggle && /* @__PURE__ */ jsxs16(
|
|
2786
2839
|
"div",
|
|
2787
2840
|
{
|
|
2788
2841
|
className: "flex items-start gap-2 cursor-pointer",
|
|
@@ -2796,19 +2849,19 @@ function ExecutionDetailsPanel({
|
|
|
2796
2849
|
className: "mt-0.5"
|
|
2797
2850
|
}
|
|
2798
2851
|
) }),
|
|
2799
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
2800
2853
|
/* @__PURE__ */ jsx21("span", { className: "text-neutral-300 text-sm", children: "Allow direct file edits" }),
|
|
2801
2854
|
/* @__PURE__ */ jsx21("p", { className: "text-neutral-500 text-xs mt-0.5", children: allowDirectEdits ? "AI will modify files directly. Changes saved immediately." : "Changes will be shown in editor for review." })
|
|
2802
2855
|
] })
|
|
2803
2856
|
]
|
|
2804
2857
|
}
|
|
2805
2858
|
),
|
|
2806
|
-
warningMessage && /* @__PURE__ */ jsx21("div", { className: "rounded border border-red-500/50 bg-red-500/10 p-2", children: /* @__PURE__ */
|
|
2859
|
+
warningMessage && /* @__PURE__ */ jsx21("div", { className: "rounded border border-red-500/50 bg-red-500/10 p-2", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-2", children: [
|
|
2807
2860
|
/* @__PURE__ */ jsx21(AlertTriangle3, { className: "h-4 w-4 text-red-400 shrink-0 mt-0.5" }),
|
|
2808
2861
|
/* @__PURE__ */ jsx21("p", { className: "text-red-300 text-xs", children: warningMessage })
|
|
2809
2862
|
] }) }),
|
|
2810
|
-
details.length > 0 && /* @__PURE__ */ jsx21("div", { className: "space-y-2", children: details.map((row) => /* @__PURE__ */
|
|
2811
|
-
/* @__PURE__ */
|
|
2863
|
+
details.length > 0 && /* @__PURE__ */ jsx21("div", { className: "space-y-2", children: details.map((row) => /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-3", children: [
|
|
2864
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-neutral-500 text-xs w-24 shrink-0", children: [
|
|
2812
2865
|
row.label,
|
|
2813
2866
|
":"
|
|
2814
2867
|
] }),
|
|
@@ -2818,7 +2871,7 @@ function ExecutionDetailsPanel({
|
|
|
2818
2871
|
}
|
|
2819
2872
|
|
|
2820
2873
|
// components/ui/action-dialog.tsx
|
|
2821
|
-
import { jsx as jsx22, jsxs as
|
|
2874
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2822
2875
|
var dialogIconMap = {
|
|
2823
2876
|
"arrow-left": ArrowLeft2,
|
|
2824
2877
|
"arrow-right": ArrowRight2,
|
|
@@ -2953,9 +3006,9 @@ function ActionDialog({
|
|
|
2953
3006
|
}
|
|
2954
3007
|
}
|
|
2955
3008
|
return createPortal4(
|
|
2956
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsxs17("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
|
|
2957
3010
|
/* @__PURE__ */ jsx22("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm", onClick: onCancel }),
|
|
2958
|
-
/* @__PURE__ */
|
|
3011
|
+
/* @__PURE__ */ jsxs17(
|
|
2959
3012
|
"div",
|
|
2960
3013
|
{
|
|
2961
3014
|
className: cn(
|
|
@@ -2964,7 +3017,7 @@ function ActionDialog({
|
|
|
2964
3017
|
className
|
|
2965
3018
|
),
|
|
2966
3019
|
children: [
|
|
2967
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3 px-4 py-3 border-b border-neutral-700 flex-shrink-0", children: [
|
|
2968
3021
|
Icon && /* @__PURE__ */ jsx22(
|
|
2969
3022
|
Icon,
|
|
2970
3023
|
{
|
|
@@ -2972,7 +3025,7 @@ function ActionDialog({
|
|
|
2972
3025
|
style: iconColor ? { color: iconColor } : void 0
|
|
2973
3026
|
}
|
|
2974
3027
|
),
|
|
2975
|
-
/* @__PURE__ */
|
|
3028
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col", children: [
|
|
2976
3029
|
/* @__PURE__ */ jsx22("span", { className: "text-sm font-semibold text-neutral-200", children: title }),
|
|
2977
3030
|
subtitle && /* @__PURE__ */ jsx22("span", { className: "text-xs text-neutral-500", children: subtitle })
|
|
2978
3031
|
] }),
|
|
@@ -2988,8 +3041,8 @@ function ActionDialog({
|
|
|
2988
3041
|
}
|
|
2989
3042
|
)
|
|
2990
3043
|
] }),
|
|
2991
|
-
/* @__PURE__ */
|
|
2992
|
-
hasSelection && /* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsxs17("div", { className: "px-4 py-4 overflow-y-auto flex-1 min-h-0 space-y-4", children: [
|
|
3045
|
+
hasSelection && /* @__PURE__ */ jsxs17("div", { children: [
|
|
2993
3046
|
selectionLabel && /* @__PURE__ */ jsx22("div", { className: "text-xs text-neutral-500 mb-2", children: selectionLabel }),
|
|
2994
3047
|
/* @__PURE__ */ jsx22(
|
|
2995
3048
|
SelectionGrid,
|
|
@@ -3004,8 +3057,8 @@ function ActionDialog({
|
|
|
3004
3057
|
}
|
|
3005
3058
|
)
|
|
3006
3059
|
] }),
|
|
3007
|
-
hasScenarios && /* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3060
|
+
hasScenarios && /* @__PURE__ */ jsxs17("div", { children: [
|
|
3061
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between mb-2", children: [
|
|
3009
3062
|
/* @__PURE__ */ jsx22("span", { className: "text-xs text-neutral-500", children: scenarioLabel }),
|
|
3010
3063
|
/* @__PURE__ */ jsx22(
|
|
3011
3064
|
"button",
|
|
@@ -3063,11 +3116,11 @@ function ActionDialog({
|
|
|
3063
3116
|
}
|
|
3064
3117
|
|
|
3065
3118
|
// components/ui/setting-row.tsx
|
|
3066
|
-
import { jsx as jsx23, jsxs as
|
|
3119
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3067
3120
|
function SettingRow(props) {
|
|
3068
3121
|
const { label, description, disabled, className = "" } = props;
|
|
3069
|
-
return /* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3122
|
+
return /* @__PURE__ */ jsxs18("div", { className: `flex items-start justify-between gap-4 ${className}`, children: [
|
|
3123
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
3071
3124
|
/* @__PURE__ */ jsx23("label", { className: "text-neutral-200 leading-7", children: label }),
|
|
3072
3125
|
description && /* @__PURE__ */ jsx23("p", { className: "text-sm text-neutral-500", children: description })
|
|
3073
3126
|
] }),
|
|
@@ -3108,8 +3161,8 @@ function SettingRow(props) {
|
|
|
3108
3161
|
}
|
|
3109
3162
|
|
|
3110
3163
|
// components/ui/file-tree.tsx
|
|
3111
|
-
import { FileCode as FileCode2, Folder as Folder5, ChevronRight as ChevronRight3, ChevronDown as ChevronDown7 } from "lucide-react";
|
|
3112
|
-
import { jsx as jsx24, jsxs as
|
|
3164
|
+
import { FileCode as FileCode2, Folder as Folder5, FolderOpen, ChevronRight as ChevronRight3, ChevronDown as ChevronDown7 } from "lucide-react";
|
|
3165
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3113
3166
|
var ACCENT_SELECTED = {
|
|
3114
3167
|
blue: "bg-blue-400/20 text-neutral-200",
|
|
3115
3168
|
purple: "bg-purple-400/20 text-neutral-200",
|
|
@@ -3195,16 +3248,16 @@ function FileTreeNodeItem({ node, path, selectedPath, onSelectFile, expandedPath
|
|
|
3195
3248
|
const base = "flex items-center gap-1.5 py-0.5 px-1 rounded text-xs transition-colors overflow-hidden whitespace-nowrap";
|
|
3196
3249
|
const selectedClass = ACCENT_SELECTED[accentColor] ?? ACCENT_SELECTED.blue;
|
|
3197
3250
|
const iconColorClass = ACCENT_ICON[accentColor] ?? ACCENT_ICON.blue;
|
|
3198
|
-
const rowClass = isSelected ? `${base} ${selectedClass}` : isDir ? `${base} cursor-pointer hover:text-neutral-200
|
|
3199
|
-
return /* @__PURE__ */
|
|
3200
|
-
/* @__PURE__ */
|
|
3251
|
+
const rowClass = isSelected ? `${base} ${selectedClass}` : isDir ? `${base} cursor-pointer hover:text-neutral-200 ${iconColorClass}` : `${base} cursor-pointer hover:bg-neutral-700/50 hover:text-neutral-200 ${iconColorClass}`;
|
|
3252
|
+
return /* @__PURE__ */ jsxs19("li", { children: [
|
|
3253
|
+
/* @__PURE__ */ jsxs19(
|
|
3201
3254
|
"button",
|
|
3202
3255
|
{
|
|
3203
3256
|
onClick: isDir ? () => onTogglePath(path) : () => onSelectFile(path),
|
|
3204
3257
|
className: rowClass,
|
|
3205
3258
|
children: [
|
|
3206
3259
|
isDir ? expanded ? /* @__PURE__ */ jsx24(ChevronDown7, { className: "w-3 h-3 shrink-0" }) : /* @__PURE__ */ jsx24(ChevronRight3, { className: "w-3 h-3 shrink-0" }) : /* @__PURE__ */ jsx24("span", { className: "w-3" }),
|
|
3207
|
-
isDir ? /* @__PURE__ */ jsx24(
|
|
3260
|
+
isDir ? expanded ? /* @__PURE__ */ jsx24(FolderOpen, { className: `w-3.5 h-3.5 shrink-0 ${iconColorClass}` }) : /* @__PURE__ */ jsx24(Folder5, { className: `w-3.5 h-3.5 shrink-0 ${iconColorClass}` }) : /* @__PURE__ */ jsx24(FileCode2, { className: `w-3.5 h-3.5 shrink-0 ${iconColorClass}` }),
|
|
3208
3261
|
/* @__PURE__ */ jsx24("span", { className: "truncate", children: node.name })
|
|
3209
3262
|
]
|
|
3210
3263
|
}
|
|
@@ -3230,7 +3283,7 @@ function FileTreeNodeItem({ node, path, selectedPath, onSelectFile, expandedPath
|
|
|
3230
3283
|
|
|
3231
3284
|
// components/ui/editor-toolbar.tsx
|
|
3232
3285
|
import { useState as useState9 } from "react";
|
|
3233
|
-
import { Fragment as Fragment5, jsx as jsx25, jsxs as
|
|
3286
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3234
3287
|
function EditorToolbar({
|
|
3235
3288
|
isDirty,
|
|
3236
3289
|
isSaving = false,
|
|
@@ -3258,8 +3311,8 @@ function EditorToolbar({
|
|
|
3258
3311
|
if (!showSaveButton && !canReset && !leftActions?.length && !rightActions?.length) {
|
|
3259
3312
|
return null;
|
|
3260
3313
|
}
|
|
3261
|
-
return /* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3314
|
+
return /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
3315
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between px-4 py-1.5 bg-neutral-900 border-b border-neutral-800", children: [
|
|
3263
3316
|
/* @__PURE__ */ jsx25("div", { className: "flex items-center gap-2", children: leftActions?.map((a, i) => /* @__PURE__ */ jsx25(IconButton, { ...a }, i)) }),
|
|
3264
3317
|
isDirty && /* @__PURE__ */ jsx25(
|
|
3265
3318
|
Label,
|
|
@@ -3271,7 +3324,7 @@ function EditorToolbar({
|
|
|
3271
3324
|
tooltip: { description: "File has unsaved changes" }
|
|
3272
3325
|
}
|
|
3273
3326
|
),
|
|
3274
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
3275
3328
|
rightActions?.map((a, i) => /* @__PURE__ */ jsx25(IconButton, { ...a }, i)),
|
|
3276
3329
|
canReset && onReset && /* @__PURE__ */ jsx25(
|
|
3277
3330
|
IconButton,
|
|
@@ -3315,7 +3368,7 @@ function EditorToolbar({
|
|
|
3315
3368
|
// components/ui/bottom-panel-header.tsx
|
|
3316
3369
|
import { useState as useState10, useRef as useRef10, useEffect as useEffect9, useCallback as useCallback4 } from "react";
|
|
3317
3370
|
import { RefreshCw as RefreshCw3 } from "lucide-react";
|
|
3318
|
-
import { Fragment as Fragment6, jsx as jsx26, jsxs as
|
|
3371
|
+
import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3319
3372
|
var DEFAULT_ACTIVE_TEXT = "text-neutral-300";
|
|
3320
3373
|
var DEFAULT_INACTIVE_CLASSES = "border-transparent text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/30";
|
|
3321
3374
|
var TAB_ICON_PADDING = 56;
|
|
@@ -3373,7 +3426,7 @@ function BottomPanelHeader({
|
|
|
3373
3426
|
const compactTabs = layoutMode === "compact-all";
|
|
3374
3427
|
const compactBanner = layoutMode === "compact-banner" || layoutMode === "compact-all";
|
|
3375
3428
|
const bannerStyles = statusBanner?.type === "warning" ? "bg-amber-500/10 border-amber-500/30 text-amber-300" : "bg-blue-500/10 border-blue-500/30 text-blue-300";
|
|
3376
|
-
return /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsxs21(
|
|
3377
3430
|
"div",
|
|
3378
3431
|
{
|
|
3379
3432
|
ref: containerRef,
|
|
@@ -3391,10 +3444,10 @@ function BottomPanelHeader({
|
|
|
3391
3444
|
onClick: () => onTabChange(tab.id),
|
|
3392
3445
|
"data-testid": tab.testId,
|
|
3393
3446
|
className: `h-[41px] flex items-center justify-center gap-2 ${compactTabs ? "px-3" : "px-4"} text-sm border-b-2 transition-colors cursor-pointer ${baseClasses}`,
|
|
3394
|
-
children: compactTabs ? /* @__PURE__ */
|
|
3447
|
+
children: compactTabs ? /* @__PURE__ */ jsxs21("span", { className: "relative flex items-center justify-center w-[18px] h-[18px] flex-shrink-0", children: [
|
|
3395
3448
|
TabIcon2 && /* @__PURE__ */ jsx26(TabIcon2, { className: "w-[18px] h-[18px]" }),
|
|
3396
3449
|
tab.count !== void 0 && /* @__PURE__ */ jsx26("span", { className: "absolute -top-1.5 -right-2", children: /* @__PURE__ */ jsx26(Badge, { value: tab.count, color: tab.countColor, size: "xss" }) })
|
|
3397
|
-
] }) : /* @__PURE__ */
|
|
3450
|
+
] }) : /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
3398
3451
|
/* @__PURE__ */ jsx26("span", { className: "flex items-center justify-center w-4 h-4 flex-shrink-0", children: TabIcon2 && /* @__PURE__ */ jsx26(TabIcon2, { className: "w-4 h-4" }) }),
|
|
3399
3452
|
tab.hideLabel ? /* @__PURE__ */ jsx26("span", { className: "hidden sm:inline", children: tab.label }) : /* @__PURE__ */ jsx26("span", { children: tab.label }),
|
|
3400
3453
|
tab.count !== void 0 && /* @__PURE__ */ jsx26(Badge, { value: tab.count, color: tab.countColor, size: "xss" })
|
|
@@ -3407,11 +3460,11 @@ function BottomPanelHeader({
|
|
|
3407
3460
|
}
|
|
3408
3461
|
return tabButton;
|
|
3409
3462
|
}) }),
|
|
3410
|
-
/* @__PURE__ */ jsx26("div", { className: "flex-1 min-w-0 flex items-center justify-center overflow-hidden", children: statusBanner && (compactBanner ? /* @__PURE__ */ jsx26(Tooltip, { content: { description: statusBanner.message }, position: "bottom", children: /* @__PURE__ */ jsx26("div", { className: `flex items-center px-2 py-1.5 ${bannerStyles} rounded text-xs`, children: /* @__PURE__ */ jsx26(RefreshCw3, { className: "w-3 h-3 flex-shrink-0" }) }) }) : /* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ jsx26("div", { className: "flex-1 min-w-0 flex items-center justify-center overflow-hidden", children: statusBanner && (compactBanner ? /* @__PURE__ */ jsx26(Tooltip, { content: { description: statusBanner.message }, position: "bottom", children: /* @__PURE__ */ jsx26("div", { className: `flex items-center px-2 py-1.5 ${bannerStyles} rounded text-xs`, children: /* @__PURE__ */ jsx26(RefreshCw3, { className: "w-3 h-3 flex-shrink-0" }) }) }) : /* @__PURE__ */ jsxs21("div", { className: `flex items-center gap-2 px-2.5 py-1.5 ${bannerStyles} rounded text-xs max-w-full`, children: [
|
|
3411
3464
|
/* @__PURE__ */ jsx26(RefreshCw3, { className: "w-3 h-3 flex-shrink-0" }),
|
|
3412
3465
|
/* @__PURE__ */ jsx26("span", { className: "truncate", children: statusBanner.message })
|
|
3413
3466
|
] })) }),
|
|
3414
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsxs21("div", { ref: actionsRef, className: "flex items-center gap-1.5 pr-3 flex-shrink-0", children: [
|
|
3415
3468
|
actions?.map((a, i) => /* @__PURE__ */ jsx26(IconButton, { ...a }, i)),
|
|
3416
3469
|
customActions,
|
|
3417
3470
|
onCollapse && /* @__PURE__ */ jsx26(
|
|
@@ -3431,7 +3484,7 @@ function BottomPanelHeader({
|
|
|
3431
3484
|
|
|
3432
3485
|
// components/ui/frontmatter-form-header.tsx
|
|
3433
3486
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
3434
|
-
import { jsx as jsx27, jsxs as
|
|
3487
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3435
3488
|
function FrontmatterFormHeader({
|
|
3436
3489
|
collapsed,
|
|
3437
3490
|
onToggle,
|
|
@@ -3442,8 +3495,8 @@ function FrontmatterFormHeader({
|
|
|
3442
3495
|
readOnly
|
|
3443
3496
|
}) {
|
|
3444
3497
|
const hasFm = frontmatterEnabled !== false;
|
|
3445
|
-
return /* @__PURE__ */
|
|
3446
|
-
/* @__PURE__ */
|
|
3498
|
+
return /* @__PURE__ */ jsxs22("div", { className: "bg-neutral-900 border-b border-neutral-800 select-none", children: [
|
|
3499
|
+
/* @__PURE__ */ jsxs22(
|
|
3447
3500
|
"button",
|
|
3448
3501
|
{
|
|
3449
3502
|
type: "button",
|
|
@@ -3462,8 +3515,8 @@ function FrontmatterFormHeader({
|
|
|
3462
3515
|
]
|
|
3463
3516
|
}
|
|
3464
3517
|
),
|
|
3465
|
-
!collapsed && /* @__PURE__ */
|
|
3466
|
-
onFrontmatterToggle && /* @__PURE__ */
|
|
3518
|
+
!collapsed && /* @__PURE__ */ jsxs22("div", { className: "px-3 pb-3 pt-1", children: [
|
|
3519
|
+
onFrontmatterToggle && /* @__PURE__ */ jsxs22("div", { className: "inline-flex items-center gap-1.5 mb-3", children: [
|
|
3467
3520
|
/* @__PURE__ */ jsx27(
|
|
3468
3521
|
Checkbox,
|
|
3469
3522
|
{
|
|
@@ -3488,7 +3541,7 @@ function FrontmatterFormHeader({
|
|
|
3488
3541
|
|
|
3489
3542
|
// components/ui/editor-placeholder-card.tsx
|
|
3490
3543
|
import { useState as useState11, useRef as useRef11, useLayoutEffect as useLayoutEffect3 } from "react";
|
|
3491
|
-
import { Fragment as Fragment7, jsx as jsx28, jsxs as
|
|
3544
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3492
3545
|
var COLORS = {
|
|
3493
3546
|
purple: {
|
|
3494
3547
|
name: "text-purple-400",
|
|
@@ -3549,14 +3602,14 @@ function EditorPlaceholderCard({
|
|
|
3549
3602
|
} catch {
|
|
3550
3603
|
}
|
|
3551
3604
|
};
|
|
3552
|
-
return /* @__PURE__ */
|
|
3553
|
-
/* @__PURE__ */
|
|
3554
|
-
/* @__PURE__ */
|
|
3605
|
+
return /* @__PURE__ */ jsxs23("div", { className: `group px-3 py-2.5 ${!hasValue ? "opacity-60" : ""} ${className}`, children: [
|
|
3606
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-2", children: [
|
|
3607
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex-1 min-w-0", children: [
|
|
3555
3608
|
/* @__PURE__ */ jsx28("code", { className: `text-xs font-mono px-1.5 py-0.5 rounded ${colors.name} ${colors.nameBg}`, children: "{{" + name + "}}" }),
|
|
3556
3609
|
required && /* @__PURE__ */ jsx28("span", { className: "ml-2 inline-block px-1.5 py-0.5 text-xs font-semibold uppercase bg-red-500/15 text-red-400 border border-red-500/30 rounded", children: "Required" }),
|
|
3557
3610
|
/* @__PURE__ */ jsx28("p", { className: "text-xs text-neutral-500 mt-1.5 line-clamp-2", children: description })
|
|
3558
3611
|
] }),
|
|
3559
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
3560
3613
|
showCopyPlaceholder && /* @__PURE__ */ jsx28(
|
|
3561
3614
|
IconButton,
|
|
3562
3615
|
{
|
|
@@ -3582,7 +3635,7 @@ function EditorPlaceholderCard({
|
|
|
3582
3635
|
actions?.map((a, i) => /* @__PURE__ */ jsx28(IconButton, { ...a }, i))
|
|
3583
3636
|
] })
|
|
3584
3637
|
] }),
|
|
3585
|
-
hasValue && /* @__PURE__ */ jsx28("div", { className: "mt-2", children: hideValue ? /* @__PURE__ */
|
|
3638
|
+
hasValue && /* @__PURE__ */ jsx28("div", { className: "mt-2", children: hideValue ? /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
3586
3639
|
/* @__PURE__ */ jsx28("span", { className: "text-xs text-neutral-500 font-medium", children: valueLabel }),
|
|
3587
3640
|
/* @__PURE__ */ jsx28("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx28(
|
|
3588
3641
|
Input,
|
|
@@ -3597,8 +3650,8 @@ function EditorPlaceholderCard({
|
|
|
3597
3650
|
color: "neutral"
|
|
3598
3651
|
}
|
|
3599
3652
|
) })
|
|
3600
|
-
] }) : /* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3653
|
+
] }) : /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
3654
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between", children: [
|
|
3602
3655
|
/* @__PURE__ */ jsx28("span", { className: "text-xs text-neutral-500 font-medium", children: valueLabel }),
|
|
3603
3656
|
(isOverflowing || isExpanded) && /* @__PURE__ */ jsx28(
|
|
3604
3657
|
IconButton,
|
|
@@ -3625,7 +3678,7 @@ function EditorPlaceholderCard({
|
|
|
3625
3678
|
|
|
3626
3679
|
// components/ui/detail-view-wrapper.tsx
|
|
3627
3680
|
import "react";
|
|
3628
|
-
import { jsx as jsx29, jsxs as
|
|
3681
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3629
3682
|
function DetailViewWrapper({
|
|
3630
3683
|
editorContent,
|
|
3631
3684
|
actions,
|
|
@@ -3633,9 +3686,9 @@ function DetailViewWrapper({
|
|
|
3633
3686
|
rightSidebar,
|
|
3634
3687
|
showRightSidebar = false
|
|
3635
3688
|
}) {
|
|
3636
|
-
return /* @__PURE__ */
|
|
3689
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex-1 flex flex-col overflow-hidden min-h-0", children: [
|
|
3637
3690
|
actions && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-end border-b border-neutral-800 bg-neutral-950/50 px-2 h-[36px]", children: /* @__PURE__ */ jsx29("div", { className: "flex items-center gap-1", children: actions }) }),
|
|
3638
|
-
/* @__PURE__ */
|
|
3691
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex-1 flex overflow-hidden min-h-0", children: [
|
|
3639
3692
|
/* @__PURE__ */ jsx29("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden", children: editorContent && /* @__PURE__ */ jsx29("div", { className: "flex-1 flex flex-col overflow-hidden", children: editorContent }) }),
|
|
3640
3693
|
showRightSidebar && rightSidebar && /* @__PURE__ */ jsx29("div", { className: "w-[300px] border-l border-neutral-800 overflow-hidden flex-shrink-0", children: rightSidebar })
|
|
3641
3694
|
] }),
|
|
@@ -3663,7 +3716,7 @@ import {
|
|
|
3663
3716
|
Package as Package2,
|
|
3664
3717
|
Puzzle as Puzzle4
|
|
3665
3718
|
} from "lucide-react";
|
|
3666
|
-
import { Fragment as Fragment8, jsx as jsx30, jsxs as
|
|
3719
|
+
import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3667
3720
|
var TYPE_ICONS = {
|
|
3668
3721
|
skill: Sparkles4,
|
|
3669
3722
|
command: Terminal4,
|
|
@@ -3808,7 +3861,7 @@ function RegistryCardBadgeRow({ sourceType, pluginType, category, onFilterCatego
|
|
|
3808
3861
|
const scopeIcons = knownScopes.map((s) => SCOPE_ICONS[s]).filter(Boolean);
|
|
3809
3862
|
const hasContent = sourceType || pluginType || category || isInstalled || isDisabled || status?.updateAvailable || status?.modified;
|
|
3810
3863
|
if (!hasContent) return null;
|
|
3811
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
3812
3865
|
sourceType && SOURCE_TYPE_BADGES[sourceType] && /* @__PURE__ */ jsx30(
|
|
3813
3866
|
Label,
|
|
3814
3867
|
{
|
|
@@ -3874,7 +3927,7 @@ function RegistryCard(props) {
|
|
|
3874
3927
|
status: props.status
|
|
3875
3928
|
}
|
|
3876
3929
|
);
|
|
3877
|
-
subtitle = /* @__PURE__ */
|
|
3930
|
+
subtitle = /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3878
3931
|
"by ",
|
|
3879
3932
|
props.author
|
|
3880
3933
|
] });
|
|
@@ -3922,7 +3975,7 @@ function RegistryCard(props) {
|
|
|
3922
3975
|
const typeKey = key === "mcpServers" ? "mcp" : key.replace(/s$/, "");
|
|
3923
3976
|
const count = counts[typeKey];
|
|
3924
3977
|
if (!count || count <= 0) return [];
|
|
3925
|
-
return [/* @__PURE__ */ jsx30(Tooltip, { content: { description: `${count} ${count === 1 ? label : labelPlural}` }, position: "top", children: /* @__PURE__ */
|
|
3978
|
+
return [/* @__PURE__ */ jsx30(Tooltip, { content: { description: `${count} ${count === 1 ? label : labelPlural}` }, position: "top", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-0.5", children: [
|
|
3926
3979
|
/* @__PURE__ */ jsx30(Icon, { className: `w-3 h-3 ${color}` }),
|
|
3927
3980
|
/* @__PURE__ */ jsx30("span", { className: "text-[10px] text-neutral-500", children: count })
|
|
3928
3981
|
] }) }, `pkg-${key}`)];
|
|
@@ -3941,7 +3994,7 @@ function RegistryCard(props) {
|
|
|
3941
3994
|
scopes: displayableScopes
|
|
3942
3995
|
}
|
|
3943
3996
|
);
|
|
3944
|
-
subtitle = /* @__PURE__ */
|
|
3997
|
+
subtitle = /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3945
3998
|
"by ",
|
|
3946
3999
|
props.author
|
|
3947
4000
|
] });
|
|
@@ -3976,11 +4029,11 @@ function RegistryCard(props) {
|
|
|
3976
4029
|
const compatibleTools = props.compatibleTools ?? [];
|
|
3977
4030
|
bottomLogos = compatibleTools.map((tool) => /* @__PURE__ */ jsx30(Tooltip, { content: { description: `Compatible with ${AI_TOOL_NAMES[tool] ?? tool}` }, position: "top", children: /* @__PURE__ */ jsx30(AiToolIcon, { tool, size: 16 }) }, tool));
|
|
3978
4031
|
bottomStats = [
|
|
3979
|
-
...props.stars != null && props.stars > 0 ? [/* @__PURE__ */ jsx30(CardClickable, { onClick: () => props.onSortBy?.("stars"), children: /* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.stars.toLocaleString()} stars \xB7 Click to sort` }, position: "top", children: /* @__PURE__ */
|
|
4032
|
+
...props.stars != null && props.stars > 0 ? [/* @__PURE__ */ jsx30(CardClickable, { onClick: () => props.onSortBy?.("stars"), children: /* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.stars.toLocaleString()} stars \xB7 Click to sort` }, position: "top", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-1 text-[10px] text-amber-400/80", children: [
|
|
3980
4033
|
/* @__PURE__ */ jsx30(Star4, { className: "w-3 h-3" }),
|
|
3981
4034
|
formatCount(props.stars)
|
|
3982
4035
|
] }) }) }, "stars")] : [],
|
|
3983
|
-
...props.downloads != null && props.downloads > 0 ? [/* @__PURE__ */ jsx30(CardClickable, { onClick: () => props.onSortBy?.("downloads"), children: /* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.downloads.toLocaleString()} downloads \xB7 Click to sort` }, position: "top", children: /* @__PURE__ */
|
|
4036
|
+
...props.downloads != null && props.downloads > 0 ? [/* @__PURE__ */ jsx30(CardClickable, { onClick: () => props.onSortBy?.("downloads"), children: /* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.downloads.toLocaleString()} downloads \xB7 Click to sort` }, position: "top", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-1 text-[10px] text-emerald-400/80", children: [
|
|
3984
4037
|
/* @__PURE__ */ jsx30(Download3, { className: "w-3 h-3" }),
|
|
3985
4038
|
formatCount(props.downloads)
|
|
3986
4039
|
] }) }) }, "downloads")] : []
|
|
@@ -4038,7 +4091,7 @@ function RegistryCard(props) {
|
|
|
4038
4091
|
scopes: displayableScopes
|
|
4039
4092
|
}
|
|
4040
4093
|
);
|
|
4041
|
-
subtitle = /* @__PURE__ */
|
|
4094
|
+
subtitle = /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
4042
4095
|
"by ",
|
|
4043
4096
|
props.author
|
|
4044
4097
|
] });
|
|
@@ -4073,14 +4126,14 @@ function RegistryCard(props) {
|
|
|
4073
4126
|
const allTools = props.allToolKeys ?? [];
|
|
4074
4127
|
bottomLogos = allTools.map((tool) => /* @__PURE__ */ jsx30(Tooltip, { content: { description: `Compatible with ${AI_TOOL_NAMES[tool] ?? tool}` }, position: "top", children: /* @__PURE__ */ jsx30(AiToolIcon, { tool, size: 14 }) }, tool));
|
|
4075
4128
|
if (props.installs != null && props.installs > 0) {
|
|
4076
|
-
bottomStats = [/* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.installs.toLocaleString()} installs` }, position: "top", children: /* @__PURE__ */
|
|
4129
|
+
bottomStats = [/* @__PURE__ */ jsx30(Tooltip, { content: { description: `${props.installs.toLocaleString()} installs` }, position: "top", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-1 text-[10px] text-neutral-500", children: [
|
|
4077
4130
|
/* @__PURE__ */ jsx30(Download3, { className: "w-3 h-3" }),
|
|
4078
4131
|
props.installs.toLocaleString()
|
|
4079
4132
|
] }) }, "installs")];
|
|
4080
4133
|
}
|
|
4081
4134
|
}
|
|
4082
4135
|
const borderClass = flash === "success" ? "border-green-500/60 ring-1 ring-green-500/30 bg-green-500/5" : flash === "error" ? "border-red-500/60 ring-1 ring-red-500/30 bg-red-500/5" : flash === "warning" ? "border-amber-500/60 ring-1 ring-amber-500/30 bg-amber-500/5" : "border-neutral-700";
|
|
4083
|
-
return /* @__PURE__ */
|
|
4136
|
+
return /* @__PURE__ */ jsxs25(
|
|
4084
4137
|
"div",
|
|
4085
4138
|
{
|
|
4086
4139
|
role: "button",
|
|
@@ -4094,9 +4147,9 @@ function RegistryCard(props) {
|
|
|
4094
4147
|
}
|
|
4095
4148
|
},
|
|
4096
4149
|
children: [
|
|
4097
|
-
/* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-2 mb-2", children: [
|
|
4098
4151
|
/* @__PURE__ */ jsx30("div", { className: "flex-1 min-w-0 min-h-7 overflow-hidden", children: topLeft }),
|
|
4099
|
-
/* @__PURE__ */ jsx30("div", { className: "relative w-7 h-7 flex items-center justify-center shrink-0", children: isInstalling ? /* @__PURE__ */ jsx30(Loader22, { className: "w-4 h-4 text-blue-400 animate-spin" }) : /* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ jsx30("div", { className: "relative w-7 h-7 flex items-center justify-center shrink-0", children: isInstalling ? /* @__PURE__ */ jsx30(Loader22, { className: "w-4 h-4 text-blue-400 animate-spin" }) : /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
4100
4153
|
/* @__PURE__ */ jsx30(Tooltip, { content: { description: `${typeLabel} extension` }, position: "top", children: /* @__PURE__ */ jsx30(TypeIcon, { className: `w-4 h-4 group-hover:opacity-0 transition-opacity ${typeIconColor}` }) }),
|
|
4101
4154
|
installButton && /* @__PURE__ */ jsx30("div", { className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity", onClick: (e) => e.stopPropagation(), children: installButton })
|
|
4102
4155
|
] }) })
|
|
@@ -4106,7 +4159,7 @@ function RegistryCard(props) {
|
|
|
4106
4159
|
description && /* @__PURE__ */ jsx30("p", { className: "text-xs text-neutral-500 mb-3 flex-grow line-clamp-2", children: description }),
|
|
4107
4160
|
errorMessage && /* @__PURE__ */ jsx30("p", { className: `text-[11px] mb-2 break-all ${flash === "warning" ? "text-amber-400" : "text-red-400"}`, children: errorMessage }),
|
|
4108
4161
|
(bottomLogos.length > 0 || bottomStats.length > 0 || updatedAt) && (() => {
|
|
4109
|
-
const dateNode = updatedAt ? /* @__PURE__ */ jsx30(Tooltip, { content: { description: onDateClick ? `Last updated ${formatFullDate(updatedAt)} \xB7 Click to sort by date` : `Last updated ${formatFullDate(updatedAt)}` }, position: "top", children: /* @__PURE__ */
|
|
4162
|
+
const dateNode = updatedAt ? /* @__PURE__ */ jsx30(Tooltip, { content: { description: onDateClick ? `Last updated ${formatFullDate(updatedAt)} \xB7 Click to sort by date` : `Last updated ${formatFullDate(updatedAt)}` }, position: "top", children: /* @__PURE__ */ jsxs25(
|
|
4110
4163
|
"span",
|
|
4111
4164
|
{
|
|
4112
4165
|
className: `flex items-center gap-1 text-[10px] text-neutral-500 whitespace-nowrap${onDateClick ? " cursor-pointer hover:brightness-125 transition-all" : ""}`,
|
|
@@ -4121,7 +4174,7 @@ function RegistryCard(props) {
|
|
|
4121
4174
|
}
|
|
4122
4175
|
) }) : null;
|
|
4123
4176
|
const hasStats = bottomStats.length > 0;
|
|
4124
|
-
return /* @__PURE__ */
|
|
4177
|
+
return /* @__PURE__ */ jsxs25("div", { className: "mt-auto pt-1 flex items-end", children: [
|
|
4125
4178
|
/* @__PURE__ */ jsx30("div", { className: `${hasStats ? "w-1/3" : "w-2/3"} flex flex-wrap gap-1.5 content-end`, children: bottomLogos }),
|
|
4126
4179
|
hasStats && /* @__PURE__ */ jsx30("div", { className: "w-1/3 flex justify-center items-end gap-2", children: bottomStats }),
|
|
4127
4180
|
/* @__PURE__ */ jsx30("div", { className: "w-1/3 flex justify-end items-end", children: dateNode })
|
|
@@ -4131,13 +4184,13 @@ function RegistryCard(props) {
|
|
|
4131
4184
|
if ("renderScopeConfirm" in props && props.renderScopeConfirm) {
|
|
4132
4185
|
return /* @__PURE__ */ jsx30("div", { onClick: (e) => e.stopPropagation(), children: props.renderScopeConfirm({ isOpen: true, onClose: () => setShowScopeConfirm(false), onConfirm: props.onInstall, name }) });
|
|
4133
4186
|
}
|
|
4134
|
-
return /* @__PURE__ */ jsx30("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx30("div", { className: "fixed inset-0 bg-black/50 z-50 flex items-center justify-center", onClick: () => setShowScopeConfirm(false), children: /* @__PURE__ */
|
|
4187
|
+
return /* @__PURE__ */ jsx30("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx30("div", { className: "fixed inset-0 bg-black/50 z-50 flex items-center justify-center", onClick: () => setShowScopeConfirm(false), children: /* @__PURE__ */ jsxs25("div", { className: "bg-neutral-800 border border-neutral-700 rounded-lg p-4 max-w-sm", onClick: (e) => e.stopPropagation(), children: [
|
|
4135
4188
|
/* @__PURE__ */ jsx30("h3", { className: "text-sm font-medium text-neutral-200 mb-2", children: ALREADY_AT_USER }),
|
|
4136
|
-
/* @__PURE__ */
|
|
4189
|
+
/* @__PURE__ */ jsxs25("p", { className: "text-xs text-neutral-400 mb-4", children: [
|
|
4137
4190
|
/* @__PURE__ */ jsx30("strong", { className: "text-neutral-300", children: name }),
|
|
4138
4191
|
" is already installed at user level and available to all projects. Do you also want to install it at project level?"
|
|
4139
4192
|
] }),
|
|
4140
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex justify-end gap-2", children: [
|
|
4141
4194
|
/* @__PURE__ */ jsx30("button", { type: "button", onClick: () => setShowScopeConfirm(false), className: "px-3 py-1.5 text-xs text-neutral-400 hover:text-neutral-200 transition-colors cursor-pointer", children: "Cancel" }),
|
|
4142
4195
|
/* @__PURE__ */ jsx30("button", { type: "button", onClick: () => {
|
|
4143
4196
|
setShowScopeConfirm(false);
|
|
@@ -4158,7 +4211,7 @@ import { ChevronsUpDown as ChevronsUpDown2, ChevronsDownUp as ChevronsDownUp2 }
|
|
|
4158
4211
|
// components/ui/file-structure-section.tsx
|
|
4159
4212
|
import { useState as useState13, useEffect as useEffect10, useCallback as useCallback5, useRef as useRef12, useMemo } from "react";
|
|
4160
4213
|
import { FileCode as FileCode3, FolderTree, Loader2 as Loader23, AlertCircle as AlertCircle3, AlignLeft, Code2 as Code22, Type } from "lucide-react";
|
|
4161
|
-
import { jsx as jsx31, jsxs as
|
|
4214
|
+
import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4162
4215
|
var ACCENT_ICON2 = {
|
|
4163
4216
|
blue: "text-blue-400",
|
|
4164
4217
|
purple: "text-purple-400",
|
|
@@ -4209,7 +4262,7 @@ function renderMarkdownContent(content) {
|
|
|
4209
4262
|
}
|
|
4210
4263
|
i++;
|
|
4211
4264
|
nodes.push(
|
|
4212
|
-
/* @__PURE__ */
|
|
4265
|
+
/* @__PURE__ */ jsxs26("div", { className: "mb-3 font-mono text-[11px] text-neutral-500 border-l-2 border-neutral-700 pl-2 py-0.5", children: [
|
|
4213
4266
|
/* @__PURE__ */ jsx31("div", { className: "text-neutral-600", children: "---" }),
|
|
4214
4267
|
fmLines.map((l, j) => /* @__PURE__ */ jsx31("div", { children: l }, j)),
|
|
4215
4268
|
/* @__PURE__ */ jsx31("div", { className: "text-neutral-600", children: "---" })
|
|
@@ -4385,9 +4438,9 @@ function FileStructureSection({
|
|
|
4385
4438
|
setFileError(null);
|
|
4386
4439
|
}, []);
|
|
4387
4440
|
if (isLoading) {
|
|
4388
|
-
return /* @__PURE__ */
|
|
4441
|
+
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
4389
4442
|
/* @__PURE__ */ jsx31("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider mb-2", children: "File Structure" }),
|
|
4390
|
-
/* @__PURE__ */
|
|
4443
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-xs text-neutral-500 py-4", children: [
|
|
4391
4444
|
/* @__PURE__ */ jsx31(Loader23, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
4392
4445
|
"Loading file tree..."
|
|
4393
4446
|
] })
|
|
@@ -4397,9 +4450,9 @@ function FileStructureSection({
|
|
|
4397
4450
|
return null;
|
|
4398
4451
|
}
|
|
4399
4452
|
if (error) {
|
|
4400
|
-
return /* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
4401
4454
|
/* @__PURE__ */ jsx31("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider mb-2", children: "File Structure" }),
|
|
4402
|
-
/* @__PURE__ */
|
|
4455
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-xs text-red-400 py-4", children: [
|
|
4403
4456
|
/* @__PURE__ */ jsx31(AlertCircle3, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
4404
4457
|
error
|
|
4405
4458
|
] })
|
|
@@ -4412,11 +4465,11 @@ function FileStructureSection({
|
|
|
4412
4465
|
if (mode === "language" && renderPreview) return renderPreview(content, filePath, resolvedLanguage);
|
|
4413
4466
|
return /* @__PURE__ */ jsx31("pre", { className: "p-3 text-xs font-mono text-white leading-relaxed whitespace-pre-wrap", children: /* @__PURE__ */ jsx31("code", { children: content }) });
|
|
4414
4467
|
}
|
|
4415
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsxs26("div", { ref: sectionRef, children: [
|
|
4416
4469
|
/* @__PURE__ */ jsx31("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider mb-2", children: "File Structure" }),
|
|
4417
|
-
/* @__PURE__ */
|
|
4418
|
-
/* @__PURE__ */
|
|
4419
|
-
/* @__PURE__ */
|
|
4470
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex gap-3", style: { height: `${effectiveHeight}px` }, children: [
|
|
4471
|
+
/* @__PURE__ */ jsxs26("div", { className: `flex flex-col bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden ${effectiveFilePath ? "w-1/3 shrink-0" : "flex-1"}`, children: [
|
|
4472
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center px-3 py-2 border-b border-neutral-700 shrink-0 gap-2 min-w-0", children: [
|
|
4420
4473
|
/* @__PURE__ */ jsx31(FolderTree, { className: `w-3.5 h-3.5 shrink-0 ${ACCENT_ICON2[accentColor]}` }),
|
|
4421
4474
|
/* @__PURE__ */ jsx31("span", { className: "text-xs text-neutral-200 truncate flex-1", children: "Files" }),
|
|
4422
4475
|
/* @__PURE__ */ jsx31(
|
|
@@ -4440,8 +4493,8 @@ function FileStructureSection({
|
|
|
4440
4493
|
}
|
|
4441
4494
|
) })
|
|
4442
4495
|
] }),
|
|
4443
|
-
effectiveFilePath && /* @__PURE__ */
|
|
4444
|
-
/* @__PURE__ */
|
|
4496
|
+
effectiveFilePath && /* @__PURE__ */ jsxs26("div", { className: "flex-1 flex flex-col bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden", children: [
|
|
4497
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center px-3 py-2 border-b border-neutral-700 shrink-0 gap-2 min-w-0", children: [
|
|
4445
4498
|
/* @__PURE__ */ jsx31(FileCode3, { className: `w-3.5 h-3.5 shrink-0 ${ACCENT_ICON2[accentColor]}` }),
|
|
4446
4499
|
/* @__PURE__ */ jsx31("span", { className: "text-xs text-neutral-200 truncate flex-1", children: selectedFileName }),
|
|
4447
4500
|
showToggle && /* @__PURE__ */ jsx31(
|
|
@@ -4455,7 +4508,7 @@ function FileStructureSection({
|
|
|
4455
4508
|
}
|
|
4456
4509
|
)
|
|
4457
4510
|
] }),
|
|
4458
|
-
/* @__PURE__ */ jsx31("div", { className: "flex-1 overflow-auto", children: fileIsLoading ? /* @__PURE__ */
|
|
4511
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-1 overflow-auto", children: fileIsLoading ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-xs text-neutral-500 p-3", children: [
|
|
4459
4512
|
/* @__PURE__ */ jsx31(Loader23, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
4460
4513
|
"Loading..."
|
|
4461
4514
|
] }) : fileError ? /* @__PURE__ */ jsx31("p", { className: "text-xs text-red-400 p-3", children: fileError }) : fileContent !== null ? renderContent(fileContent, effectiveFilePath) : null })
|
|
@@ -4473,7 +4526,7 @@ function FileStructureSection({
|
|
|
4473
4526
|
}
|
|
4474
4527
|
|
|
4475
4528
|
// components/ui/registry-detail.tsx
|
|
4476
|
-
import { jsx as jsx32, jsxs as
|
|
4529
|
+
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4477
4530
|
var MARKDOWN_CLASSES = "text-sm text-neutral-400 leading-relaxed [&_strong]:text-neutral-200 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:rounded [&_code]:bg-neutral-700/40 [&_code]:border [&_code]:border-neutral-500/40 [&_code]:text-neutral-200 [&_code]:font-mono [&_code]:text-xs [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:text-neutral-200 [&_h1]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:text-neutral-200 [&_h2]:mb-2 [&_h3]:text-sm [&_h3]:font-medium [&_h3]:text-neutral-200 [&_h3]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-1 [&_p]:mb-2 [&_pre]:bg-neutral-900 [&_pre]:rounded [&_pre]:p-3 [&_pre]:overflow-x-auto [&_pre]:text-xs";
|
|
4478
4531
|
var COLLAPSED_MAX_HEIGHT = 240;
|
|
4479
4532
|
function CollapsibleTextSection({ children, header }) {
|
|
@@ -4496,8 +4549,8 @@ function CollapsibleTextSection({ children, header }) {
|
|
|
4496
4549
|
return () => observer.disconnect();
|
|
4497
4550
|
}, [measure]);
|
|
4498
4551
|
const showCollapsed = overflows && !expanded;
|
|
4499
|
-
return /* @__PURE__ */
|
|
4500
|
-
(header || overflows) && /* @__PURE__ */
|
|
4552
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
4553
|
+
(header || overflows) && /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between mb-2", children: [
|
|
4501
4554
|
header && /* @__PURE__ */ jsx32("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider", children: header }),
|
|
4502
4555
|
overflows && /* @__PURE__ */ jsx32(
|
|
4503
4556
|
IconButton,
|
|
@@ -4509,7 +4562,7 @@ function CollapsibleTextSection({ children, header }) {
|
|
|
4509
4562
|
}
|
|
4510
4563
|
)
|
|
4511
4564
|
] }),
|
|
4512
|
-
/* @__PURE__ */
|
|
4565
|
+
/* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
4513
4566
|
/* @__PURE__ */ jsx32(
|
|
4514
4567
|
"div",
|
|
4515
4568
|
{
|
|
@@ -4525,9 +4578,9 @@ function CollapsibleTextSection({ children, header }) {
|
|
|
4525
4578
|
}
|
|
4526
4579
|
function CompatibleWithSection({ tools }) {
|
|
4527
4580
|
if (tools.length === 0) return null;
|
|
4528
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
4529
4582
|
/* @__PURE__ */ jsx32("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider mb-3", children: "Compatible with" }),
|
|
4530
|
-
/* @__PURE__ */ jsx32("div", { className: "flex items-start gap-3", children: tools.map((tool) => /* @__PURE__ */
|
|
4583
|
+
/* @__PURE__ */ jsx32("div", { className: "flex items-start gap-3", children: tools.map((tool) => /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-1", children: [
|
|
4531
4584
|
/* @__PURE__ */ jsx32(AiToolIcon, { tool, size: 18 }),
|
|
4532
4585
|
/* @__PURE__ */ jsx32("span", { className: "text-[10px] text-neutral-400", children: AI_TOOL_NAMES[tool] ?? tool })
|
|
4533
4586
|
] }, tool)) })
|
|
@@ -4552,11 +4605,11 @@ function RegistryDetail({
|
|
|
4552
4605
|
maxWidth = "max-w-[1440px]",
|
|
4553
4606
|
children
|
|
4554
4607
|
}) {
|
|
4555
|
-
return /* @__PURE__ */ jsx32("div", { className: "h-full overflow-y-auto p-6", children: /* @__PURE__ */
|
|
4608
|
+
return /* @__PURE__ */ jsx32("div", { className: "h-full overflow-y-auto p-6", children: /* @__PURE__ */ jsxs27("div", { className: `${maxWidth} mx-auto space-y-6`, children: [
|
|
4556
4609
|
aboveHeader,
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
/* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4610
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between gap-4", children: [
|
|
4611
|
+
/* @__PURE__ */ jsxs27("div", { className: "min-w-0", children: [
|
|
4612
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
4560
4613
|
/* @__PURE__ */ jsx32(Icon, { className: `w-6 h-6 shrink-0 ${iconColor}` }),
|
|
4561
4614
|
/* @__PURE__ */ jsx32("h2", { className: "text-xl font-semibold text-neutral-200", children: title }),
|
|
4562
4615
|
labels && labels.length > 0 && labels.map((labelProps, i) => /* @__PURE__ */ jsx32(Label, { size: "lg", ...labelProps }, i)),
|
|
@@ -4566,7 +4619,7 @@ function RegistryDetail({
|
|
|
4566
4619
|
] }),
|
|
4567
4620
|
actionButton && /* @__PURE__ */ jsx32("div", { className: "shrink-0", children: actionButton })
|
|
4568
4621
|
] }),
|
|
4569
|
-
description && /* @__PURE__ */
|
|
4622
|
+
description && /* @__PURE__ */ jsxs27("div", { children: [
|
|
4570
4623
|
/* @__PURE__ */ jsx32("h3", { className: "text-xs font-medium text-neutral-500 uppercase tracking-wider mb-2", children: "Description" }),
|
|
4571
4624
|
/* @__PURE__ */ jsx32("p", { className: "text-sm text-neutral-400 leading-relaxed", children: description })
|
|
4572
4625
|
] }),
|
|
@@ -4594,7 +4647,7 @@ function RegistryDetail({
|
|
|
4594
4647
|
// components/ui/registry-browser.tsx
|
|
4595
4648
|
import { useState as useState15, useEffect as useEffect12, useRef as useRef14, useCallback as useCallback7 } from "react";
|
|
4596
4649
|
import { Search as Search6, ArrowRight as ArrowRight3, RefreshCw as RefreshCw4, Loader2 as Loader24, X as X5, AlertTriangle as AlertTriangle4 } from "lucide-react";
|
|
4597
|
-
import { jsx as jsx33, jsxs as
|
|
4650
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4598
4651
|
var PAGE_SIZE = 60;
|
|
4599
4652
|
function RegistryBrowser({
|
|
4600
4653
|
isLoading,
|
|
@@ -4675,9 +4728,9 @@ function RegistryBrowser({
|
|
|
4675
4728
|
}, [needsPaging, loadMore]);
|
|
4676
4729
|
const visibleItems = needsPaging ? items.slice(0, visibleCount) : items;
|
|
4677
4730
|
const hasMore = visibleCount < totalCount;
|
|
4678
|
-
return /* @__PURE__ */
|
|
4679
|
-
/* @__PURE__ */
|
|
4680
|
-
/* @__PURE__ */
|
|
4731
|
+
return /* @__PURE__ */ jsxs28("div", { ref: scrollRef, className: "h-full overflow-y-auto p-4 pb-8", onScroll: handleScroll, children: [
|
|
4732
|
+
/* @__PURE__ */ jsxs28("div", { className: "sticky top-0 flex items-center gap-2 pb-4", children: [
|
|
4733
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative flex-1 max-w-sm", children: [
|
|
4681
4734
|
/* @__PURE__ */ jsx33(Search6, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-neutral-500" }),
|
|
4682
4735
|
/* @__PURE__ */ jsx33(
|
|
4683
4736
|
Input,
|
|
@@ -4754,17 +4807,17 @@ function RegistryBrowser({
|
|
|
4754
4807
|
)
|
|
4755
4808
|
] }),
|
|
4756
4809
|
aboveGrid,
|
|
4757
|
-
/* @__PURE__ */ jsx33("div", { className: `${maxWidth} mx-auto relative z-10`, children: isLoading ? /* @__PURE__ */
|
|
4810
|
+
/* @__PURE__ */ jsx33("div", { className: `${maxWidth} mx-auto relative z-10`, children: isLoading ? /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-center py-12 text-neutral-500", children: [
|
|
4758
4811
|
/* @__PURE__ */ jsx33(Loader24, { className: "w-5 h-5 animate-spin mr-2" }),
|
|
4759
4812
|
loadingMessage
|
|
4760
|
-
] }) : error ? /* @__PURE__ */
|
|
4813
|
+
] }) : error ? /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center justify-center py-12 text-neutral-500", children: [
|
|
4761
4814
|
/* @__PURE__ */ jsx33(AlertTriangle4, { className: "w-6 h-6 text-amber-400 mb-2" }),
|
|
4762
4815
|
/* @__PURE__ */ jsx33("p", { className: "text-sm", children: error }),
|
|
4763
4816
|
onRetry && /* @__PURE__ */ jsx33("button", { onClick: onRetry, className: "mt-2 text-xs text-blue-400 hover:underline cursor-pointer", children: "Try again" })
|
|
4764
|
-
] }) : isEmpty ? /* @__PURE__ */
|
|
4817
|
+
] }) : isEmpty ? /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center justify-center py-12 text-neutral-500", children: [
|
|
4765
4818
|
/* @__PURE__ */ jsx33("p", { className: "text-sm", children: emptyMessage }),
|
|
4766
4819
|
hasActiveFilters && onResetFilters && /* @__PURE__ */ jsx33("button", { onClick: onResetFilters, className: "mt-2 text-xs text-blue-400 hover:underline cursor-pointer", children: "Reset filters" })
|
|
4767
|
-
] }) : /* @__PURE__ */
|
|
4820
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-2", children: [
|
|
4768
4821
|
visibleItems.map((item) => /* @__PURE__ */ jsx33(RegistryCard, { ...item }, item.name)),
|
|
4769
4822
|
hasMore && /* @__PURE__ */ jsx33("div", { ref: sentinelRef, className: "col-span-full h-1" })
|
|
4770
4823
|
] }) })
|
|
@@ -4858,7 +4911,7 @@ function AiActionButton({
|
|
|
4858
4911
|
}
|
|
4859
4912
|
|
|
4860
4913
|
// components/ui/ai-execution-action-buttons.tsx
|
|
4861
|
-
import { Fragment as Fragment9, jsx as jsx35, jsxs as
|
|
4914
|
+
import { Fragment as Fragment9, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4862
4915
|
function AiExecutionActionButtons({
|
|
4863
4916
|
isRunning,
|
|
4864
4917
|
allDone,
|
|
@@ -4898,8 +4951,8 @@ function AiExecutionActionButtons({
|
|
|
4898
4951
|
}
|
|
4899
4952
|
};
|
|
4900
4953
|
const doneConfig = getDoneButtonConfig();
|
|
4901
|
-
return /* @__PURE__ */
|
|
4902
|
-
isRunning && !allDone && /* @__PURE__ */
|
|
4954
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
4955
|
+
isRunning && !allDone && /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
4903
4956
|
/* @__PURE__ */ jsx35(
|
|
4904
4957
|
IconButton,
|
|
4905
4958
|
{
|
|
@@ -4947,7 +5000,7 @@ import { Loader2 as Loader25, Send as Send4 } from "lucide-react";
|
|
|
4947
5000
|
// components/sections/report-bug/screenshot-uploader.tsx
|
|
4948
5001
|
import { useCallback as useCallback8, useRef as useRef15, useState as useState16 } from "react";
|
|
4949
5002
|
import { ImagePlus, X as X6, AlertCircle as AlertCircle4 } from "lucide-react";
|
|
4950
|
-
import { jsx as jsx36, jsxs as
|
|
5003
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4951
5004
|
var DEFAULT_MAX_SIZE = 20 * 1024 * 1024;
|
|
4952
5005
|
function formatFileSize(bytes) {
|
|
4953
5006
|
if (bytes < 1024) return `${bytes} B`;
|
|
@@ -5035,8 +5088,8 @@ function ScreenshotUploader({
|
|
|
5035
5088
|
},
|
|
5036
5089
|
[screenshots, onChange]
|
|
5037
5090
|
);
|
|
5038
|
-
return /* @__PURE__ */
|
|
5039
|
-
/* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("space-y-3", className), children: [
|
|
5092
|
+
/* @__PURE__ */ jsxs30(
|
|
5040
5093
|
"div",
|
|
5041
5094
|
{
|
|
5042
5095
|
onClick: () => !disabled && fileInputRef.current?.click(),
|
|
@@ -5049,9 +5102,9 @@ function ScreenshotUploader({
|
|
|
5049
5102
|
),
|
|
5050
5103
|
children: [
|
|
5051
5104
|
/* @__PURE__ */ jsx36(ImagePlus, { className: cn("w-6 h-6", isDragging ? "text-blue-400" : "text-neutral-500") }),
|
|
5052
|
-
/* @__PURE__ */
|
|
5105
|
+
/* @__PURE__ */ jsxs30("div", { className: "text-center", children: [
|
|
5053
5106
|
/* @__PURE__ */ jsx36("p", { className: "text-sm text-neutral-400", children: isDragging ? "Drop images here" : "Click or drag images to attach" }),
|
|
5054
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ jsxs30("p", { className: "text-xs text-neutral-500 mt-1", children: [
|
|
5055
5108
|
formatFileSize(remainingSize),
|
|
5056
5109
|
" remaining of ",
|
|
5057
5110
|
formatFileSize(maxTotalSize)
|
|
@@ -5072,11 +5125,11 @@ function ScreenshotUploader({
|
|
|
5072
5125
|
]
|
|
5073
5126
|
}
|
|
5074
5127
|
),
|
|
5075
|
-
error && /* @__PURE__ */
|
|
5128
|
+
error && /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 text-sm text-red-400", children: [
|
|
5076
5129
|
/* @__PURE__ */ jsx36(AlertCircle4, { className: "w-4 h-4 flex-shrink-0" }),
|
|
5077
5130
|
/* @__PURE__ */ jsx36("span", { children: error })
|
|
5078
5131
|
] }),
|
|
5079
|
-
screenshots.length > 0 && /* @__PURE__ */ jsx36("div", { className: "grid grid-cols-3 gap-2", children: screenshots.map((s) => /* @__PURE__ */
|
|
5132
|
+
screenshots.length > 0 && /* @__PURE__ */ jsx36("div", { className: "grid grid-cols-3 gap-2", children: screenshots.map((s) => /* @__PURE__ */ jsxs30(
|
|
5080
5133
|
"div",
|
|
5081
5134
|
{
|
|
5082
5135
|
className: "relative group aspect-video bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden",
|
|
@@ -5089,7 +5142,7 @@ function ScreenshotUploader({
|
|
|
5089
5142
|
className: "w-full h-full object-cover"
|
|
5090
5143
|
}
|
|
5091
5144
|
),
|
|
5092
|
-
/* @__PURE__ */
|
|
5145
|
+
/* @__PURE__ */ jsxs30("div", { className: "absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col justify-between p-2", children: [
|
|
5093
5146
|
/* @__PURE__ */ jsx36(
|
|
5094
5147
|
"button",
|
|
5095
5148
|
{
|
|
@@ -5110,14 +5163,14 @@ function ScreenshotUploader({
|
|
|
5110
5163
|
},
|
|
5111
5164
|
s.id
|
|
5112
5165
|
)) }),
|
|
5113
|
-
screenshots.length > 0 && /* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5166
|
+
screenshots.length > 0 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between text-xs text-neutral-500", children: [
|
|
5167
|
+
/* @__PURE__ */ jsxs30("span", { children: [
|
|
5115
5168
|
screenshots.length,
|
|
5116
5169
|
" image",
|
|
5117
5170
|
screenshots.length !== 1 ? "s" : "",
|
|
5118
5171
|
" attached"
|
|
5119
5172
|
] }),
|
|
5120
|
-
/* @__PURE__ */
|
|
5173
|
+
/* @__PURE__ */ jsxs30("span", { children: [
|
|
5121
5174
|
"Total: ",
|
|
5122
5175
|
formatFileSize(totalSize)
|
|
5123
5176
|
] })
|
|
@@ -5240,7 +5293,7 @@ function useReportBug(options) {
|
|
|
5240
5293
|
}
|
|
5241
5294
|
|
|
5242
5295
|
// components/sections/report-bug/report-bug-form.tsx
|
|
5243
|
-
import { jsx as jsx37, jsxs as
|
|
5296
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5244
5297
|
function ReportBugForm({
|
|
5245
5298
|
workerUrl,
|
|
5246
5299
|
getSystemInfo,
|
|
@@ -5290,10 +5343,10 @@ function ReportBugForm({
|
|
|
5290
5343
|
handleSubmit
|
|
5291
5344
|
} = useReportBug(hookOptions);
|
|
5292
5345
|
const hasErrors = (errorCount ?? 0) > 0 || (warnCount ?? 0) > 0;
|
|
5293
|
-
return /* @__PURE__ */
|
|
5346
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn("rounded-lg border border-neutral-700 bg-neutral-800", className), children: [
|
|
5294
5347
|
/* @__PURE__ */ jsx37("div", { className: "border-b border-neutral-700 px-4 py-3", children: /* @__PURE__ */ jsx37("h3", { className: "text-sm font-medium text-neutral-200", children: "Report a Bug" }) }),
|
|
5295
|
-
/* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ jsxs31("div", { className: "space-y-4 p-4", children: [
|
|
5349
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
5297
5350
|
/* @__PURE__ */ jsx37("label", { className: "mb-2 block text-xs text-neutral-400", children: "Issue Type" }),
|
|
5298
5351
|
/* @__PURE__ */ jsx37("div", { className: "flex flex-wrap gap-2", children: ISSUE_TYPES.map((type) => /* @__PURE__ */ jsx37(
|
|
5299
5352
|
"button",
|
|
@@ -5309,8 +5362,8 @@ function ReportBugForm({
|
|
|
5309
5362
|
type.value
|
|
5310
5363
|
)) })
|
|
5311
5364
|
] }),
|
|
5312
|
-
/* @__PURE__ */
|
|
5313
|
-
/* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
5366
|
+
/* @__PURE__ */ jsxs31("label", { className: "mb-1.5 block text-xs text-neutral-400", children: [
|
|
5314
5367
|
"Title ",
|
|
5315
5368
|
/* @__PURE__ */ jsx37("span", { className: "text-red-400", children: "*" })
|
|
5316
5369
|
] }),
|
|
@@ -5324,8 +5377,8 @@ function ReportBugForm({
|
|
|
5324
5377
|
}
|
|
5325
5378
|
)
|
|
5326
5379
|
] }),
|
|
5327
|
-
/* @__PURE__ */
|
|
5328
|
-
/* @__PURE__ */
|
|
5380
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
5381
|
+
/* @__PURE__ */ jsxs31("label", { className: "mb-1.5 block text-xs text-neutral-400", children: [
|
|
5329
5382
|
"Description ",
|
|
5330
5383
|
/* @__PURE__ */ jsx37("span", { className: "text-red-400", children: "*" })
|
|
5331
5384
|
] }),
|
|
@@ -5340,7 +5393,7 @@ function ReportBugForm({
|
|
|
5340
5393
|
}
|
|
5341
5394
|
)
|
|
5342
5395
|
] }),
|
|
5343
|
-
/* @__PURE__ */
|
|
5396
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
5344
5397
|
/* @__PURE__ */ jsx37("label", { className: "mb-1.5 block text-xs text-neutral-400", children: "Email (optional)" }),
|
|
5345
5398
|
/* @__PURE__ */ jsx37(
|
|
5346
5399
|
Input,
|
|
@@ -5354,7 +5407,7 @@ function ReportBugForm({
|
|
|
5354
5407
|
}
|
|
5355
5408
|
)
|
|
5356
5409
|
] }),
|
|
5357
|
-
/* @__PURE__ */
|
|
5410
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
5358
5411
|
/* @__PURE__ */ jsx37("label", { className: "mb-2 block text-xs text-neutral-400", children: "Screenshots (optional, max 20MB total)" }),
|
|
5359
5412
|
/* @__PURE__ */ jsx37(
|
|
5360
5413
|
ScreenshotUploader,
|
|
@@ -5365,17 +5418,17 @@ function ReportBugForm({
|
|
|
5365
5418
|
}
|
|
5366
5419
|
)
|
|
5367
5420
|
] }),
|
|
5368
|
-
hasErrors && errorReport && /* @__PURE__ */
|
|
5369
|
-
/* @__PURE__ */
|
|
5421
|
+
hasErrors && errorReport && /* @__PURE__ */ jsxs31("div", { className: "space-y-2", children: [
|
|
5422
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2.5", children: [
|
|
5370
5423
|
/* @__PURE__ */ jsx37(Checkbox, { checked: includeLogs, onChange: setIncludeLogs }),
|
|
5371
|
-
/* @__PURE__ */
|
|
5424
|
+
/* @__PURE__ */ jsxs31(
|
|
5372
5425
|
"span",
|
|
5373
5426
|
{
|
|
5374
5427
|
className: "text-sm text-neutral-400 cursor-pointer select-none",
|
|
5375
5428
|
onClick: () => setIncludeLogs(!includeLogs),
|
|
5376
5429
|
children: [
|
|
5377
5430
|
"Include error logs",
|
|
5378
|
-
errorCount ? /* @__PURE__ */
|
|
5431
|
+
errorCount ? /* @__PURE__ */ jsxs31("span", { className: "text-orange-400 ml-1", children: [
|
|
5379
5432
|
"(",
|
|
5380
5433
|
errorCount,
|
|
5381
5434
|
" error",
|
|
@@ -5386,10 +5439,10 @@ function ReportBugForm({
|
|
|
5386
5439
|
}
|
|
5387
5440
|
)
|
|
5388
5441
|
] }),
|
|
5389
|
-
includeLogs && capturedErrors && capturedErrors.length > 0 && /* @__PURE__ */
|
|
5442
|
+
includeLogs && capturedErrors && capturedErrors.length > 0 && /* @__PURE__ */ jsxs31("div", { className: "rounded-md border border-neutral-700 bg-neutral-900/50", children: [
|
|
5390
5443
|
/* @__PURE__ */ jsx37("div", { className: "px-3 py-2 border-b border-neutral-700", children: /* @__PURE__ */ jsx37("span", { className: "text-xs font-medium text-neutral-400", children: "Captured Errors" }) }),
|
|
5391
|
-
/* @__PURE__ */ jsx37("div", { className: "max-h-[200px] overflow-y-auto divide-y divide-neutral-800", children: capturedErrors.map((error) => /* @__PURE__ */ jsx37("div", { className: "px-3 py-2 text-xs", children: /* @__PURE__ */
|
|
5392
|
-
error.count > 1 && /* @__PURE__ */
|
|
5444
|
+
/* @__PURE__ */ jsx37("div", { className: "max-h-[200px] overflow-y-auto divide-y divide-neutral-800", children: capturedErrors.map((error) => /* @__PURE__ */ jsx37("div", { className: "px-3 py-2 text-xs", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-start gap-2", children: [
|
|
5445
|
+
error.count > 1 && /* @__PURE__ */ jsxs31("span", { className: "shrink-0 text-orange-400 font-mono font-medium", children: [
|
|
5393
5446
|
"\xD7",
|
|
5394
5447
|
error.count
|
|
5395
5448
|
] }),
|
|
@@ -5398,7 +5451,7 @@ function ReportBugForm({
|
|
|
5398
5451
|
] })
|
|
5399
5452
|
] })
|
|
5400
5453
|
] }),
|
|
5401
|
-
/* @__PURE__ */
|
|
5454
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-end gap-2 border-t border-neutral-700 px-4 py-3", children: [
|
|
5402
5455
|
isSubmitting && submissionStatus && /* @__PURE__ */ jsx37("span", { className: "text-xs text-neutral-400 mr-auto", children: submissionStatus }),
|
|
5403
5456
|
onCancel && /* @__PURE__ */ jsx37(
|
|
5404
5457
|
"button",
|
|
@@ -5410,7 +5463,7 @@ function ReportBugForm({
|
|
|
5410
5463
|
children: "Cancel"
|
|
5411
5464
|
}
|
|
5412
5465
|
),
|
|
5413
|
-
/* @__PURE__ */
|
|
5466
|
+
/* @__PURE__ */ jsxs31(
|
|
5414
5467
|
"button",
|
|
5415
5468
|
{
|
|
5416
5469
|
type: "button",
|
|
@@ -6103,7 +6156,7 @@ import { RefreshCw as RefreshCw5, AlertCircle as AlertCircle5, Check as Check11,
|
|
|
6103
6156
|
// components/sections/golden-snapshots/status-overview.tsx
|
|
6104
6157
|
import { useState as useState19, useRef as useRef16 } from "react";
|
|
6105
6158
|
import { Archive, Check as Check10, AlertTriangle as AlertTriangle5, RotateCcw as RotateCcw3 } from "lucide-react";
|
|
6106
|
-
import { jsx as jsx38, jsxs as
|
|
6159
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6107
6160
|
function getComponentVersion(meta, component) {
|
|
6108
6161
|
return meta?.components[component]?.version;
|
|
6109
6162
|
}
|
|
@@ -6114,7 +6167,7 @@ function renderVersionBadge(meta, color) {
|
|
|
6114
6167
|
function VersionStatus({ exists, version, mismatch, defaultColor = "text-green-400/70" }) {
|
|
6115
6168
|
if (!exists) return /* @__PURE__ */ jsx38("span", { className: "text-red-400", children: "Missing" });
|
|
6116
6169
|
if (!version) return /* @__PURE__ */ jsx38("span", { className: "text-green-400", children: "Found" });
|
|
6117
|
-
return /* @__PURE__ */
|
|
6170
|
+
return /* @__PURE__ */ jsxs32("span", { className: `text-xs font-mono ${mismatch ? "text-yellow-400" : defaultColor}`, children: [
|
|
6118
6171
|
"v",
|
|
6119
6172
|
version
|
|
6120
6173
|
] });
|
|
@@ -6125,12 +6178,12 @@ function SyncStatusBanner({ goldenMeta, liveMeta, components }) {
|
|
|
6125
6178
|
const lv = getComponentVersion(liveMeta, comp);
|
|
6126
6179
|
return gv !== lv;
|
|
6127
6180
|
}).length;
|
|
6128
|
-
return mismatches === 0 ? /* @__PURE__ */
|
|
6181
|
+
return mismatches === 0 ? /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-green-500/5 border border-green-500/20", children: [
|
|
6129
6182
|
/* @__PURE__ */ jsx38(Check10, { className: "w-4 h-4 text-green-400" }),
|
|
6130
6183
|
/* @__PURE__ */ jsx38("span", { className: "text-sm text-green-400", children: "Golden and Live versions are in sync" })
|
|
6131
|
-
] }) : /* @__PURE__ */
|
|
6184
|
+
] }) : /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/5 border border-yellow-500/20", children: [
|
|
6132
6185
|
/* @__PURE__ */ jsx38(AlertTriangle5, { className: "w-4 h-4 text-yellow-400" }),
|
|
6133
|
-
/* @__PURE__ */
|
|
6186
|
+
/* @__PURE__ */ jsxs32("span", { className: "text-sm text-yellow-400", children: [
|
|
6134
6187
|
"Version mismatch \u2014 ",
|
|
6135
6188
|
mismatches,
|
|
6136
6189
|
" component",
|
|
@@ -6156,43 +6209,43 @@ function StatusOverview({
|
|
|
6156
6209
|
const resetMenuDropdownRef = useDropdownMaxHeight(showResetMenu);
|
|
6157
6210
|
useClickOutside(resetMenuRef, showResetMenu, () => setShowResetMenu(false));
|
|
6158
6211
|
const getLabel = (comp) => componentLabels?.[comp] ?? comp.charAt(0).toUpperCase() + comp.slice(1);
|
|
6159
|
-
return /* @__PURE__ */
|
|
6160
|
-
/* @__PURE__ */
|
|
6161
|
-
/* @__PURE__ */
|
|
6212
|
+
return /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
|
|
6213
|
+
/* @__PURE__ */ jsxs32("div", { className: "bg-neutral-900 rounded-lg p-4 border border-amber-500/30", children: [
|
|
6214
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
6162
6215
|
/* @__PURE__ */ jsx38(Archive, { className: "w-5 h-5 text-amber-400" }),
|
|
6163
|
-
/* @__PURE__ */ jsx38("h3", { className: "text-
|
|
6216
|
+
/* @__PURE__ */ jsx38("h3", { className: "text-neutral-300 font-medium", children: "Bundled Seed (App Distribution)" }),
|
|
6164
6217
|
status?.seed.meta && renderVersionBadge(status.seed.meta, "bg-amber-500/20 text-amber-400")
|
|
6165
6218
|
] }),
|
|
6166
|
-
/* @__PURE__ */
|
|
6167
|
-
/* @__PURE__ */
|
|
6168
|
-
/* @__PURE__ */ jsx38("p", { className: "text-
|
|
6219
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
6220
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
6221
|
+
/* @__PURE__ */ jsx38("p", { className: "text-neutral-500", children: "Status" }),
|
|
6169
6222
|
/* @__PURE__ */ jsx38("p", { className: status?.seed.exists ? "text-green-400" : "text-red-400", children: status?.seed.exists ? "Found" : "Missing" })
|
|
6170
6223
|
] }),
|
|
6171
|
-
/* @__PURE__ */
|
|
6172
|
-
/* @__PURE__ */ jsx38("p", { className: "text-
|
|
6173
|
-
/* @__PURE__ */ jsx38("p", { className: "text-
|
|
6224
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
6225
|
+
/* @__PURE__ */ jsx38("p", { className: "text-neutral-500", children: "Size (compressed)" }),
|
|
6226
|
+
/* @__PURE__ */ jsx38("p", { className: "text-neutral-300", children: formatBytes(status?.seed.sizeBytes ?? 0) })
|
|
6174
6227
|
] }),
|
|
6175
|
-
/* @__PURE__ */
|
|
6176
|
-
/* @__PURE__ */ jsx38("p", { className: "text-
|
|
6177
|
-
/* @__PURE__ */ jsx38("p", { className: "text-
|
|
6228
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
6229
|
+
/* @__PURE__ */ jsx38("p", { className: "text-neutral-500", children: "Modified" }),
|
|
6230
|
+
/* @__PURE__ */ jsx38("p", { className: "text-neutral-300", children: status?.seed.modifiedAt ? formatDate(status.seed.modifiedAt) : "N/A" })
|
|
6178
6231
|
] })
|
|
6179
6232
|
] }),
|
|
6180
|
-
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-
|
|
6233
|
+
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-neutral-600 mt-3", children: "A compressed archive shipped with every release containing default configuration and templates. On first launch, the seed is extracted to initialize your local files." })
|
|
6181
6234
|
] }),
|
|
6182
6235
|
status?.goldenMeta && status?.liveMeta && /* @__PURE__ */ jsx38(SyncStatusBanner, { goldenMeta: status.goldenMeta, liveMeta: status.liveMeta, components }),
|
|
6183
|
-
/* @__PURE__ */
|
|
6184
|
-
/* @__PURE__ */
|
|
6185
|
-
/* @__PURE__ */
|
|
6236
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6237
|
+
/* @__PURE__ */ jsxs32("div", { className: "bg-neutral-900 rounded-lg p-4 border border-blue-500/30", children: [
|
|
6238
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
6186
6239
|
/* @__PURE__ */ jsx38("div", { className: "w-3 h-3 rounded-full bg-blue-400" }),
|
|
6187
|
-
/* @__PURE__ */ jsx38("h4", { className: "text-
|
|
6240
|
+
/* @__PURE__ */ jsx38("h4", { className: "text-neutral-300 font-medium", children: "Golden (Reference)" }),
|
|
6188
6241
|
renderVersionBadge(status?.goldenMeta, "bg-blue-500/20 text-blue-400")
|
|
6189
6242
|
] }),
|
|
6190
6243
|
/* @__PURE__ */ jsx38("div", { className: "space-y-2 text-sm", children: components.map((comp) => {
|
|
6191
6244
|
const version = getComponentVersion(status?.goldenMeta, comp);
|
|
6192
6245
|
const dirKey = `${comp}Golden`;
|
|
6193
6246
|
const dirExists = status?.directories[dirKey]?.exists ?? false;
|
|
6194
|
-
return /* @__PURE__ */
|
|
6195
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6247
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex justify-between items-center", children: [
|
|
6248
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-500", children: getLabel(comp) }),
|
|
6196
6249
|
/* @__PURE__ */ jsx38(
|
|
6197
6250
|
VersionStatus,
|
|
6198
6251
|
{
|
|
@@ -6204,14 +6257,14 @@ function StatusOverview({
|
|
|
6204
6257
|
)
|
|
6205
6258
|
] }, comp);
|
|
6206
6259
|
}) }),
|
|
6207
|
-
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-
|
|
6260
|
+
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-neutral-600 mt-3", children: "Reference copy extracted from the bundled seed. Always overwritten during app updates to match the latest release. Do not edit directly." })
|
|
6208
6261
|
] }),
|
|
6209
|
-
/* @__PURE__ */
|
|
6210
|
-
/* @__PURE__ */
|
|
6262
|
+
/* @__PURE__ */ jsxs32("div", { className: "bg-neutral-900 rounded-lg p-4 border border-green-500/30", children: [
|
|
6263
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
6211
6264
|
/* @__PURE__ */ jsx38("div", { className: "w-3 h-3 rounded-full bg-green-400" }),
|
|
6212
|
-
/* @__PURE__ */ jsx38("h4", { className: "text-
|
|
6265
|
+
/* @__PURE__ */ jsx38("h4", { className: "text-neutral-300 font-medium", children: "Live (Working Copy)" }),
|
|
6213
6266
|
renderVersionBadge(status?.liveMeta, "bg-green-500/20 text-green-400"),
|
|
6214
|
-
/* @__PURE__ */
|
|
6267
|
+
/* @__PURE__ */ jsxs32("div", { className: "ml-auto relative", ref: resetMenuRef, children: [
|
|
6215
6268
|
/* @__PURE__ */ jsx38(
|
|
6216
6269
|
IconButton,
|
|
6217
6270
|
{
|
|
@@ -6223,7 +6276,7 @@ function StatusOverview({
|
|
|
6223
6276
|
tooltip: { title: "Reset options", description: "Reset live files to golden" }
|
|
6224
6277
|
}
|
|
6225
6278
|
),
|
|
6226
|
-
showResetMenu && /* @__PURE__ */
|
|
6279
|
+
showResetMenu && /* @__PURE__ */ jsxs32("div", { ref: resetMenuDropdownRef, className: "absolute right-0 top-full mt-1 w-56 bg-neutral-850 border border-neutral-700 rounded-lg shadow-xl z-50 py-1 overflow-hidden", children: [
|
|
6227
6280
|
/* @__PURE__ */ jsx38(
|
|
6228
6281
|
"button",
|
|
6229
6282
|
{
|
|
@@ -6231,19 +6284,19 @@ function StatusOverview({
|
|
|
6231
6284
|
onResetAll();
|
|
6232
6285
|
setShowResetMenu(false);
|
|
6233
6286
|
},
|
|
6234
|
-
className: "w-full text-left px-3 py-2 text-sm text-
|
|
6287
|
+
className: "w-full text-left px-3 py-2 text-sm text-neutral-300 hover:bg-neutral-700 transition-colors",
|
|
6235
6288
|
children: "Reset All to Golden"
|
|
6236
6289
|
}
|
|
6237
6290
|
),
|
|
6238
|
-
/* @__PURE__ */ jsx38("div", { className: "border-t border-
|
|
6239
|
-
components.map((comp) => /* @__PURE__ */
|
|
6291
|
+
/* @__PURE__ */ jsx38("div", { className: "border-t border-neutral-700 my-1" }),
|
|
6292
|
+
components.map((comp) => /* @__PURE__ */ jsxs32(
|
|
6240
6293
|
"button",
|
|
6241
6294
|
{
|
|
6242
6295
|
onClick: () => {
|
|
6243
6296
|
onResetComponent(comp);
|
|
6244
6297
|
setShowResetMenu(false);
|
|
6245
6298
|
},
|
|
6246
|
-
className: "w-full text-left px-3 py-2 text-sm text-
|
|
6299
|
+
className: "w-full text-left px-3 py-2 text-sm text-neutral-400 hover:bg-neutral-700 transition-colors",
|
|
6247
6300
|
children: [
|
|
6248
6301
|
"Reset ",
|
|
6249
6302
|
getLabel(comp)
|
|
@@ -6260,9 +6313,9 @@ function StatusOverview({
|
|
|
6260
6313
|
const dirKey = `${comp}Live`;
|
|
6261
6314
|
const dirExists = status?.directories[dirKey]?.exists ?? false;
|
|
6262
6315
|
const mismatch = !!(goldenV && liveV && goldenV !== liveV);
|
|
6263
|
-
return /* @__PURE__ */
|
|
6264
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6265
|
-
/* @__PURE__ */
|
|
6316
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex justify-between items-center", children: [
|
|
6317
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-500", children: getLabel(comp) }),
|
|
6318
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex items-center gap-2", children: [
|
|
6266
6319
|
/* @__PURE__ */ jsx38(VersionStatus, { exists: dirExists || !!liveV, version: liveV, mismatch }),
|
|
6267
6320
|
/* @__PURE__ */ jsx38(
|
|
6268
6321
|
IconButton,
|
|
@@ -6278,42 +6331,42 @@ function StatusOverview({
|
|
|
6278
6331
|
] })
|
|
6279
6332
|
] }, comp);
|
|
6280
6333
|
}) }),
|
|
6281
|
-
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-
|
|
6334
|
+
!devtools && /* @__PURE__ */ jsx38("p", { className: "text-xs text-neutral-600 mt-3", children: "Your active working copy \u2014 what the app uses at runtime. Customizations are made here and preserved across app updates." })
|
|
6282
6335
|
] })
|
|
6283
6336
|
] }),
|
|
6284
|
-
!devtools && /* @__PURE__ */
|
|
6285
|
-
/* @__PURE__ */
|
|
6337
|
+
!devtools && /* @__PURE__ */ jsxs32("div", { className: "bg-neutral-900/50 border border-neutral-700 rounded-lg p-4", children: [
|
|
6338
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-xs font-medium text-neutral-400 mb-4", children: [
|
|
6286
6339
|
"How updates work ",
|
|
6287
|
-
/* @__PURE__ */
|
|
6340
|
+
/* @__PURE__ */ jsxs32("span", { className: "font-normal text-neutral-600", children: [
|
|
6288
6341
|
"\u2014 checked per component (",
|
|
6289
6342
|
components.map(getLabel).join(", "),
|
|
6290
6343
|
")"
|
|
6291
6344
|
] })
|
|
6292
6345
|
] }),
|
|
6293
|
-
/* @__PURE__ */
|
|
6346
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[auto_auto_auto_auto_auto_auto_auto] items-center gap-x-2 text-xs", children: [
|
|
6294
6347
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6295
6348
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6296
6349
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6297
6350
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6298
6351
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6299
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6300
|
-
/* @__PURE__ */
|
|
6352
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 text-base justify-self-center self-end mb-[-4px]", children: "\u2197" }),
|
|
6353
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
|
|
6301
6354
|
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "Live updated", description: "No local customizations were found for this component, so it was automatically updated to match the new golden version." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-green-500/10 border border-green-500/20 px-3 py-1.5 whitespace-nowrap w-full text-center cursor-help", children: /* @__PURE__ */ jsx38("span", { className: "text-green-400 font-medium", children: "Live updated" }) }) }),
|
|
6302
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6355
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 mt-0.5", children: "no changes" })
|
|
6303
6356
|
] }),
|
|
6304
|
-
/* @__PURE__ */
|
|
6357
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
|
|
6305
6358
|
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "App Update", description: "A new version is installed, shipping a fresh seed archive with updated configuration and templates." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-amber-500/10 border border-amber-500/20 px-3 py-1.5 text-center w-full cursor-help", children: /* @__PURE__ */ jsx38("span", { className: "text-amber-400 font-medium", children: "App Update" }) }) }),
|
|
6306
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6359
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 mt-0.5", children: "ships new seed" })
|
|
6307
6360
|
] }),
|
|
6308
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6309
|
-
/* @__PURE__ */
|
|
6361
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 text-lg self-start justify-self-center px-2", children: "\u2192" }),
|
|
6362
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
|
|
6310
6363
|
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "Golden overwritten", description: "The golden reference directory is always overwritten with the latest seed. This ensures golden always reflects the newest release." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-blue-500/10 border border-blue-500/20 px-3 py-1.5 text-center w-full cursor-help", children: /* @__PURE__ */ jsx38("span", { className: "text-blue-400 font-medium", children: "Golden" }) }) }),
|
|
6311
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6364
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 mt-0.5", children: "overwritten" })
|
|
6312
6365
|
] }),
|
|
6313
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6314
|
-
/* @__PURE__ */
|
|
6315
|
-
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "Compare per component", description: "Each component is compared individually. If the live version has local changes, it is left untouched." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-
|
|
6316
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6366
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 text-lg self-start justify-self-center px-2", children: "\u2192" }),
|
|
6367
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
|
|
6368
|
+
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "Compare per component", description: "Each component is compared individually. If the live version has local changes, it is left untouched." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-neutral-700/50 border border-neutral-700 px-3 py-1.5 text-center w-full cursor-help", children: /* @__PURE__ */ jsx38("span", { className: "text-neutral-400 font-medium", children: "Compare" }) }) }),
|
|
6369
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 mt-0.5", children: "per component" })
|
|
6317
6370
|
] }),
|
|
6318
6371
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6319
6372
|
/* @__PURE__ */ jsx38("span", {}),
|
|
@@ -6322,22 +6375,22 @@ function StatusOverview({
|
|
|
6322
6375
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6323
6376
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6324
6377
|
/* @__PURE__ */ jsx38("span", {}),
|
|
6325
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6326
|
-
/* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 text-base justify-self-center self-start mt-[-20px]", children: "\u2198" }),
|
|
6379
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
|
|
6327
6380
|
/* @__PURE__ */ jsx38(Tooltip, { content: { title: "Live unchanged", description: "Local customizations were detected for this component, so it was left untouched. Use the File Diff tab to review differences, or reset it manually." }, multiline: true, maxWidth: 260, children: /* @__PURE__ */ jsx38("div", { className: "rounded bg-yellow-500/10 border border-yellow-500/20 px-3 py-1.5 whitespace-nowrap w-full text-center cursor-help", children: /* @__PURE__ */ jsx38("span", { className: "text-yellow-400 font-medium", children: "Live unchanged" }) }) }),
|
|
6328
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6381
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-600 mt-0.5", children: "has changes" })
|
|
6329
6382
|
] })
|
|
6330
6383
|
] }),
|
|
6331
|
-
/* @__PURE__ */ jsx38("p", { className: "text-xs text-
|
|
6384
|
+
/* @__PURE__ */ jsx38("p", { className: "text-xs text-neutral-600 mt-3", children: "When a component has no local changes, it is automatically updated to match the new golden version. Components with customizations are left untouched to preserve your edits \u2014 use the File Diff tab to review differences and selectively apply changes. You can reset any component to its golden version at any time using the reset buttons above." })
|
|
6332
6385
|
] }),
|
|
6333
|
-
devtools && manifest && /* @__PURE__ */
|
|
6334
|
-
/* @__PURE__ */
|
|
6335
|
-
/* @__PURE__ */ jsx38(Archive, { className: "w-4 h-4 text-
|
|
6336
|
-
/* @__PURE__ */ jsx38("h4", { className: "text-
|
|
6386
|
+
devtools && manifest && /* @__PURE__ */ jsxs32("div", { className: "bg-neutral-900 rounded-lg p-4 border border-neutral-700", children: [
|
|
6387
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
6388
|
+
/* @__PURE__ */ jsx38(Archive, { className: "w-4 h-4 text-neutral-500" }),
|
|
6389
|
+
/* @__PURE__ */ jsx38("h4", { className: "text-neutral-300 font-medium", children: "Local Snapshots" })
|
|
6337
6390
|
] }),
|
|
6338
|
-
/* @__PURE__ */ jsx38("div", { className: "flex gap-6 text-sm", children: /* @__PURE__ */
|
|
6339
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6340
|
-
/* @__PURE__ */ jsx38("span", { className: "text-
|
|
6391
|
+
/* @__PURE__ */ jsx38("div", { className: "flex gap-6 text-sm", children: /* @__PURE__ */ jsxs32("div", { children: [
|
|
6392
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-500", children: "Count: " }),
|
|
6393
|
+
/* @__PURE__ */ jsx38("span", { className: "text-neutral-300", children: manifest.snapshots.length })
|
|
6341
6394
|
] }) })
|
|
6342
6395
|
] })
|
|
6343
6396
|
] });
|
|
@@ -6357,7 +6410,7 @@ import {
|
|
|
6357
6410
|
FileCode as FileCode4
|
|
6358
6411
|
} from "lucide-react";
|
|
6359
6412
|
import { DiffEditor } from "@monaco-editor/react";
|
|
6360
|
-
import { Fragment as Fragment10, jsx as jsx39, jsxs as
|
|
6413
|
+
import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6361
6414
|
var COMPONENT_COLORS = [
|
|
6362
6415
|
{ text: "text-blue-400", pillBg: "bg-blue-500/20", bg: "bg-blue-500/5", hoverBg: "hover:bg-blue-500/10", border: "border-blue-500/40", line: "border-blue-500/20" },
|
|
6363
6416
|
{ text: "text-purple-400", pillBg: "bg-purple-500/20", bg: "bg-purple-500/5", hoverBg: "hover:bg-purple-500/10", border: "border-purple-500/40", line: "border-purple-500/20" },
|
|
@@ -6386,16 +6439,16 @@ function DiffFileItem({ file, isSelected, onSelect, onReset, resettingFile, anyR
|
|
|
6386
6439
|
const statusColor = STATUS_COLORS[file.status] ?? "";
|
|
6387
6440
|
const statusLabel = STATUS_LABELS[file.status] ?? "";
|
|
6388
6441
|
const icon = renderFileIcon?.(filename, file.component) ?? /* @__PURE__ */ jsx39(FileCode4, { className: "w-3 h-3 flex-shrink-0 text-blue-400/50" });
|
|
6389
|
-
return /* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsxs33(
|
|
6390
6443
|
"div",
|
|
6391
6444
|
{
|
|
6392
|
-
className: `flex items-center transition-colors ${isSelected ? "bg-
|
|
6445
|
+
className: `flex items-center transition-colors ${isSelected ? "bg-neutral-700" : "hover:bg-neutral-850"}`,
|
|
6393
6446
|
children: [
|
|
6394
|
-
/* @__PURE__ */
|
|
6447
|
+
/* @__PURE__ */ jsxs33(
|
|
6395
6448
|
"button",
|
|
6396
6449
|
{
|
|
6397
6450
|
onClick: () => onSelect(file),
|
|
6398
|
-
className: `flex-1 flex items-center gap-2 px-3 py-1 text-xs ${isSelected ? "text-
|
|
6451
|
+
className: `flex-1 flex items-center gap-2 px-3 py-1 text-xs ${isSelected ? "text-neutral-300" : "text-neutral-400"}`,
|
|
6399
6452
|
children: [
|
|
6400
6453
|
icon,
|
|
6401
6454
|
/* @__PURE__ */ jsx39("span", { className: "truncate", children: filename }),
|
|
@@ -6445,25 +6498,25 @@ function DiffFileTreePanel({ sync, componentLabels, renderFileIcon }) {
|
|
|
6445
6498
|
const fileCount = countFiles2(node);
|
|
6446
6499
|
const color = getComponentColor(colorIndex);
|
|
6447
6500
|
const displayLabel = isRoot ? componentLabels?.[label] ?? label.charAt(0).toUpperCase() + label.slice(1) : label;
|
|
6448
|
-
const headerClasses = isRoot ? `${color.text} ${color.hoverBg} border-l-2 ${color.border} ${color.bg} px-3 py-2 text-sm font-medium` : "text-
|
|
6501
|
+
const headerClasses = isRoot ? `${color.text} ${color.hoverBg} border-l-2 ${color.border} ${color.bg} px-3 py-2 text-sm font-medium` : "text-neutral-500 hover:bg-neutral-850 px-3 py-1.5";
|
|
6449
6502
|
const chevronSize = isRoot ? "w-4 h-4" : "w-3 h-3";
|
|
6450
|
-
const countElement = isRoot ? /* @__PURE__ */ jsx39("span", { className: `ml-auto px-1.5 py-0.5 rounded-full text-[10px] font-medium ${color.pillBg} ${color.text}`, children: fileCount }) : /* @__PURE__ */ jsx39("span", { className: "text-
|
|
6503
|
+
const countElement = isRoot ? /* @__PURE__ */ jsx39("span", { className: `ml-auto px-1.5 py-0.5 rounded-full text-[10px] font-medium ${color.pillBg} ${color.text}`, children: fileCount }) : /* @__PURE__ */ jsx39("span", { className: "text-neutral-600 ml-auto", children: fileCount });
|
|
6451
6504
|
const containerLineClass = isRoot ? color.line : lineClass;
|
|
6452
|
-
return /* @__PURE__ */
|
|
6453
|
-
/* @__PURE__ */
|
|
6505
|
+
return /* @__PURE__ */ jsxs33("div", { children: [
|
|
6506
|
+
/* @__PURE__ */ jsxs33(
|
|
6454
6507
|
"button",
|
|
6455
6508
|
{
|
|
6456
6509
|
onClick: () => toggleCategory(categoryKey),
|
|
6457
6510
|
className: `w-full flex items-center gap-2 ${headerClasses} transition-colors cursor-pointer`,
|
|
6458
6511
|
children: [
|
|
6459
6512
|
isCollapsed ? /* @__PURE__ */ jsx39(ChevronRight5, { className: chevronSize }) : /* @__PURE__ */ jsx39(ChevronDown8, { className: chevronSize }),
|
|
6460
|
-
isRoot ? null : /* @__PURE__ */ jsx39(Folder6, { className: "w-3 h-3 text-
|
|
6513
|
+
isRoot ? null : /* @__PURE__ */ jsx39(Folder6, { className: "w-3 h-3 text-neutral-600" }),
|
|
6461
6514
|
displayLabel,
|
|
6462
6515
|
countElement
|
|
6463
6516
|
]
|
|
6464
6517
|
}
|
|
6465
6518
|
),
|
|
6466
|
-
!isCollapsed && /* @__PURE__ */
|
|
6519
|
+
!isCollapsed && /* @__PURE__ */ jsxs33("div", { className: `${isRoot ? "ml-2" : "ml-4"} border-l ${containerLineClass}`, children: [
|
|
6467
6520
|
node.files.map((file) => /* @__PURE__ */ jsx39(
|
|
6468
6521
|
DiffFileItem,
|
|
6469
6522
|
{
|
|
@@ -6483,31 +6536,31 @@ function DiffFileTreePanel({ sync, componentLabels, renderFileIcon }) {
|
|
|
6483
6536
|
] })
|
|
6484
6537
|
] }, categoryKey);
|
|
6485
6538
|
};
|
|
6486
|
-
return /* @__PURE__ */
|
|
6487
|
-
/* @__PURE__ */ jsx39("div", { className: "p-3 border-b border-
|
|
6488
|
-
/* @__PURE__ */
|
|
6539
|
+
return /* @__PURE__ */ jsxs33("div", { className: "w-72 flex-shrink-0 bg-neutral-900 rounded-lg border border-neutral-700 overflow-hidden flex flex-col", children: [
|
|
6540
|
+
/* @__PURE__ */ jsx39("div", { className: "p-3 border-b border-neutral-700 flex-shrink-0", children: /* @__PURE__ */ jsxs33("div", { className: "flex gap-3 text-xs", children: [
|
|
6541
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-green-400", children: [
|
|
6489
6542
|
"+",
|
|
6490
6543
|
diff.summary.added
|
|
6491
6544
|
] }),
|
|
6492
|
-
/* @__PURE__ */
|
|
6545
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-red-400", children: [
|
|
6493
6546
|
"-",
|
|
6494
6547
|
diff.summary.removed
|
|
6495
6548
|
] }),
|
|
6496
|
-
/* @__PURE__ */
|
|
6549
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-yellow-400", children: [
|
|
6497
6550
|
"~",
|
|
6498
6551
|
diff.summary.modified
|
|
6499
6552
|
] }),
|
|
6500
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-neutral-400", children: [
|
|
6501
6554
|
"=",
|
|
6502
6555
|
diff.summary.unchanged
|
|
6503
6556
|
] })
|
|
6504
6557
|
] }) }),
|
|
6505
|
-
/* @__PURE__ */
|
|
6558
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between p-2 border-b border-neutral-700 flex-shrink-0", children: [
|
|
6506
6559
|
/* @__PURE__ */ jsx39("div", { className: "flex items-center gap-1", children: ["all", "modified", "added", "removed"].map((filter) => /* @__PURE__ */ jsx39(
|
|
6507
6560
|
"button",
|
|
6508
6561
|
{
|
|
6509
6562
|
onClick: () => setDiffFilter(filter),
|
|
6510
|
-
className: `px-2 py-1 rounded text-xs transition-colors cursor-pointer ${diffFilter === filter ? "bg-
|
|
6563
|
+
className: `px-2 py-1 rounded text-xs transition-colors cursor-pointer ${diffFilter === filter ? "bg-neutral-700 text-neutral-300" : "text-neutral-500 hover:text-neutral-400"}`,
|
|
6511
6564
|
children: filter === "all" ? "All" : filter.charAt(0).toUpperCase() + filter.slice(1)
|
|
6512
6565
|
},
|
|
6513
6566
|
filter
|
|
@@ -6544,21 +6597,21 @@ function DiffEditorPanel({ sync, componentLabels, monacoTheme }) {
|
|
|
6544
6597
|
devtools
|
|
6545
6598
|
} = sync;
|
|
6546
6599
|
if (!selectedDiffFile) {
|
|
6547
|
-
return /* @__PURE__ */ jsx39("div", { className: "flex-1 min-w-0 bg-
|
|
6600
|
+
return /* @__PURE__ */ jsx39("div", { className: "flex-1 min-w-0 bg-neutral-900 rounded-lg border border-neutral-700 overflow-hidden flex flex-col", children: /* @__PURE__ */ jsx39("div", { className: "flex items-center justify-center h-full text-sm text-neutral-500", children: "Select a file from the tree to view differences" }) });
|
|
6548
6601
|
}
|
|
6549
6602
|
const compLabel = componentLabels?.[selectedDiffFile.component] ?? selectedDiffFile.component;
|
|
6550
|
-
return /* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */
|
|
6552
|
-
/* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex-1 min-w-0 bg-neutral-900 rounded-lg border border-neutral-700 overflow-hidden flex flex-col", children: [
|
|
6604
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between px-4 py-2 border-b border-neutral-700 flex-shrink-0", children: [
|
|
6605
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
|
|
6553
6606
|
/* @__PURE__ */ jsx39(FileCode4, { className: "w-4 h-4 flex-shrink-0 text-blue-400/50" }),
|
|
6554
|
-
/* @__PURE__ */
|
|
6607
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-sm text-neutral-300 font-medium", children: [
|
|
6555
6608
|
selectedDiffFile.component,
|
|
6556
6609
|
"/",
|
|
6557
6610
|
selectedDiffFile.path
|
|
6558
6611
|
] }),
|
|
6559
6612
|
devtools && hasUnsavedChanges && /* @__PURE__ */ jsx39("span", { className: "px-2 py-0.5 bg-amber-500/20 text-amber-400 text-xs rounded", children: "Modified" })
|
|
6560
6613
|
] }),
|
|
6561
|
-
/* @__PURE__ */ jsx39("span", { className: "text-xs text-
|
|
6614
|
+
/* @__PURE__ */ jsx39("span", { className: "text-xs text-neutral-500", children: compLabel })
|
|
6562
6615
|
] }),
|
|
6563
6616
|
/* @__PURE__ */ jsx39("div", { className: "flex-1 min-h-0", children: goldenContent !== null || liveContent !== null ? /* @__PURE__ */ jsx39(
|
|
6564
6617
|
DiffEditor,
|
|
@@ -6590,13 +6643,13 @@ function DiffEditorPanel({ sync, componentLabels, monacoTheme }) {
|
|
|
6590
6643
|
}
|
|
6591
6644
|
},
|
|
6592
6645
|
`diff-${selectedDiffFile.path}-${diffSideBySide}`
|
|
6593
|
-
) : /* @__PURE__ */ jsx39("div", { className: "flex items-center justify-center h-full text-sm text-
|
|
6646
|
+
) : /* @__PURE__ */ jsx39("div", { className: "flex items-center justify-center h-full text-sm text-neutral-500", children: "Loading file content..." }) })
|
|
6594
6647
|
] });
|
|
6595
6648
|
}
|
|
6596
6649
|
function FileDiffViewer({ sync, componentLabels, monacoTheme, renderFileIcon }) {
|
|
6597
6650
|
const { diff, diffLoading, selectedDiffFile, diffSideBySide, setDiffSideBySide, saving, hasUnsavedChanges, handleSaveLiveFile, devtools } = sync;
|
|
6598
|
-
return /* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */ jsx39("div", { className: "flex items-center justify-end mb-4 flex-shrink-0", children: /* @__PURE__ */ jsx39("div", { className: "flex items-center gap-2", children: selectedDiffFile && /* @__PURE__ */
|
|
6651
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col h-full", children: [
|
|
6652
|
+
/* @__PURE__ */ jsx39("div", { className: "flex items-center justify-end mb-4 flex-shrink-0", children: /* @__PURE__ */ jsx39("div", { className: "flex items-center gap-2", children: selectedDiffFile && /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
6600
6653
|
/* @__PURE__ */ jsx39(
|
|
6601
6654
|
IconButton,
|
|
6602
6655
|
{
|
|
@@ -6617,17 +6670,17 @@ function FileDiffViewer({ sync, componentLabels, monacoTheme, renderFileIcon })
|
|
|
6617
6670
|
}
|
|
6618
6671
|
)
|
|
6619
6672
|
] }) }) }),
|
|
6620
|
-
diffLoading ? /* @__PURE__ */ jsx39("div", { className: "text-sm text-
|
|
6673
|
+
diffLoading ? /* @__PURE__ */ jsx39("div", { className: "text-sm text-neutral-500 text-center py-8", children: "Loading diff..." }) : diff ? /* @__PURE__ */ jsxs33("div", { className: "flex gap-4 flex-1 min-h-[400px]", children: [
|
|
6621
6674
|
/* @__PURE__ */ jsx39(DiffFileTreePanel, { sync, componentLabels, renderFileIcon }),
|
|
6622
6675
|
/* @__PURE__ */ jsx39(DiffEditorPanel, { sync, componentLabels, monacoTheme })
|
|
6623
|
-
] }) : /* @__PURE__ */ jsx39("div", { className: "text-sm text-
|
|
6676
|
+
] }) : /* @__PURE__ */ jsx39("div", { className: "text-sm text-neutral-500 text-center py-8", children: "No diff data available. Click refresh to load." })
|
|
6624
6677
|
] });
|
|
6625
6678
|
}
|
|
6626
6679
|
|
|
6627
6680
|
// components/sections/golden-snapshots/snapshot-manager.tsx
|
|
6628
6681
|
import { useState as useState20 } from "react";
|
|
6629
6682
|
import { Archive as Archive2, Pin as Pin4, PinOff, Trash2 as Trash24, RotateCcw as RotateCcw5, Plus as Plus4, Loader2 as Loader26 } from "lucide-react";
|
|
6630
|
-
import { jsx as jsx40, jsxs as
|
|
6683
|
+
import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6631
6684
|
function SnapshotManager({ sync }) {
|
|
6632
6685
|
const {
|
|
6633
6686
|
manifest,
|
|
@@ -6658,16 +6711,16 @@ function SnapshotManager({ sync }) {
|
|
|
6658
6711
|
setDeleteTarget(null);
|
|
6659
6712
|
};
|
|
6660
6713
|
if (manifestLoading && !manifest) {
|
|
6661
|
-
return /* @__PURE__ */ jsx40("div", { className: "text-sm text-
|
|
6714
|
+
return /* @__PURE__ */ jsx40("div", { className: "text-sm text-neutral-500 text-center py-8", children: "Loading snapshots..." });
|
|
6662
6715
|
}
|
|
6663
|
-
return /* @__PURE__ */
|
|
6664
|
-
/* @__PURE__ */
|
|
6665
|
-
/* @__PURE__ */
|
|
6716
|
+
return /* @__PURE__ */ jsxs34("div", { className: "space-y-4", children: [
|
|
6717
|
+
/* @__PURE__ */ jsxs34("div", { className: "bg-neutral-900 rounded-lg p-4 border border-neutral-700", children: [
|
|
6718
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
6666
6719
|
/* @__PURE__ */ jsx40(Plus4, { className: "w-5 h-5 text-green-400" }),
|
|
6667
|
-
/* @__PURE__ */ jsx40("h4", { className: "text-
|
|
6720
|
+
/* @__PURE__ */ jsx40("h4", { className: "text-neutral-300 font-medium", children: "Create Snapshot" })
|
|
6668
6721
|
] }),
|
|
6669
|
-
/* @__PURE__ */ jsx40("p", { className: "text-xs text-
|
|
6670
|
-
/* @__PURE__ */
|
|
6722
|
+
/* @__PURE__ */ jsx40("p", { className: "text-xs text-neutral-600 mb-3", children: "Archives the current live state. If components differ from golden, their patch version is auto-bumped." }),
|
|
6723
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex gap-2", children: [
|
|
6671
6724
|
/* @__PURE__ */ jsx40("div", { className: "flex-1", children: /* @__PURE__ */ jsx40(
|
|
6672
6725
|
Input,
|
|
6673
6726
|
{
|
|
@@ -6691,12 +6744,12 @@ function SnapshotManager({ sync }) {
|
|
|
6691
6744
|
)
|
|
6692
6745
|
] })
|
|
6693
6746
|
] }),
|
|
6694
|
-
/* @__PURE__ */
|
|
6695
|
-
/* @__PURE__ */
|
|
6696
|
-
/* @__PURE__ */
|
|
6697
|
-
/* @__PURE__ */ jsx40(Archive2, { className: "w-4 h-4 text-
|
|
6698
|
-
/* @__PURE__ */ jsx40("h4", { className: "text-
|
|
6699
|
-
/* @__PURE__ */
|
|
6747
|
+
/* @__PURE__ */ jsxs34("div", { className: "bg-neutral-900 rounded-lg border border-neutral-700 overflow-hidden", children: [
|
|
6748
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between px-4 py-3 border-b border-neutral-700", children: [
|
|
6749
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
6750
|
+
/* @__PURE__ */ jsx40(Archive2, { className: "w-4 h-4 text-neutral-500" }),
|
|
6751
|
+
/* @__PURE__ */ jsx40("h4", { className: "text-neutral-300 font-medium", children: "Snapshots" }),
|
|
6752
|
+
/* @__PURE__ */ jsxs34("span", { className: "text-xs text-neutral-500", children: [
|
|
6700
6753
|
"(",
|
|
6701
6754
|
manifest?.snapshots.length ?? 0,
|
|
6702
6755
|
")"
|
|
@@ -6714,27 +6767,27 @@ function SnapshotManager({ sync }) {
|
|
|
6714
6767
|
}
|
|
6715
6768
|
)
|
|
6716
6769
|
] }),
|
|
6717
|
-
!manifest || manifest.snapshots.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "text-sm text-
|
|
6770
|
+
!manifest || manifest.snapshots.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "text-sm text-neutral-500 text-center py-8", children: "No snapshots yet" }) : /* @__PURE__ */ jsx40("div", { className: "divide-y divide-neutral-700", children: [...manifest.snapshots].reverse().map((snap) => /* @__PURE__ */ jsxs34(
|
|
6718
6771
|
"div",
|
|
6719
6772
|
{
|
|
6720
6773
|
className: `flex items-center gap-3 px-4 py-3 ${snap.version === manifest.activeVersion ? "bg-green-500/5" : ""}`,
|
|
6721
6774
|
children: [
|
|
6722
|
-
/* @__PURE__ */
|
|
6723
|
-
/* @__PURE__ */
|
|
6724
|
-
/* @__PURE__ */
|
|
6775
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex-1 min-w-0", children: [
|
|
6776
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
6777
|
+
/* @__PURE__ */ jsxs34("span", { className: "text-sm font-mono text-neutral-300", children: [
|
|
6725
6778
|
"v",
|
|
6726
6779
|
snap.version
|
|
6727
6780
|
] }),
|
|
6728
6781
|
snap.version === manifest.activeVersion && /* @__PURE__ */ jsx40("span", { className: "px-1.5 py-0.5 bg-green-500/20 text-green-400 text-[10px] rounded font-medium", children: "active" }),
|
|
6729
6782
|
snap.pinned && /* @__PURE__ */ jsx40(Pin4, { className: "w-3 h-3 text-amber-400" }),
|
|
6730
|
-
snap.metaVersion && /* @__PURE__ */ jsx40("span", { className: "text-xs text-
|
|
6783
|
+
snap.metaVersion && /* @__PURE__ */ jsx40("span", { className: "text-xs text-neutral-600 font-mono", children: snap.metaVersion })
|
|
6731
6784
|
] }),
|
|
6732
|
-
/* @__PURE__ */
|
|
6733
|
-
/* @__PURE__ */ jsx40("span", { className: "text-xs text-
|
|
6734
|
-
snap.description && /* @__PURE__ */ jsx40("span", { className: "text-xs text-
|
|
6785
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
6786
|
+
/* @__PURE__ */ jsx40("span", { className: "text-xs text-neutral-600", children: formatDate(snap.createdAt) }),
|
|
6787
|
+
snap.description && /* @__PURE__ */ jsx40("span", { className: "text-xs text-neutral-500 truncate", children: snap.description })
|
|
6735
6788
|
] })
|
|
6736
6789
|
] }),
|
|
6737
|
-
/* @__PURE__ */
|
|
6790
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
6738
6791
|
/* @__PURE__ */ jsx40(
|
|
6739
6792
|
IconButton,
|
|
6740
6793
|
{
|
|
@@ -6815,7 +6868,7 @@ function SnapshotManager({ sync }) {
|
|
|
6815
6868
|
// components/sections/golden-snapshots/version-manager.tsx
|
|
6816
6869
|
import { useState as useState21 } from "react";
|
|
6817
6870
|
import { Tag as Tag4, ArrowUp as ArrowUp4, Loader2 as Loader27 } from "lucide-react";
|
|
6818
|
-
import { jsx as jsx41, jsxs as
|
|
6871
|
+
import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6819
6872
|
function VersionManager({ sync, components, componentLabels }) {
|
|
6820
6873
|
const { status, handleUpdateComponentVersion, handleBumpVersion } = sync;
|
|
6821
6874
|
const [globalVersion, setGlobalVersion] = useState21("");
|
|
@@ -6849,15 +6902,15 @@ function VersionManager({ sync, components, componentLabels }) {
|
|
|
6849
6902
|
setComponentVersion(current);
|
|
6850
6903
|
setComponentDescription("");
|
|
6851
6904
|
};
|
|
6852
|
-
return /* @__PURE__ */
|
|
6853
|
-
/* @__PURE__ */
|
|
6854
|
-
/* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
|
|
6906
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-neutral-900 rounded-lg p-4 border border-teal-500/30", children: [
|
|
6907
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
6855
6908
|
/* @__PURE__ */ jsx41(Tag4, { className: "w-5 h-5 text-teal-400" }),
|
|
6856
|
-
/* @__PURE__ */ jsx41("h4", { className: "text-
|
|
6909
|
+
/* @__PURE__ */ jsx41("h4", { className: "text-neutral-300 font-medium", children: "Golden Version" }),
|
|
6857
6910
|
status?.goldenMeta && /* @__PURE__ */ jsx41("span", { className: "px-2 py-0.5 bg-teal-500/20 text-teal-400 text-xs rounded font-mono", children: status.goldenMeta.version })
|
|
6858
6911
|
] }),
|
|
6859
|
-
/* @__PURE__ */ jsx41("p", { className: "text-xs text-
|
|
6860
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-neutral-600 mb-3", children: "Bump the overall golden version number. This updates the top-level version in meta.json." }),
|
|
6913
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2", children: [
|
|
6861
6914
|
/* @__PURE__ */ jsx41("div", { className: "w-32", children: /* @__PURE__ */ jsx41(
|
|
6862
6915
|
Input,
|
|
6863
6916
|
{
|
|
@@ -6892,25 +6945,25 @@ function VersionManager({ sync, components, componentLabels }) {
|
|
|
6892
6945
|
)
|
|
6893
6946
|
] })
|
|
6894
6947
|
] }),
|
|
6895
|
-
/* @__PURE__ */
|
|
6896
|
-
/* @__PURE__ */
|
|
6897
|
-
/* @__PURE__ */ jsx41("h4", { className: "text-
|
|
6898
|
-
/* @__PURE__ */ jsx41("p", { className: "text-xs text-
|
|
6948
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-neutral-900 rounded-lg border border-neutral-700 overflow-hidden", children: [
|
|
6949
|
+
/* @__PURE__ */ jsxs35("div", { className: "px-4 py-3 border-b border-neutral-700", children: [
|
|
6950
|
+
/* @__PURE__ */ jsx41("h4", { className: "text-neutral-300 font-medium", children: "Component Versions" }),
|
|
6951
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-neutral-600 mt-1", children: "Update individual component versions. Click a component to edit." })
|
|
6899
6952
|
] }),
|
|
6900
|
-
/* @__PURE__ */ jsx41("div", { className: "divide-y divide-
|
|
6953
|
+
/* @__PURE__ */ jsx41("div", { className: "divide-y divide-neutral-700", children: components.map((comp) => {
|
|
6901
6954
|
const currentVersion = status?.goldenMeta?.components[comp]?.version;
|
|
6902
6955
|
const liveVersion = status?.liveMeta?.components[comp]?.version;
|
|
6903
6956
|
const isEditing = editingComponent === comp;
|
|
6904
6957
|
const mismatch = currentVersion && liveVersion && currentVersion !== liveVersion;
|
|
6905
|
-
return /* @__PURE__ */
|
|
6906
|
-
/* @__PURE__ */
|
|
6907
|
-
/* @__PURE__ */
|
|
6908
|
-
/* @__PURE__ */ jsx41("span", { className: "text-sm text-
|
|
6909
|
-
currentVersion && /* @__PURE__ */
|
|
6958
|
+
return /* @__PURE__ */ jsxs35("div", { className: "px-4 py-3", children: [
|
|
6959
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
|
|
6960
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
6961
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-neutral-300", children: getLabel(comp) }),
|
|
6962
|
+
currentVersion && /* @__PURE__ */ jsxs35("span", { className: "text-xs font-mono text-neutral-500", children: [
|
|
6910
6963
|
"v",
|
|
6911
6964
|
currentVersion
|
|
6912
6965
|
] }),
|
|
6913
|
-
mismatch && /* @__PURE__ */
|
|
6966
|
+
mismatch && /* @__PURE__ */ jsxs35("span", { className: "text-[10px] text-yellow-400", children: [
|
|
6914
6967
|
"(live: v",
|
|
6915
6968
|
liveVersion,
|
|
6916
6969
|
")"
|
|
@@ -6927,7 +6980,7 @@ function VersionManager({ sync, components, componentLabels }) {
|
|
|
6927
6980
|
}
|
|
6928
6981
|
)
|
|
6929
6982
|
] }),
|
|
6930
|
-
isEditing && /* @__PURE__ */
|
|
6983
|
+
isEditing && /* @__PURE__ */ jsxs35("div", { className: "flex gap-2 mt-2", children: [
|
|
6931
6984
|
/* @__PURE__ */ jsx41("div", { className: "w-28", children: /* @__PURE__ */ jsx41(
|
|
6932
6985
|
Input,
|
|
6933
6986
|
{
|
|
@@ -6978,7 +7031,7 @@ function VersionManager({ sync, components, componentLabels }) {
|
|
|
6978
7031
|
}
|
|
6979
7032
|
|
|
6980
7033
|
// components/sections/golden-snapshots/golden-sync-panel.tsx
|
|
6981
|
-
import { jsx as jsx42, jsxs as
|
|
7034
|
+
import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6982
7035
|
function GoldenSyncPanel({
|
|
6983
7036
|
api,
|
|
6984
7037
|
components,
|
|
@@ -7054,12 +7107,12 @@ function GoldenSyncPanel({
|
|
|
7054
7107
|
{ id: "versions", label: "Versions", icon: /* @__PURE__ */ jsx42(Tag5, { className: "w-4 h-4" }), color: "text-teal-400", devtoolsOnly: true }
|
|
7055
7108
|
];
|
|
7056
7109
|
const visibleTabs = tabs.filter((t) => !t.devtoolsOnly || devtools);
|
|
7057
|
-
return /* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7060
|
-
/* @__PURE__ */
|
|
7061
|
-
/* @__PURE__ */ jsx42("h3", { className: "text-base font-semibold text-
|
|
7062
|
-
/* @__PURE__ */ jsx42("p", { className: "text-sm text-
|
|
7110
|
+
return /* @__PURE__ */ jsxs36("div", { className: `flex-1 flex flex-col ${activeTab === "diff" ? "overflow-hidden" : "overflow-y-auto"}`, children: [
|
|
7111
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-shrink-0", children: [
|
|
7112
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between mb-4", children: [
|
|
7113
|
+
/* @__PURE__ */ jsxs36("div", { className: "space-y-1", children: [
|
|
7114
|
+
/* @__PURE__ */ jsx42("h3", { className: "text-base font-semibold text-neutral-300", children: TAB_DESCRIPTIONS[activeTab].title }),
|
|
7115
|
+
/* @__PURE__ */ jsx42("p", { className: "text-sm text-neutral-400", children: TAB_DESCRIPTIONS[activeTab].description })
|
|
7063
7116
|
] }),
|
|
7064
7117
|
/* @__PURE__ */ jsx42(
|
|
7065
7118
|
IconButton,
|
|
@@ -7073,7 +7126,7 @@ function GoldenSyncPanel({
|
|
|
7073
7126
|
}
|
|
7074
7127
|
)
|
|
7075
7128
|
] }),
|
|
7076
|
-
/* @__PURE__ */ jsx42("div", { className: "flex", children: visibleTabs.map((tab) => /* @__PURE__ */
|
|
7129
|
+
/* @__PURE__ */ jsx42("div", { className: "flex", children: visibleTabs.map((tab) => /* @__PURE__ */ jsxs36(
|
|
7077
7130
|
"button",
|
|
7078
7131
|
{
|
|
7079
7132
|
onClick: () => handleTabChange(tab.id),
|
|
@@ -7085,16 +7138,16 @@ function GoldenSyncPanel({
|
|
|
7085
7138
|
},
|
|
7086
7139
|
tab.id
|
|
7087
7140
|
)) }),
|
|
7088
|
-
error && /* @__PURE__ */ jsx42("div", { className: "bg-red-500/10 border border-red-500/30 rounded-lg p-4 mt-4", children: /* @__PURE__ */
|
|
7141
|
+
error && /* @__PURE__ */ jsx42("div", { className: "bg-red-500/10 border border-red-500/30 rounded-lg p-4 mt-4", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
7089
7142
|
/* @__PURE__ */ jsx42(AlertCircle5, { className: "w-5 h-5 text-red-400 flex-shrink-0" }),
|
|
7090
7143
|
/* @__PURE__ */ jsx42("p", { className: "text-red-400 text-sm", children: error })
|
|
7091
7144
|
] }) }),
|
|
7092
|
-
lastAction && /* @__PURE__ */ jsx42("div", { className: "bg-green-500/10 border border-green-500/30 rounded-lg p-4 mt-4", children: /* @__PURE__ */
|
|
7145
|
+
lastAction && /* @__PURE__ */ jsx42("div", { className: "bg-green-500/10 border border-green-500/30 rounded-lg p-4 mt-4", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
7093
7146
|
/* @__PURE__ */ jsx42(Check11, { className: "w-5 h-5 text-green-400 flex-shrink-0" }),
|
|
7094
7147
|
/* @__PURE__ */ jsx42("p", { className: "text-green-400 text-sm", children: lastAction })
|
|
7095
7148
|
] }) })
|
|
7096
7149
|
] }),
|
|
7097
|
-
/* @__PURE__ */ jsx42("div", { className: activeTab === "diff" ? "flex-1 min-h-0 mt-4" : "space-y-6 mt-4", children: loading && activeTab === "status" ? /* @__PURE__ */ jsx42("div", { className: "text-sm text-
|
|
7150
|
+
/* @__PURE__ */ jsx42("div", { className: activeTab === "diff" ? "flex-1 min-h-0 mt-4" : "space-y-6 mt-4", children: loading && activeTab === "status" ? /* @__PURE__ */ jsx42("div", { className: "text-sm text-neutral-500 text-center py-8", children: "Loading..." }) : activeTab === "status" ? /* @__PURE__ */ jsx42(
|
|
7098
7151
|
StatusOverview,
|
|
7099
7152
|
{
|
|
7100
7153
|
status,
|
|
@@ -7249,7 +7302,7 @@ function useToolsPaths({ api, tools, onToolConfigChange }) {
|
|
|
7249
7302
|
}
|
|
7250
7303
|
|
|
7251
7304
|
// components/sections/ai-tools-paths/tools-paths-panel.tsx
|
|
7252
|
-
import { jsx as jsx43, jsxs as
|
|
7305
|
+
import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7253
7306
|
function ToolsPathsPanel({
|
|
7254
7307
|
api,
|
|
7255
7308
|
tools,
|
|
@@ -7267,9 +7320,9 @@ function ToolsPathsPanel({
|
|
|
7267
7320
|
validateAndUpdatePath,
|
|
7268
7321
|
toggleEnabled
|
|
7269
7322
|
} = useToolsPaths({ api, tools, onToolConfigChange });
|
|
7270
|
-
return /* @__PURE__ */
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
/* @__PURE__ */ jsx43("p", { className: "text-xs text-
|
|
7323
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("w-full", className), children: [
|
|
7324
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between mb-4", children: [
|
|
7325
|
+
/* @__PURE__ */ jsx43("p", { className: "text-xs text-neutral-500 leading-relaxed max-w-xl", children: "Configure CLI paths for AI coding assistants. Specify executable locations to enable integration with your development workflow." }),
|
|
7273
7326
|
/* @__PURE__ */ jsx43(
|
|
7274
7327
|
IconButton,
|
|
7275
7328
|
{
|
|
@@ -7285,25 +7338,25 @@ function ToolsPathsPanel({
|
|
|
7285
7338
|
}
|
|
7286
7339
|
)
|
|
7287
7340
|
] }),
|
|
7288
|
-
/* @__PURE__ */ jsx43("div", { className: "bg-
|
|
7341
|
+
/* @__PURE__ */ jsx43("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg divide-y divide-neutral-700", children: tools.map((tool) => {
|
|
7289
7342
|
const isRefreshing = refreshingTools.has(tool.id);
|
|
7290
7343
|
const isEnabled = tool.enabled;
|
|
7291
7344
|
const displayPath = tool.binaryPath || tool.detectedPath || "";
|
|
7292
7345
|
const hasBeenScanned = scannedTools.has(tool.id) && tool.detected;
|
|
7293
|
-
return /* @__PURE__ */
|
|
7346
|
+
return /* @__PURE__ */ jsxs37(
|
|
7294
7347
|
"div",
|
|
7295
7348
|
{
|
|
7296
7349
|
className: cn("p-4 space-y-2", !tool.detected && "opacity-60"),
|
|
7297
7350
|
children: [
|
|
7298
|
-
/* @__PURE__ */
|
|
7299
|
-
/* @__PURE__ */
|
|
7351
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between", children: [
|
|
7352
|
+
/* @__PURE__ */ jsxs37("div", { className: "relative flex items-center gap-2", children: [
|
|
7300
7353
|
renderToolIcon?.(tool.id),
|
|
7301
7354
|
/* @__PURE__ */ jsx43(
|
|
7302
7355
|
"span",
|
|
7303
7356
|
{
|
|
7304
7357
|
className: cn(
|
|
7305
7358
|
"font-medium",
|
|
7306
|
-
tool.detected && !isEnabled ? "text-
|
|
7359
|
+
tool.detected && !isEnabled ? "text-neutral-500" : "text-neutral-300"
|
|
7307
7360
|
),
|
|
7308
7361
|
children: tool.name
|
|
7309
7362
|
}
|
|
@@ -7313,15 +7366,15 @@ function ToolsPathsPanel({
|
|
|
7313
7366
|
{
|
|
7314
7367
|
className: "absolute inset-0 flex items-center pointer-events-none",
|
|
7315
7368
|
"aria-hidden": "true",
|
|
7316
|
-
children: /* @__PURE__ */ jsx43("div", { className: "w-full h-0.5 bg-
|
|
7369
|
+
children: /* @__PURE__ */ jsx43("div", { className: "w-full h-0.5 bg-red-400/70 rounded-full" })
|
|
7317
7370
|
}
|
|
7318
7371
|
)
|
|
7319
7372
|
] }),
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
tool.detected ? /* @__PURE__ */
|
|
7373
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
7374
|
+
tool.detected ? /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1 text-xs text-green-400", children: [
|
|
7322
7375
|
/* @__PURE__ */ jsx43(Check12, { className: "w-3.5 h-3.5" }),
|
|
7323
7376
|
"Installed"
|
|
7324
|
-
] }) : /* @__PURE__ */
|
|
7377
|
+
] }) : /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1 text-xs text-neutral-500", children: [
|
|
7325
7378
|
/* @__PURE__ */ jsx43(X7, { className: "w-3.5 h-3.5" }),
|
|
7326
7379
|
"Not Found"
|
|
7327
7380
|
] }),
|
|
@@ -7334,9 +7387,9 @@ function ToolsPathsPanel({
|
|
|
7334
7387
|
)
|
|
7335
7388
|
] })
|
|
7336
7389
|
] }),
|
|
7337
|
-
/* @__PURE__ */
|
|
7338
|
-
/* @__PURE__ */
|
|
7339
|
-
/* @__PURE__ */ jsx43(Terminal5, { className: "w-3 h-3 text-
|
|
7390
|
+
/* @__PURE__ */ jsxs37("div", { className: "space-y-1", children: [
|
|
7391
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
7392
|
+
/* @__PURE__ */ jsx43(Terminal5, { className: "w-3 h-3 text-neutral-500" }),
|
|
7340
7393
|
/* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43(
|
|
7341
7394
|
Input,
|
|
7342
7395
|
{
|
|
@@ -7344,13 +7397,13 @@ function ToolsPathsPanel({
|
|
|
7344
7397
|
onChange: (newPath) => validateAndUpdatePath(tool.id, newPath),
|
|
7345
7398
|
placeholder: `/usr/local/bin/${tool.id}`,
|
|
7346
7399
|
size: "sm",
|
|
7347
|
-
className: displayPath ? "text-white" : "text-
|
|
7400
|
+
className: displayPath ? "text-white" : "text-neutral-400"
|
|
7348
7401
|
}
|
|
7349
7402
|
) }),
|
|
7350
7403
|
/* @__PURE__ */ jsx43(
|
|
7351
7404
|
IconButton,
|
|
7352
7405
|
{
|
|
7353
|
-
icon: isRefreshing ? /* @__PURE__ */ jsx43(RefreshCw6, { className: "w-3 h-3 text-
|
|
7406
|
+
icon: isRefreshing ? /* @__PURE__ */ jsx43(RefreshCw6, { className: "w-3 h-3 text-neutral-300 animate-spin" }) : hasBeenScanned ? /* @__PURE__ */ jsx43(Check12, { className: "w-3 h-3 text-green-400" }) : /* @__PURE__ */ jsx43(RefreshCw6, { className: "w-3 h-3 text-neutral-300" }),
|
|
7354
7407
|
onClick: () => detectTool(tool.id),
|
|
7355
7408
|
disabled: isRefreshing,
|
|
7356
7409
|
color: hasBeenScanned ? "green" : "neutral",
|
|
@@ -7364,8 +7417,8 @@ function ToolsPathsPanel({
|
|
|
7364
7417
|
)
|
|
7365
7418
|
] }),
|
|
7366
7419
|
isEnabled && !displayPath?.includes("/") && !tool.detected && /* @__PURE__ */ jsx43("p", { className: "text-xs text-red-400 pl-5", children: "Path required when enabled. Enter full path to binary." }),
|
|
7367
|
-
tool.detected && !tool.binaryPath && /* @__PURE__ */ jsx43("p", { className: "text-xs text-
|
|
7368
|
-
!isEnabled && !displayPath?.includes("/") && !tool.detected && /* @__PURE__ */ jsx43("p", { className: "text-xs text-
|
|
7420
|
+
tool.detected && !tool.binaryPath && /* @__PURE__ */ jsx43("p", { className: "text-xs text-neutral-500 pl-5", children: "Using auto-detected path" }),
|
|
7421
|
+
!isEnabled && !displayPath?.includes("/") && !tool.detected && /* @__PURE__ */ jsx43("p", { className: "text-xs text-neutral-500 pl-5", children: "Tool disabled. Enter path to enable." })
|
|
7369
7422
|
] }),
|
|
7370
7423
|
tool.detected && !isEnabled && /* @__PURE__ */ jsx43("p", { className: "text-xs text-yellow-500", children: "Tool disabled \u2014 enable to use in your workflow" })
|
|
7371
7424
|
]
|
|
@@ -7447,7 +7500,7 @@ function useCapturedIssues(options) {
|
|
|
7447
7500
|
}
|
|
7448
7501
|
|
|
7449
7502
|
// components/sections/captured-issues/captured-issues-panel.tsx
|
|
7450
|
-
import { jsx as jsx44, jsxs as
|
|
7503
|
+
import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7451
7504
|
function CapturedIssuesPanel({
|
|
7452
7505
|
api,
|
|
7453
7506
|
errors,
|
|
@@ -7470,33 +7523,33 @@ function CapturedIssuesPanel({
|
|
|
7470
7523
|
handleDismiss
|
|
7471
7524
|
} = useCapturedIssues({ api, errors, onDismiss, onSubmitSuccess });
|
|
7472
7525
|
const hasErrors = errorCount > 0 || warnCount > 0;
|
|
7473
|
-
return /* @__PURE__ */
|
|
7474
|
-
hasErrors ? /* @__PURE__ */
|
|
7475
|
-
/* @__PURE__ */ jsx44("div", { className: "flex items-center justify-between", children: /* @__PURE__ */
|
|
7526
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("space-y-6", className), children: [
|
|
7527
|
+
hasErrors ? /* @__PURE__ */ jsxs38("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4 space-y-4", children: [
|
|
7528
|
+
/* @__PURE__ */ jsx44("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
7476
7529
|
/* @__PURE__ */ jsx44(AlertTriangle6, { className: "w-4 h-4 text-red-400" }),
|
|
7477
|
-
/* @__PURE__ */
|
|
7478
|
-
errorCount > 0 && /* @__PURE__ */
|
|
7530
|
+
/* @__PURE__ */ jsxs38("span", { className: "text-sm text-neutral-300", children: [
|
|
7531
|
+
errorCount > 0 && /* @__PURE__ */ jsxs38("span", { className: "text-red-400", children: [
|
|
7479
7532
|
errorCount,
|
|
7480
7533
|
" error",
|
|
7481
7534
|
errorCount !== 1 ? "s" : ""
|
|
7482
7535
|
] }),
|
|
7483
|
-
errorCount > 0 && warnCount > 0 && /* @__PURE__ */ jsx44("span", { className: "text-
|
|
7484
|
-
warnCount > 0 && /* @__PURE__ */
|
|
7536
|
+
errorCount > 0 && warnCount > 0 && /* @__PURE__ */ jsx44("span", { className: "text-neutral-500", children: ", " }),
|
|
7537
|
+
warnCount > 0 && /* @__PURE__ */ jsxs38("span", { className: "text-yellow-400", children: [
|
|
7485
7538
|
warnCount,
|
|
7486
7539
|
" warning",
|
|
7487
7540
|
warnCount !== 1 ? "s" : ""
|
|
7488
7541
|
] })
|
|
7489
7542
|
] })
|
|
7490
7543
|
] }) }),
|
|
7491
|
-
/* @__PURE__ */
|
|
7492
|
-
/* @__PURE__ */ jsx44("p", { className: "text-sm text-
|
|
7493
|
-
/* @__PURE__ */ jsx44("div", { className: "max-h-48 overflow-y-auto bg-
|
|
7544
|
+
/* @__PURE__ */ jsxs38("div", { className: "space-y-2", children: [
|
|
7545
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm text-neutral-400", children: "Captured Errors" }),
|
|
7546
|
+
/* @__PURE__ */ jsx44("div", { className: "max-h-48 overflow-y-auto bg-neutral-950 border border-neutral-700 rounded-lg p-3 space-y-1", children: errors.map((error) => /* @__PURE__ */ jsxs38("div", { className: "text-xs font-mono break-words", children: [
|
|
7494
7547
|
/* @__PURE__ */ jsx44("span", { className: cn("mr-2 shrink-0", error.level === "warning" ? "text-yellow-400" : "text-red-400"), children: error.count > 1 ? `\xD7${error.count}` : "\u2022" }),
|
|
7495
|
-
/* @__PURE__ */ jsx44("span", { className: "text-
|
|
7548
|
+
/* @__PURE__ */ jsx44("span", { className: "text-neutral-400 break-all", children: error.message })
|
|
7496
7549
|
] }, error.fingerprint)) })
|
|
7497
7550
|
] }),
|
|
7498
|
-
/* @__PURE__ */
|
|
7499
|
-
/* @__PURE__ */ jsx44("p", { className: "text-sm text-
|
|
7551
|
+
/* @__PURE__ */ jsxs38("div", { className: "space-y-3", children: [
|
|
7552
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm text-neutral-400", children: "Add context (optional)" }),
|
|
7500
7553
|
/* @__PURE__ */ jsx44(
|
|
7501
7554
|
Input,
|
|
7502
7555
|
{
|
|
@@ -7512,7 +7565,7 @@ function CapturedIssuesPanel({
|
|
|
7512
7565
|
onChange: (e) => setDescription(e.target.value),
|
|
7513
7566
|
placeholder: "What were you doing when this happened?",
|
|
7514
7567
|
rows: 3,
|
|
7515
|
-
className: "w-full px-3 py-1.5 bg-
|
|
7568
|
+
className: "w-full px-3 py-1.5 bg-neutral-750 border border-neutral-600 rounded-lg text-neutral-300 placeholder-neutral-500 focus:outline-none focus:border-blue-500 transition-colors resize-none text-sm"
|
|
7516
7569
|
}
|
|
7517
7570
|
),
|
|
7518
7571
|
/* @__PURE__ */ jsx44(
|
|
@@ -7525,7 +7578,7 @@ function CapturedIssuesPanel({
|
|
|
7525
7578
|
}
|
|
7526
7579
|
)
|
|
7527
7580
|
] }),
|
|
7528
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-end gap-2 pt-2", children: [
|
|
7529
7582
|
/* @__PURE__ */ jsx44(
|
|
7530
7583
|
IconButton,
|
|
7531
7584
|
{
|
|
@@ -7550,43 +7603,43 @@ function CapturedIssuesPanel({
|
|
|
7550
7603
|
}
|
|
7551
7604
|
)
|
|
7552
7605
|
] })
|
|
7553
|
-
] }) : /* @__PURE__ */ jsx44("div", { className: "bg-
|
|
7606
|
+
] }) : /* @__PURE__ */ jsx44("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-6", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-4", children: [
|
|
7554
7607
|
/* @__PURE__ */ jsx44("div", { className: "w-10 h-10 bg-green-500/10 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx44(Check13, { className: "w-5 h-5 text-green-400" }) }),
|
|
7555
|
-
/* @__PURE__ */
|
|
7556
|
-
/* @__PURE__ */ jsx44("h3", { className: "text-
|
|
7557
|
-
/* @__PURE__ */ jsx44("p", { className: "text-sm text-
|
|
7608
|
+
/* @__PURE__ */ jsxs38("div", { children: [
|
|
7609
|
+
/* @__PURE__ */ jsx44("h3", { className: "text-neutral-300 font-medium", children: "No Issues Captured" }),
|
|
7610
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm text-neutral-500", children: "Everything is running smoothly." })
|
|
7558
7611
|
] })
|
|
7559
7612
|
] }) }),
|
|
7560
|
-
submittedErrors.length > 0 && /* @__PURE__ */ jsx44("div", { className: "bg-
|
|
7561
|
-
/* @__PURE__ */
|
|
7562
|
-
/* @__PURE__ */
|
|
7613
|
+
submittedErrors.length > 0 && /* @__PURE__ */ jsx44("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxs38("details", { className: "group", children: [
|
|
7614
|
+
/* @__PURE__ */ jsxs38("summary", { className: "flex items-center justify-between p-4 cursor-pointer hover:bg-neutral-850 transition-colors", children: [
|
|
7615
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
7563
7616
|
/* @__PURE__ */ jsx44(Check13, { className: "w-4 h-4 text-green-400" }),
|
|
7564
|
-
/* @__PURE__ */ jsx44("span", { className: "text-sm text-
|
|
7565
|
-
/* @__PURE__ */
|
|
7617
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm text-neutral-300", children: "Previously Reported" }),
|
|
7618
|
+
/* @__PURE__ */ jsxs38("span", { className: "text-xs text-neutral-500", children: [
|
|
7566
7619
|
"(",
|
|
7567
7620
|
submittedErrors.length,
|
|
7568
7621
|
")"
|
|
7569
7622
|
] })
|
|
7570
7623
|
] }),
|
|
7571
|
-
/* @__PURE__ */ jsx44(ChevronDown9, { className: "w-4 h-4 text-
|
|
7624
|
+
/* @__PURE__ */ jsx44(ChevronDown9, { className: "w-4 h-4 text-neutral-500 transition-transform group-open:rotate-180" })
|
|
7572
7625
|
] }),
|
|
7573
|
-
/* @__PURE__ */ jsx44("div", { className: "border-t border-
|
|
7626
|
+
/* @__PURE__ */ jsx44("div", { className: "border-t border-neutral-700 p-4 space-y-2", children: submittedErrors.map((error) => /* @__PURE__ */ jsxs38(
|
|
7574
7627
|
"div",
|
|
7575
7628
|
{
|
|
7576
|
-
className: "flex items-start gap-3 p-3 bg-
|
|
7629
|
+
className: "flex items-start gap-3 p-3 bg-neutral-950 border border-neutral-700 rounded-lg",
|
|
7577
7630
|
children: [
|
|
7578
7631
|
/* @__PURE__ */ jsx44(Check13, { className: "w-4 h-4 text-green-400 mt-0.5 shrink-0" }),
|
|
7579
|
-
/* @__PURE__ */
|
|
7632
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex-1 min-w-0", children: [
|
|
7580
7633
|
/* @__PURE__ */ jsx44(
|
|
7581
7634
|
"p",
|
|
7582
7635
|
{
|
|
7583
|
-
className: "text-sm text-
|
|
7636
|
+
className: "text-sm text-neutral-300 font-mono truncate",
|
|
7584
7637
|
title: error.message,
|
|
7585
7638
|
children: error.message
|
|
7586
7639
|
}
|
|
7587
7640
|
),
|
|
7588
|
-
/* @__PURE__ */
|
|
7589
|
-
error.count > 0 && /* @__PURE__ */
|
|
7641
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-3 mt-1 text-xs text-neutral-500", children: [
|
|
7642
|
+
error.count > 0 && /* @__PURE__ */ jsxs38("span", { className: "text-yellow-400/80", children: [
|
|
7590
7643
|
"+",
|
|
7591
7644
|
error.count,
|
|
7592
7645
|
" since"
|
|
@@ -7618,7 +7671,7 @@ import {
|
|
|
7618
7671
|
History,
|
|
7619
7672
|
Clock as Clock2
|
|
7620
7673
|
} from "lucide-react";
|
|
7621
|
-
import { Fragment as Fragment11, jsx as jsx45, jsxs as
|
|
7674
|
+
import { Fragment as Fragment11, jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7622
7675
|
function formatRelativeTime2(isoString) {
|
|
7623
7676
|
const date = new Date(isoString);
|
|
7624
7677
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -7713,7 +7766,7 @@ function highlightMatch(text, query) {
|
|
|
7713
7766
|
const lowerQuery = query.toLowerCase();
|
|
7714
7767
|
const index = lowerText.indexOf(lowerQuery);
|
|
7715
7768
|
if (index === -1) return text;
|
|
7716
|
-
return /* @__PURE__ */
|
|
7769
|
+
return /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
7717
7770
|
text.slice(0, index),
|
|
7718
7771
|
/* @__PURE__ */ jsx45("span", { className: "bg-yellow-500/30 text-yellow-200", children: text.slice(index, index + query.length) }),
|
|
7719
7772
|
text.slice(index + query.length)
|
|
@@ -7731,15 +7784,15 @@ function SnapshotEntryRow({
|
|
|
7731
7784
|
}) {
|
|
7732
7785
|
const displayName = entry.label || getContentPreview(entry.content) || "Snapshot";
|
|
7733
7786
|
const isDeleting = deletingSnapshotId === entry.id;
|
|
7734
|
-
return /* @__PURE__ */
|
|
7787
|
+
return /* @__PURE__ */ jsxs39(
|
|
7735
7788
|
"div",
|
|
7736
7789
|
{
|
|
7737
|
-
className: "flex items-center gap-2 px-2 py-1.5 text-sm rounded-md group transition-colors hover:bg-
|
|
7790
|
+
className: "flex items-center gap-2 px-2 py-1.5 text-sm rounded-md group transition-colors hover:bg-neutral-700/50 text-neutral-400",
|
|
7738
7791
|
style: { paddingLeft: `${depth * 16 + 8}px` },
|
|
7739
7792
|
children: [
|
|
7740
|
-
/* @__PURE__ */ jsx45(Clock2, { className: "w-3 h-3 shrink-0 text-
|
|
7793
|
+
/* @__PURE__ */ jsx45(Clock2, { className: "w-3 h-3 shrink-0 text-neutral-500" }),
|
|
7741
7794
|
/* @__PURE__ */ jsx45("span", { className: "text-xs flex-1 truncate", children: searchQuery ? highlightMatch(displayName, searchQuery) : displayName }),
|
|
7742
|
-
/* @__PURE__ */ jsx45("span", { className: "text-[10px] text-
|
|
7795
|
+
/* @__PURE__ */ jsx45("span", { className: "text-[10px] text-neutral-500 shrink-0", title: formatFullDate2(entry.savedAt), children: formatRelativeTime2(entry.savedAt) }),
|
|
7743
7796
|
/* @__PURE__ */ jsx45(
|
|
7744
7797
|
IconButton,
|
|
7745
7798
|
{
|
|
@@ -7770,18 +7823,18 @@ function ExpandableNode({
|
|
|
7770
7823
|
searchQuery,
|
|
7771
7824
|
children
|
|
7772
7825
|
}) {
|
|
7773
|
-
return /* @__PURE__ */
|
|
7774
|
-
/* @__PURE__ */
|
|
7826
|
+
return /* @__PURE__ */ jsxs39("div", { children: [
|
|
7827
|
+
/* @__PURE__ */ jsxs39(
|
|
7775
7828
|
"button",
|
|
7776
7829
|
{
|
|
7777
7830
|
onClick: () => onToggle(path),
|
|
7778
|
-
className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded-md transition-colors cursor-pointer text-
|
|
7831
|
+
className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded-md transition-colors cursor-pointer text-neutral-400 hover:bg-neutral-700/50 hover:text-neutral-300",
|
|
7779
7832
|
style: { paddingLeft: `${depth * 16 + 8}px` },
|
|
7780
7833
|
children: [
|
|
7781
7834
|
/* @__PURE__ */ jsx45("span", { className: "w-4 h-4 flex items-center justify-center shrink-0", children: isExpanded ? /* @__PURE__ */ jsx45(ChevronDown10, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx45(ChevronRight6, { className: "w-3.5 h-3.5" }) }),
|
|
7782
7835
|
icon && /* @__PURE__ */ jsx45("span", { className: "shrink-0", children: icon }),
|
|
7783
7836
|
/* @__PURE__ */ jsx45("span", { className: "truncate flex-1 text-left", children: searchQuery ? highlightMatch(label, searchQuery) : label }),
|
|
7784
|
-
snapshotCount > 0 && /* @__PURE__ */ jsx45("span", { className: "text-xs text-
|
|
7837
|
+
snapshotCount > 0 && /* @__PURE__ */ jsx45("span", { className: "text-xs text-neutral-500 bg-neutral-700 px-1.5 py-0.5 rounded shrink-0", children: snapshotCount })
|
|
7785
7838
|
]
|
|
7786
7839
|
}
|
|
7787
7840
|
),
|
|
@@ -7811,16 +7864,16 @@ function SnapshotTree({
|
|
|
7811
7864
|
return count;
|
|
7812
7865
|
}, [scopes]);
|
|
7813
7866
|
if (totalCount === 0) {
|
|
7814
|
-
return /* @__PURE__ */
|
|
7867
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("text-sm text-neutral-500 py-8 text-center", className), children: [
|
|
7815
7868
|
"No snapshots saved yet.",
|
|
7816
7869
|
/* @__PURE__ */ jsx45("br", {}),
|
|
7817
7870
|
/* @__PURE__ */ jsx45("span", { className: "text-xs", children: "Use the camera button in editors to save snapshots." })
|
|
7818
7871
|
] });
|
|
7819
7872
|
}
|
|
7820
|
-
return /* @__PURE__ */
|
|
7821
|
-
/* @__PURE__ */
|
|
7822
|
-
/* @__PURE__ */
|
|
7823
|
-
/* @__PURE__ */ jsx45(Search7, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-
|
|
7873
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
7874
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
7875
|
+
/* @__PURE__ */ jsxs39("div", { className: "relative flex-1", children: [
|
|
7876
|
+
/* @__PURE__ */ jsx45(Search7, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-neutral-500 pointer-events-none" }),
|
|
7824
7877
|
/* @__PURE__ */ jsx45(
|
|
7825
7878
|
Input,
|
|
7826
7879
|
{
|
|
@@ -7862,7 +7915,7 @@ function SnapshotTree({
|
|
|
7862
7915
|
}
|
|
7863
7916
|
)
|
|
7864
7917
|
] }),
|
|
7865
|
-
/* @__PURE__ */ jsx45("div", { className: "bg-
|
|
7918
|
+
/* @__PURE__ */ jsx45("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 min-h-[200px] max-h-[60vh] overflow-y-auto", children: filteredScopes.length === 0 && searchQuery ? /* @__PURE__ */ jsxs39("p", { className: "text-xs text-neutral-500 text-center py-4", children: [
|
|
7866
7919
|
"No snapshots match \u201C",
|
|
7867
7920
|
searchQuery,
|
|
7868
7921
|
"\u201D"
|
|
@@ -7883,7 +7936,7 @@ function SnapshotTree({
|
|
|
7883
7936
|
id: category.id,
|
|
7884
7937
|
path: `${scope.id}/${category.id}`,
|
|
7885
7938
|
label: category.name,
|
|
7886
|
-
icon: category.icon ? /* @__PURE__ */ jsx45(History, { className: cn("w-3.5 h-3.5", CATEGORY_ICON_COLORS[category.icon] || "text-
|
|
7939
|
+
icon: category.icon ? /* @__PURE__ */ jsx45(History, { className: cn("w-3.5 h-3.5", CATEGORY_ICON_COLORS[category.icon] || "text-neutral-500") }) : void 0,
|
|
7887
7940
|
snapshotCount: countCategorySnapshots(category),
|
|
7888
7941
|
depth: 1,
|
|
7889
7942
|
isExpanded: expandedPaths.has(`${scope.id}/${category.id}`),
|
|
@@ -7895,7 +7948,7 @@ function SnapshotTree({
|
|
|
7895
7948
|
id: item.id,
|
|
7896
7949
|
path: `${scope.id}/${category.id}/${item.id}`,
|
|
7897
7950
|
label: item.name,
|
|
7898
|
-
icon: /* @__PURE__ */ jsx45(History, { className: "w-3.5 h-3.5 text-
|
|
7951
|
+
icon: /* @__PURE__ */ jsx45(History, { className: "w-3.5 h-3.5 text-neutral-500" }),
|
|
7899
7952
|
snapshotCount: item.snapshots.length,
|
|
7900
7953
|
depth: 2,
|
|
7901
7954
|
isExpanded: expandedPaths.has(`${scope.id}/${category.id}/${item.id}`),
|
|
@@ -8010,7 +8063,7 @@ function useSnapshotBrowser({ scopes, api }) {
|
|
|
8010
8063
|
}
|
|
8011
8064
|
|
|
8012
8065
|
// components/sections/snapshot-browser/snapshot-browser-panel.tsx
|
|
8013
|
-
import { jsx as jsx46, jsxs as
|
|
8066
|
+
import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8014
8067
|
var SNAPSHOT_LIMIT_OPTIONS = [5, 10, 15, 20, 25, 30, 40, 50].map((n) => ({
|
|
8015
8068
|
value: n,
|
|
8016
8069
|
label: String(n)
|
|
@@ -8036,11 +8089,11 @@ function SnapshotBrowserPanel({
|
|
|
8036
8089
|
deleteSnapshot,
|
|
8037
8090
|
deletingSnapshotId
|
|
8038
8091
|
} = useSnapshotBrowser({ scopes, api });
|
|
8039
|
-
return /* @__PURE__ */
|
|
8040
|
-
/* @__PURE__ */ jsx46("div", { className: "bg-
|
|
8041
|
-
/* @__PURE__ */
|
|
8042
|
-
/* @__PURE__ */ jsx46("label", { className: "text-
|
|
8043
|
-
/* @__PURE__ */ jsx46("p", { className: "text-sm text-
|
|
8092
|
+
return /* @__PURE__ */ jsxs40("div", { className: cn("space-y-6", className), children: [
|
|
8093
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between", children: [
|
|
8094
|
+
/* @__PURE__ */ jsxs40("div", { children: [
|
|
8095
|
+
/* @__PURE__ */ jsx46("label", { className: "text-neutral-300", children: "Snapshot Limit" }),
|
|
8096
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm text-neutral-500", children: "Maximum number of snapshots to keep per item (1-50)" })
|
|
8044
8097
|
] }),
|
|
8045
8098
|
/* @__PURE__ */ jsx46(
|
|
8046
8099
|
Select,
|
|
@@ -8051,11 +8104,11 @@ function SnapshotBrowserPanel({
|
|
|
8051
8104
|
}
|
|
8052
8105
|
)
|
|
8053
8106
|
] }) }),
|
|
8054
|
-
/* @__PURE__ */
|
|
8055
|
-
/* @__PURE__ */
|
|
8056
|
-
/* @__PURE__ */
|
|
8057
|
-
/* @__PURE__ */ jsx46("label", { className: "text-
|
|
8058
|
-
/* @__PURE__ */ jsx46("p", { className: "text-sm text-
|
|
8107
|
+
/* @__PURE__ */ jsxs40("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-4", children: [
|
|
8108
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between mb-3", children: [
|
|
8109
|
+
/* @__PURE__ */ jsxs40("div", { children: [
|
|
8110
|
+
/* @__PURE__ */ jsx46("label", { className: "text-neutral-300", children: "Browse Snapshots" }),
|
|
8111
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm text-neutral-500", children: totalSnapshotCount === 0 ? "No snapshots saved yet" : `${totalSnapshotCount} snapshot${totalSnapshotCount === 1 ? "" : "s"} stored` })
|
|
8059
8112
|
] }),
|
|
8060
8113
|
/* @__PURE__ */ jsx46(
|
|
8061
8114
|
IconButton,
|
|
@@ -8089,11 +8142,11 @@ function SnapshotBrowserPanel({
|
|
|
8089
8142
|
}
|
|
8090
8143
|
)
|
|
8091
8144
|
] }),
|
|
8092
|
-
/* @__PURE__ */ jsx46("div", { className: "bg-
|
|
8093
|
-
/* @__PURE__ */ jsx46(HelpCircle3, { className: "w-4 h-4 text-
|
|
8094
|
-
/* @__PURE__ */
|
|
8095
|
-
/* @__PURE__ */ jsx46("p", { children: /* @__PURE__ */ jsx46("strong", { className: "text-
|
|
8096
|
-
/* @__PURE__ */
|
|
8145
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-neutral-900/50 border border-neutral-700 rounded-lg p-4", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-start gap-3", children: [
|
|
8146
|
+
/* @__PURE__ */ jsx46(HelpCircle3, { className: "w-4 h-4 text-neutral-500 mt-0.5 shrink-0" }),
|
|
8147
|
+
/* @__PURE__ */ jsxs40("div", { className: "text-sm text-neutral-500 space-y-2", children: [
|
|
8148
|
+
/* @__PURE__ */ jsx46("p", { children: /* @__PURE__ */ jsx46("strong", { className: "text-neutral-400", children: "How snapshots work:" }) }),
|
|
8149
|
+
/* @__PURE__ */ jsxs40("ul", { className: "list-disc list-inside space-y-1 ml-1", children: [
|
|
8097
8150
|
/* @__PURE__ */ jsx46("li", { children: "Click \u201CSave Snapshot\u201D in any editor to save the current version" }),
|
|
8098
8151
|
/* @__PURE__ */ jsx46("li", { children: "When resetting content, you can choose from saved snapshots or the file default" }),
|
|
8099
8152
|
/* @__PURE__ */ jsx46("li", { children: "Snapshots are stored locally and persist across sessions" }),
|
|
@@ -8260,7 +8313,7 @@ function useSnippetsEditor({ api, snippets }) {
|
|
|
8260
8313
|
}
|
|
8261
8314
|
|
|
8262
8315
|
// components/sections/snippets-editor/snippets-editor.tsx
|
|
8263
|
-
import { jsx as jsx47, jsxs as
|
|
8316
|
+
import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8264
8317
|
var MIN_SIDEBAR = 200;
|
|
8265
8318
|
var MAX_SIDEBAR = 350;
|
|
8266
8319
|
var DEFAULT_SIDEBAR = 260;
|
|
@@ -8309,18 +8362,18 @@ function SnippetsEditor({
|
|
|
8309
8362
|
}, [sidebarWidth]);
|
|
8310
8363
|
const hasSelection = isEditing || isAdding;
|
|
8311
8364
|
const nameHasError = formError !== null && (formError.includes("name") || formError.includes("Name") || formError.includes("uppercase") || formError.includes("exists"));
|
|
8312
|
-
return /* @__PURE__ */
|
|
8313
|
-
/* @__PURE__ */
|
|
8314
|
-
/* @__PURE__ */
|
|
8365
|
+
return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden", className), children: [
|
|
8366
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between px-4 py-3 border-b border-neutral-700 bg-purple-500/5", children: [
|
|
8367
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
8315
8368
|
/* @__PURE__ */ jsx47(Braces, { className: "w-4 h-4 text-purple-400" }),
|
|
8316
|
-
/* @__PURE__ */ jsx47("h3", { className: "text-sm font-medium text-
|
|
8317
|
-
/* @__PURE__ */ jsx47("span", { className: "px-2 py-0.5 text-xs rounded-full bg-
|
|
8369
|
+
/* @__PURE__ */ jsx47("h3", { className: "text-sm font-medium text-neutral-300", children: title }),
|
|
8370
|
+
/* @__PURE__ */ jsx47("span", { className: "px-2 py-0.5 text-xs rounded-full bg-neutral-700 text-neutral-400", children: snippets.length })
|
|
8318
8371
|
] }),
|
|
8319
|
-
/* @__PURE__ */ jsx47("p", { className: "text-xs text-
|
|
8372
|
+
/* @__PURE__ */ jsx47("p", { className: "text-xs text-neutral-500 hidden sm:block", children: description })
|
|
8320
8373
|
] }),
|
|
8321
|
-
/* @__PURE__ */
|
|
8322
|
-
/* @__PURE__ */
|
|
8323
|
-
/* @__PURE__ */
|
|
8374
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-1 min-h-[400px]", children: [
|
|
8375
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-col border-r border-neutral-700", style: { width: sidebarWidth, minWidth: MIN_SIDEBAR }, children: [
|
|
8376
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1.5 p-2 border-b border-neutral-700", children: [
|
|
8324
8377
|
/* @__PURE__ */ jsx47("div", { className: "flex-1", children: /* @__PURE__ */ jsx47(
|
|
8325
8378
|
Input,
|
|
8326
8379
|
{
|
|
@@ -8343,11 +8396,11 @@ function SnippetsEditor({
|
|
|
8343
8396
|
}
|
|
8344
8397
|
)
|
|
8345
8398
|
] }),
|
|
8346
|
-
/* @__PURE__ */
|
|
8347
|
-
filteredSnippets.length === 0 && !isAdding && /* @__PURE__ */
|
|
8399
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex-1 overflow-y-auto", children: [
|
|
8400
|
+
filteredSnippets.length === 0 && !isAdding && /* @__PURE__ */ jsxs41("div", { className: "text-center py-10 px-4", children: [
|
|
8348
8401
|
/* @__PURE__ */ jsx47(Braces, { className: "w-8 h-8 mx-auto text-purple-400/40 mb-3" }),
|
|
8349
|
-
/* @__PURE__ */ jsx47("p", { className: "text-xs text-
|
|
8350
|
-
/* @__PURE__ */ jsx47("p", { className: "text-[10px] text-
|
|
8402
|
+
/* @__PURE__ */ jsx47("p", { className: "text-xs text-neutral-500 mb-1", children: searchQuery ? "No matching snippets" : "No snippets defined" }),
|
|
8403
|
+
/* @__PURE__ */ jsx47("p", { className: "text-[10px] text-neutral-600", children: searchQuery ? "Try a different search term" : "Click + to add your first snippet" })
|
|
8351
8404
|
] }),
|
|
8352
8405
|
filteredSnippets.map((snippet) => /* @__PURE__ */ jsx47(
|
|
8353
8406
|
SnippetListItem,
|
|
@@ -8382,10 +8435,10 @@ function SnippetsEditor({
|
|
|
8382
8435
|
onDelete: isEditing && selectedName ? () => remove(selectedName) : void 0,
|
|
8383
8436
|
onCancel: isAdding ? cancelForm : void 0
|
|
8384
8437
|
}
|
|
8385
|
-
) : /* @__PURE__ */ jsx47("div", { className: "flex-1 flex items-center justify-center p-6", children: /* @__PURE__ */
|
|
8438
|
+
) : /* @__PURE__ */ jsx47("div", { className: "flex-1 flex items-center justify-center p-6", children: /* @__PURE__ */ jsxs41("div", { className: "text-center max-w-xs", children: [
|
|
8386
8439
|
/* @__PURE__ */ jsx47(Braces, { className: "w-10 h-10 mx-auto text-purple-400/30 mb-4" }),
|
|
8387
|
-
/* @__PURE__ */ jsx47("p", { className: "text-sm text-
|
|
8388
|
-
/* @__PURE__ */
|
|
8440
|
+
/* @__PURE__ */ jsx47("p", { className: "text-sm text-neutral-500 mb-2", children: "Select a snippet to edit" }),
|
|
8441
|
+
/* @__PURE__ */ jsxs41("p", { className: "text-xs text-neutral-600 leading-relaxed", children: [
|
|
8389
8442
|
"Choose a snippet from the list, or click",
|
|
8390
8443
|
" ",
|
|
8391
8444
|
/* @__PURE__ */ jsx47("span", { className: "text-blue-400", children: "+" }),
|
|
@@ -8399,19 +8452,19 @@ function SnippetsEditor({
|
|
|
8399
8452
|
] });
|
|
8400
8453
|
}
|
|
8401
8454
|
function SnippetListItem({ snippet, selected, onSelect, onDelete }) {
|
|
8402
|
-
return /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ jsxs41(
|
|
8403
8456
|
"div",
|
|
8404
8457
|
{
|
|
8405
8458
|
className: cn(
|
|
8406
8459
|
"group flex items-start gap-2 px-3 py-2.5 cursor-pointer transition-colors border-l-2",
|
|
8407
|
-
selected ? "bg-
|
|
8460
|
+
selected ? "bg-neutral-850 border-l-blue-400" : "border-l-transparent hover:bg-neutral-850/50"
|
|
8408
8461
|
),
|
|
8409
8462
|
onClick: onSelect,
|
|
8410
8463
|
children: [
|
|
8411
|
-
/* @__PURE__ */
|
|
8412
|
-
/* @__PURE__ */ jsx47("p", { className: "text-xs font-mono font-medium text-
|
|
8413
|
-
/* @__PURE__ */ jsx47("p", { className: "text-[10px] text-
|
|
8414
|
-
snippet.value && /* @__PURE__ */
|
|
8464
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex-1 min-w-0", children: [
|
|
8465
|
+
/* @__PURE__ */ jsx47("p", { className: "text-xs font-mono font-medium text-neutral-300 truncate", children: snippet.name }),
|
|
8466
|
+
/* @__PURE__ */ jsx47("p", { className: "text-[10px] text-neutral-500 truncate mt-0.5", children: snippet.description }),
|
|
8467
|
+
snippet.value && /* @__PURE__ */ jsxs41("p", { className: "text-[10px] text-neutral-600 truncate mt-0.5 font-mono", children: [
|
|
8415
8468
|
snippet.value.slice(0, 80),
|
|
8416
8469
|
snippet.value.length > 80 ? "..." : ""
|
|
8417
8470
|
] })
|
|
@@ -8424,7 +8477,7 @@ function SnippetListItem({ snippet, selected, onSelect, onDelete }) {
|
|
|
8424
8477
|
e.stopPropagation();
|
|
8425
8478
|
onDelete();
|
|
8426
8479
|
},
|
|
8427
|
-
className: "opacity-0 group-hover:opacity-100 mt-0.5 p-0.5 rounded text-
|
|
8480
|
+
className: "opacity-0 group-hover:opacity-100 mt-0.5 p-0.5 rounded text-neutral-500 hover:text-red-400 hover:bg-red-500/10 transition-all",
|
|
8428
8481
|
children: /* @__PURE__ */ jsx47(X10, { className: "w-3 h-3" })
|
|
8429
8482
|
}
|
|
8430
8483
|
)
|
|
@@ -8444,10 +8497,10 @@ function SnippetForm({
|
|
|
8444
8497
|
onDelete,
|
|
8445
8498
|
onCancel
|
|
8446
8499
|
}) {
|
|
8447
|
-
return /* @__PURE__ */
|
|
8448
|
-
/* @__PURE__ */
|
|
8449
|
-
/* @__PURE__ */
|
|
8450
|
-
/* @__PURE__ */
|
|
8500
|
+
return /* @__PURE__ */ jsxs41("div", { className: "flex-1 flex flex-col", children: [
|
|
8501
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: [
|
|
8502
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
8503
|
+
/* @__PURE__ */ jsxs41("label", { className: "block text-xs text-neutral-500 mb-1.5", children: [
|
|
8451
8504
|
"Snippet Name ",
|
|
8452
8505
|
/* @__PURE__ */ jsx47("span", { className: "text-red-400", children: "*" })
|
|
8453
8506
|
] }),
|
|
@@ -8461,13 +8514,13 @@ function SnippetForm({
|
|
|
8461
8514
|
autoFocus: !isEditing
|
|
8462
8515
|
}
|
|
8463
8516
|
),
|
|
8464
|
-
/* @__PURE__ */
|
|
8517
|
+
/* @__PURE__ */ jsxs41("p", { className: "mt-1 text-[10px] text-neutral-600", children: [
|
|
8465
8518
|
"Use in prompts as ",
|
|
8466
8519
|
/* @__PURE__ */ jsx47("span", { className: "font-mono text-purple-400", children: "{{" + (formData.name || "NAME") + "}}" })
|
|
8467
8520
|
] })
|
|
8468
8521
|
] }),
|
|
8469
|
-
/* @__PURE__ */
|
|
8470
|
-
/* @__PURE__ */
|
|
8522
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
8523
|
+
/* @__PURE__ */ jsxs41("label", { className: "block text-xs text-neutral-500 mb-1.5", children: [
|
|
8471
8524
|
"Description ",
|
|
8472
8525
|
/* @__PURE__ */ jsx47("span", { className: "text-red-400", children: "*" })
|
|
8473
8526
|
] }),
|
|
@@ -8480,8 +8533,8 @@ function SnippetForm({
|
|
|
8480
8533
|
}
|
|
8481
8534
|
)
|
|
8482
8535
|
] }),
|
|
8483
|
-
/* @__PURE__ */
|
|
8484
|
-
/* @__PURE__ */ jsx47("label", { className: "block text-xs text-
|
|
8536
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
8537
|
+
/* @__PURE__ */ jsx47("label", { className: "block text-xs text-neutral-500 mb-1.5", children: "Value" }),
|
|
8485
8538
|
/* @__PURE__ */ jsx47(
|
|
8486
8539
|
ResizableTextarea,
|
|
8487
8540
|
{
|
|
@@ -8492,11 +8545,11 @@ function SnippetForm({
|
|
|
8492
8545
|
minHeight: 160
|
|
8493
8546
|
}
|
|
8494
8547
|
),
|
|
8495
|
-
/* @__PURE__ */ jsx47("p", { className: "mt-1 text-[10px] text-
|
|
8548
|
+
/* @__PURE__ */ jsx47("p", { className: "mt-1 text-[10px] text-neutral-600", children: "Can be a single value, multi-line text, or an entire document" })
|
|
8496
8549
|
] }),
|
|
8497
8550
|
formError && /* @__PURE__ */ jsx47("div", { className: "px-3 py-2 bg-red-500/10 border border-red-500/30 rounded-lg", children: /* @__PURE__ */ jsx47("p", { className: "text-xs text-red-400", children: formError }) })
|
|
8498
8551
|
] }),
|
|
8499
|
-
/* @__PURE__ */
|
|
8552
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between gap-2 border-t border-neutral-700 px-4 py-3", children: [
|
|
8500
8553
|
/* @__PURE__ */ jsx47("div", { children: onDelete && /* @__PURE__ */ jsx47(
|
|
8501
8554
|
IconButton,
|
|
8502
8555
|
{
|
|
@@ -8508,14 +8561,14 @@ function SnippetForm({
|
|
|
8508
8561
|
tooltip: { title: "Delete", description: "Remove this snippet" }
|
|
8509
8562
|
}
|
|
8510
8563
|
) }),
|
|
8511
|
-
/* @__PURE__ */
|
|
8564
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
8512
8565
|
onCancel && /* @__PURE__ */ jsx47(
|
|
8513
8566
|
"button",
|
|
8514
8567
|
{
|
|
8515
8568
|
type: "button",
|
|
8516
8569
|
onClick: onCancel,
|
|
8517
8570
|
disabled: isSaving,
|
|
8518
|
-
className: "rounded-md border border-
|
|
8571
|
+
className: "rounded-md border border-neutral-700 bg-transparent px-3 py-1.5 text-xs text-neutral-400 transition-colors hover:bg-neutral-700 hover:text-neutral-300 disabled:opacity-50",
|
|
8519
8572
|
children: "Cancel"
|
|
8520
8573
|
}
|
|
8521
8574
|
),
|
|
@@ -8530,7 +8583,7 @@ function SnippetForm({
|
|
|
8530
8583
|
tooltip: { title: "Reset", description: "Revert to saved values" }
|
|
8531
8584
|
}
|
|
8532
8585
|
),
|
|
8533
|
-
/* @__PURE__ */
|
|
8586
|
+
/* @__PURE__ */ jsxs41(
|
|
8534
8587
|
"button",
|
|
8535
8588
|
{
|
|
8536
8589
|
type: "button",
|
|
@@ -8625,7 +8678,7 @@ function usePromptEditor({
|
|
|
8625
8678
|
import { useState as useState29, useRef as useRef20, useCallback as useCallback17, useEffect as useEffect19, useMemo as useMemo8 } from "react";
|
|
8626
8679
|
import Editor2 from "@monaco-editor/react";
|
|
8627
8680
|
import { Variable, Info as Info5, Search as Search8, X as X11, AlertTriangle as AlertTriangle7 } from "lucide-react";
|
|
8628
|
-
import { jsx as jsx48, jsxs as
|
|
8681
|
+
import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8629
8682
|
var THEME_NAME = "prompt-editor-dark";
|
|
8630
8683
|
var themeRegistered2 = false;
|
|
8631
8684
|
var MIN_SIDEBAR_WIDTH = 220;
|
|
@@ -8847,16 +8900,16 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8847
8900
|
(v) => v.name.toLowerCase().includes(search) || v.description.toLowerCase().includes(search) || v.example && v.example.toLowerCase().includes(search)
|
|
8848
8901
|
);
|
|
8849
8902
|
}, [variables, variableSearch]);
|
|
8850
|
-
return /* @__PURE__ */
|
|
8851
|
-
/* @__PURE__ */
|
|
8852
|
-
/* @__PURE__ */ jsx48("div", { className: "relative flex h-[26px] bg-
|
|
8903
|
+
return /* @__PURE__ */ jsxs42("div", { className: `flex w-full h-full bg-neutral-900 overflow-hidden ${standalone ? "border border-neutral-700 rounded-lg" : ""} ${className}`, children: [
|
|
8904
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex-1 min-w-0 w-0 flex flex-col overflow-hidden", children: [
|
|
8905
|
+
/* @__PURE__ */ jsx48("div", { className: "relative flex h-[26px] bg-neutral-950 shrink-0", children: tools.map((tool) => {
|
|
8853
8906
|
const isActive = activeTab === tool.id;
|
|
8854
|
-
const activeColor = tool.activeColor ?? "text-
|
|
8855
|
-
return /* @__PURE__ */
|
|
8907
|
+
const activeColor = tool.activeColor ?? "text-blue-400";
|
|
8908
|
+
return /* @__PURE__ */ jsxs42(
|
|
8856
8909
|
"button",
|
|
8857
8910
|
{
|
|
8858
8911
|
onClick: () => setActiveTab(tool.id),
|
|
8859
|
-
className: `flex-1 flex items-center justify-center gap-1.5 px-2 text-xs font-medium border-b-2 transition-colors ${isActive ? `border-current ${activeColor} bg-
|
|
8912
|
+
className: `flex-1 flex items-center justify-center gap-1.5 px-2 text-xs font-medium border-b-2 transition-colors ${isActive ? `border-current ${activeColor} bg-neutral-850` : "border-neutral-700 text-neutral-500 hover:text-neutral-400 hover:bg-neutral-850/50"}`,
|
|
8860
8913
|
title: tool.name,
|
|
8861
8914
|
children: [
|
|
8862
8915
|
tool.icon ?? /* @__PURE__ */ jsx48(AiToolIcon, { tool: tool.id, size: 14 }),
|
|
@@ -8866,9 +8919,9 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8866
8919
|
tool.id
|
|
8867
8920
|
);
|
|
8868
8921
|
}) }),
|
|
8869
|
-
checklistMissing && /* @__PURE__ */
|
|
8870
|
-
/* @__PURE__ */ jsx48(AlertTriangle7, { className: "w-4 h-4 text-
|
|
8871
|
-
/* @__PURE__ */
|
|
8922
|
+
checklistMissing && /* @__PURE__ */ jsxs42("div", { className: "flex items-start gap-2 px-3 py-2 bg-red-400/10 border-b border-red-400/30 shrink-0", children: [
|
|
8923
|
+
/* @__PURE__ */ jsx48(AlertTriangle7, { className: "w-4 h-4 text-red-400 shrink-0 mt-0.5" }),
|
|
8924
|
+
/* @__PURE__ */ jsxs42("div", { className: "text-xs text-red-400", children: [
|
|
8872
8925
|
/* @__PURE__ */ jsx48("span", { className: "font-medium", children: 'Missing "# Verification Checklist" section.' }),
|
|
8873
8926
|
" ",
|
|
8874
8927
|
"When verification is enabled, only content under this heading will be sent to the AI for output validation."
|
|
@@ -8926,31 +8979,31 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8926
8979
|
activeTab
|
|
8927
8980
|
) })
|
|
8928
8981
|
] }),
|
|
8929
|
-
hasVariables && /* @__PURE__ */
|
|
8982
|
+
hasVariables && /* @__PURE__ */ jsxs42(
|
|
8930
8983
|
"div",
|
|
8931
8984
|
{
|
|
8932
|
-
className: "relative shrink-0 bg-
|
|
8985
|
+
className: "relative shrink-0 bg-neutral-950 overflow-hidden flex flex-col border-l border-neutral-700",
|
|
8933
8986
|
style: { width: sidebarWidth, minWidth: MIN_SIDEBAR_WIDTH, maxWidth: MAX_SIDEBAR_WIDTH },
|
|
8934
8987
|
children: [
|
|
8935
8988
|
/* @__PURE__ */ jsx48(
|
|
8936
8989
|
"div",
|
|
8937
8990
|
{
|
|
8938
8991
|
onPointerDown: handleSidebarMouseDown,
|
|
8939
|
-
className: "absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-
|
|
8992
|
+
className: "absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-violet-400/30 transition-colors z-10"
|
|
8940
8993
|
}
|
|
8941
8994
|
),
|
|
8942
|
-
/* @__PURE__ */
|
|
8943
|
-
/* @__PURE__ */
|
|
8995
|
+
/* @__PURE__ */ jsxs42("div", { className: "h-[52px] px-3 flex items-center justify-between border-b border-neutral-700 shrink-0", children: [
|
|
8996
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
8944
8997
|
/* @__PURE__ */ jsx48(Variable, { className: "w-4 h-4 text-neutral-500 shrink-0" }),
|
|
8945
|
-
/* @__PURE__ */
|
|
8998
|
+
/* @__PURE__ */ jsxs42("div", { className: "min-w-0", children: [
|
|
8946
8999
|
/* @__PURE__ */ jsx48("div", { className: "text-xs font-medium text-neutral-400", children: "Placeholders" }),
|
|
8947
9000
|
/* @__PURE__ */ jsx48("div", { className: "text-xs text-neutral-600 truncate", children: "Available placeholders" })
|
|
8948
9001
|
] })
|
|
8949
9002
|
] }),
|
|
8950
|
-
/* @__PURE__ */ jsx48("span", { className: "px-1.5 py-0.5 bg-
|
|
9003
|
+
/* @__PURE__ */ jsx48("span", { className: "px-1.5 py-0.5 bg-violet-400/20 text-violet-400 rounded text-xs", children: variableSearch.trim() ? `${filteredVariables.length}/${variables.length}` : variables.length })
|
|
8951
9004
|
] }),
|
|
8952
|
-
/* @__PURE__ */ jsx48("div", { className: "px-2.5 py-2 border-b border-
|
|
8953
|
-
/* @__PURE__ */ jsx48(Search8, { className: "absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-
|
|
9005
|
+
/* @__PURE__ */ jsx48("div", { className: "px-2.5 py-2 border-b border-neutral-700 shrink-0", children: /* @__PURE__ */ jsxs42("div", { className: "relative", children: [
|
|
9006
|
+
/* @__PURE__ */ jsx48(Search8, { className: "absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-neutral-500" }),
|
|
8954
9007
|
/* @__PURE__ */ jsx48(
|
|
8955
9008
|
Input,
|
|
8956
9009
|
{
|
|
@@ -8973,15 +9026,15 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8973
9026
|
}
|
|
8974
9027
|
)
|
|
8975
9028
|
] }) }),
|
|
8976
|
-
/* @__PURE__ */ jsx48("div", { className: "px-3 py-2 border-b border-
|
|
9029
|
+
/* @__PURE__ */ jsx48("div", { className: "px-3 py-2 border-b border-neutral-700 shrink-0", children: /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-1.5 text-xs text-neutral-500", children: [
|
|
8977
9030
|
/* @__PURE__ */ jsx48(Info5, { className: "w-3 h-3 flex-shrink-0" }),
|
|
8978
|
-
/* @__PURE__ */
|
|
9031
|
+
/* @__PURE__ */ jsxs42("span", { children: [
|
|
8979
9032
|
"Type ",
|
|
8980
|
-
/* @__PURE__ */ jsx48("code", { className: "text-
|
|
9033
|
+
/* @__PURE__ */ jsx48("code", { className: "text-violet-400", children: "{{" }),
|
|
8981
9034
|
" in editor for autocomplete"
|
|
8982
9035
|
] })
|
|
8983
9036
|
] }) }),
|
|
8984
|
-
/* @__PURE__ */ jsx48("div", { className: "flex-1 overflow-y-auto p-2.5 space-y-2", children: filteredVariables.length > 0 ? filteredVariables.map((variable) => /* @__PURE__ */ jsx48("div", { className: "bg-
|
|
9037
|
+
/* @__PURE__ */ jsx48("div", { className: "flex-1 overflow-y-auto p-2.5 space-y-2", children: filteredVariables.length > 0 ? filteredVariables.map((variable) => /* @__PURE__ */ jsx48("div", { className: "bg-neutral-850 border border-neutral-700 rounded-lg", children: /* @__PURE__ */ jsx48(
|
|
8985
9038
|
EditorPlaceholderCard,
|
|
8986
9039
|
{
|
|
8987
9040
|
name: variable.name,
|
|
@@ -8992,7 +9045,7 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8992
9045
|
accentColor: "purple",
|
|
8993
9046
|
showCopyPlaceholder: true
|
|
8994
9047
|
}
|
|
8995
|
-
) }, variable.name)) : variableSearch.trim() ? /* @__PURE__ */
|
|
9048
|
+
) }, variable.name)) : variableSearch.trim() ? /* @__PURE__ */ jsxs42("div", { className: "text-center py-4 text-xs text-neutral-500", children: [
|
|
8996
9049
|
'No placeholders match "',
|
|
8997
9050
|
variableSearch,
|
|
8998
9051
|
'"'
|
|
@@ -9006,7 +9059,7 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
9006
9059
|
// components/sections/prompt-editor/file-type-tabbed-prompt-editor.tsx
|
|
9007
9060
|
import { useState as useState30, useRef as useRef21, useCallback as useCallback18 } from "react";
|
|
9008
9061
|
import { FileCode as FileCode5, GripVertical as GripVertical3, Crosshair } from "lucide-react";
|
|
9009
|
-
import { jsx as jsx49, jsxs as
|
|
9062
|
+
import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9010
9063
|
var MIN_SIDEBAR_WIDTH2 = 160;
|
|
9011
9064
|
var MAX_SIDEBAR_WIDTH2 = 320;
|
|
9012
9065
|
var DEFAULT_SIDEBAR_WIDTH2 = 200;
|
|
@@ -9060,32 +9113,32 @@ function FileTypeTabbedPromptEditor({
|
|
|
9060
9113
|
target.addEventListener("pointermove", handlePointerMove);
|
|
9061
9114
|
target.addEventListener("pointerup", handlePointerUp);
|
|
9062
9115
|
}, [sidebarWidth]);
|
|
9063
|
-
return /* @__PURE__ */
|
|
9064
|
-
/* @__PURE__ */
|
|
9116
|
+
return /* @__PURE__ */ jsxs43("div", { className: `flex w-full max-w-full bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden ${className}`, children: [
|
|
9117
|
+
/* @__PURE__ */ jsxs43(
|
|
9065
9118
|
"div",
|
|
9066
9119
|
{
|
|
9067
|
-
className: "relative shrink-0 bg-
|
|
9120
|
+
className: "relative shrink-0 bg-neutral-950 overflow-hidden flex flex-col",
|
|
9068
9121
|
style: { width: sidebarWidth, minWidth: MIN_SIDEBAR_WIDTH2, maxWidth: MAX_SIDEBAR_WIDTH2 },
|
|
9069
9122
|
children: [
|
|
9070
|
-
/* @__PURE__ */ jsx49("div", { className: "h-[52px] px-3 flex items-center border-b border-
|
|
9123
|
+
/* @__PURE__ */ jsx49("div", { className: "h-[52px] px-3 flex items-center border-b border-neutral-700 shrink-0", children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
9071
9124
|
/* @__PURE__ */ jsx49(Crosshair, { className: "w-4 h-4 text-neutral-500 shrink-0" }),
|
|
9072
|
-
/* @__PURE__ */
|
|
9125
|
+
/* @__PURE__ */ jsxs43("div", { className: "min-w-0", children: [
|
|
9073
9126
|
/* @__PURE__ */ jsx49("div", { className: "text-xs font-medium text-neutral-400", children: selectorLabel }),
|
|
9074
9127
|
/* @__PURE__ */ jsx49("div", { className: "text-xs text-neutral-600", children: selectorSublabel })
|
|
9075
9128
|
] })
|
|
9076
9129
|
] }) }),
|
|
9077
9130
|
/* @__PURE__ */ jsx49("div", { className: "flex-1 overflow-y-auto", children: fileTypes.map((ft) => {
|
|
9078
9131
|
const isSelected = ft.id === selectedFileType;
|
|
9079
|
-
return /* @__PURE__ */
|
|
9132
|
+
return /* @__PURE__ */ jsxs43(
|
|
9080
9133
|
"button",
|
|
9081
9134
|
{
|
|
9082
9135
|
onClick: () => setSelectedFileType(ft.id),
|
|
9083
|
-
className: `w-full min-h-[44px] py-2 flex items-center gap-2.5 px-3 text-left transition-colors ${isSelected ? "bg-
|
|
9136
|
+
className: `w-full min-h-[44px] py-2 flex items-center gap-2.5 px-3 text-left transition-colors ${isSelected ? "bg-neutral-700/50 border-l-2 border-blue-400" : "hover:bg-neutral-850 border-l-2 border-transparent"}`,
|
|
9084
9137
|
children: [
|
|
9085
|
-
/* @__PURE__ */ jsx49("div", { className: `flex-shrink-0 ${isSelected ? "text-
|
|
9086
|
-
/* @__PURE__ */
|
|
9087
|
-
/* @__PURE__ */ jsx49("div", { className: `text-sm font-medium truncate ${isSelected ? "text-
|
|
9088
|
-
ft.description && /* @__PURE__ */ jsx49("div", { className: "text-xs text-
|
|
9138
|
+
/* @__PURE__ */ jsx49("div", { className: `flex-shrink-0 ${isSelected ? "text-blue-400" : "text-neutral-500"}`, children: ft.icon ?? /* @__PURE__ */ jsx49(FileCode5, { className: "w-4 h-4" }) }),
|
|
9139
|
+
/* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
|
|
9140
|
+
/* @__PURE__ */ jsx49("div", { className: `text-sm font-medium truncate ${isSelected ? "text-neutral-300" : "text-neutral-400"}`, children: ft.name }),
|
|
9141
|
+
ft.description && /* @__PURE__ */ jsx49("div", { className: "text-xs text-neutral-500 mt-0.5 leading-relaxed", children: ft.description })
|
|
9089
9142
|
] })
|
|
9090
9143
|
]
|
|
9091
9144
|
},
|
|
@@ -9096,14 +9149,14 @@ function FileTypeTabbedPromptEditor({
|
|
|
9096
9149
|
"div",
|
|
9097
9150
|
{
|
|
9098
9151
|
onPointerDown: handleSidebarPointerDown,
|
|
9099
|
-
className: "absolute right-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-
|
|
9100
|
-
children: /* @__PURE__ */ jsx49(GripVertical3, { className: "w-3 h-3 text-
|
|
9152
|
+
className: "absolute right-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-blue-400/30 transition-colors z-10 flex items-center justify-center group",
|
|
9153
|
+
children: /* @__PURE__ */ jsx49(GripVertical3, { className: "w-3 h-3 text-neutral-600 group-hover:text-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
9101
9154
|
}
|
|
9102
9155
|
)
|
|
9103
9156
|
]
|
|
9104
9157
|
}
|
|
9105
9158
|
),
|
|
9106
|
-
/* @__PURE__ */ jsx49("div", { className: "flex-1 min-w-0 w-0 overflow-hidden border-l border-
|
|
9159
|
+
/* @__PURE__ */ jsx49("div", { className: "flex-1 min-w-0 w-0 overflow-hidden border-l border-neutral-700", children: /* @__PURE__ */ jsx49(
|
|
9107
9160
|
TabbedPromptEditor,
|
|
9108
9161
|
{
|
|
9109
9162
|
prompts: currentPrompts,
|
|
@@ -9122,7 +9175,7 @@ function FileTypeTabbedPromptEditor({
|
|
|
9122
9175
|
// components/sections/prompt-editor/simulator-prompt-editor.tsx
|
|
9123
9176
|
import { useState as useState31, useRef as useRef22, useCallback as useCallback19, useMemo as useMemo9 } from "react";
|
|
9124
9177
|
import { ChevronDown as ChevronDown11, ChevronRight as ChevronRight7, GripVertical as GripVertical4, Crosshair as Crosshair2 } from "lucide-react";
|
|
9125
|
-
import { jsx as jsx50, jsxs as
|
|
9178
|
+
import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9126
9179
|
var MIN_SIDEBAR_WIDTH3 = 180;
|
|
9127
9180
|
var MAX_SIDEBAR_WIDTH3 = 360;
|
|
9128
9181
|
var DEFAULT_SIDEBAR_WIDTH3 = 220;
|
|
@@ -9205,16 +9258,16 @@ function SimulatorPromptEditor({
|
|
|
9205
9258
|
target.addEventListener("pointermove", handlePointerMove);
|
|
9206
9259
|
target.addEventListener("pointerup", handlePointerUp);
|
|
9207
9260
|
}, [sidebarWidth]);
|
|
9208
|
-
return /* @__PURE__ */
|
|
9209
|
-
/* @__PURE__ */
|
|
9261
|
+
return /* @__PURE__ */ jsxs44("div", { className: `flex w-full max-w-full bg-neutral-900 border border-neutral-700 rounded-lg overflow-hidden ${className}`, children: [
|
|
9262
|
+
/* @__PURE__ */ jsxs44(
|
|
9210
9263
|
"div",
|
|
9211
9264
|
{
|
|
9212
|
-
className: "relative shrink-0 bg-
|
|
9265
|
+
className: "relative shrink-0 bg-neutral-950 overflow-hidden flex flex-col",
|
|
9213
9266
|
style: { width: sidebarWidth, minWidth: MIN_SIDEBAR_WIDTH3, maxWidth: MAX_SIDEBAR_WIDTH3 },
|
|
9214
9267
|
children: [
|
|
9215
|
-
/* @__PURE__ */ jsx50("div", { className: "h-[52px] px-3 flex items-center border-b border-
|
|
9268
|
+
/* @__PURE__ */ jsx50("div", { className: "h-[52px] px-3 flex items-center border-b border-neutral-700 shrink-0", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
|
|
9216
9269
|
/* @__PURE__ */ jsx50(Crosshair2, { className: "w-4 h-4 text-neutral-500 shrink-0" }),
|
|
9217
|
-
/* @__PURE__ */
|
|
9270
|
+
/* @__PURE__ */ jsxs44("div", { className: "min-w-0", children: [
|
|
9218
9271
|
/* @__PURE__ */ jsx50("div", { className: "text-xs font-medium text-neutral-400", children: "Scenario" }),
|
|
9219
9272
|
/* @__PURE__ */ jsx50("div", { className: "text-xs text-neutral-600", children: "Select scenario and step" })
|
|
9220
9273
|
] })
|
|
@@ -9222,31 +9275,31 @@ function SimulatorPromptEditor({
|
|
|
9222
9275
|
/* @__PURE__ */ jsx50("div", { className: "flex-1 overflow-y-auto", children: scenarios.map((scenario) => {
|
|
9223
9276
|
const isExpanded = effectiveExpanded.has(scenario.id);
|
|
9224
9277
|
const isScenarioActive = selectedScenario === scenario.id;
|
|
9225
|
-
return /* @__PURE__ */
|
|
9226
|
-
/* @__PURE__ */
|
|
9278
|
+
return /* @__PURE__ */ jsxs44("div", { children: [
|
|
9279
|
+
/* @__PURE__ */ jsxs44(
|
|
9227
9280
|
"button",
|
|
9228
9281
|
{
|
|
9229
9282
|
onClick: () => toggleScenario(scenario.id),
|
|
9230
|
-
className: `w-full min-h-[44px] py-2 flex items-start gap-2 px-3 text-left transition-colors hover:bg-
|
|
9283
|
+
className: `w-full min-h-[44px] py-2 flex items-start gap-2 px-3 text-left transition-colors hover:bg-neutral-850 ${isScenarioActive ? "bg-neutral-850/50" : ""}`,
|
|
9231
9284
|
children: [
|
|
9232
|
-
/* @__PURE__ */ jsx50("div", { className: "flex-shrink-0 mt-0.5 text-
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */ jsx50("div", { className: `text-sm font-medium ${isScenarioActive ? "text-
|
|
9235
|
-
scenario.description && /* @__PURE__ */ jsx50("div", { className: "text-xs text-
|
|
9285
|
+
/* @__PURE__ */ jsx50("div", { className: "flex-shrink-0 mt-0.5 text-neutral-500", children: isExpanded ? /* @__PURE__ */ jsx50(ChevronDown11, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx50(ChevronRight7, { className: "w-4 h-4" }) }),
|
|
9286
|
+
/* @__PURE__ */ jsxs44("div", { className: "min-w-0 flex-1", children: [
|
|
9287
|
+
/* @__PURE__ */ jsx50("div", { className: `text-sm font-medium ${isScenarioActive ? "text-neutral-300" : "text-neutral-400"}`, children: scenario.name }),
|
|
9288
|
+
scenario.description && /* @__PURE__ */ jsx50("div", { className: "text-xs text-neutral-500 mt-0.5 leading-relaxed", children: scenario.description })
|
|
9236
9289
|
] })
|
|
9237
9290
|
]
|
|
9238
9291
|
}
|
|
9239
9292
|
),
|
|
9240
9293
|
isExpanded && /* @__PURE__ */ jsx50("div", { className: "pb-1", children: scenario.steps.map((step) => {
|
|
9241
9294
|
const isStepSelected = selectedScenario === scenario.id && selectedStep === step.id;
|
|
9242
|
-
return /* @__PURE__ */
|
|
9295
|
+
return /* @__PURE__ */ jsxs44(
|
|
9243
9296
|
"button",
|
|
9244
9297
|
{
|
|
9245
9298
|
onClick: () => selectStep(scenario.id, step.id),
|
|
9246
|
-
className: `w-full h-[32px] flex items-center gap-2 pl-9 pr-3 text-left transition-colors ${isStepSelected ? "bg-
|
|
9299
|
+
className: `w-full h-[32px] flex items-center gap-2 pl-9 pr-3 text-left transition-colors ${isStepSelected ? "bg-neutral-700/50 border-l-2 border-blue-400" : "hover:bg-neutral-850 border-l-2 border-transparent"}`,
|
|
9247
9300
|
children: [
|
|
9248
|
-
/* @__PURE__ */ jsx50("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 ${isStepSelected ? "bg-
|
|
9249
|
-
/* @__PURE__ */ jsx50("span", { className: `text-xs ${isStepSelected ? "text-
|
|
9301
|
+
/* @__PURE__ */ jsx50("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 ${isStepSelected ? "bg-blue-400" : "bg-neutral-600"}` }),
|
|
9302
|
+
/* @__PURE__ */ jsx50("span", { className: `text-xs ${isStepSelected ? "text-neutral-300" : "text-neutral-400"}`, children: step.name })
|
|
9250
9303
|
]
|
|
9251
9304
|
},
|
|
9252
9305
|
step.id
|
|
@@ -9258,14 +9311,14 @@ function SimulatorPromptEditor({
|
|
|
9258
9311
|
"div",
|
|
9259
9312
|
{
|
|
9260
9313
|
onPointerDown: handleSidebarPointerDown,
|
|
9261
|
-
className: "absolute right-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-
|
|
9262
|
-
children: /* @__PURE__ */ jsx50(GripVertical4, { className: "w-3 h-3 text-
|
|
9314
|
+
className: "absolute right-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-blue-400/30 transition-colors z-10 flex items-center justify-center group",
|
|
9315
|
+
children: /* @__PURE__ */ jsx50(GripVertical4, { className: "w-3 h-3 text-neutral-600 group-hover:text-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
9263
9316
|
}
|
|
9264
9317
|
)
|
|
9265
9318
|
]
|
|
9266
9319
|
}
|
|
9267
9320
|
),
|
|
9268
|
-
/* @__PURE__ */ jsx50("div", { className: "flex-1 min-w-0 w-0 overflow-hidden border-l border-
|
|
9321
|
+
/* @__PURE__ */ jsx50("div", { className: "flex-1 min-w-0 w-0 overflow-hidden border-l border-neutral-700", children: /* @__PURE__ */ jsx50(
|
|
9269
9322
|
TabbedPromptEditor,
|
|
9270
9323
|
{
|
|
9271
9324
|
prompts: currentPrompts,
|
|
@@ -9315,7 +9368,7 @@ import {
|
|
|
9315
9368
|
Play as Play4,
|
|
9316
9369
|
Pause as Pause4
|
|
9317
9370
|
} from "lucide-react";
|
|
9318
|
-
import { jsx as jsx51, jsxs as
|
|
9371
|
+
import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9319
9372
|
var iconSubset = {
|
|
9320
9373
|
settings: Settings6,
|
|
9321
9374
|
folder: Folder7,
|
|
@@ -9359,8 +9412,8 @@ function CollapsibleSection({
|
|
|
9359
9412
|
}) {
|
|
9360
9413
|
const [open, setOpen] = useState32(defaultOpen);
|
|
9361
9414
|
const Icon = icon ? iconSubset[icon] : void 0;
|
|
9362
|
-
return /* @__PURE__ */
|
|
9363
|
-
/* @__PURE__ */
|
|
9415
|
+
return /* @__PURE__ */ jsxs45("div", { className: cn("border-b border-neutral-700", className), children: [
|
|
9416
|
+
/* @__PURE__ */ jsxs45(
|
|
9364
9417
|
"button",
|
|
9365
9418
|
{
|
|
9366
9419
|
type: "button",
|
|
@@ -9395,8 +9448,8 @@ function CollapsibleSection({
|
|
|
9395
9448
|
|
|
9396
9449
|
// components/ui/files-panel.tsx
|
|
9397
9450
|
import { useState as useState33, useMemo as useMemo10 } from "react";
|
|
9398
|
-
import { Folder as Folder8, FolderOpen, File as File5, FileCode as FileCode6, FileText as FileText2, FileJson, Image as Image5, ChevronRight as ChevronRight9, Search as Search10, MoreVertical as MoreVertical3 } from "lucide-react";
|
|
9399
|
-
import { jsx as jsx52, jsxs as
|
|
9451
|
+
import { Folder as Folder8, FolderOpen as FolderOpen2, File as File5, FileCode as FileCode6, FileText as FileText2, FileJson, Image as Image5, ChevronRight as ChevronRight9, Search as Search10, MoreVertical as MoreVertical3 } from "lucide-react";
|
|
9452
|
+
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9400
9453
|
var iconSubset2 = {
|
|
9401
9454
|
folder: Folder8,
|
|
9402
9455
|
file: File5,
|
|
@@ -9450,7 +9503,7 @@ function getFileIcon(entry) {
|
|
|
9450
9503
|
}
|
|
9451
9504
|
function getFolderIcon(expanded, entry) {
|
|
9452
9505
|
if (entry.icon && iconSubset2[entry.icon]) return iconSubset2[entry.icon];
|
|
9453
|
-
return expanded ?
|
|
9506
|
+
return expanded ? FolderOpen2 : Folder8;
|
|
9454
9507
|
}
|
|
9455
9508
|
function filterTree(entries, query) {
|
|
9456
9509
|
const q = query.toLowerCase();
|
|
@@ -9472,8 +9525,8 @@ function FileNode({ entry, depth, selectedPath, expandedPaths, onToggleExpand, o
|
|
|
9472
9525
|
const isExpanded = isFolder && expandedPaths.has(entry.path);
|
|
9473
9526
|
const isSelected = !isFolder && selectedPath === entry.path;
|
|
9474
9527
|
const Icon = isFolder ? getFolderIcon(isExpanded, entry) : getFileIcon(entry);
|
|
9475
|
-
return /* @__PURE__ */
|
|
9476
|
-
/* @__PURE__ */
|
|
9528
|
+
return /* @__PURE__ */ jsxs46("li", { children: [
|
|
9529
|
+
/* @__PURE__ */ jsxs46(
|
|
9477
9530
|
"button",
|
|
9478
9531
|
{
|
|
9479
9532
|
type: "button",
|
|
@@ -9559,15 +9612,15 @@ function FilesPanel({
|
|
|
9559
9612
|
return next;
|
|
9560
9613
|
});
|
|
9561
9614
|
}
|
|
9562
|
-
return /* @__PURE__ */
|
|
9563
|
-
/* @__PURE__ */
|
|
9615
|
+
return /* @__PURE__ */ jsxs46("div", { className: cn("flex flex-col bg-neutral-800 rounded-lg overflow-hidden", className), children: [
|
|
9616
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-700", children: [
|
|
9564
9617
|
/* @__PURE__ */ jsx52("span", { className: "text-[11px] font-semibold uppercase tracking-wider text-neutral-500", children: "Files" }),
|
|
9565
|
-
/* @__PURE__ */
|
|
9618
|
+
/* @__PURE__ */ jsxs46("span", { className: "text-[10px] text-neutral-500", children: [
|
|
9566
9619
|
fileCount,
|
|
9567
9620
|
" files"
|
|
9568
9621
|
] })
|
|
9569
9622
|
] }),
|
|
9570
|
-
showSearch && /* @__PURE__ */ jsx52("div", { className: "px-2 py-2 border-b border-neutral-700", children: /* @__PURE__ */
|
|
9623
|
+
showSearch && /* @__PURE__ */ jsx52("div", { className: "px-2 py-2 border-b border-neutral-700", children: /* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-1.5 px-2 py-1 bg-black border border-neutral-700 rounded text-xs", children: [
|
|
9571
9624
|
/* @__PURE__ */ jsx52(Search10, { className: "w-3 h-3 text-neutral-500 shrink-0" }),
|
|
9572
9625
|
/* @__PURE__ */ jsx52(
|
|
9573
9626
|
"input",
|
|
@@ -9580,7 +9633,7 @@ function FilesPanel({
|
|
|
9580
9633
|
}
|
|
9581
9634
|
)
|
|
9582
9635
|
] }) }),
|
|
9583
|
-
/* @__PURE__ */
|
|
9636
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex-1 overflow-y-auto py-1", children: [
|
|
9584
9637
|
/* @__PURE__ */ jsx52("ul", { children: displayedFiles.map((entry) => /* @__PURE__ */ jsx52(
|
|
9585
9638
|
FileNode,
|
|
9586
9639
|
{
|
|
@@ -9602,7 +9655,7 @@ function FilesPanel({
|
|
|
9602
9655
|
// components/ui/snippets-panel.tsx
|
|
9603
9656
|
import { useState as useState34, useMemo as useMemo11 } from "react";
|
|
9604
9657
|
import { Search as Search11 } from "lucide-react";
|
|
9605
|
-
import { jsx as jsx53, jsxs as
|
|
9658
|
+
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9606
9659
|
var LANGUAGE_COLORS = {
|
|
9607
9660
|
typescript: "#3178c6",
|
|
9608
9661
|
javascript: "#f7df1e",
|
|
@@ -9637,15 +9690,15 @@ function SnippetsPanel({
|
|
|
9637
9690
|
() => searchQuery ? snippets.filter((s) => matchesSearch(s, searchQuery.toLowerCase())) : snippets,
|
|
9638
9691
|
[snippets, searchQuery]
|
|
9639
9692
|
);
|
|
9640
|
-
return /* @__PURE__ */
|
|
9641
|
-
/* @__PURE__ */
|
|
9693
|
+
return /* @__PURE__ */ jsxs47("div", { className: cn("flex flex-col bg-neutral-800 rounded-lg overflow-hidden", className), children: [
|
|
9694
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-700", children: [
|
|
9642
9695
|
/* @__PURE__ */ jsx53("span", { className: "text-[11px] font-semibold uppercase tracking-wider text-neutral-500", children: "Snippets" }),
|
|
9643
|
-
/* @__PURE__ */
|
|
9696
|
+
/* @__PURE__ */ jsxs47("span", { className: "text-[10px] text-neutral-500", children: [
|
|
9644
9697
|
snippets.length,
|
|
9645
9698
|
" snippets"
|
|
9646
9699
|
] })
|
|
9647
9700
|
] }),
|
|
9648
|
-
showSearch && /* @__PURE__ */ jsx53("div", { className: "px-2 py-2 border-b border-neutral-700", children: /* @__PURE__ */
|
|
9701
|
+
showSearch && /* @__PURE__ */ jsx53("div", { className: "px-2 py-2 border-b border-neutral-700", children: /* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-1.5 px-2 py-1 bg-black border border-neutral-700 rounded text-xs", children: [
|
|
9649
9702
|
/* @__PURE__ */ jsx53(Search11, { className: "w-3 h-3 text-neutral-500 shrink-0" }),
|
|
9650
9703
|
/* @__PURE__ */ jsx53(
|
|
9651
9704
|
"input",
|
|
@@ -9658,7 +9711,7 @@ function SnippetsPanel({
|
|
|
9658
9711
|
}
|
|
9659
9712
|
)
|
|
9660
9713
|
] }) }),
|
|
9661
|
-
/* @__PURE__ */
|
|
9714
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex-1 overflow-y-auto p-2 space-y-2", children: [
|
|
9662
9715
|
filteredSnippets.map((snippet) => /* @__PURE__ */ jsx53(
|
|
9663
9716
|
SnippetCard,
|
|
9664
9717
|
{
|
|
@@ -9674,9 +9727,9 @@ function SnippetsPanel({
|
|
|
9674
9727
|
}
|
|
9675
9728
|
function SnippetCard({ snippet, onInsert, onCopy }) {
|
|
9676
9729
|
const langColor = snippet.language ? LANGUAGE_COLORS[snippet.language.toLowerCase()] ?? "#6b7280" : "#6b7280";
|
|
9677
|
-
return /* @__PURE__ */
|
|
9678
|
-
/* @__PURE__ */
|
|
9679
|
-
/* @__PURE__ */
|
|
9730
|
+
return /* @__PURE__ */ jsxs47("div", { className: "rounded-md border border-neutral-700 bg-neutral-900 hover:border-neutral-600 transition-colors", children: [
|
|
9731
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center justify-between gap-2 px-2.5 py-1.5", children: [
|
|
9732
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
9680
9733
|
/* @__PURE__ */ jsx53("span", { className: "text-xs font-medium text-neutral-200 truncate", children: snippet.label }),
|
|
9681
9734
|
snippet.language && /* @__PURE__ */ jsx53(
|
|
9682
9735
|
"span",
|
|
@@ -9687,7 +9740,7 @@ function SnippetCard({ snippet, onInsert, onCopy }) {
|
|
|
9687
9740
|
}
|
|
9688
9741
|
)
|
|
9689
9742
|
] }),
|
|
9690
|
-
/* @__PURE__ */
|
|
9743
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-0.5 shrink-0", children: [
|
|
9691
9744
|
onInsert && /* @__PURE__ */ jsx53(
|
|
9692
9745
|
IconButton,
|
|
9693
9746
|
{
|
|
@@ -9747,9 +9800,11 @@ import {
|
|
|
9747
9800
|
Bot as Bot5,
|
|
9748
9801
|
Puzzle as Puzzle5,
|
|
9749
9802
|
Plug as Plug5,
|
|
9750
|
-
Webhook as Webhook5
|
|
9803
|
+
Webhook as Webhook5,
|
|
9804
|
+
House,
|
|
9805
|
+
Package as Package3
|
|
9751
9806
|
} from "lucide-react";
|
|
9752
|
-
import { jsx as jsx54, jsxs as
|
|
9807
|
+
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9753
9808
|
var iconSubset3 = {
|
|
9754
9809
|
folder: Folder9,
|
|
9755
9810
|
file: File6,
|
|
@@ -9781,7 +9836,9 @@ var iconSubset3 = {
|
|
|
9781
9836
|
bot: Bot5,
|
|
9782
9837
|
puzzle: Puzzle5,
|
|
9783
9838
|
plug: Plug5,
|
|
9784
|
-
webhook: Webhook5
|
|
9839
|
+
webhook: Webhook5,
|
|
9840
|
+
home: House,
|
|
9841
|
+
"package": Package3
|
|
9785
9842
|
};
|
|
9786
9843
|
var sizeConfig2 = {
|
|
9787
9844
|
xss: { text: "text-[10px]", icon: "w-2.5 h-2.5", px: "px-1", py: "py-0.5", gap: "gap-0.5", sep: "w-2 h-2" },
|
|
@@ -9828,22 +9885,29 @@ function Breadcrumb({
|
|
|
9828
9885
|
segments,
|
|
9829
9886
|
separator = "chevron",
|
|
9830
9887
|
size = "sm",
|
|
9888
|
+
variant = "box",
|
|
9831
9889
|
className
|
|
9832
9890
|
}) {
|
|
9833
9891
|
const s = sizeConfig2[size];
|
|
9834
|
-
|
|
9892
|
+
const isBox = variant === "box";
|
|
9893
|
+
return /* @__PURE__ */ jsx54("nav", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx54("div", { className: cn(
|
|
9894
|
+
"flex items-center gap-1",
|
|
9895
|
+
isBox && [s.px, s.py, "bg-neutral-800/50 border border-neutral-700/50 rounded-lg"]
|
|
9896
|
+
), children: segments.map((segment, index) => {
|
|
9835
9897
|
const isLast = index === segments.length - 1;
|
|
9836
9898
|
const isClickable = !isLast && !!segment.onClick;
|
|
9837
9899
|
const colors = segment.color && colorMap[segment.color] ? colorMap[segment.color] : null;
|
|
9838
|
-
|
|
9900
|
+
const isFirstPlain = !isBox && index === 0;
|
|
9901
|
+
return /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-1", children: [
|
|
9839
9902
|
index > 0 && /* @__PURE__ */ jsx54(Separator, { type: separator, size }),
|
|
9840
|
-
isClickable ? /* @__PURE__ */
|
|
9903
|
+
isClickable ? /* @__PURE__ */ jsxs48(
|
|
9841
9904
|
"button",
|
|
9842
9905
|
{
|
|
9843
9906
|
type: "button",
|
|
9844
9907
|
onClick: segment.onClick,
|
|
9845
9908
|
className: cn(
|
|
9846
|
-
"flex items-center gap-1.5
|
|
9909
|
+
"flex items-center gap-1.5 pr-2 py-0.5 rounded-md transition-colors cursor-pointer",
|
|
9910
|
+
isFirstPlain ? "pl-0" : "pl-2",
|
|
9847
9911
|
s.text,
|
|
9848
9912
|
"font-medium hover:text-white",
|
|
9849
9913
|
colors ? [colors.text, `hover:${colors.bg}`] : ["text-neutral-300", "hover:bg-neutral-700/50"]
|
|
@@ -9853,11 +9917,12 @@ function Breadcrumb({
|
|
|
9853
9917
|
/* @__PURE__ */ jsx54("span", { children: segment.label })
|
|
9854
9918
|
]
|
|
9855
9919
|
}
|
|
9856
|
-
) : /* @__PURE__ */
|
|
9920
|
+
) : /* @__PURE__ */ jsxs48(
|
|
9857
9921
|
"div",
|
|
9858
9922
|
{
|
|
9859
9923
|
className: cn(
|
|
9860
|
-
"flex items-center gap-1.5
|
|
9924
|
+
"flex items-center gap-1.5 pr-2 py-0.5 rounded-md",
|
|
9925
|
+
isFirstPlain ? "pl-0" : "pl-2",
|
|
9861
9926
|
s.text,
|
|
9862
9927
|
isLast ? ["font-medium bg-neutral-700/50", colors ? colors.text : "text-white"] : ["font-medium", colors ? colors.text : "text-neutral-300"]
|
|
9863
9928
|
),
|
|
@@ -9912,7 +9977,7 @@ import {
|
|
|
9912
9977
|
Plug as Plug6,
|
|
9913
9978
|
Webhook as Webhook6
|
|
9914
9979
|
} from "lucide-react";
|
|
9915
|
-
import { Fragment as Fragment12, jsx as jsx55, jsxs as
|
|
9980
|
+
import { Fragment as Fragment12, jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
9916
9981
|
var iconSubset4 = {
|
|
9917
9982
|
menu: Menu3,
|
|
9918
9983
|
home: Home3,
|
|
@@ -10027,20 +10092,20 @@ function NavigationBar({
|
|
|
10027
10092
|
const closeHistory = useCallback20(() => setHistoryOpen(false), []);
|
|
10028
10093
|
useClickOutside(historyRef, historyOpen, closeHistory);
|
|
10029
10094
|
const hasHistoryEntries = historyEntries && historyEntries.length > 0;
|
|
10030
|
-
return /* @__PURE__ */ jsx55("nav", { className: cn("flex items-center", className), children: /* @__PURE__ */
|
|
10031
|
-
leadingAction && LeadIcon && /* @__PURE__ */
|
|
10095
|
+
return /* @__PURE__ */ jsx55("nav", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsxs49("div", { className: cn("flex items-center gap-1", s.px, s.py, "bg-neutral-800/50 border border-neutral-700/50 rounded-lg"), children: [
|
|
10096
|
+
leadingAction && LeadIcon && /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
10032
10097
|
/* @__PURE__ */ jsx55(NavButton, { icon: LeadIcon, onClick: leadingAction.onClick, size }),
|
|
10033
10098
|
/* @__PURE__ */ jsx55(Divider, { size })
|
|
10034
10099
|
] }),
|
|
10035
|
-
hasNav && /* @__PURE__ */
|
|
10036
|
-
/* @__PURE__ */
|
|
10100
|
+
hasNav && /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
10101
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-0.5", children: [
|
|
10037
10102
|
/* @__PURE__ */ jsx55(NavButton, { icon: ChevronLeft3, onClick: onBack, disabled: !canGoBack, size }),
|
|
10038
10103
|
/* @__PURE__ */ jsx55(NavButton, { icon: ChevronRight11, onClick: onForward, disabled: !canGoForward, size })
|
|
10039
10104
|
] }),
|
|
10040
10105
|
/* @__PURE__ */ jsx55(Divider, { size })
|
|
10041
10106
|
] }),
|
|
10042
|
-
showHistory && /* @__PURE__ */
|
|
10043
|
-
/* @__PURE__ */
|
|
10107
|
+
showHistory && /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
10108
|
+
/* @__PURE__ */ jsxs49("div", { className: "relative", ref: historyRef, children: [
|
|
10044
10109
|
/* @__PURE__ */ jsx55(
|
|
10045
10110
|
NavButton,
|
|
10046
10111
|
{
|
|
@@ -10051,7 +10116,7 @@ function NavigationBar({
|
|
|
10051
10116
|
active: historyOpen
|
|
10052
10117
|
}
|
|
10053
10118
|
),
|
|
10054
|
-
historyOpen && hasHistoryEntries && /* @__PURE__ */
|
|
10119
|
+
historyOpen && hasHistoryEntries && /* @__PURE__ */ jsxs49("div", { className: "absolute left-0 top-full mt-1 w-max min-w-[200px] max-w-[420px] bg-neutral-800 border border-neutral-700 rounded-lg shadow-xl z-50", children: [
|
|
10055
10120
|
/* @__PURE__ */ jsx55("div", { className: "px-3 py-1.5 border-b border-neutral-700/50", children: /* @__PURE__ */ jsx55("p", { className: "text-xs font-medium text-neutral-500", children: "History" }) }),
|
|
10056
10121
|
/* @__PURE__ */ jsx55("div", { className: "max-h-[300px] overflow-y-auto py-1", children: historyEntries.map((entry, i) => /* @__PURE__ */ jsx55(
|
|
10057
10122
|
"button",
|
|
@@ -10062,7 +10127,7 @@ function NavigationBar({
|
|
|
10062
10127
|
setHistoryOpen(false);
|
|
10063
10128
|
},
|
|
10064
10129
|
className: "w-full px-3 py-1.5 flex items-center gap-1 text-left hover:bg-neutral-800 transition-colors cursor-pointer",
|
|
10065
|
-
children: entry.map((seg, segIdx) => /* @__PURE__ */
|
|
10130
|
+
children: entry.map((seg, segIdx) => /* @__PURE__ */ jsxs49("span", { className: "flex items-center gap-1 min-w-0", children: [
|
|
10066
10131
|
segIdx > 0 && /* @__PURE__ */ jsx55(ChevronRight11, { className: "w-2.5 h-2.5 text-neutral-600 flex-shrink-0" }),
|
|
10067
10132
|
seg.icon && /* @__PURE__ */ jsx55(SegmentIcon2, { icon: seg.icon, color: seg.color, size: "xs" }),
|
|
10068
10133
|
/* @__PURE__ */ jsx55("span", { className: cn(
|
|
@@ -10082,9 +10147,9 @@ function NavigationBar({
|
|
|
10082
10147
|
const isLast = index === segments.length - 1;
|
|
10083
10148
|
const isClickable = !isLast && !!segment.onClick;
|
|
10084
10149
|
const colors = segment.color && colorMap2[segment.color] ? colorMap2[segment.color] : null;
|
|
10085
|
-
return /* @__PURE__ */
|
|
10150
|
+
return /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-1", children: [
|
|
10086
10151
|
index > 0 && /* @__PURE__ */ jsx55(SegmentSeparator, { type: separator, size }),
|
|
10087
|
-
isClickable ? /* @__PURE__ */
|
|
10152
|
+
isClickable ? /* @__PURE__ */ jsxs49(
|
|
10088
10153
|
"button",
|
|
10089
10154
|
{
|
|
10090
10155
|
type: "button",
|
|
@@ -10100,7 +10165,7 @@ function NavigationBar({
|
|
|
10100
10165
|
/* @__PURE__ */ jsx55("span", { className: "truncate max-w-[200px]", children: segment.label })
|
|
10101
10166
|
]
|
|
10102
10167
|
}
|
|
10103
|
-
) : /* @__PURE__ */
|
|
10168
|
+
) : /* @__PURE__ */ jsxs49(
|
|
10104
10169
|
"div",
|
|
10105
10170
|
{
|
|
10106
10171
|
className: cn(
|
|
@@ -10142,7 +10207,7 @@ import {
|
|
|
10142
10207
|
Search as Search14,
|
|
10143
10208
|
Heart as Heart7
|
|
10144
10209
|
} from "lucide-react";
|
|
10145
|
-
import { jsx as jsx56, jsxs as
|
|
10210
|
+
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10146
10211
|
var iconSubset5 = {
|
|
10147
10212
|
folder: Folder11,
|
|
10148
10213
|
file: File8,
|
|
@@ -10245,7 +10310,7 @@ function CompactTab({
|
|
|
10245
10310
|
pill: isActive ? cn("bg-neutral-700 font-medium", c.active) : "text-neutral-500 hover:text-neutral-400 hover:bg-neutral-700/50",
|
|
10246
10311
|
card: isActive ? cn("bg-neutral-800 border-neutral-700", c.active) : "bg-transparent border-transparent text-neutral-500 hover:text-neutral-400 hover:bg-neutral-900"
|
|
10247
10312
|
}[variant];
|
|
10248
|
-
return /* @__PURE__ */
|
|
10313
|
+
return /* @__PURE__ */ jsxs50(
|
|
10249
10314
|
"button",
|
|
10250
10315
|
{
|
|
10251
10316
|
type: "button",
|
|
@@ -10259,7 +10324,7 @@ function CompactTab({
|
|
|
10259
10324
|
variantClass
|
|
10260
10325
|
),
|
|
10261
10326
|
children: [
|
|
10262
|
-
/* @__PURE__ */
|
|
10327
|
+
/* @__PURE__ */ jsxs50("span", { className: "relative flex items-center justify-center", children: [
|
|
10263
10328
|
tab.icon && /* @__PURE__ */ jsx56(TabIcon, { icon: tab.icon, size, color: isActive ? tab.color : void 0 }),
|
|
10264
10329
|
tab.badge !== void 0 && /* @__PURE__ */ jsx56("span", { className: "absolute -top-1.5 -right-2.5", children: /* @__PURE__ */ jsx56(Badge, { value: tab.badge, color: tab.badgeColor, size: "xss" }) })
|
|
10265
10330
|
] }),
|
|
@@ -10279,7 +10344,7 @@ function UnderlineTab({
|
|
|
10279
10344
|
const s = sizeConfig4[size];
|
|
10280
10345
|
const c = getColors(tab.color);
|
|
10281
10346
|
const showClose = tab.closable && onClose;
|
|
10282
|
-
return /* @__PURE__ */
|
|
10347
|
+
return /* @__PURE__ */ jsxs50(
|
|
10283
10348
|
"button",
|
|
10284
10349
|
{
|
|
10285
10350
|
type: "button",
|
|
@@ -10313,7 +10378,7 @@ function PillTab({
|
|
|
10313
10378
|
const s = sizeConfig4[size];
|
|
10314
10379
|
const c = getColors(tab.color);
|
|
10315
10380
|
const showClose = tab.closable && onClose;
|
|
10316
|
-
return /* @__PURE__ */
|
|
10381
|
+
return /* @__PURE__ */ jsxs50(
|
|
10317
10382
|
"button",
|
|
10318
10383
|
{
|
|
10319
10384
|
type: "button",
|
|
@@ -10346,7 +10411,7 @@ function CardTab({
|
|
|
10346
10411
|
const s = sizeConfig4[size];
|
|
10347
10412
|
const c = getColors(tab.color);
|
|
10348
10413
|
const showClose = tab.closable && onClose;
|
|
10349
|
-
return /* @__PURE__ */
|
|
10414
|
+
return /* @__PURE__ */ jsxs50(
|
|
10350
10415
|
"button",
|
|
10351
10416
|
{
|
|
10352
10417
|
type: "button",
|
|
@@ -10444,7 +10509,7 @@ function TabBar({
|
|
|
10444
10509
|
// components/ui/layout-tab-bar.tsx
|
|
10445
10510
|
import { useState as useState37, useRef as useRef25, useCallback as useCallback22, useEffect as useEffect21 } from "react";
|
|
10446
10511
|
import { ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight12, X as X13 } from "lucide-react";
|
|
10447
|
-
import { jsx as jsx57, jsxs as
|
|
10512
|
+
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
10448
10513
|
var COLORS2 = {
|
|
10449
10514
|
white: { border: "border-t-white", text: "text-white" },
|
|
10450
10515
|
blue: { border: "border-t-blue-400", text: "text-blue-400" },
|
|
@@ -10564,7 +10629,7 @@ function LayoutTabBar({ tabs, activeId, onSelect, onClose, onReorder, className
|
|
|
10564
10629
|
window.addEventListener("mousemove", onMove);
|
|
10565
10630
|
window.addEventListener("mouseup", onUp);
|
|
10566
10631
|
}, [onReorder]);
|
|
10567
|
-
return /* @__PURE__ */
|
|
10632
|
+
return /* @__PURE__ */ jsxs51("div", { className: cn("relative flex items-center min-h-12 flex-shrink-0 bg-neutral-900/80 border-b border-neutral-700/50", className), children: [
|
|
10568
10633
|
showLeft && /* @__PURE__ */ jsx57("div", { className: "flex items-center px-2 shrink-0", children: /* @__PURE__ */ jsx57("button", { type: "button", onClick: () => scroll("left"), className: "text-neutral-500 hover:text-neutral-400 transition-colors cursor-pointer", children: /* @__PURE__ */ jsx57(ChevronLeft4, { className: "w-3.5 h-3.5" }) }) }),
|
|
10569
10634
|
/* @__PURE__ */ jsx57("div", { ref: scrollRef, className: "flex items-end gap-1 px-3 overflow-x-auto flex-1 h-full", style: { scrollbarWidth: "none" }, children: tabs.map((tab, i) => {
|
|
10570
10635
|
const isActive = tab.id === activeId;
|
|
@@ -10576,9 +10641,9 @@ function LayoutTabBar({ tabs, activeId, onSelect, onClose, onReorder, className
|
|
|
10576
10641
|
const isDragged = drag?.from === i;
|
|
10577
10642
|
const insertHere = drag && drag.insertAt === i && drag.from !== i && drag.from !== i - 1;
|
|
10578
10643
|
const insertAfterLast = drag && drag.insertAt === tabs.length && i === tabs.length - 1 && drag.from !== i;
|
|
10579
|
-
return /* @__PURE__ */
|
|
10644
|
+
return /* @__PURE__ */ jsxs51("div", { className: "relative flex-shrink-0", children: [
|
|
10580
10645
|
insertHere && /* @__PURE__ */ jsx57("div", { className: "absolute -left-1 top-0 bottom-0 w-0.5 bg-blue-500 rounded-full z-10" }),
|
|
10581
|
-
/* @__PURE__ */
|
|
10646
|
+
/* @__PURE__ */ jsxs51(
|
|
10582
10647
|
"button",
|
|
10583
10648
|
{
|
|
10584
10649
|
type: "button",
|
|
@@ -10605,11 +10670,11 @@ function LayoutTabBar({ tabs, activeId, onSelect, onClose, onReorder, className
|
|
|
10605
10670
|
backgroundImage: getGradient(tab.color, isActive)
|
|
10606
10671
|
},
|
|
10607
10672
|
children: [
|
|
10608
|
-
/* @__PURE__ */
|
|
10673
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-1.5 w-full transition-[padding] duration-150 group-hover:pr-5", children: [
|
|
10609
10674
|
tab.icon && /* @__PURE__ */ jsx57("span", { className: cn("shrink-0 inline-flex", isActive ? iconC : "text-neutral-400"), style: { width: 14, height: 14 }, children: tab.icon }),
|
|
10610
10675
|
/* @__PURE__ */ jsx57("span", { className: cn("truncate text-sm font-medium", isActive ? titleC : "text-neutral-300"), children: tab.title })
|
|
10611
10676
|
] }),
|
|
10612
|
-
tab.subtitle && /* @__PURE__ */
|
|
10677
|
+
tab.subtitle && /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-1 w-full", children: [
|
|
10613
10678
|
tab.subtitleIcon && /* @__PURE__ */ jsx57("span", { className: cn("shrink-0 inline-flex", isActive ? subIconC : "text-neutral-500"), style: { width: 10, height: 10 }, children: tab.subtitleIcon }),
|
|
10614
10679
|
/* @__PURE__ */ jsx57("span", { className: cn("truncate text-xs", isActive ? subC : "text-neutral-500"), children: tab.subtitle })
|
|
10615
10680
|
] }),
|
|
@@ -10646,12 +10711,12 @@ function LayoutTabBar({ tabs, activeId, onSelect, onClose, onReorder, className
|
|
|
10646
10711
|
const ghostIconC = getTextClass(t.iconColor || t.titleColor || "white");
|
|
10647
10712
|
const ghostSubC = getTextClass(t.subtitleColor || t.selectedColor || t.color);
|
|
10648
10713
|
const ghostSubIconC = getTextClass(t.subtitleIconColor || t.subtitleColor || t.selectedColor || t.color);
|
|
10649
|
-
return /* @__PURE__ */ jsx57("div", { className: "fixed z-50 pointer-events-none opacity-90", style: { left: drag.x + 12, top: drag.y - 20 }, children: /* @__PURE__ */
|
|
10650
|
-
/* @__PURE__ */
|
|
10714
|
+
return /* @__PURE__ */ jsx57("div", { className: "fixed z-50 pointer-events-none opacity-90", style: { left: drag.x + 12, top: drag.y - 20 }, children: /* @__PURE__ */ jsxs51("div", { className: cn("flex flex-col gap-0.5 px-2.5 py-1.5 rounded-t-lg border-t-2 shadow-xl bg-neutral-800", ghostBorder), children: [
|
|
10715
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-1.5", children: [
|
|
10651
10716
|
t.icon && /* @__PURE__ */ jsx57("span", { className: cn("shrink-0 inline-flex", ghostIconC), style: { width: 14, height: 14 }, children: t.icon }),
|
|
10652
10717
|
/* @__PURE__ */ jsx57("span", { className: cn("text-sm font-medium", ghostTitleC), children: t.title })
|
|
10653
10718
|
] }),
|
|
10654
|
-
t.subtitle && /* @__PURE__ */
|
|
10719
|
+
t.subtitle && /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-1", children: [
|
|
10655
10720
|
t.subtitleIcon && /* @__PURE__ */ jsx57("span", { className: cn("shrink-0 inline-flex", ghostSubIconC), style: { width: 10, height: 10 }, children: t.subtitleIcon }),
|
|
10656
10721
|
/* @__PURE__ */ jsx57("span", { className: cn("text-xs", ghostSubC), children: t.subtitle })
|
|
10657
10722
|
] })
|
|
@@ -10688,7 +10753,7 @@ import {
|
|
|
10688
10753
|
Bot as Bot7,
|
|
10689
10754
|
Plug as Plug7
|
|
10690
10755
|
} from "lucide-react";
|
|
10691
|
-
import { jsx as jsx58, jsxs as
|
|
10756
|
+
import { jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
10692
10757
|
var iconSubset6 = {
|
|
10693
10758
|
settings: Settings10,
|
|
10694
10759
|
puzzle: Puzzle7,
|
|
@@ -10728,7 +10793,7 @@ function NavCard({
|
|
|
10728
10793
|
className
|
|
10729
10794
|
}) {
|
|
10730
10795
|
const Icon = icon ? iconSubset6[icon] : void 0;
|
|
10731
|
-
return /* @__PURE__ */
|
|
10796
|
+
return /* @__PURE__ */ jsxs52(
|
|
10732
10797
|
"button",
|
|
10733
10798
|
{
|
|
10734
10799
|
type: "button",
|
|
@@ -10759,7 +10824,7 @@ function NavCard({
|
|
|
10759
10824
|
|
|
10760
10825
|
// components/ui/extension-list-card.tsx
|
|
10761
10826
|
import { memo, useState as useState38, useRef as useRef26, useCallback as useCallback23, useEffect as useEffect22 } from "react";
|
|
10762
|
-
import { jsx as jsx59, jsxs as
|
|
10827
|
+
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
10763
10828
|
var ExtensionListCard = memo(function ExtensionListCard2({
|
|
10764
10829
|
icon: Icon,
|
|
10765
10830
|
iconColor,
|
|
@@ -10783,7 +10848,7 @@ var ExtensionListCard = memo(function ExtensionListCard2({
|
|
|
10783
10848
|
clearTimeout(hoverTimerRef.current);
|
|
10784
10849
|
setIsHovered(false);
|
|
10785
10850
|
}, []);
|
|
10786
|
-
return /* @__PURE__ */
|
|
10851
|
+
return /* @__PURE__ */ jsxs53(
|
|
10787
10852
|
"div",
|
|
10788
10853
|
{
|
|
10789
10854
|
className: cn(
|
|
@@ -10796,11 +10861,11 @@ var ExtensionListCard = memo(function ExtensionListCard2({
|
|
|
10796
10861
|
onMouseEnter: handleMouseEnter,
|
|
10797
10862
|
onMouseLeave: handleMouseLeave,
|
|
10798
10863
|
children: [
|
|
10799
|
-
/* @__PURE__ */
|
|
10800
|
-
/* @__PURE__ */
|
|
10864
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-start justify-between gap-2", children: [
|
|
10865
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-start gap-3 min-w-0 flex-1", children: [
|
|
10801
10866
|
/* @__PURE__ */ jsx59(Icon, { className: cn("w-5 h-5 shrink-0", iconColor) }),
|
|
10802
|
-
/* @__PURE__ */
|
|
10803
|
-
/* @__PURE__ */
|
|
10867
|
+
/* @__PURE__ */ jsxs53("div", { className: "min-w-0 flex-1", children: [
|
|
10868
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
10804
10869
|
/* @__PURE__ */ jsx59("span", { className: cn("text-sm font-medium", titleClassName), children: title }),
|
|
10805
10870
|
badges
|
|
10806
10871
|
] }),
|
|
@@ -10832,7 +10897,7 @@ import {
|
|
|
10832
10897
|
Bot as Bot8,
|
|
10833
10898
|
Plug as Plug8
|
|
10834
10899
|
} from "lucide-react";
|
|
10835
|
-
import { jsx as jsx60, jsxs as
|
|
10900
|
+
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10836
10901
|
var iconSubset7 = {
|
|
10837
10902
|
settings: Settings11,
|
|
10838
10903
|
shield: Shield10,
|
|
@@ -10872,14 +10937,14 @@ function StatusCard({
|
|
|
10872
10937
|
className
|
|
10873
10938
|
}) {
|
|
10874
10939
|
const Icon = icon ? iconSubset7[icon] : void 0;
|
|
10875
|
-
return /* @__PURE__ */
|
|
10876
|
-
/* @__PURE__ */
|
|
10940
|
+
return /* @__PURE__ */ jsxs54("div", { className: cn("rounded-lg border border-neutral-700 bg-neutral-800 overflow-hidden", className), children: [
|
|
10941
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2.5 px-4 py-3 border-b border-neutral-700", children: [
|
|
10877
10942
|
Icon && /* @__PURE__ */ jsx60(Icon, { className: "w-4 h-4 shrink-0", style: { color: iconColor } }),
|
|
10878
10943
|
/* @__PURE__ */ jsx60("h3", { className: "text-sm font-medium text-neutral-200", children: title })
|
|
10879
10944
|
] }),
|
|
10880
|
-
/* @__PURE__ */ jsx60("div", { className: "divide-y divide-
|
|
10945
|
+
/* @__PURE__ */ jsx60("div", { className: "divide-y divide-neutral-700/60", children: items.map((item) => /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between px-4 py-2.5", children: [
|
|
10881
10946
|
/* @__PURE__ */ jsx60("span", { className: "text-xs text-neutral-400", children: item.label }),
|
|
10882
|
-
/* @__PURE__ */
|
|
10947
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
10883
10948
|
/* @__PURE__ */ jsx60("span", { className: cn("text-xs font-medium", statusValueColor[item.status]), children: item.value }),
|
|
10884
10949
|
/* @__PURE__ */ jsx60("span", { className: cn("w-2 h-2 rounded-full shrink-0", statusDotColor[item.status]) })
|
|
10885
10950
|
] })
|
|
@@ -10898,7 +10963,7 @@ function StatusCard({
|
|
|
10898
10963
|
|
|
10899
10964
|
// components/ui/snapshot-card.tsx
|
|
10900
10965
|
import { RefreshCw as RefreshCw7, Eye as Eye10 } from "lucide-react";
|
|
10901
|
-
import { jsx as jsx61, jsxs as
|
|
10966
|
+
import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10902
10967
|
var statusStripeColor = {
|
|
10903
10968
|
synced: "bg-green-400",
|
|
10904
10969
|
pending: "bg-amber-400",
|
|
@@ -10921,10 +10986,10 @@ function SnapshotCard({
|
|
|
10921
10986
|
onView,
|
|
10922
10987
|
className
|
|
10923
10988
|
}) {
|
|
10924
|
-
return /* @__PURE__ */
|
|
10989
|
+
return /* @__PURE__ */ jsxs55("div", { className: cn("rounded-lg border border-neutral-700 bg-neutral-800 overflow-hidden", className), children: [
|
|
10925
10990
|
/* @__PURE__ */ jsx61("div", { className: cn("h-1", statusStripeColor[status]) }),
|
|
10926
|
-
/* @__PURE__ */
|
|
10927
|
-
/* @__PURE__ */
|
|
10991
|
+
/* @__PURE__ */ jsxs55("div", { className: "p-4", children: [
|
|
10992
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-start justify-between gap-2", children: [
|
|
10928
10993
|
/* @__PURE__ */ jsx61("h3", { className: "text-sm font-medium text-neutral-200 truncate", children: title }),
|
|
10929
10994
|
/* @__PURE__ */ jsx61(
|
|
10930
10995
|
Label,
|
|
@@ -10939,12 +11004,12 @@ function SnapshotCard({
|
|
|
10939
11004
|
] }),
|
|
10940
11005
|
timestamp && /* @__PURE__ */ jsx61("p", { className: "mt-1 text-[10px] text-neutral-500", children: timestamp }),
|
|
10941
11006
|
description && /* @__PURE__ */ jsx61("p", { className: "mt-2 text-xs text-neutral-500 leading-relaxed line-clamp-2", children: description }),
|
|
10942
|
-
stats && stats.length > 0 && /* @__PURE__ */ jsx61("div", { className: "mt-3 grid grid-cols-2 gap-x-4 gap-y-2", children: stats.map((stat) => /* @__PURE__ */
|
|
11007
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx61("div", { className: "mt-3 grid grid-cols-2 gap-x-4 gap-y-2", children: stats.map((stat) => /* @__PURE__ */ jsxs55("div", { children: [
|
|
10943
11008
|
/* @__PURE__ */ jsx61("p", { className: "text-[10px] text-neutral-500", children: stat.label }),
|
|
10944
11009
|
/* @__PURE__ */ jsx61("p", { className: "text-xs font-medium text-neutral-200", children: stat.value })
|
|
10945
11010
|
] }, stat.label)) }),
|
|
10946
|
-
(onSync || onView) && /* @__PURE__ */
|
|
10947
|
-
onSync && /* @__PURE__ */
|
|
11011
|
+
(onSync || onView) && /* @__PURE__ */ jsxs55("div", { className: "mt-3 pt-3 border-t border-neutral-700 flex items-center gap-2", children: [
|
|
11012
|
+
onSync && /* @__PURE__ */ jsxs55(
|
|
10948
11013
|
"button",
|
|
10949
11014
|
{
|
|
10950
11015
|
type: "button",
|
|
@@ -10956,7 +11021,7 @@ function SnapshotCard({
|
|
|
10956
11021
|
]
|
|
10957
11022
|
}
|
|
10958
11023
|
),
|
|
10959
|
-
onView && /* @__PURE__ */
|
|
11024
|
+
onView && /* @__PURE__ */ jsxs55(
|
|
10960
11025
|
"button",
|
|
10961
11026
|
{
|
|
10962
11027
|
type: "button",
|
|
@@ -11006,7 +11071,7 @@ import {
|
|
|
11006
11071
|
Wand2 as Wand26,
|
|
11007
11072
|
Copy as Copy3
|
|
11008
11073
|
} from "lucide-react";
|
|
11009
|
-
import { jsx as jsx62, jsxs as
|
|
11074
|
+
import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
11010
11075
|
var iconSubset8 = {
|
|
11011
11076
|
info: Info6,
|
|
11012
11077
|
settings: Settings12,
|
|
@@ -11041,13 +11106,13 @@ var iconSubset8 = {
|
|
|
11041
11106
|
};
|
|
11042
11107
|
function DetailSection({ title, icon, rows, className }) {
|
|
11043
11108
|
const Icon = icon ? iconSubset8[icon] : void 0;
|
|
11044
|
-
return /* @__PURE__ */
|
|
11045
|
-
/* @__PURE__ */
|
|
11109
|
+
return /* @__PURE__ */ jsxs56("div", { className, children: [
|
|
11110
|
+
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
11046
11111
|
Icon && /* @__PURE__ */ jsx62(Icon, { className: "w-4 h-4 text-neutral-500" }),
|
|
11047
11112
|
/* @__PURE__ */ jsx62("span", { className: "text-sm font-medium text-neutral-400", children: title })
|
|
11048
11113
|
] }),
|
|
11049
|
-
/* @__PURE__ */ jsx62("div", { className: "space-y-2", children: rows.map((row) => /* @__PURE__ */
|
|
11050
|
-
/* @__PURE__ */
|
|
11114
|
+
/* @__PURE__ */ jsx62("div", { className: "space-y-2", children: rows.map((row) => /* @__PURE__ */ jsxs56("div", { className: "flex items-start gap-3", children: [
|
|
11115
|
+
/* @__PURE__ */ jsxs56("span", { className: "text-xs text-neutral-500 w-24 shrink-0", children: [
|
|
11051
11116
|
row.label,
|
|
11052
11117
|
":"
|
|
11053
11118
|
] }),
|
|
@@ -11056,10 +11121,77 @@ function DetailSection({ title, icon, rows, className }) {
|
|
|
11056
11121
|
] });
|
|
11057
11122
|
}
|
|
11058
11123
|
|
|
11124
|
+
// components/ui/cookie-consent.tsx
|
|
11125
|
+
import { useState as useState39, useEffect as useEffect23 } from "react";
|
|
11126
|
+
import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
11127
|
+
function CookieConsent({
|
|
11128
|
+
storageKey,
|
|
11129
|
+
accentColor = "cyan",
|
|
11130
|
+
heading = "We value your privacy",
|
|
11131
|
+
description = "This site uses only essential cookies for functionality. No tracking or analytics.",
|
|
11132
|
+
onConsent
|
|
11133
|
+
}) {
|
|
11134
|
+
const [isVisible, setIsVisible] = useState39(false);
|
|
11135
|
+
useEffect23(() => {
|
|
11136
|
+
const consent = localStorage.getItem(storageKey);
|
|
11137
|
+
if (!consent) setIsVisible(true);
|
|
11138
|
+
}, [storageKey]);
|
|
11139
|
+
const handleConsent = (choice) => {
|
|
11140
|
+
localStorage.setItem(storageKey, choice);
|
|
11141
|
+
setIsVisible(false);
|
|
11142
|
+
onConsent?.(choice);
|
|
11143
|
+
};
|
|
11144
|
+
if (!isVisible) return null;
|
|
11145
|
+
return /* @__PURE__ */ jsx63("div", { className: "fixed bottom-0 left-0 right-0 z-50 p-4 bg-neutral-900/95 backdrop-blur-sm border-t border-neutral-700/50", children: /* @__PURE__ */ jsxs57("div", { className: "max-w-6xl mx-auto flex flex-col sm:flex-row items-start sm:items-center gap-4", children: [
|
|
11146
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex-grow", children: [
|
|
11147
|
+
/* @__PURE__ */ jsx63("p", { className: "text-sm text-neutral-200 mb-1", children: heading }),
|
|
11148
|
+
/* @__PURE__ */ jsx63("p", { className: "text-xs text-neutral-400", children: description })
|
|
11149
|
+
] }),
|
|
11150
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
11151
|
+
/* @__PURE__ */ jsx63(
|
|
11152
|
+
"button",
|
|
11153
|
+
{
|
|
11154
|
+
onClick: () => handleConsent("declined"),
|
|
11155
|
+
className: "px-3 py-1.5 text-sm h-[26px] inline-flex items-center justify-center font-medium rounded-md cursor-pointer text-neutral-400 border border-transparent hover:text-neutral-200 hover:border-neutral-600 hover:bg-neutral-800 transition-colors",
|
|
11156
|
+
children: "Decline"
|
|
11157
|
+
}
|
|
11158
|
+
),
|
|
11159
|
+
/* @__PURE__ */ jsx63(
|
|
11160
|
+
"button",
|
|
11161
|
+
{
|
|
11162
|
+
onClick: () => handleConsent("essential"),
|
|
11163
|
+
className: "px-3 py-1.5 text-sm h-[26px] inline-flex items-center justify-center font-medium rounded-md cursor-pointer text-neutral-400 border border-transparent hover:text-neutral-200 hover:border-neutral-600 hover:bg-neutral-800 transition-colors",
|
|
11164
|
+
children: "Essential Only"
|
|
11165
|
+
}
|
|
11166
|
+
),
|
|
11167
|
+
/* @__PURE__ */ jsx63(
|
|
11168
|
+
"button",
|
|
11169
|
+
{
|
|
11170
|
+
onClick: () => handleConsent("accepted"),
|
|
11171
|
+
className: `px-3 py-1.5 text-sm h-[26px] inline-flex items-center justify-center font-medium rounded-md cursor-pointer text-white border transition-colors bg-${accentColor}-600 border-${accentColor}-500 hover:bg-${accentColor}-500`,
|
|
11172
|
+
children: "Accept All"
|
|
11173
|
+
}
|
|
11174
|
+
)
|
|
11175
|
+
] }),
|
|
11176
|
+
/* @__PURE__ */ jsx63(
|
|
11177
|
+
IconButton,
|
|
11178
|
+
{
|
|
11179
|
+
icon: "x",
|
|
11180
|
+
color: "neutral",
|
|
11181
|
+
size: "xs",
|
|
11182
|
+
tooltip: { description: "Dismiss" },
|
|
11183
|
+
tooltipPosition: "top",
|
|
11184
|
+
onClick: () => handleConsent("declined"),
|
|
11185
|
+
className: "absolute top-2 right-2 sm:relative sm:top-auto sm:right-auto"
|
|
11186
|
+
}
|
|
11187
|
+
)
|
|
11188
|
+
] }) });
|
|
11189
|
+
}
|
|
11190
|
+
|
|
11059
11191
|
// components/hooks/use-navigation-history.ts
|
|
11060
|
-
import { useState as
|
|
11192
|
+
import { useState as useState40, useCallback as useCallback24 } from "react";
|
|
11061
11193
|
function useNavigationHistory(initial, maxEntries = 50) {
|
|
11062
|
-
const [state, setState] =
|
|
11194
|
+
const [state, setState] = useState40({
|
|
11063
11195
|
backStack: [],
|
|
11064
11196
|
current: initial ?? null,
|
|
11065
11197
|
forwardStack: []
|
|
@@ -11116,6 +11248,357 @@ function useNavigationHistory(initial, maxEntries = 50) {
|
|
|
11116
11248
|
history: [...state.backStack, ...state.current ? [state.current] : []]
|
|
11117
11249
|
};
|
|
11118
11250
|
}
|
|
11251
|
+
|
|
11252
|
+
// components/settings/SettingsTreeNav.tsx
|
|
11253
|
+
import { useState as useState41, useEffect as useEffect24, useMemo as useMemo12 } from "react";
|
|
11254
|
+
import { ChevronRight as ChevronRight13, ChevronDown as ChevronDown12, ChevronsUpDown as ChevronsUpDown5, ChevronsDownUp as ChevronsDownUp5 } from "lucide-react";
|
|
11255
|
+
|
|
11256
|
+
// components/settings/settings-tree-utils.ts
|
|
11257
|
+
function findNodeByPath(tree, path) {
|
|
11258
|
+
const parts = path.split(".");
|
|
11259
|
+
let current;
|
|
11260
|
+
for (const part of parts) {
|
|
11261
|
+
const found = (current?.children ?? tree).find((n) => n.id === part);
|
|
11262
|
+
if (!found) return null;
|
|
11263
|
+
current = found;
|
|
11264
|
+
}
|
|
11265
|
+
return current ?? null;
|
|
11266
|
+
}
|
|
11267
|
+
function getBreadcrumbFromPath(tree, path) {
|
|
11268
|
+
const parts = path.split(".");
|
|
11269
|
+
const breadcrumb = [];
|
|
11270
|
+
let currentPath = "";
|
|
11271
|
+
let currentNodes = tree;
|
|
11272
|
+
for (const part of parts) {
|
|
11273
|
+
const node = currentNodes.find((n) => n.id === part);
|
|
11274
|
+
if (!node) break;
|
|
11275
|
+
currentPath = currentPath ? `${currentPath}.${part}` : part;
|
|
11276
|
+
breadcrumb.push({
|
|
11277
|
+
label: node.label,
|
|
11278
|
+
icon: node.icon,
|
|
11279
|
+
path: currentPath
|
|
11280
|
+
});
|
|
11281
|
+
currentNodes = node.children ?? [];
|
|
11282
|
+
}
|
|
11283
|
+
return breadcrumb;
|
|
11284
|
+
}
|
|
11285
|
+
function isLeafNode(node) {
|
|
11286
|
+
return !node.children || node.children.length === 0;
|
|
11287
|
+
}
|
|
11288
|
+
function getAllLeafPaths(tree, parentPath = "") {
|
|
11289
|
+
const paths = [];
|
|
11290
|
+
for (const node of tree) {
|
|
11291
|
+
const nodePath = parentPath ? `${parentPath}.${node.id}` : node.id;
|
|
11292
|
+
if (isLeafNode(node)) {
|
|
11293
|
+
paths.push(nodePath);
|
|
11294
|
+
} else if (node.children) {
|
|
11295
|
+
paths.push(...getAllLeafPaths(node.children, nodePath));
|
|
11296
|
+
}
|
|
11297
|
+
}
|
|
11298
|
+
return paths;
|
|
11299
|
+
}
|
|
11300
|
+
function collectExpandablePaths2(nodes, parentPath = "") {
|
|
11301
|
+
const paths = [];
|
|
11302
|
+
for (const node of nodes) {
|
|
11303
|
+
const nodePath = parentPath ? `${parentPath}.${node.id}` : node.id;
|
|
11304
|
+
if (!isLeafNode(node) && node.children) {
|
|
11305
|
+
paths.push(nodePath);
|
|
11306
|
+
paths.push(...collectExpandablePaths2(node.children, nodePath));
|
|
11307
|
+
}
|
|
11308
|
+
}
|
|
11309
|
+
return paths;
|
|
11310
|
+
}
|
|
11311
|
+
function getParentPaths(path) {
|
|
11312
|
+
const parts = path.split(".");
|
|
11313
|
+
const parents = [];
|
|
11314
|
+
let current = "";
|
|
11315
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
11316
|
+
current = current ? `${current}.${parts[i]}` : parts[i];
|
|
11317
|
+
parents.push(current);
|
|
11318
|
+
}
|
|
11319
|
+
return parents;
|
|
11320
|
+
}
|
|
11321
|
+
function filterTree2(nodes, query, parentPath = "") {
|
|
11322
|
+
if (!query.trim()) return nodes;
|
|
11323
|
+
const lowerQuery = query.toLowerCase();
|
|
11324
|
+
return nodes.map((node) => {
|
|
11325
|
+
const nodePath = parentPath ? `${parentPath}.${node.id}` : node.id;
|
|
11326
|
+
const labelMatches = node.label.toLowerCase().includes(lowerQuery);
|
|
11327
|
+
if (isLeafNode(node)) {
|
|
11328
|
+
return labelMatches ? node : null;
|
|
11329
|
+
}
|
|
11330
|
+
const filteredChildren = filterTree2(node.children || [], query, nodePath);
|
|
11331
|
+
if (labelMatches) {
|
|
11332
|
+
return node;
|
|
11333
|
+
} else if (filteredChildren.length > 0) {
|
|
11334
|
+
return { ...node, children: filteredChildren };
|
|
11335
|
+
}
|
|
11336
|
+
return null;
|
|
11337
|
+
}).filter((n) => n !== null);
|
|
11338
|
+
}
|
|
11339
|
+
|
|
11340
|
+
// components/settings/SettingsTreeNav.tsx
|
|
11341
|
+
import { Fragment as Fragment13, jsx as jsx64, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
11342
|
+
function highlightMatch2(text, query) {
|
|
11343
|
+
if (!query) return text;
|
|
11344
|
+
const lowerText = text.toLowerCase();
|
|
11345
|
+
const lowerQuery = query.toLowerCase();
|
|
11346
|
+
const index = lowerText.indexOf(lowerQuery);
|
|
11347
|
+
if (index === -1) return text;
|
|
11348
|
+
return /* @__PURE__ */ jsxs58(Fragment13, { children: [
|
|
11349
|
+
text.slice(0, index),
|
|
11350
|
+
/* @__PURE__ */ jsx64("span", { className: "bg-yellow-500/30 text-yellow-200", children: text.slice(index, index + query.length) }),
|
|
11351
|
+
text.slice(index + query.length)
|
|
11352
|
+
] });
|
|
11353
|
+
}
|
|
11354
|
+
function TreeNode({
|
|
11355
|
+
node,
|
|
11356
|
+
path,
|
|
11357
|
+
selectedPath,
|
|
11358
|
+
onSelectPath,
|
|
11359
|
+
expandedPaths,
|
|
11360
|
+
onToggleExpand,
|
|
11361
|
+
depth,
|
|
11362
|
+
searchQuery
|
|
11363
|
+
}) {
|
|
11364
|
+
const isLeaf = isLeafNode(node);
|
|
11365
|
+
const isExpanded = expandedPaths.has(path);
|
|
11366
|
+
const isSelected = selectedPath === path;
|
|
11367
|
+
const isInSelectedPath = selectedPath.startsWith(path + ".");
|
|
11368
|
+
const handleClick = () => {
|
|
11369
|
+
if (isLeaf) {
|
|
11370
|
+
onSelectPath(path);
|
|
11371
|
+
} else {
|
|
11372
|
+
onToggleExpand(path);
|
|
11373
|
+
}
|
|
11374
|
+
};
|
|
11375
|
+
return /* @__PURE__ */ jsxs58("div", { children: [
|
|
11376
|
+
/* @__PURE__ */ jsxs58(
|
|
11377
|
+
"button",
|
|
11378
|
+
{
|
|
11379
|
+
onClick: handleClick,
|
|
11380
|
+
className: `
|
|
11381
|
+
w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded-md transition-colors cursor-pointer
|
|
11382
|
+
${isSelected ? "bg-blue-500/20 text-blue-400" : isInSelectedPath ? "text-neutral-300" : "text-neutral-400"}
|
|
11383
|
+
${!isSelected && "hover:bg-neutral-800 hover:text-neutral-200"}
|
|
11384
|
+
`,
|
|
11385
|
+
style: { paddingLeft: `${depth * 12 + 8}px` },
|
|
11386
|
+
children: [
|
|
11387
|
+
!isLeaf && /* @__PURE__ */ jsx64("span", { className: "w-4 h-4 flex items-center justify-center flex-shrink-0", children: isExpanded ? /* @__PURE__ */ jsx64(ChevronDown12, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx64(ChevronRight13, { className: "w-3.5 h-3.5" }) }),
|
|
11388
|
+
isLeaf && /* @__PURE__ */ jsx64("span", { className: "w-4 h-4 flex-shrink-0" }),
|
|
11389
|
+
/* @__PURE__ */ jsx64("span", { className: "flex-shrink-0", children: node.icon }),
|
|
11390
|
+
/* @__PURE__ */ jsx64("span", { className: "truncate", children: searchQuery ? highlightMatch2(node.label, searchQuery) : node.label })
|
|
11391
|
+
]
|
|
11392
|
+
}
|
|
11393
|
+
),
|
|
11394
|
+
!isLeaf && isExpanded && node.children && /* @__PURE__ */ jsx64("div", { children: node.children.map((child) => /* @__PURE__ */ jsx64(
|
|
11395
|
+
TreeNode,
|
|
11396
|
+
{
|
|
11397
|
+
node: child,
|
|
11398
|
+
path: `${path}.${child.id}`,
|
|
11399
|
+
selectedPath,
|
|
11400
|
+
onSelectPath,
|
|
11401
|
+
expandedPaths,
|
|
11402
|
+
onToggleExpand,
|
|
11403
|
+
depth: depth + 1,
|
|
11404
|
+
searchQuery
|
|
11405
|
+
},
|
|
11406
|
+
child.id
|
|
11407
|
+
)) })
|
|
11408
|
+
] });
|
|
11409
|
+
}
|
|
11410
|
+
function SettingsTreeNav({ tree, selectedPath, onSelectPath }) {
|
|
11411
|
+
const [expandedPaths, setExpandedPaths] = useState41(() => {
|
|
11412
|
+
const expanded = /* @__PURE__ */ new Set();
|
|
11413
|
+
if (selectedPath) {
|
|
11414
|
+
for (const p of getParentPaths(selectedPath)) {
|
|
11415
|
+
expanded.add(p);
|
|
11416
|
+
}
|
|
11417
|
+
}
|
|
11418
|
+
return expanded;
|
|
11419
|
+
});
|
|
11420
|
+
const [searchQuery, setSearchQuery] = useState41("");
|
|
11421
|
+
const allExpandablePaths = useMemo12(() => collectExpandablePaths2(tree), [tree]);
|
|
11422
|
+
const filteredTree = useMemo12(
|
|
11423
|
+
() => filterTree2(tree, searchQuery),
|
|
11424
|
+
[tree, searchQuery]
|
|
11425
|
+
);
|
|
11426
|
+
const collapsedCount = allExpandablePaths.filter((p) => !expandedPaths.has(p)).length;
|
|
11427
|
+
const allCollapsed = collapsedCount === allExpandablePaths.length && allExpandablePaths.length > 0;
|
|
11428
|
+
const allExpanded = collapsedCount === 0;
|
|
11429
|
+
useEffect24(() => {
|
|
11430
|
+
if (selectedPath) {
|
|
11431
|
+
const parents = getParentPaths(selectedPath);
|
|
11432
|
+
const newExpanded = new Set(expandedPaths);
|
|
11433
|
+
let changed = false;
|
|
11434
|
+
for (const p of parents) {
|
|
11435
|
+
if (!newExpanded.has(p)) {
|
|
11436
|
+
newExpanded.add(p);
|
|
11437
|
+
changed = true;
|
|
11438
|
+
}
|
|
11439
|
+
}
|
|
11440
|
+
if (changed) {
|
|
11441
|
+
setExpandedPaths(newExpanded);
|
|
11442
|
+
}
|
|
11443
|
+
}
|
|
11444
|
+
}, [selectedPath]);
|
|
11445
|
+
useEffect24(() => {
|
|
11446
|
+
if (searchQuery.trim()) {
|
|
11447
|
+
setExpandedPaths(new Set(allExpandablePaths));
|
|
11448
|
+
}
|
|
11449
|
+
}, [searchQuery, allExpandablePaths]);
|
|
11450
|
+
const handleToggleExpand = (path) => {
|
|
11451
|
+
setExpandedPaths((prev) => {
|
|
11452
|
+
const next = new Set(prev);
|
|
11453
|
+
if (next.has(path)) {
|
|
11454
|
+
next.delete(path);
|
|
11455
|
+
} else {
|
|
11456
|
+
next.add(path);
|
|
11457
|
+
}
|
|
11458
|
+
return next;
|
|
11459
|
+
});
|
|
11460
|
+
};
|
|
11461
|
+
const handleExpandAll = () => {
|
|
11462
|
+
setExpandedPaths(new Set(allExpandablePaths));
|
|
11463
|
+
};
|
|
11464
|
+
const handleCollapseAll = () => {
|
|
11465
|
+
const parentPaths = getParentPaths(selectedPath);
|
|
11466
|
+
setExpandedPaths(new Set(parentPaths));
|
|
11467
|
+
};
|
|
11468
|
+
return /* @__PURE__ */ jsxs58("nav", { className: "w-56 flex-shrink-0 bg-neutral-900 border-r border-neutral-800 flex flex-col overflow-hidden", children: [
|
|
11469
|
+
/* @__PURE__ */ jsx64("div", { className: "p-2 border-b border-neutral-800", children: /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-1", children: [
|
|
11470
|
+
/* @__PURE__ */ jsx64(
|
|
11471
|
+
Input,
|
|
11472
|
+
{
|
|
11473
|
+
type: "search",
|
|
11474
|
+
placeholder: "Search...",
|
|
11475
|
+
value: searchQuery,
|
|
11476
|
+
onChange: setSearchQuery,
|
|
11477
|
+
size: "sm",
|
|
11478
|
+
variant: "filled"
|
|
11479
|
+
}
|
|
11480
|
+
),
|
|
11481
|
+
!allExpanded && allExpandablePaths.length > 0 && /* @__PURE__ */ jsx64(
|
|
11482
|
+
IconButton,
|
|
11483
|
+
{
|
|
11484
|
+
icon: /* @__PURE__ */ jsx64(ChevronsUpDown5, { className: "w-3.5 h-3.5" }),
|
|
11485
|
+
onClick: handleExpandAll,
|
|
11486
|
+
size: "sm",
|
|
11487
|
+
color: "neutral",
|
|
11488
|
+
tooltipPosition: "left",
|
|
11489
|
+
tooltip: {
|
|
11490
|
+
title: "Expand All",
|
|
11491
|
+
description: "Expand all sections"
|
|
11492
|
+
}
|
|
11493
|
+
}
|
|
11494
|
+
),
|
|
11495
|
+
!allCollapsed && allExpandablePaths.length > 0 && /* @__PURE__ */ jsx64(
|
|
11496
|
+
IconButton,
|
|
11497
|
+
{
|
|
11498
|
+
icon: /* @__PURE__ */ jsx64(ChevronsDownUp5, { className: "w-3.5 h-3.5" }),
|
|
11499
|
+
onClick: handleCollapseAll,
|
|
11500
|
+
size: "sm",
|
|
11501
|
+
color: "neutral",
|
|
11502
|
+
tooltipPosition: "left",
|
|
11503
|
+
tooltip: {
|
|
11504
|
+
title: "Collapse All",
|
|
11505
|
+
description: "Collapse all sections"
|
|
11506
|
+
}
|
|
11507
|
+
}
|
|
11508
|
+
)
|
|
11509
|
+
] }) }),
|
|
11510
|
+
/* @__PURE__ */ jsx64("div", { className: "flex-1 overflow-y-auto py-2", children: filteredTree.length === 0 && searchQuery ? /* @__PURE__ */ jsxs58("p", { className: "text-xs text-neutral-500 text-center py-4 px-2", children: [
|
|
11511
|
+
'No settings match "',
|
|
11512
|
+
searchQuery,
|
|
11513
|
+
'"'
|
|
11514
|
+
] }) : filteredTree.map((node) => /* @__PURE__ */ jsx64(
|
|
11515
|
+
TreeNode,
|
|
11516
|
+
{
|
|
11517
|
+
node,
|
|
11518
|
+
path: node.id,
|
|
11519
|
+
selectedPath,
|
|
11520
|
+
onSelectPath,
|
|
11521
|
+
expandedPaths,
|
|
11522
|
+
onToggleExpand: handleToggleExpand,
|
|
11523
|
+
depth: 0,
|
|
11524
|
+
searchQuery
|
|
11525
|
+
},
|
|
11526
|
+
node.id
|
|
11527
|
+
)) })
|
|
11528
|
+
] });
|
|
11529
|
+
}
|
|
11530
|
+
|
|
11531
|
+
// components/settings/SettingsPanel.tsx
|
|
11532
|
+
import { jsx as jsx65, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
11533
|
+
function SettingsPanel({ tree, selectedPath, onSelectPath, children }) {
|
|
11534
|
+
return /* @__PURE__ */ jsxs59("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
11535
|
+
/* @__PURE__ */ jsx65(SettingsTreeNav, { tree, selectedPath, onSelectPath }),
|
|
11536
|
+
/* @__PURE__ */ jsx65("div", { className: "flex-1 overflow-y-auto", children })
|
|
11537
|
+
] });
|
|
11538
|
+
}
|
|
11539
|
+
|
|
11540
|
+
// components/settings/SettingsHeader.tsx
|
|
11541
|
+
import "react";
|
|
11542
|
+
import { RotateCcw as RotateCcw7, Info as Info7 } from "lucide-react";
|
|
11543
|
+
import { jsx as jsx66, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
11544
|
+
var variantStyles = {
|
|
11545
|
+
default: {
|
|
11546
|
+
border: "border-l-blue-500/60",
|
|
11547
|
+
iconBg: "bg-blue-500/10",
|
|
11548
|
+
iconColor: "text-blue-400"
|
|
11549
|
+
},
|
|
11550
|
+
info: {
|
|
11551
|
+
border: "border-l-cyan-500/60",
|
|
11552
|
+
iconBg: "bg-cyan-500/10",
|
|
11553
|
+
iconColor: "text-cyan-400"
|
|
11554
|
+
},
|
|
11555
|
+
warning: {
|
|
11556
|
+
border: "border-l-orange-500/60",
|
|
11557
|
+
iconBg: "bg-orange-500/10",
|
|
11558
|
+
iconColor: "text-orange-400"
|
|
11559
|
+
},
|
|
11560
|
+
danger: {
|
|
11561
|
+
border: "border-l-red-500/60",
|
|
11562
|
+
iconBg: "bg-red-500/10",
|
|
11563
|
+
iconColor: "text-red-400"
|
|
11564
|
+
}
|
|
11565
|
+
};
|
|
11566
|
+
function SettingsHeader({
|
|
11567
|
+
description,
|
|
11568
|
+
icon,
|
|
11569
|
+
onReset,
|
|
11570
|
+
resetTooltip,
|
|
11571
|
+
action,
|
|
11572
|
+
variant = "default"
|
|
11573
|
+
}) {
|
|
11574
|
+
const styles = variantStyles[variant];
|
|
11575
|
+
return /* @__PURE__ */ jsxs60(
|
|
11576
|
+
"div",
|
|
11577
|
+
{
|
|
11578
|
+
className: `bg-neutral-950 border border-neutral-700 border-l-2 ${styles.border} rounded-lg p-4 flex items-center gap-4`,
|
|
11579
|
+
children: [
|
|
11580
|
+
/* @__PURE__ */ jsx66("div", { className: `flex-shrink-0 w-8 h-8 rounded-lg ${styles.iconBg} flex items-center justify-center`, children: icon ?? /* @__PURE__ */ jsx66(Info7, { className: `w-4 h-4 ${styles.iconColor}` }) }),
|
|
11581
|
+
/* @__PURE__ */ jsx66("p", { className: "flex-1 text-sm text-neutral-400 leading-relaxed", children: description }),
|
|
11582
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex-shrink-0 flex items-center gap-2", children: [
|
|
11583
|
+
action,
|
|
11584
|
+
onReset && /* @__PURE__ */ jsx66(
|
|
11585
|
+
IconButton,
|
|
11586
|
+
{
|
|
11587
|
+
icon: /* @__PURE__ */ jsx66(RotateCcw7, { className: "w-4 h-4" }),
|
|
11588
|
+
onClick: onReset,
|
|
11589
|
+
size: "sm",
|
|
11590
|
+
color: "orange",
|
|
11591
|
+
tooltip: resetTooltip ?? {
|
|
11592
|
+
title: "Reset to Defaults",
|
|
11593
|
+
description: "Restore all settings to their default values"
|
|
11594
|
+
}
|
|
11595
|
+
}
|
|
11596
|
+
)
|
|
11597
|
+
] })
|
|
11598
|
+
]
|
|
11599
|
+
}
|
|
11600
|
+
);
|
|
11601
|
+
}
|
|
11119
11602
|
export {
|
|
11120
11603
|
ACCENT_DEFS,
|
|
11121
11604
|
AI_TOOL_LOGOS,
|
|
@@ -11135,7 +11618,10 @@ export {
|
|
|
11135
11618
|
CollapsibleSection,
|
|
11136
11619
|
ConfirmBadge,
|
|
11137
11620
|
ConfirmModal,
|
|
11621
|
+
CookieConsent,
|
|
11138
11622
|
DARK_THEMES,
|
|
11623
|
+
DEFAULT_DIMS,
|
|
11624
|
+
DEFAULT_OUTLINE,
|
|
11139
11625
|
DetailSection,
|
|
11140
11626
|
DetailViewWrapper,
|
|
11141
11627
|
EditorPlaceholderCard,
|
|
@@ -11167,12 +11653,16 @@ export {
|
|
|
11167
11653
|
ResizableTextarea,
|
|
11168
11654
|
SCALE_KEYS,
|
|
11169
11655
|
SNIPPET_NAME_REGEX,
|
|
11656
|
+
SURFACE_KEYS,
|
|
11170
11657
|
ScopeBadge,
|
|
11171
11658
|
ScreenshotUploader,
|
|
11172
11659
|
SegmentedToggle,
|
|
11173
11660
|
Select,
|
|
11174
11661
|
SelectionGrid,
|
|
11175
11662
|
SettingRow,
|
|
11663
|
+
SettingsHeader,
|
|
11664
|
+
SettingsPanel,
|
|
11665
|
+
SettingsTreeNav,
|
|
11176
11666
|
SimulatorPromptEditor,
|
|
11177
11667
|
SnapshotBrowserPanel,
|
|
11178
11668
|
SnapshotCard,
|
|
@@ -11195,15 +11685,22 @@ export {
|
|
|
11195
11685
|
applyTheme,
|
|
11196
11686
|
cn,
|
|
11197
11687
|
collectDirPaths,
|
|
11688
|
+
collectExpandablePaths2 as collectExpandablePaths,
|
|
11198
11689
|
createErrorLogger,
|
|
11690
|
+
filterTree2 as filterTree,
|
|
11691
|
+
findNodeByPath,
|
|
11199
11692
|
formatBytes,
|
|
11200
11693
|
formatCategory,
|
|
11201
11694
|
formatDate,
|
|
11202
11695
|
generateScale,
|
|
11696
|
+
getAllLeafPaths,
|
|
11697
|
+
getBreadcrumbFromPath,
|
|
11203
11698
|
getLanguage,
|
|
11204
11699
|
getLanguageFromPath,
|
|
11700
|
+
getParentPaths,
|
|
11205
11701
|
hslToHex,
|
|
11206
11702
|
iconMap,
|
|
11703
|
+
isLeafNode,
|
|
11207
11704
|
isLightTheme,
|
|
11208
11705
|
satCurve,
|
|
11209
11706
|
submitIssueReport,
|