@satanwagen/reviewkit 0.1.4 → 0.1.5
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/CHANGELOG.md +127 -0
- package/README.md +3 -1
- package/dist/{chunk-EOX3UJNP.js → chunk-L7JLBD7Q.js} +1 -1
- package/dist/{chunk-5MAFDRUI.js → chunk-VNRVRNZX.js} +10 -2
- package/dist/chunk-VNRVRNZX.js.map +1 -0
- package/dist/client/index.cjs +9 -1
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lazy.cjs +9 -1
- package/dist/lazy.cjs.map +1 -1
- package/dist/lazy.js +1 -1
- package/dist/next.cjs +9 -1
- package/dist/next.cjs.map +1 -1
- package/dist/next.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5MAFDRUI.js.map +0 -1
- /package/dist/{chunk-EOX3UJNP.js.map → chunk-L7JLBD7Q.js.map} +0 -0
package/dist/client/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -4968,6 +4968,11 @@ function currentAuthor(name) {
|
|
|
4968
4968
|
|
|
4969
4969
|
// src/client/sync.ts
|
|
4970
4970
|
var DEFAULT_SYNC_URL = "wss://2-59-219-26.sslip.io/rk-sync";
|
|
4971
|
+
function normalizeRoute(route) {
|
|
4972
|
+
let r = String(route ?? "/");
|
|
4973
|
+
if (!r.startsWith("/")) r = "/" + r;
|
|
4974
|
+
return r.length > 1 ? r.replace(/\/+$/, "") : r;
|
|
4975
|
+
}
|
|
4971
4976
|
function resolveSyncUrl(config) {
|
|
4972
4977
|
return typeof config.syncUrl === "string" && config.syncUrl !== "" ? config.syncUrl : DEFAULT_SYNC_URL;
|
|
4973
4978
|
}
|
|
@@ -5050,8 +5055,11 @@ function useRealtimeSync(state, rawDispatch, config, reducer2) {
|
|
|
5050
5055
|
for (const id2 of deletedIds) dispatch({ type: "REMOTE_DELETE", id: id2 });
|
|
5051
5056
|
dispatch({ type: "PEERS_SET", peers: peers.filter((peer) => peer.id !== id).map(toPeerState) });
|
|
5052
5057
|
const serverIds = new Set(items.map((item) => item.id));
|
|
5058
|
+
const here = normalizeRoute(window.location.pathname);
|
|
5053
5059
|
for (const item of stateRef.current.session?.items ?? []) {
|
|
5054
|
-
if (
|
|
5060
|
+
if (serverIds.has(item.id) || deleted.has(item.id)) continue;
|
|
5061
|
+
if (normalizeRoute(item.route) !== here) continue;
|
|
5062
|
+
sync.addItem(item);
|
|
5055
5063
|
}
|
|
5056
5064
|
},
|
|
5057
5065
|
onPeerJoin: (peer) => dispatch({
|