@nivaro/react 0.2.1 → 0.2.2

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
@@ -813,11 +813,14 @@ declare interface ChatReaction {
813
813
  user_name: string | null;
814
814
  }
815
815
 
816
- export declare function ChatRoomList({ rooms, onOpen, onNewGroup }: {
816
+ export declare function ChatRoomList({ rooms, onOpen, onNewGroup, archivedView, loading }: {
817
817
  rooms: RoomInfo[];
818
818
  onOpen: (room: RoomInfo) => void;
819
819
  /** Opens the group-conversation composer (host renders the dialog). */
820
820
  onNewGroup?: () => void;
821
+ /** The Archived tab: no assistant entry, rows offer Unarchive. */
822
+ archivedView?: boolean;
823
+ loading?: boolean;
821
824
  }): JSX.Element;
822
825
 
823
826
  export declare function ChatRoomView({ room, label, onBack, onOpenSettings, renderMessageBody, initialUnread }: {
@@ -5638,6 +5641,8 @@ export declare interface RoomInfo {
5638
5641
  notify_mode: 'all' | 'mentions';
5639
5642
  joined: boolean;
5640
5643
  channel: ChannelMeta | null;
5644
+ /** Put away by this person — lives in the Archived tab, never alerts. */
5645
+ archived?: boolean;
5641
5646
  }
5642
5647
 
5643
5648
  /**
@@ -6543,6 +6548,14 @@ export declare type UseNivaroFormReturn = {
6543
6548
  gridFlushersRef: default_2.MutableRefObject<Map<string, () => Promise<void>>>;
6544
6549
  };
6545
6550
 
6551
+ /**
6552
+ * The person's own sound preference — `preferences.notification_sound`
6553
+ * ('off' | 'subtle' | 'chime'), the same setting the notification bell plays.
6554
+ * Shares the profile card's query key and shape, so changing it there applies
6555
+ * to chat at once. Unset reads as off, which is what the profile shows.
6556
+ */
6557
+ export declare function useNotificationSoundPreference(): string;
6558
+
6546
6559
  /**
6547
6560
  * Online-user set for presence dots in user pickers (#284); consumers get a
6548
6561
  * Set of upper-cased user ids. Shares the chat's ['presence-online'] entry —
@@ -6552,6 +6565,8 @@ export declare type UseNivaroFormReturn = {
6552
6565
  */
6553
6566
  export declare function useOnlineUsers(enabled?: boolean): Set<string>;
6554
6567
 
6568
+ export declare function useOpenRoomRegistration(room: string | null | undefined): void;
6569
+
6555
6570
  export declare function useOptionalNivaroClient(): NivaroClient | null;
6556
6571
 
6557
6572
  export declare function useOptionalRealtime(): RealtimeAdapter | null;
@@ -6666,6 +6681,10 @@ export declare function useRoomMembership(): {
6666
6681
  room: string;
6667
6682
  mode: "all" | "mentions";
6668
6683
  }, unknown>;
6684
+ setArchived: UseMutationResult<unknown, Error, {
6685
+ room: string;
6686
+ archived: boolean;
6687
+ }, unknown>;
6669
6688
  };
6670
6689
 
6671
6690
  export declare function useRoomPins(room: string | null): NoInfer<PinnedMessage[]>;