@ai-matrx/agents 0.21.40 → 0.21.42
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/CHANGELOG.md +11 -0
- package/dist/catalog/react/index.cjs +15 -1
- package/dist/catalog/react/index.cjs.map +1 -1
- package/dist/catalog/react/index.d.cts +17 -1
- package/dist/catalog/react/index.d.ts +17 -1
- package/dist/catalog/react/index.js +15 -1
- package/dist/catalog/react/index.js.map +1 -1
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/mandates/snapshots/keys.0.21.41.json +652 -0
- package/mandates/snapshots/keys.0.21.42.json +652 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.42
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/matrx-agents/v0.21.41..npm/matrx-agents/v0.21.42 -- apps/shared/matrx-agents`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.21.41
|
|
10
|
+
### Unreleased
|
|
11
|
+
|
|
12
|
+
- **A side-opening `AgentListDropdown` never leaves the screen** (blind run PB-03, /chat/new in an 800px pane, 2026-10-01): with `contentSide="left"|"right"` the 680px panel is placed at open time by `sideThatFits` — the asked side when it fits, else the opposite side, else below (where Radix shifts it into view). Before, it ran off the left edge and the search, tabs and names were cut off. Guard: `catalog/react/side-that-fits.test.tsx`. Consumer action: none.
|
|
13
|
+
|
|
3
14
|
## 0.21.40
|
|
4
15
|
|
|
5
16
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -54,6 +54,7 @@ __export(react_exports, {
|
|
|
54
54
|
orchestraLabel: () => orchestraLabel,
|
|
55
55
|
orchestraModeLabel: () => orchestraModeLabel,
|
|
56
56
|
panelHeightBelow: () => panelHeightBelow,
|
|
57
|
+
sideThatFits: () => sideThatFits,
|
|
57
58
|
useAgentCatalog: () => useAgentCatalog,
|
|
58
59
|
useAgentCatalogRows: () => useAgentCatalogRows,
|
|
59
60
|
useAgentCatalogState: () => useAgentCatalogState,
|
|
@@ -1598,6 +1599,17 @@ function panelHeightBelow(trigger, options = {}) {
|
|
|
1598
1599
|
if (below >= full) return null;
|
|
1599
1600
|
return below >= minUsable ? `${Math.floor(below)}px` : null;
|
|
1600
1601
|
}
|
|
1602
|
+
function sideThatFits(trigger, side, options = {}) {
|
|
1603
|
+
if (!trigger || typeof window === "undefined" || side !== "left" && side !== "right") return side;
|
|
1604
|
+
const width = options.width ?? 680;
|
|
1605
|
+
const gap = options.gap ?? 16;
|
|
1606
|
+
const rect = trigger.getBoundingClientRect();
|
|
1607
|
+
const room = { left: rect.left - gap, right: window.innerWidth - rect.right - gap };
|
|
1608
|
+
if (room[side] >= width) return side;
|
|
1609
|
+
const other = side === "left" ? "right" : "left";
|
|
1610
|
+
if (room[other] >= width) return other;
|
|
1611
|
+
return "bottom";
|
|
1612
|
+
}
|
|
1601
1613
|
|
|
1602
1614
|
// catalog/react/AgentFilterBar.tsx
|
|
1603
1615
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
@@ -2501,6 +2513,7 @@ function AgentListDropdown({
|
|
|
2501
2513
|
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
2502
2514
|
const triggerRef = (0, import_react8.useRef)(null);
|
|
2503
2515
|
const [fitHeight, setFitHeight] = (0, import_react8.useState)(null);
|
|
2516
|
+
const [openSide, setOpenSide] = (0, import_react8.useState)(contentSide);
|
|
2504
2517
|
const core = useAgentListCore({
|
|
2505
2518
|
consumerId,
|
|
2506
2519
|
...onSelect ? { onSelect } : {},
|
|
@@ -2522,6 +2535,7 @@ function AgentListDropdown({
|
|
|
2522
2535
|
setOpen(nextOpen);
|
|
2523
2536
|
if (nextOpen) {
|
|
2524
2537
|
setFitHeight(contentSide || isMobile ? null : panelHeightBelow(triggerRef.current));
|
|
2538
|
+
setOpenSide(contentSide && !isMobile ? sideThatFits(triggerRef.current, contentSide) : contentSide);
|
|
2525
2539
|
}
|
|
2526
2540
|
};
|
|
2527
2541
|
const resolveAgentHref = (0, import_react8.useMemo)(() => {
|
|
@@ -2582,7 +2596,7 @@ function AgentListDropdown({
|
|
|
2582
2596
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2583
2597
|
import_design_system8.PopoverContent,
|
|
2584
2598
|
{
|
|
2585
|
-
...
|
|
2599
|
+
...openSide ? { side: openSide } : fitHeight ? { side: "bottom" } : {},
|
|
2586
2600
|
align: "start",
|
|
2587
2601
|
sideOffset: 4,
|
|
2588
2602
|
collisionPadding: 12,
|