@lotics/app-sdk 0.98.3 → 0.98.4

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/src/hooks.js CHANGED
@@ -227,8 +227,9 @@ export function useInfiniteQuery(alias, params, opts) {
227
227
  // Keyset (seek) pagination: each page seeks past the previous page's
228
228
  // `next_cursor` instead of an increasing OFFSET, so deep scrolls stay O(page)
229
229
  // and never skip/duplicate a row as the set shifts. The cursor is opaque; the
230
- // server keysets a sortable key (or the id default) and falls back to offset
231
- // transparently. `loadMore`/`rows` are unchanged — the cursor is internal.
230
+ // server keysets a sortable key (the query's own order when `sort` is unset,
231
+ // else the id) and falls back to offset transparently. `loadMore`/`rows` are
232
+ // unchanged — the cursor is internal.
232
233
  const getKey = (index, prev) => {
233
234
  if (mockRows || !enabled)
234
235
  return null;
@@ -241,8 +241,9 @@ Reads paginate two different ways, and the difference is load-bearing:
241
241
  opaque cursor instead of counting an offset, so a deep scroll stays O(page) and — the reason it
242
242
  matters — **never skips or duplicates a row as the set shifts** under concurrent inserts/deletes.
243
243
  The cursor is internal: the hook sends it and reads the next one back; you never see it. The
244
- server keysets a single sortable key (the runtime `sort`, or the record-id default) and falls
245
- back to offset transparently for a multi-key sort it can't seek. So an infinite feed needs **no
244
+ server keysets a single sortable key (the runtime `sort`, else the template's own order on a
245
+ column it projects, else the record id) and falls back to offset transparently for a multi-key
246
+ sort it can't seek. So an infinite feed needs **no
246
247
  dedupe** — key rows by `__source_record_id` for stable React keys, not to guard against repeats.
247
248
  - **`useQuery`, `usePaginatedQuery`, and manual `rpc("query", { limit, offset })` use offset
248
249
  pagination** — count `offset` rows, skip them, return the next page. Two consequences a keyset
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.98.3",
3
+ "version": "0.98.4",
4
4
  "description": "Runtime SDK for Lotics custom-code apps \u2014 typed hooks, postMessage bridge, mount entry point",
5
5
  "type": "module",
6
6
  "exports": {