@nivaro/react 0.1.27 → 0.1.29

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/index.d.ts CHANGED
@@ -668,6 +668,15 @@ declare interface HeaderWidgetInfo {
668
668
  inputBindings: InputBinding[];
669
669
  }
670
670
 
671
+ /** Time without real input before someone counts as idle. */
672
+ export declare const IDLE_AFTER_MS: number;
673
+
674
+ /** The fields a presence heartbeat should carry. */
675
+ export declare function idleState(): {
676
+ is_idle: boolean;
677
+ last_active: string;
678
+ };
679
+
671
680
  export declare function ImportConsole({ realtime, defaultTab, initialJobId, onJobOpen }: ImportConsoleProps): JSX.Element;
672
681
 
673
682
  export declare interface ImportConsoleProps {
@@ -1056,6 +1065,13 @@ declare interface O2MFieldInfo {
1056
1065
  parentId: string;
1057
1066
  }
1058
1067
 
1068
+ /**
1069
+ * Called when idleness CHANGES, not on a timer — a host can push the flip
1070
+ * straight down its socket so coming back is seen in about a second instead of
1071
+ * on the next heartbeat. Returns an unsubscribe.
1072
+ */
1073
+ export declare function onIdleChange(fn: (idle: boolean) => void): () => void;
1074
+
1059
1075
  export declare function openDmWith(userId: string, displayName?: string): void;
1060
1076
 
1061
1077
  /**
@@ -1477,6 +1493,9 @@ export declare function TextField({ field, value, onChange, error, disabled, rea
1477
1493
 
1478
1494
  export declare function TipLayer(): ReactPortal | null;
1479
1495
 
1496
+ /** Install the listeners. Safe to call more than once. */
1497
+ export declare function trackActivity(): void;
1498
+
1480
1499
  /**
1481
1500
  * Translate scope values (target-collection IDS) into a filter's value space.
1482
1501
  * When the filter compares ids (valueField 'id'/undefined) this is identity;