@rpcbase/client 0.368.0 → 0.370.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.
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/notificationsRealtime.d.ts.map +1 -1
- package/dist/rts/index.d.ts +1 -0
- package/dist/rts/index.d.ts.map +1 -1
- package/dist/rts/index.js +1 -1
- package/dist/rts/modelTypes.d.ts +7 -0
- package/dist/rts/modelTypes.d.ts.map +1 -0
- package/dist/rts/useQuery.d.ts +3 -1
- package/dist/rts/useQuery.d.ts.map +1 -1
- package/dist/rts/wsClient.d.ts +2 -1
- package/dist/rts/wsClient.d.ts.map +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/{useQuery-C2L-Rgat.js → useQuery-DnrhB9w2.js} +19 -7
- package/dist/useQuery-DnrhB9w2.js.map +1 -0
- package/package.json +1 -1
- package/dist/useQuery-C2L-Rgat.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getNavigationGuards, createRoutesFromElements, createBrowserRouter, Rou
|
|
|
5
5
|
import { hydrateRoot } from "react-dom/client";
|
|
6
6
|
import { r as reportClientException } from "./errorReporting-CVoUUKxW.js";
|
|
7
7
|
import { s } from "./errorReporting-CVoUUKxW.js";
|
|
8
|
-
import { m as useQuery } from "./useQuery-
|
|
8
|
+
import { m as useQuery } from "./useQuery-DnrhB9w2.js";
|
|
9
9
|
const emptyUnsubscribe = () => {
|
|
10
10
|
};
|
|
11
11
|
const useMediaQuery = (query) => {
|
|
@@ -241,6 +241,7 @@ const ActiveToaster = () => {
|
|
|
241
241
|
MountedLazyToaster,
|
|
242
242
|
{
|
|
243
243
|
closeButton: !isCoarsePointer,
|
|
244
|
+
theme: "dark",
|
|
244
245
|
position,
|
|
245
246
|
swipeDirections: isCoarsePointer ? void 0 : [],
|
|
246
247
|
style: {
|
|
@@ -2229,9 +2230,9 @@ function NotificationsRealtimeProvider({
|
|
|
2229
2230
|
const trimmedUserId = typeof userId === "string" ? userId.trim() : "";
|
|
2230
2231
|
const canUseRts = Boolean(trimmedUserId);
|
|
2231
2232
|
const settingsQuery = useQuery(
|
|
2232
|
-
|
|
2233
|
+
"RBNotificationSettings",
|
|
2233
2234
|
useMemo(() => canUseRts ? { userId: trimmedUserId } : {}, [canUseRts, trimmedUserId]),
|
|
2234
|
-
useMemo(() => ({ key: "rb.notifications.settings", limit: 1 }), [])
|
|
2235
|
+
useMemo(() => ({ key: "rb.notifications.settings", limit: 1, enabled: canUseRts }), [canUseRts])
|
|
2235
2236
|
);
|
|
2236
2237
|
const settings = settingsQuery.data?.[0] ?? null;
|
|
2237
2238
|
const disabledTopics = useMemo(() => buildDisabledTopics(settings), [settings]);
|
|
@@ -2247,13 +2248,14 @@ function NotificationsRealtimeProvider({
|
|
|
2247
2248
|
return base;
|
|
2248
2249
|
}, [canUseRts, disabledTopics, trimmedUserId]);
|
|
2249
2250
|
const notificationsQuery = useQuery(
|
|
2250
|
-
|
|
2251
|
+
"RBNotification",
|
|
2251
2252
|
query,
|
|
2252
2253
|
useMemo(() => ({
|
|
2253
2254
|
key: "rb.notifications",
|
|
2254
2255
|
sort: { createdAt: -1 },
|
|
2255
|
-
limit
|
|
2256
|
-
|
|
2256
|
+
limit,
|
|
2257
|
+
enabled: canUseRts
|
|
2258
|
+
}), [canUseRts, limit])
|
|
2257
2259
|
);
|
|
2258
2260
|
const notifications = useMemo(() => {
|
|
2259
2261
|
const raw = notificationsQuery.data;
|