@liveblocks/core 2.9.1 → 2.9.2-emails1
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 +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -1
- 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.9.
|
|
9
|
+
var PKG_VERSION = "2.9.2-emails1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -7730,6 +7730,22 @@ async function stringifyCommentBody(body, options) {
|
|
|
7730
7730
|
return blocks.join(separator);
|
|
7731
7731
|
}
|
|
7732
7732
|
|
|
7733
|
+
// src/comments/comment-url.ts
|
|
7734
|
+
var PLACEHOLDER_BASE_URL = "https://localhost:9999";
|
|
7735
|
+
var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
|
7736
|
+
function generateCommentUrl({
|
|
7737
|
+
roomUrl,
|
|
7738
|
+
commentId
|
|
7739
|
+
}) {
|
|
7740
|
+
const isAbsolute = ABSOLUTE_URL_REGEX.test(roomUrl);
|
|
7741
|
+
const urlObject = new URL(
|
|
7742
|
+
roomUrl,
|
|
7743
|
+
isAbsolute ? void 0 : PLACEHOLDER_BASE_URL
|
|
7744
|
+
);
|
|
7745
|
+
urlObject.hash = `#${commentId}`;
|
|
7746
|
+
return isAbsolute ? urlObject.href : urlObject.href.replace(PLACEHOLDER_BASE_URL, "");
|
|
7747
|
+
}
|
|
7748
|
+
|
|
7733
7749
|
// src/crdts/utils.ts
|
|
7734
7750
|
function toPlainLson(lson) {
|
|
7735
7751
|
if (lson instanceof LiveObject) {
|
|
@@ -8187,6 +8203,7 @@ export {
|
|
|
8187
8203
|
LiveObject,
|
|
8188
8204
|
NotificationsApiError,
|
|
8189
8205
|
OpCode,
|
|
8206
|
+
Promise_withResolvers,
|
|
8190
8207
|
ServerMsgCode,
|
|
8191
8208
|
StopRetrying2 as StopRetrying,
|
|
8192
8209
|
WebsocketCloseCodes,
|
|
@@ -8214,8 +8231,14 @@ export {
|
|
|
8214
8231
|
detectDupes,
|
|
8215
8232
|
errorIf,
|
|
8216
8233
|
freeze,
|
|
8234
|
+
generateCommentUrl,
|
|
8217
8235
|
getMentionedIdsFromCommentBody,
|
|
8236
|
+
html,
|
|
8237
|
+
htmlSafe,
|
|
8218
8238
|
isChildCrdt,
|
|
8239
|
+
isCommentBodyLink,
|
|
8240
|
+
isCommentBodyMention,
|
|
8241
|
+
isCommentBodyText,
|
|
8219
8242
|
isJsonArray,
|
|
8220
8243
|
isJsonObject,
|
|
8221
8244
|
isJsonScalar,
|
|
@@ -8235,10 +8258,12 @@ export {
|
|
|
8235
8258
|
objectToQuery,
|
|
8236
8259
|
patchLiveObjectKey,
|
|
8237
8260
|
raise,
|
|
8261
|
+
resolveUsersInCommentBody,
|
|
8238
8262
|
shallow,
|
|
8239
8263
|
stringify,
|
|
8240
8264
|
stringifyCommentBody,
|
|
8241
8265
|
throwUsageError,
|
|
8266
|
+
toAbsoluteUrl,
|
|
8242
8267
|
toPlainLson,
|
|
8243
8268
|
tryParseJson,
|
|
8244
8269
|
url,
|