@hocuspocus/provider 2.13.2 → 2.13.5-rc.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.
@@ -2809,7 +2809,12 @@ const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c
2809
2809
  class TiptapCollabProviderWebsocket extends HocuspocusProviderWebsocket {
2810
2810
  constructor(configuration) {
2811
2811
  var _a;
2812
- super({ ...configuration, url: (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud` });
2812
+ let url = (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud`;
2813
+ if (configuration.shardKey) {
2814
+ url += url.includes('?') ? '&' : '?';
2815
+ url += `shard=${configuration.shardKey}`;
2816
+ }
2817
+ super({ ...configuration, url });
2813
2818
  }
2814
2819
  }
2815
2820