@zeyos/zx 5.0.0 → 5.2.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.
Files changed (154) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -1
  3. package/dist/types/components/account-menu/account-menu.d.ts +8 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +9 -1
  5. package/dist/types/components/app-icon/app-icon.d.ts +14 -2
  6. package/dist/types/components/app-sidebar/app-sidebar.d.ts +288 -14
  7. package/dist/types/components/calendar/calendar.d.ts +67 -5
  8. package/dist/types/components/card-view/card-view.d.ts +7 -4
  9. package/dist/types/components/card-view/record-card.d.ts +11 -0
  10. package/dist/types/components/context-menu/context-menu.d.ts +6 -2
  11. package/dist/types/components/data-filter/data-filter.d.ts +4 -4
  12. package/dist/types/components/dropdown/dropdown.d.ts +22 -7
  13. package/dist/types/components/field/field.d.ts +30 -0
  14. package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
  15. package/dist/types/components/fieldset/fieldset.d.ts +7 -0
  16. package/dist/types/components/file-list/file-list.d.ts +35 -3
  17. package/dist/types/components/filter/filter.d.ts +127 -3
  18. package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
  19. package/dist/types/components/launcher/launcher.d.ts +8 -0
  20. package/dist/types/components/list-toolbar/list-toolbar.d.ts +15 -6
  21. package/dist/types/components/menu-button/menu-button.d.ts +6 -0
  22. package/dist/types/components/message/message.d.ts +14 -1
  23. package/dist/types/components/modal/modal.d.ts +30 -0
  24. package/dist/types/components/module-bar/module-bar.d.ts +395 -0
  25. package/dist/types/components/pagination/pagination.d.ts +17 -3
  26. package/dist/types/components/select/select.d.ts +6 -0
  27. package/dist/types/components/sheet/sheet.d.ts +15 -0
  28. package/dist/types/components/table/table.d.ts +265 -17
  29. package/dist/types/components/view/record-view.d.ts +59 -2
  30. package/dist/types/components/view-settings/view-settings.d.ts +879 -0
  31. package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
  32. package/dist/types/core/component.d.ts +12 -2
  33. package/dist/types/core/i18n.d.ts +27 -3
  34. package/dist/types/core/keyboard.d.ts +98 -1
  35. package/dist/types/core/messages.d.ts +382 -0
  36. package/dist/types/core/overlay-host.d.ts +28 -1
  37. package/dist/types/core/overlay-stack.d.ts +260 -0
  38. package/dist/types/index.d.ts +5 -2
  39. package/dist/types/internal/app-rail.d.ts +38 -0
  40. package/dist/types/internal/menu-items.d.ts +71 -3
  41. package/dist/types/zeyos/index.d.ts +1 -0
  42. package/dist/types/zeyos/launcher.d.ts +9 -0
  43. package/dist/types/zeyos/module-bar.d.ts +176 -0
  44. package/dist/types/zeyos/query.d.ts +31 -5
  45. package/dist/types/zeyos/table.d.ts +245 -8
  46. package/dist/types/zeyos/view.d.ts +16 -2
  47. package/dist/zx-zeyos.esm.js +4422 -430
  48. package/dist/zx-zeyos.esm.min.js +5 -5
  49. package/dist/zx.css +1417 -134
  50. package/dist/zx.esm.js +6986 -830
  51. package/dist/zx.esm.min.js +8 -8
  52. package/dist/zx.global.js +6986 -830
  53. package/dist/zx.global.min.js +8 -8
  54. package/dist/zx.min.css +1 -1
  55. package/docs/api.json +794 -17
  56. package/docs/llms.md +503 -63
  57. package/docs/llms.txt +6 -2
  58. package/package.json +1 -1
  59. package/src/components/account-menu/account-menu.js +12 -0
  60. package/src/components/activity-list/activity-list.js +27 -1
  61. package/src/components/app-icon/app-icon.css +13 -2
  62. package/src/components/app-icon/app-icon.js +11 -1
  63. package/src/components/app-rail/app-rail.css +19 -0
  64. package/src/components/app-sidebar/app-sidebar.css +204 -3
  65. package/src/components/app-sidebar/app-sidebar.js +646 -40
  66. package/src/components/breadcrumb/breadcrumb.css +1 -1
  67. package/src/components/calendar/calendar.css +1 -1
  68. package/src/components/calendar/calendar.js +26 -52
  69. package/src/components/card/card.css +2 -2
  70. package/src/components/card-view/card-view.css +5 -5
  71. package/src/components/card-view/card-view.js +13 -9
  72. package/src/components/card-view/record-card.js +14 -3
  73. package/src/components/code-editor/code-editor.css +1 -1
  74. package/src/components/code-editor/field-adapter.js +9 -2
  75. package/src/components/context-menu/context-menu.js +8 -2
  76. package/src/components/copy/copy-input.css +1 -1
  77. package/src/components/data-filter/data-filter.js +2 -2
  78. package/src/components/date-picker/time-picker.css +2 -2
  79. package/src/components/dock/dock.css +5 -4
  80. package/src/components/dropdown/dropdown.js +157 -72
  81. package/src/components/field/field.js +33 -3
  82. package/src/components/fieldset/external-adapter.js +363 -0
  83. package/src/components/fieldset/fieldset.js +10 -59
  84. package/src/components/file-list/file-list.js +144 -21
  85. package/src/components/filter/filter.css +86 -2
  86. package/src/components/filter/filter.js +300 -8
  87. package/src/components/filter-panel/filter-panel.js +149 -32
  88. package/src/components/finder/finder.css +1 -1
  89. package/src/components/kanban-view/kanban-view.css +3 -3
  90. package/src/components/kanban-view/kanban-view.js +5 -2
  91. package/src/components/launcher/launcher.css +1 -1
  92. package/src/components/launcher/launcher.js +29 -3
  93. package/src/components/list-toolbar/list-toolbar.js +39 -13
  94. package/src/components/master-panel/master-panel.js +0 -1
  95. package/src/components/menu-button/menu-button.css +63 -0
  96. package/src/components/menu-button/menu-button.js +97 -11
  97. package/src/components/message/message.js +60 -20
  98. package/src/components/modal/modal.css +1 -1
  99. package/src/components/modal/modal.js +66 -13
  100. package/src/components/module-bar/module-bar.css +486 -0
  101. package/src/components/module-bar/module-bar.js +1074 -0
  102. package/src/components/multi-value-editor/multi-value-editor.css +1 -1
  103. package/src/components/number-field/field-adapter.js +2 -1
  104. package/src/components/pagination/pagination.css +5 -5
  105. package/src/components/pagination/pagination.js +20 -4
  106. package/src/components/panel/panel.css +3 -2
  107. package/src/components/questionnaire/questionnaire.css +4 -4
  108. package/src/components/rating/field-adapter.js +2 -1
  109. package/src/components/rating/rating.css +1 -1
  110. package/src/components/search/search.css +4 -1
  111. package/src/components/select/select.js +9 -0
  112. package/src/components/sheet/sheet.css +1 -1
  113. package/src/components/sheet/sheet.js +74 -32
  114. package/src/components/slider/field-adapter.js +6 -1
  115. package/src/components/slider/slider.css +2 -2
  116. package/src/components/split-view/split-view.css +1 -1
  117. package/src/components/stat-tile/stat-tile.css +1 -1
  118. package/src/components/stepper/stepper.css +1 -1
  119. package/src/components/tabbox/tabbox.css +9 -5
  120. package/src/components/table/table.css +86 -11
  121. package/src/components/table/table.js +628 -57
  122. package/src/components/tag-picker/field-adapter.js +2 -1
  123. package/src/components/tooltip/tooltip.js +35 -17
  124. package/src/components/tree/tree.css +1 -1
  125. package/src/components/view/record-view.css +1 -1
  126. package/src/components/view/record-view.js +178 -18
  127. package/src/components/view-settings/view-settings.css +285 -0
  128. package/src/components/view-settings/view-settings.js +1830 -0
  129. package/src/components/workspace-switcher/workspace-switcher.css +188 -0
  130. package/src/components/workspace-switcher/workspace-switcher.js +463 -0
  131. package/src/core/component.js +88 -17
  132. package/src/core/fontawesome.js +5 -1
  133. package/src/core/i18n.js +47 -4
  134. package/src/core/icons.js +12 -2
  135. package/src/core/keyboard.js +206 -11
  136. package/src/core/messages.js +427 -0
  137. package/src/core/overlay-host.js +64 -9
  138. package/src/core/overlay-stack.js +487 -0
  139. package/src/core/position.js +22 -3
  140. package/src/index.js +5 -2
  141. package/src/internal/app-rail.js +134 -53
  142. package/src/internal/menu-items.js +61 -3
  143. package/src/zeyos/form.js +5 -3
  144. package/src/zeyos/index.js +3 -0
  145. package/src/zeyos/launcher.js +8 -3
  146. package/src/zeyos/module-bar.js +181 -0
  147. package/src/zeyos/query.js +44 -13
  148. package/src/zeyos/table.js +220 -80
  149. package/src/zeyos/view.js +43 -93
  150. package/styles/base.css +16 -1
  151. package/styles/print.css +1 -1
  152. package/styles/tokens/dark.css +4 -0
  153. package/styles/tokens/semantic.css +56 -28
  154. package/styles/zx.css +3 -0
