@lotics/app-sdk 0.69.0 → 0.70.0

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.
@@ -103,6 +103,18 @@ interface PaginatedQueryState<R> extends QueryStateBase {
103
103
  export interface QuerySortKey {
104
104
  field_key: string;
105
105
  order: "asc" | "desc";
106
+ /**
107
+ * Where rows BLANK in this column sit — `"bottom"` when omitted, which is what
108
+ * you want for "the ones with a value first".
109
+ *
110
+ * It earns its place on a MULTI-KEY sort over columns that are blank by
111
+ * position rather than by accident — a pipeline's per-step date stamps, say,
112
+ * where the first non-blank column IS the row's rank. Reading such a ladder
113
+ * from the top with blanks at the bottom orders it furthest-along-first; the
114
+ * reverse reading needs blanks on TOP, and with only the default there is no
115
+ * way to express it, so the column can be sorted one way and not the other.
116
+ */
117
+ blank_position?: "top" | "bottom";
106
118
  }
107
119
  /** A filter condition over one output column (wire shape of a filter node). */
108
120
  export interface QueryFilterCondition {
package/docs/queries.md CHANGED
@@ -770,10 +770,13 @@ template as derived nodes, in this order: `filter` (narrow) → `sort` (order)
770
770
  it. Record-link membership (`has_any_of` by id) **works** here; so does `is_current_member`
771
771
  on a member column. Traversals / `locked` / `current_member` do not — bake those into the
772
772
  template.
773
- - **`sort`** — `[{ field_key, order }]` over output columns — the typed `QuerySortKey` the hooks
774
- accept. The wire sort node also honors `blank_position?: "top" | "bottom"` (blanks default to
775
- bottom), but that field is **not** on the typed hook option; reach it only through a raw
776
- `rpc("query", { sort })` call.
773
+ - **`sort`** — `[{ field_key, order, blank_position? }]` over output columns — the typed
774
+ `QuerySortKey` the hooks accept. `blank_position` is `"top" | "bottom"`, defaulting to
775
+ `"bottom"`. It matters on a **multi-key** sort over columns whose blankness IS the ranking
776
+ a pipeline's per-step date stamps, where the first non-blank column gives the row's rung.
777
+ Listing the ladder top-down with blanks at the bottom orders it furthest-along-first; the
778
+ ascending reading needs `blank_position: "top"` on every key, and without it that direction
779
+ cannot be expressed at all.
777
780
  - **`limit` / `offset` / keyset `cursor`** — pagination. `useQuery` / `usePaginatedQuery` page by
778
781
  `offset` (`limit` clamped to the 10,000-row cap, §10); `useInfiniteQuery` opts into **keyset
779
782
  (seek)** by sending `keyset: true` + the prior page's `cursor`, and the server returns the next
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.69.0",
4
- "description": "Runtime SDK for Lotics custom-code apps \u2014 typed hooks, postMessage bridge, mount entry point",
3
+ "version": "0.70.0",
4
+ "description": "Runtime SDK for Lotics custom-code apps typed hooks, postMessage bridge, mount entry point",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {