@liveblocks/core 1.9.0-example1 → 1.9.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/index.d.mts +30 -24
- package/dist/index.d.ts +30 -24
- package/dist/index.js +70 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -5
- 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.
|
|
9
|
+
var PKG_VERSION = "1.9.1";
|
|
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,6 +2452,14 @@ var OpCode = /* @__PURE__ */ ((OpCode2) => {
|
|
|
2444
2452
|
OpCode2[OpCode2["CREATE_REGISTER"] = 8] = "CREATE_REGISTER";
|
|
2445
2453
|
return OpCode2;
|
|
2446
2454
|
})(OpCode || {});
|
|
2455
|
+
function ackOp(opId) {
|
|
2456
|
+
return {
|
|
2457
|
+
type: 5 /* DELETE_CRDT */,
|
|
2458
|
+
id: "ACK",
|
|
2459
|
+
// (H)ACK
|
|
2460
|
+
opId
|
|
2461
|
+
};
|
|
2462
|
+
}
|
|
2447
2463
|
function isAckOp(op) {
|
|
2448
2464
|
return op.type === 5 /* DELETE_CRDT */ && op.id === "ACK";
|
|
2449
2465
|
}
|
|
@@ -7127,6 +7143,7 @@ export {
|
|
|
7127
7143
|
OpCode,
|
|
7128
7144
|
ServerMsgCode,
|
|
7129
7145
|
WebsocketCloseCodes,
|
|
7146
|
+
ackOp,
|
|
7130
7147
|
asPos,
|
|
7131
7148
|
assert,
|
|
7132
7149
|
assertNever,
|