@anker-in/shopify-react 0.1.1-beta.31 → 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,5 +1,5 @@
1
- import { C as CookieAdapter } from '../types-Dt0DUG00.mjs';
2
- export { a as CookieOptions, R as RouterAdapter, U as UserContextAdapter } from '../types-Dt0DUG00.mjs';
1
+ import { C as CookieAdapter, P as PerformanceAdapter } from '../types-SKDHauqk.mjs';
2
+ export { a as CookieOptions, R as RouterAdapter, U as UserContextAdapter } from '../types-SKDHauqk.mjs';
3
3
  import { CartCookieAdapter } from '@anker-in/shopify-sdk';
4
4
 
5
5
  /**
@@ -13,4 +13,19 @@ declare const browserCookieAdapter: CookieAdapter;
13
13
  */
14
14
  declare const browserCartCookieAdapter: CartCookieAdapter;
15
15
 
16
- export { CookieAdapter, browserCartCookieAdapter, browserCookieAdapter };
16
+ /**
17
+ * Browser performance adapter using Performance API
18
+ * Tracks performance metrics for various operations
19
+ */
20
+ declare class BrowserPerformanceAdapter implements PerformanceAdapter {
21
+ /**
22
+ * Start tracking a performance event
23
+ */
24
+ addToCartStart(): void;
25
+ /**
26
+ * End tracking a performance event
27
+ */
28
+ addToCartEnd(): void;
29
+ }
30
+
31
+ export { BrowserPerformanceAdapter, CookieAdapter, PerformanceAdapter, browserCartCookieAdapter, browserCookieAdapter };
@@ -1,5 +1,5 @@
1
- import { C as CookieAdapter } from '../types-Dt0DUG00.js';
2
- export { a as CookieOptions, R as RouterAdapter, U as UserContextAdapter } from '../types-Dt0DUG00.js';
1
+ import { C as CookieAdapter, P as PerformanceAdapter } from '../types-SKDHauqk.js';
2
+ export { a as CookieOptions, R as RouterAdapter, U as UserContextAdapter } from '../types-SKDHauqk.js';
3
3
  import { CartCookieAdapter } from '@anker-in/shopify-sdk';
4
4
 
5
5
  /**
@@ -13,4 +13,19 @@ declare const browserCookieAdapter: CookieAdapter;
13
13
  */
14
14
  declare const browserCartCookieAdapter: CartCookieAdapter;
15
15
 
16
- export { CookieAdapter, browserCartCookieAdapter, browserCookieAdapter };
16
+ /**
17
+ * Browser performance adapter using Performance API
18
+ * Tracks performance metrics for various operations
19
+ */
20
+ declare class BrowserPerformanceAdapter implements PerformanceAdapter {
21
+ /**
22
+ * Start tracking a performance event
23
+ */
24
+ addToCartStart(): void;
25
+ /**
26
+ * End tracking a performance event
27
+ */
28
+ addToCartEnd(): void;
29
+ }
30
+
31
+ export { BrowserPerformanceAdapter, CookieAdapter, PerformanceAdapter, browserCartCookieAdapter, browserCookieAdapter };
@@ -43,6 +43,21 @@ var browserCartCookieAdapter = {
43
43
  }
44
44
  };
45
45
 
46
+ // src/adapters/browser-performance.ts
47
+ var BrowserPerformanceAdapter = class {
48
+ /**
49
+ * Start tracking a performance event
50
+ */
51
+ addToCartStart() {
52
+ }
53
+ /**
54
+ * End tracking a performance event
55
+ */
56
+ addToCartEnd() {
57
+ }
58
+ };
59
+
60
+ exports.BrowserPerformanceAdapter = BrowserPerformanceAdapter;
46
61
  exports.browserCartCookieAdapter = browserCartCookieAdapter;
47
62
  exports.browserCookieAdapter = browserCookieAdapter;
