@storepecker/storefront-core 2.3.5 → 2.3.6

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.
Files changed (35) hide show
  1. package/dist/api/index.d.cts +4 -6
  2. package/dist/api/index.d.ts +4 -6
  3. package/dist/{booking-BVWe8HHh.d.ts → booking-CG6tul9l.d.ts} +1 -1
  4. package/dist/{booking-DX9SU_qm.d.cts → booking-DNVf5ZAS.d.cts} +1 -1
  5. package/dist/checkout/index.d.cts +1 -3
  6. package/dist/checkout/index.d.ts +1 -3
  7. package/dist/chunk-5NUDTIQ2.js +9 -0
  8. package/dist/chunk-DODFO744.cjs +11 -0
  9. package/dist/{collections-BDSVfRNo.d.ts → collections-Bz9KD7Na.d.cts} +1 -1
  10. package/dist/{collections-WzvTO0OQ.d.cts → collections-CkEUi3BR.d.ts} +1 -1
  11. package/dist/components/index.cjs +11 -0
  12. package/dist/components/index.d.cts +8 -3
  13. package/dist/components/index.d.ts +8 -3
  14. package/dist/components/index.js +11 -1
  15. package/dist/hooks/index.d.cts +2 -4
  16. package/dist/hooks/index.d.ts +2 -4
  17. package/dist/models/index.d.cts +4 -6
  18. package/dist/models/index.d.ts +4 -6
  19. package/dist/{product-DJMdi4D4.d.cts → orders-fIdANHSl.d.cts} +265 -1
  20. package/dist/{product-DJMdi4D4.d.ts → orders-fIdANHSl.d.ts} +265 -1
  21. package/dist/pixelEvents-DYkiTkb2.d.cts +369 -0
  22. package/dist/pixelEvents-OVIkPw-J.d.ts +369 -0
  23. package/dist/store/index.cjs +5 -0
  24. package/dist/store/index.d.cts +11 -4
  25. package/dist/store/index.d.ts +11 -4
  26. package/dist/store/index.js +1 -0
  27. package/dist/utils/index.d.cts +6 -371
  28. package/dist/utils/index.d.ts +6 -371
  29. package/dist/{wishlist-DKYFZR0s.d.ts → wishlist-_bd4gLyQ.d.ts} +1 -1
  30. package/dist/{wishlist-CUuCTSVJ.d.cts → wishlist-stNzfvIP.d.cts} +1 -1
  31. package/package.json +1 -1
  32. package/dist/cart-kJoawc_Z.d.cts +0 -126
  33. package/dist/cart-y-7RPmnQ.d.ts +0 -126
  34. package/dist/orders-CjNmCY5I.d.cts +0 -144
  35. package/dist/orders-L_8eIkUS.d.ts +0 -144
