@usethrottle/catalog 1.3.0 → 1.4.1

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 (45) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +105 -9
  3. package/dist/admin.cjs +16 -16
  4. package/dist/admin.d.cts +14 -2
  5. package/dist/admin.d.ts +14 -2
  6. package/dist/admin.js +1 -1
  7. package/dist/{catalog-error-BOaSKgY3.d.cts → catalog-error-bG1XHquN.d.cts} +1 -1
  8. package/dist/{catalog-error-CSoPS0-d.d.ts → catalog-error-c3BVgU6k.d.ts} +1 -1
  9. package/dist/{chunk-2YQNMBDI.cjs → chunk-2ODFFMZ4.cjs} +274 -38
  10. package/dist/chunk-5AJS3CX5.cjs +192 -0
  11. package/dist/{chunk-CADIHOIR.js → chunk-6K7H7HBD.js} +89 -2
  12. package/dist/chunk-P3ABGAF5.js +192 -0
  13. package/dist/{chunk-3DLH56OX.js → chunk-STNQNHNZ.js} +258 -22
  14. package/dist/{chunk-GU63WFXI.cjs → chunk-VOOX3WJY.cjs} +102 -15
  15. package/dist/{client-6j1Iz-iJ.d.cts → client-CGGlbacq.d.cts} +1 -1
  16. package/dist/{client-B3mL2-xJ.d.ts → client-CNsVr2lR.d.ts} +1 -1
  17. package/dist/{contract-types-BRyonOYH.d.cts → contract-types-BJMeJSTz.d.cts} +269 -2
  18. package/dist/{contract-types-BRyonOYH.d.ts → contract-types-BJMeJSTz.d.ts} +269 -2
  19. package/dist/index.cjs +12 -2
  20. package/dist/index.d.cts +53 -7
  21. package/dist/index.d.ts +53 -7
  22. package/dist/index.js +11 -1
  23. package/dist/next.cjs +180 -0
  24. package/dist/next.d.cts +60 -0
  25. package/dist/next.d.ts +60 -0
  26. package/dist/next.js +180 -0
  27. package/dist/react-extras.cjs +27 -9
  28. package/dist/react-extras.d.cts +6 -4
  29. package/dist/react-extras.d.ts +6 -4
  30. package/dist/react-extras.js +20 -2
  31. package/dist/react.cjs +18 -14
  32. package/dist/react.d.cts +22 -5
  33. package/dist/react.d.ts +22 -5
  34. package/dist/react.js +6 -2
  35. package/dist/server.cjs +58 -66
  36. package/dist/server.d.cts +57 -10
  37. package/dist/server.d.ts +57 -10
  38. package/dist/server.js +52 -60
  39. package/dist/{types-D0PywKnN.d.cts → types-BtBxMbM5.d.cts} +40 -3
  40. package/dist/{types-BfveENg1.d.ts → types-dKvIfrVH.d.ts} +40 -3
  41. package/dist/url.d.cts +1 -1
  42. package/dist/url.d.ts +1 -1
  43. package/dist/{use-query-UWf6Pi5g.d.cts → use-query-C2rfTJd4.d.cts} +1 -1
  44. package/dist/{use-query-CR7r5tam.d.ts → use-query-DeCj1hXt.d.ts} +1 -1
  45. package/package.json +16 -2
@@ -151,6 +151,15 @@ type StorefrontConfigAnswer = {
151
151
  extensionId: string;
152
152
  };
153
153
  generation: number;
154
+ settings: StorefrontSettings;
155
+ filters: StorefrontFilterDefinition[];
156
+ settingsVersion: number;
157
+ };
158
+ type StorefrontFilterDefinition = {
159
+ key: string;
160
+ label: string;
161
+ display: 'checkbox' | 'swatch' | 'range' | 'boolean' | 'dropdown';
162
+ source: string;
154
163
  };
155
164
  type StorefrontFilterValuesAnswer = {
156
165
  key: string;
@@ -176,6 +185,28 @@ type StorefrontFilterValuesAnswer = {
176
185
  } | undefined;
177
186
  more: boolean;
178
187
  };