48
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/adapters/browser-cookie.ts","../../src/adapters/browser-cart-cookie.ts"],"names":["Cookies"],"mappings":";;;;;;;;;AAMO,IAAM,oBAAA,GAAsC;AAAA,EACjD,IAAI,GAAA,EAAiC;AACnC,IAAA,OAAOA,wBAAA,CAAQ,IAAI,GAAG,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,GAAA,CAAI,GAAA,EAAa,KAAA,EAAe,OAAA,EAA+B;AAC7D,IAAAA,wBAAA,CAAQ,GAAA,CAAI,KAAK,KAAA,EAAO;AAAA,MACtB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,IAAA,EAAM,SAAS,IAAA,IAAQ,GAAA;AAAA,MACvB,SAAS,OAAA,EAAS,OAAA;AAAA,MAClB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,UAAU,OAAA,EAAS;AAAA,KACpB,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,OAAO,GAAA,EAAmB;AACxB,IAAAA,wBAAA,CAAQ,OAAO,GAAG,CAAA;AAAA,EACpB;AACF;ACjBA,SAAS,kBAAkB,MAAA,EAAwB;AACjD,EAAA,OAAO,GAAG,MAAM,CAAA,gBAAA,CAAA;AAClB;AAMO,IAAM,wBAAA,GAA8C;AAAA,EACzD,UAAU,MAAA,EAAoC;AAC5C,IAAA,OAAOA,wBAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC9C,CAAA;AAAA,EAEA,SAAA,CAAU,QAAgB,MAAA,EAAsB;AAC9C,IAAAA,wBAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,GAAG,MAAA,EAAQ;AAAA,MAC7C,IAAA,EAAM,GAAA;AAAA,MACN,OAAA,EAAS;AAAA;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,aAAa,MAAA,EAAsB;AACjC,IAAAA,wBAAAA,CAAQ,MAAA,CAAO,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC1C;AACF","file":"index.js","sourcesContent":["import Cookies from 'js-cookie'\nimport type { CookieAdapter, CookieOptions } from './types'\n\n/**\n * Browser cookie adapter using js-cookie\n */\nexport const browserCookieAdapter: CookieAdapter = {\n get(key: string): string | undefined {\n return Cookies.get(key)\n },\n\n set(key: string, value: string, options?: CookieOptions): void {\n Cookies.set(key, value, {\n domain: options?.domain,\n path: options?.path || '/',\n expires: options?.expires,\n secure: options?.secure,\n sameSite: options?.sameSite,\n })\n },\n\n remove(key: string): void {\n Cookies.remove(key)\n },\n}\n","import Cookies from 'js-cookie'\nimport type { CartCookieAdapter } from '@anker-in/shopify-sdk'\n\n/**\n * Cookie name mapping for cart IDs by locale\n * Format: {locale}-shopify-cart-id\n */\nfunction getCartCookieName(locale: string): string {\n return `${locale}-shopify-cart-id`\n}\n\n/**\n * Browser cart cookie adapter using js-cookie\n * Manages cart ID storage across different locales\n */\nexport const browserCartCookieAdapter: CartCookieAdapter = {\n getCartId(locale: string): string | undefined {\n return Cookies.get(getCartCookieName(locale))\n },\n\n setCartId(locale: string, cartId: string): void {\n Cookies.set(getCartCookieName(locale), cartId, {\n path: '/',\n expires: 30, // 30 days\n })\n },\n\n removeCartId(locale: string): void {\n Cookies.remove(getCartCookieName(locale))\n },\n}\n"]}
1
+ {"version":3,"sources":["../../src/adapters/browser-cookie.ts","../../src/adapters/browser-cart-cookie.ts","../../src/adapters/browser-performance.ts"],"names":["Cookies"],"mappings":";;;;;;;;;AAMO,IAAM,oBAAA,GAAsC;AAAA,EACjD,IAAI,GAAA,EAAiC;AACnC,IAAA,OAAOA,wBAAA,CAAQ,IAAI,GAAG,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,GAAA,CAAI,GAAA,EAAa,KAAA,EAAe,OAAA,EAA+B;AAC7D,IAAAA,wBAAA,CAAQ,GAAA,CAAI,KAAK,KAAA,EAAO;AAAA,MACtB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,IAAA,EAAM,SAAS,IAAA,IAAQ,GAAA;AAAA,MACvB,SAAS,OAAA,EAAS,OAAA;AAAA,MAClB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,UAAU,OAAA,EAAS;AAAA,KACpB,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,OAAO,GAAA,EAAmB;AACxB,IAAAA,wBAAA,CAAQ,OAAO,GAAG,CAAA;AAAA,EACpB;AACF;ACjBA,SAAS,kBAAkB,MAAA,EAAwB;AACjD,EAAA,OAAO,GAAG,MAAM,CAAA,gBAAA,CAAA;AAClB;AAMO,IAAM,wBAAA,GAA8C;AAAA,EACzD,UAAU,MAAA,EAAoC;AAC5C,IAAA,OAAOA,wBAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC9C,CAAA;AAAA,EAEA,SAAA,CAAU,QAAgB,MAAA,EAAsB;AAC9C,IAAAA,wBAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,GAAG,MAAA,EAAQ;AAAA,MAC7C,IAAA,EAAM,GAAA;AAAA,MACN,OAAA,EAAS;AAAA;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,aAAa,MAAA,EAAsB;AACjC,IAAAA,wBAAAA,CAAQ,MAAA,CAAO,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC1C;AACF;;;ACxBO,IAAM,4BAAN,MAA8D;AAAA;AAAA;AAAA;AAAA,EAInE,cAAA,GAAuB;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA,EAKxB,YAAA,GAAqB;AAAA,EAAC;AACxB","file":"index.js","sourcesContent":["import Cookies from 'js-cookie'\nimport type { CookieAdapter, CookieOptions } from './types'\n\n/**\n * Browser cookie adapter using js-cookie\n */\nexport const browserCookieAdapter: CookieAdapter = {\n get(key: string): string | undefined {\n return Cookies.get(key)\n },\n\n set(key: string, value: string, options?: CookieOptions): void {\n Cookies.set(key, value, {\n domain: options?.domain,\n path: options?.path || '/',\n expires: options?.expires,\n secure: options?.secure,\n sameSite: options?.sameSite,\n })\n },\n\n remove(key: string): void {\n Cookies.remove(key)\n },\n}\n","import Cookies from 'js-cookie'\nimport type { CartCookieAdapter } from '@anker-in/shopify-sdk'\n\n/**\n * Cookie name mapping for cart IDs by locale\n * Format: {locale}-shopify-cart-id\n */\nfunction getCartCookieName(locale: string): string {\n return `${locale}-shopify-cart-id`\n}\n\n/**\n * Browser cart cookie adapter using js-cookie\n * Manages cart ID storage across different locales\n */\nexport const browserCartCookieAdapter: CartCookieAdapter = {\n getCartId(locale: string): string | undefined {\n return Cookies.get(getCartCookieName(locale))\n },\n\n setCartId(locale: string, cartId: string): void {\n Cookies.set(getCartCookieName(locale), cartId, {\n path: '/',\n expires: 30, // 30 days\n })\n },\n\n removeCartId(locale: string): void {\n Cookies.remove(getCartCookieName(locale))\n },\n}\n","import type { PerformanceAdapter } from './types'\n\n/**\n * Browser performance adapter using Performance API\n * Tracks performance metrics for various operations\n */\nexport class BrowserPerformanceAdapter implements PerformanceAdapter {\n /**\n * Start tracking a performance event\n */\n addToCartStart(): void {}\n\n /**\n * End tracking a performance event\n */\n addToCartEnd(): void {}\n}\n"]}
@@ -37,6 +37,20 @@ var browserCartCookieAdapter = {
37
37
  }
38
38
  };
39
39
 
40
- export { browserCartCookieAdapter, browserCookieAdapter };
40
+ // src/adapters/browser-performance.ts
41
+ var BrowserPerformanceAdapter = class {
42
+ /**
43
+ * Start tracking a performance event
44
+ */
45
+ addToCartStart() {
46
+ }
47
+ /**
48
+ * End tracking a performance event
49
+ */
50
+ addToCartEnd() {
51
+ }
52
+ };
53
+
54
+ export { BrowserPerformanceAdapter, browserCartCookieAdapter, browserCookieAdapter };
41
55
  //# sourceMappingURL=index.mjs.map
42
56
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/adapters/browser-cookie.ts","../../src/adapters/browser-cart-cookie.ts"],"names":["Cookies"],"mappings":";;;AAMO,IAAM,oBAAA,GAAsC;AAAA,EACjD,IAAI,GAAA,EAAiC;AACnC,IAAA,OAAO,OAAA,CAAQ,IAAI,GAAG,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,GAAA,CAAI,GAAA,EAAa,KAAA,EAAe,OAAA,EAA+B;AAC7D,IAAA,OAAA,CAAQ,GAAA,CAAI,KAAK,KAAA,EAAO;AAAA,MACtB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,IAAA,EAAM,SAAS,IAAA,IAAQ,GAAA;AAAA,MACvB,SAAS,OAAA,EAAS,OAAA;AAAA,MAClB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,UAAU,OAAA,EAAS;AAAA,KACpB,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,OAAO,GAAA,EAAmB;AACxB,IAAA,OAAA,CAAQ,OAAO,GAAG,CAAA;AAAA,EACpB;AACF;ACjBA,SAAS,kBAAkB,MAAA,EAAwB;AACjD,EAAA,OAAO,GAAG,MAAM,CAAA,gBAAA,CAAA;AAClB;AAMO,IAAM,wBAAA,GAA8C;AAAA,EACzD,UAAU,MAAA,EAAoC;AAC5C,IAAA,OAAOA,OAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC9C,CAAA;AAAA,EAEA,SAAA,CAAU,QAAgB,MAAA,EAAsB;AAC9C,IAAAA,OAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,GAAG,MAAA,EAAQ;AAAA,MAC7C,IAAA,EAAM,GAAA;AAAA,MACN,OAAA,EAAS;AAAA;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,aAAa,MAAA,EAAsB;AACjC,IAAAA,OAAAA,CAAQ,MAAA,CAAO,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC1C;AACF","file":"index.mjs","sourcesContent":["import Cookies from 'js-cookie'\nimport type { CookieAdapter, CookieOptions } from './types'\n\n/**\n * Browser cookie adapter using js-cookie\n */\nexport const browserCookieAdapter: CookieAdapter = {\n get(key: string): string | undefined {\n return Cookies.get(key)\n },\n\n set(key: string, value: string, options?: CookieOptions): void {\n Cookies.set(key, value, {\n domain: options?.domain,\n path: options?.path || '/',\n expires: options?.expires,\n secure: options?.secure,\n sameSite: options?.sameSite,\n })\n },\n\n remove(key: string): void {\n Cookies.remove(key)\n },\n}\n","import Cookies from 'js-cookie'\nimport type { CartCookieAdapter } from '@anker-in/shopify-sdk'\n\n/**\n * Cookie name mapping for cart IDs by locale\n * Format: {locale}-shopify-cart-id\n */\nfunction getCartCookieName(locale: string): string {\n return `${locale}-shopify-cart-id`\n}\n\n/**\n * Browser cart cookie adapter using js-cookie\n * Manages cart ID storage across different locales\n */\nexport const browserCartCookieAdapter: CartCookieAdapter = {\n getCartId(locale: string): string | undefined {\n return Cookies.get(getCartCookieName(locale))\n },\n\n setCartId(locale: string, cartId: string): void {\n Cookies.set(getCartCookieName(locale), cartId, {\n path: '/',\n expires: 30, // 30 days\n })\n },\n\n removeCartId(locale: string): void {\n Cookies.remove(getCartCookieName(locale))\n },\n}\n"]}
1
+ {"version":3,"sources":["../../src/adapters/browser-cookie.ts","../../src/adapters/browser-cart-cookie.ts","../../src/adapters/browser-performance.ts"],"names":["Cookies"],"mappings":";;;AAMO,IAAM,oBAAA,GAAsC;AAAA,EACjD,IAAI,GAAA,EAAiC;AACnC,IAAA,OAAO,OAAA,CAAQ,IAAI,GAAG,CAAA;AAAA,EACxB,CAAA;AAAA,EAEA,GAAA,CAAI,GAAA,EAAa,KAAA,EAAe,OAAA,EAA+B;AAC7D,IAAA,OAAA,CAAQ,GAAA,CAAI,KAAK,KAAA,EAAO;AAAA,MACtB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,IAAA,EAAM,SAAS,IAAA,IAAQ,GAAA;AAAA,MACvB,SAAS,OAAA,EAAS,OAAA;AAAA,MAClB,QAAQ,OAAA,EAAS,MAAA;AAAA,MACjB,UAAU,OAAA,EAAS;AAAA,KACpB,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,OAAO,GAAA,EAAmB;AACxB,IAAA,OAAA,CAAQ,OAAO,GAAG,CAAA;AAAA,EACpB;AACF;ACjBA,SAAS,kBAAkB,MAAA,EAAwB;AACjD,EAAA,OAAO,GAAG,MAAM,CAAA,gBAAA,CAAA;AAClB;AAMO,IAAM,wBAAA,GAA8C;AAAA,EACzD,UAAU,MAAA,EAAoC;AAC5C,IAAA,OAAOA,OAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC9C,CAAA;AAAA,EAEA,SAAA,CAAU,QAAgB,MAAA,EAAsB;AAC9C,IAAAA,OAAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,MAAM,GAAG,MAAA,EAAQ;AAAA,MAC7C,IAAA,EAAM,GAAA;AAAA,MACN,OAAA,EAAS;AAAA;AAAA,KACV,CAAA;AAAA,EACH,CAAA;AAAA,EAEA,aAAa,MAAA,EAAsB;AACjC,IAAAA,OAAAA,CAAQ,MAAA,CAAO,iBAAA,CAAkB,MAAM,CAAC,CAAA;AAAA,EAC1C;AACF;;;ACxBO,IAAM,4BAAN,MAA8D;AAAA;AAAA;AAAA;AAAA,EAInE,cAAA,GAAuB;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA,EAKxB,YAAA,GAAqB;AAAA,EAAC;AACxB","file":"index.mjs","sourcesContent":["import Cookies from 'js-cookie'\nimport type { CookieAdapter, CookieOptions } from './types'\n\n/**\n * Browser cookie adapter using js-cookie\n */\nexport const browserCookieAdapter: CookieAdapter = {\n get(key: string): string | undefined {\n return Cookies.get(key)\n },\n\n set(key: string, value: string, options?: CookieOptions): void {\n Cookies.set(key, value, {\n domain: options?.domain,\n path: options?.path || '/',\n expires: options?.expires,\n secure: options?.secure,\n sameSite: options?.sameSite,\n })\n },\n\n remove(key: string): void {\n Cookies.remove(key)\n },\n}\n","import Cookies from 'js-cookie'\nimport type { CartCookieAdapter } from '@anker-in/shopify-sdk'\n\n/**\n * Cookie name mapping for cart IDs by locale\n * Format: {locale}-shopify-cart-id\n */\nfunction getCartCookieName(locale: string): string {\n return `${locale}-shopify-cart-id`\n}\n\n/**\n * Browser cart cookie adapter using js-cookie\n * Manages cart ID storage across different locales\n */\nexport const browserCartCookieAdapter: CartCookieAdapter = {\n getCartId(locale: string): string | undefined {\n return Cookies.get(getCartCookieName(locale))\n },\n\n setCartId(locale: string, cartId: string): void {\n Cookies.set(getCartCookieName(locale), cartId, {\n path: '/',\n expires: 30, // 30 days\n })\n },\n\n removeCartId(locale: string): void {\n Cookies.remove(getCartCookieName(locale))\n },\n}\n","import type { PerformanceAdapter } from './types'\n\n/**\n * Browser performance adapter using Performance API\n * Tracks performance metrics for various operations\n */\nexport class BrowserPerformanceAdapter implements PerformanceAdapter {\n /**\n * Start tracking a performance event\n */\n addToCartStart(): void {}\n\n /**\n * End tracking a performance event\n */\n addToCartEnd(): void {}\n}\n"]}
@@ -1009,7 +1009,7 @@ declare function useHasPlusMemberInCart({ memberSetting, cart, }: UseHasPlusMemb
1009
1009
  *
1010
1010
  * @example
1011
1011
  * ```tsx
1012
- * const plusMemberProduct = useAddPlusMemberProductsToCart({
1012
+ * const plusMemberProduct = usePlusMemberNeedAddToCart({
1013
1013
  * cart,
1014
1014
  * })
1015
1015
  *
@@ -1021,7 +1021,7 @@ declare function useHasPlusMemberInCart({ memberSetting, cart, }: UseHasPlusMemb
1021
1021
  * // 或 undefined (当不需要添加会员产品时)
1022
1022
  * ```
1023
1023
  */
1024
- declare function useAddPlusMemberProductsToCart({ cart, profile, }: {
1024
+ declare function usePlusMemberNeedAddToCart({ cart, profile, }: {
1025
1025
  cart: NormalizedCart;
1026
1026
  profile?: any;
1027
1027
  }): {
@@ -1931,4 +1931,4 @@ declare function getCachedGeoLocation(cacheKey?: string): GeoLocationData | unde
1931
1931
  */
1932
1932
  declare function clearGeoLocationCache(cacheKey?: string): void;
1933
1933
 
1934
- export { type AddCartLinesInput, AddToCartInput, AddToCartLineItem, type ApplyCartCodesInput, type AutoFreeGift, type AutoFreeGiftCartLineInput, type AutoFreeGiftConfig, type AutoFreeGiftItem, type AutoFreeGiftList, type AutoFreeGiftMainProduct, type BuyNowInput, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, type Config, type CreateCartInput, DeliveryData, DeliveryPlusType, type DiscountLabel, type FormattedGift, type FunctionGiftResult, type GeoLocationData, type GiftProduct, type GiftProductItem, type GiftTier, type HasPlusMemberInCartResult, type ImageMedia, type LocaleMapping, MAIN_PRODUCT_CODE, type MainProductInfo, type NormalizedSearchResultItem, type Options, OrderBasePriceType, type OrderDiscountConfig, type OrderDiscountResult, OrderDiscountType, PlusMemberContext, type PlusMemberContextValue, PlusMemberProvider, type PlusMemberProviderProps, PlusMemberSettingsMetafields, PlusMemberShippingMethodConfig, PriceBasePriceType, type PriceDiscountConfig, PriceDiscountType, type RemoveCartCodesInput, type RemoveCartLinesInput, type RewardItem, type RuleCondition, RuleType, SCRIPT_CODE_AMOUNT_KEY, type SearchResult, type SearchResultType, type SelectedOptionsResult, SelectedPlusMemberProduct, type ShippingMethodsContext, type SiteInfo, SpendMoneyType, type TieredDiscount, type UpdateCartAttributesInput, UseAddToCartOptions, type UseAllBlogsOptions, type UseAllCollectionsOptions, type UseAllProductsOptions, type UseArticleOptions, type UseArticlesInBlogOptions, type UseArticlesOptions, type UseAutoRemovePlusMemberInCartProps, type UseBlogOptions, type UseBuyNowOptions, type UseCalcGiftsFromLinesOptions, type UseCalcGiftsFromLinesResult, type UseCollectionOptions, type UseCollectionsOptions, type UseExposureOptions, type UseGeoLocationOptions, type UseHasPlusMemberInCartProps, type UseIntersectionOptions, type UsePriceOptions, type UsePriceResult, type UseProductOptions, type UseProductsByHandlesOptions, type UseScriptAutoFreeGiftResult, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingMethodsResult, type UseSiteOptions, type UseUpdatePlusMemberDeliveryOptionsProps, type VariantItem, type VariantMedia, type VideoMedia, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, normalizeAddToCartLines, preCheck, safeParse, useAddCartLines, useAddPlusMemberProductsToCart, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusAnnualProductVariant, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes, usePlusMemberItemCustomAttributes, usePlusMonthlyProductVariant, usePrice, useProduct, useProductUrl, useProductsByHandles, useRemoveCartCodes, useRemoveCartLines, useReplaceCartPlusMember, useScriptAutoFreeGift, useSearch, useSelectedOptions, useShippingMethodAvailableCheck, useShippingMethods, useSite, useUpdateCartAttributes, useUpdateCartLines, useUpdateLineCodeAmountAttributes, useUpdatePlusMemberDeliveryOptions, useUpdateVariantQuery, useVariant, useVariantMedia };
1934
+ export { type AddCartLinesInput, AddToCartInput, AddToCartLineItem, type ApplyCartCodesInput, type AutoFreeGift, type AutoFreeGiftCartLineInput, type AutoFreeGiftConfig, type AutoFreeGiftItem, type AutoFreeGiftList, type AutoFreeGiftMainProduct, type BuyNowInput, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, type Config, type CreateCartInput, DeliveryData, DeliveryPlusType, type DiscountLabel, type FormattedGift, type FunctionGiftResult, type GeoLocationData, type GiftProduct, type GiftProductItem, type GiftTier, type HasPlusMemberInCartResult, type ImageMedia, type LocaleMapping, MAIN_PRODUCT_CODE, type MainProductInfo, type NormalizedSearchResultItem, type Options, OrderBasePriceType, type OrderDiscountConfig, type OrderDiscountResult, OrderDiscountType, PlusMemberContext, type PlusMemberContextValue, PlusMemberProvider, type PlusMemberProviderProps, PlusMemberSettingsMetafields, PlusMemberShippingMethodConfig, PriceBasePriceType, type PriceDiscountConfig, PriceDiscountType, type RemoveCartCodesInput, type RemoveCartLinesInput, type RewardItem, type RuleCondition, RuleType, SCRIPT_CODE_AMOUNT_KEY, type SearchResult, type SearchResultType, type SelectedOptionsResult, SelectedPlusMemberProduct, type ShippingMethodsContext, type SiteInfo, SpendMoneyType, type TieredDiscount, type UpdateCartAttributesInput, UseAddToCartOptions, type UseAllBlogsOptions, type UseAllCollectionsOptions, type UseAllProductsOptions, type UseArticleOptions, type UseArticlesInBlogOptions, type UseArticlesOptions, type UseAutoRemovePlusMemberInCartProps, type UseBlogOptions, type UseBuyNowOptions, type UseCalcGiftsFromLinesOptions, type UseCalcGiftsFromLinesResult, type UseCollectionOptions, type UseCollectionsOptions, type UseExposureOptions, type UseGeoLocationOptions, type UseHasPlusMemberInCartProps, type UseIntersectionOptions, type UsePriceOptions, type UsePriceResult, type UseProductOptions, type UseProductsByHandlesOptions, type UseScriptAutoFreeGiftResult, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingMethodsResult, type UseSiteOptions, type UseUpdatePlusMemberDeliveryOptionsProps, type VariantItem, type VariantMedia, type VideoMedia, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, normalizeAddToCartLines, preCheck, safeParse, useAddCartLines, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusAnnualProductVariant, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes, usePlusMemberItemCustomAttributes, usePlusMemberNeedAddToCart, usePlusMonthlyProductVariant, usePrice, useProduct, useProductUrl, useProductsByHandles, useRemoveCartCodes, useRemoveCartLines, useReplaceCartPlusMember, useScriptAutoFreeGift, useSearch, useSelectedOptions, useShippingMethodAvailableCheck, useShippingMethods, useSite, useUpdateCartAttributes, useUpdateCartLines, useUpdateLineCodeAmountAttributes, useUpdatePlusMemberDeliveryOptions, useUpdateVariantQuery, useVariant, useVariantMedia };
@@ -1009,7 +1009,7 @@ declare function useHasPlusMemberInCart({ memberSetting, cart, }: UseHasPlusMemb
1009
1009
  *
1010
1010
  * @example
1011
1011
  * ```tsx
1012
- * const plusMemberProduct = useAddPlusMemberProductsToCart({
1012
+ * const plusMemberProduct = usePlusMemberNeedAddToCart({
1013
1013
  * cart,
1014
1014
  * })
1015
1015
  *
@@ -1021,7 +1021,7 @@ declare function useHasPlusMemberInCart({ memberSetting, cart, }: UseHasPlusMemb
1021
1021
  * // 或 undefined (当不需要添加会员产品时)
1022
1022
  * ```
1023
1023
  */
1024
- declare function useAddPlusMemberProductsToCart({ cart, profile, }: {
1024
+ declare function usePlusMemberNeedAddToCart({ cart, profile, }: {
1025
1025
  cart: NormalizedCart;
1026
1026
  profile?: any;
1027
1027
  }): {
@@ -1931,4 +1931,4 @@ declare function getCachedGeoLocation(cacheKey?: string): GeoLocationData | unde
1931
1931
  */
1932
1932
  declare function clearGeoLocationCache(cacheKey?: string): void;
1933
1933
 
1934
- export { type AddCartLinesInput, AddToCartInput, AddToCartLineItem, type ApplyCartCodesInput, type AutoFreeGift, type AutoFreeGiftCartLineInput, type AutoFreeGiftConfig, type AutoFreeGiftItem, type AutoFreeGiftList, type AutoFreeGiftMainProduct, type BuyNowInput, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, type Config, type CreateCartInput, DeliveryData, DeliveryPlusType, type DiscountLabel, type FormattedGift, type FunctionGiftResult, type GeoLocationData, type GiftProduct, type GiftProductItem, type GiftTier, type HasPlusMemberInCartResult, type ImageMedia, type LocaleMapping, MAIN_PRODUCT_CODE, type MainProductInfo, type NormalizedSearchResultItem, type Options, OrderBasePriceType, type OrderDiscountConfig, type OrderDiscountResult, OrderDiscountType, PlusMemberContext, type PlusMemberContextValue, PlusMemberProvider, type PlusMemberProviderProps, PlusMemberSettingsMetafields, PlusMemberShippingMethodConfig, PriceBasePriceType, type PriceDiscountConfig, PriceDiscountType, type RemoveCartCodesInput, type RemoveCartLinesInput, type RewardItem, type RuleCondition, RuleType, SCRIPT_CODE_AMOUNT_KEY, type SearchResult, type SearchResultType, type SelectedOptionsResult, SelectedPlusMemberProduct, type ShippingMethodsContext, type SiteInfo, SpendMoneyType, type TieredDiscount, type UpdateCartAttributesInput, UseAddToCartOptions, type UseAllBlogsOptions, type UseAllCollectionsOptions, type UseAllProductsOptions, type UseArticleOptions, type UseArticlesInBlogOptions, type UseArticlesOptions, type UseAutoRemovePlusMemberInCartProps, type UseBlogOptions, type UseBuyNowOptions, type UseCalcGiftsFromLinesOptions, type UseCalcGiftsFromLinesResult, type UseCollectionOptions, type UseCollectionsOptions, type UseExposureOptions, type UseGeoLocationOptions, type UseHasPlusMemberInCartProps, type UseIntersectionOptions, type UsePriceOptions, type UsePriceResult, type UseProductOptions, type UseProductsByHandlesOptions, type UseScriptAutoFreeGiftResult, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingMethodsResult, type UseSiteOptions, type UseUpdatePlusMemberDeliveryOptionsProps, type VariantItem, type VariantMedia, type VideoMedia, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, normalizeAddToCartLines, preCheck, safeParse, useAddCartLines, useAddPlusMemberProductsToCart, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusAnnualProductVariant, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes, usePlusMemberItemCustomAttributes, usePlusMonthlyProductVariant, usePrice, useProduct, useProductUrl, useProductsByHandles, useRemoveCartCodes, useRemoveCartLines, useReplaceCartPlusMember, useScriptAutoFreeGift, useSearch, useSelectedOptions, useShippingMethodAvailableCheck, useShippingMethods, useSite, useUpdateCartAttributes, useUpdateCartLines, useUpdateLineCodeAmountAttributes, useUpdatePlusMemberDeliveryOptions, useUpdateVariantQuery, useVariant, useVariantMedia };
1934
+ export { type AddCartLinesInput, AddToCartInput, AddToCartLineItem, type ApplyCartCodesInput, type AutoFreeGift, type AutoFreeGiftCartLineInput, type AutoFreeGiftConfig, type AutoFreeGiftItem, type AutoFreeGiftList, type AutoFreeGiftMainProduct, type BuyNowInput, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, type Config, type CreateCartInput, DeliveryData, DeliveryPlusType, type DiscountLabel, type FormattedGift, type FunctionGiftResult, type GeoLocationData, type GiftProduct, type GiftProductItem, type GiftTier, type HasPlusMemberInCartResult, type ImageMedia, type LocaleMapping, MAIN_PRODUCT_CODE, type MainProductInfo, type NormalizedSearchResultItem, type Options, OrderBasePriceType, type OrderDiscountConfig, type OrderDiscountResult, OrderDiscountType, PlusMemberContext, type PlusMemberContextValue, PlusMemberProvider, type PlusMemberProviderProps, PlusMemberSettingsMetafields, PlusMemberShippingMethodConfig, PriceBasePriceType, type PriceDiscountConfig, PriceDiscountType, type RemoveCartCodesInput, type RemoveCartLinesInput, type RewardItem, type RuleCondition, RuleType, SCRIPT_CODE_AMOUNT_KEY, type SearchResult, type SearchResultType, type SelectedOptionsResult, SelectedPlusMemberProduct, type ShippingMethodsContext, type SiteInfo, SpendMoneyType, type TieredDiscount, type UpdateCartAttributesInput, UseAddToCartOptions, type UseAllBlogsOptions, type UseAllCollectionsOptions, type UseAllProductsOptions, type UseArticleOptions, type UseArticlesInBlogOptions, type UseArticlesOptions, type UseAutoRemovePlusMemberInCartProps, type UseBlogOptions, type UseBuyNowOptions, type UseCalcGiftsFromLinesOptions, type UseCalcGiftsFromLinesResult, type UseCollectionOptions, type UseCollectionsOptions, type UseExposureOptions, type UseGeoLocationOptions, type UseHasPlusMemberInCartProps, type UseIntersectionOptions, type UsePriceOptions, type UsePriceResult, type UseProductOptions, type UseProductsByHandlesOptions, type UseScriptAutoFreeGiftResult, type UseSearchOptions, type UseShippingMethodsOptions, type UseShippingMethodsResult, type UseSiteOptions, type UseUpdatePlusMemberDeliveryOptionsProps, type VariantItem, type VariantMedia, type VideoMedia, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, normalizeAddToCartLines, preCheck, safeParse, useAddCartLines, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusAnnualProductVariant, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes, usePlusMemberItemCustomAttributes, usePlusMemberNeedAddToCart, usePlusMonthlyProductVariant, usePrice, useProduct, useProductUrl, useProductsByHandles, useRemoveCartCodes, useRemoveCartLines, useReplaceCartPlusMember, useScriptAutoFreeGift, useSearch, useSelectedOptions, useShippingMethodAvailableCheck, useShippingMethods, useSite, useUpdateCartAttributes, useUpdateCartLines, useUpdateLineCodeAmountAttributes, useUpdatePlusMemberDeliveryOptions, useUpdateVariantQuery, useVariant, useVariantMedia };
@@ -375,7 +375,6 @@ var useCalcAutoFreeGift = (cart, autoFreeGiftConfig, customer, lines) => {
375
375
  }
376
376
  return cart;
377
377
  }, [lines, cart]);
378
- console.log("effectiveCart useCalcAutoFreeGift", effectiveCart);
379
378
  const { activeCampaign, subtotal } = react.useMemo(() => {
380
379
  for (const campaign of autoFreeGiftConfig) {
381
380
  const { rule_conditions = [], rule_result } = campaign;
@@ -391,7 +390,6 @@ var useCalcAutoFreeGift = (cart, autoFreeGiftConfig, customer, lines) => {
391
390
  all_store_variant: spend_get_reward.main_product?.all_store_variant || false
392
391
  }
393
392
  );
394
- console.log("matchedSubtotal useCalcAutoFreeGift", matchedSubtotal);
395
393
  if (matchedSubtotal > 0) {
396
394
  return { activeCampaign: campaign, subtotal: matchedSubtotal };
397
395
  }
@@ -970,7 +968,7 @@ var getLinesWithFunctionAttributes = (lineItems) => {
970
968
 
971
969
  // src/hooks/cart/use-add-to-cart.ts
972
970
  function useAddToCart({ withTrack = true } = {}, swrOptions) {
973
- const { client, config, locale, cartCookieAdapter, userAdapter } = useShopify();
971
+ const { client, config, locale, cartCookieAdapter, userAdapter, performanceAdapter } = useShopify();
974
972
  const { cart, addCustomAttributes } = useCartContext();
975
973
  const { trigger: applyCartCodes } = useApplyCartCodes();
976
974
  const { trigger: removeInvalidCodes } = useRemoveCartCodes();
@@ -991,6 +989,7 @@ function useAddToCart({ withTrack = true } = {}, swrOptions) {
991
989
  if (!lineItems || lineItems.length === 0) {
992
990
  return;
993
991
  }
992
+ performanceAdapter?.addToCartStart();
994
993
  const linesWithAttributes = getLinesWithAttributes({
995
994
  cart,
996
995
  lineItems
@@ -1012,6 +1011,7 @@ function useAddToCart({ withTrack = true } = {}, swrOptions) {
1012
1011
  buyerIdentity
1013
1012
  });
1014
1013
  if (!resultCart) {
1014
+ performanceAdapter?.addToCartEnd();
1015
1015
  return void 0;
1016
1016
  }
1017
1017
  console.log("npm addCartLines resultCart", resultCart);
@@ -1046,9 +1046,10 @@ function useAddToCart({ withTrack = true } = {}, swrOptions) {
1046
1046
  });
1047
1047
  trackAddToCartFBQ({ lineItems });
1048
1048
  }
1049
+ performanceAdapter?.addToCartEnd();
1049
1050
  return resultCart;
1050
1051
  },
1051
- [client, locale, cartCookieAdapter, userAdapter, cart, withTrack]
1052
+ [client, locale, cartCookieAdapter, userAdapter, cart, withTrack, performanceAdapter]
1052
1053
  );
1053
1054
  return useSWRMutation__default.default("add-to-cart", addToCart, swrOptions);
1054
1055
  }
@@ -2811,7 +2812,7 @@ function useAutoRemovePlusMemberInCart({
2811
2812
  }
2812
2813
  }, [cart, plus_annual_product, plus_monthly_product, profile, removeCartLines2]);
2813
2814
  }
2814
- function useAddPlusMemberProductsToCart({
2815
+ function usePlusMemberNeedAddToCart({
2815
2816
  cart,
2816
2817
  profile
2817
2818
  }) {
@@ -3141,7 +3142,6 @@ exports.normalizeAddToCartLines = normalizeAddToCartLines;
3141
3142
  exports.preCheck = preCheck;
3142
3143
  exports.safeParse = safeParse;
3143
3144
  exports.useAddCartLines = useAddCartLines;
3144
- exports.useAddPlusMemberProductsToCart = useAddPlusMemberProductsToCart;
3145
3145
  exports.useAddToCart = useAddToCart;
3146
3146
  exports.useAllBlogs = useAllBlogs;
3147
3147
  exports.useAllCollections = useAllCollections;
@@ -3170,6 +3170,7 @@ exports.usePlusMemberCheckoutCustomAttributes = usePlusMemberCheckoutCustomAttri
3170
3170
  exports.usePlusMemberContext = usePlusMemberContext;
3171
3171
  exports.usePlusMemberDeliveryCodes = usePlusMemberDeliveryCodes;
3172
3172
  exports.usePlusMemberItemCustomAttributes = usePlusMemberItemCustomAttributes;
3173
+ exports.usePlusMemberNeedAddToCart = usePlusMemberNeedAddToCart;
3173
3174
  exports.usePlusMonthlyProductVariant = usePlusMonthlyProductVariant;
3174
3175
  exports.usePrice = usePrice;
3175
3176
  exports.useProduct = useProduct;