@pelatform/ui 1.5.8 → 1.5.9

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.
@@ -958,7 +958,10 @@ var _reactquery = require('@tanstack/react-query');
958
958
 
959
959
 
960
960
 
961
- var QueryProvider = ({ children }) => {
961
+ var QueryProvider = ({
962
+ client: clientProps,
963
+ children
964
+ }) => {
962
965
  const [queryClient] = _react.useState.call(void 0,
963
966
  () => new (0, _reactquery.QueryClient)({
964
967
  /** Global query defaults for all queries */
@@ -1018,7 +1021,7 @@ var QueryProvider = ({ children }) => {
1018
1021
  })
1019
1022
  })
1020
1023
  );
1021
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children });
1024
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: _nullishCoalesce(clientProps, () => ( queryClient)), children });
1022
1025
  };
1023
1026
 
1024
1027
  // src/components/providers/theme-provider.tsx
@@ -3,6 +3,7 @@ import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, HTMLAttributes, ComponentProps, FC, DragEvent, RefObject } from 'react';
4
4
  import { B as BaseProps, L as Link, I as Image } from './components-CidsRcc3.cjs';
5
5
  import { DialogProps } from '@radix-ui/react-dialog';
6
+ import { QueryClient } from '@tanstack/react-query';
6
7
  import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
7
8
  import { VariantProps } from 'class-variance-authority';
8
9
  import { b as badgeVariants } from './badge-BtI4BMea.cjs';
@@ -1450,7 +1451,8 @@ declare function MobileNavItemRenderer({ Link, navigate, item, pathname, level,
1450
1451
  * }
1451
1452
  * ```
1452
1453
  */
1453
- declare const QueryProvider: ({ children }: {
1454
+ declare const QueryProvider: ({ client: clientProps, children, }: {
1455
+ client?: QueryClient;
1454
1456
  children: ReactNode;
1455
1457
  }) => react_jsx_runtime.JSX.Element;
1456
1458
 
@@ -3,6 +3,7 @@ import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, HTMLAttributes, ComponentProps, FC, DragEvent, RefObject } from 'react';
4
4
  import { B as BaseProps, L as Link, I as Image } from './components-CidsRcc3.js';
5
5
  import { DialogProps } from '@radix-ui/react-dialog';
6
+ import { QueryClient } from '@tanstack/react-query';
6
7
  import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
7
8
  import { VariantProps } from 'class-variance-authority';
8
9
  import { b as badgeVariants } from './badge-BtI4BMea.js';
@@ -1450,7 +1451,8 @@ declare function MobileNavItemRenderer({ Link, navigate, item, pathname, level,
1450
1451
  * }
1451
1452
  * ```
1452
1453
  */
1453
- declare const QueryProvider: ({ children }: {
1454
+ declare const QueryProvider: ({ client: clientProps, children, }: {
1455
+ client?: QueryClient;
1454
1456
  children: ReactNode;
1455
1457
  }) => react_jsx_runtime.JSX.Element;
1456
1458
 
@@ -958,7 +958,10 @@ import { QueryCache, QueryClient, QueryClientProvider } from "@tanstack/react-qu
958
958
  import { CircleAlert as CircleAlert2 } from "lucide-react";
959
959
  import { toast as toast2 } from "sonner";
960
960
  import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
961
- var QueryProvider = ({ children }) => {
961
+ var QueryProvider = ({
962
+ client: clientProps,
963
+ children
964
+ }) => {
962
965
  const [queryClient] = useState3(
963
966
  () => new QueryClient({
964
967
  /** Global query defaults for all queries */
@@ -1018,7 +1021,7 @@ var QueryProvider = ({ children }) => {
1018
1021
  })
1019
1022
  })
1020
1023
  );
1021
- return /* @__PURE__ */ jsx26(QueryClientProvider, { client: queryClient, children });
1024
+ return /* @__PURE__ */ jsx26(QueryClientProvider, { client: clientProps ?? queryClient, children });
1022
1025
  };
1023
1026
 
1024
1027
  // src/components/providers/theme-provider.tsx