@poolse/react 2.24.0 → 2.25.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.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { PoolseConfig, Poolse, Me, Uuid, Conversation, ConversationCreateRequest, Membership, MemberRole, Message, MessageCreateRequest, RealtimeStatus, Attachment, AttachmentUploadInput, PoolseUserProfile, CallRoomStatus, CallParticipant, CameraFacing, CallDeviceKind, CallDevice, LiveKitModule, VoiceStatus, VoiceParticipant, VoiceRoomOptions, IncomingCall, OutgoingCall, CallMedia } from '@poolse/sdk';
3
- export { ApiError, Attachment, AttachmentStatus, AttachmentUploadInput, AttachmentUploadRequest, AttachmentUploadResponse, AuthError, Conversation, ConversationCreateRequest, Me, MemberRole, Membership, Message, MessageCreateRequest, MessageType, NetworkError, PoolseConfig, PoolseError, PoolseUserProfile, RateLimitedError, RealtimeStatus, Uuid } from '@poolse/sdk';
3
+ export { ApiError, Attachment, AttachmentStatus, AttachmentUploadInput, AttachmentUploadRequest, AttachmentUploadResponse, AuthError, CallLog, CallLogDisplay, CallLogEntry, CallLogMedia, CallMissedEntry, Conversation, ConversationCreateRequest, Me, MemberRole, Membership, Message, MessageCreateRequest, MessageType, NetworkError, PoolseConfig, PoolseError, PoolseUserProfile, RateLimitedError, RealtimeStatus, Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody } from '@poolse/sdk';
4
4
  import { ReactNode } from 'react';
5
5
 
6
6
  interface PoolseProviderProps {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { PoolseConfig, Poolse, Me, Uuid, Conversation, ConversationCreateRequest, Membership, MemberRole, Message, MessageCreateRequest, RealtimeStatus, Attachment, AttachmentUploadInput, PoolseUserProfile, CallRoomStatus, CallParticipant, CameraFacing, CallDeviceKind, CallDevice, LiveKitModule, VoiceStatus, VoiceParticipant, VoiceRoomOptions, IncomingCall, OutgoingCall, CallMedia } from '@poolse/sdk';
3
- export { ApiError, Attachment, AttachmentStatus, AttachmentUploadInput, AttachmentUploadRequest, AttachmentUploadResponse, AuthError, Conversation, ConversationCreateRequest, Me, MemberRole, Membership, Message, MessageCreateRequest, MessageType, NetworkError, PoolseConfig, PoolseError, PoolseUserProfile, RateLimitedError, RealtimeStatus, Uuid } from '@poolse/sdk';
3
+ export { ApiError, Attachment, AttachmentStatus, AttachmentUploadInput, AttachmentUploadRequest, AttachmentUploadResponse, AuthError, CallLog, CallLogDisplay, CallLogEntry, CallLogMedia, CallMissedEntry, Conversation, ConversationCreateRequest, Me, MemberRole, Membership, Message, MessageCreateRequest, MessageType, NetworkError, PoolseConfig, PoolseError, PoolseUserProfile, RateLimitedError, RealtimeStatus, Uuid, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody } from '@poolse/sdk';
4
4
  import { ReactNode } from 'react';
5
5
 
6
6
  interface PoolseProviderProps {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { Poolse, safeUuid } from '@poolse/sdk';
3
- export { ApiError, AuthError, NetworkError, PoolseError, RateLimitedError } from '@poolse/sdk';
2
+ import { Poolse, safeUuid, isCallLogMessage } from '@poolse/sdk';
3
+ export { ApiError, AuthError, NetworkError, PoolseError, RateLimitedError, callLogDisplayFor, describeCallLog, formatCallDuration, formatCallLogPreview, isCallLogMessage, isMessageVisibleTo, parseCallLog, parseCallLogBody } from '@poolse/sdk';
4
4
  import { createContext, useRef, useMemo, useEffect, useContext, useState, useCallback } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
@@ -1025,8 +1025,6 @@ function useUser(externalId) {
1025
1025
  }, [chat, externalId]);
1026
1026
  return state;
1027
1027
  }
1028
-
1029
- // src/grouping.ts
1030
1028
  function computeGroupPosition(msg, prev, next, windowMs) {
1031
1029
  const continuesPrev = sameGroup(msg, prev, windowMs);
1032
1030
  const continuesNext = sameGroup(next, msg, windowMs);
@@ -1037,6 +1035,7 @@ function computeGroupPosition(msg, prev, next, windowMs) {
1037
1035
  }
1038
1036
  function sameGroup(a, b, windowMs) {
1039
1037
  if (!a || !b) return false;
1038
+ if (isCallLogMessage(a) || isCallLogMessage(b)) return false;
1040
1039
  if (a.sender_id !== b.sender_id) return false;
1041
1040
  if (!sameDay(a.inserted_at, b.inserted_at)) return false;
1042
1041
  const ta = new Date(a.inserted_at).getTime();