@rpcbase/client 0.389.0 → 0.391.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 +14 -3
- package/dist/index.js.map +1 -1
- package/dist/initWithRoutes.d.ts.map +1 -1
- package/dist/isDesktopDevice.d.ts +2 -0
- package/dist/isDesktopDevice.d.ts.map +1 -0
- package/dist/rts/index.js +1 -1
- package/dist/rts/populateCache.d.ts +21 -0
- package/dist/rts/populateCache.d.ts.map +1 -0
- package/dist/rts/pouchStore.d.ts +21 -0
- package/dist/rts/pouchStore.d.ts.map +1 -1
- package/dist/rts/useQuery.d.ts.map +1 -1
- package/dist/rts/wsClient.d.ts.map +1 -1
- package/dist/{useQuery-ClKeTB8S.js → useQuery-CUjwBdkK.js} +644 -49
- package/dist/useQuery-CUjwBdkK.js.map +1 -0
- package/package.json +1 -1
- package/dist/useQuery-ClKeTB8S.js.map +0 -1
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 { n as hydrateRtsFromWindow, v as useQuery } from "./useQuery-
|
|
10
|
-
import { R, S, p, q, t } from "./useQuery-
|
|
9
|
+
import { n as hydrateRtsFromWindow, v as useQuery } from "./useQuery-CUjwBdkK.js";
|
|
10
|
+
import { R, S, p, q, t } from "./useQuery-CUjwBdkK.js";
|
|
11
11
|
const emptyUnsubscribe = () => {
|
|
12
12
|
};
|
|
13
13
|
const useMediaQuery = (query) => {
|
|
@@ -491,6 +491,17 @@ const cleanupURL = () => {
|
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
|
+
const isDesktopDevice = () => {
|
|
495
|
+
if (typeof window === "undefined") {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
if (typeof window.matchMedia !== "function") {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
const hasDesktopPointer = window.matchMedia("(hover: hover) and (pointer: fine)").matches;
|
|
502
|
+
const hasTouch = typeof navigator !== "undefined" && navigator.maxTouchPoints > 0;
|
|
503
|
+
return hasDesktopPointer && !hasTouch;
|
|
504
|
+
};
|
|
494
505
|
const DEFAULT_PRIORITY = 0;
|
|
495
506
|
const canBlockNavigation = (guard, {
|
|
496
507
|
isPathnameChange,
|
|
@@ -957,7 +968,7 @@ const initWithRoutes = async (routesElement, opts) => {
|
|
|
957
968
|
/* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Toaster, {}) })
|
|
958
969
|
] }) }), hydrationOptions);
|
|
959
970
|
};
|
|
960
|
-
if (!isProduction && !env.SSR) {
|
|
971
|
+
if (!isProduction && !env.SSR && isDesktopDevice()) {
|
|
961
972
|
import("react-grab/core").then(({
|
|
962
973
|
init
|
|
963
974
|
}) => {
|