UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

59 lines (58 loc) 1.78 kB
import { jsx as e } from "react/jsx-runtime"; import { ThemeProvider as a } from "../../theme/ThemeProvider.js"; import { GlobalIsEditingContextProvider as c } from "./GlobalIsEditingContext.js"; import { QueryClient as m, QueryClientProvider as p } from "@tanstack/react-query"; import { Suspense as u } from "react"; import { SynapseContextProvider as f } from "./SynapseContext.js"; import { DocumentMetadataProvider as h } from "./DocumentMetadataContext.js"; import { ApplicationSessionContextProvider as C } from "../AppUtils/session/ApplicationSessionContext.js"; const g = { defaultOptions: { queries: { staleTime: 1e3 * 60 * 5, // 5 min gcTime: 1e3 * 60 * 30, // 30 min retry: !1, // SynapseClient knows which queries to retry refetchOnWindowFocus: !1 } } }, x = new m(g); function F(i) { const { children: r, synapseContext: o, queryClient: n, theme: s, isEditingStore: l, applicationSessionContext: d } = i, t = l || { subscribe: () => () => { }, getSnapshot: () => !1, setIsEditing: () => { } }; return /* @__PURE__ */ e(p, { client: n ?? x, children: /* @__PURE__ */ e(a, { theme: s, children: /* @__PURE__ */ e(f, { synapseContext: { ...o }, children: /* @__PURE__ */ e( C, { context: d, children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e( c, { subscribe: t.subscribe, getSnapshot: t.getSnapshot, setIsEditing: t.setIsEditing, children: /* @__PURE__ */ e(u, { fallback: null, children: r }) } ) }) } ) }) }) }); } export { F as FullContextProvider, F as default, g as defaultQueryClientConfig }; //# sourceMappingURL=FullContextProvider.js.map