@@ -65,11 +65,13 @@ export type ServerFilterDefinition = {
65
65
  */
66
66
  operator?: string;
67
67
  /**
68
- * Semantic value format; date/datetime values become Unix seconds.
68
+ * Semantic value format; date/datetime values become Unix seconds. With
69
+ * a `timeZone` conversion option, a `date` (date-only) value is a calendar day and becomes that
70
+ * day's midnight in the zone, like a ZeyOS form stores it; `datetime` values stay instants.
69
71
  */
70
72
  format?: string;
71
73
  /**
72
- * Semantic value type; date/datetime values become Unix seconds.
74
+ * Semantic value type, read like `format`.
73
75
  */
74
76
  type?: string;
75
77
  /**
@@ -108,8 +110,10 @@ export type ServerFilterDefinition = {
108
110
  * @property {string} [rawField] Raw ZeyOS field when the UI id is an alias.
109
111
  * @property {string[]} [fields] Raw fields combined as an OR group.
110
112
  * @property {string} [operator] ZeyOS comparison operator such as `>=` or `IN`.
111
- * @property {string} [format] Semantic value format; date/datetime values become Unix seconds.
112
- * @property {string} [type] Semantic value type; date/datetime values become Unix seconds.
113
+ * @property {string} [format] Semantic value format; date/datetime values become Unix seconds. With
114
+ * a `timeZone` conversion option, a `date` (date-only) value is a calendar day and becomes that
115
+ * day's midnight in the zone, like a ZeyOS form stores it; `datetime` values stay instants.
116
+ * @property {string} [type] Semantic value type, read like `format`.
113
117
  * @property {boolean} [includeEmpty=false] Preserve an empty-string value instead of treating it as inactive UI state.
114
118
  * @property {boolean} [includeNull=false] Preserve null instead of treating it as inactive UI state.
115
119
  * @property {(value: unknown, state: Record<string, unknown>) => unknown} [transform] Value transform.
@@ -215,6 +219,26 @@ export declare function calendarZone(timeZone?: string): CalendarZone;
215
219
  * @returns {string[]} Signed raw fields such as `+name` or `-lastmodified`.
216
220
  */
217
221
  export declare function tableSortToQuery(sort: ZxSort | ZxSort[] | null | undefined): string[];
222
+ export type FilterConversionOptions = {
223
+ /**
224
+ * IANA zone of the ZeyOS instance. When given, values of
225
+ * `date` (date-only) definitions are calendar days: a `Date` counts by its local year, month, and
226
+ * day, a `YYYY-MM-DD` string by its digits, and either becomes midnight of that day in the zone —
227
+ * exactly what `calendarDayToUnixSeconds()` and `zeyosForm()` store, so a viewer in another zone
228
+ * filters `duedate` by the day they picked. `null` names the runtime's own zone. Omitted, dates
229
+ * convert as exact instants, as they always have.
230
+ */
231
+ timeZone?: string | null;
232
+ };
233
+ /**
234
+ * @typedef {Object} FilterConversionOptions
235
+ * @property {string|null} [timeZone] IANA zone of the ZeyOS instance. When given, values of
236
+ * `date` (date-only) definitions are calendar days: a `Date` counts by its local year, month, and
237
+ * day, a `YYYY-MM-DD` string by its digits, and either becomes midnight of that day in the zone —
238
+ * exactly what `calendarDayToUnixSeconds()` and `zeyosForm()` store, so a viewer in another zone
239
+ * filters `duedate` by the day they picked. `null` names the runtime's own zone. Omitted, dates
240
+ * convert as exact instants, as they always have.
241
+ */
218
242
  /**
219
243
  * Converts DataFilter state to ZeyOS field predicates. Definitions may rename UI ids,
220
244
  * add comparison operators, combine several fields with OR, or transform values. Blank/null
@@ -222,9 +246,11 @@ export declare function tableSortToQuery(sort: ZxSort | ZxSort[] | null | undefi
222
246
  * the distinct ZeyOS meanings. Zero and false are always retained.
223
247
  * @param {Record<string, unknown>} state DataFilter state keyed by definition id.
224
248
  * @param {ServerFilterDefinition[]|Record<string, string|ServerFilterDefinition>} [defs=[]] Server mappings.
249
+ * @param {FilterConversionOptions} [options={}] Conversion options, such as the instance zone.
225
250
  * @returns {Record<string, unknown>} ZeyOS `filters` object (plural at the call site).
251
+ * @throws {RangeError} When `options.timeZone` names a zone the runtime does not know.
226
252
  */
227
- export declare function dataFilterStateToFilters(state: Record<string, unknown>, defs?: ServerFilterDefinition[] | Record<string, string | ServerFilterDefinition>): Record<string, unknown>;
253
+ export declare function dataFilterStateToFilters(state: Record<string, unknown>, defs?: ServerFilterDefinition[] | Record<string, string | ServerFilterDefinition>, options?: FilterConversionOptions): Record<string, unknown>;
228
254
  /**
229
255
  * Builds the body passed to a generated `client.api.list<Resource>()` operation. Predicates are
230
256
  * always emitted under `filters` (plural), which is required for indexed foreign-key matching.
@@ -24,7 +24,8 @@ export type ZeyosTableOptions = {
24
24
  */
25
25
  rowId?: string | ((row: Record<string, unknown>) => unknown);
26
26
  /**
27
- * Server page size.
27
+ * Server page size, a positive integer. `load({pageSize})` changes
28
+ * it later — what a `Pagination` page-size select does.
28
29
  */
29
30
  pageSize?: number;
30
31
  /**
@@ -168,9 +169,20 @@ export type ZeyosTableLoadOptions = {
168
169
  */
169
170
  filters?: Record<string, unknown>;
170
171
  /**
171
- * Zero-based page; pages above zero append rows.
172
+ * Zero-based page, a non-negative integer. Pages above zero append
173
+ * rows unless `replace` is set.
172
174
  */
173
175
  page?: number;
176
+ /**
177
+ * Replace the rows with this page instead of appending it — what a
178
+ * numbered pager needs. Page zero always replaces.
179
+ */
180
+ replace?: boolean;
181
+ /**
182
+ * New page size for this and every later load; the request offset is
183
+ * `page * pageSize`.
184
+ */
185
+ pageSize?: number;
174
186
  };
