@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.esm.js +25 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +25 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17748,11 +17748,18 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
17748
17748
|
// Filter widgets based on search, author, and provider
|
|
17749
17749
|
var getFilteredWidgets = function getFilteredWidgets() {
|
|
17750
17750
|
var filtered = widgets.filter(function (widget) {
|
|
17751
|
-
// Drafts are in-progress widgets — they
|
|
17752
|
-
//
|
|
17753
|
-
//
|
|
17754
|
-
//
|
|
17755
|
-
|
|
17751
|
+
// Drafts are in-progress widgets — they live under
|
|
17752
|
+
// `@ai-built/<name>-draft-<shortId>/` on disk and shouldn't
|
|
17753
|
+
// appear in the placement picker. EnhancedWidgetDropdown
|
|
17754
|
+
// reads from ComponentManager directly, so we detect drafts
|
|
17755
|
+
// via the `_sourcePackage` name pattern (mirrors the
|
|
17756
|
+
// matching backstop in useInstalledWidgets#classifyWidget).
|
|
17757
|
+
// useInstalledWidgets sets `widget.kind` for consumers that
|
|
17758
|
+
// go through that hook; check it too for forward-compat.
|
|
17759
|
+
var sourcePackage = widget._sourcePackage || "";
|
|
17760
|
+
if (widget.kind === "draft" || /-draft-[A-Za-z0-9]+$/.test(sourcePackage)) {
|
|
17761
|
+
return false;
|
|
17762
|
+
}
|
|
17756
17763
|
|
|
17757
17764
|
// Search filter
|
|
17758
17765
|
var searchLower = searchQuery.toLowerCase();
|
|
@@ -50228,19 +50235,25 @@ var WidgetsSection = function WidgetsSection(_ref) {
|
|
|
50228
50235
|
},
|
|
50229
50236
|
className: isSelected ? "bg-white/10 opacity-100" : "",
|
|
50230
50237
|
children: /*#__PURE__*/jsxs("span", {
|
|
50231
|
-
className: "flex flex-col",
|
|
50238
|
+
className: "flex flex-col min-w-0",
|
|
50232
50239
|
"data-testid": "widget-row-".concat(widget.name),
|
|
50233
50240
|
children: [/*#__PURE__*/jsxs("span", {
|
|
50234
|
-
className: "flex items-center gap-2",
|
|
50235
|
-
children: [widget.
|
|
50236
|
-
|
|
50237
|
-
}), widget.kind === "draft" && /*#__PURE__*/jsx("span", {
|
|
50238
|
-
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",
|
|
50241
|
+
className: "flex items-center gap-2 min-w-0",
|
|
50242
|
+
children: [widget.kind === "draft" && /*#__PURE__*/jsx("span", {
|
|
50243
|
+
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",
|
|
50239
50244
|
"data-testid": "widget-draft-chip-".concat(widget.name),
|
|
50240
50245
|
title: "In-progress widget \u2014 open to Resume or Delete from the action menu",
|
|
50241
50246
|
children: "Draft"
|
|
50247
|
+
}), widget.source === "builtin" && /*#__PURE__*/jsx("span", {
|
|
50248
|
+
className: "flex-shrink-0",
|
|
50249
|
+
children: /*#__PURE__*/jsx(Tag3, {
|
|
50250
|
+
text: "Built-in"
|
|
50251
|
+
})
|
|
50252
|
+
}), /*#__PURE__*/jsx("span", {
|
|
50253
|
+
className: "truncate min-w-0",
|
|
50254
|
+
children: widget.displayName || widget.name
|
|
50242
50255
|
}), widget.kind !== "draft" && updates.has(widget.name) && /*#__PURE__*/jsx("span", {
|
|
50243
|
-
className: "text-[10px] text-blue-400 font-medium",
|
|
50256
|
+
className: "flex-shrink-0 text-[10px] text-blue-400 font-medium",
|
|
50244
50257
|
"data-testid": "widget-update-badge-".concat(widget.name),
|
|
50245
50258
|
children: "Update"
|
|
50246
50259
|
})]
|