@liveblocks/core 2.17.0-usrnotsettings3 → 2.17.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 +45 -94
- package/dist/index.d.ts +45 -94
- package/dist/index.js +211 -156
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +116 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
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.17.0
|
|
9
|
+
var PKG_VERSION = "2.17.0";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -181,12 +181,6 @@ function raise(msg) {
|
|
|
181
181
|
function entries(obj) {
|
|
182
182
|
return Object.entries(obj);
|
|
183
183
|
}
|
|
184
|
-
function keys(obj) {
|
|
185
|
-
return Object.keys(obj);
|
|
186
|
-
}
|
|
187
|
-
function values(obj) {
|
|
188
|
-
return Object.values(obj);
|
|
189
|
-
}
|
|
190
184
|
function mapValues(obj, mapFn) {
|
|
191
185
|
const result = {};
|
|
192
186
|
for (const pair of Object.entries(obj)) {
|
|
@@ -1064,9 +1058,9 @@ function urljoin(baseUrl, path, params) {
|
|
|
1064
1058
|
}
|
|
1065
1059
|
return url2.toString();
|
|
1066
1060
|
}
|
|
1067
|
-
function url(strings, ...
|
|
1061
|
+
function url(strings, ...values) {
|
|
1068
1062
|
return strings.reduce(
|
|
1069
|
-
(result, str, i) => result + encodeURIComponent(_nullishCoalesce(
|
|
1063
|
+
(result, str, i) => result + encodeURIComponent(_nullishCoalesce(values[i - 1], () => ( ""))) + str
|
|
1070
1064
|
);
|
|
1071
1065
|
}
|
|
1072
1066
|
|
|
@@ -1562,6 +1556,29 @@ function createApiClient({
|
|
|
1562
1556
|
}
|
|
1563
1557
|
);
|
|
1564
1558
|
}
|
|
1559
|
+
async function executeContextualPrompt(options) {
|
|
1560
|
+
const result = await httpClient.post(
|
|
1561
|
+
url`/v2/c/rooms/${options.roomId}/ai/contextual-prompt`,
|
|
1562
|
+
await authManager.getAuthValue({
|
|
1563
|
+
requestedScope: "room:read",
|
|
1564
|
+
roomId: options.roomId
|
|
1565
|
+
}),
|
|
1566
|
+
{
|
|
1567
|
+
prompt: options.prompt,
|
|
1568
|
+
context: {
|
|
1569
|
+
beforeSelection: options.context.beforeSelection,
|
|
1570
|
+
selection: options.context.selection,
|
|
1571
|
+
afterSelection: options.context.afterSelection
|
|
1572
|
+
},
|
|
1573
|
+
previous: options.previous
|
|
1574
|
+
},
|
|
1575
|
+
{ signal: options.signal }
|
|
1576
|
+
);
|
|
1577
|
+
if (!result || result.content.length === 0) {
|
|
1578
|
+
throw new Error("No content returned from server");
|
|
1579
|
+
}
|
|
1580
|
+
return result.content[0].text;
|
|
1581
|
+
}
|
|
1565
1582
|
async function listTextVersions(options) {
|
|
1566
1583
|
const result = await httpClient.get(
|
|
1567
1584
|
url`/v2/c/rooms/${options.roomId}/versions`,
|
|
@@ -1711,24 +1728,9 @@ function createApiClient({
|
|
|
1711
1728
|
await authManager.getAuthValue({ requestedScope: "comments:read" })
|
|
1712
1729
|
);
|
|
1713
1730
|
}
|
|
1714
|
-
async function getUserNotificationSettings(options) {
|
|
1715
|
-
return httpClient.get(
|
|
1716
|
-
url`/v2/c/notification-settings`,
|
|
1717
|
-
await authManager.getAuthValue({ requestedScope: "comments:read" }),
|
|
1718
|
-
void 0,
|
|
1719
|
-
{ signal: _optionalChain([options, 'optionalAccess', _18 => _18.signal]) }
|
|
1720
|
-
);
|
|
1721
|
-
}
|
|
1722
|
-
async function updateUserNotificationSettings(settings) {
|
|
1723
|
-
return httpClient.post(
|
|
1724
|
-
url`/v2/c/notification-settings`,
|
|
1725
|
-
await authManager.getAuthValue({ requestedScope: "comments:read" }),
|
|
1726
|
-
settings
|
|
1727
|
-
);
|
|
1728
|
-
}
|
|
1729
1731
|
async function getUserThreads_experimental(options) {
|
|
1730
1732
|
let query;
|
|
1731
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1733
|
+
if (_optionalChain([options, 'optionalAccess', _18 => _18.query])) {
|
|
1732
1734
|
query = objectToQuery(options.query);
|
|
1733
1735
|
}
|
|
1734
1736
|
const PAGE_SIZE = 50;
|
|
@@ -1736,7 +1738,7 @@ function createApiClient({
|
|
|
1736
1738
|
url`/v2/c/threads`,
|
|
1737
1739
|
await authManager.getAuthValue({ requestedScope: "comments:read" }),
|
|
1738
1740
|
{
|
|
1739
|
-
cursor: _optionalChain([options, 'optionalAccess',
|
|
1741
|
+
cursor: _optionalChain([options, 'optionalAccess', _19 => _19.cursor]),
|
|
1740
1742
|
query,
|
|
1741
1743
|
limit: PAGE_SIZE
|
|
1742
1744
|
}
|
|
@@ -1788,10 +1790,10 @@ function createApiClient({
|
|
|
1788
1790
|
removeReaction,
|
|
1789
1791
|
markThreadAsResolved,
|
|
1790
1792
|
markThreadAsUnresolved,
|
|
1791
|
-
markRoomInboxNotificationAsRead,
|
|
1792
1793
|
// Room notifications
|
|
1793
|
-
|
|
1794
|
+
markRoomInboxNotificationAsRead,
|
|
1794
1795
|
updateNotificationSettings,
|
|
1796
|
+
getNotificationSettings,
|
|
1795
1797
|
// Room text editor
|
|
1796
1798
|
createTextMention,
|
|
1797
1799
|
deleteTextMention,
|
|
@@ -1815,11 +1817,11 @@ function createApiClient({
|
|
|
1815
1817
|
markInboxNotificationAsRead,
|
|
1816
1818
|
deleteAllInboxNotifications,
|
|
1817
1819
|
deleteInboxNotification,
|
|
1818
|
-
getUserNotificationSettings,
|
|
1819
|
-
updateUserNotificationSettings,
|
|
1820
1820
|
// User threads
|
|
1821
1821
|
getUserThreads_experimental,
|
|
1822
|
-
getUserThreadsSince_experimental
|
|
1822
|
+
getUserThreadsSince_experimental,
|
|
1823
|
+
// AI
|
|
1824
|
+
executeContextualPrompt
|
|
1823
1825
|
};
|
|
1824
1826
|
}
|
|
1825
1827
|
function getBearerTokenFromAuthValue(authValue) {
|
|
@@ -1863,7 +1865,7 @@ var HttpClient = class {
|
|
|
1863
1865
|
// These headers are default, but can be overriden by custom headers
|
|
1864
1866
|
"Content-Type": "application/json; charset=utf-8",
|
|
1865
1867
|
// Possible header overrides
|
|
1866
|
-
..._optionalChain([options, 'optionalAccess',
|
|
1868
|
+
..._optionalChain([options, 'optionalAccess', _20 => _20.headers]),
|
|
1867
1869
|
// Cannot be overriden by custom headers
|
|
1868
1870
|
Authorization: `Bearer ${getBearerTokenFromAuthValue(authValue)}`,
|
|
1869
1871
|
"X-LB-Client": PKG_VERSION || "dev"
|
|
@@ -2338,7 +2340,7 @@ var FSM = class {
|
|
|
2338
2340
|
});
|
|
2339
2341
|
}
|
|
2340
2342
|
#getTargetFn(eventName) {
|
|
2341
|
-
return _optionalChain([this, 'access',
|
|
2343
|
+
return _optionalChain([this, 'access', _21 => _21.#allowedTransitions, 'access', _22 => _22.get, 'call', _23 => _23(this.currentState), 'optionalAccess', _24 => _24.get, 'call', _25 => _25(eventName)]);
|
|
2342
2344
|
}
|
|
2343
2345
|
/**
|
|
2344
2346
|
* Exits the current state, and executes any necessary cleanup functions.
|
|
@@ -2355,7 +2357,7 @@ var FSM = class {
|
|
|
2355
2357
|
this.#currentContext.allowPatching((patchableContext) => {
|
|
2356
2358
|
levels = _nullishCoalesce(levels, () => ( this.#cleanupStack.length));
|
|
2357
2359
|
for (let i = 0; i < levels; i++) {
|
|
2358
|
-
_optionalChain([this, 'access',
|
|
2360
|
+
_optionalChain([this, 'access', _26 => _26.#cleanupStack, 'access', _27 => _27.pop, 'call', _28 => _28(), 'optionalCall', _29 => _29(patchableContext)]);
|
|
2359
2361
|
}
|
|
2360
2362
|
});
|
|
2361
2363
|
}
|
|
@@ -2371,7 +2373,7 @@ var FSM = class {
|
|
|
2371
2373
|
this.#currentContext.allowPatching((patchableContext) => {
|
|
2372
2374
|
for (const pattern of enterPatterns) {
|
|
2373
2375
|
const enterFn = this.#enterFns.get(pattern);
|
|
2374
|
-
const cleanupFn = _optionalChain([enterFn, 'optionalCall',
|
|
2376
|
+
const cleanupFn = _optionalChain([enterFn, 'optionalCall', _30 => _30(patchableContext)]);
|
|
2375
2377
|
if (typeof cleanupFn === "function") {
|
|
2376
2378
|
this.#cleanupStack.push(cleanupFn);
|
|
2377
2379
|
} else {
|
|
@@ -2765,7 +2767,7 @@ function createConnectionStateMachine(delegates, options) {
|
|
|
2765
2767
|
}
|
|
2766
2768
|
function waitForActorId(event) {
|
|
2767
2769
|
const serverMsg = tryParseJson(event.data);
|
|
2768
|
-
if (_optionalChain([serverMsg, 'optionalAccess',
|
|
2770
|
+
if (_optionalChain([serverMsg, 'optionalAccess', _31 => _31.type]) === 104 /* ROOM_STATE */) {
|
|
2769
2771
|
didReceiveActor();
|
|
2770
2772
|
}
|
|
2771
2773
|
}
|
|
@@ -2874,12 +2876,12 @@ function createConnectionStateMachine(delegates, options) {
|
|
|
2874
2876
|
const sendHeartbeat = {
|
|
2875
2877
|
target: "@ok.awaiting-pong",
|
|
2876
2878
|
effect: (ctx) => {
|
|
2877
|
-
_optionalChain([ctx, 'access',
|
|
2879
|
+
_optionalChain([ctx, 'access', _32 => _32.socket, 'optionalAccess', _33 => _33.send, 'call', _34 => _34("ping")]);
|
|
2878
2880
|
}
|
|
2879
2881
|
};
|
|
2880
2882
|
const maybeHeartbeat = () => {
|
|
2881
2883
|
const doc = typeof document !== "undefined" ? document : void 0;
|
|
2882
|
-
const canZombie = _optionalChain([doc, 'optionalAccess',
|
|
2884
|
+
const canZombie = _optionalChain([doc, 'optionalAccess', _35 => _35.visibilityState]) === "hidden" && delegates.canZombie();
|
|
2883
2885
|
return canZombie ? "@idle.zombie" : sendHeartbeat;
|
|
2884
2886
|
};
|
|
2885
2887
|
machine.addTimedTransition("@ok.connected", HEARTBEAT_INTERVAL, maybeHeartbeat).addTransitions("@ok.connected", {
|
|
@@ -2918,7 +2920,7 @@ function createConnectionStateMachine(delegates, options) {
|
|
|
2918
2920
|
// socket, or not. So always check to see if the socket is still OPEN or
|
|
2919
2921
|
// not. When still OPEN, don't transition.
|
|
2920
2922
|
EXPLICIT_SOCKET_ERROR: (_, context) => {
|
|
2921
|
-
if (_optionalChain([context, 'access',
|
|
2923
|
+
if (_optionalChain([context, 'access', _36 => _36.socket, 'optionalAccess', _37 => _37.readyState]) === 1) {
|
|
2922
2924
|
return null;
|
|
2923
2925
|
}
|
|
2924
2926
|
return {
|
|
@@ -2970,17 +2972,17 @@ function createConnectionStateMachine(delegates, options) {
|
|
|
2970
2972
|
machine.send({ type: "NAVIGATOR_ONLINE" });
|
|
2971
2973
|
}
|
|
2972
2974
|
function onVisibilityChange() {
|
|
2973
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
2975
|
+
if (_optionalChain([doc, 'optionalAccess', _38 => _38.visibilityState]) === "visible") {
|
|
2974
2976
|
machine.send({ type: "WINDOW_GOT_FOCUS" });
|
|
2975
2977
|
}
|
|
2976
2978
|
}
|
|
2977
|
-
_optionalChain([win, 'optionalAccess',
|
|
2978
|
-
_optionalChain([win, 'optionalAccess',
|
|
2979
|
-
_optionalChain([root, 'optionalAccess',
|
|
2979
|
+
_optionalChain([win, 'optionalAccess', _39 => _39.addEventListener, 'call', _40 => _40("online", onNetworkBackOnline)]);
|
|
2980
|
+
_optionalChain([win, 'optionalAccess', _41 => _41.addEventListener, 'call', _42 => _42("offline", onNetworkOffline)]);
|
|
2981
|
+
_optionalChain([root, 'optionalAccess', _43 => _43.addEventListener, 'call', _44 => _44("visibilitychange", onVisibilityChange)]);
|
|
2980
2982
|
return () => {
|
|
2981
|
-
_optionalChain([root, 'optionalAccess',
|
|
2982
|
-
_optionalChain([win, 'optionalAccess',
|
|
2983
|
-
_optionalChain([win, 'optionalAccess',
|
|
2983
|
+
_optionalChain([root, 'optionalAccess', _45 => _45.removeEventListener, 'call', _46 => _46("visibilitychange", onVisibilityChange)]);
|
|
2984
|
+
_optionalChain([win, 'optionalAccess', _47 => _47.removeEventListener, 'call', _48 => _48("online", onNetworkBackOnline)]);
|
|
2985
|
+
_optionalChain([win, 'optionalAccess', _49 => _49.removeEventListener, 'call', _50 => _50("offline", onNetworkOffline)]);
|
|
2984
2986
|
teardownSocket(ctx.socket);
|
|
2985
2987
|
};
|
|
2986
2988
|
});
|
|
@@ -3069,7 +3071,7 @@ var ManagedSocket = class {
|
|
|
3069
3071
|
* message if this is somehow impossible.
|
|
3070
3072
|
*/
|
|
3071
3073
|
send(data) {
|
|
3072
|
-
const socket = _optionalChain([this, 'access',
|
|
3074
|
+
const socket = _optionalChain([this, 'access', _51 => _51.#machine, 'access', _52 => _52.context, 'optionalAccess', _53 => _53.socket]);
|
|
3073
3075
|
if (socket === null) {
|
|
3074
3076
|
warn("Cannot send: not connected yet", data);
|
|
3075
3077
|
} else if (socket.readyState !== 1) {
|
|
@@ -3173,7 +3175,7 @@ function createAuthManager(authOptions, onAuthenticate) {
|
|
|
3173
3175
|
return void 0;
|
|
3174
3176
|
}
|
|
3175
3177
|
async function makeAuthRequest(options) {
|
|
3176
|
-
const fetcher = _nullishCoalesce(_optionalChain([authOptions, 'access',
|
|
3178
|
+
const fetcher = _nullishCoalesce(_optionalChain([authOptions, 'access', _54 => _54.polyfills, 'optionalAccess', _55 => _55.fetch]), () => ( (typeof window === "undefined" ? void 0 : window.fetch)));
|
|
3177
3179
|
if (authentication.type === "private") {
|
|
3178
3180
|
if (fetcher === void 0) {
|
|
3179
3181
|
throw new StopRetrying(
|
|
@@ -3189,7 +3191,7 @@ function createAuthManager(authOptions, onAuthenticate) {
|
|
|
3189
3191
|
"The same Liveblocks auth token was issued from the backend before. Caching Liveblocks tokens is not supported."
|
|
3190
3192
|
);
|
|
3191
3193
|
}
|
|
3192
|
-
_optionalChain([onAuthenticate, 'optionalCall',
|
|
3194
|
+
_optionalChain([onAuthenticate, 'optionalCall', _56 => _56(parsed.parsed)]);
|
|
3193
3195
|
return parsed;
|
|
3194
3196
|
}
|
|
3195
3197
|
if (authentication.type === "custom") {
|
|
@@ -3197,7 +3199,7 @@ function createAuthManager(authOptions, onAuthenticate) {
|
|
|
3197
3199
|
if (response && typeof response === "object") {
|
|
3198
3200
|
if (typeof response.token === "string") {
|
|
3199
3201
|
const parsed = parseAuthToken(response.token);
|
|
3200
|
-
_optionalChain([onAuthenticate, 'optionalCall',
|
|
3202
|
+
_optionalChain([onAuthenticate, 'optionalCall', _57 => _57(parsed.parsed)]);
|
|
3201
3203
|
return parsed;
|
|
3202
3204
|
} else if (typeof response.error === "string") {
|
|
3203
3205
|
const reason = `Authentication failed: ${"reason" in response && typeof response.reason === "string" ? response.reason : "Forbidden"}`;
|
|
@@ -3358,7 +3360,7 @@ function sendToPanel(message, options) {
|
|
|
3358
3360
|
...message,
|
|
3359
3361
|
source: "liveblocks-devtools-client"
|
|
3360
3362
|
};
|
|
3361
|
-
if (!(_optionalChain([options, 'optionalAccess',
|
|
3363
|
+
if (!(_optionalChain([options, 'optionalAccess', _58 => _58.force]) || _bridgeActive)) {
|
|
3362
3364
|
return;
|
|
3363
3365
|
}
|
|
3364
3366
|
window.postMessage(fullMsg, "*");
|
|
@@ -3366,7 +3368,7 @@ function sendToPanel(message, options) {
|
|
|
3366
3368
|
var eventSource = makeEventSource();
|
|
3367
3369
|
if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
|
|
3368
3370
|
window.addEventListener("message", (event) => {
|
|
3369
|
-
if (event.source === window && _optionalChain([event, 'access',
|
|
3371
|
+
if (event.source === window && _optionalChain([event, 'access', _59 => _59.data, 'optionalAccess', _60 => _60.source]) === "liveblocks-devtools-panel") {
|
|
3370
3372
|
eventSource.notify(event.data);
|
|
3371
3373
|
} else {
|
|
3372
3374
|
}
|
|
@@ -3508,7 +3510,7 @@ function fullSync(room) {
|
|
|
3508
3510
|
msg: "room::sync::full",
|
|
3509
3511
|
roomId: room.id,
|
|
3510
3512
|
status: room.getStatus(),
|
|
3511
|
-
storage: _nullishCoalesce(_optionalChain([root, 'optionalAccess',
|
|
3513
|
+
storage: _nullishCoalesce(_optionalChain([root, 'optionalAccess', _61 => _61.toTreeNode, 'call', _62 => _62("root"), 'access', _63 => _63.payload]), () => ( null)),
|
|
3512
3514
|
me,
|
|
3513
3515
|
others
|
|
3514
3516
|
});
|
|
@@ -3932,7 +3934,7 @@ var LiveRegister = class _LiveRegister extends AbstractCrdt {
|
|
|
3932
3934
|
return [
|
|
3933
3935
|
{
|
|
3934
3936
|
type: 8 /* CREATE_REGISTER */,
|
|
3935
|
-
opId: _optionalChain([pool, 'optionalAccess',
|
|
3937
|
+
opId: _optionalChain([pool, 'optionalAccess', _64 => _64.generateOpId, 'call', _65 => _65()]),
|
|
3936
3938
|
id: this._id,
|
|
3937
3939
|
parentId,
|
|
3938
3940
|
parentKey,
|
|
@@ -4038,7 +4040,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4038
4040
|
const ops = [];
|
|
4039
4041
|
const op = {
|
|
4040
4042
|
id: this._id,
|
|
4041
|
-
opId: _optionalChain([pool, 'optionalAccess',
|
|
4043
|
+
opId: _optionalChain([pool, 'optionalAccess', _66 => _66.generateOpId, 'call', _67 => _67()]),
|
|
4042
4044
|
type: 2 /* CREATE_LIST */,
|
|
4043
4045
|
parentId,
|
|
4044
4046
|
parentKey
|
|
@@ -4309,7 +4311,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4309
4311
|
#applyInsertUndoRedo(op) {
|
|
4310
4312
|
const { id, parentKey: key } = op;
|
|
4311
4313
|
const child = creationOpToLiveNode(op);
|
|
4312
|
-
if (_optionalChain([this, 'access',
|
|
4314
|
+
if (_optionalChain([this, 'access', _68 => _68._pool, 'optionalAccess', _69 => _69.getNode, 'call', _70 => _70(id)]) !== void 0) {
|
|
4313
4315
|
return { modified: false };
|
|
4314
4316
|
}
|
|
4315
4317
|
child._attach(id, nn(this._pool));
|
|
@@ -4317,8 +4319,8 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4317
4319
|
const existingItemIndex = this._indexOfPosition(key);
|
|
4318
4320
|
let newKey = key;
|
|
4319
4321
|
if (existingItemIndex !== -1) {
|
|
4320
|
-
const before2 = _optionalChain([this, 'access',
|
|
4321
|
-
const after2 = _optionalChain([this, 'access',
|
|
4322
|
+
const before2 = _optionalChain([this, 'access', _71 => _71.#items, 'access', _72 => _72[existingItemIndex], 'optionalAccess', _73 => _73._parentPos]);
|
|
4323
|
+
const after2 = _optionalChain([this, 'access', _74 => _74.#items, 'access', _75 => _75[existingItemIndex + 1], 'optionalAccess', _76 => _76._parentPos]);
|
|
4322
4324
|
newKey = makePosition(before2, after2);
|
|
4323
4325
|
child._setParentLink(this, newKey);
|
|
4324
4326
|
}
|
|
@@ -4332,7 +4334,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4332
4334
|
#applySetUndoRedo(op) {
|
|
4333
4335
|
const { id, parentKey: key } = op;
|
|
4334
4336
|
const child = creationOpToLiveNode(op);
|
|
4335
|
-
if (_optionalChain([this, 'access',
|
|
4337
|
+
if (_optionalChain([this, 'access', _77 => _77._pool, 'optionalAccess', _78 => _78.getNode, 'call', _79 => _79(id)]) !== void 0) {
|
|
4336
4338
|
return { modified: false };
|
|
4337
4339
|
}
|
|
4338
4340
|
this.#unacknowledgedSets.set(key, nn(op.opId));
|
|
@@ -4453,7 +4455,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4453
4455
|
} else {
|
|
4454
4456
|
this.#items[existingItemIndex]._setParentLink(
|
|
4455
4457
|
this,
|
|
4456
|
-
makePosition(newKey, _optionalChain([this, 'access',
|
|
4458
|
+
makePosition(newKey, _optionalChain([this, 'access', _80 => _80.#items, 'access', _81 => _81[existingItemIndex + 1], 'optionalAccess', _82 => _82._parentPos]))
|
|
4457
4459
|
);
|
|
4458
4460
|
const previousIndex = this.#items.indexOf(child);
|
|
4459
4461
|
child._setParentLink(this, newKey);
|
|
@@ -4478,7 +4480,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4478
4480
|
if (existingItemIndex !== -1) {
|
|
4479
4481
|
this.#items[existingItemIndex]._setParentLink(
|
|
4480
4482
|
this,
|
|
4481
|
-
makePosition(newKey, _optionalChain([this, 'access',
|
|
4483
|
+
makePosition(newKey, _optionalChain([this, 'access', _83 => _83.#items, 'access', _84 => _84[existingItemIndex + 1], 'optionalAccess', _85 => _85._parentPos]))
|
|
4482
4484
|
);
|
|
4483
4485
|
}
|
|
4484
4486
|
child._setParentLink(this, newKey);
|
|
@@ -4497,7 +4499,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4497
4499
|
if (existingItemIndex !== -1) {
|
|
4498
4500
|
this.#items[existingItemIndex]._setParentLink(
|
|
4499
4501
|
this,
|
|
4500
|
-
makePosition(newKey, _optionalChain([this, 'access',
|
|
4502
|
+
makePosition(newKey, _optionalChain([this, 'access', _86 => _86.#items, 'access', _87 => _87[existingItemIndex + 1], 'optionalAccess', _88 => _88._parentPos]))
|
|
4501
4503
|
);
|
|
4502
4504
|
}
|
|
4503
4505
|
child._setParentLink(this, newKey);
|
|
@@ -4524,7 +4526,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4524
4526
|
if (existingItemIndex !== -1) {
|
|
4525
4527
|
this.#items[existingItemIndex]._setParentLink(
|
|
4526
4528
|
this,
|
|
4527
|
-
makePosition(newKey, _optionalChain([this, 'access',
|
|
4529
|
+
makePosition(newKey, _optionalChain([this, 'access', _89 => _89.#items, 'access', _90 => _90[existingItemIndex + 1], 'optionalAccess', _91 => _91._parentPos]))
|
|
4528
4530
|
);
|
|
4529
4531
|
}
|
|
4530
4532
|
child._setParentLink(this, newKey);
|
|
@@ -4582,7 +4584,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4582
4584
|
* @param element The element to add to the end of the LiveList.
|
|
4583
4585
|
*/
|
|
4584
4586
|
push(element) {
|
|
4585
|
-
_optionalChain([this, 'access',
|
|
4587
|
+
_optionalChain([this, 'access', _92 => _92._pool, 'optionalAccess', _93 => _93.assertStorageIsWritable, 'call', _94 => _94()]);
|
|
4586
4588
|
return this.insert(element, this.length);
|
|
4587
4589
|
}
|
|
4588
4590
|
/**
|
|
@@ -4591,7 +4593,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4591
4593
|
* @param index The index at which you want to insert the element.
|
|
4592
4594
|
*/
|
|
4593
4595
|
insert(element, index) {
|
|
4594
|
-
_optionalChain([this, 'access',
|
|
4596
|
+
_optionalChain([this, 'access', _95 => _95._pool, 'optionalAccess', _96 => _96.assertStorageIsWritable, 'call', _97 => _97()]);
|
|
4595
4597
|
if (index < 0 || index > this.#items.length) {
|
|
4596
4598
|
throw new Error(
|
|
4597
4599
|
`Cannot insert list item at index "${index}". index should be between 0 and ${this.#items.length}`
|
|
@@ -4621,7 +4623,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4621
4623
|
* @param targetIndex The index where the element should be after moving.
|
|
4622
4624
|
*/
|
|
4623
4625
|
move(index, targetIndex) {
|
|
4624
|
-
_optionalChain([this, 'access',
|
|
4626
|
+
_optionalChain([this, 'access', _98 => _98._pool, 'optionalAccess', _99 => _99.assertStorageIsWritable, 'call', _100 => _100()]);
|
|
4625
4627
|
if (targetIndex < 0) {
|
|
4626
4628
|
throw new Error("targetIndex cannot be less than 0");
|
|
4627
4629
|
}
|
|
@@ -4679,7 +4681,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4679
4681
|
* @param index The index of the element to delete
|
|
4680
4682
|
*/
|
|
4681
4683
|
delete(index) {
|
|
4682
|
-
_optionalChain([this, 'access',
|
|
4684
|
+
_optionalChain([this, 'access', _101 => _101._pool, 'optionalAccess', _102 => _102.assertStorageIsWritable, 'call', _103 => _103()]);
|
|
4683
4685
|
if (index < 0 || index >= this.#items.length) {
|
|
4684
4686
|
throw new Error(
|
|
4685
4687
|
`Cannot delete list item at index "${index}". index should be between 0 and ${this.#items.length - 1}`
|
|
@@ -4712,7 +4714,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4712
4714
|
}
|
|
4713
4715
|
}
|
|
4714
4716
|
clear() {
|
|
4715
|
-
_optionalChain([this, 'access',
|
|
4717
|
+
_optionalChain([this, 'access', _104 => _104._pool, 'optionalAccess', _105 => _105.assertStorageIsWritable, 'call', _106 => _106()]);
|
|
4716
4718
|
if (this._pool) {
|
|
4717
4719
|
const ops = [];
|
|
4718
4720
|
const reverseOps = [];
|
|
@@ -4746,7 +4748,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4746
4748
|
}
|
|
4747
4749
|
}
|
|
4748
4750
|
set(index, item) {
|
|
4749
|
-
_optionalChain([this, 'access',
|
|
4751
|
+
_optionalChain([this, 'access', _107 => _107._pool, 'optionalAccess', _108 => _108.assertStorageIsWritable, 'call', _109 => _109()]);
|
|
4750
4752
|
if (index < 0 || index >= this.#items.length) {
|
|
4751
4753
|
throw new Error(
|
|
4752
4754
|
`Cannot set list item at index "${index}". index should be between 0 and ${this.#items.length - 1}`
|
|
@@ -4892,7 +4894,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
4892
4894
|
#shiftItemPosition(index, key) {
|
|
4893
4895
|
const shiftedPosition = makePosition(
|
|
4894
4896
|
key,
|
|
4895
|
-
this.#items.length > index + 1 ? _optionalChain([this, 'access',
|
|
4897
|
+
this.#items.length > index + 1 ? _optionalChain([this, 'access', _110 => _110.#items, 'access', _111 => _111[index + 1], 'optionalAccess', _112 => _112._parentPos]) : void 0
|
|
4896
4898
|
);
|
|
4897
4899
|
this.#items[index]._setParentLink(this, shiftedPosition);
|
|
4898
4900
|
}
|
|
@@ -5017,7 +5019,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
|
|
|
5017
5019
|
const ops = [];
|
|
5018
5020
|
const op = {
|
|
5019
5021
|
id: this._id,
|
|
5020
|
-
opId: _optionalChain([pool, 'optionalAccess',
|
|
5022
|
+
opId: _optionalChain([pool, 'optionalAccess', _113 => _113.generateOpId, 'call', _114 => _114()]),
|
|
5021
5023
|
type: 7 /* CREATE_MAP */,
|
|
5022
5024
|
parentId,
|
|
5023
5025
|
parentKey
|
|
@@ -5152,7 +5154,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
|
|
|
5152
5154
|
* @param value The value of the element to add. Should be serializable to JSON.
|
|
5153
5155
|
*/
|
|
5154
5156
|
set(key, value) {
|
|
5155
|
-
_optionalChain([this, 'access',
|
|
5157
|
+
_optionalChain([this, 'access', _115 => _115._pool, 'optionalAccess', _116 => _116.assertStorageIsWritable, 'call', _117 => _117()]);
|
|
5156
5158
|
const oldValue = this.#map.get(key);
|
|
5157
5159
|
if (oldValue) {
|
|
5158
5160
|
oldValue._detach();
|
|
@@ -5198,7 +5200,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
|
|
|
5198
5200
|
* @returns true if an element existed and has been removed, or false if the element does not exist.
|
|
5199
5201
|
*/
|
|
5200
5202
|
delete(key) {
|
|
5201
|
-
_optionalChain([this, 'access',
|
|
5203
|
+
_optionalChain([this, 'access', _118 => _118._pool, 'optionalAccess', _119 => _119.assertStorageIsWritable, 'call', _120 => _120()]);
|
|
5202
5204
|
const item = this.#map.get(key);
|
|
5203
5205
|
if (item === void 0) {
|
|
5204
5206
|
return false;
|
|
@@ -5377,7 +5379,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
|
|
|
5377
5379
|
if (this._id === void 0) {
|
|
5378
5380
|
throw new Error("Cannot serialize item is not attached");
|
|
5379
5381
|
}
|
|
5380
|
-
const opId = _optionalChain([pool, 'optionalAccess',
|
|
5382
|
+
const opId = _optionalChain([pool, 'optionalAccess', _121 => _121.generateOpId, 'call', _122 => _122()]);
|
|
5381
5383
|
const ops = [];
|
|
5382
5384
|
const op = {
|
|
5383
5385
|
type: 4 /* CREATE_OBJECT */,
|
|
@@ -5649,7 +5651,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
|
|
|
5649
5651
|
* @param value The value of the property to add
|
|
5650
5652
|
*/
|
|
5651
5653
|
set(key, value) {
|
|
5652
|
-
_optionalChain([this, 'access',
|
|
5654
|
+
_optionalChain([this, 'access', _123 => _123._pool, 'optionalAccess', _124 => _124.assertStorageIsWritable, 'call', _125 => _125()]);
|
|
5653
5655
|
this.update({ [key]: value });
|
|
5654
5656
|
}
|
|
5655
5657
|
/**
|
|
@@ -5664,7 +5666,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
|
|
|
5664
5666
|
* @param key The key of the property to delete
|
|
5665
5667
|
*/
|
|
5666
5668
|
delete(key) {
|
|
5667
|
-
_optionalChain([this, 'access',
|
|
5669
|
+
_optionalChain([this, 'access', _126 => _126._pool, 'optionalAccess', _127 => _127.assertStorageIsWritable, 'call', _128 => _128()]);
|
|
5668
5670
|
const keyAsString = key;
|
|
5669
5671
|
const oldValue = this.#map.get(keyAsString);
|
|
5670
5672
|
if (oldValue === void 0) {
|
|
@@ -5717,7 +5719,7 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
|
|
|
5717
5719
|
* @param patch The object used to overrides properties
|
|
5718
5720
|
*/
|
|
5719
5721
|
update(patch) {
|
|
5720
|
-
_optionalChain([this, 'access',
|
|
5722
|
+
_optionalChain([this, 'access', _129 => _129._pool, 'optionalAccess', _130 => _130.assertStorageIsWritable, 'call', _131 => _131()]);
|
|
5721
5723
|
if (this._pool === void 0 || this._id === void 0) {
|
|
5722
5724
|
for (const key in patch) {
|
|
5723
5725
|
const newValue = patch[key];
|
|
@@ -6337,15 +6339,13 @@ function defaultMessageFromContext(context) {
|
|
|
6337
6339
|
return "Could not delete all inbox notifications";
|
|
6338
6340
|
case "UPDATE_NOTIFICATION_SETTINGS_ERROR":
|
|
6339
6341
|
return "Could not update notification settings";
|
|
6340
|
-
case "UPDATE_USER_NOTIFICATION_SETTINGS_ERROR":
|
|
6341
|
-
return "Could not update user notification settings";
|
|
6342
6342
|
default:
|
|
6343
6343
|
return assertNever(context, "Unhandled case");
|
|
6344
6344
|
}
|
|
6345
6345
|
}
|
|
6346
6346
|
|
|
6347
6347
|
// src/room.ts
|
|
6348
|
-
var MAX_SOCKET_MESSAGE_SIZE = 1024 * 1024 -
|
|
6348
|
+
var MAX_SOCKET_MESSAGE_SIZE = 1024 * 1024 - 512;
|
|
6349
6349
|
function makeIdFactory(connectionId) {
|
|
6350
6350
|
let count = 0;
|
|
6351
6351
|
return () => `${connectionId}:${count++}`;
|
|
@@ -6368,15 +6368,15 @@ function installBackgroundTabSpy() {
|
|
|
6368
6368
|
const doc = typeof document !== "undefined" ? document : void 0;
|
|
6369
6369
|
const inBackgroundSince = { current: null };
|
|
6370
6370
|
function onVisibilityChange() {
|
|
6371
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
6371
|
+
if (_optionalChain([doc, 'optionalAccess', _132 => _132.visibilityState]) === "hidden") {
|
|
6372
6372
|
inBackgroundSince.current = _nullishCoalesce(inBackgroundSince.current, () => ( Date.now()));
|
|
6373
6373
|
} else {
|
|
6374
6374
|
inBackgroundSince.current = null;
|
|
6375
6375
|
}
|
|
6376
6376
|
}
|
|
6377
|
-
_optionalChain([doc, 'optionalAccess',
|
|
6377
|
+
_optionalChain([doc, 'optionalAccess', _133 => _133.addEventListener, 'call', _134 => _134("visibilitychange", onVisibilityChange)]);
|
|
6378
6378
|
const unsub = () => {
|
|
6379
|
-
_optionalChain([doc, 'optionalAccess',
|
|
6379
|
+
_optionalChain([doc, 'optionalAccess', _135 => _135.removeEventListener, 'call', _136 => _136("visibilitychange", onVisibilityChange)]);
|
|
6380
6380
|
};
|
|
6381
6381
|
return [inBackgroundSince, unsub];
|
|
6382
6382
|
}
|
|
@@ -6561,7 +6561,7 @@ function createRoom(options, config) {
|
|
|
6561
6561
|
}
|
|
6562
6562
|
},
|
|
6563
6563
|
assertStorageIsWritable: () => {
|
|
6564
|
-
const scopes = _optionalChain([context, 'access',
|
|
6564
|
+
const scopes = _optionalChain([context, 'access', _137 => _137.dynamicSessionInfoSig, 'access', _138 => _138.get, 'call', _139 => _139(), 'optionalAccess', _140 => _140.scopes]);
|
|
6565
6565
|
if (scopes === void 0) {
|
|
6566
6566
|
return;
|
|
6567
6567
|
}
|
|
@@ -6614,24 +6614,88 @@ function createRoom(options, config) {
|
|
|
6614
6614
|
async function createTextVersion() {
|
|
6615
6615
|
return httpClient.createTextVersion({ roomId });
|
|
6616
6616
|
}
|
|
6617
|
+
async function executeContextualPrompt(options2) {
|
|
6618
|
+
return httpClient.executeContextualPrompt({
|
|
6619
|
+
roomId,
|
|
6620
|
+
...options2
|
|
6621
|
+
});
|
|
6622
|
+
}
|
|
6623
|
+
function* chunkOps(msg) {
|
|
6624
|
+
const { ops, ...rest } = msg;
|
|
6625
|
+
if (ops.length < 2) {
|
|
6626
|
+
throw new Error("Cannot split ops into smaller chunks");
|
|
6627
|
+
}
|
|
6628
|
+
const mid = Math.floor(ops.length / 2);
|
|
6629
|
+
const firstHalf = ops.slice(0, mid);
|
|
6630
|
+
const secondHalf = ops.slice(mid);
|
|
6631
|
+
for (const halfOps of [firstHalf, secondHalf]) {
|
|
6632
|
+
const half = { ops: halfOps, ...rest };
|
|
6633
|
+
const text = JSON.stringify([half]);
|
|
6634
|
+
if (!isTooBigForWebSocket(text)) {
|
|
6635
|
+
yield text;
|
|
6636
|
+
} else {
|
|
6637
|
+
yield* chunkOps(half);
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
function* chunkMessages(messages) {
|
|
6642
|
+
if (messages.length < 2) {
|
|
6643
|
+
if (messages[0].type === 201 /* UPDATE_STORAGE */) {
|
|
6644
|
+
yield* chunkOps(messages[0]);
|
|
6645
|
+
return;
|
|
6646
|
+
} else {
|
|
6647
|
+
throw new Error(
|
|
6648
|
+
"Cannot split into chunks smaller than the allowed message size"
|
|
6649
|
+
);
|
|
6650
|
+
}
|
|
6651
|
+
}
|
|
6652
|
+
const mid = Math.floor(messages.length / 2);
|
|
6653
|
+
const firstHalf = messages.slice(0, mid);
|
|
6654
|
+
const secondHalf = messages.slice(mid);
|
|
6655
|
+
for (const half of [firstHalf, secondHalf]) {
|
|
6656
|
+
const text = JSON.stringify(half);
|
|
6657
|
+
if (!isTooBigForWebSocket(text)) {
|
|
6658
|
+
yield text;
|
|
6659
|
+
} else {
|
|
6660
|
+
yield* chunkMessages(half);
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6664
|
+
function isTooBigForWebSocket(text) {
|
|
6665
|
+
if (text.length * 4 < MAX_SOCKET_MESSAGE_SIZE) {
|
|
6666
|
+
return false;
|
|
6667
|
+
}
|
|
6668
|
+
return new TextEncoder().encode(text).length >= MAX_SOCKET_MESSAGE_SIZE;
|
|
6669
|
+
}
|
|
6617
6670
|
function sendMessages(messages) {
|
|
6618
|
-
const
|
|
6619
|
-
const
|
|
6620
|
-
if (
|
|
6621
|
-
|
|
6622
|
-
|
|
6671
|
+
const strategy = _nullishCoalesce(config.largeMessageStrategy, () => ( "default"));
|
|
6672
|
+
const text = JSON.stringify(messages);
|
|
6673
|
+
if (!isTooBigForWebSocket(text)) {
|
|
6674
|
+
return managedSocket.send(text);
|
|
6675
|
+
}
|
|
6676
|
+
switch (strategy) {
|
|
6677
|
+
case "default": {
|
|
6678
|
+
error2("Message is too large for websockets, not sending. Configure largeMessageStrategy option to deal with this.");
|
|
6679
|
+
return;
|
|
6680
|
+
}
|
|
6681
|
+
case "split": {
|
|
6682
|
+
warn("Message is too large for websockets, splitting into smaller chunks");
|
|
6683
|
+
for (const chunk2 of chunkMessages(messages)) {
|
|
6684
|
+
managedSocket.send(chunk2);
|
|
6685
|
+
}
|
|
6686
|
+
return;
|
|
6687
|
+
}
|
|
6688
|
+
case "experimental-fallback-to-http": {
|
|
6689
|
+
warn("Message is too large for websockets, so sending over HTTP instead");
|
|
6690
|
+
const nonce = _nullishCoalesce(_optionalChain([context, 'access', _141 => _141.dynamicSessionInfoSig, 'access', _142 => _142.get, 'call', _143 => _143(), 'optionalAccess', _144 => _144.nonce]), () => ( raise("Session is not authorized to send message over HTTP")));
|
|
6623
6691
|
void httpClient.sendMessages({ roomId, nonce, messages }).then((resp) => {
|
|
6624
6692
|
if (!resp.ok && resp.status === 403) {
|
|
6625
6693
|
managedSocket.reconnect();
|
|
6626
6694
|
}
|
|
6627
6695
|
});
|
|
6628
|
-
warn(
|
|
6629
|
-
"Message was too large for websockets and sent over HTTP instead"
|
|
6630
|
-
);
|
|
6631
6696
|
return;
|
|
6632
6697
|
}
|
|
6633
6698
|
}
|
|
6634
|
-
managedSocket.send(serializedPayload);
|
|
6635
6699
|
}
|
|
6636
6700
|
const self = DerivedSignal.from(
|
|
6637
6701
|
context.staticSessionInfoSig,
|
|
@@ -6674,7 +6738,7 @@ function createRoom(options, config) {
|
|
|
6674
6738
|
} else {
|
|
6675
6739
|
context.root = LiveObject._fromItems(message.items, pool);
|
|
6676
6740
|
}
|
|
6677
|
-
const canWrite = _nullishCoalesce(_optionalChain([self, 'access',
|
|
6741
|
+
const canWrite = _nullishCoalesce(_optionalChain([self, 'access', _145 => _145.get, 'call', _146 => _146(), 'optionalAccess', _147 => _147.canWrite]), () => ( true));
|
|
6678
6742
|
const stackSizeBefore = context.undoStack.length;
|
|
6679
6743
|
for (const key in context.initialStorage) {
|
|
6680
6744
|
if (context.root.get(key) === void 0) {
|
|
@@ -6877,7 +6941,7 @@ function createRoom(options, config) {
|
|
|
6877
6941
|
}
|
|
6878
6942
|
context.myPresence.patch(patch);
|
|
6879
6943
|
if (context.activeBatch) {
|
|
6880
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
6944
|
+
if (_optionalChain([options2, 'optionalAccess', _148 => _148.addToHistory])) {
|
|
6881
6945
|
context.activeBatch.reverseOps.unshift({
|
|
6882
6946
|
type: "presence",
|
|
6883
6947
|
data: oldValues
|
|
@@ -6886,7 +6950,7 @@ function createRoom(options, config) {
|
|
|
6886
6950
|
context.activeBatch.updates.presence = true;
|
|
6887
6951
|
} else {
|
|
6888
6952
|
flushNowOrSoon();
|
|
6889
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
6953
|
+
if (_optionalChain([options2, 'optionalAccess', _149 => _149.addToHistory])) {
|
|
6890
6954
|
addToUndoStack([{ type: "presence", data: oldValues }]);
|
|
6891
6955
|
}
|
|
6892
6956
|
notify({ presence: true });
|
|
@@ -7083,7 +7147,7 @@ function createRoom(options, config) {
|
|
|
7083
7147
|
if (process.env.NODE_ENV !== "production") {
|
|
7084
7148
|
const traces = /* @__PURE__ */ new Set();
|
|
7085
7149
|
for (const opId of message.opIds) {
|
|
7086
|
-
const trace = _optionalChain([context, 'access',
|
|
7150
|
+
const trace = _optionalChain([context, 'access', _150 => _150.opStackTraces, 'optionalAccess', _151 => _151.get, 'call', _152 => _152(opId)]);
|
|
7087
7151
|
if (trace) {
|
|
7088
7152
|
traces.add(trace);
|
|
7089
7153
|
}
|
|
@@ -7217,7 +7281,7 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7217
7281
|
const unacknowledgedOps = new Map(context.unacknowledgedOps);
|
|
7218
7282
|
createOrUpdateRootFromMessage(message);
|
|
7219
7283
|
applyAndSendOps(unacknowledgedOps);
|
|
7220
|
-
_optionalChain([_resolveStoragePromise, 'optionalCall',
|
|
7284
|
+
_optionalChain([_resolveStoragePromise, 'optionalCall', _153 => _153()]);
|
|
7221
7285
|
notifyStorageStatus();
|
|
7222
7286
|
eventHub.storageDidLoad.notify();
|
|
7223
7287
|
}
|
|
@@ -7439,8 +7503,8 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7439
7503
|
async function getThreads(options2) {
|
|
7440
7504
|
return httpClient.getThreads({
|
|
7441
7505
|
roomId,
|
|
7442
|
-
query: _optionalChain([options2, 'optionalAccess',
|
|
7443
|
-
cursor: _optionalChain([options2, 'optionalAccess',
|
|
7506
|
+
query: _optionalChain([options2, 'optionalAccess', _154 => _154.query]),
|
|
7507
|
+
cursor: _optionalChain([options2, 'optionalAccess', _155 => _155.cursor])
|
|
7444
7508
|
});
|
|
7445
7509
|
}
|
|
7446
7510
|
async function getThread(threadId) {
|
|
@@ -7541,7 +7605,7 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7541
7605
|
function getNotificationSettings(options2) {
|
|
7542
7606
|
return httpClient.getNotificationSettings({
|
|
7543
7607
|
roomId,
|
|
7544
|
-
signal: _optionalChain([options2, 'optionalAccess',
|
|
7608
|
+
signal: _optionalChain([options2, 'optionalAccess', _156 => _156.signal])
|
|
7545
7609
|
});
|
|
7546
7610
|
}
|
|
7547
7611
|
function updateNotificationSettings(settings) {
|
|
@@ -7563,7 +7627,7 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7563
7627
|
{
|
|
7564
7628
|
[kInternal]: {
|
|
7565
7629
|
get presenceBuffer() {
|
|
7566
|
-
return deepClone(_nullishCoalesce(_optionalChain([context, 'access',
|
|
7630
|
+
return deepClone(_nullishCoalesce(_optionalChain([context, 'access', _157 => _157.buffer, 'access', _158 => _158.presenceUpdates, 'optionalAccess', _159 => _159.data]), () => ( null)));
|
|
7567
7631
|
},
|
|
7568
7632
|
// prettier-ignore
|
|
7569
7633
|
get undoStack() {
|
|
@@ -7578,9 +7642,9 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7578
7642
|
return context.yjsProvider;
|
|
7579
7643
|
},
|
|
7580
7644
|
setYjsProvider(newProvider) {
|
|
7581
|
-
_optionalChain([context, 'access',
|
|
7645
|
+
_optionalChain([context, 'access', _160 => _160.yjsProvider, 'optionalAccess', _161 => _161.off, 'call', _162 => _162("status", yjsStatusDidChange)]);
|
|
7582
7646
|
context.yjsProvider = newProvider;
|
|
7583
|
-
_optionalChain([newProvider, 'optionalAccess',
|
|
7647
|
+
_optionalChain([newProvider, 'optionalAccess', _163 => _163.on, 'call', _164 => _164("status", yjsStatusDidChange)]);
|
|
7584
7648
|
context.yjsProviderDidChange.notify();
|
|
7585
7649
|
},
|
|
7586
7650
|
yjsProviderDidChange: context.yjsProviderDidChange.observable,
|
|
@@ -7598,6 +7662,8 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7598
7662
|
getTextVersion,
|
|
7599
7663
|
// create a version
|
|
7600
7664
|
createTextVersion,
|
|
7665
|
+
// execute a contextual prompt
|
|
7666
|
+
executeContextualPrompt,
|
|
7601
7667
|
// Support for the Liveblocks browser extension
|
|
7602
7668
|
getSelf_forDevTools: () => selfAsTreeNode.get(),
|
|
7603
7669
|
getOthers_forDevTools: () => others_forDevTools.get(),
|
|
@@ -7620,7 +7686,7 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7620
7686
|
disconnect: () => managedSocket.disconnect(),
|
|
7621
7687
|
destroy: () => {
|
|
7622
7688
|
syncSourceForStorage.destroy();
|
|
7623
|
-
_optionalChain([context, 'access',
|
|
7689
|
+
_optionalChain([context, 'access', _165 => _165.yjsProvider, 'optionalAccess', _166 => _166.off, 'call', _167 => _167("status", yjsStatusDidChange)]);
|
|
7624
7690
|
syncSourceForYjs.destroy();
|
|
7625
7691
|
uninstallBgTabSpy();
|
|
7626
7692
|
managedSocket.destroy();
|
|
@@ -7764,7 +7830,7 @@ function makeClassicSubscribeFn(roomId, events, errorEvents) {
|
|
|
7764
7830
|
}
|
|
7765
7831
|
if (isLiveNode(first)) {
|
|
7766
7832
|
const node = first;
|
|
7767
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7833
|
+
if (_optionalChain([options, 'optionalAccess', _168 => _168.isDeep])) {
|
|
7768
7834
|
const storageCallback = second;
|
|
7769
7835
|
return subscribeToLiveStructureDeeply(node, storageCallback);
|
|
7770
7836
|
} else {
|
|
@@ -7843,8 +7909,8 @@ function createClient(options) {
|
|
|
7843
7909
|
const userId = token.k === "sec-legacy" /* SECRET_LEGACY */ ? token.id : token.uid;
|
|
7844
7910
|
currentUserId.set(() => userId);
|
|
7845
7911
|
});
|
|
7846
|
-
const fetchPolyfill = _optionalChain([clientOptions, 'access',
|
|
7847
|
-
_optionalChain([globalThis, 'access',
|
|
7912
|
+
const fetchPolyfill = _optionalChain([clientOptions, 'access', _169 => _169.polyfills, 'optionalAccess', _170 => _170.fetch]) || /* istanbul ignore next */
|
|
7913
|
+
_optionalChain([globalThis, 'access', _171 => _171.fetch, 'optionalAccess', _172 => _172.bind, 'call', _173 => _173(globalThis)]);
|
|
7848
7914
|
const httpClient = createApiClient({
|
|
7849
7915
|
baseUrl,
|
|
7850
7916
|
fetchPolyfill,
|
|
@@ -7895,14 +7961,14 @@ function createClient(options) {
|
|
|
7895
7961
|
createSocket: makeCreateSocketDelegateForRoom(
|
|
7896
7962
|
roomId,
|
|
7897
7963
|
baseUrl,
|
|
7898
|
-
_optionalChain([clientOptions, 'access',
|
|
7964
|
+
_optionalChain([clientOptions, 'access', _174 => _174.polyfills, 'optionalAccess', _175 => _175.WebSocket])
|
|
7899
7965
|
),
|
|
7900
7966
|
authenticate: makeAuthDelegateForRoom(roomId, authManager)
|
|
7901
7967
|
})),
|
|
7902
7968
|
enableDebugLogging: clientOptions.enableDebugLogging,
|
|
7903
7969
|
baseUrl,
|
|
7904
7970
|
errorEventSource: liveblocksErrorSource,
|
|
7905
|
-
|
|
7971
|
+
largeMessageStrategy: _nullishCoalesce(clientOptions.largeMessageStrategy, () => ( (clientOptions.unstable_fallbackToHTTP ? "experimental-fallback-to-http" : void 0))),
|
|
7906
7972
|
unstable_streamData: !!clientOptions.unstable_streamData,
|
|
7907
7973
|
roomHttpClient: httpClient,
|
|
7908
7974
|
createSyncSource
|
|
@@ -7918,7 +7984,7 @@ function createClient(options) {
|
|
|
7918
7984
|
const shouldConnect = _nullishCoalesce(options2.autoConnect, () => ( true));
|
|
7919
7985
|
if (shouldConnect) {
|
|
7920
7986
|
if (typeof atob === "undefined") {
|
|
7921
|
-
if (_optionalChain([clientOptions, 'access',
|
|
7987
|
+
if (_optionalChain([clientOptions, 'access', _176 => _176.polyfills, 'optionalAccess', _177 => _177.atob]) === void 0) {
|
|
7922
7988
|
throw new Error(
|
|
7923
7989
|
"You need to polyfill atob to use the client in your environment. Please follow the instructions at https://liveblocks.io/docs/errors/liveblocks-client/atob-polyfill"
|
|
7924
7990
|
);
|
|
@@ -7930,7 +7996,7 @@ function createClient(options) {
|
|
|
7930
7996
|
return leaseRoom(newRoomDetails);
|
|
7931
7997
|
}
|
|
7932
7998
|
function getRoom(roomId) {
|
|
7933
|
-
const room = _optionalChain([roomsById, 'access',
|
|
7999
|
+
const room = _optionalChain([roomsById, 'access', _178 => _178.get, 'call', _179 => _179(roomId), 'optionalAccess', _180 => _180.room]);
|
|
7934
8000
|
return room ? room : null;
|
|
7935
8001
|
}
|
|
7936
8002
|
function logout() {
|
|
@@ -7950,7 +8016,7 @@ function createClient(options) {
|
|
|
7950
8016
|
const batchedResolveUsers = new Batch(
|
|
7951
8017
|
async (batchedUserIds) => {
|
|
7952
8018
|
const userIds = batchedUserIds.flat();
|
|
7953
|
-
const users = await _optionalChain([resolveUsers, 'optionalCall',
|
|
8019
|
+
const users = await _optionalChain([resolveUsers, 'optionalCall', _181 => _181({ userIds })]);
|
|
7954
8020
|
warnIfNoResolveUsers();
|
|
7955
8021
|
return _nullishCoalesce(users, () => ( userIds.map(() => void 0)));
|
|
7956
8022
|
},
|
|
@@ -7968,7 +8034,7 @@ function createClient(options) {
|
|
|
7968
8034
|
const batchedResolveRoomsInfo = new Batch(
|
|
7969
8035
|
async (batchedRoomIds) => {
|
|
7970
8036
|
const roomIds = batchedRoomIds.flat();
|
|
7971
|
-
const roomsInfo = await _optionalChain([resolveRoomsInfo, 'optionalCall',
|
|
8037
|
+
const roomsInfo = await _optionalChain([resolveRoomsInfo, 'optionalCall', _182 => _182({ roomIds })]);
|
|
7972
8038
|
warnIfNoResolveRoomsInfo();
|
|
7973
8039
|
return _nullishCoalesce(roomsInfo, () => ( roomIds.map(() => void 0)));
|
|
7974
8040
|
},
|
|
@@ -8021,7 +8087,7 @@ function createClient(options) {
|
|
|
8021
8087
|
}
|
|
8022
8088
|
};
|
|
8023
8089
|
const win = typeof window !== "undefined" ? window : void 0;
|
|
8024
|
-
_optionalChain([win, 'optionalAccess',
|
|
8090
|
+
_optionalChain([win, 'optionalAccess', _183 => _183.addEventListener, 'call', _184 => _184("beforeunload", maybePreventClose)]);
|
|
8025
8091
|
}
|
|
8026
8092
|
const client = Object.defineProperty(
|
|
8027
8093
|
{
|
|
@@ -8036,9 +8102,6 @@ function createClient(options) {
|
|
|
8036
8102
|
markInboxNotificationAsRead: httpClient.markInboxNotificationAsRead,
|
|
8037
8103
|
deleteAllInboxNotifications: httpClient.deleteAllInboxNotifications,
|
|
8038
8104
|
deleteInboxNotification: httpClient.deleteInboxNotification,
|
|
8039
|
-
// Public channel notification settings API
|
|
8040
|
-
getNotificationSettings: httpClient.getUserNotificationSettings,
|
|
8041
|
-
updateNotificationSettings: httpClient.updateUserNotificationSettings,
|
|
8042
8105
|
// Advanced resolvers APIs
|
|
8043
8106
|
resolvers: {
|
|
8044
8107
|
invalidateUsers: invalidateResolvedUsers,
|
|
@@ -8149,7 +8212,7 @@ var commentBodyElementsTypes = {
|
|
|
8149
8212
|
mention: "inline"
|
|
8150
8213
|
};
|
|
8151
8214
|
function traverseCommentBody(body, elementOrVisitor, possiblyVisitor) {
|
|
8152
|
-
if (!body || !_optionalChain([body, 'optionalAccess',
|
|
8215
|
+
if (!body || !_optionalChain([body, 'optionalAccess', _185 => _185.content])) {
|
|
8153
8216
|
return;
|
|
8154
8217
|
}
|
|
8155
8218
|
const element = typeof elementOrVisitor === "string" ? elementOrVisitor : void 0;
|
|
@@ -8159,13 +8222,13 @@ function traverseCommentBody(body, elementOrVisitor, possiblyVisitor) {
|
|
|
8159
8222
|
for (const block of body.content) {
|
|
8160
8223
|
if (type === "all" || type === "block") {
|
|
8161
8224
|
if (guard(block)) {
|
|
8162
|
-
_optionalChain([visitor, 'optionalCall',
|
|
8225
|
+
_optionalChain([visitor, 'optionalCall', _186 => _186(block)]);
|
|
8163
8226
|
}
|
|
8164
8227
|
}
|
|
8165
8228
|
if (type === "all" || type === "inline") {
|
|
8166
8229
|
for (const inline of block.children) {
|
|
8167
8230
|
if (guard(inline)) {
|
|
8168
|
-
_optionalChain([visitor, 'optionalCall',
|
|
8231
|
+
_optionalChain([visitor, 'optionalCall', _187 => _187(inline)]);
|
|
8169
8232
|
}
|
|
8170
8233
|
}
|
|
8171
8234
|
}
|
|
@@ -8190,7 +8253,7 @@ async function resolveUsersInCommentBody(body, resolveUsers) {
|
|
|
8190
8253
|
userIds
|
|
8191
8254
|
});
|
|
8192
8255
|
for (const [index, userId] of userIds.entries()) {
|
|
8193
|
-
const user = _optionalChain([users, 'optionalAccess',
|
|
8256
|
+
const user = _optionalChain([users, 'optionalAccess', _188 => _188[index]]);
|
|
8194
8257
|
if (user) {
|
|
8195
8258
|
resolvedUsers.set(userId, user);
|
|
8196
8259
|
}
|
|
@@ -8235,9 +8298,9 @@ function escapeHtml(value) {
|
|
|
8235
8298
|
var HtmlSafeString = class {
|
|
8236
8299
|
#strings;
|
|
8237
8300
|
#values;
|
|
8238
|
-
constructor(strings,
|
|
8301
|
+
constructor(strings, values) {
|
|
8239
8302
|
this.#strings = strings;
|
|
8240
|
-
this.#values =
|
|
8303
|
+
this.#values = values;
|
|
8241
8304
|
}
|
|
8242
8305
|
toString() {
|
|
8243
8306
|
return this.#strings.reduce((result, str, i) => {
|
|
@@ -8245,8 +8308,8 @@ var HtmlSafeString = class {
|
|
|
8245
8308
|
});
|
|
8246
8309
|
}
|
|
8247
8310
|
};
|
|
8248
|
-
function html(strings, ...
|
|
8249
|
-
return new HtmlSafeString(strings,
|
|
8311
|
+
function html(strings, ...values) {
|
|
8312
|
+
return new HtmlSafeString(strings, values);
|
|
8250
8313
|
}
|
|
8251
8314
|
var markdownEscapables = {
|
|
8252
8315
|
_: "\\_",
|
|
@@ -8291,9 +8354,9 @@ function escapeMarkdown(value) {
|
|
|
8291
8354
|
var MarkdownSafeString = class {
|
|
8292
8355
|
#strings;
|
|
8293
8356
|
#values;
|
|
8294
|
-
constructor(strings,
|
|
8357
|
+
constructor(strings, values) {
|
|
8295
8358
|
this.#strings = strings;
|
|
8296
|
-
this.#values =
|
|
8359
|
+
this.#values = values;
|
|
8297
8360
|
}
|
|
8298
8361
|
toString() {
|
|
8299
8362
|
return this.#strings.reduce((result, str, i) => {
|
|
@@ -8301,8 +8364,8 @@ var MarkdownSafeString = class {
|
|
|
8301
8364
|
});
|
|
8302
8365
|
}
|
|
8303
8366
|
};
|
|
8304
|
-
function markdown(strings, ...
|
|
8305
|
-
return new MarkdownSafeString(strings,
|
|
8367
|
+
function markdown(strings, ...values) {
|
|
8368
|
+
return new MarkdownSafeString(strings, values);
|
|
8306
8369
|
}
|
|
8307
8370
|
function toAbsoluteUrl(url2) {
|
|
8308
8371
|
if (url2.startsWith("http://") || url2.startsWith("https://")) {
|
|
@@ -8317,7 +8380,7 @@ var stringifyCommentBodyPlainElements = {
|
|
|
8317
8380
|
text: ({ element }) => element.text,
|
|
8318
8381
|
link: ({ element }) => _nullishCoalesce(element.text, () => ( element.url)),
|
|
8319
8382
|
mention: ({ element, user }) => {
|
|
8320
|
-
return `@${_nullishCoalesce(_optionalChain([user, 'optionalAccess',
|
|
8383
|
+
return `@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _189 => _189.name]), () => ( element.id))}`;
|
|
8321
8384
|
}
|
|
8322
8385
|
};
|
|
8323
8386
|
var stringifyCommentBodyHtmlElements = {
|
|
@@ -8347,7 +8410,7 @@ var stringifyCommentBodyHtmlElements = {
|
|
|
8347
8410
|
return html`<a href="${href}" target="_blank" rel="noopener noreferrer">${_nullishCoalesce(element.text, () => ( element.url))}</a>`;
|
|
8348
8411
|
},
|
|
8349
8412
|
mention: ({ element, user }) => {
|
|
8350
|
-
return html`<span data-mention>@${_nullishCoalesce(_optionalChain([user, 'optionalAccess',
|
|
8413
|
+
return html`<span data-mention>@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _190 => _190.name]), () => ( element.id))}</span>`;
|
|
8351
8414
|
}
|
|
8352
8415
|
};
|
|
8353
8416
|
var stringifyCommentBodyMarkdownElements = {
|
|
@@ -8377,19 +8440,19 @@ var stringifyCommentBodyMarkdownElements = {
|
|
|
8377
8440
|
return markdown`[${_nullishCoalesce(element.text, () => ( element.url))}](${href})`;
|
|
8378
8441
|
},
|
|
8379
8442
|
mention: ({ element, user }) => {
|
|
8380
|
-
return markdown`@${_nullishCoalesce(_optionalChain([user, 'optionalAccess',
|
|
8443
|
+
return markdown`@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _191 => _191.name]), () => ( element.id))}`;
|
|
8381
8444
|
}
|
|
8382
8445
|
};
|
|
8383
8446
|
async function stringifyCommentBody(body, options) {
|
|
8384
|
-
const format = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
8385
|
-
const separator = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
8447
|
+
const format = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _192 => _192.format]), () => ( "plain"));
|
|
8448
|
+
const separator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _193 => _193.separator]), () => ( (format === "markdown" ? "\n\n" : "\n")));
|
|
8386
8449
|
const elements = {
|
|
8387
8450
|
...format === "html" ? stringifyCommentBodyHtmlElements : format === "markdown" ? stringifyCommentBodyMarkdownElements : stringifyCommentBodyPlainElements,
|
|
8388
|
-
..._optionalChain([options, 'optionalAccess',
|
|
8451
|
+
..._optionalChain([options, 'optionalAccess', _194 => _194.elements])
|
|
8389
8452
|
};
|
|
8390
8453
|
const resolvedUsers = await resolveUsersInCommentBody(
|
|
8391
8454
|
body,
|
|
8392
|
-
_optionalChain([options, 'optionalAccess',
|
|
8455
|
+
_optionalChain([options, 'optionalAccess', _195 => _195.resolveUsers])
|
|
8393
8456
|
);
|
|
8394
8457
|
const blocks = body.content.flatMap((block, blockIndex) => {
|
|
8395
8458
|
switch (block.type) {
|
|
@@ -8680,12 +8743,12 @@ function legacy_patchImmutableNode(state, path, update) {
|
|
|
8680
8743
|
}
|
|
8681
8744
|
const newState = Object.assign({}, state);
|
|
8682
8745
|
for (const key in update.updates) {
|
|
8683
|
-
if (_optionalChain([update, 'access',
|
|
8746
|
+
if (_optionalChain([update, 'access', _196 => _196.updates, 'access', _197 => _197[key], 'optionalAccess', _198 => _198.type]) === "update") {
|
|
8684
8747
|
const val = update.node.get(key);
|
|
8685
8748
|
if (val !== void 0) {
|
|
8686
8749
|
newState[key] = lsonToJson(val);
|
|
8687
8750
|
}
|
|
8688
|
-
} else if (_optionalChain([update, 'access',
|
|
8751
|
+
} else if (_optionalChain([update, 'access', _199 => _199.updates, 'access', _200 => _200[key], 'optionalAccess', _201 => _201.type]) === "delete") {
|
|
8689
8752
|
delete newState[key];
|
|
8690
8753
|
}
|
|
8691
8754
|
}
|
|
@@ -8746,12 +8809,12 @@ function legacy_patchImmutableNode(state, path, update) {
|
|
|
8746
8809
|
}
|
|
8747
8810
|
const newState = Object.assign({}, state);
|
|
8748
8811
|
for (const key in update.updates) {
|
|
8749
|
-
if (_optionalChain([update, 'access',
|
|
8812
|
+
if (_optionalChain([update, 'access', _202 => _202.updates, 'access', _203 => _203[key], 'optionalAccess', _204 => _204.type]) === "update") {
|
|
8750
8813
|
const value = update.node.get(key);
|
|
8751
8814
|
if (value !== void 0) {
|
|
8752
8815
|
newState[key] = lsonToJson(value);
|
|
8753
8816
|
}
|
|
8754
|
-
} else if (_optionalChain([update, 'access',
|
|
8817
|
+
} else if (_optionalChain([update, 'access', _205 => _205.updates, 'access', _206 => _206[key], 'optionalAccess', _207 => _207.type]) === "delete") {
|
|
8755
8818
|
delete newState[key];
|
|
8756
8819
|
}
|
|
8757
8820
|
}
|
|
@@ -8822,9 +8885,9 @@ function makePoller(callback, intervalMs, options) {
|
|
|
8822
8885
|
const startTime = performance.now();
|
|
8823
8886
|
const doc = typeof document !== "undefined" ? document : void 0;
|
|
8824
8887
|
const win = typeof window !== "undefined" ? window : void 0;
|
|
8825
|
-
const maxStaleTimeMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
8888
|
+
const maxStaleTimeMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _208 => _208.maxStaleTimeMs]), () => ( Number.POSITIVE_INFINITY));
|
|
8826
8889
|
const context = {
|
|
8827
|
-
inForeground: _optionalChain([doc, 'optionalAccess',
|
|
8890
|
+
inForeground: _optionalChain([doc, 'optionalAccess', _209 => _209.visibilityState]) !== "hidden",
|
|
8828
8891
|
lastSuccessfulPollAt: startTime,
|
|
8829
8892
|
count: 0,
|
|
8830
8893
|
backoff: 0
|
|
@@ -8902,11 +8965,11 @@ function makePoller(callback, intervalMs, options) {
|
|
|
8902
8965
|
pollNowIfStale();
|
|
8903
8966
|
}
|
|
8904
8967
|
function onVisibilityChange() {
|
|
8905
|
-
setInForeground(_optionalChain([doc, 'optionalAccess',
|
|
8968
|
+
setInForeground(_optionalChain([doc, 'optionalAccess', _210 => _210.visibilityState]) !== "hidden");
|
|
8906
8969
|
}
|
|
8907
|
-
_optionalChain([doc, 'optionalAccess',
|
|
8908
|
-
_optionalChain([win, 'optionalAccess',
|
|
8909
|
-
_optionalChain([win, 'optionalAccess',
|
|
8970
|
+
_optionalChain([doc, 'optionalAccess', _211 => _211.addEventListener, 'call', _212 => _212("visibilitychange", onVisibilityChange)]);
|
|
8971
|
+
_optionalChain([win, 'optionalAccess', _213 => _213.addEventListener, 'call', _214 => _214("online", onVisibilityChange)]);
|
|
8972
|
+
_optionalChain([win, 'optionalAccess', _215 => _215.addEventListener, 'call', _216 => _216("focus", pollNowIfStale)]);
|
|
8910
8973
|
fsm.start();
|
|
8911
8974
|
return {
|
|
8912
8975
|
inc,
|
|
@@ -9028,11 +9091,6 @@ var SortedList = class _SortedList {
|
|
|
9028
9091
|
}
|
|
9029
9092
|
};
|
|
9030
9093
|
|
|
9031
|
-
// src/protocol/UserNotificationSettings.ts
|
|
9032
|
-
function isNotificationChannelEnabled(settings) {
|
|
9033
|
-
return values(settings).every((enabled) => enabled === true);
|
|
9034
|
-
}
|
|
9035
|
-
|
|
9036
9094
|
// src/types/Others.ts
|
|
9037
9095
|
var TextEditorType = /* @__PURE__ */ ((TextEditorType2) => {
|
|
9038
9096
|
TextEditorType2["Lexical"] = "lexical";
|
|
@@ -9130,8 +9188,5 @@ var NotificationsApiError = HttpError;
|
|
|
9130
9188
|
|
|
9131
9189
|
|
|
9132
9190
|
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
exports.ClientMsgCode = ClientMsgCode; exports.CommentsApiError = CommentsApiError; exports.CrdtType = CrdtType; exports.DefaultMap = DefaultMap; exports.DerivedSignal = DerivedSignal; exports.HttpError = HttpError; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.LiveblocksError = LiveblocksError; exports.MutableSignal = MutableSignal; exports.NotificationsApiError = NotificationsApiError; exports.OpCode = OpCode; exports.Permission = Permission; exports.Promise_withResolvers = Promise_withResolvers; exports.ServerMsgCode = ServerMsgCode; exports.Signal = Signal; exports.SortedList = SortedList; exports.TextEditorType = TextEditorType; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.ackOp = ackOp; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.autoRetry = autoRetry; exports.b64decode = b64decode; exports.batch = batch; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToThreadData = convertToThreadData; exports.createClient = createClient; exports.createCommentAttachmentId = createCommentAttachmentId; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createThreadId = createThreadId; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.entries = entries; exports.errorIf = errorIf; exports.freeze = freeze; exports.generateCommentUrl = generateCommentUrl; exports.getMentionedIdsFromCommentBody = getMentionedIdsFromCommentBody; exports.html = html; exports.htmlSafe = htmlSafe; exports.isChildCrdt = isChildCrdt; exports.isCommentBodyLink = isCommentBodyLink; exports.isCommentBodyMention = isCommentBodyMention; exports.isCommentBodyText = isCommentBodyText; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isNotificationChannelEnabled = isNotificationChannelEnabled; exports.isPlainObject = isPlainObject; exports.isRootCrdt = isRootCrdt; exports.isStartsWithOperator = isStartsWithOperator; exports.kInternal = kInternal; exports.keys = keys; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.raise = raise; exports.resolveUsersInCommentBody = resolveUsersInCommentBody; exports.shallow = shallow; exports.stringify = stringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toAbsoluteUrl = toAbsoluteUrl; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.url = url; exports.urljoin = urljoin; exports.wait = wait; exports.withTimeout = withTimeout;
|
|
9191
|
+
exports.ClientMsgCode = ClientMsgCode; exports.CommentsApiError = CommentsApiError; exports.CrdtType = CrdtType; exports.DefaultMap = DefaultMap; exports.DerivedSignal = DerivedSignal; exports.HttpError = HttpError; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.LiveblocksError = LiveblocksError; exports.MutableSignal = MutableSignal; exports.NotificationsApiError = NotificationsApiError; exports.OpCode = OpCode; exports.Permission = Permission; exports.Promise_withResolvers = Promise_withResolvers; exports.ServerMsgCode = ServerMsgCode; exports.Signal = Signal; exports.SortedList = SortedList; exports.TextEditorType = TextEditorType; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.ackOp = ackOp; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.autoRetry = autoRetry; exports.b64decode = b64decode; exports.batch = batch; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToThreadData = convertToThreadData; exports.createClient = createClient; exports.createCommentAttachmentId = createCommentAttachmentId; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createThreadId = createThreadId; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.errorIf = errorIf; exports.freeze = freeze; exports.generateCommentUrl = generateCommentUrl; exports.getMentionedIdsFromCommentBody = getMentionedIdsFromCommentBody; exports.html = html; exports.htmlSafe = htmlSafe; exports.isChildCrdt = isChildCrdt; exports.isCommentBodyLink = isCommentBodyLink; exports.isCommentBodyMention = isCommentBodyMention; exports.isCommentBodyText = isCommentBodyText; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isPlainObject = isPlainObject; exports.isRootCrdt = isRootCrdt; exports.isStartsWithOperator = isStartsWithOperator; exports.kInternal = kInternal; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.raise = raise; exports.resolveUsersInCommentBody = resolveUsersInCommentBody; exports.shallow = shallow; exports.stringify = stringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toAbsoluteUrl = toAbsoluteUrl; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.url = url; exports.urljoin = urljoin; exports.wait = wait; exports.withTimeout = withTimeout;
|
|
9137
9192
|
//# sourceMappingURL=index.js.map
|