@trops/dash-core 0.1.606 → 0.1.607

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.js CHANGED
@@ -17766,11 +17766,18 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
17766
17766
  // Filter widgets based on search, author, and provider
17767
17767
  var getFilteredWidgets = function getFilteredWidgets() {
17768
17768
  var filtered = widgets.filter(function (widget) {
17769
- // Drafts are in-progress widgets — they appear in
17770
- // Settings → Widgets (as a Draft chip with Resume/Delete
17771
- // affordances) but never in the dashboard placement picker
17772
- // since they're not finished products.
17773
- if (widget.kind === "draft") return false;
17769
+ // Drafts are in-progress widgets — they live under
17770
+ // `@ai-built/<name>-draft-<shortId>/` on disk and shouldn't
17771
+ // appear in the placement picker. EnhancedWidgetDropdown
17772
+ // reads from ComponentManager directly, so we detect drafts
17773
+ // via the `_sourcePackage` name pattern (mirrors the
17774
+ // matching backstop in useInstalledWidgets#classifyWidget).
17775
+ // useInstalledWidgets sets `widget.kind` for consumers that
17776
+ // go through that hook; check it too for forward-compat.
17777
+ var sourcePackage = widget._sourcePackage || "";
17778
+ if (widget.kind === "draft" || /-draft-[A-Za-z0-9]+$/.test(sourcePackage)) {
17779
+ return false;
17780
+ }
17774
17781
 
17775
17782
  // Search filter
17776
17783
  var searchLower = searchQuery.toLowerCase();
@@ -50246,19 +50253,25 @@ var WidgetsSection = function WidgetsSection(_ref) {
50246
50253
  },
50247
50254
  className: isSelected ? "bg-white/10 opacity-100" : "",
50248
50255
  children: /*#__PURE__*/jsxRuntime.jsxs("span", {
50249
- className: "flex flex-col",
50256
+ className: "flex flex-col min-w-0",
50250
50257
  "data-testid": "widget-row-".concat(widget.name),
50251
50258
  children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
50252
- className: "flex items-center gap-2",
50253
- children: [widget.displayName || widget.name, widget.source === "builtin" && /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
50254
- text: "Built-in"
50255
- }), widget.kind === "draft" && /*#__PURE__*/jsxRuntime.jsx("span", {
50256
- className: "px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-amber-900/40 text-amber-200 border border-amber-700/30",
50259
+ className: "flex items-center gap-2 min-w-0",
50260
+ children: [widget.kind === "draft" && /*#__PURE__*/jsxRuntime.jsx("span", {
50261
+ className: "flex-shrink-0 px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-amber-900 text-amber-200 border border-amber-700",
50257
50262
  "data-testid": "widget-draft-chip-".concat(widget.name),
50258
50263
  title: "In-progress widget \u2014 open to Resume or Delete from the action menu",
50259
50264
  children: "Draft"
50265
+ }), widget.source === "builtin" && /*#__PURE__*/jsxRuntime.jsx("span", {
50266
+ className: "flex-shrink-0",
50267
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
50268
+ text: "Built-in"
50269
+ })
50270
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
50271
+ className: "truncate min-w-0",
50272
+ children: widget.displayName || widget.name
50260
50273
  }), widget.kind !== "draft" && updates.has(widget.name) && /*#__PURE__*/jsxRuntime.jsx("span", {
50261
- className: "text-[10px] text-blue-400 font-medium",
50274
+ className: "flex-shrink-0 text-[10px] text-blue-400 font-medium",
50262
50275
  "data-testid": "widget-update-badge-".concat(widget.name),
50263
50276
  children: "Update"
50264
50277
  })]