dsh-focus-overlay 0.11.0 → 0.11.1
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/lib/client.js +7 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1046,6 +1046,12 @@ window.__ModuleLoader__.load({
|
|
|
1046
1046
|
el.style.height = "auto";
|
|
1047
1047
|
el.style.height = `${Math.min(el.scrollHeight, 120)}px`;
|
|
1048
1048
|
};
|
|
1049
|
+
const refocusAfterEcho = (el) => {
|
|
1050
|
+
if (document.activeElement === el) return;
|
|
1051
|
+
el.focus();
|
|
1052
|
+
const end = el.value.length;
|
|
1053
|
+
el.setSelectionRange(end, end);
|
|
1054
|
+
};
|
|
1049
1055
|
(0, react.useEffect)(() => {
|
|
1050
1056
|
if (textareaRef.current) autoGrow(textareaRef.current);
|
|
1051
1057
|
}, [value, textareaRef]);
|
|
@@ -1073,6 +1079,7 @@ window.__ModuleLoader__.load({
|
|
|
1073
1079
|
onChange: (e) => {
|
|
1074
1080
|
onChange(e.target.value);
|
|
1075
1081
|
autoGrow(e.target);
|
|
1082
|
+
refocusAfterEcho(e.target);
|
|
1076
1083
|
},
|
|
1077
1084
|
onKeyDown,
|
|
1078
1085
|
onFocus: () => onFocusChange(true),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-focus-overlay",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Focus Mode for the dsh web GUI: a full-screen reading overlay that hides chrome and folds the AI tool-call flow into summaries, reusing the official Markdown / image primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.mjs",
|