@liveblocks/react 2.15.0 → 2.15.1

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/_private.js CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
 
27
27
 
28
- var _chunkUKPVXB7Djs = require('./chunk-UKPVXB7D.js');
28
+ var _chunkNUDMG62Pjs = require('./chunk-NUDMG62P.js');
29
29
 
30
30
  // src/use-mention-suggestions.ts
31
31
  var _core = require('@liveblocks/core');
@@ -34,8 +34,8 @@ var MENTION_SUGGESTIONS_DEBOUNCE = 500;
34
34
  function useMentionSuggestions(roomId, search) {
35
35
  const [mentionSuggestions, setMentionSuggestions] = _react.useState.call(void 0, );
36
36
  const lastInvokedAt = _react.useRef.call(void 0, );
37
- const resolveMentionSuggestions = _chunkUKPVXB7Djs.useResolveMentionSuggestions.call(void 0, );
38
- const mentionSuggestionsCache = _chunkUKPVXB7Djs.useMentionSuggestionsCache.call(void 0, );
37
+ const resolveMentionSuggestions = _chunkNUDMG62Pjs.useResolveMentionSuggestions.call(void 0, );
38
+ const mentionSuggestionsCache = _chunkNUDMG62Pjs.useMentionSuggestionsCache.call(void 0, );
39
39
  _react.useEffect.call(void 0, () => {
40
40
  if (search === void 0 || !resolveMentionSuggestions) {
41
41
  return;
@@ -84,7 +84,7 @@ function useMentionSuggestions(roomId, search) {
84
84
 
85
85
 
86
86
  function useSyncSource() {
87
- const client = _chunkUKPVXB7Djs.useClient.call(void 0, );
87
+ const client = _chunkNUDMG62Pjs.useClient.call(void 0, );
88
88
  const createSyncSource = client[_core.kInternal].createSyncSource;
89
89
  const [syncSource, setSyncSource] = _react.useState.call(void 0, );
90
90
  _react.useEffect.call(void 0, () => {
@@ -122,5 +122,5 @@ function useSyncSource() {
122
122
 
123
123
 
124
124
 
125
- exports.CreateThreadError = _chunkUKPVXB7Djs.CreateThreadError; exports.getUmbrellaStoreForClient = _chunkUKPVXB7Djs.getUmbrellaStoreForClient; exports.useAddRoomCommentReaction = _chunkUKPVXB7Djs.useAddRoomCommentReaction; exports.useClientOrNull = _chunkUKPVXB7Djs.useClientOrNull; exports.useCreateRoomComment = _chunkUKPVXB7Djs.useCreateRoomComment; exports.useCreateRoomThread = _chunkUKPVXB7Djs.useCreateRoomThread; exports.useCreateTextMention = _chunkUKPVXB7Djs.useCreateTextMention; exports.useDeleteRoomComment = _chunkUKPVXB7Djs.useDeleteRoomComment; exports.useDeleteRoomThread = _chunkUKPVXB7Djs.useDeleteRoomThread; exports.useDeleteTextMention = _chunkUKPVXB7Djs.useDeleteTextMention; exports.useEditRoomComment = _chunkUKPVXB7Djs.useEditRoomComment; exports.useEditRoomThreadMetadata = _chunkUKPVXB7Djs.useEditRoomThreadMetadata; exports.useMarkRoomThreadAsRead = _chunkUKPVXB7Djs.useMarkRoomThreadAsRead; exports.useMarkRoomThreadAsResolved = _chunkUKPVXB7Djs.useMarkRoomThreadAsResolved; exports.useMarkRoomThreadAsUnresolved = _chunkUKPVXB7Djs.useMarkRoomThreadAsUnresolved; exports.useMentionSuggestions = useMentionSuggestions; exports.useMentionSuggestionsCache = _chunkUKPVXB7Djs.useMentionSuggestionsCache; exports.useRemoveRoomCommentReaction = _chunkUKPVXB7Djs.useRemoveRoomCommentReaction; exports.useReportTextEditor = _chunkUKPVXB7Djs.useReportTextEditor; exports.useResolveMentionSuggestions = _chunkUKPVXB7Djs.useResolveMentionSuggestions; exports.useRoomAttachmentUrl = _chunkUKPVXB7Djs.useRoomAttachmentUrl; exports.useRoomOrNull = _chunkUKPVXB7Djs.useRoomOrNull; exports.useRoomPermissions = _chunkUKPVXB7Djs.useRoomPermissions; exports.useSignal = _chunkUKPVXB7Djs.useSignal; exports.useSyncExternalStoreWithSelector = _chunkUKPVXB7Djs.useSyncExternalStoreWithSelector; exports.useSyncSource = useSyncSource; exports.useYjsProvider = _chunkUKPVXB7Djs.useYjsProvider;
125
+ exports.CreateThreadError = _chunkNUDMG62Pjs.CreateThreadError; exports.getUmbrellaStoreForClient = _chunkNUDMG62Pjs.getUmbrellaStoreForClient; exports.useAddRoomCommentReaction = _chunkNUDMG62Pjs.useAddRoomCommentReaction; exports.useClientOrNull = _chunkNUDMG62Pjs.useClientOrNull; exports.useCreateRoomComment = _chunkNUDMG62Pjs.useCreateRoomComment; exports.useCreateRoomThread = _chunkNUDMG62Pjs.useCreateRoomThread; exports.useCreateTextMention = _chunkNUDMG62Pjs.useCreateTextMention; exports.useDeleteRoomComment = _chunkNUDMG62Pjs.useDeleteRoomComment; exports.useDeleteRoomThread = _chunkNUDMG62Pjs.useDeleteRoomThread; exports.useDeleteTextMention = _chunkNUDMG62Pjs.useDeleteTextMention; exports.useEditRoomComment = _chunkNUDMG62Pjs.useEditRoomComment; exports.useEditRoomThreadMetadata = _chunkNUDMG62Pjs.useEditRoomThreadMetadata; exports.useMarkRoomThreadAsRead = _chunkNUDMG62Pjs.useMarkRoomThreadAsRead; exports.useMarkRoomThreadAsResolved = _chunkNUDMG62Pjs.useMarkRoomThreadAsResolved; exports.useMarkRoomThreadAsUnresolved = _chunkNUDMG62Pjs.useMarkRoomThreadAsUnresolved; exports.useMentionSuggestions = useMentionSuggestions; exports.useMentionSuggestionsCache = _chunkNUDMG62Pjs.useMentionSuggestionsCache; exports.useRemoveRoomCommentReaction = _chunkNUDMG62Pjs.useRemoveRoomCommentReaction; exports.useReportTextEditor = _chunkNUDMG62Pjs.useReportTextEditor; exports.useResolveMentionSuggestions = _chunkNUDMG62Pjs.useResolveMentionSuggestions; exports.useRoomAttachmentUrl = _chunkNUDMG62Pjs.useRoomAttachmentUrl; exports.useRoomOrNull = _chunkNUDMG62Pjs.useRoomOrNull; exports.useRoomPermissions = _chunkNUDMG62Pjs.useRoomPermissions; exports.useSignal = _chunkNUDMG62Pjs.useSignal; exports.useSyncExternalStoreWithSelector = _chunkNUDMG62Pjs.useSyncExternalStoreWithSelector; exports.useSyncSource = useSyncSource; exports.useYjsProvider = _chunkNUDMG62Pjs.useYjsProvider;
126
126
  //# sourceMappingURL=_private.js.map
package/dist/_private.mjs CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  useSignal,
26
26
  useSyncExternalStoreWithSelector,
27
27
  useYjsProvider
28
- } from "./chunk-NZZCQLBR.mjs";
28
+ } from "./chunk-GMKB6I6V.mjs";
29
29
 
30
30
  // src/use-mention-suggestions.ts
31
31
  import { stringify } from "@liveblocks/core";
@@ -92,7 +92,7 @@ import {
92
92
  kInternal as kInternal2,
93
93
  makePoller,
94
94
  raise,
95
- shallow as shallow3
95
+ shallow as shallow4
96
96
  } from "@liveblocks/core";
97
97
  import {
98
98
  createContext as createContext2,
@@ -206,6 +206,7 @@ import {
206
206
  MutableSignal as MutableSignal2,
207
207
  nanoid,
208
208
  nn,
209
+ shallow as shallow3,
209
210
  Signal,
210
211
  stringify
211
212
  } from "@liveblocks/core";
@@ -597,7 +598,7 @@ function createStore_forNotifications() {
597
598
  });
598
599
  }
599
600
  function markAllRead(readAt) {
600
- return signal.mutate((lut) => {
601
+ signal.mutate((lut) => {
601
602
  for (const n of lut.values()) {
602
603
  n.readAt = readAt;
603
604
  }
@@ -836,13 +837,21 @@ var UmbrellaStore = class {
836
837
  this.optimisticUpdates.signal,
837
838
  (ts, ns, updates) => applyOptimisticUpdates_forThreadifications(ts, ns, updates)
838
839
  );
839
- const threads = DerivedSignal.from(threadifications, (s) => ({
840
- threadsDB: s.threadsDB
841
- }));
842
- const notifications = DerivedSignal.from(threadifications, (s) => ({
843
- sortedNotifications: s.sortedNotifications,
844
- notificationsById: s.notificationsById
845
- }));
840
+ const threads = DerivedSignal.from(
841
+ threadifications,
842
+ (s) => ({
843
+ threadsDB: s.threadsDB
844
+ }),
845
+ shallow3
846
+ );
847
+ const notifications = DerivedSignal.from(
848
+ threadifications,
849
+ (s) => ({
850
+ sortedNotifications: s.sortedNotifications,
851
+ notificationsById: s.notificationsById
852
+ }),
853
+ shallow3
854
+ );
846
855
  const settingsByRoomId = DerivedSignal.from(
847
856
  this.roomNotificationSettings.signal,
848
857
  this.optimisticUpdates.signal,
@@ -1880,7 +1889,7 @@ function makeLiveblocksContextBundle(client) {
1880
1889
  const shared = createSharedContext(client);
1881
1890
  const bundle = {
1882
1891
  LiveblocksProvider: LiveblocksProvider2,
1883
- useInboxNotifications: () => useInboxNotifications_withClient(client, identity, shallow3),
1892
+ useInboxNotifications: () => useInboxNotifications_withClient(client, identity, shallow4),
1884
1893
  useUnreadInboxNotificationsCount: () => useUnreadInboxNotificationsCount_withClient(client),
1885
1894
  useMarkInboxNotificationAsRead: useMarkInboxNotificationAsRead2,
1886
1895
  useMarkAllInboxNotificationsAsRead: useMarkAllInboxNotificationsAsRead2,
@@ -1917,7 +1926,7 @@ function useInboxNotifications_withClient(client, selector, isEqual) {
1917
1926
  };
1918
1927
  }, [poller]);
1919
1928
  return useSyncExternalStoreWithSelector(
1920
- store.subscribe1_threads,
1929
+ store.subscribe1_notifications,
1921
1930
  store.getInboxNotificationsLoadingState,
1922
1931
  store.getInboxNotificationsLoadingState,
1923
1932
  selector,
@@ -1927,7 +1936,7 @@ function useInboxNotifications_withClient(client, selector, isEqual) {
1927
1936
  function useInboxNotificationsSuspense_withClient(client) {
1928
1937
  const store = getLiveblocksExtrasForClient(client).store;
1929
1938
  use(store.waitUntilNotificationsLoaded());
1930
- const result = useInboxNotifications_withClient(client, identity, shallow3);
1939
+ const result = useInboxNotifications_withClient(client, identity, shallow4);
1931
1940
  assert(!result.error, "Did not expect error");
1932
1941
  assert(!result.isLoading, "Did not expect loading");
1933
1942
  return result;
@@ -1936,7 +1945,7 @@ function useUnreadInboxNotificationsCount_withClient(client) {
1936
1945
  return useInboxNotifications_withClient(
1937
1946
  client,
1938
1947
  selectorFor_useUnreadInboxNotificationsCount,
1939
- shallow3
1948
+ shallow4
1940
1949
  );
1941
1950
  }
1942
1951
  function useUnreadInboxNotificationsCountSuspense_withClient(client) {
@@ -2072,7 +2081,7 @@ function useUser_withClient(client, userId) {
2072
2081
  getUserState,
2073
2082
  getUserState,
2074
2083
  selector,
2075
- shallow3
2084
+ shallow4
2076
2085
  );
2077
2086
  useEffect3(() => {
2078
2087
  void usersStore.get(userId);
@@ -2124,7 +2133,7 @@ function useRoomInfo_withClient(client, roomId) {
2124
2133
  getRoomInfoState,
2125
2134
  getRoomInfoState,
2126
2135
  selector,
2127
- shallow3
2136
+ shallow4
2128
2137
  );
2129
2138
  useEffect3(() => {
2130
2139
  void roomsInfoStore.get(roomId);
@@ -2288,7 +2297,7 @@ function useUserThreadsSuspense_experimental(options = {
2288
2297
  return result;
2289
2298
  }
2290
2299
  function useInboxNotifications() {
2291
- return useInboxNotifications_withClient(useClient(), identity, shallow3);
2300
+ return useInboxNotifications_withClient(useClient(), identity, shallow4);
2292
2301
  }
2293
2302
  function useInboxNotificationsSuspense() {
2294
2303
  return useInboxNotificationsSuspense_withClient(useClient());
@@ -2488,7 +2497,7 @@ function useSignal(signal, selector, isEqual) {
2488
2497
  }
2489
2498
 
2490
2499
  // src/room.tsx
2491
- import { shallow as shallow4 } from "@liveblocks/client";
2500
+ import { shallow as shallow5 } from "@liveblocks/client";
2492
2501
  import {
2493
2502
  assert as assert2,
2494
2503
  console as console3,
@@ -3160,7 +3169,7 @@ function useOthersMapped(itemSelector, itemIsEqual) {
3160
3169
  return useOthers(wrappedSelector, wrappedIsEqual);
3161
3170
  }
3162
3171
  function useOthersConnectionIds() {
3163
- return useOthers(selectorFor_useOthersConnectionIds, shallow4);
3172
+ return useOthers(selectorFor_useOthersConnectionIds, shallow5);
3164
3173
  }
3165
3174
  var NOT_FOUND = Symbol();
3166
3175
  function useOther(connectionId, selector, isEqual) {
@@ -3800,7 +3809,7 @@ function useThreadSubscription(threadId) {
3800
3809
  },
3801
3810
  [threadId]
3802
3811
  );
3803
- return useSignal(signal, selector, shallow4);
3812
+ return useSignal(signal, selector, shallow5);
3804
3813
  }
3805
3814
  function useRoomNotificationSettings() {
3806
3815
  const updateRoomNotificationSettings = useUpdateRoomNotificationSettings();
@@ -4055,7 +4064,7 @@ function useRoomAttachmentUrl(attachmentId, roomId) {
4055
4064
  getAttachmentUrlState,
4056
4065
  getAttachmentUrlState,
4057
4066
  selectorFor_useAttachmentUrl,
4058
- shallow4
4067
+ shallow5
4059
4068
  );
4060
4069
  }
4061
4070
  function useAttachmentUrlSuspense(attachmentId) {
@@ -4241,4 +4250,4 @@ export {
4241
4250
  _useStorageRoot,
4242
4251
  _useUpdateMyPresence
4243
4252
  };
4244
- //# sourceMappingURL=chunk-NZZCQLBR.mjs.map
4253
+ //# sourceMappingURL=chunk-GMKB6I6V.mjs.map