175
187
  export type ZeyosTableLoadResult = {
176
188
  /**
@@ -223,15 +235,164 @@ export type ZeyosTableBinding = {
223
235
  * Current zero-based page.
224
236
  */
225
237
  page: number;
238
+ /**
239
+ * Current server page size.
240
+ */
241
+ pageSize: number;
226
242
  /**
227
243
  * Whether another page is available.
228
244
  */
229
245
  hasMore: boolean;
230
246
  /**
231
- * Destroys the generated table.
247
+ * Destroys the generated table. A request still in flight is
248
+ * ignored when it resolves, and later loads reject.
232
249
  */
233
250
  destroy: () => void;
234
251
  };
252
+ export type ServerPagerTarget = {
253
+ /**
254
+ * Replaces the rows.
255
+ */
256
+ setData: (rows: Record<string, unknown>[]) => unknown;
257
+ /**
258
+ * Appends rows.
259
+ */
260
+ addData: (rows: Record<string, unknown>[]) => unknown;
261
+ /**
262
+ * Shows or hides the loading state.
263
+ */
264
+ setLoading: (loading: boolean) => unknown;
265
+ };
266
+ export type ServerPagerOptions = {
267
+ /**
268
+ * Injected ZeyOS client (for result normalization).
269
+ */
270
+ client: Record<string, any>;
271
+ /**
272
+ * Connection facade from `connect(client)`.
273
+ */
274
+ facade: {
275
+ list: (resource: string, query: Record<string, unknown>) => Promise<unknown>;
276
+ };
277
+ /**
278
+ * Resource name.
279
+ */
280
+ resource: string;
281
+ /**
282
+ * API projection.
283
+ */
284
+ projection: Record<string, string>;
285
+ /**
286
+ * Component the rows go to.
287
+ */
288
+ target: ServerPagerTarget;
289
+ /**
290
+ * Initial page size; must be a positive integer.
291
+ */
292
+ pageSize?: unknown;
293
+ /**
294
+ * Initial sort.
295
+ */
296
+ sort?: {
297
+ id: string;
298
+ dir: 'asc' | 'desc';
299
+ } | null;
300
+ /**
301
+ * Initial predicates; must be a plain object.
302
+ */
303
+ filters?: unknown;
304
+ /**
305
+ * Initial full-text query.
306
+ */
307
+ search?: unknown;
308
+ /**
309
+ * UI search-field metadata passed to `buildListQuery`.
310
+ */
311
+ searchFields?: string[];
312
+ /**
313
+ * Name used in error messages.
314
+ */
315
+ label?: string;
316
+ };
317
+ export type ServerPager = {
318
+ /**
319
+ * Loads a page.
320
+ */
321
+ load: (options?: ZeyosTableLoadOptions) => Promise<ZeyosTableLoadResult>;
322
+ /**
323
+ * Validates load options without applying them; throws what `load()` would reject with.
324
+ */
325
+ check: (options?: ZeyosTableLoadOptions) => {
326
+ page: number;
327
+ pageSize: number;
328
+ filters: Record<string, unknown>;
329
+ search: string;
330
+ };
331
+ /**
332
+ * Appends the next page when available,
333
+ * else resolves without a request.
334
+ */
335
+ loadMore: () => Promise<ZeyosTableLoadResult>;
336
+ /**
337
+ * Replaces the sort used
338
+ * by the next load.
339
+ */
340
+ setSort: (sort: {
341
+ id: string;
342
+ dir: 'asc' | 'desc';
343
+ } | null) => void;
344
+ /**
345
+ * Replaces filters and
346
+ * search without loading.
347
+ */
348
+ setQuery: (state: {
349
+ filters?: unknown;
350
+ search?: unknown;
351
+ }) => void;
352
+ /**
353
+ * Forgets the loaded page, count, and `hasMore`.
354
+ */
355
+ reset: () => void;
356
+ /**
357
+ * Stops rendering: in-flight responses are ignored, later loads reject.
358
+ */
359
+ destroy: () => void;
360
+ /**
361
+ * Whether `destroy()` ran.
362
+ */
363
+ destroyed: boolean;
364
+ /**
365
+ * Current server count.
366
+ */
367
+ count: number | null;
368
+ /**
369
+ * Current zero-based page.
370
+ */
371
+ page: number;
372
+ /**
373
+ * Current page size.
374
+ */
375
+ pageSize: number;
376
+ /**
377
+ * Whether another page is available.
378
+ */
379
+ hasMore: boolean;
380
+ /**
381
+ * Current sort.
382
+ */
383
+ sort: {
384
+ id: string;
385
+ dir: 'asc' | 'desc';
386
+ } | null;
387
+ /**
388
+ * Copy of the current predicates.
389
+ */
390
+ filters: Record<string, unknown>;
391
+ /**
392
+ * Current full-text query.
393
+ */
394
+ search: string;
395
+ };
235
396
  /**
236
397
  * @typedef {Object} ZeyosTableConfig
237
398
  * @property {Record<string, any>[]} fieldMeta Ordered normalized schema metadata.
@@ -243,7 +404,12 @@ export type ZeyosTableBinding = {
243
404
  * @typedef {Object} ZeyosTableLoadOptions
244
405
  * @property {string} [search] Replacement full-text query.
245
406
  * @property {Record<string, unknown>} [filters] Replacement ZeyOS predicates.
246
- * @property {number} [page=0] Zero-based page; pages above zero append rows.
407
+ * @property {number} [page=0] Zero-based page, a non-negative integer. Pages above zero append
408
+ * rows unless `replace` is set.
409
+ * @property {boolean} [replace] Replace the rows with this page instead of appending it — what a
410
+ * numbered pager needs. Page zero always replaces.
411
+ * @property {number} [pageSize] New page size for this and every later load; the request offset is
412
+ * `page * pageSize`.
247
413
  */
