@liveblocks/core 2.12.1 → 2.12.3-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.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -8
- 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.12.
|
|
9
|
+
var PKG_VERSION = "2.12.3-emails1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -303,7 +303,6 @@ function Promise_withResolvers() {
|
|
|
303
303
|
|
|
304
304
|
// src/lib/EventSource.ts
|
|
305
305
|
function makeEventSource() {
|
|
306
|
-
const _onetimeObservers = /* @__PURE__ */ new Set();
|
|
307
306
|
const _observers = /* @__PURE__ */ new Set();
|
|
308
307
|
let _buffer = null;
|
|
309
308
|
function pause() {
|
|
@@ -323,8 +322,11 @@ function makeEventSource() {
|
|
|
323
322
|
return () => _observers.delete(callback);
|
|
324
323
|
}
|
|
325
324
|
function subscribeOnce(callback) {
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
const unsub = subscribe((event) => {
|
|
326
|
+
unsub();
|
|
327
|
+
return callback(event);
|
|
328
|
+
});
|
|
329
|
+
return unsub;
|
|
328
330
|
}
|
|
329
331
|
async function waitUntil(predicate) {
|
|
330
332
|
let unsub;
|
|
@@ -344,16 +346,13 @@ function makeEventSource() {
|
|
|
344
346
|
}
|
|
345
347
|
}
|
|
346
348
|
function notify(event) {
|
|
347
|
-
_onetimeObservers.forEach((callback) => callback(event));
|
|
348
|
-
_onetimeObservers.clear();
|
|
349
349
|
_observers.forEach((callback) => callback(event));
|
|
350
350
|
}
|
|
351
351
|
function _forceClear() {
|
|
352
|
-
_onetimeObservers.clear();
|
|
353
352
|
_observers.clear();
|
|
354
353
|
}
|
|
355
354
|
function count() {
|
|
356
|
-
return
|
|
355
|
+
return _observers.size;
|
|
357
356
|
}
|
|
358
357
|
return {
|
|
359
358
|
// Private/internal control over event emission
|