@anker-in/shopify-react 0.1.1-beta.32 → 0.1.1-beta.33

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.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
3
  import { ShopifyClient, ShopifyConfig, CartCookieAdapter, NormalizedCart, AttributeInput, HasMetafieldsIdentifier } from '@anker-in/shopify-sdk';
4
- import { C as CookieAdapter, R as RouterAdapter, U as UserContextAdapter } from '../types-Dt0DUG00.mjs';
4
+ import { C as CookieAdapter, R as RouterAdapter, U as UserContextAdapter, P as PerformanceAdapter } from '../types-SKDHauqk.mjs';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { SWRConfiguration } from 'swr';
7
7
  import { e as PlusMemberSettingsMetafields } from '../types-BSsb8OPm.mjs';
@@ -15,6 +15,7 @@ interface ShopifyContextValue {
15
15
  cartCookieAdapter: CartCookieAdapter;
16
16
  routerAdapter?: RouterAdapter;
17
17
  userAdapter?: UserContextAdapter;
18
+ performanceAdapter?: PerformanceAdapter;
18
19
  }
19
20
  declare const ShopifyContext: React.Context<ShopifyContextValue | null>;
20
21
 
@@ -27,12 +28,13 @@ interface ShopifyProviderProps {
27
28
  routerAdapter?: RouterAdapter;
28
29
  userAdapter?: UserContextAdapter;
29
30
  children: React__default.ReactNode;
31
+ performanceAdapter?: PerformanceAdapter;
30
32
  }
31
33
  /**
32
34
  * Shopify Provider Component
33
35
  * Provides Shopify context to all child components
34
36
  */
35
- declare function ShopifyProvider({ config, locale, locales, cookieAdapter, cartCookieAdapter, routerAdapter, userAdapter, children, }: ShopifyProviderProps): react_jsx_runtime.JSX.Element;
37
+ declare function ShopifyProvider({ config, locale, locales, cookieAdapter, cartCookieAdapter, routerAdapter, userAdapter, children, performanceAdapter, }: ShopifyProviderProps): react_jsx_runtime.JSX.Element;
36
38
 
37
39
  /**
38
40
  * Hook to access Shopify context
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
3
  import { ShopifyClient, ShopifyConfig, CartCookieAdapter, NormalizedCart, AttributeInput, HasMetafieldsIdentifier } from '@anker-in/shopify-sdk';
4
- import { C as CookieAdapter, R as RouterAdapter, U as UserContextAdapter } from '../types-Dt0DUG00.js';
4
+ import { C as CookieAdapter, R as RouterAdapter, U as UserContextAdapter, P as PerformanceAdapter } from '../types-SKDHauqk.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { SWRConfiguration } from 'swr';
7
7
  import { e as PlusMemberSettingsMetafields } from '../types-BSsb8OPm.js';
@@ -15,6 +15,7 @@ interface ShopifyContextValue {
15
15
  cartCookieAdapter: CartCookieAdapter;
16
16
  routerAdapter?: RouterAdapter;
17
17
  userAdapter?: UserContextAdapter;
18
+ performanceAdapter?: PerformanceAdapter;
18
19
  }
19
20
  declare const ShopifyContext: React.Context<ShopifyContextValue | null>;
20
21
 
@@ -27,12 +28,13 @@ interface ShopifyProviderProps {
27
28
  routerAdapter?: RouterAdapter;
28
29
  userAdapter?: UserContextAdapter;
29
30
  children: React__default.ReactNode;
31
+ performanceAdapter?: PerformanceAdapter;
30
32
  }
31
33
  /**
32
34
  * Shopify Provider Component
33
35
  * Provides Shopify context to all child components
34
36
  */
35
- declare function ShopifyProvider({ config, locale, locales, cookieAdapter, cartCookieAdapter, routerAdapter, userAdapter, children, }: ShopifyProviderProps): react_jsx_runtime.JSX.Element;
37
+ declare function ShopifyProvider({ config, locale, locales, cookieAdapter, cartCookieAdapter, routerAdapter, userAdapter, children, performanceAdapter, }: ShopifyProviderProps): react_jsx_runtime.JSX.Element;
36
38
 
37
39
  /**
38
40
  * Hook to access Shopify context
@@ -62,7 +62,8 @@ function ShopifyProvider({
62
62
  cartCookieAdapter = browserCartCookieAdapter,
63
63
  routerAdapter,
64
64
  userAdapter,
65
- children
65
+ children,
66
+ performanceAdapter
66
67
  }) {
67
68
  const client = react.useMemo(() => {
68
69
  return shopifySdk.createShopifyClient(config, locale);
@@ -76,7 +77,8 @@ function ShopifyProvider({
76
77
  cookieAdapter,
77
78
  cartCookieAdapter,
78
79
  routerAdapter,
79
- userAdapter
80
+ userAdapter,
81
+ performanceAdapter
80
82
  };
81
83
  }, [
82
84
  client,
@@ -86,6 +88,7 @@ function ShopifyProvider({
86
88
  cookieAdapter,
87
89
  cartCookieAdapter,
88
90
  routerAdapter,
91
+ performanceAdapter,
89
92
  userAdapter
90
93
  ]);
91
94
  return /* @__PURE__ */ jsxRuntime.jsx(ShopifyContext.Provider, { value, children });