@storepecker/storefront-core 2.3.4 → 2.3.5

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.
@@ -120,10 +120,10 @@ var useCartStore = zustand.create((set) => ({
120
120
  set({ status: "idle" /* IDLE */ });
121
121
  }
122
122
  },
123
- updateCustomization: async (customizationInput) => {
123
+ updateCustomization: async (customizationInputs) => {
124
124
  set({ status: "loading" /* LOADING */ });
125
125
  try {
126
- await chunkHTFVROIV_cjs.updateOrderCustomization(customizationInput);
126
+ await chunkHTFVROIV_cjs.updateOrderCustomization({ customization_inputs: customizationInputs });
127
127
  } catch {
128
128
  } finally {
129
129
  set({ status: "idle" /* IDLE */ });
@@ -118,10 +118,10 @@ var useCartStore = create((set) => ({
118
118
  set({ status: "idle" /* IDLE */ });
119
119
  }
120
120
  },
121
- updateCustomization: async (customizationInput) => {
121
+ updateCustomization: async (customizationInputs) => {
122
122
  set({ status: "loading" /* LOADING */ });
123
123
  try {
124
- await updateOrderCustomization(customizationInput);
124
+ await updateOrderCustomization({ customization_inputs: customizationInputs });
125
125
  } catch {
126
126
  } finally {
127
127
  set({ status: "idle" /* IDLE */ });
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
4
4
  var chunk2AHH3XBW_cjs = require('../chunk-2AHH3XBW.cjs');
5
- var chunkSITQV6WZ_cjs = require('../chunk-SITQV6WZ.cjs');
5
+ var chunkJH4JJBXE_cjs = require('../chunk-JH4JJBXE.cjs');
6
6
  var chunkY2CPMT34_cjs = require('../chunk-Y2CPMT34.cjs');
7
7
  var chunkSMHJRNCR_cjs = require('../chunk-SMHJRNCR.cjs');
8
8
  var chunkBTT3XQ32_cjs = require('../chunk-BTT3XQ32.cjs');
@@ -320,7 +320,7 @@ function useCheckoutPayment(options) {
320
320
  const [isConfirmingPayment, setIsConfirmingPayment] = react.useState(false);
321
321
  const [showSuccessModal, setShowSuccessModal] = react.useState(false);
322
322
  const [showFailureModal, setShowFailureModal] = react.useState(false);
323
- const resetCartCount = chunkSITQV6WZ_cjs.useCartStore((s) => s.resetCartCount);
323
+ const resetCartCount = chunkJH4JJBXE_cjs.useCartStore((s) => s.resetCartCount);
324
324
  const callbacks = {
325
325
  onSuccess: (order) => {
326
326
  setOrderSummary(order);
@@ -506,8 +506,8 @@ function useVariantSelector(options) {
506
506
  }
507
507
  function useShopCheckout(options) {
508
508
  const { product, onNavigateToCart, onToast } = options;
509
- const { addToCart, setCart } = chunkSITQV6WZ_cjs.useCartStore();
510
- const isUserAuthenticated = chunkSITQV6WZ_cjs.useAuthStore((s) => s.isAuthenticated);
509
+ const { addToCart, setCart } = chunkJH4JJBXE_cjs.useCartStore();
510
+ const isUserAuthenticated = chunkJH4JJBXE_cjs.useAuthStore((s) => s.isAuthenticated);
511
511
  const [isWishlisted, setIsWishlisted] = react.useState(product.is_wishlisted);
512
512
  const [isAddedToCart, setIsAddedToCart] = react.useState(false);
513
513
  const [loading, setLoading] = react.useState(false);
@@ -1,6 +1,6 @@
1
1
  import { getUserDetails } from '../chunk-WYXT5AAG.js';
2
2
  import { findMatchingVariant, findSimilarVariant, isVariantCombinationAvailable, isColorVariantType } from '../chunk-HEFA67WK.js';
3
- import { useCartStore, useAuthStore } from '../chunk-XGRX4LHO.js';
3
+ import { useCartStore, useAuthStore } from '../chunk-TF2KMTB6.js';
4
4
  import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-U25T7M6S.js';
5
5
  import { cart_default } from '../chunk-QAC72HKO.js';
6
6
  import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-Y4NGR42Z.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkSITQV6WZ_cjs = require('../chunk-SITQV6WZ.cjs');
3
+ var chunkJH4JJBXE_cjs = require('../chunk-JH4JJBXE.cjs');
4
4
  var chunkY2CPMT34_cjs = require('../chunk-Y2CPMT34.cjs');
5
5
  require('../chunk-SMHJRNCR.cjs');
6
6
  require('../chunk-HTFVROIV.cjs');
@@ -68,15 +68,15 @@ var useProductStore = zustand.create((set, get) => ({
68
68
 
69
69
  Object.defineProperty(exports, "loginUser", {
70
70
  enumerable: true,
71
- get: function () { return chunkSITQV6WZ_cjs.loginUser; }
71
+ get: function () { return chunkJH4JJBXE_cjs.loginUser; }
72
72
  });
73
73
  Object.defineProperty(exports, "useAuthStore", {
74
74
  enumerable: true,
75
- get: function () { return chunkSITQV6WZ_cjs.useAuthStore; }
75
+ get: function () { return chunkJH4JJBXE_cjs.useAuthStore; }
76
76
  });
77
77
  Object.defineProperty(exports, "useCartStore", {
78
78
  enumerable: true,
79
- get: function () { return chunkSITQV6WZ_cjs.useCartStore; }
79
+ get: function () { return chunkJH4JJBXE_cjs.useCartStore; }
80
80
  });
81
81
  exports.useProductStore = useProductStore;
82
82
  exports.useWishlistStore = useWishlistStore;
@@ -33,10 +33,9 @@ interface CartStore extends CartState {
33
33
  variant_id: number;
34
34
  quantity: number;
35
35
  }>, addressId?: number) => Promise<void>;
36
- updateCustomization: (customizationInput: Array<{
37
- customization_option: number;
38
- customer_input: string;
39
- product_variant: number;
36
+ updateCustomization: (customizationInputs: Array<{
37
+ id: number;
38
+ customer_input: string | number | boolean | null;
40
39
  }>) => Promise<void>;
41
40
  }
42
41
  declare const useCartStore: zustand.UseBoundStore<zustand.StoreApi<CartStore>>;
@@ -33,10 +33,9 @@ interface CartStore extends CartState {
33
33
  variant_id: number;
34
34
  quantity: number;
35
35
  }>, addressId?: number) => Promise<void>;
36
- updateCustomization: (customizationInput: Array<{
37
- customization_option: number;
38
- customer_input: string;
39
- product_variant: number;
36
+ updateCustomization: (customizationInputs: Array<{
37
+ id: number;
38
+ customer_input: string | number | boolean | null;
40
39
  }>) => Promise<void>;
41
40
  }
42
41
  declare const useCartStore: zustand.UseBoundStore<zustand.StoreApi<CartStore>>;
@@ -1,4 +1,4 @@
1
- export { loginUser, useAuthStore, useCartStore } from '../chunk-XGRX4LHO.js';
1
+ export { loginUser, useAuthStore, useCartStore } from '../chunk-TF2KMTB6.js';
2
2
  import { getWishlist, getProducts } from '../chunk-U25T7M6S.js';
3
3
  import '../chunk-QAC72HKO.js';
4
4
  import '../chunk-LW3V53WJ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepecker/storefront-core",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Shared logic and utilities for Snapstore themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",