@@ -0,0 +1,369 @@
1
+ import { f as Category$1, o as ProductDetail, m as Product, l as Order, C as Cart } from './orders-fIdANHSl.js';
2
+ import { C as CollectionResponse } from './collections-CkEUi3BR.js';
3
+
4
+ interface PageProps {
5
+ nav_bar: NavBar;
6
+ store: string;
7
+ store_desc: string;
8
+ page_meta_data: PageMeta;
9
+ primary_color: string;
10
+ social_media: SocialMedia[];
11
+ }
12
+ type PageMeta = {
13
+ title: string;
14
+ description: string;
15
+ image: string;
16
+ url: string;
17
+ canonical_url: string;
18
+ appleTouchIcon: string;
19
+ twitter_card_size: string;
20
+ favIcon: string;
21
+ };
22
+ interface TemplateTheme {
23
+ primary: string;
24
+ secondary: string;
25
+ }
26
+ interface Logo {
27
+ url: string;
28
+ title: string;
29
+ }
30
+ interface NavElementOld {
31
+ title: string;
32
+ is_dropdown: boolean;
33
+ link?: string;
34
+ menuitems?: Menuitem[];
35
+ }
36
+ interface Menuitem {
37
+ id: number;
38
+ title: string;
39
+ link: string;
40
+ sub_categories?: SubCategory[];
41
+ }
42
+ interface SubCategory {
43
+ id: number;
44
+ title: string;
45
+ link: string;
46
+ }
47
+ interface SocialMedia {
48
+ type: string;
49
+ link: string;
50
+ }
51
+ interface PagePropsFull {
52
+ store: number;
53
+ theme: Theme;
54
+ privacy_policy: any;
55
+ terms_and_condition: any;
56
+ custom_css: string;
57
+ custom_js: string;
58
+ navbar: NavBar;
59
+ color_scheme: ColorScheme;
60
+ social_links: SocialLinks;
61
+ hero: Hero;
62
+ sections: Section[];
63
+ footer: Footer;
64
+ start_head_tag: string;
65
+ end_head_tag: string;
66
+ start_body_tag: string;
67
+ end_body_tag: string;
68
+ logo: string;
69
+ favicon: string;
70
+ store_name: string;
71
+ store_description: string;
72
+ social_image: string;
73
+ url: string;
74
+ categories: HeaderCategory[];
75
+ store_phone: string;
76
+ store_email: string;
77
+ store_address: string;
78
+ google_tag_manager_id?: string;
79
+ }
80
+ type PageHeaderProps = Pick<PagePropsFull, "navbar" | "logo" | "store_name" | "store_description" | "color_scheme" | "social_image" | "social_links" | "url" | "footer" | "categories" | "store_phone" | "store_email" | "store_address" | "start_head_tag" | "end_head_tag" | "start_body_tag" | "end_body_tag" | "google_tag_manager_id"> & {
81
+ currency_code: string;
82
+ currency_symbol: string;
83
+ is_cod_enabled: boolean;
84
+ cod_amount: number;
85
+ store_review_enabled: boolean;
86
+ product_review_enabled: boolean;
87
+ store_review_popup_delay: number;
88
+ store_review_popup_delay_unit: "hours" | "days" | "weeks" | "months" | "minutes" | "seconds";
89
+ popup_enabled: boolean;
90
+ popup_heading_text: string;
91
+ popup_message_text: string;
92
+ popup_thank_you_message: string;
93
+ public_checkout_enabled: boolean;
94
+ booking_success_message: string;
95
+ order_success_message: string;
96
+ };
97
+ type HomePageContents = Pick<PagePropsFull, "hero" | "sections">;
98
+ interface Theme {
99
+ id: number;
100
+ name: string;
101
+ slug: string;
102
+ color_scheme: ColorScheme;
103
+ is_active: boolean;
104
+ }
105
+ interface ColorScheme {
106
+ primary: string;
107
+ secondary: string;
108
+ bodyBackground: string;
109
+ bodyBackground1: string;
110
+ bodyBackgroundSecondary: string;
111
+ bodyBackgroundDark: string;
112
+ borderBackground: string;
113
+ textPrimary: string;
114
+ textPrimaryLight: string;
115
+ textSecondary: string;
116
+ btnText: string;
117
+ }
118
+ interface RibbonMessage {
119
+ id: string;
120
+ message: string;
121
+ link: string;
122
+ }
123
+ interface RibbonBar {
124
+ type: "ribbon-bar";
125
+ messages: RibbonMessage[];
126
+ textColor: string;
127
+ id: string;
128
+ position: "top" | "bottom";
129
+ animation: string;
130
+ switchInterval: number;
131
+ }
132
+ interface NavBar {
133
+ wishlist: boolean;
134
+ cart: boolean;
135
+ navElements: NavElement[];
136
+ }
137
+ interface NavBar {
138
+ wishlist: boolean;
139
+ cart: boolean;
140
+ navElements: NavElement[];
141
+ ribbonbar: RibbonBar;
142
+ logoPosition: "left" | "center";
143
+ }
144
+ interface NavElement {
145
+ key: string;
146
+ title: string;
147
+ is_dropdown: boolean;
148
+ link?: string;
149
+ enabled?: boolean;
150
+ description: string;
151
+ }
152
+ interface NavElement {
153
+ key: string;
154
+ title: string;
155
+ is_dropdown: boolean;
156
+ link?: string;
157
+ enabled?: boolean;
158
+ description: string;
159
+ }
160
+ interface HeaderCategory {
161
+ id: number;
162
+ name: string;
163
+ link: string;
164
+ slug: string;
165
+ children?: HeaderCategory[];
166
+ }
167
+ interface SliderSettings {
168
+ id: string;
169
+ title: string;
170
+ description: string;
171
+ cta: string;
172
+ ctaLink: string;
173
+ bannerImage: string;
174
+ bannerImageMobile: string;
175
+ showContents?: boolean;
176
+ }
177
+ interface Hero {
178
+ title: string;
179
+ cta: string;
180
+ ctaLink: string;
181
+ heroImage: string;
182
+ description: string;
183
+ heroImageMobile: string;
184
+ showTitle: boolean;
185
+ showCTA: boolean;
186
+ bannerLink: string;
187
+ enableSlider: boolean;
188
+ sliderSettings: SliderSettings[];
189
+ switchInterval: number;
190
+ showHeroBanner: boolean;
191
+ }
192
+ type FilterType = "category" | "badge" | "title";
193
+ type FilterOption = "select" | "equals" | "contain" | "startWith" | "endWith";
194
+ type AvailableFilter = {
195
+ id: number;
196
+ label: string;
197
+ value: FilterType;
198
+ options: FilterOption[];
199
+ };
200
+ interface SectionFilters {
201
+ id: string;
202
+ type: FilterType;
203
+ label: string;
204
+ condition: FilterOption;
205
+ value: string | string[];
206
+ }
207
+ interface SectionFilters {
208
+ id: string;
209
+ type: FilterType;
210
+ label: string;
211
+ condition: FilterOption;
212
+ value: string | string[];
213
+ }
214
+ interface ProductCollection {
215
+ type: "product-collection";
216
+ title?: string;
217
+ filters?: SectionFilters[];
218
+ id: string;
219
+ row_count: number;
220
+ }
221
+ interface Category {
222
+ type: "categories";
223
+ title?: string;
224
+ id?: string;
225
+ categories?: Category$1.Root[];
226
+ selectedCategories?: string[];
227
+ }
228
+ interface Banner {
229
+ type: "banner";
230
+ title: string;
231
+ description?: string;
232
+ bannerImage: string;
233
+ ctaText?: string;
234
+ ctaLink?: string;
235
+ id: string;
236
+ bannerLink: string;
237
+ showContents: boolean;
238
+ mobileBannerImage: string;
239
+ }
240
+ interface SubCategorySection {
241
+ type: "sub-categories";
242
+ id: number;
243
+ title: string;
244
+ category?: Category$1.Root;
245
+ }
246
+ interface preFooterContent {
247
+ id: string;
248
+ image: string;
249
+ title: string;
250
+ description: string;
251
+ }
252
+ interface PreFooter {
253
+ type: "pre-footer";
254
+ id: string;
255
+ contents: preFooterContent[];
256
+ }
257
+ interface CategoryHighlights {
258
+ type: "category-highlights";
259
+ title?: string;
260
+ id?: string;
261
+ categories: Category$1.Root[];
262
+ }
263
+ interface StoreReview {
264
+ type: "store-review";
265
+ id: string;
266
+ title: string;
267
+ filter: string;
268
+ reviewsCount: number;
269
+ starColor: string;
270
+ autoPlayEnabled: boolean;
271
+ }
272
+ interface ProductHighlight {
273
+ type: "product-highlight";
274
+ id: string;
275
+ title: string;
276
+ productSlug: string;
277
+ }
278
+ interface ImageWithText {
279
+ type: "image-with-text";
280
+ id: string;
281
+ title: string;
282
+ content: string;
283
+ image: string;
284
+ showCta: boolean;
285
+ ctaText: string;
286
+ ctaLink: string;
287
+ imagePosition: 'left' | 'right';
288
+ }
289
+ interface Collections {
290
+ type: "collections";
291
+ id: string;
292
+ slug: string;
293
+ title?: string;
294
+ description?: string;
295
+ variants?: CollectionResponse[];
296
+ }
297
+ interface ValueHighlights {
298
+ type: "value-highlights";
299
+ id: string;
300
+ title: string;
301
+ description: string;
302
+ highlights: {
303
+ value: string;
304
+ label: string;
305
+ image: string;
306
+ social: null | string;
307
+ }[];
308
+ }
309
+ type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights";
310
+ type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights;
311
+ interface Footer {
312
+ showSocialLinks: boolean;
313
+ showContactDetails: boolean;
314
+ showNameWithLogo: boolean;
315
+ showWhatsappBubble: boolean;
316
+ showMadeWithStorepecker: boolean;
317
+ }
318
+ interface SocialLinks {
319
+ }
320
+ interface LocationData {
321
+ country_code: string;
322
+ city: string;
323
+ }
324
+
325
+ declare global {
326
+ interface Window {
327
+ fbq: any;
328
+ }
329
+ }
330
+ declare const pixelEvents: {
331
+ /**
332
+ * Track when a user views a product
333
+ */
334
+ productView: (product: ProductDetail.Root) => void;
335
+ /**
336
+ * Track when a product is added to cart
337
+ */
338
+ addToCart: (product: Product.ProductList, quantity?: number) => void;
339
+ removeFromCart: (product: ProductDetail.Root) => void;
340
+ /**
341
+ * Track when a product is added to wishlist
342
+ */
343
+ addToWishlist: (product: Product.ProductList) => void;
344
+ /**
345
+ * Track when user initiates checkout
346
+ */
347
+ initiateCheckout: (orderSummary: Order.OrderSummary, paymentMethod: string) => void;
348
+ /**
349
+ * Track successful purchases
350
+ */
351
+ purchase: (orderSummary: Order.OrderSummary) => void;
352
+ /**
353
+ * Track search events
354
+ */
355
+ search: (searchTerm: string, resultCount: number) => void;
356
+ /**
357
+ * Track when a user views their cart
358
+ */
359
+ cartView: (cart: Cart.Root) => void;
360
+ /**
361
+ * Track when a user completes a checkout
362
+ */
363
+ checkoutCompleted: (orderSummary: Order.OrderSummary) => void;
364
+ addressInfoSubmitted: () => void;
365
+ checkoutStarted: (cart: Cart.Root) => void;
366
+ pageViewed: () => void;
367
+ };
368
+
369
+ export { type AvailableFilter as A, type Banner as B, type Category as C, pixelEvents as D, type preFooterContent as E, type FilterOption as F, type HeaderCategory as H, type ImageWithText as I, type LocationData as L, type Menuitem as M, type NavBar as N, type PageHeaderProps as P, type RibbonBar as R, type SectionFilters as S, type TemplateTheme as T, type ValueHighlights as V, type CategoryHighlights as a, type Collections as b, type ColorScheme as c, type FilterType as d, type Footer as e, type Hero as f, type HomePageContents as g, type Logo as h, type NavElement as i, type NavElementOld as j, type PageMeta as k, type PageProps as l, type PagePropsFull as m, type PreFooter as n, type ProductCollection as o, type ProductHighlight as p, type RibbonMessage as q, type Section as r, type SectionType as s, type SliderSettings as t, type SocialLinks as u, type SocialMedia as v, type StoreReview as w, type SubCategory as x, type SubCategorySection as y, type Theme as z };
@@ -4,6 +4,7 @@ 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');
7
+ var chunkDODFO744_cjs = require('../chunk-DODFO744.cjs');
7
8
  require('../chunk-ECHV2JSY.cjs');
