@liveblocks/core 2.4.0 → 2.4.1-test1
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.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "2.4.
|
|
9
|
+
var PKG_VERSION = "2.4.1-test1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2152,6 +2152,16 @@ function createNotificationsApi({
|
|
|
2152
2152
|
}
|
|
2153
2153
|
);
|
|
2154
2154
|
}
|
|
2155
|
+
async function getThreads() {
|
|
2156
|
+
const json = await fetchJson("/threads", void 0, {});
|
|
2157
|
+
return {
|
|
2158
|
+
threads: json.threads.map(convertToThreadData)
|
|
2159
|
+
// inboxNotifications: json.inboxNotifications.map(
|
|
2160
|
+
// convertToInboxNotificationData
|
|
2161
|
+
// ),
|
|
2162
|
+
// requestedAt: new Date(json.meta.requestedAt),
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2155
2165
|
return {
|
|
2156
2166
|
getInboxNotifications,
|
|
2157
2167
|
getInboxNotificationsSince,
|
|
@@ -2159,7 +2169,8 @@ function createNotificationsApi({
|
|
|
2159
2169
|
markAllInboxNotificationsAsRead,
|
|
2160
2170
|
markInboxNotificationAsRead,
|
|
2161
2171
|
deleteAllInboxNotifications,
|
|
2162
|
-
deleteInboxNotification
|
|
2172
|
+
deleteInboxNotification,
|
|
2173
|
+
getThreads
|
|
2163
2174
|
};
|
|
2164
2175
|
}
|
|
2165
2176
|
|
|
@@ -5476,6 +5487,9 @@ function createRoom(options, config) {
|
|
|
5476
5487
|
others: new OthersRef(),
|
|
5477
5488
|
initialStorage,
|
|
5478
5489
|
idFactory: null,
|
|
5490
|
+
// Y.js
|
|
5491
|
+
provider: void 0,
|
|
5492
|
+
onProviderUpdate: makeEventSource(),
|
|
5479
5493
|
// Storage
|
|
5480
5494
|
clock: 0,
|
|
5481
5495
|
opClock: 0,
|
|
@@ -6651,6 +6665,14 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
6651
6665
|
return context.nodes.size;
|
|
6652
6666
|
},
|
|
6653
6667
|
// prettier-ignore
|
|
6668
|
+
getProvider() {
|
|
6669
|
+
return context.provider;
|
|
6670
|
+
},
|
|
6671
|
+
setProvider(provider) {
|
|
6672
|
+
context.provider = provider;
|
|
6673
|
+
context.onProviderUpdate.notify();
|
|
6674
|
+
},
|
|
6675
|
+
onProviderUpdate: context.onProviderUpdate.observable,
|
|
6654
6676
|
// send metadata when using a text editor
|
|
6655
6677
|
reportTextEditor,
|
|
6656
6678
|
// create a text mention when using a text editor
|
|
@@ -7484,7 +7506,8 @@ function createClient(options) {
|
|
|
7484
7506
|
markAllInboxNotificationsAsRead,
|
|
7485
7507
|
markInboxNotificationAsRead,
|
|
7486
7508
|
deleteAllInboxNotifications,
|
|
7487
|
-
deleteInboxNotification
|
|
7509
|
+
deleteInboxNotification,
|
|
7510
|
+
getThreads
|
|
7488
7511
|
} = createNotificationsApi({
|
|
7489
7512
|
baseUrl,
|
|
7490
7513
|
fetcher: clientOptions.polyfills?.fetch || /* istanbul ignore next */
|
|
@@ -7533,6 +7556,7 @@ function createClient(options) {
|
|
|
7533
7556
|
markInboxNotificationAsRead,
|
|
7534
7557
|
deleteAllInboxNotifications,
|
|
7535
7558
|
deleteInboxNotification,
|
|
7559
|
+
getThreads,
|
|
7536
7560
|
// Internal
|
|
7537
7561
|
[kInternal]: {
|
|
7538
7562
|
currentUserIdStore,
|