248
414
  /**
249
415
  * @typedef {Object} ZeyosTableLoadResult
@@ -262,8 +428,54 @@ export type ZeyosTableBinding = {
262
428
  * @property {() => Promise<ZeyosTableLoadResult>} loadMore Appends the next page when available.
263
429
  * @property {number|null} count Current server count.
264
430
  * @property {number} page Current zero-based page.
431
+ * @property {number} pageSize Current server page size.
432
+ * @property {boolean} hasMore Whether another page is available.
433
+ * @property {() => void} destroy Destroys the generated table. A request still in flight is
434
+ * ignored when it resolves, and later loads reject.
435
+ */
436
+ /**
437
+ * The surface a server pager renders into: a Zx `Table`, or any RecordView.
438
+ * @typedef {Object} ServerPagerTarget
439
+ * @property {(rows: Record<string, unknown>[]) => unknown} setData Replaces the rows.
440
+ * @property {(rows: Record<string, unknown>[]) => unknown} addData Appends rows.
441
+ * @property {(loading: boolean) => unknown} setLoading Shows or hides the loading state.
442
+ */
443
+ /**
444
+ * @typedef {Object} ServerPagerOptions
445
+ * @property {Record<string, any>} client Injected ZeyOS client (for result normalization).
446
+ * @property {{list: (resource: string, query: Record<string, unknown>) => Promise<unknown>}} facade
447
+ * Connection facade from `connect(client)`.
448
+ * @property {string} resource Resource name.
449
+ * @property {Record<string, string>} projection API projection.
450
+ * @property {ServerPagerTarget} target Component the rows go to.
451
+ * @property {unknown} [pageSize=50] Initial page size; must be a positive integer.
452
+ * @property {{id: string, dir: 'asc'|'desc'}|null} [sort=null] Initial sort.
453
+ * @property {unknown} [filters={}] Initial predicates; must be a plain object.
454
+ * @property {unknown} [search=''] Initial full-text query.
455
+ * @property {string[]} [searchFields] UI search-field metadata passed to `buildListQuery`.
456
+ * @property {string} [label='ZeyOS binding'] Name used in error messages.
457
+ */
458
+ /**
459
+ * @typedef {Object} ServerPager
460
+ * @property {(options?: ZeyosTableLoadOptions) => Promise<ZeyosTableLoadResult>} load Loads a page.
461
+ * @property {(options?: ZeyosTableLoadOptions) => {page: number, pageSize: number, filters: Record<string, unknown>, search: string}} check
462
+ * Validates load options without applying them; throws what `load()` would reject with.
463
+ * @property {() => Promise<ZeyosTableLoadResult>} loadMore Appends the next page when available,
464
+ * else resolves without a request.
465
+ * @property {(sort: {id: string, dir: 'asc'|'desc'}|null) => void} setSort Replaces the sort used
466
+ * by the next load.
467
+ * @property {(state: {filters?: unknown, search?: unknown}) => void} setQuery Replaces filters and
468
+ * search without loading.
469
+ * @property {() => void} reset Forgets the loaded page, count, and `hasMore`.
470
+ * @property {() => void} destroy Stops rendering: in-flight responses are ignored, later loads reject.
471
+ * @property {boolean} destroyed Whether `destroy()` ran.
472
+ * @property {number|null} count Current server count.
473
+ * @property {number} page Current zero-based page.
474
+ * @property {number} pageSize Current page size.
265
475
  * @property {boolean} hasMore Whether another page is available.
266
- * @property {() => void} destroy Destroys the generated table.
476
+ * @property {{id: string, dir: 'asc'|'desc'}|null} sort Current sort.
477
+ * @property {Record<string, unknown>} filters Copy of the current predicates.
478
+ * @property {string} search Current full-text query.
267
479
  */
