@fungi.computer/parakeet 0.11.31 → 0.11.33

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/parakeet.js CHANGED
@@ -174,24 +174,55 @@ function ConversationTimeline({ disambiguateAuthors, clientActions, onOpen, focu
174
174
  loadOlderHistory();
175
175
  }
176
176
  }, [hasMoreHistory, loadOlderHistory, loadingOlderHistory, nearTop]);
177
+ // The end of a pinned window is the reader's intent to continue toward the
178
+ // latest output, however they got there: wheel, scrollbar drag or End key.
179
+ // Each newer page lands below the viewport, and the live tail's rows measure
180
+ // after the window resets, so keep scrolling to the end until the reader
181
+ // takes the scroller back (wheel up, pointer or a key other than End).
182
+ const followingToLatest = useRef(false);
183
+ useEffect(() => {
184
+ if (loadingOlderHistory)
185
+ return;
186
+ if (atBottom && hasNewerHistory) {
187
+ followingToLatest.current = true;
188
+ loadNewerHistory();
189
+ }
190
+ else if (followingToLatest.current && !atBottom) {
191
+ timeline.scrollToEnd({ behavior: "smooth" });
192
+ }
193
+ }, [
194
+ atBottom,
195
+ count,
196
+ hasNewerHistory,
197
+ loadNewerHistory,
198
+ loadingOlderHistory,
199
+ timeline,
200
+ ]);
177
201
  const jumpToBottom = useCallback(() => {
178
202
  setUnread(0);
179
203
  previousScrollTop.current = undefined;
180
204
  timelineController.jumpToLatest();
181
205
  timeline.scrollToEnd({ behavior: "smooth" });
182
206
  }, [timeline, timelineController]);
183
- return (_jsxs("div", { className: "prose relative min-h-0 flex-1", children: [_jsx("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: sessionReadout(sessionStatus.status, sessionStatus.viewState) }), sessionStatus.observation.status === "unavailable" ? (_jsxs("div", { className: "flex items-center justify-between gap-2 px-3 py-1 text-xs text-dim", role: "status", children: [_jsx("span", { children: sessionStatus.observation.reason }), _jsx(Button, { variant: "outline", size: "xs", onClick: () => void sessionStatus.reconnect(), type: "button", children: "Reconnect" })] })) : null, _jsxs("div", { className: "h-full min-h-0 overflow-y-auto", "data-chat-scroller": true, ref: scrollerRef, onScroll: (event) => {
207
+ return (_jsxs("div", { className: "prose relative min-h-0 flex-1", children: [_jsx("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: sessionReadout(sessionStatus.status, sessionStatus.viewState) }), sessionStatus.observation.status === "unavailable" ? (_jsxs("div", { className: "flex items-center justify-between gap-2 px-3 py-1 text-xs text-dim", role: "status", children: [_jsx("span", { children: sessionStatus.observation.reason }), _jsx(Button, { variant: "outline", size: "xs", onClick: () => void sessionStatus.reconnect(), type: "button", children: "Reconnect" })] })) : null, _jsxs("div", { className: "h-full min-h-0 overflow-y-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset caps-focus-color", "data-chat-scroller": true, ref: scrollerRef, onScroll: (event) => {
184
208
  const top = event.currentTarget.scrollTop;
185
209
  if (previousScrollTop.current !== undefined &&
186
210
  top < previousScrollTop.current)
187
211
  timelineController.pinVisibleHistory();
188
212
  previousScrollTop.current = top;
213
+ }, onKeyDown: (event) => {
214
+ if (event.key !== "End")
215
+ followingToLatest.current = false;
216
+ }, onPointerDown: () => {
217
+ followingToLatest.current = false;
189
218
  }, onWheel: (event) => {
190
219
  const scroller = scrollerRef.current;
191
220
  if (scroller === null || loadingOlderHistory)
192
221
  return;
193
- if (event.deltaY < 0)
222
+ if (event.deltaY < 0) {
223
+ followingToLatest.current = false;
194
224
  timelineController.pinVisibleHistory();
225
+ }
195
226
  if (event.deltaY < 0 && scroller.scrollTop <= 1 && hasMoreHistory)
196
227
  loadOlderHistory();
197
228
  if (event.deltaY > 0 &&
package/dist/styles.css CHANGED
@@ -7686,6 +7686,11 @@
7686
7686
  outline-style: none;
7687
7687
  }
7688
7688
  }
7689
+ .focus-visible\:ring-inset {
7690
+ &:focus-visible {
7691
+ --tw-ring-inset: inset;
7692
+ }
7693
+ }
7689
7694
  .disabled\:pointer-events-none {
7690
7695
  &:disabled {
7691
7696
  pointer-events: none;
@@ -14771,7 +14776,7 @@
14771
14776
  .caps-button.btn-outline {
14772
14777
  --btn-border: var(--stipe-linework);
14773
14778
  --caps-key-face: var(--caps-button-outline-face, var(--color-base-200));
14774
- font-weight: var(--caps-button-weight, 500);
14779
+ font-weight: var(--caps-button-weight, 600);
14775
14780
  box-shadow: var( --caps-button-outline-drop, var(--caps-button-drop, var(--caps-key-rest-shadow)) );
14776
14781
  transition-property: background-color, border-color, box-shadow, translate;
14777
14782
  transition-duration: var(--stipe-motion-fast);
@@ -14784,7 +14789,7 @@
14784
14789
  .caps-button.btn-ghost {
14785
14790
  font-weight: 500;
14786
14791
  }
14787
- .caps-button-filled:not(.btn-circle) {
14792
+ .caps-button-filled:not(.btn-circle), .caps-button.btn-outline:not(.btn-circle) {
14788
14793
  --radius-field: var(--radius-button);
14789
14794
  }
14790
14795
  .caps-button-filled {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/parakeet",
3
- "version": "0.11.31",
3
+ "version": "0.11.33",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Standalone React composer for a typed Shiitake Session",
@@ -63,7 +63,7 @@
63
63
  "@fungi.computer/agar": "0.16.0",
64
64
  "@fungi.computer/bird-dog": "0.3.6",
65
65
  "@fungi.computer/cairn": "0.1.0",
66
- "@fungi.computer/caps": "0.11.5",
66
+ "@fungi.computer/caps": "0.11.6",
67
67
  "@fungi.computer/gills": "0.3.0",
68
68
  "@fungi.computer/knapsack": "0.4.13",
69
69
  "@fungi.computer/shiitake": "0.18.0",