@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 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-C2L-Rgat.js";
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
- canUseRts ? "RBNotificationSettings" : "",
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
- canUseRts ? "RBNotification" : "",
2251
+ "RBNotification",
2251
2252
  query,
2252
2253
  useMemo(() => ({
2253
2254
  key: "rb.notifications",
2254
2255
  sort: { createdAt: -1 },
2255
- limit
2256
- }), [limit])
2256
+ limit,
2257
+ enabled: canUseRts
2258
+ }), [canUseRts, limit])
2257
2259
  );
2258
2260
  const notifications = useMemo(() => {
2259
2261
  const raw = notificationsQuery.data;