@liveblocks/react 2.18.4-uns1 → 2.19.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/_private.cjs +5 -5
- package/dist/_private.d.cts +1 -1
- package/dist/_private.d.ts +1 -1
- package/dist/_private.js +1 -1
- package/dist/{chunk-OVSZW7FP.js → chunk-5RVW253W.js} +34 -13
- package/dist/chunk-5RVW253W.js.map +1 -0
- package/dist/{chunk-XFNPHHAO.cjs → chunk-CDTX5424.cjs} +2 -2
- package/dist/{chunk-XFNPHHAO.cjs.map → chunk-CDTX5424.cjs.map} +1 -1
- package/dist/{chunk-EC62ST5F.cjs → chunk-EUXIW5LV.cjs} +50 -29
- package/dist/chunk-EUXIW5LV.cjs.map +1 -0
- package/dist/{chunk-FKN4BSVX.js → chunk-QYTJHNNQ.js} +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{room-1E8LCqCD.d.cts → room-Bf3S78LF.d.cts} +0 -17
- package/dist/{room-1E8LCqCD.d.ts → room-Bf3S78LF.d.ts} +0 -17
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-EC62ST5F.cjs.map +0 -1
- package/dist/chunk-OVSZW7FP.js.map +0 -1
- /package/dist/{chunk-FKN4BSVX.js.map → chunk-QYTJHNNQ.js.map} +0 -0
package/dist/_private.cjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkEUXIW5LVcjs = require('./chunk-EUXIW5LV.cjs');
|
|
28
28
|
|
|
29
29
|
// src/lib/use-layout-effect.ts
|
|
30
30
|
var _react = require('react');
|
|
@@ -37,8 +37,8 @@ var MENTION_SUGGESTIONS_DEBOUNCE = 500;
|
|
|
37
37
|
function useMentionSuggestions(roomId, search) {
|
|
38
38
|
const [mentionSuggestions, setMentionSuggestions] = _react.useState.call(void 0, );
|
|
39
39
|
const lastInvokedAt = _react.useRef.call(void 0, );
|
|
40
|
-
const resolveMentionSuggestions =
|
|
41
|
-
const mentionSuggestionsCache =
|
|
40
|
+
const resolveMentionSuggestions = _chunkEUXIW5LVcjs.useResolveMentionSuggestions.call(void 0, );
|
|
41
|
+
const mentionSuggestionsCache = _chunkEUXIW5LVcjs.useMentionSuggestionsCache.call(void 0, );
|
|
42
42
|
_react.useEffect.call(void 0, () => {
|
|
43
43
|
if (search === void 0 || !resolveMentionSuggestions) {
|
|
44
44
|
return;
|
|
@@ -89,7 +89,7 @@ function useMentionSuggestions(roomId, search) {
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
function useSyncSource() {
|
|
92
|
-
const client =
|
|
92
|
+
const client = _chunkEUXIW5LVcjs.useClient.call(void 0, );
|
|
93
93
|
const createSyncSource = client[_core.kInternal].createSyncSource;
|
|
94
94
|
const [syncSource, setSyncSource] = _react.useState.call(void 0, );
|
|
95
95
|
_react.useEffect.call(void 0, () => {
|
|
@@ -127,5 +127,5 @@ function useSyncSource() {
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
exports.getUmbrellaStoreForClient =
|
|
130
|
+
exports.getUmbrellaStoreForClient = _chunkEUXIW5LVcjs.getUmbrellaStoreForClient; exports.useAddRoomCommentReaction = _chunkEUXIW5LVcjs.useAddRoomCommentReaction; exports.useClientOrNull = _chunkEUXIW5LVcjs.useClientOrNull; exports.useCreateRoomComment = _chunkEUXIW5LVcjs.useCreateRoomComment; exports.useCreateRoomThread = _chunkEUXIW5LVcjs.useCreateRoomThread; exports.useCreateTextMention = _chunkEUXIW5LVcjs.useCreateTextMention; exports.useDeleteRoomComment = _chunkEUXIW5LVcjs.useDeleteRoomComment; exports.useDeleteRoomThread = _chunkEUXIW5LVcjs.useDeleteRoomThread; exports.useDeleteTextMention = _chunkEUXIW5LVcjs.useDeleteTextMention; exports.useEditRoomComment = _chunkEUXIW5LVcjs.useEditRoomComment; exports.useEditRoomThreadMetadata = _chunkEUXIW5LVcjs.useEditRoomThreadMetadata; exports.useLayoutEffect = useLayoutEffect; exports.useMarkRoomThreadAsRead = _chunkEUXIW5LVcjs.useMarkRoomThreadAsRead; exports.useMarkRoomThreadAsResolved = _chunkEUXIW5LVcjs.useMarkRoomThreadAsResolved; exports.useMarkRoomThreadAsUnresolved = _chunkEUXIW5LVcjs.useMarkRoomThreadAsUnresolved; exports.useMentionSuggestions = useMentionSuggestions; exports.useMentionSuggestionsCache = _chunkEUXIW5LVcjs.useMentionSuggestionsCache; exports.useRemoveRoomCommentReaction = _chunkEUXIW5LVcjs.useRemoveRoomCommentReaction; exports.useReportTextEditor = _chunkEUXIW5LVcjs.useReportTextEditor; exports.useResolveMentionSuggestions = _chunkEUXIW5LVcjs.useResolveMentionSuggestions; exports.useRoomAttachmentUrl = _chunkEUXIW5LVcjs.useRoomAttachmentUrl; exports.useRoomOrNull = _chunkEUXIW5LVcjs.useRoomOrNull; exports.useRoomPermissions = _chunkEUXIW5LVcjs.useRoomPermissions; exports.useSignal = _chunkEUXIW5LVcjs.useSignal; exports.useSyncExternalStoreWithSelector = _chunkEUXIW5LVcjs.useSyncExternalStoreWithSelector; exports.useSyncSource = useSyncSource; exports.useYjsProvider = _chunkEUXIW5LVcjs.useYjsProvider;
|
|
131
131
|
//# sourceMappingURL=_private.cjs.map
|
package/dist/_private.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as getUmbrellaStoreForClient, b as useAddRoomCommentReaction, a as useClientOrNull, c as useCreateRoomComment, d as useCreateRoomThread, e as useCreateTextMention, f as useDeleteRoomComment, h as useDeleteRoomThread, i as useDeleteTextMention, j as useEditRoomComment, k as useEditRoomThreadMetadata, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, u as useRoomOrNull, t as useRoomPermissions, v as useYjsProvider } from './room-
|
|
1
|
+
export { g as getUmbrellaStoreForClient, b as useAddRoomCommentReaction, a as useClientOrNull, c as useCreateRoomComment, d as useCreateRoomThread, e as useCreateTextMention, f as useDeleteRoomComment, h as useDeleteRoomThread, i as useDeleteTextMention, j as useEditRoomComment, k as useEditRoomThreadMetadata, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, u as useRoomOrNull, t as useRoomPermissions, v as useYjsProvider } from './room-Bf3S78LF.cjs';
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from 'react';
|
|
3
3
|
import { ISignal, SyncSource } from '@liveblocks/core';
|
|
4
4
|
import '@liveblocks/client';
|
package/dist/_private.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as getUmbrellaStoreForClient, b as useAddRoomCommentReaction, a as useClientOrNull, c as useCreateRoomComment, d as useCreateRoomThread, e as useCreateTextMention, f as useDeleteRoomComment, h as useDeleteRoomThread, i as useDeleteTextMention, j as useEditRoomComment, k as useEditRoomThreadMetadata, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, u as useRoomOrNull, t as useRoomPermissions, v as useYjsProvider } from './room-
|
|
1
|
+
export { g as getUmbrellaStoreForClient, b as useAddRoomCommentReaction, a as useClientOrNull, c as useCreateRoomComment, d as useCreateRoomThread, e as useCreateTextMention, f as useDeleteRoomComment, h as useDeleteRoomThread, i as useDeleteTextMention, j as useEditRoomComment, k as useEditRoomThreadMetadata, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, u as useRoomOrNull, t as useRoomPermissions, v as useYjsProvider } from './room-Bf3S78LF.js';
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from 'react';
|
|
3
3
|
import { ISignal, SyncSource } from '@liveblocks/core';
|
|
4
4
|
import '@liveblocks/client';
|
package/dist/_private.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
useSignal,
|
|
25
25
|
useSyncExternalStoreWithSelector,
|
|
26
26
|
useYjsProvider
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5RVW253W.js";
|
|
28
28
|
|
|
29
29
|
// src/lib/use-layout-effect.ts
|
|
30
30
|
import { useEffect, useLayoutEffect as useOriginalLayoutEffect } from "react";
|
|
@@ -236,14 +236,14 @@ import {
|
|
|
236
236
|
batch as batch2,
|
|
237
237
|
compactObject,
|
|
238
238
|
console as console2,
|
|
239
|
-
createUserNotificationSettings,
|
|
240
239
|
DefaultMap,
|
|
241
240
|
DerivedSignal,
|
|
241
|
+
entries,
|
|
242
|
+
keys,
|
|
242
243
|
kInternal,
|
|
243
244
|
MutableSignal as MutableSignal2,
|
|
244
245
|
nanoid,
|
|
245
246
|
nn,
|
|
246
|
-
patchUserNotificationSettings,
|
|
247
247
|
shallow as shallow3,
|
|
248
248
|
Signal,
|
|
249
249
|
stableStringify
|
|
@@ -731,11 +731,14 @@ function createStore_forPermissionHints() {
|
|
|
731
731
|
};
|
|
732
732
|
}
|
|
733
733
|
function createStore_forUserNotificationSettings(updates) {
|
|
734
|
-
const signal = new Signal(
|
|
735
|
-
createUserNotificationSettings({})
|
|
736
|
-
);
|
|
734
|
+
const signal = new Signal({});
|
|
737
735
|
function update(settings) {
|
|
738
|
-
signal.set(
|
|
736
|
+
signal.set((prevSettings) => {
|
|
737
|
+
return {
|
|
738
|
+
...prevSettings,
|
|
739
|
+
...settings
|
|
740
|
+
};
|
|
741
|
+
});
|
|
739
742
|
}
|
|
740
743
|
return {
|
|
741
744
|
signal: DerivedSignal.from(
|
|
@@ -1496,14 +1499,32 @@ function applyOptimisticUpdates_forSettings(settingsLUT, optimisticUpdates) {
|
|
|
1496
1499
|
}
|
|
1497
1500
|
return settingsByRoomId;
|
|
1498
1501
|
}
|
|
1499
|
-
function applyOptimisticUpdates_forUserNotificationSettings(
|
|
1500
|
-
|
|
1501
|
-
for (const
|
|
1502
|
-
|
|
1503
|
-
|
|
1502
|
+
function applyOptimisticUpdates_forUserNotificationSettings(baseSettings, optimisticUpdates) {
|
|
1503
|
+
const outcomingSettings = { ...baseSettings };
|
|
1504
|
+
for (const optimisticUpdate of optimisticUpdates) {
|
|
1505
|
+
switch (optimisticUpdate.type) {
|
|
1506
|
+
case "update-user-notification-settings": {
|
|
1507
|
+
const incomingSettings = optimisticUpdate.settings;
|
|
1508
|
+
for (const channelKey of keys(incomingSettings)) {
|
|
1509
|
+
const key = channelKey;
|
|
1510
|
+
const channelUpdates = incomingSettings[key];
|
|
1511
|
+
if (channelUpdates) {
|
|
1512
|
+
const realChannelUpdates = Object.fromEntries(
|
|
1513
|
+
entries(channelUpdates).filter(
|
|
1514
|
+
([_, value]) => value !== void 0
|
|
1515
|
+
)
|
|
1516
|
+
);
|
|
1517
|
+
outcomingSettings[key] = {
|
|
1518
|
+
...outcomingSettings[key],
|
|
1519
|
+
...realChannelUpdates
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
break;
|
|
1524
|
+
}
|
|
1504
1525
|
}
|
|
1505
1526
|
}
|
|
1506
|
-
return
|
|
1527
|
+
return outcomingSettings;
|
|
1507
1528
|
}
|
|
1508
1529
|
function compareInboxNotifications(inboxNotificationA, inboxNotificationB) {
|
|
1509
1530
|
if (inboxNotificationA.notifiedAt > inboxNotificationB.notifiedAt) {
|
|
@@ -4113,4 +4134,4 @@ export {
|
|
|
4113
4134
|
_useStorageRoot,
|
|
4114
4135
|
_useUpdateMyPresence
|
|
4115
4136
|
};
|
|
4116
|
-
//# sourceMappingURL=chunk-
|
|
4137
|
+
//# sourceMappingURL=chunk-5RVW253W.js.map
|