akanjs 3.3.0-rc.30 → 3.3.0-rc.31

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.
@@ -73,17 +73,20 @@ export class KeyboardRide {
73
73
  rider.style.transform = "";
74
74
  }
75
75
  KeyboardRide.#releaseInsets(lists);
76
- const scrollers = KeyboardRide.#scrollersAtEnd(shown);
76
+
77
+ const scrollers = KeyboardRide.#scrollersAtEnd(riders);
78
+ const listBoxes = lists.map((list) => KeyboardRide.#scrollerOf(list) ?? list);
77
79
  const previous = KeyboardRide.#committed;
78
80
  const isHeld = !isOverlay && height > previous;
79
81
  KeyboardRide.#commit(height, scrollers);
80
82
  const settled = riders.map(bottomOf);
81
- const listsSettled = lists.map(bottomOf);
83
+ const listsSettled = listBoxes.map(bottomOf);
82
84
  if (isHeld || isOverlay) KeyboardRide.#commit(isOverlay ? 0 : previous, scrollers);
83
85
  const laid = isHeld || isOverlay ? riders.map(bottomOf) : settled;
84
86
  lists.forEach((list, idx) => {
85
87
  const scroller = listEnds[idx] ?? null;
86
- if (height > 0) KeyboardRide.#raiseList(list, bottomOf(list) - (listsSettled[idx] ?? 0), scroller, durationMs);
88
+ const rise = bottomOf(listBoxes[idx] ?? list) - (listsSettled[idx] ?? 0);
89
+ if (height > 0) KeyboardRide.#raiseList(list, rise, scroller, durationMs);
87
90
  else KeyboardRide.#lowerList(list, scroller, durationMs);
88
91
  });
89
92
  riders.forEach((rider, idx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "3.3.0-rc.30",
3
+ "version": "3.3.0-rc.31",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -209,28 +209,46 @@ export const ClientPathWrapper = ({
209
209
  debugFrame("pathWrapper.mount", { path: pathRoute.path, pageType, href });
210
210
  return () => debugFrame("pathWrapper.unmount", { path: pathRoute.path, pageType, href });
211
211
  }, []);
212
+
213
+ const pathValue = useMemo(
214
+ () => ({
215
+ pageType,
216
+ pageKey,
217
+ location: {
218
+ href,
219
+ hash,
220
+ pathname,
221
+ params,
222
+ searchParams,
223
+ search,
224
+ pathRoute,
225
+ ...(location?.entryId ? { entryId: location.entryId } : {}),
226
+ },
227
+ followsRouter: !location,
228
+ prefix,
229
+ gestureEnabled,
230
+ setGestureEnabled,
231
+ registerFrameSlot,
232
+ }),
233
+ [
234
+ pageType,
235
+ pageKey,
236
+ href,
237
+ hash,
238
+ pathname,
239
+ params,
240
+ searchParams,
241
+ search,
242
+ pathRoute,
243
+ location?.entryId,
244
+ !location,
245
+ prefix,
246
+ gestureEnabled,
247
+ registerFrameSlot,
248
+ ],
249
+ );
212
250
  return (
213
- <pathContext.Provider
214
- value={{
215
- pageType,
216
- pageKey,
217
- location: {
218
- href,
219
- hash,
220
- pathname,
221
- params,
222
- searchParams,
223
- search,
224
- pathRoute,
225
- ...(location?.entryId ? { entryId: location.entryId } : {}),
226
- },
227
- followsRouter: !location,
228
- prefix,
229
- gestureEnabled,
230
- setGestureEnabled,
231
- registerFrameSlot,
232
- }}
233
- >
251
+ <pathContext.Provider value={pathValue}>
234
252
  <pageActivityContext.Provider value={pageActivity}>
235
253
  <Frame
236
254
  {...bindProps}