8
9
  require('../chunk-BBRXE57K.cjs');
9
10
  require('../chunk-NE3ZHELZ.cjs');
@@ -78,5 +79,9 @@ Object.defineProperty(exports, "useCartStore", {
78
79
  enumerable: true,
79
80
  get: function () { return chunkJH4JJBXE_cjs.useCartStore; }
80
81
  });
82
+ Object.defineProperty(exports, "useThemeData", {
83
+ enumerable: true,
84
+ get: function () { return chunkDODFO744_cjs.useThemeData; }
85
+ });
81
86
  exports.useProductStore = useProductStore;
82
87
  exports.useWishlistStore = useWishlistStore;
@@ -1,8 +1,9 @@
1
1
  import * as zustand from 'zustand';
2
- import { a as CartState, C as Cart, U as User } from '../cart-kJoawc_Z.cjs';
3
- import { W as Wishlist } from '../wishlist-CUuCTSVJ.cjs';
4
- import { d as Product } from '../product-DJMdi4D4.cjs';
2
+ import { e as CartState, C as Cart, U as User, m as Product } from '../orders-fIdANHSl.cjs';
3
+ import { W as Wishlist } from '../wishlist-stNzfvIP.cjs';
4
+ import { P as PageHeaderProps } from '../pixelEvents-DYkiTkb2.cjs';
5
5
  import 'react-toastify';
