@liveblocks/react 3.15.0-thread2 → 3.15.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/README.md +6 -16
- package/dist/_private.cjs +7 -7
- package/dist/_private.js +1 -1
- package/dist/{chunk-B5F24HAT.js → chunk-7TVEKSIE.js} +4 -4
- package/dist/chunk-7TVEKSIE.js.map +1 -0
- package/dist/{chunk-AB4FXOQV.js → chunk-A2TGT4DI.js} +2 -2
- package/dist/{chunk-RYUXBGU2.cjs → chunk-JVHRQNFW.cjs} +2 -2
- package/dist/chunk-JVHRQNFW.cjs.map +1 -0
- package/dist/{chunk-Z3NTUAGP.cjs → chunk-L3D3UECF.cjs} +4 -4
- package/dist/chunk-L3D3UECF.cjs.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.js +2 -2
- package/package.json +4 -3
- package/dist/chunk-B5F24HAT.js.map +0 -1
- package/dist/chunk-RYUXBGU2.cjs.map +0 -1
- package/dist/chunk-Z3NTUAGP.cjs.map +0 -1
- /package/dist/{chunk-AB4FXOQV.js.map → chunk-A2TGT4DI.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
<p
|
|
2
|
-
<a href="https://liveblocks.io#gh-light-mode-only">
|
|
3
|
-
|
|
4
|
-
</a>
|
|
5
|
-
<a href="https://liveblocks.io#gh-dark-mode-only">
|
|
6
|
-
<img src="https://raw.githubusercontent.com/liveblocks/liveblocks/main/.github/assets/header-dark.svg" alt="Liveblocks" />
|
|
7
|
-
</a>
|
|
1
|
+
<p>
|
|
2
|
+
<a href="https://liveblocks.io#gh-light-mode-only"><img src="https://raw.githubusercontent.com/liveblocks/liveblocks/main/.github/assets/header-light.svg" alt="Liveblocks" /></a>
|
|
3
|
+
<a href="https://liveblocks.io#gh-dark-mode-only"><img src="https://raw.githubusercontent.com/liveblocks/liveblocks/main/.github/assets/header-dark.svg" alt="Liveblocks" /></a>
|
|
8
4
|
</p>
|
|
9
5
|
|
|
10
6
|
# `@liveblocks/react`
|
|
11
7
|
|
|
12
8
|
<p>
|
|
13
|
-
<a href="https://npmjs.org/package/@liveblocks/react">
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<a href="https://bundlephobia.com/package/@liveblocks/react">
|
|
17
|
-
<img src="https://img.shields.io/bundlephobia/minzip/@liveblocks/react?style=flat&label=size&color=09f" alt="Size" />
|
|
18
|
-
</a>
|
|
19
|
-
<a href="https://github.com/liveblocks/liveblocks/blob/main/LICENSE">
|
|
20
|
-
<img src="https://img.shields.io/github/license/liveblocks/liveblocks?style=flat&label=license&color=f80" alt="License" />
|
|
21
|
-
</a>
|
|
9
|
+
<a href="https://npmjs.org/package/@liveblocks/react"><img src="https://img.shields.io/npm/v/@liveblocks/react?style=flat&label=npm&color=c33" alt="NPM" /></a>
|
|
10
|
+
<a href="https://bundlephobia.com/package/@liveblocks/react"><img src="https://img.shields.io/bundlephobia/minzip/@liveblocks/react?style=flat&label=size&color=09f" alt="Size" /></a>
|
|
11
|
+
<a href="https://github.com/liveblocks/liveblocks/blob/main/licenses/LICENSE-APACHE-2.0"><img src="https://img.shields.io/badge/license-Apache--2.0-green" alt="License" /></a>
|
|
22
12
|
</p>
|
|
23
13
|
|
|
24
14
|
`@liveblocks/react` provides [React](https://reactjs.org/) hooks and providers
|
package/dist/_private.cjs
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkL3D3UECFcjs = require('./chunk-L3D3UECF.cjs');
|
|
29
29
|
|
|
30
30
|
// src/lib/use-layout-effect.ts
|
|
31
31
|
var _react = require('react');
|
|
@@ -50,7 +50,7 @@ function selectorFor_useGroup(state) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
function useGroup(groupId) {
|
|
53
|
-
const client =
|
|
53
|
+
const client = _chunkL3D3UECFcjs.useClient.call(void 0, );
|
|
54
54
|
const store = client[_core.kInternal].httpClient.groupsStore;
|
|
55
55
|
const getGroupState = _react.useCallback.call(void 0,
|
|
56
56
|
() => store.getItemState(groupId),
|
|
@@ -59,7 +59,7 @@ function useGroup(groupId) {
|
|
|
59
59
|
_react.useEffect.call(void 0, () => {
|
|
60
60
|
void store.enqueue(groupId);
|
|
61
61
|
}, [store, groupId]);
|
|
62
|
-
return
|
|
62
|
+
return _chunkL3D3UECFcjs.useSyncExternalStoreWithSelector.call(void 0,
|
|
63
63
|
store.subscribe,
|
|
64
64
|
getGroupState,
|
|
65
65
|
getGroupState,
|
|
@@ -80,8 +80,8 @@ function normalizeMentionSuggestions(suggestions) {
|
|
|
80
80
|
function useMentionSuggestions(roomId, search) {
|
|
81
81
|
const [mentionSuggestions, setMentionSuggestions] = _react.useState.call(void 0, );
|
|
82
82
|
const lastInvokedAt = _react.useRef.call(void 0, );
|
|
83
|
-
const resolveMentionSuggestions =
|
|
84
|
-
const mentionSuggestionsCache =
|
|
83
|
+
const resolveMentionSuggestions = _chunkL3D3UECFcjs.useResolveMentionSuggestions.call(void 0, );
|
|
84
|
+
const mentionSuggestionsCache = _chunkL3D3UECFcjs.useMentionSuggestionsCache.call(void 0, );
|
|
85
85
|
_react.useEffect.call(void 0, () => {
|
|
86
86
|
if (search === void 0 || !resolveMentionSuggestions) {
|
|
87
87
|
return;
|
|
@@ -136,7 +136,7 @@ function useMentionSuggestions(roomId, search) {
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
function useSyncSource() {
|
|
139
|
-
const client =
|
|
139
|
+
const client = _chunkL3D3UECFcjs.useClient.call(void 0, );
|
|
140
140
|
const createSyncSource = client[_core.kInternal].createSyncSource;
|
|
141
141
|
const [syncSource, setSyncSource] = _react.useState.call(void 0, );
|
|
142
142
|
_react.useEffect.call(void 0, () => {
|
|
@@ -176,5 +176,5 @@ function useSyncSource() {
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
exports.getUmbrellaStoreForClient =
|
|
179
|
+
exports.getUmbrellaStoreForClient = _chunkL3D3UECFcjs.getUmbrellaStoreForClient; exports.useAddRoomCommentReaction = _chunkL3D3UECFcjs.useAddRoomCommentReaction; exports.useClientOrNull = _chunkL3D3UECFcjs.useClientOrNull; exports.useCreateRoomComment = _chunkL3D3UECFcjs.useCreateRoomComment; exports.useCreateRoomThread = _chunkL3D3UECFcjs.useCreateRoomThread; exports.useCreateTextMention = _chunkL3D3UECFcjs.useCreateTextMention; exports.useDeleteRoomComment = _chunkL3D3UECFcjs.useDeleteRoomComment; exports.useDeleteRoomThread = _chunkL3D3UECFcjs.useDeleteRoomThread; exports.useDeleteTextMention = _chunkL3D3UECFcjs.useDeleteTextMention; exports.useEditRoomComment = _chunkL3D3UECFcjs.useEditRoomComment; exports.useEditRoomThreadMetadata = _chunkL3D3UECFcjs.useEditRoomThreadMetadata; exports.useGroup = useGroup; exports.useLatest = _chunkL3D3UECFcjs.useLatest; exports.useLayoutEffect = useLayoutEffect; exports.useMarkRoomThreadAsRead = _chunkL3D3UECFcjs.useMarkRoomThreadAsRead; exports.useMarkRoomThreadAsResolved = _chunkL3D3UECFcjs.useMarkRoomThreadAsResolved; exports.useMarkRoomThreadAsUnresolved = _chunkL3D3UECFcjs.useMarkRoomThreadAsUnresolved; exports.useMentionSuggestions = useMentionSuggestions; exports.useMentionSuggestionsCache = _chunkL3D3UECFcjs.useMentionSuggestionsCache; exports.useRemoveRoomCommentReaction = _chunkL3D3UECFcjs.useRemoveRoomCommentReaction; exports.useReportTextEditor = _chunkL3D3UECFcjs.useReportTextEditor; exports.useResolveMentionSuggestions = _chunkL3D3UECFcjs.useResolveMentionSuggestions; exports.useRoomAttachmentUrl = _chunkL3D3UECFcjs.useRoomAttachmentUrl; exports.useRoomPermissions = _chunkL3D3UECFcjs.useRoomPermissions; exports.useRoomThreadSubscription = _chunkL3D3UECFcjs.useRoomThreadSubscription; exports.useSignal = _chunkL3D3UECFcjs.useSignal; exports.useSyncExternalStoreWithSelector = _chunkL3D3UECFcjs.useSyncExternalStoreWithSelector; exports.useSyncSource = useSyncSource; exports.useYjsProvider = _chunkL3D3UECFcjs.useYjsProvider;
|
|
180
180
|
//# sourceMappingURL=_private.cjs.map
|
package/dist/_private.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
useSignal,
|
|
26
26
|
useSyncExternalStoreWithSelector,
|
|
27
27
|
useYjsProvider
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7TVEKSIE.js";
|
|
29
29
|
|
|
30
30
|
// src/lib/use-layout-effect.ts
|
|
31
31
|
import { useEffect, useLayoutEffect as useOriginalLayoutEffect } from "react";
|
|
@@ -559,6 +559,7 @@ var PaginatedResource = class {
|
|
|
559
559
|
this.#patch({ isFetchingMore: true });
|
|
560
560
|
try {
|
|
561
561
|
const nextCursor = await this.#fetchPage(state.data.cursor);
|
|
562
|
+
this.#pendingFetchMore = null;
|
|
562
563
|
this.#patch({
|
|
563
564
|
cursor: nextCursor,
|
|
564
565
|
hasFetchedAll: nextCursor === null,
|
|
@@ -566,6 +567,7 @@ var PaginatedResource = class {
|
|
|
566
567
|
isFetchingMore: false
|
|
567
568
|
});
|
|
568
569
|
} catch (err) {
|
|
570
|
+
this.#pendingFetchMore = null;
|
|
569
571
|
this.#patch({
|
|
570
572
|
isFetchingMore: false,
|
|
571
573
|
fetchMoreError: err
|
|
@@ -576,9 +578,7 @@ var PaginatedResource = class {
|
|
|
576
578
|
const state = this.#signal.get();
|
|
577
579
|
if (!state.data?.cursor) return noop;
|
|
578
580
|
if (!this.#pendingFetchMore) {
|
|
579
|
-
this.#pendingFetchMore = this.#fetchMore()
|
|
580
|
-
this.#pendingFetchMore = null;
|
|
581
|
-
});
|
|
581
|
+
this.#pendingFetchMore = this.#fetchMore();
|
|
582
582
|
}
|
|
583
583
|
return this.#pendingFetchMore;
|
|
584
584
|
}
|
|
@@ -5744,4 +5744,4 @@ export {
|
|
|
5744
5744
|
_useStorageRoot,
|
|
5745
5745
|
_useUpdateMyPresence
|
|
5746
5746
|
};
|
|
5747
|
-
//# sourceMappingURL=chunk-
|
|
5747
|
+
//# sourceMappingURL=chunk-7TVEKSIE.js.map
|