@40rty/ams-ui 0.5.7 → 0.5.9
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
useLabels
|
|
4
|
-
useTextDirection
|
|
3
|
+
useLabels
|
|
5
4
|
} from "./chunk-FSY7MEP5.js";
|
|
6
5
|
|
|
7
6
|
// src/shell/SideDock.tsx
|
|
@@ -25,7 +24,6 @@ function SideDock({
|
|
|
25
24
|
}) {
|
|
26
25
|
const reduceMotion = useReducedMotion();
|
|
27
26
|
const resizeLabel = useLabels().composer.resizePanel;
|
|
28
|
-
const rtl = useTextDirection() === "rtl";
|
|
29
27
|
const dragStart = React.useRef(null);
|
|
30
28
|
const onHandleDown = (e) => {
|
|
31
29
|
if (onWidthChange === void 0 || typeof width !== "number") return;
|
|
@@ -37,8 +35,7 @@ function SideDock({
|
|
|
37
35
|
const onHandleMove = (e) => {
|
|
38
36
|
if (dragStart.current === null || onWidthChange === void 0) return;
|
|
39
37
|
const moved = dragStart.current.x - e.clientX;
|
|
40
|
-
const
|
|
41
|
-
const next = Math.min(maxWidth, Math.max(minWidth, dragStart.current.w + delta));
|
|
38
|
+
const next = Math.min(maxWidth, Math.max(minWidth, dragStart.current.w + moved));
|
|
42
39
|
onWidthChange(next);
|
|
43
40
|
};
|
|
44
41
|
const onHandleUp = (e) => {
|
|
@@ -60,7 +57,7 @@ function SideDock({
|
|
|
60
57
|
style: {
|
|
61
58
|
position: "absolute",
|
|
62
59
|
top,
|
|
63
|
-
|
|
60
|
+
right: 0,
|
|
64
61
|
bottom: 0,
|
|
65
62
|
width,
|
|
66
63
|
zIndex,
|
|
@@ -75,13 +72,13 @@ function SideDock({
|
|
|
75
72
|
style: {
|
|
76
73
|
position: "absolute",
|
|
77
74
|
inset: 0,
|
|
78
|
-
transform: open ? "translateX(0)" : `translateX(calc(
|
|
75
|
+
transform: open ? "translateX(0)" : `translateX(calc(100% + ${OFFSCREEN_OVERSHOOT_PX}px))`,
|
|
79
76
|
visibility: open ? "visible" : "hidden",
|
|
80
77
|
transition
|
|
81
78
|
},
|
|
82
79
|
children: [
|
|
83
80
|
onWidthChange !== void 0 && // Drag handle — a slim hit-strip pinned to the panel's inner
|
|
84
|
-
// (
|
|
81
|
+
// (left) edge, centred on it. `touchAction: none` keeps a touch drag from scrolling.
|
|
85
82
|
/* @__PURE__ */ jsx(
|
|
86
83
|
"div",
|
|
87
84
|
{
|
|
@@ -96,9 +93,9 @@ function SideDock({
|
|
|
96
93
|
position: "absolute",
|
|
97
94
|
top: 0,
|
|
98
95
|
bottom: 0,
|
|
99
|
-
|
|
96
|
+
left: 0,
|
|
100
97
|
width: 10,
|
|
101
|
-
transform:
|
|
98
|
+
transform: "translateX(-50%)",
|
|
102
99
|
cursor: "col-resize",
|
|
103
100
|
touchAction: "none",
|
|
104
101
|
zIndex: 2
|
|
@@ -116,10 +113,11 @@ function SideDock({
|
|
|
116
113
|
function useSideDockSpacing(open, width, animate = true) {
|
|
117
114
|
const reduceMotion = useReducedMotion();
|
|
118
115
|
return {
|
|
119
|
-
|
|
116
|
+
// Physical, like the dock it makes room for (always on the right).
|
|
117
|
+
paddingRight: open ? width : 0,
|
|
120
118
|
// During an active resize drag the host passes `animate: false` so the
|
|
121
119
|
// canvas edge tracks the panel 1:1 instead of easing behind the pointer.
|
|
122
|
-
transition: reduceMotion === true || !animate ? void 0 : `padding-
|
|
120
|
+
transition: reduceMotion === true || !animate ? void 0 : `padding-right ${SIDE_DOCK_REVEAL_MS}ms ${SIDE_DOCK_EASE}`
|
|
123
121
|
};
|
|
124
122
|
}
|
|
125
123
|
|
package/dist/conversation.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ComposerChipStrip,
|
|
4
4
|
usePromptComposer
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-M5T3ZTBB.js";
|
|
6
|
+
import "./chunk-KNIUL72S.js";
|
|
7
7
|
import "./chunk-I5QE47QY.js";
|
|
8
8
|
import "./chunk-4ZX4IRC6.js";
|
|
9
9
|
import "./chunk-RMJDSHLA.js";
|
package/dist/shell.js
CHANGED
|
@@ -38,13 +38,13 @@ import {
|
|
|
38
38
|
useOnScreen,
|
|
39
39
|
usePromptComposer,
|
|
40
40
|
useShellDock
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-M5T3ZTBB.js";
|
|
42
42
|
import {
|
|
43
43
|
SIDE_DOCK_EASE,
|
|
44
44
|
SIDE_DOCK_REVEAL_MS,
|
|
45
45
|
SideDock,
|
|
46
46
|
useSideDockSpacing
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-KNIUL72S.js";
|
|
48
48
|
import {
|
|
49
49
|
DragSheet
|
|
50
50
|
} from "./chunk-I5QE47QY.js";
|
package/dist/thread-panel.js
CHANGED
package/package.json
CHANGED
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"zod": "^3.23.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@40rty/ams-sdk": "0.5.
|
|
79
|
+
"@40rty/ams-sdk": "0.5.9",
|
|
80
80
|
"lucide-react": ">=0.400.0",
|
|
81
81
|
"react": ">=18.0.0",
|
|
82
82
|
"react-dom": ">=18.0.0"
|
|
83
83
|
},
|
|
84
|
-
"version": "0.5.
|
|
84
|
+
"version": "0.5.9",
|
|
85
85
|
"homepage": "https://docs.40rty.ai",
|
|
86
86
|
"license": "UNLICENSED",
|
|
87
87
|
"engines": {
|