ghostykit 0.3.1 → 0.3.2

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.
@@ -1865,7 +1865,7 @@ function Composer({
1865
1865
  const id = requestAnimationFrame(() => {
1866
1866
  const el = ref.current;
1867
1867
  if (!el) return;
1868
- el.focus();
1868
+ el.focus({ preventScroll: true });
1869
1869
  el.setSelectionRange(el.value.length, el.value.length);
1870
1870
  });
1871
1871
  return () => cancelAnimationFrame(id);
@@ -1918,7 +1918,7 @@ function Composer({
1918
1918
  return next;
1919
1919
  });
1920
1920
  setNotice(rejected.length ? rejected.join(" \xB7 ") : null);
1921
- ref.current?.focus();
1921
+ ref.current?.focus({ preventScroll: true });
1922
1922
  },
1923
1923
  [busy, canSeeImages, upload, maxFiles, maxFileMb, t]
1924
1924
  );
@@ -2676,10 +2676,10 @@ var Piloto = forwardRef3(function Piloto2(props, handle) {
2676
2676
  addReference: (r) => {
2677
2677
  const current = refsRef.current;
2678
2678
  if (!current.some((x) => x.id === r.id)) setRefs([...current, r]);
2679
- requestAnimationFrame(() => composerBox.current?.querySelector("textarea")?.focus());
2679
+ requestAnimationFrame(() => composerBox.current?.querySelector("textarea")?.focus({ preventScroll: true }));
2680
2680
  },
2681
2681
  setDraft: (text) => setDraftState((d) => ({ text, n: d.n + 1 })),
2682
- focus: () => composerBox.current?.querySelector("textarea")?.focus()
2682
+ focus: () => composerBox.current?.querySelector("textarea")?.focus({ preventScroll: true })
2683
2683
  }),
2684
2684
  [send, setRefs]
2685
2685
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ghostykit",
3
- "version": "0.3.1",
4
- "description": "Piloto UI \u2014 the in-app copilot chat from Ghosty Studio: streaming, agent steps, attachments, voice, reconnection and human approval cards. Pure event reducer + SSE transport + React components.",
3
+ "version": "0.3.2",
4
+ "description": "Piloto UI — the in-app copilot chat from Ghosty Studio: streaming, agent steps, attachments, voice, reconnection and human approval cards. Pure event reducer + SSE transport + React components.",
5
5
  "type": "module",
6
6
  "main": "./dist/core/index.js",
7
7
  "types": "./dist/core/index.d.ts",
@@ -62,6 +62,7 @@
62
62
  "@types/react": "^19.0.0",
63
63
  "@types/react-dom": "^19.0.0",
64
64
  "esbuild": "^0.25.0",
65
+ "jsdom": "^26.1.0",
65
66
  "lucide-react": "^1.44.0",
66
67
  "motion": "^12.38.0",
67
68
  "postcss": "^8.5.0",