@trops/dash-core 0.1.316 → 0.1.318
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.esm.js +108 -57
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +67 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25099,21 +25099,33 @@ var LayoutGridContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
25099
25099
|
// Render empty cell body content (used inside WidgetCard.Body in edit mode)
|
|
25100
25100
|
function renderEmptyCellContent(cellNumber) {
|
|
25101
25101
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25102
|
-
className: "w-full h-full min-h-16 flex flex-col items-center justify-center
|
|
25103
|
-
onClick: function onClick() {
|
|
25104
|
-
return handleClickAdd(cellNumber);
|
|
25105
|
-
},
|
|
25102
|
+
className: "w-full h-full min-h-16 flex flex-col items-center justify-center gap-2",
|
|
25106
25103
|
onContextMenu: function onContextMenu(e) {
|
|
25107
25104
|
return handleCellRightClick(e, cellNumber);
|
|
25108
25105
|
},
|
|
25109
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
25110
|
-
|
|
25111
|
-
|
|
25112
|
-
|
|
25113
|
-
|
|
25114
|
-
|
|
25115
|
-
|
|
25116
|
-
|
|
25106
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25107
|
+
className: "flex flex-col items-center cursor-pointer hover:bg-gray-800/50 rounded-lg px-4 py-2 transition-colors",
|
|
25108
|
+
onClick: function onClick() {
|
|
25109
|
+
return handleClickAdd(cellNumber);
|
|
25110
|
+
},
|
|
25111
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.ButtonIcon, {
|
|
25112
|
+
icon: "plus",
|
|
25113
|
+
textColor: "text-gray-600",
|
|
25114
|
+
hoverTextColor: "hover:text-blue-400",
|
|
25115
|
+
backgroundColor: "bg-transparent"
|
|
25116
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
25117
|
+
className: "text-xs text-gray-600 mt-1",
|
|
25118
|
+
children: "Add widget"
|
|
25119
|
+
})]
|
|
25120
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
25121
|
+
onClick: function onClick() {
|
|
25122
|
+
return window.dispatchEvent(new Event("dash:open-widget-builder"));
|
|
25123
|
+
},
|
|
25124
|
+
className: "flex items-center gap-1.5 px-3 py-1 rounded-md text-xs text-indigo-400/70 hover:text-indigo-300 hover:bg-indigo-900/20 transition-colors",
|
|
25125
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
25126
|
+
icon: "wand-magic-sparkles",
|
|
25127
|
+
className: "h-2.5 w-2.5"
|
|
25128
|
+
}), "Build with AI"]
|
|
25117
25129
|
})]
|
|
25118
25130
|
});
|
|
25119
25131
|
}
|
|
@@ -53787,11 +53799,36 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
|
|
|
53787
53799
|
* StreamingText
|
|
53788
53800
|
*
|
|
53789
53801
|
* Renders partial text with a blinking cursor while streaming is active.
|
|
53802
|
+
* Shows "Thinking..." when streaming has started but no text has arrived yet.
|
|
53790
53803
|
*/
|
|
53791
53804
|
var StreamingText = function StreamingText(_ref) {
|
|
53792
53805
|
var text = _ref.text,
|
|
53793
53806
|
isStreaming = _ref.isStreaming;
|
|
53794
53807
|
if (!text && !isStreaming) return null;
|
|
53808
|
+
if (isStreaming && !text) {
|
|
53809
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53810
|
+
className: "flex items-center gap-2 text-gray-400 text-sm",
|
|
53811
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53812
|
+
className: "inline-flex gap-1",
|
|
53813
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53814
|
+
className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
|
|
53815
|
+
style: {
|
|
53816
|
+
animationDelay: "0ms"
|
|
53817
|
+
}
|
|
53818
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53819
|
+
className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
|
|
53820
|
+
style: {
|
|
53821
|
+
animationDelay: "150ms"
|
|
53822
|
+
}
|
|
53823
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53824
|
+
className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
|
|
53825
|
+
style: {
|
|
53826
|
+
animationDelay: "300ms"
|
|
53827
|
+
}
|
|
53828
|
+
})]
|
|
53829
|
+
}), "Thinking..."]
|
|
53830
|
+
});
|
|
53831
|
+
}
|
|
53795
53832
|
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53796
53833
|
className: "whitespace-pre-wrap break-words",
|
|
53797
53834
|
children: [text, isStreaming && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -53891,15 +53928,18 @@ var MessageBubble = function MessageBubble(_ref2) {
|
|
|
53891
53928
|
}).map(function (c) {
|
|
53892
53929
|
return c.text;
|
|
53893
53930
|
}).join("") : "";
|
|
53894
|
-
return /*#__PURE__*/jsxRuntime.
|
|
53895
|
-
className: "
|
|
53896
|
-
children:
|
|
53897
|
-
className: "
|
|
53898
|
-
children: "
|
|
53899
|
-
|
|
53900
|
-
|
|
53901
|
-
|
|
53902
|
-
|
|
53931
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53932
|
+
className: "flex justify-end mb-4",
|
|
53933
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53934
|
+
className: "max-w-[85%]",
|
|
53935
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53936
|
+
className: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 mb-1 text-right",
|
|
53937
|
+
children: "You"
|
|
53938
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53939
|
+
className: "px-3 py-2 rounded-lg bg-indigo-700/40 text-sm text-gray-100 whitespace-pre-wrap break-words leading-relaxed",
|
|
53940
|
+
children: text
|
|
53941
|
+
})]
|
|
53942
|
+
})
|
|
53903
53943
|
});
|
|
53904
53944
|
}
|
|
53905
53945
|
if (role === "assistant") {
|
|
@@ -53940,10 +53980,10 @@ var MessageBubble = function MessageBubble(_ref2) {
|
|
|
53940
53980
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53941
53981
|
className: "mb-4",
|
|
53942
53982
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53943
|
-
className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1
|
|
53983
|
+
className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1",
|
|
53944
53984
|
children: "Assistant"
|
|
53945
53985
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53946
|
-
className: "text-sm leading-relaxed",
|
|
53986
|
+
className: "text-sm leading-relaxed px-3 py-2 rounded-lg bg-gray-800/40",
|
|
53947
53987
|
children: [isStreaming && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53948
53988
|
className: "text-gray-200",
|
|
53949
53989
|
children: /*#__PURE__*/jsxRuntime.jsx(StreamingText, {
|
|
@@ -54161,7 +54201,9 @@ function ChatCore(_ref) {
|
|
|
54161
54201
|
_ref$backend = _ref.backend,
|
|
54162
54202
|
backend = _ref$backend === void 0 ? "anthropic" : _ref$backend,
|
|
54163
54203
|
_ref$onPublishEvent = _ref.onPublishEvent,
|
|
54164
|
-
onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent
|
|
54204
|
+
onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent,
|
|
54205
|
+
_ref$hideToolsBanner = _ref.hideToolsBanner,
|
|
54206
|
+
hideToolsBanner = _ref$hideToolsBanner === void 0 ? false : _ref$hideToolsBanner;
|
|
54165
54207
|
var mainApi = window.mainApi;
|
|
54166
54208
|
|
|
54167
54209
|
// Conversation state
|
|
@@ -54626,7 +54668,7 @@ function ChatCore(_ref) {
|
|
|
54626
54668
|
className: "px-3 py-1 text-xs rounded bg-yellow-800/60 hover:bg-yellow-700/60 text-yellow-200 border border-yellow-600/50 transition-colors",
|
|
54627
54669
|
children: "Check Again"
|
|
54628
54670
|
})]
|
|
54629
|
-
}), isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54671
|
+
}), !hideToolsBanner && isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54630
54672
|
className: "mx-3 mt-2 p-2 bg-gray-800/50 border border-gray-700 rounded text-gray-400 text-xs",
|
|
54631
54673
|
children: "No MCP tools connected. Connect providers (GitHub, Slack, etc.) to enable tool-use."
|
|
54632
54674
|
}), isCliBackend && cliAvailable && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|