@shuffleio/shuffle-mcps 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +555 -51
- package/dist/index.mjs +685 -183
- package/dist/{shuffle-mcp-LXISGW4I.css → shuffle-mcp-ML4YQTUP.css} +0 -132
- package/package.json +1 -1
- package/dist/shuffle-core-LIQTRTFD.css +0 -169
package/dist/index.js
CHANGED
|
@@ -1134,7 +1134,7 @@ __export(index_exports, {
|
|
|
1134
1134
|
AgentActivityList: () => AgentActivityList2,
|
|
1135
1135
|
AgentExecutionDrawer: () => AgentExecutionDrawer2,
|
|
1136
1136
|
AgentIcon: () => AgentIcon_default,
|
|
1137
|
-
AgentPresets: () =>
|
|
1137
|
+
AgentPresets: () => AgentPresets2,
|
|
1138
1138
|
AgentPromptPrefixChip: () => AgentPromptPrefixChip,
|
|
1139
1139
|
AgentRunDiagnosisBanner: () => AgentRunDiagnosisBanner2,
|
|
1140
1140
|
AgentRunDrawer: () => AgentRunDrawer2,
|
|
@@ -1183,10 +1183,12 @@ __export(index_exports, {
|
|
|
1183
1183
|
buildSupportEscalationUrl: () => buildSupportEscalationUrl,
|
|
1184
1184
|
clearPageContextChoice: () => clearPageContextChoice,
|
|
1185
1185
|
copyToClipboard: () => copyToClipboard,
|
|
1186
|
+
darkTokenStyle: () => darkTokenStyle,
|
|
1186
1187
|
default: () => index_default,
|
|
1187
1188
|
deleteDatastoreItem: () => deleteDatastoreItem,
|
|
1188
1189
|
deleteDatastoreItems: () => deleteDatastoreItems,
|
|
1189
1190
|
diagnoseOutputWarning: () => diagnoseOutputWarning,
|
|
1191
|
+
ensureShuffleMcpStyles: () => ensureShuffleMcpStyles,
|
|
1190
1192
|
extractActionAppNames: () => extractActionAppNames,
|
|
1191
1193
|
extractValidatedIngestionApps: () => extractValidatedIngestionApps,
|
|
1192
1194
|
extractWorkflowActionAppNames: () => extractWorkflowActionAppNames,
|
|
@@ -1228,6 +1230,7 @@ __export(index_exports, {
|
|
|
1228
1230
|
isThreatIntelApp: () => isThreatIntelApp,
|
|
1229
1231
|
isVulnScannerApp: () => isVulnScannerApp,
|
|
1230
1232
|
isWorkflowScheduleStopped: () => isWorkflowScheduleStopped,
|
|
1233
|
+
lightTokenStyle: () => lightTokenStyle,
|
|
1231
1234
|
mapCloudRegionUrl: () => mapCloudRegionUrl,
|
|
1232
1235
|
matchRoutePattern: () => matchRoutePattern,
|
|
1233
1236
|
mergeConnectedTools: () => mergeConnectedTools,
|
|
@@ -1269,7 +1272,6 @@ __export(index_exports, {
|
|
|
1269
1272
|
uuid: () => uuid
|
|
1270
1273
|
});
|
|
1271
1274
|
module.exports = __toCommonJS(index_exports);
|
|
1272
|
-
var import_shuffle_mcp2 = require("./shuffle-mcp-LXISGW4I.css");
|
|
1273
1275
|
|
|
1274
1276
|
// ../lib/crypto-polyfill.ts
|
|
1275
1277
|
var getGlobalCrypto = () => {
|
|
@@ -1601,8 +1603,213 @@ var import_react_query = require("@tanstack/react-query");
|
|
|
1601
1603
|
// ShuffleMcpThemeProvider.tsx
|
|
1602
1604
|
var import_react = __toESM(require("react"));
|
|
1603
1605
|
var import_material = require("@mui/material");
|
|
1604
|
-
var import_shuffle_mcp = require("./shuffle-mcp-
|
|
1606
|
+
var import_shuffle_mcp = require("./shuffle-mcp-ML4YQTUP.css");
|
|
1605
1607
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1608
|
+
var lightTokenStyle = {
|
|
1609
|
+
"--background": "0 0% 98%",
|
|
1610
|
+
"--background-elevated": "0 0% 100%",
|
|
1611
|
+
"--background-surface": "0 0% 96%",
|
|
1612
|
+
"--foreground": "0 0% 9%",
|
|
1613
|
+
"--foreground-muted": "0 0% 40%",
|
|
1614
|
+
"--card": "0 0% 100%",
|
|
1615
|
+
"--card-foreground": "0 0% 9%",
|
|
1616
|
+
"--popover": "0 0% 100%",
|
|
1617
|
+
"--popover-foreground": "0 0% 9%",
|
|
1618
|
+
"--primary": "22 100% 50%",
|
|
1619
|
+
"--primary-foreground": "0 0% 100%",
|
|
1620
|
+
"--secondary": "0 0% 94%",
|
|
1621
|
+
"--secondary-foreground": "0 0% 9%",
|
|
1622
|
+
"--muted": "0 0% 94%",
|
|
1623
|
+
"--muted-foreground": "0 0% 45%",
|
|
1624
|
+
"--accent": "0 0% 92%",
|
|
1625
|
+
"--accent-foreground": "0 0% 9%",
|
|
1626
|
+
"--destructive": "0 84% 60%",
|
|
1627
|
+
"--destructive-foreground": "0 0% 100%",
|
|
1628
|
+
"--border": "0 0% 80%",
|
|
1629
|
+
"--border-subtle": "0 0% 86%",
|
|
1630
|
+
"--input": "0 0% 94%",
|
|
1631
|
+
"--ring": "22 100% 50%",
|
|
1632
|
+
"--severity-critical": "0 84% 60%",
|
|
1633
|
+
"--severity-high": "12 92% 52%",
|
|
1634
|
+
"--severity-medium": "45 93% 47%",
|
|
1635
|
+
"--severity-low": "142 71% 45%",
|
|
1636
|
+
"--severity-info": "210 100% 56%",
|
|
1637
|
+
"--sidebar-background": "0 0% 97%",
|
|
1638
|
+
"--sidebar-foreground": "0 0% 9%",
|
|
1639
|
+
"--sidebar-accent": "0 0% 94%",
|
|
1640
|
+
"--sidebar-accent-foreground": "0 0% 9%",
|
|
1641
|
+
"--sidebar-border": "0 0% 80%",
|
|
1642
|
+
"--gradient-card": "linear-gradient(145deg, hsl(0 0% 100%) 0%, hsl(0 0% 98%) 100%)"
|
|
1643
|
+
};
|
|
1644
|
+
var darkTokenStyle = {
|
|
1645
|
+
...lightTokenStyle,
|
|
1646
|
+
"--background": "0 0% 10%",
|
|
1647
|
+
"--background-elevated": "0 0% 13%",
|
|
1648
|
+
"--background-surface": "0 0% 16%",
|
|
1649
|
+
"--foreground": "0 0% 100%",
|
|
1650
|
+
"--foreground-muted": "0 0% 60%",
|
|
1651
|
+
"--card": "0 0% 13%",
|
|
1652
|
+
"--card-foreground": "0 0% 100%",
|
|
1653
|
+
"--popover": "0 0% 12%",
|
|
1654
|
+
"--popover-foreground": "0 0% 100%",
|
|
1655
|
+
"--secondary": "0 0% 18%",
|
|
1656
|
+
"--secondary-foreground": "0 0% 100%",
|
|
1657
|
+
"--muted": "0 0% 16%",
|
|
1658
|
+
"--muted-foreground": "0 0% 50%",
|
|
1659
|
+
"--accent": "0 0% 20%",
|
|
1660
|
+
"--accent-foreground": "0 0% 100%",
|
|
1661
|
+
"--destructive": "0 84% 60%",
|
|
1662
|
+
"--destructive-foreground": "0 0% 100%",
|
|
1663
|
+
"--border": "0 0% 20%",
|
|
1664
|
+
"--border-subtle": "0 0% 16%",
|
|
1665
|
+
"--input": "0 0% 18%",
|
|
1666
|
+
"--sidebar-background": "0 0% 9%",
|
|
1667
|
+
"--sidebar-foreground": "0 0% 100%",
|
|
1668
|
+
"--sidebar-accent": "0 0% 16%",
|
|
1669
|
+
"--sidebar-accent-foreground": "0 0% 100%",
|
|
1670
|
+
"--sidebar-border": "0 0% 16%",
|
|
1671
|
+
"--gradient-card": "linear-gradient(145deg, hsl(0 0% 14%) 0%, hsl(0 0% 12%) 100%)"
|
|
1672
|
+
};
|
|
1673
|
+
var SHUFFLE_MCP_BASE_CSS = `
|
|
1674
|
+
:where(:root) {
|
|
1675
|
+
--background: 0 0% 10%;
|
|
1676
|
+
--background-elevated: 0 0% 13%;
|
|
1677
|
+
--background-surface: 0 0% 16%;
|
|
1678
|
+
--foreground: 0 0% 98%;
|
|
1679
|
+
--card: 0 0% 13%;
|
|
1680
|
+
--card-foreground: 0 0% 100%;
|
|
1681
|
+
--popover: 0 0% 13%;
|
|
1682
|
+
--popover-foreground: 0 0% 100%;
|
|
1683
|
+
--primary: 22 100% 50%;
|
|
1684
|
+
--primary-foreground: 0 0% 100%;
|
|
1685
|
+
--secondary: 0 0% 16%;
|
|
1686
|
+
--secondary-foreground: 0 0% 100%;
|
|
1687
|
+
--muted: 0 0% 16%;
|
|
1688
|
+
--muted-foreground: 0 0% 65%;
|
|
1689
|
+
--accent: 22 100% 50%;
|
|
1690
|
+
--accent-foreground: 0 0% 100%;
|
|
1691
|
+
--destructive: 0 84% 60%;
|
|
1692
|
+
--destructive-foreground: 0 0% 100%;
|
|
1693
|
+
--border: 0 0% 20%;
|
|
1694
|
+
--input: 0 0% 16%;
|
|
1695
|
+
--ring: 22 100% 50%;
|
|
1696
|
+
--severity-info: 210 90% 60%;
|
|
1697
|
+
--severity-low: 142 70% 45%;
|
|
1698
|
+
--severity-medium: 38 92% 50%;
|
|
1699
|
+
--severity-high: 12 92% 52%;
|
|
1700
|
+
--severity-critical: 0 84% 60%;
|
|
1701
|
+
--infra-email: 210 90% 60%;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.shuffle-mcp-scope,
|
|
1705
|
+
.shuffle-mcp-scope *,
|
|
1706
|
+
.shuffle-mcp-scope *::before,
|
|
1707
|
+
.shuffle-mcp-scope *::after {
|
|
1708
|
+
box-sizing: border-box;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.shuffle-mcp-scope {
|
|
1712
|
+
color: hsl(var(--foreground));
|
|
1713
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
1714
|
+
line-height: 1.5;
|
|
1715
|
+
isolation: isolate;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
:root:not(.dark) .shuffle-mcp-scope:not(.dark),
|
|
1719
|
+
html:not(.dark) .shuffle-mcp-scope:not(.dark),
|
|
1720
|
+
body:not(.dark) .shuffle-mcp-scope:not(.dark),
|
|
1721
|
+
.shuffle-mcp-scope.light,
|
|
1722
|
+
[data-shuffle-mode="light"] .shuffle-mcp-scope,
|
|
1723
|
+
[data-shuffle-mode="light"] {
|
|
1724
|
+
--background: 0 0% 98%;
|
|
1725
|
+
--background-elevated: 0 0% 100%;
|
|
1726
|
+
--background-surface: 0 0% 96%;
|
|
1727
|
+
--foreground: 0 0% 9%;
|
|
1728
|
+
--card: 0 0% 100%;
|
|
1729
|
+
--card-foreground: 0 0% 9%;
|
|
1730
|
+
--popover: 0 0% 100%;
|
|
1731
|
+
--popover-foreground: 0 0% 9%;
|
|
1732
|
+
--secondary: 0 0% 94%;
|
|
1733
|
+
--secondary-foreground: 0 0% 9%;
|
|
1734
|
+
--muted: 0 0% 94%;
|
|
1735
|
+
--muted-foreground: 0 0% 40%;
|
|
1736
|
+
--accent: 0 0% 92%;
|
|
1737
|
+
--accent-foreground: 0 0% 9%;
|
|
1738
|
+
--destructive: 0 72% 51%;
|
|
1739
|
+
--destructive-foreground: 0 0% 100%;
|
|
1740
|
+
--border: 0 0% 78%;
|
|
1741
|
+
--input: 0 0% 94%;
|
|
1742
|
+
--severity-info: 215 90% 45%;
|
|
1743
|
+
--severity-low: 142 72% 31%;
|
|
1744
|
+
--severity-medium: 38 92% 33%;
|
|
1745
|
+
--severity-high: 12 88% 46%;
|
|
1746
|
+
--severity-critical: 0 72% 51%;
|
|
1747
|
+
--infra-email: 215 90% 45%;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
.dark .shuffle-mcp-scope:not(.light),
|
|
1751
|
+
.shuffle-mcp-scope.dark,
|
|
1752
|
+
[data-shuffle-mode="dark"] .shuffle-mcp-scope,
|
|
1753
|
+
[data-shuffle-mode="dark"] {
|
|
1754
|
+
--background: 0 0% 10%;
|
|
1755
|
+
--background-elevated: 0 0% 13%;
|
|
1756
|
+
--background-surface: 0 0% 16%;
|
|
1757
|
+
--foreground: 0 0% 100%;
|
|
1758
|
+
--card: 0 0% 13%;
|
|
1759
|
+
--card-foreground: 0 0% 100%;
|
|
1760
|
+
--popover: 0 0% 12%;
|
|
1761
|
+
--popover-foreground: 0 0% 100%;
|
|
1762
|
+
--secondary: 0 0% 18%;
|
|
1763
|
+
--secondary-foreground: 0 0% 100%;
|
|
1764
|
+
--muted: 0 0% 16%;
|
|
1765
|
+
--muted-foreground: 0 0% 50%;
|
|
1766
|
+
--accent: 0 0% 20%;
|
|
1767
|
+
--accent-foreground: 0 0% 100%;
|
|
1768
|
+
--destructive: 0 84% 60%;
|
|
1769
|
+
--destructive-foreground: 0 0% 100%;
|
|
1770
|
+
--border: 0 0% 20%;
|
|
1771
|
+
--input: 0 0% 18%;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.MuiTooltip-tooltip.shuffle-mcp-scope {
|
|
1775
|
+
background-color: hsl(var(--popover)) !important;
|
|
1776
|
+
color: hsl(var(--popover-foreground)) !important;
|
|
1777
|
+
border: 1px solid hsl(var(--border)) !important;
|
|
1778
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
|
|
1779
|
+
border-radius: 8px !important;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
.MuiTooltip-tooltip.shuffle-mcp-scope .MuiTooltip-arrow {
|
|
1783
|
+
color: hsl(var(--popover)) !important;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
.MuiTooltip-tooltip.shuffle-mcp-scope .MuiTooltip-arrow::before {
|
|
1787
|
+
border: 1px solid hsl(var(--border)) !important;
|
|
1788
|
+
box-sizing: border-box;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
@keyframes singul-spin {
|
|
1792
|
+
0% { transform: rotate(0deg); }
|
|
1793
|
+
100% { transform: rotate(360deg); }
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
@keyframes singul-skeleton-pulse {
|
|
1797
|
+
0%, 100% { opacity: 0.4; }
|
|
1798
|
+
50% { opacity: 0.8; }
|
|
1799
|
+
}
|
|
1800
|
+
`;
|
|
1801
|
+
var ensureShuffleMcpStyles = () => {
|
|
1802
|
+
if (typeof document === "undefined") return;
|
|
1803
|
+
const STYLE_ID = "shuffle-mcp-injected-styles";
|
|
1804
|
+
if (document.getElementById(STYLE_ID)) return;
|
|
1805
|
+
const style = document.createElement("style");
|
|
1806
|
+
style.id = STYLE_ID;
|
|
1807
|
+
style.textContent = SHUFFLE_MCP_BASE_CSS;
|
|
1808
|
+
document.head.appendChild(style);
|
|
1809
|
+
};
|
|
1810
|
+
if (typeof document !== "undefined") {
|
|
1811
|
+
ensureShuffleMcpStyles();
|
|
1812
|
+
}
|
|
1606
1813
|
var readHtmlDarkClass = () => {
|
|
1607
1814
|
if (typeof document === "undefined") return false;
|
|
1608
1815
|
return document.documentElement.classList.contains("dark") || Boolean(document.body) && document.body.classList.contains("dark");
|
|
@@ -1648,19 +1855,20 @@ var useAutoDarkClass = (enabled, anchorRef) => {
|
|
|
1648
1855
|
};
|
|
1649
1856
|
var ShuffleMcpThemeContext = import_react.default.createContext(null);
|
|
1650
1857
|
var useShuffleMcpTheme = () => import_react.default.useContext(ShuffleMcpThemeContext);
|
|
1651
|
-
var buildComponentOverrides = (scopeClassName) => ({
|
|
1858
|
+
var buildComponentOverrides = (scopeClassName, scopeStyle) => ({
|
|
1652
1859
|
MuiButton: { defaultProps: { size: "small" } },
|
|
1653
1860
|
MuiAutocomplete: {
|
|
1654
1861
|
defaultProps: {
|
|
1655
1862
|
slotProps: {
|
|
1656
|
-
popper: { className: scopeClassName, sx: { zIndex: 10040 } },
|
|
1657
|
-
paper: { className: scopeClassName }
|
|
1863
|
+
popper: { className: scopeClassName, style: scopeStyle, sx: { zIndex: 10040 } },
|
|
1864
|
+
paper: { className: scopeClassName, style: scopeStyle }
|
|
1658
1865
|
}
|
|
1659
1866
|
}
|
|
1660
1867
|
},
|
|
1661
1868
|
MuiPopper: {
|
|
1662
1869
|
defaultProps: {
|
|
1663
|
-
className: scopeClassName
|
|
1870
|
+
className: scopeClassName,
|
|
1871
|
+
style: scopeStyle
|
|
1664
1872
|
},
|
|
1665
1873
|
styleOverrides: {
|
|
1666
1874
|
root: { zIndex: 10040 }
|
|
@@ -1700,9 +1908,9 @@ var buildComponentOverrides = (scopeClassName) => ({
|
|
|
1700
1908
|
}
|
|
1701
1909
|
}
|
|
1702
1910
|
},
|
|
1703
|
-
// ---- Portaled surfaces: stamp scopeClassName so HSL tokens resolve ----
|
|
1911
|
+
// ---- Portaled surfaces: stamp scopeClassName and scopeStyle so HSL tokens resolve ----
|
|
1704
1912
|
MuiDrawer: {
|
|
1705
|
-
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
1913
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName, style: scopeStyle } } },
|
|
1706
1914
|
styleOverrides: {
|
|
1707
1915
|
paper: {
|
|
1708
1916
|
backgroundColor: "hsl(var(--sidebar-background, var(--card)))",
|
|
@@ -1712,7 +1920,7 @@ var buildComponentOverrides = (scopeClassName) => ({
|
|
|
1712
1920
|
}
|
|
1713
1921
|
},
|
|
1714
1922
|
MuiDialog: {
|
|
1715
|
-
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
1923
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName, style: scopeStyle } } },
|
|
1716
1924
|
styleOverrides: {
|
|
1717
1925
|
root: { zIndex: 10010 },
|
|
1718
1926
|
paper: {
|
|
@@ -1724,7 +1932,7 @@ var buildComponentOverrides = (scopeClassName) => ({
|
|
|
1724
1932
|
}
|
|
1725
1933
|
},
|
|
1726
1934
|
MuiMenu: {
|
|
1727
|
-
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
1935
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName, style: scopeStyle } } },
|
|
1728
1936
|
styleOverrides: {
|
|
1729
1937
|
root: { zIndex: 10040 },
|
|
1730
1938
|
paper: {
|
|
@@ -1736,7 +1944,7 @@ var buildComponentOverrides = (scopeClassName) => ({
|
|
|
1736
1944
|
}
|
|
1737
1945
|
},
|
|
1738
1946
|
MuiPopover: {
|
|
1739
|
-
defaultProps: { slotProps: { paper: { className: scopeClassName } } },
|
|
1947
|
+
defaultProps: { slotProps: { paper: { className: scopeClassName, style: scopeStyle } } },
|
|
1740
1948
|
styleOverrides: {
|
|
1741
1949
|
root: { zIndex: 10040 },
|
|
1742
1950
|
paper: {
|
|
@@ -1750,7 +1958,7 @@ var buildComponentOverrides = (scopeClassName) => ({
|
|
|
1750
1958
|
MuiTooltip: {
|
|
1751
1959
|
defaultProps: {
|
|
1752
1960
|
slotProps: {
|
|
1753
|
-
tooltip: { className: scopeClassName },
|
|
1961
|
+
tooltip: { className: scopeClassName, style: scopeStyle },
|
|
1754
1962
|
// Render above app drawers, dialogs, menus, and popovers.
|
|
1755
1963
|
popper: { sx: { zIndex: 10050 } }
|
|
1756
1964
|
}
|
|
@@ -1789,6 +1997,7 @@ var ShuffleMcpThemeProvider = ({
|
|
|
1789
1997
|
const sameAsParent = parentCtx !== null && parentCtx.isDark === effectiveDark;
|
|
1790
1998
|
const scopeClassName = effectiveDark ? "shuffle-mcp-scope dark" : "shuffle-mcp-scope light";
|
|
1791
1999
|
const resolvedModeAttr = effectiveDark ? "dark" : "light";
|
|
2000
|
+
const scopeStyle = effectiveDark ? darkTokenStyle : lightTokenStyle;
|
|
1792
2001
|
const merged = import_react.default.useMemo(
|
|
1793
2002
|
() => (0, import_material.createTheme)({
|
|
1794
2003
|
...parent,
|
|
@@ -1798,22 +2007,25 @@ var ShuffleMcpThemeProvider = ({
|
|
|
1798
2007
|
},
|
|
1799
2008
|
components: {
|
|
1800
2009
|
...parent.components,
|
|
1801
|
-
...buildComponentOverrides(scopeClassName)
|
|
2010
|
+
...buildComponentOverrides(scopeClassName, scopeStyle)
|
|
1802
2011
|
}
|
|
1803
2012
|
}),
|
|
1804
|
-
[parent, effectiveDark, scopeClassName]
|
|
2013
|
+
[parent, effectiveDark, scopeClassName, scopeStyle]
|
|
1805
2014
|
);
|
|
1806
2015
|
const ctxValue = import_react.default.useMemo(
|
|
1807
2016
|
() => ({ mode, isDark: effectiveDark, scopeClassName }),
|
|
1808
2017
|
[mode, effectiveDark, scopeClassName]
|
|
1809
2018
|
);
|
|
2019
|
+
import_react.default.useEffect(() => {
|
|
2020
|
+
ensureShuffleMcpStyles();
|
|
2021
|
+
}, []);
|
|
1810
2022
|
if (sameAsParent) {
|
|
1811
2023
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: [
|
|
1812
2024
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
1813
2025
|
children2
|
|
1814
2026
|
] });
|
|
1815
2027
|
}
|
|
1816
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.ThemeProvider, { theme: merged, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: scopeClassName, "data-shuffle-mode": resolvedModeAttr, "data-shuffle-mcp-root": true, children: [
|
|
2028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShuffleMcpThemeContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.ThemeProvider, { theme: merged, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: scopeClassName, style: scopeStyle, "data-shuffle-mode": resolvedModeAttr, "data-shuffle-mcp-root": true, children: [
|
|
1817
2029
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: anchorRef, style: { display: "none" }, "aria-hidden": true }),
|
|
1818
2030
|
children2
|
|
1819
2031
|
] }) }) });
|
|
@@ -2276,11 +2488,23 @@ var setDatastoreItems = async (items, category) => {
|
|
|
2276
2488
|
`[datastore.setMany] category=${category} unchanged keys: ${okParsed.keysExisted.filter((k) => !k.changed).map((k) => k.key).join(", ")}`
|
|
2277
2489
|
);
|
|
2278
2490
|
}
|
|
2491
|
+
if (okParsed.success === false) {
|
|
2492
|
+
const fallbackResults = await Promise.all(items.map(
|
|
2493
|
+
(item) => setDatastoreItem(item.key, item.value, category)
|
|
2494
|
+
));
|
|
2495
|
+
const failedWrites = fallbackResults.filter((result) => !result.success);
|
|
2496
|
+
if (failedWrites.length > 0) {
|
|
2497
|
+
return {
|
|
2498
|
+
success: false,
|
|
2499
|
+
error: failedWrites[0]?.error || "Backend reported success=false for bulk datastore write"
|
|
2500
|
+
};
|
|
2501
|
+
}
|
|
2502
|
+
return { success: true };
|
|
2503
|
+
}
|
|
2279
2504
|
return {
|
|
2280
|
-
success:
|
|
2505
|
+
success: true,
|
|
2281
2506
|
keysExisted: okParsed.keysExisted,
|
|
2282
|
-
changed: okParsed.keysExisted ? okParsed.keysExisted.some((k) => k.changed) : void 0
|
|
2283
|
-
...okParsed.success === false ? { error: "Backend reported success=false for bulk datastore write" } : {}
|
|
2507
|
+
changed: okParsed.keysExisted ? okParsed.keysExisted.some((k) => k.changed) : void 0
|
|
2284
2508
|
};
|
|
2285
2509
|
};
|
|
2286
2510
|
var getDatastoreItem = async (key, category, overrideOrgId, options) => {
|
|
@@ -4871,7 +5095,14 @@ var getOverlayStack = () => {
|
|
|
4871
5095
|
if (!Array.isArray(store[STACK_KEY])) {
|
|
4872
5096
|
store[STACK_KEY] = [];
|
|
4873
5097
|
}
|
|
4874
|
-
|
|
5098
|
+
const stack = store[STACK_KEY];
|
|
5099
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
5100
|
+
const el = stack[i].element;
|
|
5101
|
+
if (el && !el.isConnected) {
|
|
5102
|
+
stack.splice(i, 1);
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
return stack;
|
|
4875
5106
|
};
|
|
4876
5107
|
var getTopSurfaceZIndex = (base2 = OVERLAY_BASE) => {
|
|
4877
5108
|
const stack = getOverlayStack();
|
|
@@ -4955,7 +5186,23 @@ var isChildPopupElement = (el) => {
|
|
|
4955
5186
|
if (!(el instanceof HTMLElement)) return false;
|
|
4956
5187
|
return el.classList.contains("MuiPopover-root") || el.classList.contains("MuiMenu-root") || el.classList.contains("MuiAutocomplete-popper") || Boolean(el.closest("[data-radix-popper-content-wrapper]")) || el.classList.contains("MuiPopper-root") && !el.classList.contains("MuiTooltip-popper");
|
|
4957
5188
|
};
|
|
4958
|
-
var
|
|
5189
|
+
var SHUFFLE_SCOPE_SELECTOR = ".shuffle-core-scope, .shuffle-mcp-scope, [data-shuffle-layer]";
|
|
5190
|
+
var OWN_PANEL_SELECTOR = [
|
|
5191
|
+
":scope > .MuiPaper-root",
|
|
5192
|
+
":scope > .MuiDialog-container > .MuiPaper-root",
|
|
5193
|
+
':scope > [role="dialog"]',
|
|
5194
|
+
':scope > [role="alertdialog"]',
|
|
5195
|
+
':scope > [role="tooltip"]',
|
|
5196
|
+
":scope > .MuiTooltip-tooltip"
|
|
5197
|
+
].join(", ");
|
|
5198
|
+
var hasShuffleScopedPanel = (el) => {
|
|
5199
|
+
const panels = el.querySelectorAll(OWN_PANEL_SELECTOR);
|
|
5200
|
+
for (let i = 0; i < panels.length; i++) {
|
|
5201
|
+
if (panels[i].matches(SHUFFLE_SCOPE_SELECTOR)) return true;
|
|
5202
|
+
}
|
|
5203
|
+
return false;
|
|
5204
|
+
};
|
|
5205
|
+
var isShuffleOwnedOverlay = (el) => el.matches(SHUFFLE_SCOPE_SELECTOR) || hasShuffleScopedPanel(el) || el.closest("[data-radix-portal]") !== null || getOverlayStack().some((r) => r.type === "surface") && isChildPopupElement(el);
|
|
4959
5206
|
var isTooltipElement = (el) => {
|
|
4960
5207
|
if (!(el instanceof HTMLElement)) return false;
|
|
4961
5208
|
return el.classList.contains("MuiTooltip-popper") || el.getAttribute("role") === "tooltip";
|
|
@@ -4975,7 +5222,10 @@ var installGlobalOverlayAutoLayer = () => {
|
|
|
4975
5222
|
if (store[AUTO_LAYER_KEY]) return;
|
|
4976
5223
|
store[AUTO_LAYER_KEY] = true;
|
|
4977
5224
|
const handleElementOpen = (el) => {
|
|
4978
|
-
if (!isShuffleOwnedOverlay(el))
|
|
5225
|
+
if (!isShuffleOwnedOverlay(el)) {
|
|
5226
|
+
if (el.dataset.shuffleLayerZ) handleElementClose(el);
|
|
5227
|
+
return;
|
|
5228
|
+
}
|
|
4979
5229
|
if (isSurfaceElement(el)) {
|
|
4980
5230
|
let layerId = el.dataset.shuffleLayerId;
|
|
4981
5231
|
if (!layerId) {
|
|
@@ -5019,10 +5269,13 @@ var installGlobalOverlayAutoLayer = () => {
|
|
|
5019
5269
|
if (layerId) {
|
|
5020
5270
|
releaseOverlayLayer(layerId);
|
|
5021
5271
|
delete el.dataset.shuffleLayerId;
|
|
5022
|
-
delete el.dataset.shuffleLayerZ;
|
|
5023
5272
|
} else {
|
|
5024
5273
|
releaseOverlayLayer(el);
|
|
5025
5274
|
}
|
|
5275
|
+
if (el.dataset.shuffleLayerZ) {
|
|
5276
|
+
if (el.style.zIndex === el.dataset.shuffleLayerZ) el.style.removeProperty("z-index");
|
|
5277
|
+
delete el.dataset.shuffleLayerZ;
|
|
5278
|
+
}
|
|
5026
5279
|
};
|
|
5027
5280
|
const scanNode = (node) => {
|
|
5028
5281
|
if (!(node instanceof HTMLElement)) return;
|
|
@@ -8266,9 +8519,189 @@ init_api();
|
|
|
8266
8519
|
// ../Shuffle-Core/components/ShuffleCoreThemeProvider.tsx
|
|
8267
8520
|
var import_react10 = __toESM(require("react"));
|
|
8268
8521
|
var import_material12 = require("@mui/material");
|
|
8269
|
-
var import_shuffle_core = require("./shuffle-core-LIQTRTFD.css");
|
|
8270
8522
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
8271
|
-
var
|
|
8523
|
+
var SHUFFLE_CORE_BASE_CSS = `
|
|
8524
|
+
:where(:root) {
|
|
8525
|
+
--background: 0 0% 10%;
|
|
8526
|
+
--background-elevated: 0 0% 13%;
|
|
8527
|
+
--background-surface: 0 0% 16%;
|
|
8528
|
+
--foreground: 0 0% 98%;
|
|
8529
|
+
--foreground-muted: 0 0% 60%;
|
|
8530
|
+
--card: 0 0% 13%;
|
|
8531
|
+
--card-foreground: 0 0% 100%;
|
|
8532
|
+
--popover: 0 0% 13%;
|
|
8533
|
+
--popover-foreground: 0 0% 100%;
|
|
8534
|
+
--primary: 22 100% 50%;
|
|
8535
|
+
--primary-foreground: 0 0% 100%;
|
|
8536
|
+
--secondary: 0 0% 16%;
|
|
8537
|
+
--secondary-foreground: 0 0% 100%;
|
|
8538
|
+
--muted: 0 0% 16%;
|
|
8539
|
+
--muted-foreground: 0 0% 65%;
|
|
8540
|
+
--accent: 22 100% 50%;
|
|
8541
|
+
--accent-foreground: 0 0% 100%;
|
|
8542
|
+
--destructive: 0 84% 60%;
|
|
8543
|
+
--destructive-foreground: 0 0% 100%;
|
|
8544
|
+
--border: 0 0% 20%;
|
|
8545
|
+
--border-subtle: 0 0% 16%;
|
|
8546
|
+
--input: 0 0% 16%;
|
|
8547
|
+
--ring: 22 100% 50%;
|
|
8548
|
+
--primary-glow: 24 100% 60%;
|
|
8549
|
+
--severity-critical: 0 84% 60%;
|
|
8550
|
+
--severity-high: 12 92% 52%;
|
|
8551
|
+
--severity-medium: 45 93% 47%;
|
|
8552
|
+
--severity-low: 142 71% 45%;
|
|
8553
|
+
--severity-info: 210 100% 56%;
|
|
8554
|
+
--sidebar-background: 0 0% 9%;
|
|
8555
|
+
--sidebar-foreground: 0 0% 100%;
|
|
8556
|
+
--sidebar-primary: 24 100% 50%;
|
|
8557
|
+
--sidebar-primary-foreground: 0 0% 100%;
|
|
8558
|
+
--sidebar-accent: 0 0% 16%;
|
|
8559
|
+
--sidebar-accent-foreground: 0 0% 100%;
|
|
8560
|
+
--sidebar-border: 0 0% 16%;
|
|
8561
|
+
--sidebar-ring: 24 100% 50%;
|
|
8562
|
+
--gradient-card: linear-gradient(145deg, hsl(0 0% 14%) 0%, hsl(0 0% 12%) 100%);
|
|
8563
|
+
--gradient-accent: linear-gradient(135deg, hsl(24 100% 50%) 0%, hsl(24 100% 60%) 100%);
|
|
8564
|
+
}
|
|
8565
|
+
|
|
8566
|
+
.shuffle-core-scope,
|
|
8567
|
+
.shuffle-core-scope *,
|
|
8568
|
+
.shuffle-core-scope *::before,
|
|
8569
|
+
.shuffle-core-scope *::after {
|
|
8570
|
+
box-sizing: border-box;
|
|
8571
|
+
}
|
|
8572
|
+
|
|
8573
|
+
.shuffle-core-scope {
|
|
8574
|
+
color: hsl(var(--foreground));
|
|
8575
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
8576
|
+
line-height: 1.5;
|
|
8577
|
+
isolation: isolate;
|
|
8578
|
+
}
|
|
8579
|
+
|
|
8580
|
+
.shuffle-core-scope button,
|
|
8581
|
+
.shuffle-core-scope input,
|
|
8582
|
+
.shuffle-core-scope textarea,
|
|
8583
|
+
.shuffle-core-scope select {
|
|
8584
|
+
font: inherit;
|
|
8585
|
+
}
|
|
8586
|
+
|
|
8587
|
+
:root:not(.dark) .shuffle-core-scope:not(.dark),
|
|
8588
|
+
html:not(.dark) .shuffle-core-scope:not(.dark),
|
|
8589
|
+
body:not(.dark) .shuffle-core-scope:not(.dark),
|
|
8590
|
+
.shuffle-core-scope.light,
|
|
8591
|
+
[data-shuffle-mode="light"] .shuffle-core-scope,
|
|
8592
|
+
[data-shuffle-mode="light"] {
|
|
8593
|
+
--background: 0 0% 98%;
|
|
8594
|
+
--background-elevated: 0 0% 100%;
|
|
8595
|
+
--background-surface: 0 0% 96%;
|
|
8596
|
+
--foreground: 0 0% 9%;
|
|
8597
|
+
--foreground-muted: 0 0% 40%;
|
|
8598
|
+
--card: 0 0% 100%;
|
|
8599
|
+
--card-foreground: 0 0% 9%;
|
|
8600
|
+
--popover: 0 0% 100%;
|
|
8601
|
+
--popover-foreground: 0 0% 9%;
|
|
8602
|
+
--secondary: 0 0% 94%;
|
|
8603
|
+
--secondary-foreground: 0 0% 9%;
|
|
8604
|
+
--muted: 0 0% 94%;
|
|
8605
|
+
--muted-foreground: 0 0% 40%;
|
|
8606
|
+
--accent: 0 0% 92%;
|
|
8607
|
+
--accent-foreground: 0 0% 9%;
|
|
8608
|
+
--destructive: 0 72% 51%;
|
|
8609
|
+
--destructive-foreground: 0 0% 100%;
|
|
8610
|
+
--border: 0 0% 78%;
|
|
8611
|
+
--border-subtle: 0 0% 86%;
|
|
8612
|
+
--input: 0 0% 94%;
|
|
8613
|
+
--severity-critical: 0 72% 51%;
|
|
8614
|
+
--severity-high: 12 88% 46%;
|
|
8615
|
+
--severity-medium: 38 92% 33%;
|
|
8616
|
+
--severity-low: 142 72% 31%;
|
|
8617
|
+
--severity-info: 215 90% 45%;
|
|
8618
|
+
--sidebar-background: 0 0% 97%;
|
|
8619
|
+
--sidebar-foreground: 0 0% 9%;
|
|
8620
|
+
--sidebar-accent: 0 0% 94%;
|
|
8621
|
+
--sidebar-accent-foreground: 0 0% 9%;
|
|
8622
|
+
--sidebar-border: 0 0% 80%;
|
|
8623
|
+
--gradient-card: linear-gradient(145deg, hsl(0 0% 100%) 0%, hsl(0 0% 98%) 100%);
|
|
8624
|
+
}
|
|
8625
|
+
|
|
8626
|
+
.dark .shuffle-core-scope:not(.light),
|
|
8627
|
+
.shuffle-core-scope.dark,
|
|
8628
|
+
[data-shuffle-mode="dark"] .shuffle-core-scope,
|
|
8629
|
+
[data-shuffle-mode="dark"] {
|
|
8630
|
+
--background: 0 0% 10%;
|
|
8631
|
+
--background-elevated: 0 0% 13%;
|
|
8632
|
+
--background-surface: 0 0% 16%;
|
|
8633
|
+
--foreground: 0 0% 100%;
|
|
8634
|
+
--foreground-muted: 0 0% 60%;
|
|
8635
|
+
--card: 0 0% 13%;
|
|
8636
|
+
--card-foreground: 0 0% 100%;
|
|
8637
|
+
--popover: 0 0% 12%;
|
|
8638
|
+
--popover-foreground: 0 0% 100%;
|
|
8639
|
+
--secondary: 0 0% 18%;
|
|
8640
|
+
--secondary-foreground: 0 0% 100%;
|
|
8641
|
+
--muted: 0 0% 16%;
|
|
8642
|
+
--muted-foreground: 0 0% 50%;
|
|
8643
|
+
--accent: 0 0% 20%;
|
|
8644
|
+
--accent-foreground: 0 0% 100%;
|
|
8645
|
+
--destructive: 0 84% 60%;
|
|
8646
|
+
--destructive-foreground: 0 0% 100%;
|
|
8647
|
+
--border: 0 0% 20%;
|
|
8648
|
+
--border-subtle: 0 0% 16%;
|
|
8649
|
+
--input: 0 0% 18%;
|
|
8650
|
+
--severity-critical: 0 84% 60%;
|
|
8651
|
+
--severity-high: 12 92% 52%;
|
|
8652
|
+
--severity-medium: 45 93% 47%;
|
|
8653
|
+
--severity-low: 142 71% 45%;
|
|
8654
|
+
--severity-info: 210 100% 56%;
|
|
8655
|
+
--sidebar-background: 0 0% 9%;
|
|
8656
|
+
--sidebar-foreground: 0 0% 100%;
|
|
8657
|
+
--sidebar-accent: 0 0% 16%;
|
|
8658
|
+
--sidebar-accent-foreground: 0 0% 100%;
|
|
8659
|
+
--sidebar-border: 0 0% 16%;
|
|
8660
|
+
--gradient-card: linear-gradient(145deg, hsl(0 0% 14%) 0%, hsl(0 0% 12%) 100%);
|
|
8661
|
+
}
|
|
8662
|
+
|
|
8663
|
+
.MuiTooltip-tooltip.shuffle-core-scope {
|
|
8664
|
+
background-color: hsl(var(--popover)) !important;
|
|
8665
|
+
color: hsl(var(--popover-foreground)) !important;
|
|
8666
|
+
border: 1px solid hsl(var(--border)) !important;
|
|
8667
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
|
|
8668
|
+
border-radius: 8px !important;
|
|
8669
|
+
}
|
|
8670
|
+
|
|
8671
|
+
.MuiTooltip-tooltip.shuffle-core-scope .MuiTooltip-arrow {
|
|
8672
|
+
color: hsl(var(--popover)) !important;
|
|
8673
|
+
}
|
|
8674
|
+
|
|
8675
|
+
.MuiTooltip-tooltip.shuffle-core-scope .MuiTooltip-arrow::before {
|
|
8676
|
+
border: 1px solid hsl(var(--border)) !important;
|
|
8677
|
+
box-sizing: border-box;
|
|
8678
|
+
}
|
|
8679
|
+
`;
|
|
8680
|
+
var ensureShuffleCoreStyles = () => {
|
|
8681
|
+
if (typeof document === "undefined") return;
|
|
8682
|
+
const STYLE_ID = "shuffle-core-injected-styles";
|
|
8683
|
+
if (document.getElementById(STYLE_ID)) return;
|
|
8684
|
+
const style = document.createElement("style");
|
|
8685
|
+
style.id = STYLE_ID;
|
|
8686
|
+
style.textContent = SHUFFLE_CORE_BASE_CSS;
|
|
8687
|
+
document.head.appendChild(style);
|
|
8688
|
+
};
|
|
8689
|
+
if (typeof document !== "undefined") {
|
|
8690
|
+
ensureShuffleCoreStyles();
|
|
8691
|
+
}
|
|
8692
|
+
var readElementAncestorDark = (node) => {
|
|
8693
|
+
if (!node || typeof document === "undefined") return null;
|
|
8694
|
+
const scoped = node.closest('[data-shuffle-mode="dark"], [data-shuffle-mode="light"]');
|
|
8695
|
+
if (scoped) return scoped.getAttribute("data-shuffle-mode") === "dark";
|
|
8696
|
+
if (node.closest(".dark")) return true;
|
|
8697
|
+
if (node.closest(".light")) return false;
|
|
8698
|
+
return null;
|
|
8699
|
+
};
|
|
8700
|
+
var readHtmlDarkClass2 = () => {
|
|
8701
|
+
if (typeof document === "undefined") return false;
|
|
8702
|
+
return document.documentElement.classList.contains("dark") || document.body?.classList.contains("dark") || document.documentElement.getAttribute("data-theme") === "dark" || document.body?.getAttribute("data-theme") === "dark";
|
|
8703
|
+
};
|
|
8704
|
+
var lightTokenStyle2 = {
|
|
8272
8705
|
"--background": "0 0% 98%",
|
|
8273
8706
|
"--background-elevated": "0 0% 100%",
|
|
8274
8707
|
"--background-surface": "0 0% 96%",
|
|
@@ -8301,8 +8734,8 @@ var lightTokenStyle = {
|
|
|
8301
8734
|
"--sidebar-border": "0 0% 80%",
|
|
8302
8735
|
"--gradient-card": "linear-gradient(145deg, hsl(0 0% 100%) 0%, hsl(0 0% 98%) 100%)"
|
|
8303
8736
|
};
|
|
8304
|
-
var
|
|
8305
|
-
...
|
|
8737
|
+
var darkTokenStyle2 = {
|
|
8738
|
+
...lightTokenStyle2,
|
|
8306
8739
|
"--background": "0 0% 10%",
|
|
8307
8740
|
"--background-elevated": "0 0% 13%",
|
|
8308
8741
|
"--background-surface": "0 0% 16%",
|
|
@@ -9480,6 +9913,9 @@ var import_react13 = require("react");
|
|
|
9480
9913
|
var import_material14 = require("@mui/material");
|
|
9481
9914
|
var import_lucide_react6 = require("lucide-react");
|
|
9482
9915
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
9916
|
+
if (typeof document !== "undefined") {
|
|
9917
|
+
ensureShuffleCoreStyles();
|
|
9918
|
+
}
|
|
9483
9919
|
var normalizeToolName = (name) => (name || "").toLowerCase().trim().replace(/[\s-]+/g, "_");
|
|
9484
9920
|
var isRequiredPresetApp = (preset, appName) => {
|
|
9485
9921
|
if (!preset?.requiredApps || preset.requiredApps.length === 0) return false;
|
|
@@ -9592,9 +10028,68 @@ var filterAgentPresets = (list, support) => {
|
|
|
9592
10028
|
if (support === true || support === void 0 && isSupportUser()) return list;
|
|
9593
10029
|
return list.map((p) => SUPPORT_ONLY_PRESET_IDS.includes(p.id) ? { ...p, enabled: false } : p);
|
|
9594
10030
|
};
|
|
9595
|
-
var AgentPresets = ({
|
|
10031
|
+
var AgentPresets = ({
|
|
10032
|
+
variant = "default",
|
|
10033
|
+
onSelectPreset,
|
|
10034
|
+
selectedPreset,
|
|
10035
|
+
onRemoveSelected,
|
|
10036
|
+
presets,
|
|
10037
|
+
chipRef,
|
|
10038
|
+
isSupport,
|
|
10039
|
+
sx,
|
|
10040
|
+
placement,
|
|
10041
|
+
theme,
|
|
10042
|
+
colorMode
|
|
10043
|
+
}) => {
|
|
9596
10044
|
const [anchorEl, setAnchorEl] = (0, import_react13.useState)(null);
|
|
9597
10045
|
const open = Boolean(anchorEl);
|
|
10046
|
+
const buttonRef = (0, import_react13.useRef)(null);
|
|
10047
|
+
const setButtonRefs = (0, import_react13.useCallback)(
|
|
10048
|
+
(node) => {
|
|
10049
|
+
buttonRef.current = node;
|
|
10050
|
+
if (typeof chipRef === "function") {
|
|
10051
|
+
chipRef(node);
|
|
10052
|
+
} else if (chipRef && typeof chipRef === "object" && "current" in chipRef) {
|
|
10053
|
+
chipRef.current = node;
|
|
10054
|
+
}
|
|
10055
|
+
},
|
|
10056
|
+
[chipRef]
|
|
10057
|
+
);
|
|
10058
|
+
const themeScope = useShuffleCoreTheme();
|
|
10059
|
+
const muiTheme = (0, import_material14.useTheme)();
|
|
10060
|
+
const resolvedThemeProp = colorMode || (theme === "system" ? "auto" : theme);
|
|
10061
|
+
const computeIsDark = (0, import_react13.useCallback)(() => {
|
|
10062
|
+
if (resolvedThemeProp === "dark") return true;
|
|
10063
|
+
if (resolvedThemeProp === "light") return false;
|
|
10064
|
+
if (themeScope) return themeScope.isDark;
|
|
10065
|
+
const targetEl = anchorEl || buttonRef.current;
|
|
10066
|
+
if (targetEl) {
|
|
10067
|
+
const ancestorDark = readElementAncestorDark(targetEl);
|
|
10068
|
+
if (ancestorDark !== null) return ancestorDark;
|
|
10069
|
+
}
|
|
10070
|
+
const muiMode = muiTheme?.palette?.mode || muiTheme?.palette?.type || muiTheme?.palette?.theme;
|
|
10071
|
+
if (muiMode === "dark") return true;
|
|
10072
|
+
if (muiMode === "light") return false;
|
|
10073
|
+
if (readHtmlDarkClass2()) return true;
|
|
10074
|
+
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-color-scheme: dark)")?.matches) {
|
|
10075
|
+
return true;
|
|
10076
|
+
}
|
|
10077
|
+
return false;
|
|
10078
|
+
}, [resolvedThemeProp, themeScope, anchorEl, muiTheme]);
|
|
10079
|
+
const useIsoLayoutEffect = typeof window !== "undefined" ? import_react13.useLayoutEffect : import_react13.useEffect;
|
|
10080
|
+
const [isDark, setIsDark] = (0, import_react13.useState)(computeIsDark);
|
|
10081
|
+
useIsoLayoutEffect(() => {
|
|
10082
|
+
setIsDark(computeIsDark());
|
|
10083
|
+
}, [computeIsDark, open]);
|
|
10084
|
+
(0, import_react13.useEffect)(() => {
|
|
10085
|
+
if (typeof window === "undefined") return;
|
|
10086
|
+
const handleThemeChange = () => setIsDark(computeIsDark());
|
|
10087
|
+
window.addEventListener("shuffle:theme-change", handleThemeChange);
|
|
10088
|
+
return () => window.removeEventListener("shuffle:theme-change", handleThemeChange);
|
|
10089
|
+
}, [computeIsDark]);
|
|
10090
|
+
const scopeStyle = isDark ? darkTokenStyle2 : lightTokenStyle2;
|
|
10091
|
+
const scopeClassName = isDark ? "shuffle-core-scope shuffle-mcp-scope dark" : "shuffle-core-scope shuffle-mcp-scope light";
|
|
10092
|
+
const resolvedModeAttr = isDark ? "dark" : "light";
|
|
9598
10093
|
const [supportTick, setSupportTick] = (0, import_react13.useState)(0);
|
|
9599
10094
|
(0, import_react13.useEffect)(() => {
|
|
9600
10095
|
const bump = () => setSupportTick((t) => t + 1);
|
|
@@ -9612,7 +10107,10 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9612
10107
|
const trigger = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9613
10108
|
import_material14.ButtonBase,
|
|
9614
10109
|
{
|
|
9615
|
-
ref:
|
|
10110
|
+
ref: setButtonRefs,
|
|
10111
|
+
className: scopeClassName,
|
|
10112
|
+
"data-shuffle-mode": resolvedModeAttr,
|
|
10113
|
+
style: scopeStyle,
|
|
9616
10114
|
onClick: (e) => setAnchorEl(e.currentTarget),
|
|
9617
10115
|
"aria-label": selectedPreset ? `Skill: ${selectedPreset.label}` : "Select skill",
|
|
9618
10116
|
sx: [
|
|
@@ -9643,19 +10141,14 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9643
10141
|
],
|
|
9644
10142
|
children: [
|
|
9645
10143
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9646
|
-
|
|
10144
|
+
"span",
|
|
9647
10145
|
{
|
|
9648
|
-
|
|
9649
|
-
sx: {
|
|
10146
|
+
style: {
|
|
9650
10147
|
display: "inline-flex",
|
|
9651
10148
|
alignItems: "center",
|
|
9652
10149
|
justifyContent: "center",
|
|
9653
10150
|
flexShrink: 0,
|
|
9654
|
-
color: selectedPreset ? "hsl(var(--primary))" : "inherit"
|
|
9655
|
-
"& svg": {
|
|
9656
|
-
width: variant === "floating" ? 14 : 16,
|
|
9657
|
-
height: variant === "floating" ? 14 : 16
|
|
9658
|
-
}
|
|
10151
|
+
color: selectedPreset ? "hsl(var(--primary))" : "inherit"
|
|
9659
10152
|
},
|
|
9660
10153
|
children: selectedPreset ? selectedPreset.icon ?? void 0 : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.Plus, { size: variant === "floating" ? 12 : 14 })
|
|
9661
10154
|
}
|
|
@@ -9717,8 +10210,6 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9717
10210
|
(p) => p.label.toLowerCase().includes(q) || p.description.toLowerCase().includes(q) || p.tag && p.tag.toLowerCase().includes(q)
|
|
9718
10211
|
);
|
|
9719
10212
|
}, [list, query]);
|
|
9720
|
-
const themeScope = useShuffleCoreTheme();
|
|
9721
|
-
const scopeClassName = themeScope?.scopeClassName || "shuffle-mcp-scope";
|
|
9722
10213
|
const popperZIndex = getPopupZIndex();
|
|
9723
10214
|
const menu = open ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9724
10215
|
import_material14.Popper,
|
|
@@ -9728,7 +10219,8 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9728
10219
|
placement: placement || "bottom-start",
|
|
9729
10220
|
className: scopeClassName,
|
|
9730
10221
|
"data-shuffle-layer": "popup",
|
|
9731
|
-
|
|
10222
|
+
"data-shuffle-mode": resolvedModeAttr,
|
|
10223
|
+
style: { ...scopeStyle, zIndex: popperZIndex },
|
|
9732
10224
|
modifiers: [
|
|
9733
10225
|
{ name: "offset", options: { offset: [0, 6] } },
|
|
9734
10226
|
{ name: "preventOverflow", options: { padding: 8 } }
|
|
@@ -9741,16 +10233,19 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9741
10233
|
{
|
|
9742
10234
|
className: scopeClassName,
|
|
9743
10235
|
"data-shuffle-layer": "popup",
|
|
10236
|
+
"data-shuffle-mode": resolvedModeAttr,
|
|
10237
|
+
style: scopeStyle,
|
|
9744
10238
|
sx: {
|
|
9745
10239
|
width: 360,
|
|
9746
10240
|
maxWidth: "90vw",
|
|
9747
|
-
bgcolor: "hsl(
|
|
9748
|
-
|
|
9749
|
-
|
|
10241
|
+
bgcolor: isDark ? "hsl(0 0% 13%)" : "hsl(0 0% 100%)",
|
|
10242
|
+
color: isDark ? "hsl(0 0% 100%)" : "hsl(0 0% 9%)",
|
|
10243
|
+
border: `1px solid ${isDark ? "hsl(0 0% 20%)" : "hsl(0 0% 80%)"}`,
|
|
10244
|
+
boxShadow: isDark ? "0 8px 24px rgba(0, 0, 0, 0.4)" : "0 8px 24px rgba(0, 0, 0, 0.1)",
|
|
9750
10245
|
overflow: "hidden"
|
|
9751
10246
|
},
|
|
9752
10247
|
children: [
|
|
9753
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material14.Box, { sx: { px: 1.5, py: 1, borderBottom:
|
|
10248
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material14.Box, { sx: { px: 1.5, py: 1, borderBottom: `1px solid ${isDark ? "hsl(0 0% 20%)" : "hsl(0 0% 80%)"}` }, children: [
|
|
9754
10249
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material14.Typography, { sx: { fontSize: "0.72rem", fontWeight: 600, letterSpacing: 1, textTransform: "uppercase", color: "hsl(var(--muted-foreground))" }, children: "Agent skills" }),
|
|
9755
10250
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material14.Typography, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", opacity: 0.7, mt: 0.25 }, children: "Click a skill to seed the prompt. More coming soon." })
|
|
9756
10251
|
] }),
|
|
@@ -9802,17 +10297,17 @@ var AgentPresets = ({ variant = "default", onSelectPreset, selectedPreset, onRem
|
|
|
9802
10297
|
},
|
|
9803
10298
|
children: [
|
|
9804
10299
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9805
|
-
|
|
10300
|
+
"div",
|
|
9806
10301
|
{
|
|
9807
|
-
|
|
9808
|
-
|
|
10302
|
+
style: {
|
|
10303
|
+
marginTop: 2,
|
|
9809
10304
|
width: 26,
|
|
9810
10305
|
height: 26,
|
|
9811
|
-
borderRadius:
|
|
10306
|
+
borderRadius: 4,
|
|
9812
10307
|
display: "flex",
|
|
9813
10308
|
alignItems: "center",
|
|
9814
10309
|
justifyContent: "center",
|
|
9815
|
-
|
|
10310
|
+
backgroundColor: "hsl(var(--muted))",
|
|
9816
10311
|
color: "hsl(var(--muted-foreground))",
|
|
9817
10312
|
flexShrink: 0
|
|
9818
10313
|
},
|
|
@@ -15666,7 +16161,10 @@ var TimelineRow = ({
|
|
|
15666
16161
|
const req = extractAuthRequest(details);
|
|
15667
16162
|
if (!req) return null;
|
|
15668
16163
|
if (authAppsLoading) return null;
|
|
16164
|
+
if (isNoAuthApp(normalizeAgentAppName(req.appName))) return null;
|
|
15669
16165
|
const authed = !!isAppAuthenticated?.(req.appName, req.appId);
|
|
16166
|
+
const stepBlocked = isFailed || effectiveStatus === "WAITING" || effectiveStatus === "PENDING";
|
|
16167
|
+
if (!stepBlocked) return null;
|
|
15670
16168
|
const pretty = req.appName.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
15671
16169
|
const slug = normalizeAgentAppName(req.appName);
|
|
15672
16170
|
const appId = req.appId || appsById[req.appName]?.id || appsById[slug]?.id || null;
|
|
@@ -18923,6 +19421,8 @@ var AgentUI = ({
|
|
|
18923
19421
|
onRemoveSelected: handleRemovePreset,
|
|
18924
19422
|
onSelectPreset: handleSelectPresetInternal,
|
|
18925
19423
|
placement: "bottom-start",
|
|
19424
|
+
theme: theme || (themeScope?.isDark ? "dark" : "light"),
|
|
19425
|
+
colorMode,
|
|
18926
19426
|
sx: {
|
|
18927
19427
|
height: 32,
|
|
18928
19428
|
alignSelf: "center"
|
|
@@ -19447,7 +19947,9 @@ var AgentUI = ({
|
|
|
19447
19947
|
isSupport: isEffectiveSupport,
|
|
19448
19948
|
selectedPreset,
|
|
19449
19949
|
onRemoveSelected: handleRemovePreset,
|
|
19450
|
-
onSelectPreset: handleSelectPresetInternal
|
|
19950
|
+
onSelectPreset: handleSelectPresetInternal,
|
|
19951
|
+
theme: theme || (themeScope?.isDark ? "dark" : "light"),
|
|
19952
|
+
colorMode
|
|
19451
19953
|
}
|
|
19452
19954
|
)
|
|
19453
19955
|
}
|
|
@@ -23988,7 +24490,7 @@ var AgentRunRow = ({ run: run2, onClick, sx, appIcons, onAppClick, apiKey, apiBa
|
|
|
23988
24490
|
if (onAppClick) {
|
|
23989
24491
|
onAppClick({ id: t.id, name: t.name });
|
|
23990
24492
|
} else {
|
|
23991
|
-
navigate(`/apps/${encodeURIComponent(slug)}`);
|
|
24493
|
+
navigate(`/apps/${encodeURIComponent(t.id || slug)}`);
|
|
23992
24494
|
}
|
|
23993
24495
|
},
|
|
23994
24496
|
sx: {
|
|
@@ -29295,6 +29797,7 @@ function useAppLookup(appName) {
|
|
|
29295
29797
|
init_api();
|
|
29296
29798
|
init_fetchBreaker();
|
|
29297
29799
|
init_appsCache();
|
|
29800
|
+
ensureShuffleMcpStyles();
|
|
29298
29801
|
var _fallbackQueryClient = null;
|
|
29299
29802
|
function getFallbackQueryClient() {
|
|
29300
29803
|
if (!_fallbackQueryClient) _fallbackQueryClient = new import_react_query.QueryClient();
|
|
@@ -29340,6 +29843,7 @@ var AppAuthSection2 = withMcpTheme(AppAuthSection, "AppAuthSection");
|
|
|
29340
29843
|
var TryMcpSection2 = withMcpTheme(TryMcpSection, "TryMcpSection");
|
|
29341
29844
|
var SingulActionsPreview2 = withMcpTheme(SingulActionsPreview_default, "SingulActionsPreview");
|
|
29342
29845
|
var AgentUI2 = withMcpTheme(AgentUI_default, "AgentUI");
|
|
29846
|
+
var AgentPresets2 = withMcpTheme(AgentPresets_default, "AgentPresets");
|
|
29343
29847
|
var AgentRunDrawer2 = withMcpTheme(AgentRunDrawer_default, "AgentRunDrawer");
|
|
29344
29848
|
var AskAiButton2 = withMcpTheme(AskAiButton_default, "AskAiButton");
|
|
29345
29849
|
var AskAiDrawer2 = withMcpTheme(AskAiDrawer_default, "AskAiDrawer");
|