@rpcbase/client 0.433.0 → 0.435.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
@@ -6,8 +6,8 @@ import { getNavigationGuards, createRoutesFromElements, createBrowserRouter, Rou
6
6
  import { hydrateRoot } from "react-dom/client";
7
7
  import { r as reportClientException } from "./errorReporting-CVoUUKxW.js";
8
8
  import { s } from "./errorReporting-CVoUUKxW.js";
9
- import { h as hydrateRtsFromWindow, u as useQuery } from "./useQuery-BLuO01zo.js";
10
- import { R, S, c as c2, a, p, b, d, e } from "./useQuery-BLuO01zo.js";
9
+ import { h as hydrateRtsFromWindow, u as useQuery } from "./useQuery-B0Q2sW2C.js";
10
+ import { R, S, c as c2, a, p, b, d, e } from "./useQuery-B0Q2sW2C.js";
11
11
  import { r as requireToString, g as getDefaultExportFromCjs, t as throttle$1 } from "./throttle-CXOc9Dto.js";
12
12
  const emptyUnsubscribe = () => {
13
13
  };
@@ -2312,17 +2312,19 @@ const toIso = (value) => {
2312
2312
  const toNotificationItem = (doc) => {
2313
2313
  const id = typeof doc._id === "string" ? doc._id : String(doc._id ?? "");
2314
2314
  if (!id) return null;
2315
+ if (typeof doc.title !== "string") return null;
2315
2316
  return {
2316
2317
  id,
2317
2318
  topic: typeof doc.topic === "string" ? doc.topic : void 0,
2318
- title: typeof doc.title === "string" ? doc.title : "",
2319
- body: typeof doc.body === "string" ? doc.body : void 0,
2320
- url: typeof doc.url === "string" ? doc.url : void 0,
2319
+ title: doc.title,
2320
+ body: doc.body,
2321
+ image: doc.image,
2322
+ data: doc.data,
2323
+ platform: doc.platform,
2321
2324
  createdAt: toIso(doc.createdAt) ?? (/* @__PURE__ */ new Date()).toISOString(),
2322
2325
  seenAt: toIso(doc.seenAt),
2323
2326
  readAt: toIso(doc.readAt),
2324
- archivedAt: toIso(doc.archivedAt),
2325
- metadata: typeof doc.metadata === "object" && doc.metadata !== null ? doc.metadata : void 0
2327
+ archivedAt: toIso(doc.archivedAt)
2326
2328
  };
2327
2329
  };
2328
2330
  const buildDisabledTopics = (settings) => {
@@ -2589,7 +2591,7 @@ function NotificationsRealtimeProvider(t0) {
2589
2591
  return;
2590
2592
  }
2591
2593
  for (const n_6 of eligible) {
2592
- toast(n_6.title || "New notification", {
2594
+ toast(n_6.title, {
2593
2595
  description: n_6.body
2594
2596
  });
2595
2597
  }