@declarion/react 0.51.0 → 0.53.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 (37) hide show
  1. package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-BQZTvZaU.js} +35 -35
  2. package/dist-lib/{Grid-DUjbQg3r.js → Grid-B9Tiytbd.js} +28 -28
  3. package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-D_v9OD_A.js} +920 -922
  4. package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-dRnXsQ7A.js} +14 -14
  5. package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-BCyrsLrd.js} +10 -10
  6. package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
  7. package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-CV8nGACW.js} +120 -122
  8. package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-DWprVNMb.js} +376 -377
  9. package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-BwWURGwa.js} +1098 -1099
  10. package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-BKKBShAg.js} +183 -183
  11. package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-pgi4sxMs.js} +1 -1
  12. package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DlHTYag7.js} +382 -382
  13. package/dist-lib/api/events.d.ts +27 -5
  14. package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-C7Orz841.js} +146 -204
  15. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  16. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
  17. package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
  18. package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
  19. package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
  20. package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-EY8CFF3P.js} +301 -320
  21. package/dist-lib/{format-count-C3N-WxEy.js → format-count-BHkaDr9V.js} +245 -245
  22. package/dist-lib/hooks/useMutations.d.ts +1 -1
  23. package/dist-lib/hooks/useSSE.d.ts +24 -4
  24. package/dist-lib/index.js +1541 -1832
  25. package/dist-lib/lib/document-templates.d.ts +1 -1
  26. package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
  27. package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-1pIajluX.js} +36 -36
  28. package/dist-lib/{registry-p6CejATt.js → registry-C5ug25M8.js} +507 -507
  29. package/dist-lib/stores/realtime.d.ts +20 -0
  30. package/dist-lib/testing.js +35 -35
  31. package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-BdnZq8vZ.js} +2504 -1557
  32. package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-BxgrPZIB.js} +13 -10
  33. package/dist-lib/{useProperties-C5fZp12D.js → useProperties-Bhi9Wn5O.js} +25 -25
  34. package/dist-lib/useTabSearchMirror-Dl5x0xKu.js +177 -0
  35. package/dist-lib/{value-DKekzcjz.js → value-Rp-5W3o8.js} +25 -25
  36. package/package.json +7 -7
  37. package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
@@ -1,4 +1,4 @@
1
- import type { PkValues } from "../types/schema";
1
+ import { type PkValues } from "../types/schema";
2
2
  import type { ActionExecuteRequest } from "../api/data";
3
3
  export declare function useCreateObject(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, Record<string, unknown>, unknown>;
4
4
  export declare function useUpdateObject(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, {
@@ -1,12 +1,32 @@
1
1
  import { type QueryClient } from "@tanstack/react-query";
2
- type EntityAction = "created" | "updated" | "deleted" | "restored";
3
- interface EntityChangedEvent {
2
+ import { type ChangedObject, type EntityAction } from "../api/events";
3
+ export interface EntityChangedEvent {
4
4
  entity: string;
5
5
  action: EntityAction;
6
6
  eventID?: string;
7
+ ids: string[];
8
+ objects?: ChangedObject[];
9
+ reason?: string;
7
10
  }
8
- export declare function invalidateForEntityChanges(queryClient: QueryClient, events: EntityChangedEvent[]): void;
11
+ /**
12
+ * Applies one coalescing window of change frames, resolving once every query it
13
+ * touched claims no freshness it lacks - which is what lets the caller advance
14
+ * its resume position. docs/realtime.md "Frontend Invalidation".
15
+ */
16
+ export declare function applyEntityChanges(queryClient: QueryClient, events: EntityChangedEvent[], signal?: AbortSignal): Promise<void>;
17
+ /**
18
+ * What a write of one's OWN settles: the rows it NAMED are re-read through the
19
+ * path a change frame takes, and `fallback` covers everything it does not
20
+ * identify. docs/realtime.md "Frontend Invalidation".
21
+ */
22
+ export declare function settleOwnWrite(queryClient: QueryClient, isAuthenticated: boolean, entity: string, rows: Array<Record<string, string>>, fallback: () => void): void;
23
+ export declare function evictEntityBackedQueries(queryClient: QueryClient): void;
9
24
  export declare function liveEntityChanges(queryClient: QueryClient, isAuthenticated: boolean, events: EntityChangedEvent[]): EntityChangedEvent[];
10
25
  export declare function refetchActiveSSEQueries(queryClient: QueryClient): void;
26
+ /**
27
+ * What a returning tab still has to ask for, once the replay covers the rest:
28
+ * the entities that are not `realtime: true` and the ones the relay degraded,
29
+ * which between them are the majority of screens. docs/realtime.md.
30
+ */
31
+ export declare function refetchQueriesReplayDoesNotCover(queryClient: QueryClient, isAuthenticated: boolean): void;
11
32
  export declare function useSSE(): void;
12
- export {};