268
480
  /**
269
481
  * Builds the DOM-free schema-derived columns and Table options used by {@link zeyosTable}. Entity
@@ -278,9 +490,15 @@ export type ZeyosTableBinding = {
278
490
  */
279
491
  export declare function buildZeyosTableConfig(client: Record<string, any>, resource: string, opts?: ZeyosTableOptions): ZeyosTableConfig;
280
492
  /**
281
- * Generates a server-backed Zx Table. Sorting automatically reloads page zero. `load({page: 0})`
282
- * replaces data, higher pages append it, and `loadMore()` uses `limit`/`offset` plus the returned
283
- * count. DataFilter callers can map state with `dataFilterStateToFilters` before `setFilters()`.
493
+ * Generates a server-backed Zx Table. Sorting automatically reloads page zero. Paging is
494
+ * zero-based: `load({page: 0})` replaces data, higher pages append it — load-more paging, which
495
+ * `loadMore()` drives from `limit`/`offset` plus the returned count — and `replace: true` replaces
496
+ * at any page, which is what a numbered `Pagination` needs. `Pagination` is one-based, so its
497
+ * `change` maps as `load({page: detail.page - 1, pageSize: detail.pageSize, replace: true})`, the
498
+ * request offset being `(page - 1) * pageSize`; feed `result.count` back with `setTotal()`.
499
+ * DataFilter callers can map state with `dataFilterStateToFilters` before `setFilters()`.
500
+ * Paging is shared with `zeyosView()` through {@link createServerPager}: the same validation, and
501
+ * a response that resolves after `destroy()` never touches the destroyed table.
284
502
  * Table presentation options (`variant`, `zebra`, `stickyHeader`, `responsive`, `emptyText`, …) and
285
503
  * listeners are passed through to the generated Table.
286
504
  * @param {Record<string, any>} client Injected ZeyOS client instance.
@@ -289,3 +507,22 @@ export declare function buildZeyosTableConfig(client: Record<string, any>, resou
289
507
  * @returns {ZeyosTableBinding} Generated table and server-state methods/getters.
290
508
  */
