@liveblocks/core 1.8.3-oss1 → 1.9.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.mts +7 -21
- package/dist/index.d.ts +7 -21
- package/dist/index.js +61 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -14
- 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 = "1.
|
|
9
|
+
var PKG_VERSION = "1.9.0";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2145,8 +2145,8 @@ function createCommentsApi(roomId, getAuthValue, config) {
|
|
|
2145
2145
|
const url = new URL(
|
|
2146
2146
|
`/v2/c/rooms/${encodeURIComponent(roomId2)}${endpoint}`,
|
|
2147
2147
|
config.baseUrl
|
|
2148
|
-
)
|
|
2149
|
-
return await fetch(url, {
|
|
2148
|
+
);
|
|
2149
|
+
return await fetch(url.toString(), {
|
|
2150
2150
|
...options,
|
|
2151
2151
|
headers: {
|
|
2152
2152
|
...options?.headers,
|
|
@@ -2154,8 +2154,16 @@ function createCommentsApi(roomId, getAuthValue, config) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
});
|
|
2156
2156
|
}
|
|
2157
|
-
async function getThreads() {
|
|
2158
|
-
const response = await fetchApi(roomId, "/threads"
|
|
2157
|
+
async function getThreads(options) {
|
|
2158
|
+
const response = await fetchApi(roomId, "/threads/search", {
|
|
2159
|
+
body: JSON.stringify({
|
|
2160
|
+
...options?.query?.metadata && { metadata: options.query.metadata }
|
|
2161
|
+
}),
|
|
2162
|
+
headers: {
|
|
2163
|
+
"Content-Type": "application/json"
|
|
2164
|
+
},
|
|
2165
|
+
method: "POST"
|
|
2166
|
+
});
|
|
2159
2167
|
if (response.ok) {
|
|
2160
2168
|
const json = await response.json();
|
|
2161
2169
|
return json.data.map((thread) => convertToThreadData(thread));
|
|
@@ -2444,14 +2452,6 @@ var OpCode = /* @__PURE__ */ ((OpCode2) => {
|
|
|
2444
2452
|
OpCode2[OpCode2["CREATE_REGISTER"] = 8] = "CREATE_REGISTER";
|
|
2445
2453
|
return OpCode2;
|
|
2446
2454
|
})(OpCode || {});
|
|
2447
|
-
function ackOp(opId) {
|
|
2448
|
-
return {
|
|
2449
|
-
type: 5 /* DELETE_CRDT */,
|
|
2450
|
-
id: "ACK",
|
|
2451
|
-
// (H)ACK
|
|
2452
|
-
opId
|
|
2453
|
-
};
|
|
2454
|
-
}
|
|
2455
2455
|
function isAckOp(op) {
|
|
2456
2456
|
return op.type === 5 /* DELETE_CRDT */ && op.id === "ACK";
|
|
2457
2457
|
}
|
|
@@ -7135,7 +7135,6 @@ export {
|
|
|
7135
7135
|
OpCode,
|
|
7136
7136
|
ServerMsgCode,
|
|
7137
7137
|
WebsocketCloseCodes,
|
|
7138
|
-
ackOp,
|
|
7139
7138
|
asPos,
|
|
7140
7139
|
assert,
|
|
7141
7140
|
assertNever,
|