@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 CHANGED
@@ -8583,7 +8583,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
8583
8583
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
8584
8584
 
8585
8585
  var keys = objectKeys$2;
8586
- var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8586
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8587
8587
 
8588
8588
  var toStr$4 = Object.prototype.toString;
8589
8589
  var concat = Array.prototype.concat;
@@ -8616,7 +8616,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
8616
8616
  var defineProperties$1 = function (object, map) {
8617
8617
  var predicates = arguments.length > 2 ? arguments[2] : {};
8618
8618
  var props = keys(map);
8619
- if (hasSymbols$5) {
8619
+ if (hasSymbols$4) {
8620
8620
  props = concat.call(props, Object.getOwnPropertySymbols(map));
8621
8621
  }
8622
8622
  for (var i = 0; i < props.length; i += 1) {
@@ -8682,11 +8682,11 @@ var sign$1 = function sign(number) {
8682
8682
  };
8683
8683
 
8684
8684
  var shams$1;
8685
- var hasRequiredShams;
8685
+ var hasRequiredShams$1;
8686
8686
 
8687
- function requireShams () {
8688
- if (hasRequiredShams) return shams$1;
8689
- hasRequiredShams = 1;
8687
+ function requireShams$1 () {
8688
+ if (hasRequiredShams$1) return shams$1;
8689
+ hasRequiredShams$1 = 1;
8690
8690
 
8691
8691
  /** @type {import('./shams')} */
8692
8692
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -8735,10 +8735,10 @@ function requireShams () {
8735
8735
  }
8736
8736
 
8737
8737
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
8738
- var hasSymbolSham = requireShams();
8738
+ var hasSymbolSham = requireShams$1();
8739
8739
 
8740
8740
  /** @type {import('.')} */
8741
- var hasSymbols$4 = function hasNativeSymbols() {
8741
+ var hasSymbols$3 = function hasNativeSymbols() {
8742
8742
  if (typeof origSymbol !== 'function') { return false; }
8743
8743
  if (typeof Symbol !== 'function') { return false; }
8744
8744
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9042,7 +9042,7 @@ var ThrowTypeError = $gOPD$1
9042
9042
  }())
9043
9043
  : throwTypeError;
9044
9044
 
9045
- var hasSymbols$3 = hasSymbols$4();
9045
+ var hasSymbols$2 = hasSymbols$3();
9046
9046
 
9047
9047
  var getProto$2 = getProto$3;
9048
9048
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9060,7 +9060,7 @@ var INTRINSICS = {
9060
9060
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9061
9061
  '%Array%': Array,
9062
9062
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9063
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9063
+ '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9064
9064
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9065
9065
  '%AsyncFunction%': needsEval,
9066
9066
  '%AsyncGenerator%': needsEval,
@@ -9091,10 +9091,10 @@ var INTRINSICS = {
9091
9091
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9092
9092
  '%isFinite%': isFinite,
9093
9093
  '%isNaN%': isNaN,
9094
- '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9094
+ '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9095
9095
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9096
9096
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9097
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9097
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9098
9098
  '%Math%': Math,
9099
9099
  '%Number%': Number,
9100
9100
  '%Object%': $Object$2,
@@ -9108,11 +9108,11 @@ var INTRINSICS = {
9108
9108
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9109
9109
  '%RegExp%': RegExp,
9110
9110
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9111
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9111
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9112
9112
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9113
9113
  '%String%': String,
9114
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9115
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9114
+ '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9115
+ '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9116
9116
  '%SyntaxError%': $SyntaxError$1,
9117
9117
  '%ThrowTypeError%': ThrowTypeError,
9118
9118
  '%TypedArray%': TypedArray,
@@ -9465,12 +9465,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
9465
9465
 
9466
9466
  // modified from https://github.com/es-shims/es6-shim
9467
9467
  var objectKeys$1 = objectKeys$2;
9468
- var hasSymbols$2 = requireShams()();
9468
+ var hasSymbols$1 = requireShams$1()();
9469
9469
  var callBound$h = callBound$i;
9470
9470
  var $Object$1 = esObjectAtoms;
9471
9471
  var $push = callBound$h('Array.prototype.push');
9472
9472
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
9473
- var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
9473
+ var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
9474
9474
 
9475
9475
  // eslint-disable-next-line no-unused-vars
9476
9476
  var implementation$8 = function assign(target, source1) {
@@ -9484,7 +9484,7 @@ var implementation$8 = function assign(target, source1) {
9484
9484
 
9485
9485
  // step 3.a.ii:
9486
9486
  var keys = objectKeys$1(from);
9487
- var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9487
+ var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9488
9488
  if (getSymbols) {
9489
9489
  var syms = getSymbols(from);
9490
9490
  for (var j = 0; j < syms.length; ++j) {
@@ -9781,14 +9781,23 @@ var regexp_prototype_flags = flagsBound;
9781
9781
 
9782
9782
  var esGetIterator = {exports: {}};
9783
9783
 
9784
- var hasSymbols$1 = requireShams();
9784
+ var shams;
9785
+ var hasRequiredShams;
9785
9786
 
9786
- /** @type {import('.')} */
9787
- var shams = function hasToStringTagShams() {
9788
- return hasSymbols$1() && !!Symbol.toStringTag;
9789
- };
9787
+ function requireShams () {
9788
+ if (hasRequiredShams) return shams;
9789
+ hasRequiredShams = 1;
9790
+
9791
+ var hasSymbols = requireShams$1();
9790
9792
 
9791
- var hasToStringTag$7 = shams();
9793
+ /** @type {import('.')} */
9794
+ shams = function hasToStringTagShams() {
9795
+ return hasSymbols() && !!Symbol.toStringTag;
9796
+ };
9797
+ return shams;
9798
+ }
9799
+
9800
+ var hasToStringTag$7 = requireShams()();
9792
9801
  var callBound$f = callBound$i;
9793
9802
 
9794
9803
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -10825,7 +10834,7 @@ var tryStringObject = function tryStringObject(value) {
10825
10834
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
10826
10835
  var $toString$6 = callBound$c('Object.prototype.toString');
10827
10836
  var strClass = '[object String]';
10828
- var hasToStringTag$6 = shams();
10837
+ var hasToStringTag$6 = requireShams()();
10829
10838
 
10830
10839
  /** @type {import('.')} */
10831
10840
  var isString$2 = function isString(value) {
@@ -10941,7 +10950,7 @@ var isSet$2 = exported$1 || function isSet(x) {
10941
10950
  var isArguments$1 = isArguments$2;
10942
10951
  var getStopIterationIterator = stopIterationIterator;
10943
10952
 
10944
- if (hasSymbols$4() || requireShams()()) {
10953
+ if (hasSymbols$3() || requireShams$1()()) {
10945
10954
  var $iterator = Symbol.iterator;
10946
10955
  // Symbol is available natively or shammed
10947
10956
  // natively:
@@ -11230,7 +11239,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11230
11239
  /** @type {(value: unknown) => string} */
11231
11240
  var toStr$2 = callBound$9('Object.prototype.toString');
11232
11241
  var dateClass = '[object Date]';
11233
- var hasToStringTag$5 = shams();
11242
+ var hasToStringTag$5 = requireShams()();
11234
11243
 
11235
11244
  /** @type {import('.')} */
11236
11245
  var isDateObject = function isDateObject(value) {
@@ -11241,7 +11250,7 @@ var isDateObject = function isDateObject(value) {
11241
11250
  };
11242
11251
 
11243
11252
  var callBound$8 = callBound$i;
11244
- var hasToStringTag$4 = shams();
11253
+ var hasToStringTag$4 = requireShams()();
11245
11254
  var hasOwn = hasown;
11246
11255
  var gOPD$1 = gopd$1;
11247
11256
 
@@ -11346,7 +11355,7 @@ var tryNumberObject = function tryNumberObject(value) {
11346
11355
  };
11347
11356
  var $toString$3 = callBound$6('Object.prototype.toString');
11348
11357
  var numClass = '[object Number]';
11349
- var hasToStringTag$3 = shams();
11358
+ var hasToStringTag$3 = requireShams()();
11350
11359
 
11351
11360
  /** @type {import('.')} */
11352
11361
  var isNumberObject = function isNumberObject(value) {
@@ -11373,7 +11382,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
11373
11382
  }
11374
11383
  };
11375
11384
  var boolClass = '[object Boolean]';
11376
- var hasToStringTag$2 = shams();
11385
+ var hasToStringTag$2 = requireShams()();
11377
11386
 
11378
11387
  /** @type {import('.')} */
11379
11388
  var isBooleanObject = function isBoolean(value) {
@@ -11415,7 +11424,7 @@ function requireSafeRegexTest () {
11415
11424
 
11416
11425
  var callBound$4 = callBound$i;
11417
11426
  var $toString$1 = callBound$4('Object.prototype.toString');
11418
- var hasSymbols = hasSymbols$4();
11427
+ var hasSymbols = hasSymbols$3();
11419
11428
  var safeRegexTest = requireSafeRegexTest();
11420
11429
 
11421
11430
  if (hasSymbols) {
@@ -11861,7 +11870,7 @@ var gOPD = gopd$1;
11861
11870
  var getProto = getProto$3;
11862
11871
 
11863
11872
  var $toString = callBound$2('Object.prototype.toString');
11864
- var hasToStringTag = shams();
11873
+ var hasToStringTag = requireShams()();
11865
11874
 
11866
11875
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
11867
11876
  var typedArrays = availableTypedArrays();
@@ -25081,21 +25090,33 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
25081
25090
  // Render empty cell body content (used inside WidgetCard.Body in edit mode)
25082
25091
  function renderEmptyCellContent(cellNumber) {
25083
25092
  return /*#__PURE__*/jsxs("div", {
25084
- className: "w-full h-full min-h-16 flex flex-col items-center justify-center hover:bg-gray-800/50 cursor-pointer transition-colors",
25085
- onClick: function onClick() {
25086
- return handleClickAdd(cellNumber);
25087
- },
25093
+ className: "w-full h-full min-h-16 flex flex-col items-center justify-center gap-2",
25088
25094
  onContextMenu: function onContextMenu(e) {
25089
25095
  return handleCellRightClick(e, cellNumber);
25090
25096
  },
25091
- children: [/*#__PURE__*/jsx(ButtonIcon, {
25092
- icon: "plus",
25093
- textColor: "text-gray-600",
25094
- hoverTextColor: "hover:text-blue-400",
25095
- backgroundColor: "bg-transparent"
25096
- }), /*#__PURE__*/jsx("span", {
25097
- className: "text-xs text-gray-600 mt-1",
25098
- children: "Add widget"
25097
+ children: [/*#__PURE__*/jsxs("div", {
25098
+ className: "flex flex-col items-center cursor-pointer hover:bg-gray-800/50 rounded-lg px-4 py-2 transition-colors",
25099
+ onClick: function onClick() {
25100
+ return handleClickAdd(cellNumber);
25101
+ },
25102
+ children: [/*#__PURE__*/jsx(ButtonIcon, {
25103
+ icon: "plus",
25104
+ textColor: "text-gray-600",
25105
+ hoverTextColor: "hover:text-blue-400",
25106
+ backgroundColor: "bg-transparent"
25107
+ }), /*#__PURE__*/jsx("span", {
25108
+ className: "text-xs text-gray-600 mt-1",
25109
+ children: "Add widget"
25110
+ })]
25111
+ }), /*#__PURE__*/jsxs("button", {
25112
+ onClick: function onClick() {
25113
+ return window.dispatchEvent(new Event("dash:open-widget-builder"));
25114
+ },
25115
+ 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",
25116
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
25117
+ icon: "wand-magic-sparkles",
25118
+ className: "h-2.5 w-2.5"
25119
+ }), "Build with AI"]
25099
25120
  })]
25100
25121
  });
25101
25122
  }
@@ -53769,11 +53790,36 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
53769
53790
  * StreamingText
53770
53791
  *
53771
53792
  * Renders partial text with a blinking cursor while streaming is active.
53793
+ * Shows "Thinking..." when streaming has started but no text has arrived yet.
53772
53794
  */
53773
53795
  var StreamingText = function StreamingText(_ref) {
53774
53796
  var text = _ref.text,
53775
53797
  isStreaming = _ref.isStreaming;
53776
53798
  if (!text && !isStreaming) return null;
53799
+ if (isStreaming && !text) {
53800
+ return /*#__PURE__*/jsxs("span", {
53801
+ className: "flex items-center gap-2 text-gray-400 text-sm",
53802
+ children: [/*#__PURE__*/jsxs("span", {
53803
+ className: "inline-flex gap-1",
53804
+ children: [/*#__PURE__*/jsx("span", {
53805
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53806
+ style: {
53807
+ animationDelay: "0ms"
53808
+ }
53809
+ }), /*#__PURE__*/jsx("span", {
53810
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53811
+ style: {
53812
+ animationDelay: "150ms"
53813
+ }
53814
+ }), /*#__PURE__*/jsx("span", {
53815
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53816
+ style: {
53817
+ animationDelay: "300ms"
53818
+ }
53819
+ })]
53820
+ }), "Thinking..."]
53821
+ });
53822
+ }
53777
53823
  return /*#__PURE__*/jsxs("span", {
53778
53824
  className: "whitespace-pre-wrap break-words",
53779
53825
  children: [text, isStreaming && /*#__PURE__*/jsx("span", {
@@ -53873,15 +53919,18 @@ var MessageBubble = function MessageBubble(_ref2) {
53873
53919
  }).map(function (c) {
53874
53920
  return c.text;
53875
53921
  }).join("") : "";
53876
- return /*#__PURE__*/jsxs("div", {
53877
- className: "mb-4 pt-3 border-t border-gray-700/30",
53878
- children: [/*#__PURE__*/jsx("div", {
53879
- className: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 mb-1.5",
53880
- children: "You"
53881
- }), /*#__PURE__*/jsx("div", {
53882
- className: "text-sm text-gray-100 whitespace-pre-wrap break-words leading-relaxed",
53883
- children: text
53884
- })]
53922
+ return /*#__PURE__*/jsx("div", {
53923
+ className: "flex justify-end mb-4",
53924
+ children: /*#__PURE__*/jsxs("div", {
53925
+ className: "max-w-[85%]",
53926
+ children: [/*#__PURE__*/jsx("div", {
53927
+ className: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 mb-1 text-right",
53928
+ children: "You"
53929
+ }), /*#__PURE__*/jsx("div", {
53930
+ className: "px-3 py-2 rounded-lg bg-indigo-700/40 text-sm text-gray-100 whitespace-pre-wrap break-words leading-relaxed",
53931
+ children: text
53932
+ })]
53933
+ })
53885
53934
  });
53886
53935
  }
53887
53936
  if (role === "assistant") {
@@ -53922,10 +53971,10 @@ var MessageBubble = function MessageBubble(_ref2) {
53922
53971
  return /*#__PURE__*/jsxs("div", {
53923
53972
  className: "mb-4",
53924
53973
  children: [/*#__PURE__*/jsx("div", {
53925
- className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1.5",
53974
+ className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1",
53926
53975
  children: "Assistant"
53927
53976
  }), /*#__PURE__*/jsxs("div", {
53928
- className: "text-sm leading-relaxed",
53977
+ className: "text-sm leading-relaxed px-3 py-2 rounded-lg bg-gray-800/40",
53929
53978
  children: [isStreaming && /*#__PURE__*/jsx("div", {
53930
53979
  className: "text-gray-200",
53931
53980
  children: /*#__PURE__*/jsx(StreamingText, {
@@ -54143,7 +54192,9 @@ function ChatCore(_ref) {
54143
54192
  _ref$backend = _ref.backend,
54144
54193
  backend = _ref$backend === void 0 ? "anthropic" : _ref$backend,
54145
54194
  _ref$onPublishEvent = _ref.onPublishEvent,
54146
- onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent;
54195
+ onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent,
54196
+ _ref$hideToolsBanner = _ref.hideToolsBanner,
54197
+ hideToolsBanner = _ref$hideToolsBanner === void 0 ? false : _ref$hideToolsBanner;
54147
54198
  var mainApi = window.mainApi;
54148
54199
 
54149
54200
  // Conversation state
@@ -54608,7 +54659,7 @@ function ChatCore(_ref) {
54608
54659
  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",
54609
54660
  children: "Check Again"
54610
54661
  })]
54611
- }), isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsx("div", {
54662
+ }), !hideToolsBanner && isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsx("div", {
54612
54663
  className: "mx-3 mt-2 p-2 bg-gray-800/50 border border-gray-700 rounded text-gray-400 text-xs",
54613
54664
  children: "No MCP tools connected. Connect providers (GitHub, Slack, etc.) to enable tool-use."
54614
54665
  }), isCliBackend && cliAvailable && messages.length === 0 && /*#__PURE__*/jsx("div", {