6
+ import '../collections-Bz9KD7Na.cjs';
6
7
 
7
8
  interface CartStore extends CartState {
8
9
  setCart: (cart: Cart.Root) => void;
@@ -71,4 +72,10 @@ interface ProductStore extends Product.ProductState {
71
72
  }
72
73
  declare const useProductStore: zustand.UseBoundStore<zustand.StoreApi<ProductStore>>;
73
74
 
74
- export { loginUser, useAuthStore, useCartStore, useProductStore, useWishlistStore };
75
+ interface ThemeStore {
76
+ themeData: PageHeaderProps | null;
77
+ setThemeData: (themeData: PageHeaderProps | null) => void;
78
+ }
79
+ declare const useThemeData: zustand.UseBoundStore<zustand.StoreApi<ThemeStore>>;
80
+
81
+ export { loginUser, useAuthStore, useCartStore, useProductStore, useThemeData, useWishlistStore };
@@ -1,8 +1,9 @@
1
1
  import * as zustand from 'zustand';
2
- import { a as CartState, C as Cart, U as User } from '../cart-y-7RPmnQ.js';
3
- import { W as Wishlist } from '../wishlist-DKYFZR0s.js';
4
- import { d as Product } from '../product-DJMdi4D4.js';
2
+ import { e as CartState, C as Cart, U as User, m as Product } from '../orders-fIdANHSl.js';
3
+ import { W as Wishlist } from '../wishlist-_bd4gLyQ.js';
4
+ import { P as PageHeaderProps } from '../pixelEvents-OVIkPw-J.js';
5
5
  import 'react-toastify';
6
+ import '../collections-CkEUi3BR.js';
6
7
 
7
8
  interface CartStore extends CartState {
8
9
  setCart: (cart: Cart.Root) => void;
@@ -71,4 +72,10 @@ interface ProductStore extends Product.ProductState {
71
72
  }
72
73
  declare const useProductStore: zustand.UseBoundStore<zustand.StoreApi<ProductStore>>;
73
74
 
74
- export { loginUser, useAuthStore, useCartStore, useProductStore, useWishlistStore };
75
+ interface ThemeStore {
76
+ themeData: PageHeaderProps | null;
77
+ setThemeData: (themeData: PageHeaderProps | null) => void;
78
+ }
79
+ declare const useThemeData: zustand.UseBoundStore<zustand.StoreApi<ThemeStore>>;
80
+
81
+ export { loginUser, useAuthStore, useCartStore, useProductStore, useThemeData, useWishlistStore };
@@ -2,6 +2,7 @@ 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';
5
+ export { useThemeData } from '../chunk-5NUDTIQ2.js';
5
6
  import '../chunk-3SYYP3XV.js';
6
7
  import '../chunk-WEMNXIRS.js';
7
8
  import '../chunk-BQ256JKN.js';