@nivaro/react 0.1.269 → 0.1.271

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 (3) hide show
  1. package/dist/index.d.ts +29 -0
  2. package/dist/index.js +19274 -19184
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -421,6 +421,20 @@ declare interface BulkTarget {
421
421
  id: string | number;
422
422
  }
423
423
 
424
+ /**
425
+ * "Updated 3m ago · Refresh" for a cached figure.
426
+ *
427
+ * A cache the viewer cannot see is a number they cannot trust: without this
428
+ * a report served from Redis is indistinguishable from one just computed.
429
+ * Renders nothing for an uncached query — there is nothing to disclose.
430
+ */
431
+ export declare function CacheStamp({ envelope, onRefresh, refreshing, className }: {
432
+ envelope: CustomQueryEnvelope | undefined;
433
+ onRefresh?: () => void;
434
+ refreshing?: boolean;
435
+ className?: string;
436
+ }): JSX.Element | null;
437
+
424
438
  export declare function canOpenCatalogItem(collection: string | null | undefined): boolean;
425
439
 
426
440
  export declare function canOpenChatRoom(): boolean;
@@ -1005,6 +1019,21 @@ export declare function CustomActionButtons({ collection, itemId, draft }: {
1005
1019
  draft: Record<string, unknown>;
1006
1020
  }): JSX.Element | null;
1007
1021
 
1022
+ /**
1023
+ * The envelope `POST /custom-queries/:slug/execute` returns. Older servers
1024
+ * answer with `data`/`cached` only, so every cache field is optional and the
1025
+ * stamp simply renders nothing when they are absent.
1026
+ */
1027
+ declare interface CustomQueryEnvelope {
1028
+ data: Array<Record<string, unknown>>;
1029
+ cached?: boolean;
1030
+ cached_at?: string | null;
1031
+ age_seconds?: number | null;
1032
+ expires_in_seconds?: number | null;
1033
+ cache_ttl?: number | null;
1034
+ executed_at?: string | null;
1035
+ }
1036
+
1008
1037
  /** `nivaro_users.preferences.custom_status` — free text + emoji beside the
1009
1038
  * presence state, self-clearing at `expires_at`. */
1010
1039
  export declare type CustomStatus = {