188
+ type StorefrontLatestReviewsAnswer = {
189
+ items: {
190
+ id: string;
191
+ rating: number;
192
+ title: string | null;
193
+ body: string;
194
+ displayName: string;
195
+ verified: boolean;
196
+ imported: boolean;
197
+ createdAt: string;
198
+ reply: {
199
+ body: string;
200
+ updatedAt: string;
201
+ } | null;
202
+ product: {
203
+ id: number;
204
+ handle: string;
205
+ title: string;
206
+ };
207
+ }[];
208
+ nextCursor: string | null;
209
+ };
179
210
  type StorefrontListAnswer = {
180
211
  products: StorefrontListProduct[];
181
212
  page: {
@@ -392,6 +423,49 @@ type StorefrontListProduct = {
392
423
  supersededBy?: string[] | undefined;
393
424
  supersedes?: string[] | undefined;
394
425
  };
426
+ type StorefrontLookupAnswer = {
427
+ collections: {
428
+ id: number;
429
+ handle: string;
430
+ title: string;
431
+ }[];
432
+ categories: {
433
+ id: string;
434
+ handle: string;
435
+ title: string;
436
+ }[];
437
+ products: {
438
+ id: number;
439
+ handle: string;
440
+ title: string;
441
+ }[];
442
+ };
443
+ type StorefrontMenuItem = {
444
+ label: string;
445
+ target: {
446
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
447
+ handle?: string | undefined;
448
+ q?: string | undefined;
449
+ href?: string | undefined;
450
+ };
451
+ children?: StorefrontMenuItem[] | undefined;
452
+ };
453
+ type StorefrontPageAnswer = {
454
+ handle: string;
455
+ title: string;
456
+ bodyHtml: string;
457
+ seo: {
458
+ title: string;
459
+ description: string;
460
+ };
461
+ };
462
+ type StorefrontPagesAnswer = {
463
+ pages: {
464
+ handle: string;
465
+ title: string;
466
+ position: number;
467
+ }[];
468
+ };
395
469
  type StorefrontProductAnswer = {
396
470
  product: {
397
471
  handle: string;
@@ -549,6 +623,199 @@ type StorefrontReviewsAnswer = ({
549
623
  }) | ({
550
624
  redirectTo: string;
551
625
  });
626
+ type StorefrontSettings = {
627
+ storefrontId: 'default';
628
+ brand: {
629
+ storeName: string;
630
+ logo: {
631
+ light: {
632
+ id: string;
633
+ url: string;
634
+ } | null;
635
+ dark: {
636
+ id: string;
637
+ url: string;
638
+ } | null;
639
+ };
640
+ favicon: {
641
+ id: string;
642
+ url: string;
643
+ } | null;
644
+ };
645
+ theme: {
646
+ light: {
647
+ colorPrimary: string;
648
+ colorPrimaryForeground: string;
649
+ colorBackground: string;
650
+ colorSurface: string;
651
+ colorForeground: string;
652
+ colorMuted: string;
653
+ colorMutedForeground: string;
654
+ colorBorder: string;
655
+ colorBorderControl: string;
656
+ colorAccent: string;
657
+ colorSale: string;
658
+ colorSuccess: string;
659
+ colorWarning: string;
660
+ colorDanger: string;
661
+ };
662
+ dark: {
663
+ colorPrimary: string;
664
+ colorPrimaryForeground: string;
665
+ colorBackground: string;
666
+ colorSurface: string;
667
+ colorForeground: string;
668
+ colorMuted: string;
669
+ colorMutedForeground: string;
670
+ colorBorder: string;
671
+ colorBorderControl: string;
672
+ colorAccent: string;
673
+ colorSale: string;
674
+ colorSuccess: string;
675
+ colorWarning: string;
676
+ colorDanger: string;
677
+ };
678
+ fonts: {
679
+ heading: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
680
+ body: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
681
+ mono: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
682
+ };
683
+ radius: number;
684
+ spacingScale: 'compact' | 'comfortable' | 'roomy';
685
+ colorScheme: 'light' | 'dark' | 'auto';
686
+ };
687
+ navigation: {
688
+ header: StorefrontMenuItem[];
689
+ footer: StorefrontMenuItem[];
690
+ };
691
+ home: {
692
+ hero: {
693
+ image: {
694
+ id: string;
695
+ url: string;
696
+ } | null;
697
+ heading: string;
698
+ subheading: string;
699
+ ctaLabel: string;
700
+ ctaTarget: {
701
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
702
+ handle?: string | undefined;
703
+ q?: string | undefined;
704
+ href?: string | undefined;
705
+ } | null;
706
+ };
707
+ shelves: {
708
+ kind: 'collection' | 'featured' | 'newest' | 'best_rated' | 'categories';
709
+ handle?: string | undefined;
710
+ title?: string | undefined;
711
+ limit: number;
712
+ }[];
713
+ };
714
+ announcement: {
715
+ enabled: boolean;
716
+ message: string;
717
+ target: {
718
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
719
+ handle?: string | undefined;
720
+ q?: string | undefined;
721
+ href?: string | undefined;
722
+ } | null;
723
+ startsAt: string | null;
724
+ endsAt: string | null;
725
+ };
726
+ listing: {
727
+ pageSize: number;
728
+ pagination: 'numbered' | 'load_more' | 'infinite';
729
+ columns: {
730
+ desktop: number;
731
+ mobile: number;
732
+ };
733
+ defaultSort: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
734
+ filterLayout: 'sidebar' | 'topbar' | 'drawer';
735
+ sorts: {
736
+ key: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
737
+ enabled: boolean;
738
+ label: string;
739
+ }[];
740
+ };
741
+ card: {
742
+ style: 'standard' | 'minimal' | 'overlay' | 'row';
743
+ showRating: boolean;
744
+ showSwatches: boolean;
745
+ showBrand: boolean;
746
+ showCompareAt: boolean;
747
+ showBadges: boolean;
748
+ secondImageOnHover: boolean;
749
+ quickAdd: boolean;
750
+ };
751
+ badges: {
752
+ sale: {
753
+ enabled: boolean;
754
+ label: string;
755
+ colour: string;
756
+ };
757
+ new: {
758
+ enabled: boolean;
759
+ label: string;
760
+ colour: string;
761
+ days: number;
762
+ };
763
+ lowStock: {
764
+ enabled: boolean;
765
+ label: string;
766
+ };
767
+ custom: {
768
+ tag: string;
769
+ label: string;
770
+ colour: string;
771
+ }[];
772
+ };
773
+ stock: {
774
+ hideOutOfStock: boolean;
775
+ showExactCount: boolean;
776
+ words: {
777
+ inStock: string;
778
+ lowStock: string;
779
+ outOfStock: string;
780
+ backorder: string;
781
+ preorder: string;
782
+ };
783
+ lowStockThreshold: number | null;
784
+ };
785
+ product: {
786
+ layout: 'classic' | 'stacked' | 'editorial';
787
+ sectionsStyle: 'auto' | 'tabs' | 'accordion' | 'stacked';
788
+ sections: {
789
+ key: 'description' | 'specs' | 'shipping' | 'tags' | 'categories' | 'related' | 'reviews';
790
+ enabled: boolean;
791
+ title: string;
792
+ pageHandle: string | null;
793
+ }[];
794
+ relatedLimit: number;
795
+ relatedTitle: string;
796
+ };
797
+ seo: {
798
+ titleTemplate: string;
799
+ defaultDescription: string;
800
+ shareImage: {
801
+ id: string;
802
+ url: string;
803
+ } | null;
804
+ };
805
+ strings: Record<'shop.title' | 'shop.description' | 'search.title' | 'search.placeholder' | 'search.results' | 'empty.search' | 'empty.listing' | 'empty.category' | 'empty.collection' | 'empty.cart' | 'cart.title' | 'cart.checkout' | 'cart.continueShopping' | 'filters.title' | 'filters.clearAll' | 'filters.apply' | 'filters.showMore' | 'filters.showLess' | 'filters.priceMin' | 'filters.priceMax' | 'boolean.yes' | 'boolean.no' | 'sort.label' | 'listing.count' | 'listing.loadMore' | 'listing.loading' | 'listing.previous' | 'listing.next' | 'product.addToCart' | 'product.quantity' | 'product.selectOption' | 'product.sku' | 'product.description' | 'product.specs' | 'product.shipping' | 'product.tags' | 'product.categories' | 'product.related' | 'product.reviews' | 'product.noReviews' | 'product.writeReview' | 'home.shopAll' | 'home.featured' | 'home.newest' | 'home.bestRated' | 'home.categories' | 'footer.copyright' | 'nav.menu' | 'nav.account' | 'nav.cart' | 'error.notFound' | 'error.generic', string>;
806
+ routes: {
807
+ product: string;
808
+ category: string;
809
+ collection: string;
810
+ tag: string;
811
+ page: string;
812
+ search: string;
813
+ shop: string;
814
+ };
815
+ preview: {
816
+ storeUrl: string | null;
817
+ };
818
+ };
552
819
  type StorefrontSuggestAnswer = {
553
820
  products: {
554
821
  handle: string;
@@ -596,6 +863,6 @@ type StorefrontTagsAnswer = {
596
863
  productCount: number;
597
864
  }[];
598
865
  };
599
- type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE';
866
+ type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE' | 'PAGE_NOT_FOUND' | 'PREVIEW_EXPIRED';
600
867
 
601
- export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontCategoryNode as S, ReviewSubmitInput as a, StorefrontListAnswer as b, StorefrontListProduct as c, ReviewEligibilityAnswer as d, StorefrontProductAnswer as e, CartCheckRequest as f, CartCreateAnswer as g, CartCreateRequest as h, CatalogContractErrorCode as i, StorefrontCategoriesAnswer as j, StorefrontCategoryAnswer as k, StorefrontCollectionAnswer as l, StorefrontCollectionsAnswer as m, StorefrontConfigAnswer as n, StorefrontFilterValuesAnswer as o, StorefrontRelatedAnswer as p, StorefrontReviewsAnswer as q, StorefrontSuggestAnswer as r, StorefrontTagsAnswer as s };
868
+ export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontSettings as S, ReviewSubmitInput as a, StorefrontMenuItem as b, StorefrontCategoryNode as c, StorefrontListAnswer as d, StorefrontListProduct as e, ReviewEligibilityAnswer as f, StorefrontProductAnswer as g, CartCheckRequest as h, CartCreateAnswer as i, CartCreateRequest as j, CatalogContractErrorCode as k, StorefrontCategoriesAnswer as l, StorefrontCategoryAnswer as m, StorefrontCollectionAnswer as n, StorefrontCollectionsAnswer as o, StorefrontConfigAnswer as p, StorefrontFilterDefinition as q, StorefrontFilterValuesAnswer as r, StorefrontLatestReviewsAnswer as s, StorefrontLookupAnswer as t, StorefrontPageAnswer as u, StorefrontPagesAnswer as v, StorefrontRelatedAnswer as w, StorefrontReviewsAnswer as x, StorefrontSuggestAnswer as y, StorefrontTagsAnswer as z };
@@ -151,6 +151,15 @@ type StorefrontConfigAnswer = {
151
151
  extensionId: string;
152
152
  };
153
153
  generation: number;
154
+ settings: StorefrontSettings;
155
+ filters: StorefrontFilterDefinition[];
156
+ settingsVersion: number;
157
+ };
158
+ type StorefrontFilterDefinition = {
159
+ key: string;
160
+ label: string;
161
+ display: 'checkbox' | 'swatch' | 'range' | 'boolean' | 'dropdown';
162
+ source: string;
154
163
  };
155
164
  type StorefrontFilterValuesAnswer = {
156
165
  key: string;
@@ -176,6 +185,28 @@ type StorefrontFilterValuesAnswer = {
176
185
  } | undefined;
177
186
  more: boolean;
178
187
  };
188
+ type StorefrontLatestReviewsAnswer = {
189
+ items: {
190
+ id: string;
191
+ rating: number;
192
+ title: string | null;
193
+ body: string;
194
+ displayName: string;
195
+ verified: boolean;
196
+ imported: boolean;
197
+ createdAt: string;
198
+ reply: {
199
+ body: string;
200
+ updatedAt: string;
201
+ } | null;
202
+ product: {
203
+ id: number;
204
+ handle: string;
205
+ title: string;
206
+ };
207
+ }[];
208
+ nextCursor: string | null;
209
+ };
179
210
  type StorefrontListAnswer = {
180
211
  products: StorefrontListProduct[];
181
212
  page: {
@@ -392,6 +423,49 @@ type StorefrontListProduct = {
392
423
  supersededBy?: string[] | undefined;
393
424
  supersedes?: string[] | undefined;
394
425
  };
426
+ type StorefrontLookupAnswer = {
427
+ collections: {
428
+ id: number;
429
+ handle: string;
430
+ title: string;
431
+ }[];
432
+ categories: {
433
+ id: string;
434
+ handle: string;
435
+ title: string;
436
+ }[];
437
+ products: {
438
+ id: number;
439
+ handle: string;
440
+ title: string;
441
+ }[];
442
+ };
443
+ type StorefrontMenuItem = {
444
+ label: string;
445
+ target: {
446
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
447
+ handle?: string | undefined;
448
+ q?: string | undefined;
449
+ href?: string | undefined;
450
+ };
451
+ children?: StorefrontMenuItem[] | undefined;
452
+ };
453
+ type StorefrontPageAnswer = {
454
+ handle: string;
455
+ title: string;
456
+ bodyHtml: string;
457
+ seo: {
458
+ title: string;
459
+ description: string;
460
+ };
461
+ };
462
+ type StorefrontPagesAnswer = {
463
+ pages: {
464
+ handle: string;
465
+ title: string;
466
+ position: number;
467
+ }[];
468
+ };
395
469
  type StorefrontProductAnswer = {
396
470
  product: {
397
471
  handle: string;
@@ -549,6 +623,199 @@ type StorefrontReviewsAnswer = ({
549
623
  }) | ({
550
624
  redirectTo: string;
551
625
  });
626
+ type StorefrontSettings = {
627
+ storefrontId: 'default';
628
+ brand: {
629
+ storeName: string;
630
+ logo: {
631
+ light: {
632
+ id: string;
633
+ url: string;
634
+ } | null;
635
+ dark: {
636
+ id: string;
637
+ url: string;
638
+ } | null;
639
+ };
640
+ favicon: {
641
+ id: string;
642
+ url: string;
643
+ } | null;
644
+ };
645
+ theme: {
646
+ light: {
647
+ colorPrimary: string;
648
+ colorPrimaryForeground: string;
649
+ colorBackground: string;
650
+ colorSurface: string;
651
+ colorForeground: string;
652
+ colorMuted: string;
653
+ colorMutedForeground: string;
654
+ colorBorder: string;
655
+ colorBorderControl: string;
656
+ colorAccent: string;
657
+ colorSale: string;
658
+ colorSuccess: string;
659
+ colorWarning: string;
660
+ colorDanger: string;
661
+ };
662
+ dark: {
663
+ colorPrimary: string;
664
+ colorPrimaryForeground: string;
665
+ colorBackground: string;
666
+ colorSurface: string;
667
+ colorForeground: string;
668
+ colorMuted: string;
669
+ colorMutedForeground: string;
670
+ colorBorder: string;
671
+ colorBorderControl: string;
672
+ colorAccent: string;
673
+ colorSale: string;
674
+ colorSuccess: string;
675
+ colorWarning: string;
676
+ colorDanger: string;
677
+ };
678
+ fonts: {
679
+ heading: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
680
+ body: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
681
+ mono: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
682
+ };
683
+ radius: number;
684
+ spacingScale: 'compact' | 'comfortable' | 'roomy';
685
+ colorScheme: 'light' | 'dark' | 'auto';
686
+ };
687
+ navigation: {
688
+ header: StorefrontMenuItem[];
689
+ footer: StorefrontMenuItem[];
690
+ };
691
+ home: {
692
+ hero: {
693
+ image: {
694
+ id: string;
695
+ url: string;
696
+ } | null;
697
+ heading: string;
698
+ subheading: string;
699
+ ctaLabel: string;
700
+ ctaTarget: {
701
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
702
+ handle?: string | undefined;
703
+ q?: string | undefined;
704
+ href?: string | undefined;
705
+ } | null;
706
+ };
707
+ shelves: {
708
+ kind: 'collection' | 'featured' | 'newest' | 'best_rated' | 'categories';
709
+ handle?: string | undefined;
710
+ title?: string | undefined;
711
+ limit: number;
712
+ }[];
713
+ };
714
+ announcement: {
715
+ enabled: boolean;
716
+ message: string;
717
+ target: {
718
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
719
+ handle?: string | undefined;
720
+ q?: string | undefined;
721
+ href?: string | undefined;
722
+ } | null;
723
+ startsAt: string | null;
724
+ endsAt: string | null;
725
+ };
726
+ listing: {
727
+ pageSize: number;
728
+ pagination: 'numbered' | 'load_more' | 'infinite';
729
+ columns: {
730
+ desktop: number;
731
+ mobile: number;
732
+ };
733
+ defaultSort: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
734
+ filterLayout: 'sidebar' | 'topbar' | 'drawer';
735
+ sorts: {
736
+ key: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
737
+ enabled: boolean;
738
+ label: string;
739
+ }[];
740
+ };
741
+ card: {
742
+ style: 'standard' | 'minimal' | 'overlay' | 'row';
743
+ showRating: boolean;
744
+ showSwatches: boolean;
745
+ showBrand: boolean;
746
+ showCompareAt: boolean;
747
+ showBadges: boolean;
748
+ secondImageOnHover: boolean;
749
+ quickAdd: boolean;
750
+ };
751
+ badges: {
752
+ sale: {
753
+ enabled: boolean;
754
+ label: string;
755
+ colour: string;
756
+ };
757
+ new: {
758
+ enabled: boolean;
759
+ label: string;
760
+ colour: string;
761
+ days: number;
762
+ };
763
+ lowStock: {
764
+ enabled: boolean;
765
+ label: string;
766
+ };
767
+ custom: {
768
+ tag: string;
769
+ label: string;
770
+ colour: string;
771
+ }[];
772
+ };
773
+ stock: {
774
+ hideOutOfStock: boolean;
775
+ showExactCount: boolean;
776
+ words: {
777
+ inStock: string;
778
+ lowStock: string;
779
+ outOfStock: string;
780
+ backorder: string;
781
+ preorder: string;
782
+ };
783
+ lowStockThreshold: number | null;
784
+ };
785
+ product: {
786
+ layout: 'classic' | 'stacked' | 'editorial';
787
+ sectionsStyle: 'auto' | 'tabs' | 'accordion' | 'stacked';
788
+ sections: {
789
+ key: 'description' | 'specs' | 'shipping' | 'tags' | 'categories' | 'related' | 'reviews';
790
+ enabled: boolean;
791
+ title: string;
792
+ pageHandle: string | null;
793
+ }[];
794
+ relatedLimit: number;
795
+ relatedTitle: string;
796
+ };
797
+ seo: {
798
+ titleTemplate: string;
799
+ defaultDescription: string;
800
+ shareImage: {
801
+ id: string;
802
+ url: string;
803
+ } | null;
804
+ };
805
+ strings: Record<'shop.title' | 'shop.description' | 'search.title' | 'search.placeholder' | 'search.results' | 'empty.search' | 'empty.listing' | 'empty.category' | 'empty.collection' | 'empty.cart' | 'cart.title' | 'cart.checkout' | 'cart.continueShopping' | 'filters.title' | 'filters.clearAll' | 'filters.apply' | 'filters.showMore' | 'filters.showLess' | 'filters.priceMin' | 'filters.priceMax' | 'boolean.yes' | 'boolean.no' | 'sort.label' | 'listing.count' | 'listing.loadMore' | 'listing.loading' | 'listing.previous' | 'listing.next' | 'product.addToCart' | 'product.quantity' | 'product.selectOption' | 'product.sku' | 'product.description' | 'product.specs' | 'product.shipping' | 'product.tags' | 'product.categories' | 'product.related' | 'product.reviews' | 'product.noReviews' | 'product.writeReview' | 'home.shopAll' | 'home.featured' | 'home.newest' | 'home.bestRated' | 'home.categories' | 'footer.copyright' | 'nav.menu' | 'nav.account' | 'nav.cart' | 'error.notFound' | 'error.generic', string>;
806
+ routes: {
807
+ product: string;
808
+ category: string;
809
+ collection: string;
810
+ tag: string;
811
+ page: string;
812
+ search: string;
813
+ shop: string;
814
+ };
815
+ preview: {
816
+ storeUrl: string | null;
817
+ };
818
+ };
552
819
  type StorefrontSuggestAnswer = {
553
820
  products: {
554
821
  handle: string;
@@ -596,6 +863,6 @@ type StorefrontTagsAnswer = {
596
863
  productCount: number;
597
864
  }[];
598
865
  };
599
- type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE';
866
+ type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE' | 'PAGE_NOT_FOUND' | 'PREVIEW_EXPIRED';
600
867
 
601
- export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontCategoryNode as S, ReviewSubmitInput as a, StorefrontListAnswer as b, StorefrontListProduct as c, ReviewEligibilityAnswer as d, StorefrontProductAnswer as e, CartCheckRequest as f, CartCreateAnswer as g, CartCreateRequest as h, CatalogContractErrorCode as i, StorefrontCategoriesAnswer as j, StorefrontCategoryAnswer as k, StorefrontCollectionAnswer as l, StorefrontCollectionsAnswer as m, StorefrontConfigAnswer as n, StorefrontFilterValuesAnswer as o, StorefrontRelatedAnswer as p, StorefrontReviewsAnswer as q, StorefrontSuggestAnswer as r, StorefrontTagsAnswer as s };
868
+ export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontSettings as S, ReviewSubmitInput as a, StorefrontMenuItem as b, StorefrontCategoryNode as c, StorefrontListAnswer as d, StorefrontListProduct as e, ReviewEligibilityAnswer as f, StorefrontProductAnswer as g, CartCheckRequest as h, CartCreateAnswer as i, CartCreateRequest as j, CatalogContractErrorCode as k, StorefrontCategoriesAnswer as l, StorefrontCategoryAnswer as m, StorefrontCollectionAnswer as n, StorefrontCollectionsAnswer as o, StorefrontConfigAnswer as p, StorefrontFilterDefinition as q, StorefrontFilterValuesAnswer as r, StorefrontLatestReviewsAnswer as s, StorefrontLookupAnswer as t, StorefrontPageAnswer as u, StorefrontPagesAnswer as v, StorefrontRelatedAnswer as w, StorefrontReviewsAnswer as x, StorefrontSuggestAnswer as y, StorefrontTagsAnswer as z };
package/dist/index.cjs CHANGED
@@ -21,7 +21,12 @@
21
21
 
22
22
 
23
23
 
24
- var _chunk2YQNMBDIcjs = require('./chunk-2YQNMBDI.cjs');
24
+
25
+
26
+
27
+
28
+
29
+ var _chunk2ODFFMZ4cjs = require('./chunk-2ODFFMZ4.cjs');
25
30
  require('./chunk-ETV4XYOV.cjs');
26
31
 
27
32
 
@@ -46,4 +51,9 @@ require('./chunk-ETV4XYOV.cjs');
46
51
 
47
52
 
48
53
 
49
- exports.CURRENCIES = _chunk2YQNMBDIcjs.CURRENCIES; exports.CartLineError = _chunk2YQNMBDIcjs.CartLineError; exports.CatalogError = _chunk2YQNMBDIcjs.CatalogError; exports.CustomerTokenInvalidError = _chunk2YQNMBDIcjs.CustomerTokenInvalidError; exports.FeatureUnavailableError = _chunk2YQNMBDIcjs.FeatureUnavailableError; exports.NetworkError = _chunk2YQNMBDIcjs.NetworkError; exports.OriginNotAllowedError = _chunk2YQNMBDIcjs.OriginNotAllowedError; exports.RateLimitedError = _chunk2YQNMBDIcjs.RateLimitedError; exports.SDK_VERSION = _chunk2YQNMBDIcjs.SDK_VERSION; exports.TimeoutError = _chunk2YQNMBDIcjs.TimeoutError; exports.UnknownCurrencyError = _chunk2YQNMBDIcjs.UnknownCurrencyError; exports.createCatalogClient = _chunk2YQNMBDIcjs.createCatalogClient; exports.currencySymbol = _chunk2YQNMBDIcjs.currencySymbol; exports.formatMoney = _chunk2YQNMBDIcjs.formatMoney; exports.isCatalogError = _chunk2YQNMBDIcjs.isCatalogError; exports.isKnownCurrency = _chunk2YQNMBDIcjs.isKnownCurrency; exports.minorUnitsOf = _chunk2YQNMBDIcjs.minorUnitsOf; exports.money = _chunk2YQNMBDIcjs.money; exports.moneyValue = _chunk2YQNMBDIcjs.moneyValue; exports.parseMoney = _chunk2YQNMBDIcjs.parseMoney; exports.toDecimalString = _chunk2YQNMBDIcjs.toDecimalString; exports.toMinor = _chunk2YQNMBDIcjs.toMinor;
54
+
55
+
56
+
57
+
58
+
59
+ exports.CURRENCIES = _chunk2ODFFMZ4cjs.CURRENCIES; exports.CartLineError = _chunk2ODFFMZ4cjs.CartLineError; exports.CatalogError = _chunk2ODFFMZ4cjs.CatalogError; exports.CustomerTokenInvalidError = _chunk2ODFFMZ4cjs.CustomerTokenInvalidError; exports.DEFAULT_STRINGS = _chunk2ODFFMZ4cjs.DEFAULT_STRINGS; exports.FeatureUnavailableError = _chunk2ODFFMZ4cjs.FeatureUnavailableError; exports.NetworkError = _chunk2ODFFMZ4cjs.NetworkError; exports.OriginNotAllowedError = _chunk2ODFFMZ4cjs.OriginNotAllowedError; exports.RateLimitedError = _chunk2ODFFMZ4cjs.RateLimitedError; exports.SDK_VERSION = _chunk2ODFFMZ4cjs.SDK_VERSION; exports.TimeoutError = _chunk2ODFFMZ4cjs.TimeoutError; exports.UnknownCurrencyError = _chunk2ODFFMZ4cjs.UnknownCurrencyError; exports.createCatalogClient = _chunk2ODFFMZ4cjs.createCatalogClient; exports.currencySymbol = _chunk2ODFFMZ4cjs.currencySymbol; exports.fontStylesheetHref = _chunk2ODFFMZ4cjs.fontStylesheetHref; exports.formatMoney = _chunk2ODFFMZ4cjs.formatMoney; exports.isCatalogError = _chunk2ODFFMZ4cjs.isCatalogError; exports.isKnownCurrency = _chunk2ODFFMZ4cjs.isKnownCurrency; exports.minorUnitsOf = _chunk2ODFFMZ4cjs.minorUnitsOf; exports.money = _chunk2ODFFMZ4cjs.money; exports.moneyValue = _chunk2ODFFMZ4cjs.moneyValue; exports.parseMoney = _chunk2ODFFMZ4cjs.parseMoney; exports.resolveMenuTarget = _chunk2ODFFMZ4cjs.resolveMenuTarget; exports.t = _chunk2ODFFMZ4cjs.t; exports.toAuthAppearance = _chunk2ODFFMZ4cjs.toAuthAppearance; exports.toDecimalString = _chunk2ODFFMZ4cjs.toDecimalString; exports.toMinor = _chunk2ODFFMZ4cjs.toMinor;