291
509
  export declare function zeyosTable(client: Record<string, any>, resource: string, opts?: ZeyosTableOptions): ZeyosTableBinding;
510
+ /**
511
+ * The one server-paging loader behind {@link zeyosTable} and `zeyosView`, so the two bindings
512
+ * cannot drift apart. It builds the list request (`limit = pageSize`, `offset = page * pageSize`,
513
+ * always with `count`), renders the response into its target — page zero or `replace` replaces
514
+ * the rows, a higher page appends them — and keeps `count`, `page`, and `hasMore`.
515
+ *
516
+ * Only the newest request may render: an older one that resolves late is returned to its caller
517
+ * but never touches the target. After `destroy()` nothing renders at all — a response that arrives
518
+ * afterwards is ignored, the loading state is left alone — and further loads reject.
519
+ *
520
+ * Validation is strict and the same for both bindings: a page must be a non-negative integer and a
521
+ * page size a positive integer (`RangeError`), filters a plain object (`TypeError`). Every argument
522
+ * of a call is checked before any of it is applied, so a rejected call changes nothing.
523
+ * @param {ServerPagerOptions} options Pager configuration.
524
+ * @returns {ServerPager}
525
+ */
526
+ export declare function createServerPager(options: ServerPagerOptions): ServerPager;
527
+ /** Default server page size shared by `zeyosTable()` and `zeyosView()`. */
528
+ export declare const DEFAULT_SERVER_PAGE_SIZE = 50;
@@ -65,7 +65,8 @@ export type ZeyosViewOptions = {
65
65
  */
66
66
  recordId?: string | ((record: Record<string, unknown>) => unknown);
67
67
  /**
68
- * Server page size.
68
+ * Server page size, a positive integer — the same default and
69
+ * validation as `zeyosTable()`, because both bindings page through one shared loader.
69
70
  */
70
71
  pageSize?: number;
71
72
  /**
@@ -151,9 +152,18 @@ export type ZeyosViewLoadOptions = {
151
152
  */
152
153
  filters?: Record<string, unknown>;
153
154
  /**
154
- * Zero-based page; pages above zero append.
155
+ * Zero-based page, a non-negative integer; pages above zero append
156
+ * unless `replace` is set.
155
157
  */
156
158
  page?: number;
159
+ /**
160
+ * Replace the records with this page instead of appending it.
161
+ */
162
+ replace?: boolean;
163
+ /**
164
+ * New page size for this and every later load.
165
+ */
166
+ pageSize?: number;
157
167
  };
158
168
  export type ZeyosViewLoadResult = {
159
169
  /**
@@ -256,6 +266,10 @@ export type ZeyosViewBinding = {
256
266
  * Current zero-based page.
257
267
  */
258
268
  page: number;
269
+ /**
270
+ * Current server page size.
271
+ */
272
+ pageSize: number;
259
273
  /**
260
274
  * Whether another page is available.
261
275
  */