@hocuspocus/provider 1.0.0-alpha.30 → 1.0.0-alpha.31
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/hocuspocus-provider.cjs +2 -12
- package/dist/hocuspocus-provider.cjs.map +1 -1
- package/dist/hocuspocus-provider.esm.js +2 -11
- package/dist/hocuspocus-provider.esm.js.map +1 -1
- package/dist/packages/common/src/awarenessStatesToArray.d.ts +3 -0
- package/dist/packages/common/src/index.d.ts +1 -0
- package/dist/packages/extension-throttle/src/index.d.ts +6 -2
- package/dist/packages/provider/src/index.d.ts +0 -1
- package/dist/packages/server/src/MessageReceiver.d.ts +1 -1
- package/dist/packages/server/src/types.d.ts +11 -1
- package/dist/tests/extension-throttle/configuration.d.ts +1 -0
- package/dist/tests/provider/observeDeep.d.ts +1 -0
- package/package.json +3 -3
- package/src/HocuspocusProvider.ts +2 -3
- package/src/index.ts +0 -1
- package/dist/packages/provider/src/utils/awarenessStatesToArray.d.ts +0 -4
- package/dist/packages/provider/src/utils/index.d.ts +0 -1
- package/src/utils/awarenessStatesToArray.ts +0 -8
- package/src/utils/index.ts +0 -1
|
@@ -1748,15 +1748,6 @@ class UpdateMessage extends OutgoingMessage {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
|
|
1751
|
-
var awarenessStatesToArray = (states) => {
|
|
1752
|
-
return Array.from(states.entries()).map(([key, value]) => {
|
|
1753
|
-
return {
|
|
1754
|
-
clientId: key,
|
|
1755
|
-
...value,
|
|
1756
|
-
};
|
|
1757
|
-
});
|
|
1758
|
-
};
|
|
1759
|
-
|
|
1760
1751
|
exports.WebSocketStatus = void 0;
|
|
1761
1752
|
(function (WebSocketStatus) {
|
|
1762
1753
|
WebSocketStatus["Connecting"] = "connecting";
|
|
@@ -1843,10 +1834,10 @@ class HocuspocusProvider extends EventEmitter {
|
|
|
1843
1834
|
this.on('awarenessUpdate', this.configuration.onAwarenessUpdate);
|
|
1844
1835
|
this.on('awarenessChange', this.configuration.onAwarenessChange);
|
|
1845
1836
|
this.awareness.on('update', () => {
|
|
1846
|
-
this.emit('awarenessUpdate', { states: awarenessStatesToArray(this.awareness.getStates()) });
|
|
1837
|
+
this.emit('awarenessUpdate', { states: common.awarenessStatesToArray(this.awareness.getStates()) });
|
|
1847
1838
|
});
|
|
1848
1839
|
this.awareness.on('change', () => {
|
|
1849
|
-
this.emit('awarenessChange', { states: awarenessStatesToArray(this.awareness.getStates()) });
|
|
1840
|
+
this.emit('awarenessChange', { states: common.awarenessStatesToArray(this.awareness.getStates()) });
|
|
1850
1841
|
});
|
|
1851
1842
|
this.document.on('update', this.documentUpdateHandler.bind(this));
|
|
1852
1843
|
this.awareness.on('update', this.awarenessUpdateHandler.bind(this));
|
|
@@ -2211,5 +2202,4 @@ class HocuspocusCloudProvider extends HocuspocusProvider {
|
|
|
2211
2202
|
|
|
2212
2203
|
exports.HocuspocusCloudProvider = HocuspocusCloudProvider;
|
|
2213
2204
|
exports.HocuspocusProvider = HocuspocusProvider;
|
|
2214
|
-
exports.awarenessStatesToArray = awarenessStatesToArray;
|
|
2215
2205
|
//# sourceMappingURL=hocuspocus-provider.cjs.map
|